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

     1  // Code generated from _gen/ARM64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "cmd/compile/internal/types"
     6  
     7  func rewriteValueARM64(v *Value) bool {
     8  	switch v.Op {
     9  	case OpARM64ADCSflags:
    10  		return rewriteValueARM64_OpARM64ADCSflags(v)
    11  	case OpARM64ADD:
    12  		return rewriteValueARM64_OpARM64ADD(v)
    13  	case OpARM64ADDSflags:
    14  		return rewriteValueARM64_OpARM64ADDSflags(v)
    15  	case OpARM64ADDconst:
    16  		return rewriteValueARM64_OpARM64ADDconst(v)
    17  	case OpARM64ADDshiftLL:
    18  		return rewriteValueARM64_OpARM64ADDshiftLL(v)
    19  	case OpARM64ADDshiftRA:
    20  		return rewriteValueARM64_OpARM64ADDshiftRA(v)
    21  	case OpARM64ADDshiftRL:
    22  		return rewriteValueARM64_OpARM64ADDshiftRL(v)
    23  	case OpARM64AND:
    24  		return rewriteValueARM64_OpARM64AND(v)
    25  	case OpARM64ANDconst:
    26  		return rewriteValueARM64_OpARM64ANDconst(v)
    27  	case OpARM64ANDshiftLL:
    28  		return rewriteValueARM64_OpARM64ANDshiftLL(v)
    29  	case OpARM64ANDshiftRA:
    30  		return rewriteValueARM64_OpARM64ANDshiftRA(v)
    31  	case OpARM64ANDshiftRL:
    32  		return rewriteValueARM64_OpARM64ANDshiftRL(v)
    33  	case OpARM64ANDshiftRO:
    34  		return rewriteValueARM64_OpARM64ANDshiftRO(v)
    35  	case OpARM64BIC:
    36  		return rewriteValueARM64_OpARM64BIC(v)
    37  	case OpARM64BICshiftLL:
    38  		return rewriteValueARM64_OpARM64BICshiftLL(v)
    39  	case OpARM64BICshiftRA:
    40  		return rewriteValueARM64_OpARM64BICshiftRA(v)
    41  	case OpARM64BICshiftRL:
    42  		return rewriteValueARM64_OpARM64BICshiftRL(v)
    43  	case OpARM64BICshiftRO:
    44  		return rewriteValueARM64_OpARM64BICshiftRO(v)
    45  	case OpARM64CMN:
    46  		return rewriteValueARM64_OpARM64CMN(v)
    47  	case OpARM64CMNW:
    48  		return rewriteValueARM64_OpARM64CMNW(v)
    49  	case OpARM64CMNWconst:
    50  		return rewriteValueARM64_OpARM64CMNWconst(v)
    51  	case OpARM64CMNconst:
    52  		return rewriteValueARM64_OpARM64CMNconst(v)
    53  	case OpARM64CMNshiftLL:
    54  		return rewriteValueARM64_OpARM64CMNshiftLL(v)
    55  	case OpARM64CMNshiftRA:
    56  		return rewriteValueARM64_OpARM64CMNshiftRA(v)
    57  	case OpARM64CMNshiftRL:
    58  		return rewriteValueARM64_OpARM64CMNshiftRL(v)
    59  	case OpARM64CMP:
    60  		return rewriteValueARM64_OpARM64CMP(v)
    61  	case OpARM64CMPW:
    62  		return rewriteValueARM64_OpARM64CMPW(v)
    63  	case OpARM64CMPWconst:
    64  		return rewriteValueARM64_OpARM64CMPWconst(v)
    65  	case OpARM64CMPconst:
    66  		return rewriteValueARM64_OpARM64CMPconst(v)
    67  	case OpARM64CMPshiftLL:
    68  		return rewriteValueARM64_OpARM64CMPshiftLL(v)
    69  	case OpARM64CMPshiftRA:
    70  		return rewriteValueARM64_OpARM64CMPshiftRA(v)
    71  	case OpARM64CMPshiftRL:
    72  		return rewriteValueARM64_OpARM64CMPshiftRL(v)
    73  	case OpARM64CSEL:
    74  		return rewriteValueARM64_OpARM64CSEL(v)
    75  	case OpARM64CSEL0:
    76  		return rewriteValueARM64_OpARM64CSEL0(v)
    77  	case OpARM64CSETM:
    78  		return rewriteValueARM64_OpARM64CSETM(v)
    79  	case OpARM64CSINC:
    80  		return rewriteValueARM64_OpARM64CSINC(v)
    81  	case OpARM64CSINV:
    82  		return rewriteValueARM64_OpARM64CSINV(v)
    83  	case OpARM64CSNEG:
    84  		return rewriteValueARM64_OpARM64CSNEG(v)
    85  	case OpARM64DIV:
    86  		return rewriteValueARM64_OpARM64DIV(v)
    87  	case OpARM64DIVW:
    88  		return rewriteValueARM64_OpARM64DIVW(v)
    89  	case OpARM64EON:
    90  		return rewriteValueARM64_OpARM64EON(v)
    91  	case OpARM64EONshiftLL:
    92  		return rewriteValueARM64_OpARM64EONshiftLL(v)
    93  	case OpARM64EONshiftRA:
    94  		return rewriteValueARM64_OpARM64EONshiftRA(v)
    95  	case OpARM64EONshiftRL:
    96  		return rewriteValueARM64_OpARM64EONshiftRL(v)
    97  	case OpARM64EONshiftRO:
    98  		return rewriteValueARM64_OpARM64EONshiftRO(v)
    99  	case OpARM64Equal:
   100  		return rewriteValueARM64_OpARM64Equal(v)
   101  	case OpARM64FADDD:
   102  		return rewriteValueARM64_OpARM64FADDD(v)
   103  	case OpARM64FADDS:
   104  		return rewriteValueARM64_OpARM64FADDS(v)
   105  	case OpARM64FCMPD:
   106  		return rewriteValueARM64_OpARM64FCMPD(v)
   107  	case OpARM64FCMPS:
   108  		return rewriteValueARM64_OpARM64FCMPS(v)
   109  	case OpARM64FCVTDS:
   110  		return rewriteValueARM64_OpARM64FCVTDS(v)
   111  	case OpARM64FLDPQ:
   112  		return rewriteValueARM64_OpARM64FLDPQ(v)
   113  	case OpARM64FMOVDfpgp:
   114  		return rewriteValueARM64_OpARM64FMOVDfpgp(v)
   115  	case OpARM64FMOVDgpfp:
   116  		return rewriteValueARM64_OpARM64FMOVDgpfp(v)
   117  	case OpARM64FMOVDload:
   118  		return rewriteValueARM64_OpARM64FMOVDload(v)
   119  	case OpARM64FMOVDloadidx:
   120  		return rewriteValueARM64_OpARM64FMOVDloadidx(v)
   121  	case OpARM64FMOVDloadidx8:
   122  		return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
   123  	case OpARM64FMOVDstore:
   124  		return rewriteValueARM64_OpARM64FMOVDstore(v)
   125  	case OpARM64FMOVDstoreidx:
   126  		return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
   127  	case OpARM64FMOVDstoreidx8:
   128  		return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
   129  	case OpARM64FMOVQload:
   130  		return rewriteValueARM64_OpARM64FMOVQload(v)
   131  	case OpARM64FMOVQstore:
   132  		return rewriteValueARM64_OpARM64FMOVQstore(v)
   133  	case OpARM64FMOVSload:
   134  		return rewriteValueARM64_OpARM64FMOVSload(v)
   135  	case OpARM64FMOVSloadidx:
   136  		return rewriteValueARM64_OpARM64FMOVSloadidx(v)
   137  	case OpARM64FMOVSloadidx4:
   138  		return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
   139  	case OpARM64FMOVSstore:
   140  		return rewriteValueARM64_OpARM64FMOVSstore(v)
   141  	case OpARM64FMOVSstoreidx:
   142  		return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
   143  	case OpARM64FMOVSstoreidx4:
   144  		return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
   145  	case OpARM64FMULD:
   146  		return rewriteValueARM64_OpARM64FMULD(v)
   147  	case OpARM64FMULS:
   148  		return rewriteValueARM64_OpARM64FMULS(v)
   149  	case OpARM64FNEGD:
   150  		return rewriteValueARM64_OpARM64FNEGD(v)
   151  	case OpARM64FNEGS:
   152  		return rewriteValueARM64_OpARM64FNEGS(v)
   153  	case OpARM64FNMULD:
   154  		return rewriteValueARM64_OpARM64FNMULD(v)
   155  	case OpARM64FNMULS:
   156  		return rewriteValueARM64_OpARM64FNMULS(v)
   157  	case OpARM64FSTPQ:
   158  		return rewriteValueARM64_OpARM64FSTPQ(v)
   159  	case OpARM64FSUBD:
   160  		return rewriteValueARM64_OpARM64FSUBD(v)
   161  	case OpARM64FSUBS:
   162  		return rewriteValueARM64_OpARM64FSUBS(v)
   163  	case OpARM64GreaterEqual:
   164  		return rewriteValueARM64_OpARM64GreaterEqual(v)
   165  	case OpARM64GreaterEqualF:
   166  		return rewriteValueARM64_OpARM64GreaterEqualF(v)
   167  	case OpARM64GreaterEqualNoov:
   168  		return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
   169  	case OpARM64GreaterEqualU:
   170  		return rewriteValueARM64_OpARM64GreaterEqualU(v)
   171  	case OpARM64GreaterThan:
   172  		return rewriteValueARM64_OpARM64GreaterThan(v)
   173  	case OpARM64GreaterThanF:
   174  		return rewriteValueARM64_OpARM64GreaterThanF(v)
   175  	case OpARM64GreaterThanU:
   176  		return rewriteValueARM64_OpARM64GreaterThanU(v)
   177  	case OpARM64LDP:
   178  		return rewriteValueARM64_OpARM64LDP(v)
   179  	case OpARM64LessEqual:
   180  		return rewriteValueARM64_OpARM64LessEqual(v)
   181  	case OpARM64LessEqualF:
   182  		return rewriteValueARM64_OpARM64LessEqualF(v)
   183  	case OpARM64LessEqualU:
   184  		return rewriteValueARM64_OpARM64LessEqualU(v)
   185  	case OpARM64LessThan:
   186  		return rewriteValueARM64_OpARM64LessThan(v)
   187  	case OpARM64LessThanF:
   188  		return rewriteValueARM64_OpARM64LessThanF(v)
   189  	case OpARM64LessThanNoov:
   190  		return rewriteValueARM64_OpARM64LessThanNoov(v)
   191  	case OpARM64LessThanU:
   192  		return rewriteValueARM64_OpARM64LessThanU(v)
   193  	case OpARM64LoweredPanicBoundsCR:
   194  		return rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v)
   195  	case OpARM64LoweredPanicBoundsRC:
   196  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v)
   197  	case OpARM64LoweredPanicBoundsRR:
   198  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v)
   199  	case OpARM64MADD:
   200  		return rewriteValueARM64_OpARM64MADD(v)
   201  	case OpARM64MADDW:
   202  		return rewriteValueARM64_OpARM64MADDW(v)
   203  	case OpARM64MNEG:
   204  		return rewriteValueARM64_OpARM64MNEG(v)
   205  	case OpARM64MNEGW:
   206  		return rewriteValueARM64_OpARM64MNEGW(v)
   207  	case OpARM64MOD:
   208  		return rewriteValueARM64_OpARM64MOD(v)
   209  	case OpARM64MODW:
   210  		return rewriteValueARM64_OpARM64MODW(v)
   211  	case OpARM64MOVBUload:
   212  		return rewriteValueARM64_OpARM64MOVBUload(v)
   213  	case OpARM64MOVBUloadidx:
   214  		return rewriteValueARM64_OpARM64MOVBUloadidx(v)
   215  	case OpARM64MOVBUreg:
   216  		return rewriteValueARM64_OpARM64MOVBUreg(v)
   217  	case OpARM64MOVBload:
   218  		return rewriteValueARM64_OpARM64MOVBload(v)
   219  	case OpARM64MOVBloadidx:
   220  		return rewriteValueARM64_OpARM64MOVBloadidx(v)
   221  	case OpARM64MOVBreg:
   222  		return rewriteValueARM64_OpARM64MOVBreg(v)
   223  	case OpARM64MOVBstore:
   224  		return rewriteValueARM64_OpARM64MOVBstore(v)
   225  	case OpARM64MOVBstoreidx:
   226  		return rewriteValueARM64_OpARM64MOVBstoreidx(v)
   227  	case OpARM64MOVDload:
   228  		return rewriteValueARM64_OpARM64MOVDload(v)
   229  	case OpARM64MOVDloadidx:
   230  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   231  	case OpARM64MOVDloadidx8:
   232  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   233  	case OpARM64MOVDnop:
   234  		return rewriteValueARM64_OpARM64MOVDnop(v)
   235  	case OpARM64MOVDreg:
   236  		return rewriteValueARM64_OpARM64MOVDreg(v)
   237  	case OpARM64MOVDstore:
   238  		return rewriteValueARM64_OpARM64MOVDstore(v)
   239  	case OpARM64MOVDstoreidx:
   240  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   241  	case OpARM64MOVDstoreidx8:
   242  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   243  	case OpARM64MOVHUload:
   244  		return rewriteValueARM64_OpARM64MOVHUload(v)
   245  	case OpARM64MOVHUloadidx:
   246  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   247  	case OpARM64MOVHUloadidx2:
   248  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   249  	case OpARM64MOVHUreg:
   250  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   251  	case OpARM64MOVHload:
   252  		return rewriteValueARM64_OpARM64MOVHload(v)
   253  	case OpARM64MOVHloadidx:
   254  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   255  	case OpARM64MOVHloadidx2:
   256  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   257  	case OpARM64MOVHreg:
   258  		return rewriteValueARM64_OpARM64MOVHreg(v)
   259  	case OpARM64MOVHstore:
   260  		return rewriteValueARM64_OpARM64MOVHstore(v)
   261  	case OpARM64MOVHstoreidx:
   262  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   263  	case OpARM64MOVHstoreidx2:
   264  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   265  	case OpARM64MOVWUload:
   266  		return rewriteValueARM64_OpARM64MOVWUload(v)
   267  	case OpARM64MOVWUloadidx:
   268  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   269  	case OpARM64MOVWUloadidx4:
   270  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   271  	case OpARM64MOVWUreg:
   272  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   273  	case OpARM64MOVWload:
   274  		return rewriteValueARM64_OpARM64MOVWload(v)
   275  	case OpARM64MOVWloadidx:
   276  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   277  	case OpARM64MOVWloadidx4:
   278  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   279  	case OpARM64MOVWreg:
   280  		return rewriteValueARM64_OpARM64MOVWreg(v)
   281  	case OpARM64MOVWstore:
   282  		return rewriteValueARM64_OpARM64MOVWstore(v)
   283  	case OpARM64MOVWstoreidx:
   284  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   285  	case OpARM64MOVWstoreidx4:
   286  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   287  	case OpARM64MSUB:
   288  		return rewriteValueARM64_OpARM64MSUB(v)
   289  	case OpARM64MSUBW:
   290  		return rewriteValueARM64_OpARM64MSUBW(v)
   291  	case OpARM64MUL:
   292  		return rewriteValueARM64_OpARM64MUL(v)
   293  	case OpARM64MULW:
   294  		return rewriteValueARM64_OpARM64MULW(v)
   295  	case OpARM64MVN:
   296  		return rewriteValueARM64_OpARM64MVN(v)
   297  	case OpARM64MVNshiftLL:
   298  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   299  	case OpARM64MVNshiftRA:
   300  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   301  	case OpARM64MVNshiftRL:
   302  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   303  	case OpARM64MVNshiftRO:
   304  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   305  	case OpARM64NEG:
   306  		return rewriteValueARM64_OpARM64NEG(v)
   307  	case OpARM64NEGshiftLL:
   308  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   309  	case OpARM64NEGshiftRA:
   310  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   311  	case OpARM64NEGshiftRL:
   312  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   313  	case OpARM64NotEqual:
   314  		return rewriteValueARM64_OpARM64NotEqual(v)
   315  	case OpARM64OR:
   316  		return rewriteValueARM64_OpARM64OR(v)
   317  	case OpARM64ORN:
   318  		return rewriteValueARM64_OpARM64ORN(v)
   319  	case OpARM64ORNshiftLL:
   320  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   321  	case OpARM64ORNshiftRA:
   322  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   323  	case OpARM64ORNshiftRL:
   324  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   325  	case OpARM64ORNshiftRO:
   326  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   327  	case OpARM64ORconst:
   328  		return rewriteValueARM64_OpARM64ORconst(v)
   329  	case OpARM64ORshiftLL:
   330  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   331  	case OpARM64ORshiftRA:
   332  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   333  	case OpARM64ORshiftRL:
   334  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   335  	case OpARM64ORshiftRO:
   336  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   337  	case OpARM64REV:
   338  		return rewriteValueARM64_OpARM64REV(v)
   339  	case OpARM64REV16:
   340  		return rewriteValueARM64_OpARM64REV16(v)
   341  	case OpARM64REVW:
   342  		return rewriteValueARM64_OpARM64REVW(v)
   343  	case OpARM64ROR:
   344  		return rewriteValueARM64_OpARM64ROR(v)
   345  	case OpARM64RORW:
   346  		return rewriteValueARM64_OpARM64RORW(v)
   347  	case OpARM64SBCSflags:
   348  		return rewriteValueARM64_OpARM64SBCSflags(v)
   349  	case OpARM64SBFX:
   350  		return rewriteValueARM64_OpARM64SBFX(v)
   351  	case OpARM64SLL:
   352  		return rewriteValueARM64_OpARM64SLL(v)
   353  	case OpARM64SLLconst:
   354  		return rewriteValueARM64_OpARM64SLLconst(v)
   355  	case OpARM64SRA:
   356  		return rewriteValueARM64_OpARM64SRA(v)
   357  	case OpARM64SRAconst:
   358  		return rewriteValueARM64_OpARM64SRAconst(v)
   359  	case OpARM64SRL:
   360  		return rewriteValueARM64_OpARM64SRL(v)
   361  	case OpARM64SRLconst:
   362  		return rewriteValueARM64_OpARM64SRLconst(v)
   363  	case OpARM64STP:
   364  		return rewriteValueARM64_OpARM64STP(v)
   365  	case OpARM64SUB:
   366  		return rewriteValueARM64_OpARM64SUB(v)
   367  	case OpARM64SUBconst:
   368  		return rewriteValueARM64_OpARM64SUBconst(v)
   369  	case OpARM64SUBshiftLL:
   370  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   371  	case OpARM64SUBshiftRA:
   372  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   373  	case OpARM64SUBshiftRL:
   374  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   375  	case OpARM64TST:
   376  		return rewriteValueARM64_OpARM64TST(v)
   377  	case OpARM64TSTW:
   378  		return rewriteValueARM64_OpARM64TSTW(v)
   379  	case OpARM64TSTWconst:
   380  		return rewriteValueARM64_OpARM64TSTWconst(v)
   381  	case OpARM64TSTconst:
   382  		return rewriteValueARM64_OpARM64TSTconst(v)
   383  	case OpARM64TSTshiftLL:
   384  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   385  	case OpARM64TSTshiftRA:
   386  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   387  	case OpARM64TSTshiftRL:
   388  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   389  	case OpARM64TSTshiftRO:
   390  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   391  	case OpARM64UBFIZ:
   392  		return rewriteValueARM64_OpARM64UBFIZ(v)
   393  	case OpARM64UBFX:
   394  		return rewriteValueARM64_OpARM64UBFX(v)
   395  	case OpARM64UDIV:
   396  		return rewriteValueARM64_OpARM64UDIV(v)
   397  	case OpARM64UDIVW:
   398  		return rewriteValueARM64_OpARM64UDIVW(v)
   399  	case OpARM64UMOD:
   400  		return rewriteValueARM64_OpARM64UMOD(v)
   401  	case OpARM64UMODW:
   402  		return rewriteValueARM64_OpARM64UMODW(v)
   403  	case OpARM64VBIF16B:
   404  		return rewriteValueARM64_OpARM64VBIF16B(v)
   405  	case OpARM64VBIT16B:
   406  		return rewriteValueARM64_OpARM64VBIT16B(v)
   407  	case OpARM64VDUPBbcast:
   408  		return rewriteValueARM64_OpARM64VDUPBbcast(v)
   409  	case OpARM64VFCVTL4S:
   410  		return rewriteValueARM64_OpARM64VFCVTL4S(v)
   411  	case OpARM64VMOVDins0:
   412  		return rewriteValueARM64_OpARM64VMOVDins0(v)
   413  	case OpARM64VMOVSins0:
   414  		return rewriteValueARM64_OpARM64VMOVSins0(v)
   415  	case OpARM64VPMULL2D:
   416  		return rewriteValueARM64_OpARM64VPMULL2D(v)
   417  	case OpARM64VSHL16B:
   418  		return rewriteValueARM64_OpARM64VSHL16B(v)
   419  	case OpARM64VSHL2D:
   420  		return rewriteValueARM64_OpARM64VSHL2D(v)
   421  	case OpARM64VSHL4S:
   422  		return rewriteValueARM64_OpARM64VSHL4S(v)
   423  	case OpARM64VSHL8H:
   424  		return rewriteValueARM64_OpARM64VSHL8H(v)
   425  	case OpARM64VSHRN2D:
   426  		return rewriteValueARM64_OpARM64VSHRN2D(v)
   427  	case OpARM64VSHRN4S:
   428  		return rewriteValueARM64_OpARM64VSHRN4S(v)
   429  	case OpARM64VSHRN8H:
   430  		return rewriteValueARM64_OpARM64VSHRN8H(v)
   431  	case OpARM64VSMULL16B:
   432  		return rewriteValueARM64_OpARM64VSMULL16B(v)
   433  	case OpARM64VSMULL4S:
   434  		return rewriteValueARM64_OpARM64VSMULL4S(v)
   435  	case OpARM64VSMULL8H:
   436  		return rewriteValueARM64_OpARM64VSMULL8H(v)
   437  	case OpARM64VSQSHL16Bconst:
   438  		return rewriteValueARM64_OpARM64VSQSHL16Bconst(v)
   439  	case OpARM64VSQSHL2Dconst:
   440  		return rewriteValueARM64_OpARM64VSQSHL2Dconst(v)
   441  	case OpARM64VSQSHL4Sconst:
   442  		return rewriteValueARM64_OpARM64VSQSHL4Sconst(v)
   443  	case OpARM64VSQSHL8Hconst:
   444  		return rewriteValueARM64_OpARM64VSQSHL8Hconst(v)
   445  	case OpARM64VSSHLL16B:
   446  		return rewriteValueARM64_OpARM64VSSHLL16B(v)
   447  	case OpARM64VSSHLL4S:
   448  		return rewriteValueARM64_OpARM64VSSHLL4S(v)
   449  	case OpARM64VSSHLL8H:
   450  		return rewriteValueARM64_OpARM64VSSHLL8H(v)
   451  	case OpARM64VSSHR16B:
   452  		return rewriteValueARM64_OpARM64VSSHR16B(v)
   453  	case OpARM64VSSHR2D:
   454  		return rewriteValueARM64_OpARM64VSSHR2D(v)
   455  	case OpARM64VSSHR4S:
   456  		return rewriteValueARM64_OpARM64VSSHR4S(v)
   457  	case OpARM64VSSHR8H:
   458  		return rewriteValueARM64_OpARM64VSSHR8H(v)
   459  	case OpARM64VSXTL16B:
   460  		return rewriteValueARM64_OpARM64VSXTL16B(v)
   461  	case OpARM64VSXTL4S:
   462  		return rewriteValueARM64_OpARM64VSXTL4S(v)
   463  	case OpARM64VSXTL8H:
   464  		return rewriteValueARM64_OpARM64VSXTL8H(v)
   465  	case OpARM64VUMULL16B:
   466  		return rewriteValueARM64_OpARM64VUMULL16B(v)
   467  	case OpARM64VUMULL4S:
   468  		return rewriteValueARM64_OpARM64VUMULL4S(v)
   469  	case OpARM64VUMULL8H:
   470  		return rewriteValueARM64_OpARM64VUMULL8H(v)
   471  	case OpARM64VUQSHL16Bconst:
   472  		return rewriteValueARM64_OpARM64VUQSHL16Bconst(v)
   473  	case OpARM64VUQSHL2Dconst:
   474  		return rewriteValueARM64_OpARM64VUQSHL2Dconst(v)
   475  	case OpARM64VUQSHL4Sconst:
   476  		return rewriteValueARM64_OpARM64VUQSHL4Sconst(v)
   477  	case OpARM64VUQSHL8Hconst:
   478  		return rewriteValueARM64_OpARM64VUQSHL8Hconst(v)
   479  	case OpARM64VUSHLL16B:
   480  		return rewriteValueARM64_OpARM64VUSHLL16B(v)
   481  	case OpARM64VUSHLL4S:
   482  		return rewriteValueARM64_OpARM64VUSHLL4S(v)
   483  	case OpARM64VUSHLL8H:
   484  		return rewriteValueARM64_OpARM64VUSHLL8H(v)
   485  	case OpARM64VUSHR16B:
   486  		return rewriteValueARM64_OpARM64VUSHR16B(v)
   487  	case OpARM64VUSHR2D:
   488  		return rewriteValueARM64_OpARM64VUSHR2D(v)
   489  	case OpARM64VUSHR4S:
   490  		return rewriteValueARM64_OpARM64VUSHR4S(v)
   491  	case OpARM64VUSHR8H:
   492  		return rewriteValueARM64_OpARM64VUSHR8H(v)
   493  	case OpARM64VUXTL16B:
   494  		return rewriteValueARM64_OpARM64VUXTL16B(v)
   495  	case OpARM64VUXTL4S:
   496  		return rewriteValueARM64_OpARM64VUXTL4S(v)
   497  	case OpARM64VUXTL8H:
   498  		return rewriteValueARM64_OpARM64VUXTL8H(v)
   499  	case OpARM64XOR:
   500  		return rewriteValueARM64_OpARM64XOR(v)
   501  	case OpARM64XORconst:
   502  		return rewriteValueARM64_OpARM64XORconst(v)
   503  	case OpARM64XORshiftLL:
   504  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   505  	case OpARM64XORshiftRA:
   506  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   507  	case OpARM64XORshiftRL:
   508  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   509  	case OpARM64XORshiftRO:
   510  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   511  	case OpAbs:
   512  		v.Op = OpARM64FABSD
   513  		return true
   514  	case OpAbsFloat32x4:
   515  		v.Op = OpARM64VFABS4S
   516  		return true
   517  	case OpAbsFloat64x2:
   518  		v.Op = OpARM64VFABS2D
   519  		return true
   520  	case OpAbsInt16x8:
   521  		v.Op = OpARM64VABS8H
   522  		return true
   523  	case OpAbsInt32x4:
   524  		v.Op = OpARM64VABS4S
   525  		return true
   526  	case OpAbsInt64x2:
   527  		v.Op = OpARM64VABS2D
   528  		return true
   529  	case OpAbsInt8x16:
   530  		v.Op = OpARM64VABS16B
   531  		return true
   532  	case OpAdd16:
   533  		v.Op = OpARM64ADD
   534  		return true
   535  	case OpAdd32:
   536  		v.Op = OpARM64ADD
   537  		return true
   538  	case OpAdd32F:
   539  		v.Op = OpARM64FADDS
   540  		return true
   541  	case OpAdd64:
   542  		v.Op = OpARM64ADD
   543  		return true
   544  	case OpAdd64F:
   545  		v.Op = OpARM64FADDD
   546  		return true
   547  	case OpAdd8:
   548  		v.Op = OpARM64ADD
   549  		return true
   550  	case OpAddFloat32x4:
   551  		v.Op = OpARM64VFADD4S
   552  		return true
   553  	case OpAddFloat64x2:
   554  		v.Op = OpARM64VFADD2D
   555  		return true
   556  	case OpAddInt16x8:
   557  		v.Op = OpARM64VADD8H
   558  		return true
   559  	case OpAddInt32x4:
   560  		v.Op = OpARM64VADD4S
   561  		return true
   562  	case OpAddInt64x2:
   563  		v.Op = OpARM64VADD2D
   564  		return true
   565  	case OpAddInt8x16:
   566  		v.Op = OpARM64VADD16B
   567  		return true
   568  	case OpAddPtr:
   569  		v.Op = OpARM64ADD
   570  		return true
   571  	case OpAddSaturatedInt16x8:
   572  		v.Op = OpARM64VSQADD8H
   573  		return true
   574  	case OpAddSaturatedInt32x4:
   575  		v.Op = OpARM64VSQADD4S
   576  		return true
   577  	case OpAddSaturatedInt64x2:
   578  		v.Op = OpARM64VSQADD2D
   579  		return true
   580  	case OpAddSaturatedInt8x16:
   581  		v.Op = OpARM64VSQADD16B
   582  		return true
   583  	case OpAddSaturatedUint16x8:
   584  		v.Op = OpARM64VUQADD8H
   585  		return true
   586  	case OpAddSaturatedUint32x4:
   587  		v.Op = OpARM64VUQADD4S
   588  		return true
   589  	case OpAddSaturatedUint64x2:
   590  		v.Op = OpARM64VUQADD2D
   591  		return true
   592  	case OpAddSaturatedUint8x16:
   593  		v.Op = OpARM64VUQADD16B
   594  		return true
   595  	case OpAddUint16x8:
   596  		v.Op = OpARM64VADD8H
   597  		return true
   598  	case OpAddUint32x4:
   599  		v.Op = OpARM64VADD4S
   600  		return true
   601  	case OpAddUint64x2:
   602  		v.Op = OpARM64VADD2D
   603  		return true
   604  	case OpAddUint8x16:
   605  		v.Op = OpARM64VADD16B
   606  		return true
   607  	case OpAddr:
   608  		return rewriteValueARM64_OpAddr(v)
   609  	case OpAnd16:
   610  		v.Op = OpARM64AND
   611  		return true
   612  	case OpAnd32:
   613  		v.Op = OpARM64AND
   614  		return true
   615  	case OpAnd64:
   616  		v.Op = OpARM64AND
   617  		return true
   618  	case OpAnd8:
   619  		v.Op = OpARM64AND
   620  		return true
   621  	case OpAndB:
   622  		v.Op = OpARM64AND
   623  		return true
   624  	case OpAndInt16x8:
   625  		v.Op = OpARM64VAND16B
   626  		return true
   627  	case OpAndInt32x4:
   628  		v.Op = OpARM64VAND16B
   629  		return true
   630  	case OpAndInt64x2:
   631  		v.Op = OpARM64VAND16B
   632  		return true
   633  	case OpAndInt8x16:
   634  		v.Op = OpARM64VAND16B
   635  		return true
   636  	case OpAndNotInt16x8:
   637  		v.Op = OpARM64VBIC16B
   638  		return true
   639  	case OpAndNotInt32x4:
   640  		v.Op = OpARM64VBIC16B
   641  		return true
   642  	case OpAndNotInt64x2:
   643  		v.Op = OpARM64VBIC16B
   644  		return true
   645  	case OpAndNotInt8x16:
   646  		v.Op = OpARM64VBIC16B
   647  		return true
   648  	case OpAndNotUint16x8:
   649  		v.Op = OpARM64VBIC16B
   650  		return true
   651  	case OpAndNotUint32x4:
   652  		v.Op = OpARM64VBIC16B
   653  		return true
   654  	case OpAndNotUint64x2:
   655  		v.Op = OpARM64VBIC16B
   656  		return true
   657  	case OpAndNotUint8x16:
   658  		v.Op = OpARM64VBIC16B
   659  		return true
   660  	case OpAndUint16x8:
   661  		v.Op = OpARM64VAND16B
   662  		return true
   663  	case OpAndUint32x4:
   664  		v.Op = OpARM64VAND16B
   665  		return true
   666  	case OpAndUint64x2:
   667  		v.Op = OpARM64VAND16B
   668  		return true
   669  	case OpAndUint8x16:
   670  		v.Op = OpARM64VAND16B
   671  		return true
   672  	case OpAtomicAdd32:
   673  		v.Op = OpARM64LoweredAtomicAdd32
   674  		return true
   675  	case OpAtomicAdd32Variant:
   676  		v.Op = OpARM64LoweredAtomicAdd32Variant
   677  		return true
   678  	case OpAtomicAdd64:
   679  		v.Op = OpARM64LoweredAtomicAdd64
   680  		return true
   681  	case OpAtomicAdd64Variant:
   682  		v.Op = OpARM64LoweredAtomicAdd64Variant
   683  		return true
   684  	case OpAtomicAnd32value:
   685  		v.Op = OpARM64LoweredAtomicAnd32
   686  		return true
   687  	case OpAtomicAnd32valueVariant:
   688  		v.Op = OpARM64LoweredAtomicAnd32Variant
   689  		return true
   690  	case OpAtomicAnd64value:
   691  		v.Op = OpARM64LoweredAtomicAnd64
   692  		return true
   693  	case OpAtomicAnd64valueVariant:
   694  		v.Op = OpARM64LoweredAtomicAnd64Variant
   695  		return true
   696  	case OpAtomicAnd8value:
   697  		v.Op = OpARM64LoweredAtomicAnd8
   698  		return true
   699  	case OpAtomicAnd8valueVariant:
   700  		v.Op = OpARM64LoweredAtomicAnd8Variant
   701  		return true
   702  	case OpAtomicCompareAndSwap32:
   703  		v.Op = OpARM64LoweredAtomicCas32
   704  		return true
   705  	case OpAtomicCompareAndSwap32Variant:
   706  		v.Op = OpARM64LoweredAtomicCas32Variant
   707  		return true
   708  	case OpAtomicCompareAndSwap64:
   709  		v.Op = OpARM64LoweredAtomicCas64
   710  		return true
   711  	case OpAtomicCompareAndSwap64Variant:
   712  		v.Op = OpARM64LoweredAtomicCas64Variant
   713  		return true
   714  	case OpAtomicExchange32:
   715  		v.Op = OpARM64LoweredAtomicExchange32
   716  		return true
   717  	case OpAtomicExchange32Variant:
   718  		v.Op = OpARM64LoweredAtomicExchange32Variant
   719  		return true
   720  	case OpAtomicExchange64:
   721  		v.Op = OpARM64LoweredAtomicExchange64
   722  		return true
   723  	case OpAtomicExchange64Variant:
   724  		v.Op = OpARM64LoweredAtomicExchange64Variant
   725  		return true
   726  	case OpAtomicExchange8:
   727  		v.Op = OpARM64LoweredAtomicExchange8
   728  		return true
   729  	case OpAtomicExchange8Variant:
   730  		v.Op = OpARM64LoweredAtomicExchange8Variant
   731  		return true
   732  	case OpAtomicLoad32:
   733  		v.Op = OpARM64LDARW
   734  		return true
   735  	case OpAtomicLoad64:
   736  		v.Op = OpARM64LDAR
   737  		return true
   738  	case OpAtomicLoad8:
   739  		v.Op = OpARM64LDARB
   740  		return true
   741  	case OpAtomicLoadPtr:
   742  		v.Op = OpARM64LDAR
   743  		return true
   744  	case OpAtomicOr32value:
   745  		v.Op = OpARM64LoweredAtomicOr32
   746  		return true
   747  	case OpAtomicOr32valueVariant:
   748  		v.Op = OpARM64LoweredAtomicOr32Variant
   749  		return true
   750  	case OpAtomicOr64value:
   751  		v.Op = OpARM64LoweredAtomicOr64
   752  		return true
   753  	case OpAtomicOr64valueVariant:
   754  		v.Op = OpARM64LoweredAtomicOr64Variant
   755  		return true
   756  	case OpAtomicOr8value:
   757  		v.Op = OpARM64LoweredAtomicOr8
   758  		return true
   759  	case OpAtomicOr8valueVariant:
   760  		v.Op = OpARM64LoweredAtomicOr8Variant
   761  		return true
   762  	case OpAtomicStore32:
   763  		v.Op = OpARM64STLRW
   764  		return true
   765  	case OpAtomicStore64:
   766  		v.Op = OpARM64STLR
   767  		return true
   768  	case OpAtomicStore8:
   769  		v.Op = OpARM64STLRB
   770  		return true
   771  	case OpAtomicStorePtrNoWB:
   772  		v.Op = OpARM64STLR
   773  		return true
   774  	case OpAverageInt16x8:
   775  		v.Op = OpARM64VSRHADD8H
   776  		return true
   777  	case OpAverageInt32x4:
   778  		v.Op = OpARM64VSRHADD4S
   779  		return true
   780  	case OpAverageInt8x16:
   781  		v.Op = OpARM64VSRHADD16B
   782  		return true
   783  	case OpAverageUint16x8:
   784  		v.Op = OpARM64VURHADD8H
   785  		return true
   786  	case OpAverageUint32x4:
   787  		v.Op = OpARM64VURHADD4S
   788  		return true
   789  	case OpAverageUint8x16:
   790  		v.Op = OpARM64VURHADD16B
   791  		return true
   792  	case OpAvg64u:
   793  		return rewriteValueARM64_OpAvg64u(v)
   794  	case OpBitLen16:
   795  		return rewriteValueARM64_OpBitLen16(v)
   796  	case OpBitLen32:
   797  		return rewriteValueARM64_OpBitLen32(v)
   798  	case OpBitLen64:
   799  		return rewriteValueARM64_OpBitLen64(v)
   800  	case OpBitLen8:
   801  		return rewriteValueARM64_OpBitLen8(v)
   802  	case OpBitRev16:
   803  		return rewriteValueARM64_OpBitRev16(v)
   804  	case OpBitRev32:
   805  		v.Op = OpARM64RBITW
   806  		return true
   807  	case OpBitRev64:
   808  		v.Op = OpARM64RBIT
   809  		return true
   810  	case OpBitRev8:
   811  		return rewriteValueARM64_OpBitRev8(v)
   812  	case OpBswap16:
   813  		v.Op = OpARM64REV16W
   814  		return true
   815  	case OpBswap32:
   816  		v.Op = OpARM64REVW
   817  		return true
   818  	case OpBswap64:
   819  		v.Op = OpARM64REV
   820  		return true
   821  	case OpCeil:
   822  		v.Op = OpARM64FRINTPD
   823  		return true
   824  	case OpCeilFloat32x4:
   825  		v.Op = OpARM64VFRINTP4S
   826  		return true
   827  	case OpCeilFloat64x2:
   828  		v.Op = OpARM64VFRINTP2D
   829  		return true
   830  	case OpClosureCall:
   831  		v.Op = OpARM64CALLclosure
   832  		return true
   833  	case OpCom16:
   834  		v.Op = OpARM64MVN
   835  		return true
   836  	case OpCom32:
   837  		v.Op = OpARM64MVN
   838  		return true
   839  	case OpCom64:
   840  		v.Op = OpARM64MVN
   841  		return true
   842  	case OpCom8:
   843  		v.Op = OpARM64MVN
   844  		return true
   845  	case OpConcatAddPairsFloat32x4:
   846  		v.Op = OpARM64VFADDP4S
   847  		return true
   848  	case OpConcatAddPairsFloat64x2:
   849  		v.Op = OpARM64VFADDP2D
   850  		return true
   851  	case OpConcatAddPairsInt16x8:
   852  		v.Op = OpARM64VADDP8H
   853  		return true
   854  	case OpConcatAddPairsInt32x4:
   855  		v.Op = OpARM64VADDP4S
   856  		return true
   857  	case OpConcatAddPairsInt64x2:
   858  		v.Op = OpARM64VADDP2D
   859  		return true
   860  	case OpConcatAddPairsUint16x8:
   861  		v.Op = OpARM64VADDP8H
   862  		return true
   863  	case OpConcatAddPairsUint32x4:
   864  		v.Op = OpARM64VADDP4S
   865  		return true
   866  	case OpConcatAddPairsUint64x2:
   867  		v.Op = OpARM64VADDP2D
   868  		return true
   869  	case OpConcatEvenInt16x8:
   870  		v.Op = OpARM64VUZP18H
   871  		return true
   872  	case OpConcatEvenInt32x4:
   873  		v.Op = OpARM64VUZP14S
   874  		return true
   875  	case OpConcatEvenInt64x2:
   876  		v.Op = OpARM64VUZP12D
   877  		return true
   878  	case OpConcatEvenInt8x16:
   879  		v.Op = OpARM64VUZP116B
   880  		return true
   881  	case OpConcatEvenUint16x8:
   882  		v.Op = OpARM64VUZP18H
   883  		return true
   884  	case OpConcatEvenUint32x4:
   885  		v.Op = OpARM64VUZP14S
   886  		return true
   887  	case OpConcatEvenUint64x2:
   888  		v.Op = OpARM64VUZP12D
   889  		return true
   890  	case OpConcatEvenUint8x16:
   891  		v.Op = OpARM64VUZP116B
   892  		return true
   893  	case OpConcatOddInt16x8:
   894  		v.Op = OpARM64VUZP28H
   895  		return true
   896  	case OpConcatOddInt32x4:
   897  		v.Op = OpARM64VUZP24S
   898  		return true
   899  	case OpConcatOddInt64x2:
   900  		v.Op = OpARM64VUZP22D
   901  		return true
   902  	case OpConcatOddInt8x16:
   903  		v.Op = OpARM64VUZP216B
   904  		return true
   905  	case OpConcatOddUint16x8:
   906  		v.Op = OpARM64VUZP28H
   907  		return true
   908  	case OpConcatOddUint32x4:
   909  		v.Op = OpARM64VUZP24S
   910  		return true
   911  	case OpConcatOddUint64x2:
   912  		v.Op = OpARM64VUZP22D
   913  		return true
   914  	case OpConcatOddUint8x16:
   915  		v.Op = OpARM64VUZP216B
   916  		return true
   917  	case OpConcatShiftBytesRightUint8x16:
   918  		v.Op = OpARM64VEXT16B
   919  		return true
   920  	case OpCondSelect:
   921  		return rewriteValueARM64_OpCondSelect(v)
   922  	case OpConst16:
   923  		return rewriteValueARM64_OpConst16(v)
   924  	case OpConst32:
   925  		return rewriteValueARM64_OpConst32(v)
   926  	case OpConst32F:
   927  		return rewriteValueARM64_OpConst32F(v)
   928  	case OpConst64:
   929  		return rewriteValueARM64_OpConst64(v)
   930  	case OpConst64F:
   931  		return rewriteValueARM64_OpConst64F(v)
   932  	case OpConst8:
   933  		return rewriteValueARM64_OpConst8(v)
   934  	case OpConstBool:
   935  		return rewriteValueARM64_OpConstBool(v)
   936  	case OpConstNil:
   937  		return rewriteValueARM64_OpConstNil(v)
   938  	case OpConvertLo2ToFloat64Float32x4:
   939  		v.Op = OpARM64VFCVTL4S
   940  		return true
   941  	case OpConvertToFloat32Float64x2:
   942  		v.Op = OpARM64VFCVTN2D
   943  		return true
   944  	case OpConvertToFloat32Int32x4:
   945  		v.Op = OpARM64VSCVTF4S
   946  		return true
   947  	case OpConvertToFloat32Uint32x4:
   948  		v.Op = OpARM64VUCVTF4S
   949  		return true
   950  	case OpConvertToFloat64Int64x2:
   951  		v.Op = OpARM64VSCVTF2D
   952  		return true
   953  	case OpConvertToFloat64Uint64x2:
   954  		v.Op = OpARM64VUCVTF2D
   955  		return true
   956  	case OpConvertToInt32Float32x4:
   957  		v.Op = OpARM64VFCVTZS4S
   958  		return true
   959  	case OpConvertToInt64Float64x2:
   960  		v.Op = OpARM64VFCVTZS2D
   961  		return true
   962  	case OpConvertToUint32Float32x4:
   963  		v.Op = OpARM64VFCVTZU4S
   964  		return true
   965  	case OpConvertToUint64Float64x2:
   966  		v.Op = OpARM64VFCVTZU2D
   967  		return true
   968  	case OpCtz16:
   969  		return rewriteValueARM64_OpCtz16(v)
   970  	case OpCtz16NonZero:
   971  		v.Op = OpCtz32
   972  		return true
   973  	case OpCtz32:
   974  		return rewriteValueARM64_OpCtz32(v)
   975  	case OpCtz32NonZero:
   976  		v.Op = OpCtz32
   977  		return true
   978  	case OpCtz64:
   979  		return rewriteValueARM64_OpCtz64(v)
   980  	case OpCtz64NonZero:
   981  		v.Op = OpCtz64
   982  		return true
   983  	case OpCtz8:
   984  		return rewriteValueARM64_OpCtz8(v)
   985  	case OpCtz8NonZero:
   986  		v.Op = OpCtz32
   987  		return true
   988  	case OpCvt32Fto32:
   989  		v.Op = OpARM64FCVTZSSW
   990  		return true
   991  	case OpCvt32Fto32U:
   992  		v.Op = OpARM64FCVTZUSW
   993  		return true
   994  	case OpCvt32Fto64:
   995  		v.Op = OpARM64FCVTZSS
   996  		return true
   997  	case OpCvt32Fto64F:
   998  		v.Op = OpARM64FCVTSD
   999  		return true
  1000  	case OpCvt32Fto64U:
  1001  		v.Op = OpARM64FCVTZUS
  1002  		return true
  1003  	case OpCvt32Uto32F:
  1004  		v.Op = OpARM64UCVTFWS
  1005  		return true
  1006  	case OpCvt32Uto64F:
  1007  		v.Op = OpARM64UCVTFWD
  1008  		return true
  1009  	case OpCvt32to32F:
  1010  		v.Op = OpARM64SCVTFWS
  1011  		return true
  1012  	case OpCvt32to64F:
  1013  		v.Op = OpARM64SCVTFWD
  1014  		return true
  1015  	case OpCvt64Fto32:
  1016  		v.Op = OpARM64FCVTZSDW
  1017  		return true
  1018  	case OpCvt64Fto32F:
  1019  		v.Op = OpARM64FCVTDS
  1020  		return true
  1021  	case OpCvt64Fto32U:
  1022  		v.Op = OpARM64FCVTZUDW
  1023  		return true
  1024  	case OpCvt64Fto64:
  1025  		v.Op = OpARM64FCVTZSD
  1026  		return true
  1027  	case OpCvt64Fto64U:
  1028  		v.Op = OpARM64FCVTZUD
  1029  		return true
  1030  	case OpCvt64Uto32F:
  1031  		v.Op = OpARM64UCVTFS
  1032  		return true
  1033  	case OpCvt64Uto64F:
  1034  		v.Op = OpARM64UCVTFD
  1035  		return true
  1036  	case OpCvt64to32F:
  1037  		v.Op = OpARM64SCVTFS
  1038  		return true
  1039  	case OpCvt64to64F:
  1040  		v.Op = OpARM64SCVTFD
  1041  		return true
  1042  	case OpCvtBoolToUint8:
  1043  		v.Op = OpCopy
  1044  		return true
  1045  	case OpDiv16:
  1046  		return rewriteValueARM64_OpDiv16(v)
  1047  	case OpDiv16u:
  1048  		return rewriteValueARM64_OpDiv16u(v)
  1049  	case OpDiv32:
  1050  		return rewriteValueARM64_OpDiv32(v)
  1051  	case OpDiv32F:
  1052  		v.Op = OpARM64FDIVS
  1053  		return true
  1054  	case OpDiv32u:
  1055  		v.Op = OpARM64UDIVW
  1056  		return true
  1057  	case OpDiv64:
  1058  		return rewriteValueARM64_OpDiv64(v)
  1059  	case OpDiv64F:
  1060  		v.Op = OpARM64FDIVD
  1061  		return true
  1062  	case OpDiv64u:
  1063  		v.Op = OpARM64UDIV
  1064  		return true
  1065  	case OpDiv8:
  1066  		return rewriteValueARM64_OpDiv8(v)
  1067  	case OpDiv8u:
  1068  		return rewriteValueARM64_OpDiv8u(v)
  1069  	case OpDivFloat32x4:
  1070  		v.Op = OpARM64VFDIV4S
  1071  		return true
  1072  	case OpDivFloat64x2:
  1073  		v.Op = OpARM64VFDIV2D
  1074  		return true
  1075  	case OpEq16:
  1076  		return rewriteValueARM64_OpEq16(v)
  1077  	case OpEq32:
  1078  		return rewriteValueARM64_OpEq32(v)
  1079  	case OpEq32F:
  1080  		return rewriteValueARM64_OpEq32F(v)
  1081  	case OpEq64:
  1082  		return rewriteValueARM64_OpEq64(v)
  1083  	case OpEq64F:
  1084  		return rewriteValueARM64_OpEq64F(v)
  1085  	case OpEq8:
  1086  		return rewriteValueARM64_OpEq8(v)
  1087  	case OpEqB:
  1088  		return rewriteValueARM64_OpEqB(v)
  1089  	case OpEqPtr:
  1090  		return rewriteValueARM64_OpEqPtr(v)
  1091  	case OpEqualFloat32x4:
  1092  		v.Op = OpARM64VFCMEQ4S
  1093  		return true
  1094  	case OpEqualFloat64x2:
  1095  		v.Op = OpARM64VFCMEQ2D
  1096  		return true
  1097  	case OpEqualInt16x8:
  1098  		v.Op = OpARM64VCMEQ8H
  1099  		return true
  1100  	case OpEqualInt32x4:
  1101  		v.Op = OpARM64VCMEQ4S
  1102  		return true
  1103  	case OpEqualInt64x2:
  1104  		v.Op = OpARM64VCMEQ2D
  1105  		return true
  1106  	case OpEqualInt8x16:
  1107  		v.Op = OpARM64VCMEQ16B
  1108  		return true
  1109  	case OpEqualUint16x8:
  1110  		v.Op = OpARM64VCMEQ8H
  1111  		return true
  1112  	case OpEqualUint32x4:
  1113  		v.Op = OpARM64VCMEQ4S
  1114  		return true
  1115  	case OpEqualUint64x2:
  1116  		v.Op = OpARM64VCMEQ2D
  1117  		return true
  1118  	case OpEqualUint8x16:
  1119  		v.Op = OpARM64VCMEQ16B
  1120  		return true
  1121  	case OpExtendLo2ToInt64Int32x4:
  1122  		v.Op = OpARM64VSXTL4S
  1123  		return true
  1124  	case OpExtendLo2ToUint64Uint32x4:
  1125  		v.Op = OpARM64VUXTL4S
  1126  		return true
  1127  	case OpExtendLo4ToInt32Int16x8:
  1128  		v.Op = OpARM64VSXTL8H
  1129  		return true
  1130  	case OpExtendLo4ToUint32Uint16x8:
  1131  		v.Op = OpARM64VUXTL8H
  1132  		return true
  1133  	case OpExtendLo8ToInt16Int8x16:
  1134  		v.Op = OpARM64VSXTL16B
  1135  		return true
  1136  	case OpExtendLo8ToUint16Uint8x16:
  1137  		v.Op = OpARM64VUXTL16B
  1138  		return true
  1139  	case OpFMA:
  1140  		return rewriteValueARM64_OpFMA(v)
  1141  	case OpFloor:
  1142  		v.Op = OpARM64FRINTMD
  1143  		return true
  1144  	case OpFloorFloat32x4:
  1145  		v.Op = OpARM64VFRINTM4S
  1146  		return true
  1147  	case OpFloorFloat64x2:
  1148  		v.Op = OpARM64VFRINTM2D
  1149  		return true
  1150  	case OpGetCallerPC:
  1151  		v.Op = OpARM64LoweredGetCallerPC
  1152  		return true
  1153  	case OpGetCallerSP:
  1154  		v.Op = OpARM64LoweredGetCallerSP
  1155  		return true
  1156  	case OpGetClosurePtr:
  1157  		v.Op = OpARM64LoweredGetClosurePtr
  1158  		return true
  1159  	case OpGetElemFloat32x4:
  1160  		v.Op = OpARM64VDUPSextr
  1161  		return true
  1162  	case OpGetElemFloat64x2:
  1163  		v.Op = OpARM64VDUPDextr
  1164  		return true
  1165  	case OpGetElemInt16x8:
  1166  		v.Op = OpARM64VMOVHextr
  1167  		return true
  1168  	case OpGetElemInt32x4:
  1169  		v.Op = OpARM64VMOVSextr
  1170  		return true
  1171  	case OpGetElemInt64x2:
  1172  		v.Op = OpARM64VMOVDextr
  1173  		return true
  1174  	case OpGetElemInt8x16:
  1175  		v.Op = OpARM64VMOVBextr
  1176  		return true
  1177  	case OpGetElemUint16x8:
  1178  		v.Op = OpARM64VMOVHextr
  1179  		return true
  1180  	case OpGetElemUint32x4:
  1181  		v.Op = OpARM64VMOVSextr
  1182  		return true
  1183  	case OpGetElemUint64x2:
  1184  		v.Op = OpARM64VMOVDextr
  1185  		return true
  1186  	case OpGetElemUint8x16:
  1187  		v.Op = OpARM64VMOVBextr
  1188  		return true
  1189  	case OpGreaterEqualFloat32x4:
  1190  		v.Op = OpARM64VFCMGE4S
  1191  		return true
  1192  	case OpGreaterEqualFloat64x2:
  1193  		v.Op = OpARM64VFCMGE2D
  1194  		return true
  1195  	case OpGreaterEqualInt16x8:
  1196  		v.Op = OpARM64VCMGE8H
  1197  		return true
  1198  	case OpGreaterEqualInt32x4:
  1199  		v.Op = OpARM64VCMGE4S
  1200  		return true
  1201  	case OpGreaterEqualInt64x2:
  1202  		v.Op = OpARM64VCMGE2D
  1203  		return true
  1204  	case OpGreaterEqualInt8x16:
  1205  		v.Op = OpARM64VCMGE16B
  1206  		return true
  1207  	case OpGreaterEqualUint16x8:
  1208  		v.Op = OpARM64VCMHS8H
  1209  		return true
  1210  	case OpGreaterEqualUint32x4:
  1211  		v.Op = OpARM64VCMHS4S
  1212  		return true
  1213  	case OpGreaterEqualUint64x2:
  1214  		v.Op = OpARM64VCMHS2D
  1215  		return true
  1216  	case OpGreaterEqualUint8x16:
  1217  		v.Op = OpARM64VCMHS16B
  1218  		return true
  1219  	case OpGreaterFloat32x4:
  1220  		v.Op = OpARM64VFCMGT4S
  1221  		return true
  1222  	case OpGreaterFloat64x2:
  1223  		v.Op = OpARM64VFCMGT2D
  1224  		return true
  1225  	case OpGreaterInt16x8:
  1226  		v.Op = OpARM64VCMGT8H
  1227  		return true
  1228  	case OpGreaterInt32x4:
  1229  		v.Op = OpARM64VCMGT4S
  1230  		return true
  1231  	case OpGreaterInt64x2:
  1232  		v.Op = OpARM64VCMGT2D
  1233  		return true
  1234  	case OpGreaterInt8x16:
  1235  		v.Op = OpARM64VCMGT16B
  1236  		return true
  1237  	case OpGreaterUint16x8:
  1238  		v.Op = OpARM64VCMHI8H
  1239  		return true
  1240  	case OpGreaterUint32x4:
  1241  		v.Op = OpARM64VCMHI4S
  1242  		return true
  1243  	case OpGreaterUint64x2:
  1244  		v.Op = OpARM64VCMHI2D
  1245  		return true
  1246  	case OpGreaterUint8x16:
  1247  		v.Op = OpARM64VCMHI16B
  1248  		return true
  1249  	case OpHmul32:
  1250  		return rewriteValueARM64_OpHmul32(v)
  1251  	case OpHmul32u:
  1252  		return rewriteValueARM64_OpHmul32u(v)
  1253  	case OpHmul64:
  1254  		v.Op = OpARM64MULH
  1255  		return true
  1256  	case OpHmul64u:
  1257  		v.Op = OpARM64UMULH
  1258  		return true
  1259  	case OpInterCall:
  1260  		v.Op = OpARM64CALLinter
  1261  		return true
  1262  	case OpInterleaveEvenInt16x8:
  1263  		v.Op = OpARM64VTRN18H
  1264  		return true
  1265  	case OpInterleaveEvenInt32x4:
  1266  		v.Op = OpARM64VTRN14S
  1267  		return true
  1268  	case OpInterleaveEvenInt64x2:
  1269  		v.Op = OpARM64VTRN12D
  1270  		return true
  1271  	case OpInterleaveEvenInt8x16:
  1272  		v.Op = OpARM64VTRN116B
  1273  		return true
  1274  	case OpInterleaveEvenUint16x8:
  1275  		v.Op = OpARM64VTRN18H
  1276  		return true
  1277  	case OpInterleaveEvenUint32x4:
  1278  		v.Op = OpARM64VTRN14S
  1279  		return true
  1280  	case OpInterleaveEvenUint64x2:
  1281  		v.Op = OpARM64VTRN12D
  1282  		return true
  1283  	case OpInterleaveEvenUint8x16:
  1284  		v.Op = OpARM64VTRN116B
  1285  		return true
  1286  	case OpInterleaveHiInt16x8:
  1287  		v.Op = OpARM64VZIP28H
  1288  		return true
  1289  	case OpInterleaveHiInt32x4:
  1290  		v.Op = OpARM64VZIP24S
  1291  		return true
  1292  	case OpInterleaveHiInt64x2:
  1293  		v.Op = OpARM64VZIP22D
  1294  		return true
  1295  	case OpInterleaveHiInt8x16:
  1296  		v.Op = OpARM64VZIP216B
  1297  		return true
  1298  	case OpInterleaveHiUint16x8:
  1299  		v.Op = OpARM64VZIP28H
  1300  		return true
  1301  	case OpInterleaveHiUint32x4:
  1302  		v.Op = OpARM64VZIP24S
  1303  		return true
  1304  	case OpInterleaveHiUint64x2:
  1305  		v.Op = OpARM64VZIP22D
  1306  		return true
  1307  	case OpInterleaveHiUint8x16:
  1308  		v.Op = OpARM64VZIP216B
  1309  		return true
  1310  	case OpInterleaveLoInt16x8:
  1311  		v.Op = OpARM64VZIP18H
  1312  		return true
  1313  	case OpInterleaveLoInt32x4:
  1314  		v.Op = OpARM64VZIP14S
  1315  		return true
  1316  	case OpInterleaveLoInt64x2:
  1317  		v.Op = OpARM64VZIP12D
  1318  		return true
  1319  	case OpInterleaveLoInt8x16:
  1320  		v.Op = OpARM64VZIP116B
  1321  		return true
  1322  	case OpInterleaveLoUint16x8:
  1323  		v.Op = OpARM64VZIP18H
  1324  		return true
  1325  	case OpInterleaveLoUint32x4:
  1326  		v.Op = OpARM64VZIP14S
  1327  		return true
  1328  	case OpInterleaveLoUint64x2:
  1329  		v.Op = OpARM64VZIP12D
  1330  		return true
  1331  	case OpInterleaveLoUint8x16:
  1332  		v.Op = OpARM64VZIP116B
  1333  		return true
  1334  	case OpInterleaveOddInt16x8:
  1335  		v.Op = OpARM64VTRN28H
  1336  		return true
  1337  	case OpInterleaveOddInt32x4:
  1338  		v.Op = OpARM64VTRN24S
  1339  		return true
  1340  	case OpInterleaveOddInt64x2:
  1341  		v.Op = OpARM64VTRN22D
  1342  		return true
  1343  	case OpInterleaveOddInt8x16:
  1344  		v.Op = OpARM64VTRN216B
  1345  		return true
  1346  	case OpInterleaveOddUint16x8:
  1347  		v.Op = OpARM64VTRN28H
  1348  		return true
  1349  	case OpInterleaveOddUint32x4:
  1350  		v.Op = OpARM64VTRN24S
  1351  		return true
  1352  	case OpInterleaveOddUint64x2:
  1353  		v.Op = OpARM64VTRN22D
  1354  		return true
  1355  	case OpInterleaveOddUint8x16:
  1356  		v.Op = OpARM64VTRN216B
  1357  		return true
  1358  	case OpIsInBounds:
  1359  		return rewriteValueARM64_OpIsInBounds(v)
  1360  	case OpIsNonNil:
  1361  		return rewriteValueARM64_OpIsNonNil(v)
  1362  	case OpIsSliceInBounds:
  1363  		return rewriteValueARM64_OpIsSliceInBounds(v)
  1364  	case OpLeadingSignBitsInt16x8:
  1365  		v.Op = OpARM64VCLS8H
  1366  		return true
  1367  	case OpLeadingSignBitsInt32x4:
  1368  		v.Op = OpARM64VCLS4S
  1369  		return true
  1370  	case OpLeadingSignBitsInt8x16:
  1371  		v.Op = OpARM64VCLS16B
  1372  		return true
  1373  	case OpLeadingSignBitsUint16x8:
  1374  		v.Op = OpARM64VCLS8H
  1375  		return true
  1376  	case OpLeadingSignBitsUint32x4:
  1377  		v.Op = OpARM64VCLS4S
  1378  		return true
  1379  	case OpLeadingSignBitsUint8x16:
  1380  		v.Op = OpARM64VCLS16B
  1381  		return true
  1382  	case OpLeadingZerosInt16x8:
  1383  		v.Op = OpARM64VCLZ8H
  1384  		return true
  1385  	case OpLeadingZerosInt32x4:
  1386  		v.Op = OpARM64VCLZ4S
  1387  		return true
  1388  	case OpLeadingZerosInt8x16:
  1389  		v.Op = OpARM64VCLZ16B
  1390  		return true
  1391  	case OpLeadingZerosUint16x8:
  1392  		v.Op = OpARM64VCLZ8H
  1393  		return true
  1394  	case OpLeadingZerosUint32x4:
  1395  		v.Op = OpARM64VCLZ4S
  1396  		return true
  1397  	case OpLeadingZerosUint8x16:
  1398  		v.Op = OpARM64VCLZ16B
  1399  		return true
  1400  	case OpLeq16:
  1401  		return rewriteValueARM64_OpLeq16(v)
  1402  	case OpLeq16U:
  1403  		return rewriteValueARM64_OpLeq16U(v)
  1404  	case OpLeq32:
  1405  		return rewriteValueARM64_OpLeq32(v)
  1406  	case OpLeq32F:
  1407  		return rewriteValueARM64_OpLeq32F(v)
  1408  	case OpLeq32U:
  1409  		return rewriteValueARM64_OpLeq32U(v)
  1410  	case OpLeq64:
  1411  		return rewriteValueARM64_OpLeq64(v)
  1412  	case OpLeq64F:
  1413  		return rewriteValueARM64_OpLeq64F(v)
  1414  	case OpLeq64U:
  1415  		return rewriteValueARM64_OpLeq64U(v)
  1416  	case OpLeq8:
  1417  		return rewriteValueARM64_OpLeq8(v)
  1418  	case OpLeq8U:
  1419  		return rewriteValueARM64_OpLeq8U(v)
  1420  	case OpLess16:
  1421  		return rewriteValueARM64_OpLess16(v)
  1422  	case OpLess16U:
  1423  		return rewriteValueARM64_OpLess16U(v)
  1424  	case OpLess32:
  1425  		return rewriteValueARM64_OpLess32(v)
  1426  	case OpLess32F:
  1427  		return rewriteValueARM64_OpLess32F(v)
  1428  	case OpLess32U:
  1429  		return rewriteValueARM64_OpLess32U(v)
  1430  	case OpLess64:
  1431  		return rewriteValueARM64_OpLess64(v)
  1432  	case OpLess64F:
  1433  		return rewriteValueARM64_OpLess64F(v)
  1434  	case OpLess64U:
  1435  		return rewriteValueARM64_OpLess64U(v)
  1436  	case OpLess8:
  1437  		return rewriteValueARM64_OpLess8(v)
  1438  	case OpLess8U:
  1439  		return rewriteValueARM64_OpLess8U(v)
  1440  	case OpLoad:
  1441  		return rewriteValueARM64_OpLoad(v)
  1442  	case OpLocalAddr:
  1443  		return rewriteValueARM64_OpLocalAddr(v)
  1444  	case OpLookupOrZeroInt8x16:
  1445  		v.Op = OpARM64VTBL16B
  1446  		return true
  1447  	case OpLookupOrZeroUint8x16:
  1448  		v.Op = OpARM64VTBL16B
  1449  		return true
  1450  	case OpLsh16x16:
  1451  		v.Op = OpLsh64x16
  1452  		return true
  1453  	case OpLsh16x32:
  1454  		v.Op = OpLsh64x32
  1455  		return true
  1456  	case OpLsh16x64:
  1457  		v.Op = OpLsh64x64
  1458  		return true
  1459  	case OpLsh16x8:
  1460  		v.Op = OpLsh64x8
  1461  		return true
  1462  	case OpLsh32x16:
  1463  		v.Op = OpLsh64x16
  1464  		return true
  1465  	case OpLsh32x32:
  1466  		v.Op = OpLsh64x32
  1467  		return true
  1468  	case OpLsh32x64:
  1469  		v.Op = OpLsh64x64
  1470  		return true
  1471  	case OpLsh32x8:
  1472  		v.Op = OpLsh64x8
  1473  		return true
  1474  	case OpLsh64x16:
  1475  		return rewriteValueARM64_OpLsh64x16(v)
  1476  	case OpLsh64x32:
  1477  		return rewriteValueARM64_OpLsh64x32(v)
  1478  	case OpLsh64x64:
  1479  		return rewriteValueARM64_OpLsh64x64(v)
  1480  	case OpLsh64x8:
  1481  		return rewriteValueARM64_OpLsh64x8(v)
  1482  	case OpLsh8x16:
  1483  		v.Op = OpLsh64x16
  1484  		return true
  1485  	case OpLsh8x32:
  1486  		v.Op = OpLsh64x32
  1487  		return true
  1488  	case OpLsh8x64:
  1489  		v.Op = OpLsh64x64
  1490  		return true
  1491  	case OpLsh8x8:
  1492  		v.Op = OpLsh64x8
  1493  		return true
  1494  	case OpMax32F:
  1495  		v.Op = OpARM64FMAXS
  1496  		return true
  1497  	case OpMax64F:
  1498  		v.Op = OpARM64FMAXD
  1499  		return true
  1500  	case OpMaxFloat32x4:
  1501  		v.Op = OpARM64VFMAX4S
  1502  		return true
  1503  	case OpMaxFloat64x2:
  1504  		v.Op = OpARM64VFMAX2D
  1505  		return true
  1506  	case OpMaxInt16x8:
  1507  		v.Op = OpARM64VSMAX8H
  1508  		return true
  1509  	case OpMaxInt32x4:
  1510  		v.Op = OpARM64VSMAX4S
  1511  		return true
  1512  	case OpMaxInt8x16:
  1513  		v.Op = OpARM64VSMAX16B
  1514  		return true
  1515  	case OpMaxUint16x8:
  1516  		v.Op = OpARM64VUMAX8H
  1517  		return true
  1518  	case OpMaxUint32x4:
  1519  		v.Op = OpARM64VUMAX4S
  1520  		return true
  1521  	case OpMaxUint8x16:
  1522  		v.Op = OpARM64VUMAX16B
  1523  		return true
  1524  	case OpMemEq:
  1525  		v.Op = OpARM64LoweredMemEq
  1526  		return true
  1527  	case OpMin32F:
  1528  		v.Op = OpARM64FMINS
  1529  		return true
  1530  	case OpMin64F:
  1531  		v.Op = OpARM64FMIND
  1532  		return true
  1533  	case OpMinFloat32x4:
  1534  		v.Op = OpARM64VFMIN4S
  1535  		return true
  1536  	case OpMinFloat64x2:
  1537  		v.Op = OpARM64VFMIN2D
  1538  		return true
  1539  	case OpMinInt16x8:
  1540  		v.Op = OpARM64VSMIN8H
  1541  		return true
  1542  	case OpMinInt32x4:
  1543  		v.Op = OpARM64VSMIN4S
  1544  		return true
  1545  	case OpMinInt8x16:
  1546  		v.Op = OpARM64VSMIN16B
  1547  		return true
  1548  	case OpMinUint16x8:
  1549  		v.Op = OpARM64VUMIN8H
  1550  		return true
  1551  	case OpMinUint32x4:
  1552  		v.Op = OpARM64VUMIN4S
  1553  		return true
  1554  	case OpMinUint8x16:
  1555  		v.Op = OpARM64VUMIN16B
  1556  		return true
  1557  	case OpMod16:
  1558  		return rewriteValueARM64_OpMod16(v)
  1559  	case OpMod16u:
  1560  		return rewriteValueARM64_OpMod16u(v)
  1561  	case OpMod32:
  1562  		return rewriteValueARM64_OpMod32(v)
  1563  	case OpMod32u:
  1564  		v.Op = OpARM64UMODW
  1565  		return true
  1566  	case OpMod64:
  1567  		return rewriteValueARM64_OpMod64(v)
  1568  	case OpMod64u:
  1569  		v.Op = OpARM64UMOD
  1570  		return true
  1571  	case OpMod8:
  1572  		return rewriteValueARM64_OpMod8(v)
  1573  	case OpMod8u:
  1574  		return rewriteValueARM64_OpMod8u(v)
  1575  	case OpMove:
  1576  		return rewriteValueARM64_OpMove(v)
  1577  	case OpMul16:
  1578  		v.Op = OpARM64MULW
  1579  		return true
  1580  	case OpMul32:
  1581  		v.Op = OpARM64MULW
  1582  		return true
  1583  	case OpMul32F:
  1584  		v.Op = OpARM64FMULS
  1585  		return true
  1586  	case OpMul64:
  1587  		v.Op = OpARM64MUL
  1588  		return true
  1589  	case OpMul64F:
  1590  		v.Op = OpARM64FMULD
  1591  		return true
  1592  	case OpMul8:
  1593  		v.Op = OpARM64MULW
  1594  		return true
  1595  	case OpMulAddFloat32x4:
  1596  		return rewriteValueARM64_OpMulAddFloat32x4(v)
  1597  	case OpMulAddFloat64x2:
  1598  		return rewriteValueARM64_OpMulAddFloat64x2(v)
  1599  	case OpMulAddInt16x8:
  1600  		return rewriteValueARM64_OpMulAddInt16x8(v)
  1601  	case OpMulAddInt32x4:
  1602  		return rewriteValueARM64_OpMulAddInt32x4(v)
  1603  	case OpMulAddInt8x16:
  1604  		return rewriteValueARM64_OpMulAddInt8x16(v)
  1605  	case OpMulAddUint16x8:
  1606  		return rewriteValueARM64_OpMulAddUint16x8(v)
  1607  	case OpMulAddUint32x4:
  1608  		return rewriteValueARM64_OpMulAddUint32x4(v)
  1609  	case OpMulAddUint8x16:
  1610  		return rewriteValueARM64_OpMulAddUint8x16(v)
  1611  	case OpMulFloat32x4:
  1612  		v.Op = OpARM64VFMUL4S
  1613  		return true
  1614  	case OpMulFloat64x2:
  1615  		v.Op = OpARM64VFMUL2D
  1616  		return true
  1617  	case OpMulInt16x8:
  1618  		v.Op = OpARM64VMUL8H
  1619  		return true
  1620  	case OpMulInt32x4:
  1621  		v.Op = OpARM64VMUL4S
  1622  		return true
  1623  	case OpMulInt8x16:
  1624  		v.Op = OpARM64VMUL16B
  1625  		return true
  1626  	case OpMulUint16x8:
  1627  		v.Op = OpARM64VMUL8H
  1628  		return true
  1629  	case OpMulUint32x4:
  1630  		v.Op = OpARM64VMUL4S
  1631  		return true
  1632  	case OpMulUint8x16:
  1633  		v.Op = OpARM64VMUL16B
  1634  		return true
  1635  	case OpMulWidenLoInt16x8:
  1636  		v.Op = OpARM64VSMULL8H
  1637  		return true
  1638  	case OpMulWidenLoInt32x4:
  1639  		v.Op = OpARM64VSMULL4S
  1640  		return true
  1641  	case OpMulWidenLoInt8x16:
  1642  		v.Op = OpARM64VSMULL16B
  1643  		return true
  1644  	case OpMulWidenLoUint16x8:
  1645  		v.Op = OpARM64VUMULL8H
  1646  		return true
  1647  	case OpMulWidenLoUint32x4:
  1648  		v.Op = OpARM64VUMULL4S
  1649  		return true
  1650  	case OpMulWidenLoUint8x16:
  1651  		v.Op = OpARM64VUMULL16B
  1652  		return true
  1653  	case OpNeg16:
  1654  		v.Op = OpARM64NEG
  1655  		return true
  1656  	case OpNeg32:
  1657  		v.Op = OpARM64NEG
  1658  		return true
  1659  	case OpNeg32F:
  1660  		v.Op = OpARM64FNEGS
  1661  		return true
  1662  	case OpNeg64:
  1663  		v.Op = OpARM64NEG
  1664  		return true
  1665  	case OpNeg64F:
  1666  		v.Op = OpARM64FNEGD
  1667  		return true
  1668  	case OpNeg8:
  1669  		v.Op = OpARM64NEG
  1670  		return true
  1671  	case OpNegFloat32x4:
  1672  		v.Op = OpARM64VFNEG4S
  1673  		return true
  1674  	case OpNegFloat64x2:
  1675  		v.Op = OpARM64VFNEG2D
  1676  		return true
  1677  	case OpNegInt16x8:
  1678  		v.Op = OpARM64VNEG8H
  1679  		return true
  1680  	case OpNegInt32x4:
  1681  		v.Op = OpARM64VNEG4S
  1682  		return true
  1683  	case OpNegInt64x2:
  1684  		v.Op = OpARM64VNEG2D
  1685  		return true
  1686  	case OpNegInt8x16:
  1687  		v.Op = OpARM64VNEG16B
  1688  		return true
  1689  	case OpNeq16:
  1690  		return rewriteValueARM64_OpNeq16(v)
  1691  	case OpNeq32:
  1692  		return rewriteValueARM64_OpNeq32(v)
  1693  	case OpNeq32F:
  1694  		return rewriteValueARM64_OpNeq32F(v)
  1695  	case OpNeq64:
  1696  		return rewriteValueARM64_OpNeq64(v)
  1697  	case OpNeq64F:
  1698  		return rewriteValueARM64_OpNeq64F(v)
  1699  	case OpNeq8:
  1700  		return rewriteValueARM64_OpNeq8(v)
  1701  	case OpNeqB:
  1702  		v.Op = OpARM64XOR
  1703  		return true
  1704  	case OpNeqPtr:
  1705  		return rewriteValueARM64_OpNeqPtr(v)
  1706  	case OpNilCheck:
  1707  		v.Op = OpARM64LoweredNilCheck
  1708  		return true
  1709  	case OpNot:
  1710  		return rewriteValueARM64_OpNot(v)
  1711  	case OpNotInt16x8:
  1712  		v.Op = OpARM64VNOT16B
  1713  		return true
  1714  	case OpNotInt32x4:
  1715  		v.Op = OpARM64VNOT16B
  1716  		return true
  1717  	case OpNotInt64x2:
  1718  		v.Op = OpARM64VNOT16B
  1719  		return true
  1720  	case OpNotInt8x16:
  1721  		v.Op = OpARM64VNOT16B
  1722  		return true
  1723  	case OpNotUint16x8:
  1724  		v.Op = OpARM64VNOT16B
  1725  		return true
  1726  	case OpNotUint32x4:
  1727  		v.Op = OpARM64VNOT16B
  1728  		return true
  1729  	case OpNotUint64x2:
  1730  		v.Op = OpARM64VNOT16B
  1731  		return true
  1732  	case OpNotUint8x16:
  1733  		v.Op = OpARM64VNOT16B
  1734  		return true
  1735  	case OpOffPtr:
  1736  		return rewriteValueARM64_OpOffPtr(v)
  1737  	case OpOnesCountInt8x16:
  1738  		v.Op = OpARM64VCNT16B
  1739  		return true
  1740  	case OpOnesCountUint8x16:
  1741  		v.Op = OpARM64VCNT16B
  1742  		return true
  1743  	case OpOr16:
  1744  		v.Op = OpARM64OR
  1745  		return true
  1746  	case OpOr32:
  1747  		v.Op = OpARM64OR
  1748  		return true
  1749  	case OpOr64:
  1750  		v.Op = OpARM64OR
  1751  		return true
  1752  	case OpOr8:
  1753  		v.Op = OpARM64OR
  1754  		return true
  1755  	case OpOrB:
  1756  		v.Op = OpARM64OR
  1757  		return true
  1758  	case OpOrInt16x8:
  1759  		v.Op = OpARM64VORR16B
  1760  		return true
  1761  	case OpOrInt32x4:
  1762  		v.Op = OpARM64VORR16B
  1763  		return true
  1764  	case OpOrInt64x2:
  1765  		v.Op = OpARM64VORR16B
  1766  		return true
  1767  	case OpOrInt8x16:
  1768  		v.Op = OpARM64VORR16B
  1769  		return true
  1770  	case OpOrNotInt16x8:
  1771  		v.Op = OpARM64VORN16B
  1772  		return true
  1773  	case OpOrNotInt32x4:
  1774  		v.Op = OpARM64VORN16B
  1775  		return true
  1776  	case OpOrNotInt64x2:
  1777  		v.Op = OpARM64VORN16B
  1778  		return true
  1779  	case OpOrNotInt8x16:
  1780  		v.Op = OpARM64VORN16B
  1781  		return true
  1782  	case OpOrNotUint16x8:
  1783  		v.Op = OpARM64VORN16B
  1784  		return true
  1785  	case OpOrNotUint32x4:
  1786  		v.Op = OpARM64VORN16B
  1787  		return true
  1788  	case OpOrNotUint64x2:
  1789  		v.Op = OpARM64VORN16B
  1790  		return true
  1791  	case OpOrNotUint8x16:
  1792  		v.Op = OpARM64VORN16B
  1793  		return true
  1794  	case OpOrUint16x8:
  1795  		v.Op = OpARM64VORR16B
  1796  		return true
  1797  	case OpOrUint32x4:
  1798  		v.Op = OpARM64VORR16B
  1799  		return true
  1800  	case OpOrUint64x2:
  1801  		v.Op = OpARM64VORR16B
  1802  		return true
  1803  	case OpOrUint8x16:
  1804  		v.Op = OpARM64VORR16B
  1805  		return true
  1806  	case OpPanicBounds:
  1807  		v.Op = OpARM64LoweredPanicBoundsRR
  1808  		return true
  1809  	case OpPopCount16:
  1810  		return rewriteValueARM64_OpPopCount16(v)
  1811  	case OpPopCount32:
  1812  		return rewriteValueARM64_OpPopCount32(v)
  1813  	case OpPopCount64:
  1814  		return rewriteValueARM64_OpPopCount64(v)
  1815  	case OpPrefetchCache:
  1816  		return rewriteValueARM64_OpPrefetchCache(v)
  1817  	case OpPrefetchCacheStreamed:
  1818  		return rewriteValueARM64_OpPrefetchCacheStreamed(v)
  1819  	case OpPubBarrier:
  1820  		return rewriteValueARM64_OpPubBarrier(v)
  1821  	case OpRotateLeft16:
  1822  		return rewriteValueARM64_OpRotateLeft16(v)
  1823  	case OpRotateLeft32:
  1824  		return rewriteValueARM64_OpRotateLeft32(v)
  1825  	case OpRotateLeft64:
  1826  		return rewriteValueARM64_OpRotateLeft64(v)
  1827  	case OpRotateLeft8:
  1828  		return rewriteValueARM64_OpRotateLeft8(v)
  1829  	case OpRound:
  1830  		v.Op = OpARM64FRINTAD
  1831  		return true
  1832  	case OpRound32F:
  1833  		v.Op = OpARM64LoweredRound32F
  1834  		return true
  1835  	case OpRound64F:
  1836  		v.Op = OpARM64LoweredRound64F
  1837  		return true
  1838  	case OpRoundFloat32x4:
  1839  		v.Op = OpARM64VFRINTN4S
  1840  		return true
  1841  	case OpRoundFloat64x2:
  1842  		v.Op = OpARM64VFRINTN2D
  1843  		return true
  1844  	case OpRoundToEven:
  1845  		v.Op = OpARM64FRINTND
  1846  		return true
  1847  	case OpRsh16Ux16:
  1848  		return rewriteValueARM64_OpRsh16Ux16(v)
  1849  	case OpRsh16Ux32:
  1850  		return rewriteValueARM64_OpRsh16Ux32(v)
  1851  	case OpRsh16Ux64:
  1852  		return rewriteValueARM64_OpRsh16Ux64(v)
  1853  	case OpRsh16Ux8:
  1854  		return rewriteValueARM64_OpRsh16Ux8(v)
  1855  	case OpRsh16x16:
  1856  		return rewriteValueARM64_OpRsh16x16(v)
  1857  	case OpRsh16x32:
  1858  		return rewriteValueARM64_OpRsh16x32(v)
  1859  	case OpRsh16x64:
  1860  		return rewriteValueARM64_OpRsh16x64(v)
  1861  	case OpRsh16x8:
  1862  		return rewriteValueARM64_OpRsh16x8(v)
  1863  	case OpRsh32Ux16:
  1864  		return rewriteValueARM64_OpRsh32Ux16(v)
  1865  	case OpRsh32Ux32:
  1866  		return rewriteValueARM64_OpRsh32Ux32(v)
  1867  	case OpRsh32Ux64:
  1868  		return rewriteValueARM64_OpRsh32Ux64(v)
  1869  	case OpRsh32Ux8:
  1870  		return rewriteValueARM64_OpRsh32Ux8(v)
  1871  	case OpRsh32x16:
  1872  		return rewriteValueARM64_OpRsh32x16(v)
  1873  	case OpRsh32x32:
  1874  		return rewriteValueARM64_OpRsh32x32(v)
  1875  	case OpRsh32x64:
  1876  		return rewriteValueARM64_OpRsh32x64(v)
  1877  	case OpRsh32x8:
  1878  		return rewriteValueARM64_OpRsh32x8(v)
  1879  	case OpRsh64Ux16:
  1880  		return rewriteValueARM64_OpRsh64Ux16(v)
  1881  	case OpRsh64Ux32:
  1882  		return rewriteValueARM64_OpRsh64Ux32(v)
  1883  	case OpRsh64Ux64:
  1884  		return rewriteValueARM64_OpRsh64Ux64(v)
  1885  	case OpRsh64Ux8:
  1886  		return rewriteValueARM64_OpRsh64Ux8(v)
  1887  	case OpRsh64x16:
  1888  		return rewriteValueARM64_OpRsh64x16(v)
  1889  	case OpRsh64x32:
  1890  		return rewriteValueARM64_OpRsh64x32(v)
  1891  	case OpRsh64x64:
  1892  		return rewriteValueARM64_OpRsh64x64(v)
  1893  	case OpRsh64x8:
  1894  		return rewriteValueARM64_OpRsh64x8(v)
  1895  	case OpRsh8Ux16:
  1896  		return rewriteValueARM64_OpRsh8Ux16(v)
  1897  	case OpRsh8Ux32:
  1898  		return rewriteValueARM64_OpRsh8Ux32(v)
  1899  	case OpRsh8Ux64:
  1900  		return rewriteValueARM64_OpRsh8Ux64(v)
  1901  	case OpRsh8Ux8:
  1902  		return rewriteValueARM64_OpRsh8Ux8(v)
  1903  	case OpRsh8x16:
  1904  		return rewriteValueARM64_OpRsh8x16(v)
  1905  	case OpRsh8x32:
  1906  		return rewriteValueARM64_OpRsh8x32(v)
  1907  	case OpRsh8x64:
  1908  		return rewriteValueARM64_OpRsh8x64(v)
  1909  	case OpRsh8x8:
  1910  		return rewriteValueARM64_OpRsh8x8(v)
  1911  	case OpSaturateToInt16Int32x4:
  1912  		v.Op = OpARM64VSQXTN4S
  1913  		return true
  1914  	case OpSaturateToInt32Int64x2:
  1915  		v.Op = OpARM64VSQXTN2D
  1916  		return true
  1917  	case OpSaturateToInt8Int16x8:
  1918  		v.Op = OpARM64VSQXTN8H
  1919  		return true
  1920  	case OpSaturateToUint16Int32x4:
  1921  		v.Op = OpARM64VSQXTUN4S
  1922  		return true
  1923  	case OpSaturateToUint16Uint32x4:
  1924  		v.Op = OpARM64VUQXTN4S
  1925  		return true
  1926  	case OpSaturateToUint32Int64x2:
  1927  		v.Op = OpARM64VSQXTUN2D
  1928  		return true
  1929  	case OpSaturateToUint32Uint64x2:
  1930  		v.Op = OpARM64VUQXTN2D
  1931  		return true
  1932  	case OpSaturateToUint8Int16x8:
  1933  		v.Op = OpARM64VSQXTUN8H
  1934  		return true
  1935  	case OpSaturateToUint8Uint16x8:
  1936  		v.Op = OpARM64VUQXTN8H
  1937  		return true
  1938  	case OpSelect0:
  1939  		return rewriteValueARM64_OpSelect0(v)
  1940  	case OpSelect1:
  1941  		return rewriteValueARM64_OpSelect1(v)
  1942  	case OpSelectN:
  1943  		return rewriteValueARM64_OpSelectN(v)
  1944  	case OpSetElemFloat32x4:
  1945  		v.Op = OpARM64VMOVSins0
  1946  		return true
  1947  	case OpSetElemFloat64x2:
  1948  		v.Op = OpARM64VMOVDins0
  1949  		return true
  1950  	case OpSetElemInt16x8:
  1951  		v.Op = OpARM64VMOVHins
  1952  		return true
  1953  	case OpSetElemInt32x4:
  1954  		v.Op = OpARM64VMOVSins
  1955  		return true
  1956  	case OpSetElemInt64x2:
  1957  		v.Op = OpARM64VMOVDins
  1958  		return true
  1959  	case OpSetElemInt8x16:
  1960  		v.Op = OpARM64VMOVBins
  1961  		return true
  1962  	case OpSetElemUint16x8:
  1963  		v.Op = OpARM64VMOVHins
  1964  		return true
  1965  	case OpSetElemUint32x4:
  1966  		v.Op = OpARM64VMOVSins
  1967  		return true
  1968  	case OpSetElemUint64x2:
  1969  		v.Op = OpARM64VMOVDins
  1970  		return true
  1971  	case OpSetElemUint8x16:
  1972  		v.Op = OpARM64VMOVBins
  1973  		return true
  1974  	case OpShiftAllLeftInt16x8:
  1975  		return rewriteValueARM64_OpShiftAllLeftInt16x8(v)
  1976  	case OpShiftAllLeftInt32x4:
  1977  		return rewriteValueARM64_OpShiftAllLeftInt32x4(v)
  1978  	case OpShiftAllLeftInt64x2:
  1979  		return rewriteValueARM64_OpShiftAllLeftInt64x2(v)
  1980  	case OpShiftAllLeftInt8x16:
  1981  		return rewriteValueARM64_OpShiftAllLeftInt8x16(v)
  1982  	case OpShiftAllLeftUint16x8:
  1983  		return rewriteValueARM64_OpShiftAllLeftUint16x8(v)
  1984  	case OpShiftAllLeftUint32x4:
  1985  		return rewriteValueARM64_OpShiftAllLeftUint32x4(v)
  1986  	case OpShiftAllLeftUint64x2:
  1987  		return rewriteValueARM64_OpShiftAllLeftUint64x2(v)
  1988  	case OpShiftAllLeftUint8x16:
  1989  		return rewriteValueARM64_OpShiftAllLeftUint8x16(v)
  1990  	case OpShiftAllRightInt16x8:
  1991  		return rewriteValueARM64_OpShiftAllRightInt16x8(v)
  1992  	case OpShiftAllRightInt32x4:
  1993  		return rewriteValueARM64_OpShiftAllRightInt32x4(v)
  1994  	case OpShiftAllRightInt64x2:
  1995  		return rewriteValueARM64_OpShiftAllRightInt64x2(v)
  1996  	case OpShiftAllRightInt8x16:
  1997  		return rewriteValueARM64_OpShiftAllRightInt8x16(v)
  1998  	case OpShiftAllRightUint16x8:
  1999  		return rewriteValueARM64_OpShiftAllRightUint16x8(v)
  2000  	case OpShiftAllRightUint32x4:
  2001  		return rewriteValueARM64_OpShiftAllRightUint32x4(v)
  2002  	case OpShiftAllRightUint64x2:
  2003  		return rewriteValueARM64_OpShiftAllRightUint64x2(v)
  2004  	case OpShiftAllRightUint8x16:
  2005  		return rewriteValueARM64_OpShiftAllRightUint8x16(v)
  2006  	case OpShiftInt16x8:
  2007  		v.Op = OpARM64VSSHL8H
  2008  		return true
  2009  	case OpShiftInt32x4:
  2010  		v.Op = OpARM64VSSHL4S
  2011  		return true
  2012  	case OpShiftInt64x2:
  2013  		v.Op = OpARM64VSSHL2D
  2014  		return true
  2015  	case OpShiftInt8x16:
  2016  		v.Op = OpARM64VSSHL16B
  2017  		return true
  2018  	case OpShiftSaturatedInt16x8:
  2019  		v.Op = OpARM64VSQSHL8H
  2020  		return true
  2021  	case OpShiftSaturatedInt32x4:
  2022  		v.Op = OpARM64VSQSHL4S
  2023  		return true
  2024  	case OpShiftSaturatedInt64x2:
  2025  		v.Op = OpARM64VSQSHL2D
  2026  		return true
  2027  	case OpShiftSaturatedInt8x16:
  2028  		v.Op = OpARM64VSQSHL16B
  2029  		return true
  2030  	case OpShiftSaturatedUint16x8:
  2031  		v.Op = OpARM64VUQSHL8H
  2032  		return true
  2033  	case OpShiftSaturatedUint32x4:
  2034  		v.Op = OpARM64VUQSHL4S
  2035  		return true
  2036  	case OpShiftSaturatedUint64x2:
  2037  		v.Op = OpARM64VUQSHL2D
  2038  		return true
  2039  	case OpShiftSaturatedUint8x16:
  2040  		v.Op = OpARM64VUQSHL16B
  2041  		return true
  2042  	case OpShiftUint16x8:
  2043  		v.Op = OpARM64VUSHL8H
  2044  		return true
  2045  	case OpShiftUint32x4:
  2046  		v.Op = OpARM64VUSHL4S
  2047  		return true
  2048  	case OpShiftUint64x2:
  2049  		v.Op = OpARM64VUSHL2D
  2050  		return true
  2051  	case OpShiftUint8x16:
  2052  		v.Op = OpARM64VUSHL16B
  2053  		return true
  2054  	case OpSignExt16to32:
  2055  		v.Op = OpARM64MOVHreg
  2056  		return true
  2057  	case OpSignExt16to64:
  2058  		v.Op = OpARM64MOVHreg
  2059  		return true
  2060  	case OpSignExt32to64:
  2061  		v.Op = OpARM64MOVWreg
  2062  		return true
  2063  	case OpSignExt8to16:
  2064  		v.Op = OpARM64MOVBreg
  2065  		return true
  2066  	case OpSignExt8to32:
  2067  		v.Op = OpARM64MOVBreg
  2068  		return true
  2069  	case OpSignExt8to64:
  2070  		v.Op = OpARM64MOVBreg
  2071  		return true
  2072  	case OpSlicemask:
  2073  		return rewriteValueARM64_OpSlicemask(v)
  2074  	case OpSqrt:
  2075  		v.Op = OpARM64FSQRTD
  2076  		return true
  2077  	case OpSqrt32:
  2078  		v.Op = OpARM64FSQRTS
  2079  		return true
  2080  	case OpSqrtFloat32x4:
  2081  		v.Op = OpARM64VFSQRT4S
  2082  		return true
  2083  	case OpSqrtFloat64x2:
  2084  		v.Op = OpARM64VFSQRT2D
  2085  		return true
  2086  	case OpStaticCall:
  2087  		v.Op = OpARM64CALLstatic
  2088  		return true
  2089  	case OpStore:
  2090  		return rewriteValueARM64_OpStore(v)
  2091  	case OpSub16:
  2092  		v.Op = OpARM64SUB
  2093  		return true
  2094  	case OpSub32:
  2095  		v.Op = OpARM64SUB
  2096  		return true
  2097  	case OpSub32F:
  2098  		v.Op = OpARM64FSUBS
  2099  		return true
  2100  	case OpSub64:
  2101  		v.Op = OpARM64SUB
  2102  		return true
  2103  	case OpSub64F:
  2104  		v.Op = OpARM64FSUBD
  2105  		return true
  2106  	case OpSub8:
  2107  		v.Op = OpARM64SUB
  2108  		return true
  2109  	case OpSubFloat32x4:
  2110  		v.Op = OpARM64VFSUB4S
  2111  		return true
  2112  	case OpSubFloat64x2:
  2113  		v.Op = OpARM64VFSUB2D
  2114  		return true
  2115  	case OpSubInt16x8:
  2116  		v.Op = OpARM64VSUB8H
  2117  		return true
  2118  	case OpSubInt32x4:
  2119  		v.Op = OpARM64VSUB4S
  2120  		return true
  2121  	case OpSubInt64x2:
  2122  		v.Op = OpARM64VSUB2D
  2123  		return true
  2124  	case OpSubInt8x16:
  2125  		v.Op = OpARM64VSUB16B
  2126  		return true
  2127  	case OpSubPtr:
  2128  		v.Op = OpARM64SUB
  2129  		return true
  2130  	case OpSubSaturatedInt16x8:
  2131  		v.Op = OpARM64VSQSUB8H
  2132  		return true
  2133  	case OpSubSaturatedInt32x4:
  2134  		v.Op = OpARM64VSQSUB4S
  2135  		return true
  2136  	case OpSubSaturatedInt64x2:
  2137  		v.Op = OpARM64VSQSUB2D
  2138  		return true
  2139  	case OpSubSaturatedInt8x16:
  2140  		v.Op = OpARM64VSQSUB16B
  2141  		return true
  2142  	case OpSubSaturatedUint16x8:
  2143  		v.Op = OpARM64VUQSUB8H
  2144  		return true
  2145  	case OpSubSaturatedUint32x4:
  2146  		v.Op = OpARM64VUQSUB4S
  2147  		return true
  2148  	case OpSubSaturatedUint64x2:
  2149  		v.Op = OpARM64VUQSUB2D
  2150  		return true
  2151  	case OpSubSaturatedUint8x16:
  2152  		v.Op = OpARM64VUQSUB16B
  2153  		return true
  2154  	case OpSubUint16x8:
  2155  		v.Op = OpARM64VSUB8H
  2156  		return true
  2157  	case OpSubUint32x4:
  2158  		v.Op = OpARM64VSUB4S
  2159  		return true
  2160  	case OpSubUint64x2:
  2161  		v.Op = OpARM64VSUB2D
  2162  		return true
  2163  	case OpSubUint8x16:
  2164  		v.Op = OpARM64VSUB16B
  2165  		return true
  2166  	case OpTailCall:
  2167  		v.Op = OpARM64CALLtail
  2168  		return true
  2169  	case OpTailCallInter:
  2170  		v.Op = OpARM64CALLtailinter
  2171  		return true
  2172  	case OpTrunc:
  2173  		v.Op = OpARM64FRINTZD
  2174  		return true
  2175  	case OpTrunc16to8:
  2176  		v.Op = OpCopy
  2177  		return true
  2178  	case OpTrunc32to16:
  2179  		v.Op = OpCopy
  2180  		return true
  2181  	case OpTrunc32to8:
  2182  		v.Op = OpCopy
  2183  		return true
  2184  	case OpTrunc64to16:
  2185  		v.Op = OpCopy
  2186  		return true
  2187  	case OpTrunc64to32:
  2188  		v.Op = OpCopy
  2189  		return true
  2190  	case OpTrunc64to8:
  2191  		v.Op = OpCopy
  2192  		return true
  2193  	case OpTruncFloat32x4:
  2194  		v.Op = OpARM64VFRINTZ4S
  2195  		return true
  2196  	case OpTruncFloat64x2:
  2197  		v.Op = OpARM64VFRINTZ2D
  2198  		return true
  2199  	case OpTruncToInt16Int32x4:
  2200  		v.Op = OpARM64VXTN4S
  2201  		return true
  2202  	case OpTruncToInt32Int64x2:
  2203  		v.Op = OpARM64VXTN2D
  2204  		return true
  2205  	case OpTruncToInt8Int16x8:
  2206  		v.Op = OpARM64VXTN8H
  2207  		return true
  2208  	case OpTruncToUint16Uint32x4:
  2209  		v.Op = OpARM64VXTN4S
  2210  		return true
  2211  	case OpTruncToUint32Uint64x2:
  2212  		v.Op = OpARM64VXTN2D
  2213  		return true
  2214  	case OpTruncToUint8Uint16x8:
  2215  		v.Op = OpARM64VXTN8H
  2216  		return true
  2217  	case OpWB:
  2218  		v.Op = OpARM64LoweredWB
  2219  		return true
  2220  	case OpXor16:
  2221  		v.Op = OpARM64XOR
  2222  		return true
  2223  	case OpXor32:
  2224  		v.Op = OpARM64XOR
  2225  		return true
  2226  	case OpXor64:
  2227  		v.Op = OpARM64XOR
  2228  		return true
  2229  	case OpXor8:
  2230  		v.Op = OpARM64XOR
  2231  		return true
  2232  	case OpXorInt16x8:
  2233  		v.Op = OpARM64VEOR16B
  2234  		return true
  2235  	case OpXorInt32x4:
  2236  		v.Op = OpARM64VEOR16B
  2237  		return true
  2238  	case OpXorInt64x2:
  2239  		v.Op = OpARM64VEOR16B
  2240  		return true
  2241  	case OpXorInt8x16:
  2242  		v.Op = OpARM64VEOR16B
  2243  		return true
  2244  	case OpXorUint16x8:
  2245  		v.Op = OpARM64VEOR16B
  2246  		return true
  2247  	case OpXorUint32x4:
  2248  		v.Op = OpARM64VEOR16B
  2249  		return true
  2250  	case OpXorUint64x2:
  2251  		v.Op = OpARM64VEOR16B
  2252  		return true
  2253  	case OpXorUint8x16:
  2254  		v.Op = OpARM64VEOR16B
  2255  		return true
  2256  	case OpZero:
  2257  		return rewriteValueARM64_OpZero(v)
  2258  	case OpZeroExt16to32:
  2259  		v.Op = OpARM64MOVHUreg
  2260  		return true
  2261  	case OpZeroExt16to64:
  2262  		v.Op = OpARM64MOVHUreg
  2263  		return true
  2264  	case OpZeroExt32to64:
  2265  		v.Op = OpARM64MOVWUreg
  2266  		return true
  2267  	case OpZeroExt8to16:
  2268  		v.Op = OpARM64MOVBUreg
  2269  		return true
  2270  	case OpZeroExt8to32:
  2271  		v.Op = OpARM64MOVBUreg
  2272  		return true
  2273  	case OpZeroExt8to64:
  2274  		v.Op = OpARM64MOVBUreg
  2275  		return true
  2276  	case OpZeroSIMD:
  2277  		return rewriteValueARM64_OpZeroSIMD(v)
  2278  	case OpbitSelectInt8x16:
  2279  		v.Op = OpARM64VBIT16B
  2280  		return true
  2281  	case OpbitSelectNotInt8x16:
  2282  		v.Op = OpARM64VBIF16B
  2283  		return true
  2284  	case Opbroadcast1To16Int8x16:
  2285  		return rewriteValueARM64_Opbroadcast1To16Int8x16(v)
  2286  	case Opbroadcast1To16Uint8x16:
  2287  		return rewriteValueARM64_Opbroadcast1To16Uint8x16(v)
  2288  	case Opbroadcast1To2Float64x2:
  2289  		return rewriteValueARM64_Opbroadcast1To2Float64x2(v)
  2290  	case Opbroadcast1To2Int64x2:
  2291  		return rewriteValueARM64_Opbroadcast1To2Int64x2(v)
  2292  	case Opbroadcast1To2Uint64x2:
  2293  		return rewriteValueARM64_Opbroadcast1To2Uint64x2(v)
  2294  	case Opbroadcast1To4Float32x4:
  2295  		return rewriteValueARM64_Opbroadcast1To4Float32x4(v)
  2296  	case Opbroadcast1To4Int32x4:
  2297  		return rewriteValueARM64_Opbroadcast1To4Int32x4(v)
  2298  	case Opbroadcast1To4Uint32x4:
  2299  		return rewriteValueARM64_Opbroadcast1To4Uint32x4(v)
  2300  	case Opbroadcast1To8Int16x8:
  2301  		return rewriteValueARM64_Opbroadcast1To8Int16x8(v)
  2302  	case Opbroadcast1To8Uint16x8:
  2303  		return rewriteValueARM64_Opbroadcast1To8Uint16x8(v)
  2304  	case OpcarrylessMultiplyWidenLoUint64x2:
  2305  		v.Op = OpARM64VPMULL2D
  2306  		return true
  2307  	case OpreduceMaxFloat32x4:
  2308  		v.Op = OpARM64VFMAXV4S
  2309  		return true
  2310  	case OpreduceMaxInt16x8:
  2311  		v.Op = OpARM64VSMAXV8H
  2312  		return true
  2313  	case OpreduceMaxInt32x4:
  2314  		v.Op = OpARM64VSMAXV4S
  2315  		return true
  2316  	case OpreduceMaxInt8x16:
  2317  		v.Op = OpARM64VSMAXV16B
  2318  		return true
  2319  	case OpreduceMaxUint16x8:
  2320  		v.Op = OpARM64VUMAXV8H
  2321  		return true
  2322  	case OpreduceMaxUint32x4:
  2323  		v.Op = OpARM64VUMAXV4S
  2324  		return true
  2325  	case OpreduceMaxUint8x16:
  2326  		v.Op = OpARM64VUMAXV16B
  2327  		return true
  2328  	case OpreduceMinFloat32x4:
  2329  		v.Op = OpARM64VFMINV4S
  2330  		return true
  2331  	case OpreduceMinInt16x8:
  2332  		v.Op = OpARM64VSMINV8H
  2333  		return true
  2334  	case OpreduceMinInt32x4:
  2335  		v.Op = OpARM64VSMINV4S
  2336  		return true
  2337  	case OpreduceMinInt8x16:
  2338  		v.Op = OpARM64VSMINV16B
  2339  		return true
  2340  	case OpreduceMinUint16x8:
  2341  		v.Op = OpARM64VUMINV8H
  2342  		return true
  2343  	case OpreduceMinUint32x4:
  2344  		v.Op = OpARM64VUMINV4S
  2345  		return true
  2346  	case OpreduceMinUint8x16:
  2347  		v.Op = OpARM64VUMINV16B
  2348  		return true
  2349  	case OpreduceSumInt16x8:
  2350  		v.Op = OpARM64VADDV8H
  2351  		return true
  2352  	case OpreduceSumInt32x4:
  2353  		v.Op = OpARM64VADDV4S
  2354  		return true
  2355  	case OpreduceSumInt8x16:
  2356  		v.Op = OpARM64VADDV16B
  2357  		return true
  2358  	case OpreduceSumUint16x8:
  2359  		v.Op = OpARM64VADDV8H
  2360  		return true
  2361  	case OpreduceSumUint32x4:
  2362  		v.Op = OpARM64VADDV4S
  2363  		return true
  2364  	case OpreduceSumUint8x16:
  2365  		v.Op = OpARM64VADDV16B
  2366  		return true
  2367  	}
  2368  	return false
  2369  }
  2370  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  2371  	v_2 := v.Args[2]
  2372  	v_1 := v.Args[1]
  2373  	v_0 := v.Args[0]
  2374  	b := v.Block
  2375  	typ := &b.Func.Config.Types
  2376  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  2377  	// result: (ADCSflags x y c)
  2378  	for {
  2379  		x := v_0
  2380  		y := v_1
  2381  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  2382  			break
  2383  		}
  2384  		v_2_0 := v_2.Args[0]
  2385  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  2386  			break
  2387  		}
  2388  		v_2_0_0 := v_2_0.Args[0]
  2389  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  2390  			break
  2391  		}
  2392  		c := v_2_0_0.Args[0]
  2393  		v.reset(OpARM64ADCSflags)
  2394  		v.AddArg3(x, y, c)
  2395  		return true
  2396  	}
  2397  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  2398  	// result: (ADDSflags x y)
  2399  	for {
  2400  		x := v_0
  2401  		y := v_1
  2402  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  2403  			break
  2404  		}
  2405  		v_2_0 := v_2.Args[0]
  2406  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  2407  			break
  2408  		}
  2409  		v_2_0_0 := v_2_0.Args[0]
  2410  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  2411  			break
  2412  		}
  2413  		v.reset(OpARM64ADDSflags)
  2414  		v.AddArg2(x, y)
  2415  		return true
  2416  	}
  2417  	return false
  2418  }
  2419  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  2420  	v_1 := v.Args[1]
  2421  	v_0 := v.Args[0]
  2422  	b := v.Block
  2423  	// match: (ADD x (MOVDconst <t> [c]))
  2424  	// cond: !t.IsPtr()
  2425  	// result: (ADDconst [c] x)
  2426  	for {
  2427  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2428  			x := v_0
  2429  			if v_1.Op != OpARM64MOVDconst {
  2430  				continue
  2431  			}
  2432  			t := v_1.Type
  2433  			c := auxIntToInt64(v_1.AuxInt)
  2434  			if !(!t.IsPtr()) {
  2435  				continue
  2436  			}
  2437  			v.reset(OpARM64ADDconst)
  2438  			v.AuxInt = int64ToAuxInt(c)
  2439  			v.AddArg(x)
  2440  			return true
  2441  		}
  2442  		break
  2443  	}
  2444  	// match: (ADD a l:(MUL x y))
  2445  	// cond: l.Uses==1 && clobber(l)
  2446  	// result: (MADD a x y)
  2447  	for {
  2448  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2449  			a := v_0
  2450  			l := v_1
  2451  			if l.Op != OpARM64MUL {
  2452  				continue
  2453  			}
  2454  			y := l.Args[1]
  2455  			x := l.Args[0]
  2456  			if !(l.Uses == 1 && clobber(l)) {
  2457  				continue
  2458  			}
  2459  			v.reset(OpARM64MADD)
  2460  			v.AddArg3(a, x, y)
  2461  			return true
  2462  		}
  2463  		break
  2464  	}
  2465  	// match: (ADD a l:(MNEG x y))
  2466  	// cond: l.Uses==1 && clobber(l)
  2467  	// result: (MSUB a x y)
  2468  	for {
  2469  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2470  			a := v_0
  2471  			l := v_1
  2472  			if l.Op != OpARM64MNEG {
  2473  				continue
  2474  			}
  2475  			y := l.Args[1]
  2476  			x := l.Args[0]
  2477  			if !(l.Uses == 1 && clobber(l)) {
  2478  				continue
  2479  			}
  2480  			v.reset(OpARM64MSUB)
  2481  			v.AddArg3(a, x, y)
  2482  			return true
  2483  		}
  2484  		break
  2485  	}
  2486  	// match: (ADD a l:(MULW x y))
  2487  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  2488  	// result: (MADDW a x y)
  2489  	for {
  2490  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2491  			a := v_0
  2492  			l := v_1
  2493  			if l.Op != OpARM64MULW {
  2494  				continue
  2495  			}
  2496  			y := l.Args[1]
  2497  			x := l.Args[0]
  2498  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  2499  				continue
  2500  			}
  2501  			v.reset(OpARM64MADDW)
  2502  			v.AddArg3(a, x, y)
  2503  			return true
  2504  		}
  2505  		break
  2506  	}
  2507  	// match: (ADD a l:(MNEGW x y))
  2508  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  2509  	// result: (MSUBW a x y)
  2510  	for {
  2511  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2512  			a := v_0
  2513  			l := v_1
  2514  			if l.Op != OpARM64MNEGW {
  2515  				continue
  2516  			}
  2517  			y := l.Args[1]
  2518  			x := l.Args[0]
  2519  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  2520  				continue
  2521  			}
  2522  			v.reset(OpARM64MSUBW)
  2523  			v.AddArg3(a, x, y)
  2524  			return true
  2525  		}
  2526  		break
  2527  	}
  2528  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  2529  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2530  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2531  	for {
  2532  		t := v.Type
  2533  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2534  			a := v_0
  2535  			p := v_1
  2536  			if p.Op != OpARM64ADDconst {
  2537  				continue
  2538  			}
  2539  			c := auxIntToInt64(p.AuxInt)
  2540  			m := p.Args[0]
  2541  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2542  				continue
  2543  			}
  2544  			v.reset(OpARM64ADDconst)
  2545  			v.AuxInt = int64ToAuxInt(c)
  2546  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2547  			v0.AddArg2(a, m)
  2548  			v.AddArg(v0)
  2549  			return true
  2550  		}
  2551  		break
  2552  	}
  2553  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  2554  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2555  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2556  	for {
  2557  		t := v.Type
  2558  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2559  			a := v_0
  2560  			p := v_1
  2561  			if p.Op != OpARM64ADDconst {
  2562  				continue
  2563  			}
  2564  			c := auxIntToInt64(p.AuxInt)
  2565  			m := p.Args[0]
  2566  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2567  				continue
  2568  			}
  2569  			v.reset(OpARM64ADDconst)
  2570  			v.AuxInt = int64ToAuxInt(c)
  2571  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2572  			v0.AddArg2(a, m)
  2573  			v.AddArg(v0)
  2574  			return true
  2575  		}
  2576  		break
  2577  	}
  2578  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  2579  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2580  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2581  	for {
  2582  		t := v.Type
  2583  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2584  			a := v_0
  2585  			p := v_1
  2586  			if p.Op != OpARM64ADDconst {
  2587  				continue
  2588  			}
  2589  			c := auxIntToInt64(p.AuxInt)
  2590  			m := p.Args[0]
  2591  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2592  				continue
  2593  			}
  2594  			v.reset(OpARM64ADDconst)
  2595  			v.AuxInt = int64ToAuxInt(c)
  2596  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2597  			v0.AddArg2(a, m)
  2598  			v.AddArg(v0)
  2599  			return true
  2600  		}
  2601  		break
  2602  	}
  2603  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  2604  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2605  	// result: (ADDconst [c] (ADD <v.Type> a m))
  2606  	for {
  2607  		t := v.Type
  2608  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2609  			a := v_0
  2610  			p := v_1
  2611  			if p.Op != OpARM64ADDconst {
  2612  				continue
  2613  			}
  2614  			c := auxIntToInt64(p.AuxInt)
  2615  			m := p.Args[0]
  2616  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2617  				continue
  2618  			}
  2619  			v.reset(OpARM64ADDconst)
  2620  			v.AuxInt = int64ToAuxInt(c)
  2621  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2622  			v0.AddArg2(a, m)
  2623  			v.AddArg(v0)
  2624  			return true
  2625  		}
  2626  		break
  2627  	}
  2628  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  2629  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2630  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2631  	for {
  2632  		t := v.Type
  2633  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2634  			a := v_0
  2635  			p := v_1
  2636  			if p.Op != OpARM64SUBconst {
  2637  				continue
  2638  			}
  2639  			c := auxIntToInt64(p.AuxInt)
  2640  			m := p.Args[0]
  2641  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2642  				continue
  2643  			}
  2644  			v.reset(OpARM64SUBconst)
  2645  			v.AuxInt = int64ToAuxInt(c)
  2646  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2647  			v0.AddArg2(a, m)
  2648  			v.AddArg(v0)
  2649  			return true
  2650  		}
  2651  		break
  2652  	}
  2653  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  2654  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2655  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2656  	for {
  2657  		t := v.Type
  2658  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2659  			a := v_0
  2660  			p := v_1
  2661  			if p.Op != OpARM64SUBconst {
  2662  				continue
  2663  			}
  2664  			c := auxIntToInt64(p.AuxInt)
  2665  			m := p.Args[0]
  2666  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2667  				continue
  2668  			}
  2669  			v.reset(OpARM64SUBconst)
  2670  			v.AuxInt = int64ToAuxInt(c)
  2671  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2672  			v0.AddArg2(a, m)
  2673  			v.AddArg(v0)
  2674  			return true
  2675  		}
  2676  		break
  2677  	}
  2678  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  2679  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2680  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2681  	for {
  2682  		t := v.Type
  2683  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2684  			a := v_0
  2685  			p := v_1
  2686  			if p.Op != OpARM64SUBconst {
  2687  				continue
  2688  			}
  2689  			c := auxIntToInt64(p.AuxInt)
  2690  			m := p.Args[0]
  2691  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2692  				continue
  2693  			}
  2694  			v.reset(OpARM64SUBconst)
  2695  			v.AuxInt = int64ToAuxInt(c)
  2696  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2697  			v0.AddArg2(a, m)
  2698  			v.AddArg(v0)
  2699  			return true
  2700  		}
  2701  		break
  2702  	}
  2703  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  2704  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  2705  	// result: (SUBconst [c] (ADD <v.Type> a m))
  2706  	for {
  2707  		t := v.Type
  2708  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2709  			a := v_0
  2710  			p := v_1
  2711  			if p.Op != OpARM64SUBconst {
  2712  				continue
  2713  			}
  2714  			c := auxIntToInt64(p.AuxInt)
  2715  			m := p.Args[0]
  2716  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  2717  				continue
  2718  			}
  2719  			v.reset(OpARM64SUBconst)
  2720  			v.AuxInt = int64ToAuxInt(c)
  2721  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  2722  			v0.AddArg2(a, m)
  2723  			v.AddArg(v0)
  2724  			return true
  2725  		}
  2726  		break
  2727  	}
  2728  	// match: (ADD x (NEG y))
  2729  	// result: (SUB x y)
  2730  	for {
  2731  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2732  			x := v_0
  2733  			if v_1.Op != OpARM64NEG {
  2734  				continue
  2735  			}
  2736  			y := v_1.Args[0]
  2737  			v.reset(OpARM64SUB)
  2738  			v.AddArg2(x, y)
  2739  			return true
  2740  		}
  2741  		break
  2742  	}
  2743  	// match: (ADD x0 x1:(SLLconst [c] y))
  2744  	// cond: clobberIfDead(x1)
  2745  	// result: (ADDshiftLL x0 y [c])
  2746  	for {
  2747  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2748  			x0 := v_0
  2749  			x1 := v_1
  2750  			if x1.Op != OpARM64SLLconst {
  2751  				continue
  2752  			}
  2753  			c := auxIntToInt64(x1.AuxInt)
  2754  			y := x1.Args[0]
  2755  			if !(clobberIfDead(x1)) {
  2756  				continue
  2757  			}
  2758  			v.reset(OpARM64ADDshiftLL)
  2759  			v.AuxInt = int64ToAuxInt(c)
  2760  			v.AddArg2(x0, y)
  2761  			return true
  2762  		}
  2763  		break
  2764  	}
  2765  	// match: (ADD x0 x1:(SRLconst [c] y))
  2766  	// cond: clobberIfDead(x1)
  2767  	// result: (ADDshiftRL x0 y [c])
  2768  	for {
  2769  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2770  			x0 := v_0
  2771  			x1 := v_1
  2772  			if x1.Op != OpARM64SRLconst {
  2773  				continue
  2774  			}
  2775  			c := auxIntToInt64(x1.AuxInt)
  2776  			y := x1.Args[0]
  2777  			if !(clobberIfDead(x1)) {
  2778  				continue
  2779  			}
  2780  			v.reset(OpARM64ADDshiftRL)
  2781  			v.AuxInt = int64ToAuxInt(c)
  2782  			v.AddArg2(x0, y)
  2783  			return true
  2784  		}
  2785  		break
  2786  	}
  2787  	// match: (ADD x0 x1:(SRAconst [c] y))
  2788  	// cond: clobberIfDead(x1)
  2789  	// result: (ADDshiftRA x0 y [c])
  2790  	for {
  2791  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2792  			x0 := v_0
  2793  			x1 := v_1
  2794  			if x1.Op != OpARM64SRAconst {
  2795  				continue
  2796  			}
  2797  			c := auxIntToInt64(x1.AuxInt)
  2798  			y := x1.Args[0]
  2799  			if !(clobberIfDead(x1)) {
  2800  				continue
  2801  			}
  2802  			v.reset(OpARM64ADDshiftRA)
  2803  			v.AuxInt = int64ToAuxInt(c)
  2804  			v.AddArg2(x0, y)
  2805  			return true
  2806  		}
  2807  		break
  2808  	}
  2809  	// match: (ADD x0 x1:(ANDshiftRA x2:(SLLconst [sl] y) z [63]))
  2810  	// cond: x1.Uses == 1 && x2.Uses == 1
  2811  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  2812  	for {
  2813  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2814  			x0 := v_0
  2815  			x1 := v_1
  2816  			if x1.Op != OpARM64ANDshiftRA || auxIntToInt64(x1.AuxInt) != 63 {
  2817  				continue
  2818  			}
  2819  			z := x1.Args[1]
  2820  			x2 := x1.Args[0]
  2821  			if x2.Op != OpARM64SLLconst {
  2822  				continue
  2823  			}
  2824  			sl := auxIntToInt64(x2.AuxInt)
  2825  			y := x2.Args[0]
  2826  			if !(x1.Uses == 1 && x2.Uses == 1) {
  2827  				continue
  2828  			}
  2829  			v.reset(OpARM64ADDshiftLL)
  2830  			v.AuxInt = int64ToAuxInt(sl)
  2831  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  2832  			v0.AuxInt = int64ToAuxInt(63)
  2833  			v0.AddArg2(y, z)
  2834  			v.AddArg2(x0, v0)
  2835  			return true
  2836  		}
  2837  		break
  2838  	}
  2839  	// match: (ADD x0 x1:(ANDshiftLL x2:(SRAconst [63] z) y [sl]))
  2840  	// cond: x1.Uses == 1 && x2.Uses == 1
  2841  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  2842  	for {
  2843  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2844  			x0 := v_0
  2845  			x1 := v_1
  2846  			if x1.Op != OpARM64ANDshiftLL {
  2847  				continue
  2848  			}
  2849  			sl := auxIntToInt64(x1.AuxInt)
  2850  			y := x1.Args[1]
  2851  			x2 := x1.Args[0]
  2852  			if x2.Op != OpARM64SRAconst || auxIntToInt64(x2.AuxInt) != 63 {
  2853  				continue
  2854  			}
  2855  			z := x2.Args[0]
  2856  			if !(x1.Uses == 1 && x2.Uses == 1) {
  2857  				continue
  2858  			}
  2859  			v.reset(OpARM64ADDshiftLL)
  2860  			v.AuxInt = int64ToAuxInt(sl)
  2861  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  2862  			v0.AuxInt = int64ToAuxInt(63)
  2863  			v0.AddArg2(y, z)
  2864  			v.AddArg2(x0, v0)
  2865  			return true
  2866  		}
  2867  		break
  2868  	}
  2869  	return false
  2870  }
  2871  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  2872  	v_1 := v.Args[1]
  2873  	v_0 := v.Args[0]
  2874  	// match: (ADDSflags x (MOVDconst [c]))
  2875  	// result: (ADDSconstflags [c] x)
  2876  	for {
  2877  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2878  			x := v_0
  2879  			if v_1.Op != OpARM64MOVDconst {
  2880  				continue
  2881  			}
  2882  			c := auxIntToInt64(v_1.AuxInt)
  2883  			v.reset(OpARM64ADDSconstflags)
  2884  			v.AuxInt = int64ToAuxInt(c)
  2885  			v.AddArg(x)
  2886  			return true
  2887  		}
  2888  		break
  2889  	}
  2890  	return false
  2891  }
  2892  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  2893  	v_0 := v.Args[0]
  2894  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  2895  	// cond: is32Bit(off1+int64(off2))
  2896  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  2897  	for {
  2898  		off1 := auxIntToInt64(v.AuxInt)
  2899  		if v_0.Op != OpARM64MOVDaddr {
  2900  			break
  2901  		}
  2902  		off2 := auxIntToInt32(v_0.AuxInt)
  2903  		sym := auxToSym(v_0.Aux)
  2904  		ptr := v_0.Args[0]
  2905  		if !(is32Bit(off1 + int64(off2))) {
  2906  			break
  2907  		}
  2908  		v.reset(OpARM64MOVDaddr)
  2909  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  2910  		v.Aux = symToAux(sym)
  2911  		v.AddArg(ptr)
  2912  		return true
  2913  	}
  2914  	// match: (ADDconst [c] y)
  2915  	// cond: c < 0
  2916  	// result: (SUBconst [-c] y)
  2917  	for {
  2918  		c := auxIntToInt64(v.AuxInt)
  2919  		y := v_0
  2920  		if !(c < 0) {
  2921  			break
  2922  		}
  2923  		v.reset(OpARM64SUBconst)
  2924  		v.AuxInt = int64ToAuxInt(-c)
  2925  		v.AddArg(y)
  2926  		return true
  2927  	}
  2928  	// match: (ADDconst [0] x)
  2929  	// result: x
  2930  	for {
  2931  		if auxIntToInt64(v.AuxInt) != 0 {
  2932  			break
  2933  		}
  2934  		x := v_0
  2935  		v.copyOf(x)
  2936  		return true
  2937  	}
  2938  	// match: (ADDconst [c] (MOVDconst [d]))
  2939  	// result: (MOVDconst [c+d])
  2940  	for {
  2941  		c := auxIntToInt64(v.AuxInt)
  2942  		if v_0.Op != OpARM64MOVDconst {
  2943  			break
  2944  		}
  2945  		d := auxIntToInt64(v_0.AuxInt)
  2946  		v.reset(OpARM64MOVDconst)
  2947  		v.AuxInt = int64ToAuxInt(c + d)
  2948  		return true
  2949  	}
  2950  	// match: (ADDconst [c] (ADDconst [d] x))
  2951  	// result: (ADDconst [c+d] x)
  2952  	for {
  2953  		c := auxIntToInt64(v.AuxInt)
  2954  		if v_0.Op != OpARM64ADDconst {
  2955  			break
  2956  		}
  2957  		d := auxIntToInt64(v_0.AuxInt)
  2958  		x := v_0.Args[0]
  2959  		v.reset(OpARM64ADDconst)
  2960  		v.AuxInt = int64ToAuxInt(c + d)
  2961  		v.AddArg(x)
  2962  		return true
  2963  	}
  2964  	// match: (ADDconst [c] (SUBconst [d] x))
  2965  	// result: (ADDconst [c-d] x)
  2966  	for {
  2967  		c := auxIntToInt64(v.AuxInt)
  2968  		if v_0.Op != OpARM64SUBconst {
  2969  			break
  2970  		}
  2971  		d := auxIntToInt64(v_0.AuxInt)
  2972  		x := v_0.Args[0]
  2973  		v.reset(OpARM64ADDconst)
  2974  		v.AuxInt = int64ToAuxInt(c - d)
  2975  		v.AddArg(x)
  2976  		return true
  2977  	}
  2978  	return false
  2979  }
  2980  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  2981  	v_1 := v.Args[1]
  2982  	v_0 := v.Args[0]
  2983  	b := v.Block
  2984  	typ := &b.Func.Config.Types
  2985  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  2986  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  2987  	for {
  2988  		d := auxIntToInt64(v.AuxInt)
  2989  		if v_0.Op != OpARM64MOVDconst {
  2990  			break
  2991  		}
  2992  		c := auxIntToInt64(v_0.AuxInt)
  2993  		x := v_1
  2994  		v.reset(OpARM64ADDconst)
  2995  		v.AuxInt = int64ToAuxInt(c)
  2996  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2997  		v0.AuxInt = int64ToAuxInt(d)
  2998  		v0.AddArg(x)
  2999  		v.AddArg(v0)
  3000  		return true
  3001  	}
  3002  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  3003  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  3004  	for {
  3005  		d := auxIntToInt64(v.AuxInt)
  3006  		x := v_0
  3007  		if v_1.Op != OpARM64MOVDconst {
  3008  			break
  3009  		}
  3010  		c := auxIntToInt64(v_1.AuxInt)
  3011  		v.reset(OpARM64ADDconst)
  3012  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3013  		v.AddArg(x)
  3014  		return true
  3015  	}
  3016  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  3017  	// result: (REV16W x)
  3018  	for {
  3019  		if v.Type != typ.UInt16 || auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || v_0.Type != typ.UInt16 || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 8) {
  3020  			break
  3021  		}
  3022  		x := v_0.Args[0]
  3023  		if x != v_1 {
  3024  			break
  3025  		}
  3026  		v.reset(OpARM64REV16W)
  3027  		v.AddArg(x)
  3028  		return true
  3029  	}
  3030  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  3031  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  3032  	// result: (REV16W x)
  3033  	for {
  3034  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  3035  			break
  3036  		}
  3037  		v_0_0 := v_0.Args[0]
  3038  		if v_0_0.Op != OpARM64ANDconst {
  3039  			break
  3040  		}
  3041  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3042  		x := v_0_0.Args[0]
  3043  		if v_1.Op != OpARM64ANDconst {
  3044  			break
  3045  		}
  3046  		c2 := auxIntToInt64(v_1.AuxInt)
  3047  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  3048  			break
  3049  		}
  3050  		v.reset(OpARM64REV16W)
  3051  		v.AddArg(x)
  3052  		return true
  3053  	}
  3054  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  3055  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  3056  	// result: (REV16 x)
  3057  	for {
  3058  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  3059  			break
  3060  		}
  3061  		v_0_0 := v_0.Args[0]
  3062  		if v_0_0.Op != OpARM64ANDconst {
  3063  			break
  3064  		}
  3065  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3066  		x := v_0_0.Args[0]
  3067  		if v_1.Op != OpARM64ANDconst {
  3068  			break
  3069  		}
  3070  		c2 := auxIntToInt64(v_1.AuxInt)
  3071  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  3072  			break
  3073  		}
  3074  		v.reset(OpARM64REV16)
  3075  		v.AddArg(x)
  3076  		return true
  3077  	}
  3078  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  3079  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  3080  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  3081  	for {
  3082  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  3083  			break
  3084  		}
  3085  		v_0_0 := v_0.Args[0]
  3086  		if v_0_0.Op != OpARM64ANDconst {
  3087  			break
  3088  		}
  3089  		c1 := auxIntToInt64(v_0_0.AuxInt)
  3090  		x := v_0_0.Args[0]
  3091  		if v_1.Op != OpARM64ANDconst {
  3092  			break
  3093  		}
  3094  		c2 := auxIntToInt64(v_1.AuxInt)
  3095  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  3096  			break
  3097  		}
  3098  		v.reset(OpARM64REV16)
  3099  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  3100  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  3101  		v0.AddArg(x)
  3102  		v.AddArg(v0)
  3103  		return true
  3104  	}
  3105  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  3106  	// result: (EXTRconst [64-c] x2 x)
  3107  	for {
  3108  		c := auxIntToInt64(v.AuxInt)
  3109  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  3110  			break
  3111  		}
  3112  		x := v_0.Args[0]
  3113  		x2 := v_1
  3114  		v.reset(OpARM64EXTRconst)
  3115  		v.AuxInt = int64ToAuxInt(64 - c)
  3116  		v.AddArg2(x2, x)
  3117  		return true
  3118  	}
  3119  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  3120  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  3121  	// result: (EXTRWconst [32-c] x2 x)
  3122  	for {
  3123  		t := v.Type
  3124  		c := auxIntToInt64(v.AuxInt)
  3125  		if v_0.Op != OpARM64UBFX {
  3126  			break
  3127  		}
  3128  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  3129  		x := v_0.Args[0]
  3130  		x2 := v_1
  3131  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  3132  			break
  3133  		}
  3134  		v.reset(OpARM64EXTRWconst)
  3135  		v.AuxInt = int64ToAuxInt(32 - c)
  3136  		v.AddArg2(x2, x)
  3137  		return true
  3138  	}
  3139  	return false
  3140  }
  3141  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  3142  	v_1 := v.Args[1]
  3143  	v_0 := v.Args[0]
  3144  	b := v.Block
  3145  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  3146  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  3147  	for {
  3148  		d := auxIntToInt64(v.AuxInt)
  3149  		if v_0.Op != OpARM64MOVDconst {
  3150  			break
  3151  		}
  3152  		c := auxIntToInt64(v_0.AuxInt)
  3153  		x := v_1
  3154  		v.reset(OpARM64ADDconst)
  3155  		v.AuxInt = int64ToAuxInt(c)
  3156  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3157  		v0.AuxInt = int64ToAuxInt(d)
  3158  		v0.AddArg(x)
  3159  		v.AddArg(v0)
  3160  		return true
  3161  	}
  3162  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  3163  	// result: (ADDconst x [c>>uint64(d)])
  3164  	for {
  3165  		d := auxIntToInt64(v.AuxInt)
  3166  		x := v_0
  3167  		if v_1.Op != OpARM64MOVDconst {
  3168  			break
  3169  		}
  3170  		c := auxIntToInt64(v_1.AuxInt)
  3171  		v.reset(OpARM64ADDconst)
  3172  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3173  		v.AddArg(x)
  3174  		return true
  3175  	}
  3176  	return false
  3177  }
  3178  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  3179  	v_1 := v.Args[1]
  3180  	v_0 := v.Args[0]
  3181  	b := v.Block
  3182  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  3183  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  3184  	for {
  3185  		d := auxIntToInt64(v.AuxInt)
  3186  		if v_0.Op != OpARM64MOVDconst {
  3187  			break
  3188  		}
  3189  		c := auxIntToInt64(v_0.AuxInt)
  3190  		x := v_1
  3191  		v.reset(OpARM64ADDconst)
  3192  		v.AuxInt = int64ToAuxInt(c)
  3193  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3194  		v0.AuxInt = int64ToAuxInt(d)
  3195  		v0.AddArg(x)
  3196  		v.AddArg(v0)
  3197  		return true
  3198  	}
  3199  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  3200  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  3201  	for {
  3202  		d := auxIntToInt64(v.AuxInt)
  3203  		x := v_0
  3204  		if v_1.Op != OpARM64MOVDconst {
  3205  			break
  3206  		}
  3207  		c := auxIntToInt64(v_1.AuxInt)
  3208  		v.reset(OpARM64ADDconst)
  3209  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3210  		v.AddArg(x)
  3211  		return true
  3212  	}
  3213  	return false
  3214  }
  3215  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  3216  	v_1 := v.Args[1]
  3217  	v_0 := v.Args[0]
  3218  	// match: (AND x (MOVDconst [c]))
  3219  	// result: (ANDconst [c] x)
  3220  	for {
  3221  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3222  			x := v_0
  3223  			if v_1.Op != OpARM64MOVDconst {
  3224  				continue
  3225  			}
  3226  			c := auxIntToInt64(v_1.AuxInt)
  3227  			v.reset(OpARM64ANDconst)
  3228  			v.AuxInt = int64ToAuxInt(c)
  3229  			v.AddArg(x)
  3230  			return true
  3231  		}
  3232  		break
  3233  	}
  3234  	// match: (AND x x)
  3235  	// result: x
  3236  	for {
  3237  		x := v_0
  3238  		if x != v_1 {
  3239  			break
  3240  		}
  3241  		v.copyOf(x)
  3242  		return true
  3243  	}
  3244  	// match: (AND x (MVN y))
  3245  	// result: (BIC x y)
  3246  	for {
  3247  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3248  			x := v_0
  3249  			if v_1.Op != OpARM64MVN {
  3250  				continue
  3251  			}
  3252  			y := v_1.Args[0]
  3253  			v.reset(OpARM64BIC)
  3254  			v.AddArg2(x, y)
  3255  			return true
  3256  		}
  3257  		break
  3258  	}
  3259  	// match: (AND x0 x1:(SLLconst [c] y))
  3260  	// cond: clobberIfDead(x1)
  3261  	// result: (ANDshiftLL x0 y [c])
  3262  	for {
  3263  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3264  			x0 := v_0
  3265  			x1 := v_1
  3266  			if x1.Op != OpARM64SLLconst {
  3267  				continue
  3268  			}
  3269  			c := auxIntToInt64(x1.AuxInt)
  3270  			y := x1.Args[0]
  3271  			if !(clobberIfDead(x1)) {
  3272  				continue
  3273  			}
  3274  			v.reset(OpARM64ANDshiftLL)
  3275  			v.AuxInt = int64ToAuxInt(c)
  3276  			v.AddArg2(x0, y)
  3277  			return true
  3278  		}
  3279  		break
  3280  	}
  3281  	// match: (AND x0 x1:(SRLconst [c] y))
  3282  	// cond: clobberIfDead(x1)
  3283  	// result: (ANDshiftRL x0 y [c])
  3284  	for {
  3285  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3286  			x0 := v_0
  3287  			x1 := v_1
  3288  			if x1.Op != OpARM64SRLconst {
  3289  				continue
  3290  			}
  3291  			c := auxIntToInt64(x1.AuxInt)
  3292  			y := x1.Args[0]
  3293  			if !(clobberIfDead(x1)) {
  3294  				continue
  3295  			}
  3296  			v.reset(OpARM64ANDshiftRL)
  3297  			v.AuxInt = int64ToAuxInt(c)
  3298  			v.AddArg2(x0, y)
  3299  			return true
  3300  		}
  3301  		break
  3302  	}
  3303  	// match: (AND x0 x1:(SRAconst [c] y))
  3304  	// cond: clobberIfDead(x1)
  3305  	// result: (ANDshiftRA x0 y [c])
  3306  	for {
  3307  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3308  			x0 := v_0
  3309  			x1 := v_1
  3310  			if x1.Op != OpARM64SRAconst {
  3311  				continue
  3312  			}
  3313  			c := auxIntToInt64(x1.AuxInt)
  3314  			y := x1.Args[0]
  3315  			if !(clobberIfDead(x1)) {
  3316  				continue
  3317  			}
  3318  			v.reset(OpARM64ANDshiftRA)
  3319  			v.AuxInt = int64ToAuxInt(c)
  3320  			v.AddArg2(x0, y)
  3321  			return true
  3322  		}
  3323  		break
  3324  	}
  3325  	// match: (AND x0 x1:(RORconst [c] y))
  3326  	// cond: clobberIfDead(x1)
  3327  	// result: (ANDshiftRO x0 y [c])
  3328  	for {
  3329  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3330  			x0 := v_0
  3331  			x1 := v_1
  3332  			if x1.Op != OpARM64RORconst {
  3333  				continue
  3334  			}
  3335  			c := auxIntToInt64(x1.AuxInt)
  3336  			y := x1.Args[0]
  3337  			if !(clobberIfDead(x1)) {
  3338  				continue
  3339  			}
  3340  			v.reset(OpARM64ANDshiftRO)
  3341  			v.AuxInt = int64ToAuxInt(c)
  3342  			v.AddArg2(x0, y)
  3343  			return true
  3344  		}
  3345  		break
  3346  	}
  3347  	return false
  3348  }
  3349  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  3350  	v_0 := v.Args[0]
  3351  	// match: (ANDconst [0] _)
  3352  	// result: (MOVDconst [0])
  3353  	for {
  3354  		if auxIntToInt64(v.AuxInt) != 0 {
  3355  			break
  3356  		}
  3357  		v.reset(OpARM64MOVDconst)
  3358  		v.AuxInt = int64ToAuxInt(0)
  3359  		return true
  3360  	}
  3361  	// match: (ANDconst [-1] x)
  3362  	// result: x
  3363  	for {
  3364  		if auxIntToInt64(v.AuxInt) != -1 {
  3365  			break
  3366  		}
  3367  		x := v_0
  3368  		v.copyOf(x)
  3369  		return true
  3370  	}
  3371  	// match: (ANDconst [c] (MOVDconst [d]))
  3372  	// result: (MOVDconst [c&d])
  3373  	for {
  3374  		c := auxIntToInt64(v.AuxInt)
  3375  		if v_0.Op != OpARM64MOVDconst {
  3376  			break
  3377  		}
  3378  		d := auxIntToInt64(v_0.AuxInt)
  3379  		v.reset(OpARM64MOVDconst)
  3380  		v.AuxInt = int64ToAuxInt(c & d)
  3381  		return true
  3382  	}
  3383  	// match: (ANDconst [c] (ANDconst [d] x))
  3384  	// result: (ANDconst [c&d] x)
  3385  	for {
  3386  		c := auxIntToInt64(v.AuxInt)
  3387  		if v_0.Op != OpARM64ANDconst {
  3388  			break
  3389  		}
  3390  		d := auxIntToInt64(v_0.AuxInt)
  3391  		x := v_0.Args[0]
  3392  		v.reset(OpARM64ANDconst)
  3393  		v.AuxInt = int64ToAuxInt(c & d)
  3394  		v.AddArg(x)
  3395  		return true
  3396  	}
  3397  	// match: (ANDconst [c] (MOVWUreg x))
  3398  	// result: (ANDconst [c&(1<<32-1)] x)
  3399  	for {
  3400  		c := auxIntToInt64(v.AuxInt)
  3401  		if v_0.Op != OpARM64MOVWUreg {
  3402  			break
  3403  		}
  3404  		x := v_0.Args[0]
  3405  		v.reset(OpARM64ANDconst)
  3406  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  3407  		v.AddArg(x)
  3408  		return true
  3409  	}
  3410  	// match: (ANDconst [c] (MOVHUreg x))
  3411  	// result: (ANDconst [c&(1<<16-1)] x)
  3412  	for {
  3413  		c := auxIntToInt64(v.AuxInt)
  3414  		if v_0.Op != OpARM64MOVHUreg {
  3415  			break
  3416  		}
  3417  		x := v_0.Args[0]
  3418  		v.reset(OpARM64ANDconst)
  3419  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  3420  		v.AddArg(x)
  3421  		return true
  3422  	}
  3423  	// match: (ANDconst [c] (MOVBUreg x))
  3424  	// result: (ANDconst [c&(1<<8-1)] x)
  3425  	for {
  3426  		c := auxIntToInt64(v.AuxInt)
  3427  		if v_0.Op != OpARM64MOVBUreg {
  3428  			break
  3429  		}
  3430  		x := v_0.Args[0]
  3431  		v.reset(OpARM64ANDconst)
  3432  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  3433  		v.AddArg(x)
  3434  		return true
  3435  	}
  3436  	// match: (ANDconst [ac] (SLLconst [sc] x))
  3437  	// cond: isARM64BFMask(sc, ac, sc)
  3438  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  3439  	for {
  3440  		ac := auxIntToInt64(v.AuxInt)
  3441  		if v_0.Op != OpARM64SLLconst {
  3442  			break
  3443  		}
  3444  		sc := auxIntToInt64(v_0.AuxInt)
  3445  		x := v_0.Args[0]
  3446  		if !(isARM64BFMask(sc, ac, sc)) {
  3447  			break
  3448  		}
  3449  		v.reset(OpARM64UBFIZ)
  3450  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  3451  		v.AddArg(x)
  3452  		return true
  3453  	}
  3454  	// match: (ANDconst [ac] (SRLconst [sc] x))
  3455  	// cond: isARM64BFMask(sc, ac, 0)
  3456  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  3457  	for {
  3458  		ac := auxIntToInt64(v.AuxInt)
  3459  		if v_0.Op != OpARM64SRLconst {
  3460  			break
  3461  		}
  3462  		sc := auxIntToInt64(v_0.AuxInt)
  3463  		x := v_0.Args[0]
  3464  		if !(isARM64BFMask(sc, ac, 0)) {
  3465  			break
  3466  		}
  3467  		v.reset(OpARM64UBFX)
  3468  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  3469  		v.AddArg(x)
  3470  		return true
  3471  	}
  3472  	// match: (ANDconst [c] (UBFX [bfc] x))
  3473  	// cond: isARM64BFMask(0, c, 0)
  3474  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  3475  	for {
  3476  		c := auxIntToInt64(v.AuxInt)
  3477  		if v_0.Op != OpARM64UBFX {
  3478  			break
  3479  		}
  3480  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  3481  		x := v_0.Args[0]
  3482  		if !(isARM64BFMask(0, c, 0)) {
  3483  			break
  3484  		}
  3485  		v.reset(OpARM64UBFX)
  3486  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  3487  		v.AddArg(x)
  3488  		return true
  3489  	}
  3490  	// match: (ANDconst [0xffffffff] x)
  3491  	// result: (MOVWUreg x)
  3492  	for {
  3493  		if auxIntToInt64(v.AuxInt) != 0xffffffff {
  3494  			break
  3495  		}
  3496  		x := v_0
  3497  		v.reset(OpARM64MOVWUreg)
  3498  		v.AddArg(x)
  3499  		return true
  3500  	}
  3501  	// match: (ANDconst [0xffff ] x)
  3502  	// result: (MOVHUreg x)
  3503  	for {
  3504  		if auxIntToInt64(v.AuxInt) != 0xffff {
  3505  			break
  3506  		}
  3507  		x := v_0
  3508  		v.reset(OpARM64MOVHUreg)
  3509  		v.AddArg(x)
  3510  		return true
  3511  	}
  3512  	// match: (ANDconst [0xff ] x)
  3513  	// result: (MOVBUreg x)
  3514  	for {
  3515  		if auxIntToInt64(v.AuxInt) != 0xff {
  3516  			break
  3517  		}
  3518  		x := v_0
  3519  		v.reset(OpARM64MOVBUreg)
  3520  		v.AddArg(x)
  3521  		return true
  3522  	}
  3523  	return false
  3524  }
  3525  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  3526  	v_1 := v.Args[1]
  3527  	v_0 := v.Args[0]
  3528  	b := v.Block
  3529  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  3530  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  3531  	for {
  3532  		d := auxIntToInt64(v.AuxInt)
  3533  		if v_0.Op != OpARM64MOVDconst {
  3534  			break
  3535  		}
  3536  		c := auxIntToInt64(v_0.AuxInt)
  3537  		x := v_1
  3538  		v.reset(OpARM64ANDconst)
  3539  		v.AuxInt = int64ToAuxInt(c)
  3540  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3541  		v0.AuxInt = int64ToAuxInt(d)
  3542  		v0.AddArg(x)
  3543  		v.AddArg(v0)
  3544  		return true
  3545  	}
  3546  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  3547  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  3548  	for {
  3549  		d := auxIntToInt64(v.AuxInt)
  3550  		x := v_0
  3551  		if v_1.Op != OpARM64MOVDconst {
  3552  			break
  3553  		}
  3554  		c := auxIntToInt64(v_1.AuxInt)
  3555  		v.reset(OpARM64ANDconst)
  3556  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3557  		v.AddArg(x)
  3558  		return true
  3559  	}
  3560  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  3561  	// result: y
  3562  	for {
  3563  		c := auxIntToInt64(v.AuxInt)
  3564  		y := v_0
  3565  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  3566  			break
  3567  		}
  3568  		x := y.Args[0]
  3569  		if x != v_1 {
  3570  			break
  3571  		}
  3572  		v.copyOf(y)
  3573  		return true
  3574  	}
  3575  	return false
  3576  }
  3577  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  3578  	v_1 := v.Args[1]
  3579  	v_0 := v.Args[0]
  3580  	b := v.Block
  3581  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  3582  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  3583  	for {
  3584  		d := auxIntToInt64(v.AuxInt)
  3585  		if v_0.Op != OpARM64MOVDconst {
  3586  			break
  3587  		}
  3588  		c := auxIntToInt64(v_0.AuxInt)
  3589  		x := v_1
  3590  		v.reset(OpARM64ANDconst)
  3591  		v.AuxInt = int64ToAuxInt(c)
  3592  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3593  		v0.AuxInt = int64ToAuxInt(d)
  3594  		v0.AddArg(x)
  3595  		v.AddArg(v0)
  3596  		return true
  3597  	}
  3598  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  3599  	// result: (ANDconst x [c>>uint64(d)])
  3600  	for {
  3601  		d := auxIntToInt64(v.AuxInt)
  3602  		x := v_0
  3603  		if v_1.Op != OpARM64MOVDconst {
  3604  			break
  3605  		}
  3606  		c := auxIntToInt64(v_1.AuxInt)
  3607  		v.reset(OpARM64ANDconst)
  3608  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3609  		v.AddArg(x)
  3610  		return true
  3611  	}
  3612  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  3613  	// result: y
  3614  	for {
  3615  		c := auxIntToInt64(v.AuxInt)
  3616  		y := v_0
  3617  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  3618  			break
  3619  		}
  3620  		x := y.Args[0]
  3621  		if x != v_1 {
  3622  			break
  3623  		}
  3624  		v.copyOf(y)
  3625  		return true
  3626  	}
  3627  	return false
  3628  }
  3629  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  3630  	v_1 := v.Args[1]
  3631  	v_0 := v.Args[0]
  3632  	b := v.Block
  3633  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  3634  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  3635  	for {
  3636  		d := auxIntToInt64(v.AuxInt)
  3637  		if v_0.Op != OpARM64MOVDconst {
  3638  			break
  3639  		}
  3640  		c := auxIntToInt64(v_0.AuxInt)
  3641  		x := v_1
  3642  		v.reset(OpARM64ANDconst)
  3643  		v.AuxInt = int64ToAuxInt(c)
  3644  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3645  		v0.AuxInt = int64ToAuxInt(d)
  3646  		v0.AddArg(x)
  3647  		v.AddArg(v0)
  3648  		return true
  3649  	}
  3650  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  3651  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  3652  	for {
  3653  		d := auxIntToInt64(v.AuxInt)
  3654  		x := v_0
  3655  		if v_1.Op != OpARM64MOVDconst {
  3656  			break
  3657  		}
  3658  		c := auxIntToInt64(v_1.AuxInt)
  3659  		v.reset(OpARM64ANDconst)
  3660  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3661  		v.AddArg(x)
  3662  		return true
  3663  	}
  3664  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  3665  	// result: y
  3666  	for {
  3667  		c := auxIntToInt64(v.AuxInt)
  3668  		y := v_0
  3669  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  3670  			break
  3671  		}
  3672  		x := y.Args[0]
  3673  		if x != v_1 {
  3674  			break
  3675  		}
  3676  		v.copyOf(y)
  3677  		return true
  3678  	}
  3679  	return false
  3680  }
  3681  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  3682  	v_1 := v.Args[1]
  3683  	v_0 := v.Args[0]
  3684  	b := v.Block
  3685  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  3686  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  3687  	for {
  3688  		d := auxIntToInt64(v.AuxInt)
  3689  		if v_0.Op != OpARM64MOVDconst {
  3690  			break
  3691  		}
  3692  		c := auxIntToInt64(v_0.AuxInt)
  3693  		x := v_1
  3694  		v.reset(OpARM64ANDconst)
  3695  		v.AuxInt = int64ToAuxInt(c)
  3696  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  3697  		v0.AuxInt = int64ToAuxInt(d)
  3698  		v0.AddArg(x)
  3699  		v.AddArg(v0)
  3700  		return true
  3701  	}
  3702  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  3703  	// result: (ANDconst x [rotateRight64(c, d)])
  3704  	for {
  3705  		d := auxIntToInt64(v.AuxInt)
  3706  		x := v_0
  3707  		if v_1.Op != OpARM64MOVDconst {
  3708  			break
  3709  		}
  3710  		c := auxIntToInt64(v_1.AuxInt)
  3711  		v.reset(OpARM64ANDconst)
  3712  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  3713  		v.AddArg(x)
  3714  		return true
  3715  	}
  3716  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  3717  	// result: y
  3718  	for {
  3719  		c := auxIntToInt64(v.AuxInt)
  3720  		y := v_0
  3721  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  3722  			break
  3723  		}
  3724  		x := y.Args[0]
  3725  		if x != v_1 {
  3726  			break
  3727  		}
  3728  		v.copyOf(y)
  3729  		return true
  3730  	}
  3731  	return false
  3732  }
  3733  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  3734  	v_1 := v.Args[1]
  3735  	v_0 := v.Args[0]
  3736  	// match: (BIC x (MOVDconst [c]))
  3737  	// result: (ANDconst [^c] x)
  3738  	for {
  3739  		x := v_0
  3740  		if v_1.Op != OpARM64MOVDconst {
  3741  			break
  3742  		}
  3743  		c := auxIntToInt64(v_1.AuxInt)
  3744  		v.reset(OpARM64ANDconst)
  3745  		v.AuxInt = int64ToAuxInt(^c)
  3746  		v.AddArg(x)
  3747  		return true
  3748  	}
  3749  	// match: (BIC x x)
  3750  	// result: (MOVDconst [0])
  3751  	for {
  3752  		x := v_0
  3753  		if x != v_1 {
  3754  			break
  3755  		}
  3756  		v.reset(OpARM64MOVDconst)
  3757  		v.AuxInt = int64ToAuxInt(0)
  3758  		return true
  3759  	}
  3760  	// match: (BIC x0 x1:(SLLconst [c] y))
  3761  	// cond: clobberIfDead(x1)
  3762  	// result: (BICshiftLL x0 y [c])
  3763  	for {
  3764  		x0 := v_0
  3765  		x1 := v_1
  3766  		if x1.Op != OpARM64SLLconst {
  3767  			break
  3768  		}
  3769  		c := auxIntToInt64(x1.AuxInt)
  3770  		y := x1.Args[0]
  3771  		if !(clobberIfDead(x1)) {
  3772  			break
  3773  		}
  3774  		v.reset(OpARM64BICshiftLL)
  3775  		v.AuxInt = int64ToAuxInt(c)
  3776  		v.AddArg2(x0, y)
  3777  		return true
  3778  	}
  3779  	// match: (BIC x0 x1:(SRLconst [c] y))
  3780  	// cond: clobberIfDead(x1)
  3781  	// result: (BICshiftRL x0 y [c])
  3782  	for {
  3783  		x0 := v_0
  3784  		x1 := v_1
  3785  		if x1.Op != OpARM64SRLconst {
  3786  			break
  3787  		}
  3788  		c := auxIntToInt64(x1.AuxInt)
  3789  		y := x1.Args[0]
  3790  		if !(clobberIfDead(x1)) {
  3791  			break
  3792  		}
  3793  		v.reset(OpARM64BICshiftRL)
  3794  		v.AuxInt = int64ToAuxInt(c)
  3795  		v.AddArg2(x0, y)
  3796  		return true
  3797  	}
  3798  	// match: (BIC x0 x1:(SRAconst [c] y))
  3799  	// cond: clobberIfDead(x1)
  3800  	// result: (BICshiftRA x0 y [c])
  3801  	for {
  3802  		x0 := v_0
  3803  		x1 := v_1
  3804  		if x1.Op != OpARM64SRAconst {
  3805  			break
  3806  		}
  3807  		c := auxIntToInt64(x1.AuxInt)
  3808  		y := x1.Args[0]
  3809  		if !(clobberIfDead(x1)) {
  3810  			break
  3811  		}
  3812  		v.reset(OpARM64BICshiftRA)
  3813  		v.AuxInt = int64ToAuxInt(c)
  3814  		v.AddArg2(x0, y)
  3815  		return true
  3816  	}
  3817  	// match: (BIC x0 x1:(RORconst [c] y))
  3818  	// cond: clobberIfDead(x1)
  3819  	// result: (BICshiftRO x0 y [c])
  3820  	for {
  3821  		x0 := v_0
  3822  		x1 := v_1
  3823  		if x1.Op != OpARM64RORconst {
  3824  			break
  3825  		}
  3826  		c := auxIntToInt64(x1.AuxInt)
  3827  		y := x1.Args[0]
  3828  		if !(clobberIfDead(x1)) {
  3829  			break
  3830  		}
  3831  		v.reset(OpARM64BICshiftRO)
  3832  		v.AuxInt = int64ToAuxInt(c)
  3833  		v.AddArg2(x0, y)
  3834  		return true
  3835  	}
  3836  	return false
  3837  }
  3838  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  3839  	v_1 := v.Args[1]
  3840  	v_0 := v.Args[0]
  3841  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  3842  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  3843  	for {
  3844  		d := auxIntToInt64(v.AuxInt)
  3845  		x := v_0
  3846  		if v_1.Op != OpARM64MOVDconst {
  3847  			break
  3848  		}
  3849  		c := auxIntToInt64(v_1.AuxInt)
  3850  		v.reset(OpARM64ANDconst)
  3851  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  3852  		v.AddArg(x)
  3853  		return true
  3854  	}
  3855  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  3856  	// result: (MOVDconst [0])
  3857  	for {
  3858  		c := auxIntToInt64(v.AuxInt)
  3859  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  3860  			break
  3861  		}
  3862  		x := v_0.Args[0]
  3863  		if x != v_1 {
  3864  			break
  3865  		}
  3866  		v.reset(OpARM64MOVDconst)
  3867  		v.AuxInt = int64ToAuxInt(0)
  3868  		return true
  3869  	}
  3870  	return false
  3871  }
  3872  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  3873  	v_1 := v.Args[1]
  3874  	v_0 := v.Args[0]
  3875  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  3876  	// result: (ANDconst x [^(c>>uint64(d))])
  3877  	for {
  3878  		d := auxIntToInt64(v.AuxInt)
  3879  		x := v_0
  3880  		if v_1.Op != OpARM64MOVDconst {
  3881  			break
  3882  		}
  3883  		c := auxIntToInt64(v_1.AuxInt)
  3884  		v.reset(OpARM64ANDconst)
  3885  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  3886  		v.AddArg(x)
  3887  		return true
  3888  	}
  3889  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  3890  	// result: (MOVDconst [0])
  3891  	for {
  3892  		c := auxIntToInt64(v.AuxInt)
  3893  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  3894  			break
  3895  		}
  3896  		x := v_0.Args[0]
  3897  		if x != v_1 {
  3898  			break
  3899  		}
  3900  		v.reset(OpARM64MOVDconst)
  3901  		v.AuxInt = int64ToAuxInt(0)
  3902  		return true
  3903  	}
  3904  	return false
  3905  }
  3906  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  3907  	v_1 := v.Args[1]
  3908  	v_0 := v.Args[0]
  3909  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  3910  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  3911  	for {
  3912  		d := auxIntToInt64(v.AuxInt)
  3913  		x := v_0
  3914  		if v_1.Op != OpARM64MOVDconst {
  3915  			break
  3916  		}
  3917  		c := auxIntToInt64(v_1.AuxInt)
  3918  		v.reset(OpARM64ANDconst)
  3919  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  3920  		v.AddArg(x)
  3921  		return true
  3922  	}
  3923  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  3924  	// result: (MOVDconst [0])
  3925  	for {
  3926  		c := auxIntToInt64(v.AuxInt)
  3927  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  3928  			break
  3929  		}
  3930  		x := v_0.Args[0]
  3931  		if x != v_1 {
  3932  			break
  3933  		}
  3934  		v.reset(OpARM64MOVDconst)
  3935  		v.AuxInt = int64ToAuxInt(0)
  3936  		return true
  3937  	}
  3938  	return false
  3939  }
  3940  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  3941  	v_1 := v.Args[1]
  3942  	v_0 := v.Args[0]
  3943  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  3944  	// result: (ANDconst x [^rotateRight64(c, d)])
  3945  	for {
  3946  		d := auxIntToInt64(v.AuxInt)
  3947  		x := v_0
  3948  		if v_1.Op != OpARM64MOVDconst {
  3949  			break
  3950  		}
  3951  		c := auxIntToInt64(v_1.AuxInt)
  3952  		v.reset(OpARM64ANDconst)
  3953  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  3954  		v.AddArg(x)
  3955  		return true
  3956  	}
  3957  	// match: (BICshiftRO (RORconst x [c]) x [c])
  3958  	// result: (MOVDconst [0])
  3959  	for {
  3960  		c := auxIntToInt64(v.AuxInt)
  3961  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  3962  			break
  3963  		}
  3964  		x := v_0.Args[0]
  3965  		if x != v_1 {
  3966  			break
  3967  		}
  3968  		v.reset(OpARM64MOVDconst)
  3969  		v.AuxInt = int64ToAuxInt(0)
  3970  		return true
  3971  	}
  3972  	return false
  3973  }
  3974  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  3975  	v_1 := v.Args[1]
  3976  	v_0 := v.Args[0]
  3977  	// match: (CMN x (MOVDconst [c]))
  3978  	// result: (CMNconst [c] x)
  3979  	for {
  3980  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3981  			x := v_0
  3982  			if v_1.Op != OpARM64MOVDconst {
  3983  				continue
  3984  			}
  3985  			c := auxIntToInt64(v_1.AuxInt)
  3986  			v.reset(OpARM64CMNconst)
  3987  			v.AuxInt = int64ToAuxInt(c)
  3988  			v.AddArg(x)
  3989  			return true
  3990  		}
  3991  		break
  3992  	}
  3993  	// match: (CMN x0 x1:(SLLconst [c] y))
  3994  	// cond: clobberIfDead(x1)
  3995  	// result: (CMNshiftLL x0 y [c])
  3996  	for {
  3997  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3998  			x0 := v_0
  3999  			x1 := v_1
  4000  			if x1.Op != OpARM64SLLconst {
  4001  				continue
  4002  			}
  4003  			c := auxIntToInt64(x1.AuxInt)
  4004  			y := x1.Args[0]
  4005  			if !(clobberIfDead(x1)) {
  4006  				continue
  4007  			}
  4008  			v.reset(OpARM64CMNshiftLL)
  4009  			v.AuxInt = int64ToAuxInt(c)
  4010  			v.AddArg2(x0, y)
  4011  			return true
  4012  		}
  4013  		break
  4014  	}
  4015  	// match: (CMN x0 x1:(SRLconst [c] y))
  4016  	// cond: clobberIfDead(x1)
  4017  	// result: (CMNshiftRL x0 y [c])
  4018  	for {
  4019  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4020  			x0 := v_0
  4021  			x1 := v_1
  4022  			if x1.Op != OpARM64SRLconst {
  4023  				continue
  4024  			}
  4025  			c := auxIntToInt64(x1.AuxInt)
  4026  			y := x1.Args[0]
  4027  			if !(clobberIfDead(x1)) {
  4028  				continue
  4029  			}
  4030  			v.reset(OpARM64CMNshiftRL)
  4031  			v.AuxInt = int64ToAuxInt(c)
  4032  			v.AddArg2(x0, y)
  4033  			return true
  4034  		}
  4035  		break
  4036  	}
  4037  	// match: (CMN x0 x1:(SRAconst [c] y))
  4038  	// cond: clobberIfDead(x1)
  4039  	// result: (CMNshiftRA x0 y [c])
  4040  	for {
  4041  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4042  			x0 := v_0
  4043  			x1 := v_1
  4044  			if x1.Op != OpARM64SRAconst {
  4045  				continue
  4046  			}
  4047  			c := auxIntToInt64(x1.AuxInt)
  4048  			y := x1.Args[0]
  4049  			if !(clobberIfDead(x1)) {
  4050  				continue
  4051  			}
  4052  			v.reset(OpARM64CMNshiftRA)
  4053  			v.AuxInt = int64ToAuxInt(c)
  4054  			v.AddArg2(x0, y)
  4055  			return true
  4056  		}
  4057  		break
  4058  	}
  4059  	return false
  4060  }
  4061  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  4062  	v_1 := v.Args[1]
  4063  	v_0 := v.Args[0]
  4064  	// match: (CMNW x (MOVDconst [c]))
  4065  	// result: (CMNWconst [int32(c)] x)
  4066  	for {
  4067  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4068  			x := v_0
  4069  			if v_1.Op != OpARM64MOVDconst {
  4070  				continue
  4071  			}
  4072  			c := auxIntToInt64(v_1.AuxInt)
  4073  			v.reset(OpARM64CMNWconst)
  4074  			v.AuxInt = int32ToAuxInt(int32(c))
  4075  			v.AddArg(x)
  4076  			return true
  4077  		}
  4078  		break
  4079  	}
  4080  	return false
  4081  }
  4082  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  4083  	v_0 := v.Args[0]
  4084  	// match: (CMNWconst [c] y)
  4085  	// cond: c < 0 && c != -1<<31
  4086  	// result: (CMPWconst [-c] y)
  4087  	for {
  4088  		c := auxIntToInt32(v.AuxInt)
  4089  		y := v_0
  4090  		if !(c < 0 && c != -1<<31) {
  4091  			break
  4092  		}
  4093  		v.reset(OpARM64CMPWconst)
  4094  		v.AuxInt = int32ToAuxInt(-c)
  4095  		v.AddArg(y)
  4096  		return true
  4097  	}
  4098  	// match: (CMNWconst (MOVDconst [x]) [y])
  4099  	// result: (FlagConstant [addFlags32(int32(x),y)])
  4100  	for {
  4101  		y := auxIntToInt32(v.AuxInt)
  4102  		if v_0.Op != OpARM64MOVDconst {
  4103  			break
  4104  		}
  4105  		x := auxIntToInt64(v_0.AuxInt)
  4106  		v.reset(OpARM64FlagConstant)
  4107  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  4108  		return true
  4109  	}
  4110  	return false
  4111  }
  4112  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  4113  	v_0 := v.Args[0]
  4114  	// match: (CMNconst [c] y)
  4115  	// cond: c < 0 && c != -1<<63
  4116  	// result: (CMPconst [-c] y)
  4117  	for {
  4118  		c := auxIntToInt64(v.AuxInt)
  4119  		y := v_0
  4120  		if !(c < 0 && c != -1<<63) {
  4121  			break
  4122  		}
  4123  		v.reset(OpARM64CMPconst)
  4124  		v.AuxInt = int64ToAuxInt(-c)
  4125  		v.AddArg(y)
  4126  		return true
  4127  	}
  4128  	// match: (CMNconst (MOVDconst [x]) [y])
  4129  	// result: (FlagConstant [addFlags64(x,y)])
  4130  	for {
  4131  		y := auxIntToInt64(v.AuxInt)
  4132  		if v_0.Op != OpARM64MOVDconst {
  4133  			break
  4134  		}
  4135  		x := auxIntToInt64(v_0.AuxInt)
  4136  		v.reset(OpARM64FlagConstant)
  4137  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  4138  		return true
  4139  	}
  4140  	return false
  4141  }
  4142  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  4143  	v_1 := v.Args[1]
  4144  	v_0 := v.Args[0]
  4145  	b := v.Block
  4146  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  4147  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  4148  	for {
  4149  		d := auxIntToInt64(v.AuxInt)
  4150  		if v_0.Op != OpARM64MOVDconst {
  4151  			break
  4152  		}
  4153  		c := auxIntToInt64(v_0.AuxInt)
  4154  		x := v_1
  4155  		v.reset(OpARM64CMNconst)
  4156  		v.AuxInt = int64ToAuxInt(c)
  4157  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  4158  		v0.AuxInt = int64ToAuxInt(d)
  4159  		v0.AddArg(x)
  4160  		v.AddArg(v0)
  4161  		return true
  4162  	}
  4163  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  4164  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  4165  	for {
  4166  		d := auxIntToInt64(v.AuxInt)
  4167  		x := v_0
  4168  		if v_1.Op != OpARM64MOVDconst {
  4169  			break
  4170  		}
  4171  		c := auxIntToInt64(v_1.AuxInt)
  4172  		v.reset(OpARM64CMNconst)
  4173  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  4174  		v.AddArg(x)
  4175  		return true
  4176  	}
  4177  	return false
  4178  }
  4179  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  4180  	v_1 := v.Args[1]
  4181  	v_0 := v.Args[0]
  4182  	b := v.Block
  4183  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  4184  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  4185  	for {
  4186  		d := auxIntToInt64(v.AuxInt)
  4187  		if v_0.Op != OpARM64MOVDconst {
  4188  			break
  4189  		}
  4190  		c := auxIntToInt64(v_0.AuxInt)
  4191  		x := v_1
  4192  		v.reset(OpARM64CMNconst)
  4193  		v.AuxInt = int64ToAuxInt(c)
  4194  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  4195  		v0.AuxInt = int64ToAuxInt(d)
  4196  		v0.AddArg(x)
  4197  		v.AddArg(v0)
  4198  		return true
  4199  	}
  4200  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  4201  	// result: (CMNconst x [c>>uint64(d)])
  4202  	for {
  4203  		d := auxIntToInt64(v.AuxInt)
  4204  		x := v_0
  4205  		if v_1.Op != OpARM64MOVDconst {
  4206  			break
  4207  		}
  4208  		c := auxIntToInt64(v_1.AuxInt)
  4209  		v.reset(OpARM64CMNconst)
  4210  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  4211  		v.AddArg(x)
  4212  		return true
  4213  	}
  4214  	return false
  4215  }
  4216  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  4217  	v_1 := v.Args[1]
  4218  	v_0 := v.Args[0]
  4219  	b := v.Block
  4220  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  4221  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  4222  	for {
  4223  		d := auxIntToInt64(v.AuxInt)
  4224  		if v_0.Op != OpARM64MOVDconst {
  4225  			break
  4226  		}
  4227  		c := auxIntToInt64(v_0.AuxInt)
  4228  		x := v_1
  4229  		v.reset(OpARM64CMNconst)
  4230  		v.AuxInt = int64ToAuxInt(c)
  4231  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  4232  		v0.AuxInt = int64ToAuxInt(d)
  4233  		v0.AddArg(x)
  4234  		v.AddArg(v0)
  4235  		return true
  4236  	}
  4237  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  4238  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  4239  	for {
  4240  		d := auxIntToInt64(v.AuxInt)
  4241  		x := v_0
  4242  		if v_1.Op != OpARM64MOVDconst {
  4243  			break
  4244  		}
  4245  		c := auxIntToInt64(v_1.AuxInt)
  4246  		v.reset(OpARM64CMNconst)
  4247  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  4248  		v.AddArg(x)
  4249  		return true
  4250  	}
  4251  	return false
  4252  }
  4253  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  4254  	v_1 := v.Args[1]
  4255  	v_0 := v.Args[0]
  4256  	b := v.Block
  4257  	// match: (CMP x (MOVDconst [c]))
  4258  	// result: (CMPconst [c] x)
  4259  	for {
  4260  		x := v_0
  4261  		if v_1.Op != OpARM64MOVDconst {
  4262  			break
  4263  		}
  4264  		c := auxIntToInt64(v_1.AuxInt)
  4265  		v.reset(OpARM64CMPconst)
  4266  		v.AuxInt = int64ToAuxInt(c)
  4267  		v.AddArg(x)
  4268  		return true
  4269  	}
  4270  	// match: (CMP (MOVDconst [c]) x)
  4271  	// result: (InvertFlags (CMPconst [c] x))
  4272  	for {
  4273  		if v_0.Op != OpARM64MOVDconst {
  4274  			break
  4275  		}
  4276  		c := auxIntToInt64(v_0.AuxInt)
  4277  		x := v_1
  4278  		v.reset(OpARM64InvertFlags)
  4279  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4280  		v0.AuxInt = int64ToAuxInt(c)
  4281  		v0.AddArg(x)
  4282  		v.AddArg(v0)
  4283  		return true
  4284  	}
  4285  	// match: (CMP x y)
  4286  	// cond: canonLessThan(x,y)
  4287  	// result: (InvertFlags (CMP y x))
  4288  	for {
  4289  		x := v_0
  4290  		y := v_1
  4291  		if !(canonLessThan(x, y)) {
  4292  			break
  4293  		}
  4294  		v.reset(OpARM64InvertFlags)
  4295  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4296  		v0.AddArg2(y, x)
  4297  		v.AddArg(v0)
  4298  		return true
  4299  	}
  4300  	// match: (CMP x0 x1:(SLLconst [c] y))
  4301  	// cond: clobberIfDead(x1)
  4302  	// result: (CMPshiftLL x0 y [c])
  4303  	for {
  4304  		x0 := v_0
  4305  		x1 := v_1
  4306  		if x1.Op != OpARM64SLLconst {
  4307  			break
  4308  		}
  4309  		c := auxIntToInt64(x1.AuxInt)
  4310  		y := x1.Args[0]
  4311  		if !(clobberIfDead(x1)) {
  4312  			break
  4313  		}
  4314  		v.reset(OpARM64CMPshiftLL)
  4315  		v.AuxInt = int64ToAuxInt(c)
  4316  		v.AddArg2(x0, y)
  4317  		return true
  4318  	}
  4319  	// match: (CMP x0:(SLLconst [c] y) x1)
  4320  	// cond: clobberIfDead(x0)
  4321  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  4322  	for {
  4323  		x0 := v_0
  4324  		if x0.Op != OpARM64SLLconst {
  4325  			break
  4326  		}
  4327  		c := auxIntToInt64(x0.AuxInt)
  4328  		y := x0.Args[0]
  4329  		x1 := v_1
  4330  		if !(clobberIfDead(x0)) {
  4331  			break
  4332  		}
  4333  		v.reset(OpARM64InvertFlags)
  4334  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  4335  		v0.AuxInt = int64ToAuxInt(c)
  4336  		v0.AddArg2(x1, y)
  4337  		v.AddArg(v0)
  4338  		return true
  4339  	}
  4340  	// match: (CMP x0 x1:(SRLconst [c] y))
  4341  	// cond: clobberIfDead(x1)
  4342  	// result: (CMPshiftRL x0 y [c])
  4343  	for {
  4344  		x0 := v_0
  4345  		x1 := v_1
  4346  		if x1.Op != OpARM64SRLconst {
  4347  			break
  4348  		}
  4349  		c := auxIntToInt64(x1.AuxInt)
  4350  		y := x1.Args[0]
  4351  		if !(clobberIfDead(x1)) {
  4352  			break
  4353  		}
  4354  		v.reset(OpARM64CMPshiftRL)
  4355  		v.AuxInt = int64ToAuxInt(c)
  4356  		v.AddArg2(x0, y)
  4357  		return true
  4358  	}
  4359  	// match: (CMP x0:(SRLconst [c] y) x1)
  4360  	// cond: clobberIfDead(x0)
  4361  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  4362  	for {
  4363  		x0 := v_0
  4364  		if x0.Op != OpARM64SRLconst {
  4365  			break
  4366  		}
  4367  		c := auxIntToInt64(x0.AuxInt)
  4368  		y := x0.Args[0]
  4369  		x1 := v_1
  4370  		if !(clobberIfDead(x0)) {
  4371  			break
  4372  		}
  4373  		v.reset(OpARM64InvertFlags)
  4374  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  4375  		v0.AuxInt = int64ToAuxInt(c)
  4376  		v0.AddArg2(x1, y)
  4377  		v.AddArg(v0)
  4378  		return true
  4379  	}
  4380  	// match: (CMP x0 x1:(SRAconst [c] y))
  4381  	// cond: clobberIfDead(x1)
  4382  	// result: (CMPshiftRA x0 y [c])
  4383  	for {
  4384  		x0 := v_0
  4385  		x1 := v_1
  4386  		if x1.Op != OpARM64SRAconst {
  4387  			break
  4388  		}
  4389  		c := auxIntToInt64(x1.AuxInt)
  4390  		y := x1.Args[0]
  4391  		if !(clobberIfDead(x1)) {
  4392  			break
  4393  		}
  4394  		v.reset(OpARM64CMPshiftRA)
  4395  		v.AuxInt = int64ToAuxInt(c)
  4396  		v.AddArg2(x0, y)
  4397  		return true
  4398  	}
  4399  	// match: (CMP x0:(SRAconst [c] y) x1)
  4400  	// cond: clobberIfDead(x0)
  4401  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  4402  	for {
  4403  		x0 := v_0
  4404  		if x0.Op != OpARM64SRAconst {
  4405  			break
  4406  		}
  4407  		c := auxIntToInt64(x0.AuxInt)
  4408  		y := x0.Args[0]
  4409  		x1 := v_1
  4410  		if !(clobberIfDead(x0)) {
  4411  			break
  4412  		}
  4413  		v.reset(OpARM64InvertFlags)
  4414  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  4415  		v0.AuxInt = int64ToAuxInt(c)
  4416  		v0.AddArg2(x1, y)
  4417  		v.AddArg(v0)
  4418  		return true
  4419  	}
  4420  	return false
  4421  }
  4422  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  4423  	v_1 := v.Args[1]
  4424  	v_0 := v.Args[0]
  4425  	b := v.Block
  4426  	// match: (CMPW x (MOVDconst [c]))
  4427  	// result: (CMPWconst [int32(c)] x)
  4428  	for {
  4429  		x := v_0
  4430  		if v_1.Op != OpARM64MOVDconst {
  4431  			break
  4432  		}
  4433  		c := auxIntToInt64(v_1.AuxInt)
  4434  		v.reset(OpARM64CMPWconst)
  4435  		v.AuxInt = int32ToAuxInt(int32(c))
  4436  		v.AddArg(x)
  4437  		return true
  4438  	}
  4439  	// match: (CMPW (MOVDconst [c]) x)
  4440  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  4441  	for {
  4442  		if v_0.Op != OpARM64MOVDconst {
  4443  			break
  4444  		}
  4445  		c := auxIntToInt64(v_0.AuxInt)
  4446  		x := v_1
  4447  		v.reset(OpARM64InvertFlags)
  4448  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  4449  		v0.AuxInt = int32ToAuxInt(int32(c))
  4450  		v0.AddArg(x)
  4451  		v.AddArg(v0)
  4452  		return true
  4453  	}
  4454  	// match: (CMPW x y)
  4455  	// cond: canonLessThan(x,y)
  4456  	// result: (InvertFlags (CMPW y x))
  4457  	for {
  4458  		x := v_0
  4459  		y := v_1
  4460  		if !(canonLessThan(x, y)) {
  4461  			break
  4462  		}
  4463  		v.reset(OpARM64InvertFlags)
  4464  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4465  		v0.AddArg2(y, x)
  4466  		v.AddArg(v0)
  4467  		return true
  4468  	}
  4469  	return false
  4470  }
  4471  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  4472  	v_0 := v.Args[0]
  4473  	// match: (CMPWconst [c] y)
  4474  	// cond: c < 0 && c != -1<<31
  4475  	// result: (CMNWconst [-c] y)
  4476  	for {
  4477  		c := auxIntToInt32(v.AuxInt)
  4478  		y := v_0
  4479  		if !(c < 0 && c != -1<<31) {
  4480  			break
  4481  		}
  4482  		v.reset(OpARM64CMNWconst)
  4483  		v.AuxInt = int32ToAuxInt(-c)
  4484  		v.AddArg(y)
  4485  		return true
  4486  	}
  4487  	// match: (CMPWconst (MOVDconst [x]) [y])
  4488  	// result: (FlagConstant [subFlags32(int32(x),y)])
  4489  	for {
  4490  		y := auxIntToInt32(v.AuxInt)
  4491  		if v_0.Op != OpARM64MOVDconst {
  4492  			break
  4493  		}
  4494  		x := auxIntToInt64(v_0.AuxInt)
  4495  		v.reset(OpARM64FlagConstant)
  4496  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  4497  		return true
  4498  	}
  4499  	// match: (CMPWconst (MOVBUreg _) [c])
  4500  	// cond: 0xff < c
  4501  	// result: (FlagConstant [subFlags64(0,1)])
  4502  	for {
  4503  		c := auxIntToInt32(v.AuxInt)
  4504  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  4505  			break
  4506  		}
  4507  		v.reset(OpARM64FlagConstant)
  4508  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4509  		return true
  4510  	}
  4511  	// match: (CMPWconst (MOVHUreg _) [c])
  4512  	// cond: 0xffff < c
  4513  	// result: (FlagConstant [subFlags64(0,1)])
  4514  	for {
  4515  		c := auxIntToInt32(v.AuxInt)
  4516  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  4517  			break
  4518  		}
  4519  		v.reset(OpARM64FlagConstant)
  4520  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4521  		return true
  4522  	}
  4523  	return false
  4524  }
  4525  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  4526  	v_0 := v.Args[0]
  4527  	// match: (CMPconst [c] y)
  4528  	// cond: c < 0 && c != -1<<63
  4529  	// result: (CMNconst [-c] y)
  4530  	for {
  4531  		c := auxIntToInt64(v.AuxInt)
  4532  		y := v_0
  4533  		if !(c < 0 && c != -1<<63) {
  4534  			break
  4535  		}
  4536  		v.reset(OpARM64CMNconst)
  4537  		v.AuxInt = int64ToAuxInt(-c)
  4538  		v.AddArg(y)
  4539  		return true
  4540  	}
  4541  	// match: (CMPconst (MOVDconst [x]) [y])
  4542  	// result: (FlagConstant [subFlags64(x,y)])
  4543  	for {
  4544  		y := auxIntToInt64(v.AuxInt)
  4545  		if v_0.Op != OpARM64MOVDconst {
  4546  			break
  4547  		}
  4548  		x := auxIntToInt64(v_0.AuxInt)
  4549  		v.reset(OpARM64FlagConstant)
  4550  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  4551  		return true
  4552  	}
  4553  	// match: (CMPconst (MOVBUreg _) [c])
  4554  	// cond: 0xff < c
  4555  	// result: (FlagConstant [subFlags64(0,1)])
  4556  	for {
  4557  		c := auxIntToInt64(v.AuxInt)
  4558  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  4559  			break
  4560  		}
  4561  		v.reset(OpARM64FlagConstant)
  4562  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4563  		return true
  4564  	}
  4565  	// match: (CMPconst (MOVHUreg _) [c])
  4566  	// cond: 0xffff < c
  4567  	// result: (FlagConstant [subFlags64(0,1)])
  4568  	for {
  4569  		c := auxIntToInt64(v.AuxInt)
  4570  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  4571  			break
  4572  		}
  4573  		v.reset(OpARM64FlagConstant)
  4574  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4575  		return true
  4576  	}
  4577  	// match: (CMPconst (MOVWUreg _) [c])
  4578  	// cond: 0xffffffff < c
  4579  	// result: (FlagConstant [subFlags64(0,1)])
  4580  	for {
  4581  		c := auxIntToInt64(v.AuxInt)
  4582  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  4583  			break
  4584  		}
  4585  		v.reset(OpARM64FlagConstant)
  4586  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4587  		return true
  4588  	}
  4589  	// match: (CMPconst (ANDconst _ [m]) [n])
  4590  	// cond: 0 <= m && m < n
  4591  	// result: (FlagConstant [subFlags64(0,1)])
  4592  	for {
  4593  		n := auxIntToInt64(v.AuxInt)
  4594  		if v_0.Op != OpARM64ANDconst {
  4595  			break
  4596  		}
  4597  		m := auxIntToInt64(v_0.AuxInt)
  4598  		if !(0 <= m && m < n) {
  4599  			break
  4600  		}
  4601  		v.reset(OpARM64FlagConstant)
  4602  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4603  		return true
  4604  	}
  4605  	// match: (CMPconst (SRLconst _ [c]) [n])
  4606  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  4607  	// result: (FlagConstant [subFlags64(0,1)])
  4608  	for {
  4609  		n := auxIntToInt64(v.AuxInt)
  4610  		if v_0.Op != OpARM64SRLconst {
  4611  			break
  4612  		}
  4613  		c := auxIntToInt64(v_0.AuxInt)
  4614  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  4615  			break
  4616  		}
  4617  		v.reset(OpARM64FlagConstant)
  4618  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  4619  		return true
  4620  	}
  4621  	return false
  4622  }
  4623  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  4624  	v_1 := v.Args[1]
  4625  	v_0 := v.Args[0]
  4626  	b := v.Block
  4627  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  4628  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  4629  	for {
  4630  		d := auxIntToInt64(v.AuxInt)
  4631  		if v_0.Op != OpARM64MOVDconst {
  4632  			break
  4633  		}
  4634  		c := auxIntToInt64(v_0.AuxInt)
  4635  		x := v_1
  4636  		v.reset(OpARM64InvertFlags)
  4637  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4638  		v0.AuxInt = int64ToAuxInt(c)
  4639  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  4640  		v1.AuxInt = int64ToAuxInt(d)
  4641  		v1.AddArg(x)
  4642  		v0.AddArg(v1)
  4643  		v.AddArg(v0)
  4644  		return true
  4645  	}
  4646  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  4647  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  4648  	for {
  4649  		d := auxIntToInt64(v.AuxInt)
  4650  		x := v_0
  4651  		if v_1.Op != OpARM64MOVDconst {
  4652  			break
  4653  		}
  4654  		c := auxIntToInt64(v_1.AuxInt)
  4655  		v.reset(OpARM64CMPconst)
  4656  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  4657  		v.AddArg(x)
  4658  		return true
  4659  	}
  4660  	return false
  4661  }
  4662  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  4663  	v_1 := v.Args[1]
  4664  	v_0 := v.Args[0]
  4665  	b := v.Block
  4666  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  4667  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  4668  	for {
  4669  		d := auxIntToInt64(v.AuxInt)
  4670  		if v_0.Op != OpARM64MOVDconst {
  4671  			break
  4672  		}
  4673  		c := auxIntToInt64(v_0.AuxInt)
  4674  		x := v_1
  4675  		v.reset(OpARM64InvertFlags)
  4676  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4677  		v0.AuxInt = int64ToAuxInt(c)
  4678  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  4679  		v1.AuxInt = int64ToAuxInt(d)
  4680  		v1.AddArg(x)
  4681  		v0.AddArg(v1)
  4682  		v.AddArg(v0)
  4683  		return true
  4684  	}
  4685  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  4686  	// result: (CMPconst x [c>>uint64(d)])
  4687  	for {
  4688  		d := auxIntToInt64(v.AuxInt)
  4689  		x := v_0
  4690  		if v_1.Op != OpARM64MOVDconst {
  4691  			break
  4692  		}
  4693  		c := auxIntToInt64(v_1.AuxInt)
  4694  		v.reset(OpARM64CMPconst)
  4695  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  4696  		v.AddArg(x)
  4697  		return true
  4698  	}
  4699  	return false
  4700  }
  4701  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  4702  	v_1 := v.Args[1]
  4703  	v_0 := v.Args[0]
  4704  	b := v.Block
  4705  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  4706  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  4707  	for {
  4708  		d := auxIntToInt64(v.AuxInt)
  4709  		if v_0.Op != OpARM64MOVDconst {
  4710  			break
  4711  		}
  4712  		c := auxIntToInt64(v_0.AuxInt)
  4713  		x := v_1
  4714  		v.reset(OpARM64InvertFlags)
  4715  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  4716  		v0.AuxInt = int64ToAuxInt(c)
  4717  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  4718  		v1.AuxInt = int64ToAuxInt(d)
  4719  		v1.AddArg(x)
  4720  		v0.AddArg(v1)
  4721  		v.AddArg(v0)
  4722  		return true
  4723  	}
  4724  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  4725  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  4726  	for {
  4727  		d := auxIntToInt64(v.AuxInt)
  4728  		x := v_0
  4729  		if v_1.Op != OpARM64MOVDconst {
  4730  			break
  4731  		}
  4732  		c := auxIntToInt64(v_1.AuxInt)
  4733  		v.reset(OpARM64CMPconst)
  4734  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  4735  		v.AddArg(x)
  4736  		return true
  4737  	}
  4738  	return false
  4739  }
  4740  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  4741  	v_2 := v.Args[2]
  4742  	v_1 := v.Args[1]
  4743  	v_0 := v.Args[0]
  4744  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  4745  	// result: (CSETM [cc] flag)
  4746  	for {
  4747  		cc := auxIntToOp(v.AuxInt)
  4748  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  4749  			break
  4750  		}
  4751  		flag := v_2
  4752  		v.reset(OpARM64CSETM)
  4753  		v.AuxInt = opToAuxInt(cc)
  4754  		v.AddArg(flag)
  4755  		return true
  4756  	}
  4757  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  4758  	// result: (CSETM [arm64Negate(cc)] flag)
  4759  	for {
  4760  		cc := auxIntToOp(v.AuxInt)
  4761  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  4762  			break
  4763  		}
  4764  		flag := v_2
  4765  		v.reset(OpARM64CSETM)
  4766  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4767  		v.AddArg(flag)
  4768  		return true
  4769  	}
  4770  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  4771  	// result: (CSEL0 [cc] x flag)
  4772  	for {
  4773  		cc := auxIntToOp(v.AuxInt)
  4774  		x := v_0
  4775  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  4776  			break
  4777  		}
  4778  		flag := v_2
  4779  		v.reset(OpARM64CSEL0)
  4780  		v.AuxInt = opToAuxInt(cc)
  4781  		v.AddArg2(x, flag)
  4782  		return true
  4783  	}
  4784  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  4785  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  4786  	for {
  4787  		cc := auxIntToOp(v.AuxInt)
  4788  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4789  			break
  4790  		}
  4791  		y := v_1
  4792  		flag := v_2
  4793  		v.reset(OpARM64CSEL0)
  4794  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4795  		v.AddArg2(y, flag)
  4796  		return true
  4797  	}
  4798  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  4799  	// result: (CSINC [cc] x a flag)
  4800  	for {
  4801  		cc := auxIntToOp(v.AuxInt)
  4802  		x := v_0
  4803  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  4804  			break
  4805  		}
  4806  		a := v_1.Args[0]
  4807  		flag := v_2
  4808  		v.reset(OpARM64CSINC)
  4809  		v.AuxInt = opToAuxInt(cc)
  4810  		v.AddArg3(x, a, flag)
  4811  		return true
  4812  	}
  4813  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  4814  	// result: (CSINC [arm64Negate(cc)] x a flag)
  4815  	for {
  4816  		cc := auxIntToOp(v.AuxInt)
  4817  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  4818  			break
  4819  		}
  4820  		a := v_0.Args[0]
  4821  		x := v_1
  4822  		flag := v_2
  4823  		v.reset(OpARM64CSINC)
  4824  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4825  		v.AddArg3(x, a, flag)
  4826  		return true
  4827  	}
  4828  	// match: (CSEL [cc] x (MVN a) flag)
  4829  	// result: (CSINV [cc] x a flag)
  4830  	for {
  4831  		cc := auxIntToOp(v.AuxInt)
  4832  		x := v_0
  4833  		if v_1.Op != OpARM64MVN {
  4834  			break
  4835  		}
  4836  		a := v_1.Args[0]
  4837  		flag := v_2
  4838  		v.reset(OpARM64CSINV)
  4839  		v.AuxInt = opToAuxInt(cc)
  4840  		v.AddArg3(x, a, flag)
  4841  		return true
  4842  	}
  4843  	// match: (CSEL [cc] (MVN a) x flag)
  4844  	// result: (CSINV [arm64Negate(cc)] x a flag)
  4845  	for {
  4846  		cc := auxIntToOp(v.AuxInt)
  4847  		if v_0.Op != OpARM64MVN {
  4848  			break
  4849  		}
  4850  		a := v_0.Args[0]
  4851  		x := v_1
  4852  		flag := v_2
  4853  		v.reset(OpARM64CSINV)
  4854  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4855  		v.AddArg3(x, a, flag)
  4856  		return true
  4857  	}
  4858  	// match: (CSEL [cc] x (NEG a) flag)
  4859  	// result: (CSNEG [cc] x a flag)
  4860  	for {
  4861  		cc := auxIntToOp(v.AuxInt)
  4862  		x := v_0
  4863  		if v_1.Op != OpARM64NEG {
  4864  			break
  4865  		}
  4866  		a := v_1.Args[0]
  4867  		flag := v_2
  4868  		v.reset(OpARM64CSNEG)
  4869  		v.AuxInt = opToAuxInt(cc)
  4870  		v.AddArg3(x, a, flag)
  4871  		return true
  4872  	}
  4873  	// match: (CSEL [cc] (NEG a) x flag)
  4874  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  4875  	for {
  4876  		cc := auxIntToOp(v.AuxInt)
  4877  		if v_0.Op != OpARM64NEG {
  4878  			break
  4879  		}
  4880  		a := v_0.Args[0]
  4881  		x := v_1
  4882  		flag := v_2
  4883  		v.reset(OpARM64CSNEG)
  4884  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  4885  		v.AddArg3(x, a, flag)
  4886  		return true
  4887  	}
  4888  	// match: (CSEL [cc] x y (InvertFlags cmp))
  4889  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  4890  	for {
  4891  		cc := auxIntToOp(v.AuxInt)
  4892  		x := v_0
  4893  		y := v_1
  4894  		if v_2.Op != OpARM64InvertFlags {
  4895  			break
  4896  		}
  4897  		cmp := v_2.Args[0]
  4898  		v.reset(OpARM64CSEL)
  4899  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  4900  		v.AddArg3(x, y, cmp)
  4901  		return true
  4902  	}
  4903  	// match: (CSEL [cc] x _ flag)
  4904  	// cond: ccARM64Eval(cc, flag) > 0
  4905  	// result: x
  4906  	for {
  4907  		cc := auxIntToOp(v.AuxInt)
  4908  		x := v_0
  4909  		flag := v_2
  4910  		if !(ccARM64Eval(cc, flag) > 0) {
  4911  			break
  4912  		}
  4913  		v.copyOf(x)
  4914  		return true
  4915  	}
  4916  	// match: (CSEL [cc] _ y flag)
  4917  	// cond: ccARM64Eval(cc, flag) < 0
  4918  	// result: y
  4919  	for {
  4920  		cc := auxIntToOp(v.AuxInt)
  4921  		y := v_1
  4922  		flag := v_2
  4923  		if !(ccARM64Eval(cc, flag) < 0) {
  4924  			break
  4925  		}
  4926  		v.copyOf(y)
  4927  		return true
  4928  	}
  4929  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  4930  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  4931  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  4932  	for {
  4933  		cc := auxIntToOp(v.AuxInt)
  4934  		x := v_0
  4935  		y := v_1
  4936  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  4937  			break
  4938  		}
  4939  		boolval := v_2.Args[0]
  4940  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  4941  			break
  4942  		}
  4943  		v.reset(OpARM64CSEL)
  4944  		v.AuxInt = opToAuxInt(boolval.Op)
  4945  		v.AddArg3(x, y, flagArg(boolval))
  4946  		return true
  4947  	}
  4948  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  4949  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  4950  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  4951  	for {
  4952  		cc := auxIntToOp(v.AuxInt)
  4953  		x := v_0
  4954  		y := v_1
  4955  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  4956  			break
  4957  		}
  4958  		boolval := v_2.Args[0]
  4959  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  4960  			break
  4961  		}
  4962  		v.reset(OpARM64CSEL)
  4963  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  4964  		v.AddArg3(x, y, flagArg(boolval))
  4965  		return true
  4966  	}
  4967  	return false
  4968  }
  4969  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  4970  	v_1 := v.Args[1]
  4971  	v_0 := v.Args[0]
  4972  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  4973  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  4974  	for {
  4975  		cc := auxIntToOp(v.AuxInt)
  4976  		x := v_0
  4977  		if v_1.Op != OpARM64InvertFlags {
  4978  			break
  4979  		}
  4980  		cmp := v_1.Args[0]
  4981  		v.reset(OpARM64CSEL0)
  4982  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  4983  		v.AddArg2(x, cmp)
  4984  		return true
  4985  	}
  4986  	// match: (CSEL0 [cc] x flag)
  4987  	// cond: ccARM64Eval(cc, flag) > 0
  4988  	// result: x
  4989  	for {
  4990  		cc := auxIntToOp(v.AuxInt)
  4991  		x := v_0
  4992  		flag := v_1
  4993  		if !(ccARM64Eval(cc, flag) > 0) {
  4994  			break
  4995  		}
  4996  		v.copyOf(x)
  4997  		return true
  4998  	}
  4999  	// match: (CSEL0 [cc] _ flag)
  5000  	// cond: ccARM64Eval(cc, flag) < 0
  5001  	// result: (MOVDconst [0])
  5002  	for {
  5003  		cc := auxIntToOp(v.AuxInt)
  5004  		flag := v_1
  5005  		if !(ccARM64Eval(cc, flag) < 0) {
  5006  			break
  5007  		}
  5008  		v.reset(OpARM64MOVDconst)
  5009  		v.AuxInt = int64ToAuxInt(0)
  5010  		return true
  5011  	}
  5012  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  5013  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  5014  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  5015  	for {
  5016  		cc := auxIntToOp(v.AuxInt)
  5017  		x := v_0
  5018  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  5019  			break
  5020  		}
  5021  		boolval := v_1.Args[0]
  5022  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  5023  			break
  5024  		}
  5025  		v.reset(OpARM64CSEL0)
  5026  		v.AuxInt = opToAuxInt(boolval.Op)
  5027  		v.AddArg2(x, flagArg(boolval))
  5028  		return true
  5029  	}
  5030  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  5031  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  5032  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  5033  	for {
  5034  		cc := auxIntToOp(v.AuxInt)
  5035  		x := v_0
  5036  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  5037  			break
  5038  		}
  5039  		boolval := v_1.Args[0]
  5040  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  5041  			break
  5042  		}
  5043  		v.reset(OpARM64CSEL0)
  5044  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  5045  		v.AddArg2(x, flagArg(boolval))
  5046  		return true
  5047  	}
  5048  	return false
  5049  }
  5050  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  5051  	v_0 := v.Args[0]
  5052  	// match: (CSETM [cc] (InvertFlags cmp))
  5053  	// result: (CSETM [arm64Invert(cc)] cmp)
  5054  	for {
  5055  		cc := auxIntToOp(v.AuxInt)
  5056  		if v_0.Op != OpARM64InvertFlags {
  5057  			break
  5058  		}
  5059  		cmp := v_0.Args[0]
  5060  		v.reset(OpARM64CSETM)
  5061  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5062  		v.AddArg(cmp)
  5063  		return true
  5064  	}
  5065  	// match: (CSETM [cc] flag)
  5066  	// cond: ccARM64Eval(cc, flag) > 0
  5067  	// result: (MOVDconst [-1])
  5068  	for {
  5069  		cc := auxIntToOp(v.AuxInt)
  5070  		flag := v_0
  5071  		if !(ccARM64Eval(cc, flag) > 0) {
  5072  			break
  5073  		}
  5074  		v.reset(OpARM64MOVDconst)
  5075  		v.AuxInt = int64ToAuxInt(-1)
  5076  		return true
  5077  	}
  5078  	// match: (CSETM [cc] flag)
  5079  	// cond: ccARM64Eval(cc, flag) < 0
  5080  	// result: (MOVDconst [0])
  5081  	for {
  5082  		cc := auxIntToOp(v.AuxInt)
  5083  		flag := v_0
  5084  		if !(ccARM64Eval(cc, flag) < 0) {
  5085  			break
  5086  		}
  5087  		v.reset(OpARM64MOVDconst)
  5088  		v.AuxInt = int64ToAuxInt(0)
  5089  		return true
  5090  	}
  5091  	return false
  5092  }
  5093  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  5094  	v_2 := v.Args[2]
  5095  	v_1 := v.Args[1]
  5096  	v_0 := v.Args[0]
  5097  	// match: (CSINC [cc] x y (InvertFlags cmp))
  5098  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  5099  	for {
  5100  		cc := auxIntToOp(v.AuxInt)
  5101  		x := v_0
  5102  		y := v_1
  5103  		if v_2.Op != OpARM64InvertFlags {
  5104  			break
  5105  		}
  5106  		cmp := v_2.Args[0]
  5107  		v.reset(OpARM64CSINC)
  5108  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5109  		v.AddArg3(x, y, cmp)
  5110  		return true
  5111  	}
  5112  	// match: (CSINC [cc] x _ flag)
  5113  	// cond: ccARM64Eval(cc, flag) > 0
  5114  	// result: x
  5115  	for {
  5116  		cc := auxIntToOp(v.AuxInt)
  5117  		x := v_0
  5118  		flag := v_2
  5119  		if !(ccARM64Eval(cc, flag) > 0) {
  5120  			break
  5121  		}
  5122  		v.copyOf(x)
  5123  		return true
  5124  	}
  5125  	// match: (CSINC [cc] _ y flag)
  5126  	// cond: ccARM64Eval(cc, flag) < 0
  5127  	// result: (ADDconst [1] y)
  5128  	for {
  5129  		cc := auxIntToOp(v.AuxInt)
  5130  		y := v_1
  5131  		flag := v_2
  5132  		if !(ccARM64Eval(cc, flag) < 0) {
  5133  			break
  5134  		}
  5135  		v.reset(OpARM64ADDconst)
  5136  		v.AuxInt = int64ToAuxInt(1)
  5137  		v.AddArg(y)
  5138  		return true
  5139  	}
  5140  	return false
  5141  }
  5142  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  5143  	v_2 := v.Args[2]
  5144  	v_1 := v.Args[1]
  5145  	v_0 := v.Args[0]
  5146  	// match: (CSINV [cc] x y (InvertFlags cmp))
  5147  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  5148  	for {
  5149  		cc := auxIntToOp(v.AuxInt)
  5150  		x := v_0
  5151  		y := v_1
  5152  		if v_2.Op != OpARM64InvertFlags {
  5153  			break
  5154  		}
  5155  		cmp := v_2.Args[0]
  5156  		v.reset(OpARM64CSINV)
  5157  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5158  		v.AddArg3(x, y, cmp)
  5159  		return true
  5160  	}
  5161  	// match: (CSINV [cc] x _ flag)
  5162  	// cond: ccARM64Eval(cc, flag) > 0
  5163  	// result: x
  5164  	for {
  5165  		cc := auxIntToOp(v.AuxInt)
  5166  		x := v_0
  5167  		flag := v_2
  5168  		if !(ccARM64Eval(cc, flag) > 0) {
  5169  			break
  5170  		}
  5171  		v.copyOf(x)
  5172  		return true
  5173  	}
  5174  	// match: (CSINV [cc] _ y flag)
  5175  	// cond: ccARM64Eval(cc, flag) < 0
  5176  	// result: (Not y)
  5177  	for {
  5178  		cc := auxIntToOp(v.AuxInt)
  5179  		y := v_1
  5180  		flag := v_2
  5181  		if !(ccARM64Eval(cc, flag) < 0) {
  5182  			break
  5183  		}
  5184  		v.reset(OpNot)
  5185  		v.AddArg(y)
  5186  		return true
  5187  	}
  5188  	return false
  5189  }
  5190  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  5191  	v_2 := v.Args[2]
  5192  	v_1 := v.Args[1]
  5193  	v_0 := v.Args[0]
  5194  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  5195  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  5196  	for {
  5197  		cc := auxIntToOp(v.AuxInt)
  5198  		x := v_0
  5199  		y := v_1
  5200  		if v_2.Op != OpARM64InvertFlags {
  5201  			break
  5202  		}
  5203  		cmp := v_2.Args[0]
  5204  		v.reset(OpARM64CSNEG)
  5205  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  5206  		v.AddArg3(x, y, cmp)
  5207  		return true
  5208  	}
  5209  	// match: (CSNEG [cc] x _ flag)
  5210  	// cond: ccARM64Eval(cc, flag) > 0
  5211  	// result: x
  5212  	for {
  5213  		cc := auxIntToOp(v.AuxInt)
  5214  		x := v_0
  5215  		flag := v_2
  5216  		if !(ccARM64Eval(cc, flag) > 0) {
  5217  			break
  5218  		}
  5219  		v.copyOf(x)
  5220  		return true
  5221  	}
  5222  	// match: (CSNEG [cc] _ y flag)
  5223  	// cond: ccARM64Eval(cc, flag) < 0
  5224  	// result: (NEG y)
  5225  	for {
  5226  		cc := auxIntToOp(v.AuxInt)
  5227  		y := v_1
  5228  		flag := v_2
  5229  		if !(ccARM64Eval(cc, flag) < 0) {
  5230  			break
  5231  		}
  5232  		v.reset(OpARM64NEG)
  5233  		v.AddArg(y)
  5234  		return true
  5235  	}
  5236  	return false
  5237  }
  5238  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  5239  	v_1 := v.Args[1]
  5240  	v_0 := v.Args[0]
  5241  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  5242  	// cond: d != 0
  5243  	// result: (MOVDconst [c/d])
  5244  	for {
  5245  		if v_0.Op != OpARM64MOVDconst {
  5246  			break
  5247  		}
  5248  		c := auxIntToInt64(v_0.AuxInt)
  5249  		if v_1.Op != OpARM64MOVDconst {
  5250  			break
  5251  		}
  5252  		d := auxIntToInt64(v_1.AuxInt)
  5253  		if !(d != 0) {
  5254  			break
  5255  		}
  5256  		v.reset(OpARM64MOVDconst)
  5257  		v.AuxInt = int64ToAuxInt(c / d)
  5258  		return true
  5259  	}
  5260  	return false
  5261  }
  5262  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  5263  	v_1 := v.Args[1]
  5264  	v_0 := v.Args[0]
  5265  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  5266  	// cond: d != 0
  5267  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  5268  	for {
  5269  		if v_0.Op != OpARM64MOVDconst {
  5270  			break
  5271  		}
  5272  		c := auxIntToInt64(v_0.AuxInt)
  5273  		if v_1.Op != OpARM64MOVDconst {
  5274  			break
  5275  		}
  5276  		d := auxIntToInt64(v_1.AuxInt)
  5277  		if !(d != 0) {
  5278  			break
  5279  		}
  5280  		v.reset(OpARM64MOVDconst)
  5281  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  5282  		return true
  5283  	}
  5284  	return false
  5285  }
  5286  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  5287  	v_1 := v.Args[1]
  5288  	v_0 := v.Args[0]
  5289  	// match: (EON x (MOVDconst [c]))
  5290  	// result: (XORconst [^c] x)
  5291  	for {
  5292  		x := v_0
  5293  		if v_1.Op != OpARM64MOVDconst {
  5294  			break
  5295  		}
  5296  		c := auxIntToInt64(v_1.AuxInt)
  5297  		v.reset(OpARM64XORconst)
  5298  		v.AuxInt = int64ToAuxInt(^c)
  5299  		v.AddArg(x)
  5300  		return true
  5301  	}
  5302  	// match: (EON x x)
  5303  	// result: (MOVDconst [-1])
  5304  	for {
  5305  		x := v_0
  5306  		if x != v_1 {
  5307  			break
  5308  		}
  5309  		v.reset(OpARM64MOVDconst)
  5310  		v.AuxInt = int64ToAuxInt(-1)
  5311  		return true
  5312  	}
  5313  	// match: (EON x0 x1:(SLLconst [c] y))
  5314  	// cond: clobberIfDead(x1)
  5315  	// result: (EONshiftLL x0 y [c])
  5316  	for {
  5317  		x0 := v_0
  5318  		x1 := v_1
  5319  		if x1.Op != OpARM64SLLconst {
  5320  			break
  5321  		}
  5322  		c := auxIntToInt64(x1.AuxInt)
  5323  		y := x1.Args[0]
  5324  		if !(clobberIfDead(x1)) {
  5325  			break
  5326  		}
  5327  		v.reset(OpARM64EONshiftLL)
  5328  		v.AuxInt = int64ToAuxInt(c)
  5329  		v.AddArg2(x0, y)
  5330  		return true
  5331  	}
  5332  	// match: (EON x0 x1:(SRLconst [c] y))
  5333  	// cond: clobberIfDead(x1)
  5334  	// result: (EONshiftRL x0 y [c])
  5335  	for {
  5336  		x0 := v_0
  5337  		x1 := v_1
  5338  		if x1.Op != OpARM64SRLconst {
  5339  			break
  5340  		}
  5341  		c := auxIntToInt64(x1.AuxInt)
  5342  		y := x1.Args[0]
  5343  		if !(clobberIfDead(x1)) {
  5344  			break
  5345  		}
  5346  		v.reset(OpARM64EONshiftRL)
  5347  		v.AuxInt = int64ToAuxInt(c)
  5348  		v.AddArg2(x0, y)
  5349  		return true
  5350  	}
  5351  	// match: (EON x0 x1:(SRAconst [c] y))
  5352  	// cond: clobberIfDead(x1)
  5353  	// result: (EONshiftRA x0 y [c])
  5354  	for {
  5355  		x0 := v_0
  5356  		x1 := v_1
  5357  		if x1.Op != OpARM64SRAconst {
  5358  			break
  5359  		}
  5360  		c := auxIntToInt64(x1.AuxInt)
  5361  		y := x1.Args[0]
  5362  		if !(clobberIfDead(x1)) {
  5363  			break
  5364  		}
  5365  		v.reset(OpARM64EONshiftRA)
  5366  		v.AuxInt = int64ToAuxInt(c)
  5367  		v.AddArg2(x0, y)
  5368  		return true
  5369  	}
  5370  	// match: (EON x0 x1:(RORconst [c] y))
  5371  	// cond: clobberIfDead(x1)
  5372  	// result: (EONshiftRO x0 y [c])
  5373  	for {
  5374  		x0 := v_0
  5375  		x1 := v_1
  5376  		if x1.Op != OpARM64RORconst {
  5377  			break
  5378  		}
  5379  		c := auxIntToInt64(x1.AuxInt)
  5380  		y := x1.Args[0]
  5381  		if !(clobberIfDead(x1)) {
  5382  			break
  5383  		}
  5384  		v.reset(OpARM64EONshiftRO)
  5385  		v.AuxInt = int64ToAuxInt(c)
  5386  		v.AddArg2(x0, y)
  5387  		return true
  5388  	}
  5389  	return false
  5390  }
  5391  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  5392  	v_1 := v.Args[1]
  5393  	v_0 := v.Args[0]
  5394  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  5395  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  5396  	for {
  5397  		d := auxIntToInt64(v.AuxInt)
  5398  		x := v_0
  5399  		if v_1.Op != OpARM64MOVDconst {
  5400  			break
  5401  		}
  5402  		c := auxIntToInt64(v_1.AuxInt)
  5403  		v.reset(OpARM64XORconst)
  5404  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  5405  		v.AddArg(x)
  5406  		return true
  5407  	}
  5408  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  5409  	// result: (MOVDconst [-1])
  5410  	for {
  5411  		c := auxIntToInt64(v.AuxInt)
  5412  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  5413  			break
  5414  		}
  5415  		x := v_0.Args[0]
  5416  		if x != v_1 {
  5417  			break
  5418  		}
  5419  		v.reset(OpARM64MOVDconst)
  5420  		v.AuxInt = int64ToAuxInt(-1)
  5421  		return true
  5422  	}
  5423  	return false
  5424  }
  5425  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  5426  	v_1 := v.Args[1]
  5427  	v_0 := v.Args[0]
  5428  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  5429  	// result: (XORconst x [^(c>>uint64(d))])
  5430  	for {
  5431  		d := auxIntToInt64(v.AuxInt)
  5432  		x := v_0
  5433  		if v_1.Op != OpARM64MOVDconst {
  5434  			break
  5435  		}
  5436  		c := auxIntToInt64(v_1.AuxInt)
  5437  		v.reset(OpARM64XORconst)
  5438  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  5439  		v.AddArg(x)
  5440  		return true
  5441  	}
  5442  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  5443  	// result: (MOVDconst [-1])
  5444  	for {
  5445  		c := auxIntToInt64(v.AuxInt)
  5446  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  5447  			break
  5448  		}
  5449  		x := v_0.Args[0]
  5450  		if x != v_1 {
  5451  			break
  5452  		}
  5453  		v.reset(OpARM64MOVDconst)
  5454  		v.AuxInt = int64ToAuxInt(-1)
  5455  		return true
  5456  	}
  5457  	return false
  5458  }
  5459  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  5460  	v_1 := v.Args[1]
  5461  	v_0 := v.Args[0]
  5462  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  5463  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  5464  	for {
  5465  		d := auxIntToInt64(v.AuxInt)
  5466  		x := v_0
  5467  		if v_1.Op != OpARM64MOVDconst {
  5468  			break
  5469  		}
  5470  		c := auxIntToInt64(v_1.AuxInt)
  5471  		v.reset(OpARM64XORconst)
  5472  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  5473  		v.AddArg(x)
  5474  		return true
  5475  	}
  5476  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  5477  	// result: (MOVDconst [-1])
  5478  	for {
  5479  		c := auxIntToInt64(v.AuxInt)
  5480  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  5481  			break
  5482  		}
  5483  		x := v_0.Args[0]
  5484  		if x != v_1 {
  5485  			break
  5486  		}
  5487  		v.reset(OpARM64MOVDconst)
  5488  		v.AuxInt = int64ToAuxInt(-1)
  5489  		return true
  5490  	}
  5491  	return false
  5492  }
  5493  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  5494  	v_1 := v.Args[1]
  5495  	v_0 := v.Args[0]
  5496  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  5497  	// result: (XORconst x [^rotateRight64(c, d)])
  5498  	for {
  5499  		d := auxIntToInt64(v.AuxInt)
  5500  		x := v_0
  5501  		if v_1.Op != OpARM64MOVDconst {
  5502  			break
  5503  		}
  5504  		c := auxIntToInt64(v_1.AuxInt)
  5505  		v.reset(OpARM64XORconst)
  5506  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  5507  		v.AddArg(x)
  5508  		return true
  5509  	}
  5510  	// match: (EONshiftRO (RORconst x [c]) x [c])
  5511  	// result: (MOVDconst [-1])
  5512  	for {
  5513  		c := auxIntToInt64(v.AuxInt)
  5514  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  5515  			break
  5516  		}
  5517  		x := v_0.Args[0]
  5518  		if x != v_1 {
  5519  			break
  5520  		}
  5521  		v.reset(OpARM64MOVDconst)
  5522  		v.AuxInt = int64ToAuxInt(-1)
  5523  		return true
  5524  	}
  5525  	return false
  5526  }
  5527  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  5528  	v_0 := v.Args[0]
  5529  	b := v.Block
  5530  	// match: (Equal (CMPconst [0] z:(AND x y)))
  5531  	// cond: z.Uses == 1
  5532  	// result: (Equal (TST x y))
  5533  	for {
  5534  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5535  			break
  5536  		}
  5537  		z := v_0.Args[0]
  5538  		if z.Op != OpARM64AND {
  5539  			break
  5540  		}
  5541  		y := z.Args[1]
  5542  		x := z.Args[0]
  5543  		if !(z.Uses == 1) {
  5544  			break
  5545  		}
  5546  		v.reset(OpARM64Equal)
  5547  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  5548  		v0.AddArg2(x, y)
  5549  		v.AddArg(v0)
  5550  		return true
  5551  	}
  5552  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  5553  	// cond: x.Uses == 1
  5554  	// result: (Equal (TSTWconst [int32(c)] y))
  5555  	for {
  5556  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5557  			break
  5558  		}
  5559  		x := v_0.Args[0]
  5560  		if x.Op != OpARM64ANDconst {
  5561  			break
  5562  		}
  5563  		c := auxIntToInt64(x.AuxInt)
  5564  		y := x.Args[0]
  5565  		if !(x.Uses == 1) {
  5566  			break
  5567  		}
  5568  		v.reset(OpARM64Equal)
  5569  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  5570  		v0.AuxInt = int32ToAuxInt(int32(c))
  5571  		v0.AddArg(y)
  5572  		v.AddArg(v0)
  5573  		return true
  5574  	}
  5575  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  5576  	// cond: z.Uses == 1
  5577  	// result: (Equal (TSTW x y))
  5578  	for {
  5579  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5580  			break
  5581  		}
  5582  		z := v_0.Args[0]
  5583  		if z.Op != OpARM64AND {
  5584  			break
  5585  		}
  5586  		y := z.Args[1]
  5587  		x := z.Args[0]
  5588  		if !(z.Uses == 1) {
  5589  			break
  5590  		}
  5591  		v.reset(OpARM64Equal)
  5592  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  5593  		v0.AddArg2(x, y)
  5594  		v.AddArg(v0)
  5595  		return true
  5596  	}
  5597  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  5598  	// cond: x.Uses == 1
  5599  	// result: (Equal (TSTconst [c] y))
  5600  	for {
  5601  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5602  			break
  5603  		}
  5604  		x := v_0.Args[0]
  5605  		if x.Op != OpARM64ANDconst {
  5606  			break
  5607  		}
  5608  		c := auxIntToInt64(x.AuxInt)
  5609  		y := x.Args[0]
  5610  		if !(x.Uses == 1) {
  5611  			break
  5612  		}
  5613  		v.reset(OpARM64Equal)
  5614  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  5615  		v0.AuxInt = int64ToAuxInt(c)
  5616  		v0.AddArg(y)
  5617  		v.AddArg(v0)
  5618  		return true
  5619  	}
  5620  	// match: (Equal (CMP x z:(NEG y)))
  5621  	// cond: z.Uses == 1
  5622  	// result: (Equal (CMN x y))
  5623  	for {
  5624  		if v_0.Op != OpARM64CMP {
  5625  			break
  5626  		}
  5627  		_ = v_0.Args[1]
  5628  		x := v_0.Args[0]
  5629  		z := v_0.Args[1]
  5630  		if z.Op != OpARM64NEG {
  5631  			break
  5632  		}
  5633  		y := z.Args[0]
  5634  		if !(z.Uses == 1) {
  5635  			break
  5636  		}
  5637  		v.reset(OpARM64Equal)
  5638  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5639  		v0.AddArg2(x, y)
  5640  		v.AddArg(v0)
  5641  		return true
  5642  	}
  5643  	// match: (Equal (CMPW x z:(NEG y)))
  5644  	// cond: z.Uses == 1
  5645  	// result: (Equal (CMNW x y))
  5646  	for {
  5647  		if v_0.Op != OpARM64CMPW {
  5648  			break
  5649  		}
  5650  		_ = v_0.Args[1]
  5651  		x := v_0.Args[0]
  5652  		z := v_0.Args[1]
  5653  		if z.Op != OpARM64NEG {
  5654  			break
  5655  		}
  5656  		y := z.Args[0]
  5657  		if !(z.Uses == 1) {
  5658  			break
  5659  		}
  5660  		v.reset(OpARM64Equal)
  5661  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5662  		v0.AddArg2(x, y)
  5663  		v.AddArg(v0)
  5664  		return true
  5665  	}
  5666  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  5667  	// cond: x.Uses == 1
  5668  	// result: (Equal (CMNconst [c] y))
  5669  	for {
  5670  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5671  			break
  5672  		}
  5673  		x := v_0.Args[0]
  5674  		if x.Op != OpARM64ADDconst {
  5675  			break
  5676  		}
  5677  		c := auxIntToInt64(x.AuxInt)
  5678  		y := x.Args[0]
  5679  		if !(x.Uses == 1) {
  5680  			break
  5681  		}
  5682  		v.reset(OpARM64Equal)
  5683  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  5684  		v0.AuxInt = int64ToAuxInt(c)
  5685  		v0.AddArg(y)
  5686  		v.AddArg(v0)
  5687  		return true
  5688  	}
  5689  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  5690  	// cond: x.Uses == 1
  5691  	// result: (Equal (CMNWconst [int32(c)] y))
  5692  	for {
  5693  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5694  			break
  5695  		}
  5696  		x := v_0.Args[0]
  5697  		if x.Op != OpARM64ADDconst {
  5698  			break
  5699  		}
  5700  		c := auxIntToInt64(x.AuxInt)
  5701  		y := x.Args[0]
  5702  		if !(x.Uses == 1) {
  5703  			break
  5704  		}
  5705  		v.reset(OpARM64Equal)
  5706  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  5707  		v0.AuxInt = int32ToAuxInt(int32(c))
  5708  		v0.AddArg(y)
  5709  		v.AddArg(v0)
  5710  		return true
  5711  	}
  5712  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  5713  	// cond: z.Uses == 1
  5714  	// result: (Equal (CMN x y))
  5715  	for {
  5716  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5717  			break
  5718  		}
  5719  		z := v_0.Args[0]
  5720  		if z.Op != OpARM64ADD {
  5721  			break
  5722  		}
  5723  		y := z.Args[1]
  5724  		x := z.Args[0]
  5725  		if !(z.Uses == 1) {
  5726  			break
  5727  		}
  5728  		v.reset(OpARM64Equal)
  5729  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5730  		v0.AddArg2(x, y)
  5731  		v.AddArg(v0)
  5732  		return true
  5733  	}
  5734  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  5735  	// cond: z.Uses == 1
  5736  	// result: (Equal (CMNW x y))
  5737  	for {
  5738  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5739  			break
  5740  		}
  5741  		z := v_0.Args[0]
  5742  		if z.Op != OpARM64ADD {
  5743  			break
  5744  		}
  5745  		y := z.Args[1]
  5746  		x := z.Args[0]
  5747  		if !(z.Uses == 1) {
  5748  			break
  5749  		}
  5750  		v.reset(OpARM64Equal)
  5751  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5752  		v0.AddArg2(x, y)
  5753  		v.AddArg(v0)
  5754  		return true
  5755  	}
  5756  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  5757  	// cond: z.Uses == 1
  5758  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  5759  	for {
  5760  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5761  			break
  5762  		}
  5763  		z := v_0.Args[0]
  5764  		if z.Op != OpARM64MADD {
  5765  			break
  5766  		}
  5767  		y := z.Args[2]
  5768  		a := z.Args[0]
  5769  		x := z.Args[1]
  5770  		if !(z.Uses == 1) {
  5771  			break
  5772  		}
  5773  		v.reset(OpARM64Equal)
  5774  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  5775  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  5776  		v1.AddArg2(x, y)
  5777  		v0.AddArg2(a, v1)
  5778  		v.AddArg(v0)
  5779  		return true
  5780  	}
  5781  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  5782  	// cond: z.Uses == 1
  5783  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  5784  	for {
  5785  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5786  			break
  5787  		}
  5788  		z := v_0.Args[0]
  5789  		if z.Op != OpARM64MSUB {
  5790  			break
  5791  		}
  5792  		y := z.Args[2]
  5793  		a := z.Args[0]
  5794  		x := z.Args[1]
  5795  		if !(z.Uses == 1) {
  5796  			break
  5797  		}
  5798  		v.reset(OpARM64Equal)
  5799  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  5800  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  5801  		v1.AddArg2(x, y)
  5802  		v0.AddArg2(a, v1)
  5803  		v.AddArg(v0)
  5804  		return true
  5805  	}
  5806  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  5807  	// cond: z.Uses == 1
  5808  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  5809  	for {
  5810  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5811  			break
  5812  		}
  5813  		z := v_0.Args[0]
  5814  		if z.Op != OpARM64MADDW {
  5815  			break
  5816  		}
  5817  		y := z.Args[2]
  5818  		a := z.Args[0]
  5819  		x := z.Args[1]
  5820  		if !(z.Uses == 1) {
  5821  			break
  5822  		}
  5823  		v.reset(OpARM64Equal)
  5824  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  5825  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  5826  		v1.AddArg2(x, y)
  5827  		v0.AddArg2(a, v1)
  5828  		v.AddArg(v0)
  5829  		return true
  5830  	}
  5831  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  5832  	// cond: z.Uses == 1
  5833  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  5834  	for {
  5835  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5836  			break
  5837  		}
  5838  		z := v_0.Args[0]
  5839  		if z.Op != OpARM64MSUBW {
  5840  			break
  5841  		}
  5842  		y := z.Args[2]
  5843  		a := z.Args[0]
  5844  		x := z.Args[1]
  5845  		if !(z.Uses == 1) {
  5846  			break
  5847  		}
  5848  		v.reset(OpARM64Equal)
  5849  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  5850  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  5851  		v1.AddArg2(x, y)
  5852  		v0.AddArg2(a, v1)
  5853  		v.AddArg(v0)
  5854  		return true
  5855  	}
  5856  	// match: (Equal (FlagConstant [fc]))
  5857  	// result: (MOVDconst [b2i(fc.eq())])
  5858  	for {
  5859  		if v_0.Op != OpARM64FlagConstant {
  5860  			break
  5861  		}
  5862  		fc := auxIntToFlagConstant(v_0.AuxInt)
  5863  		v.reset(OpARM64MOVDconst)
  5864  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  5865  		return true
  5866  	}
  5867  	// match: (Equal (InvertFlags x))
  5868  	// result: (Equal x)
  5869  	for {
  5870  		if v_0.Op != OpARM64InvertFlags {
  5871  			break
  5872  		}
  5873  		x := v_0.Args[0]
  5874  		v.reset(OpARM64Equal)
  5875  		v.AddArg(x)
  5876  		return true
  5877  	}
  5878  	return false
  5879  }
  5880  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  5881  	v_1 := v.Args[1]
  5882  	v_0 := v.Args[0]
  5883  	// match: (FADDD a (FMULD x y))
  5884  	// cond: a.Block.Func.useFMA(v)
  5885  	// result: (FMADDD a x y)
  5886  	for {
  5887  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5888  			a := v_0
  5889  			if v_1.Op != OpARM64FMULD {
  5890  				continue
  5891  			}
  5892  			y := v_1.Args[1]
  5893  			x := v_1.Args[0]
  5894  			if !(a.Block.Func.useFMA(v)) {
  5895  				continue
  5896  			}
  5897  			v.reset(OpARM64FMADDD)
  5898  			v.AddArg3(a, x, y)
  5899  			return true
  5900  		}
  5901  		break
  5902  	}
  5903  	// match: (FADDD a (FNMULD x y))
  5904  	// cond: a.Block.Func.useFMA(v)
  5905  	// result: (FMSUBD a x y)
  5906  	for {
  5907  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5908  			a := v_0
  5909  			if v_1.Op != OpARM64FNMULD {
  5910  				continue
  5911  			}
  5912  			y := v_1.Args[1]
  5913  			x := v_1.Args[0]
  5914  			if !(a.Block.Func.useFMA(v)) {
  5915  				continue
  5916  			}
  5917  			v.reset(OpARM64FMSUBD)
  5918  			v.AddArg3(a, x, y)
  5919  			return true
  5920  		}
  5921  		break
  5922  	}
  5923  	return false
  5924  }
  5925  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  5926  	v_1 := v.Args[1]
  5927  	v_0 := v.Args[0]
  5928  	// match: (FADDS a (FMULS x y))
  5929  	// cond: a.Block.Func.useFMA(v)
  5930  	// result: (FMADDS a x y)
  5931  	for {
  5932  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5933  			a := v_0
  5934  			if v_1.Op != OpARM64FMULS {
  5935  				continue
  5936  			}
  5937  			y := v_1.Args[1]
  5938  			x := v_1.Args[0]
  5939  			if !(a.Block.Func.useFMA(v)) {
  5940  				continue
  5941  			}
  5942  			v.reset(OpARM64FMADDS)
  5943  			v.AddArg3(a, x, y)
  5944  			return true
  5945  		}
  5946  		break
  5947  	}
  5948  	// match: (FADDS a (FNMULS x y))
  5949  	// cond: a.Block.Func.useFMA(v)
  5950  	// result: (FMSUBS a x y)
  5951  	for {
  5952  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5953  			a := v_0
  5954  			if v_1.Op != OpARM64FNMULS {
  5955  				continue
  5956  			}
  5957  			y := v_1.Args[1]
  5958  			x := v_1.Args[0]
  5959  			if !(a.Block.Func.useFMA(v)) {
  5960  				continue
  5961  			}
  5962  			v.reset(OpARM64FMSUBS)
  5963  			v.AddArg3(a, x, y)
  5964  			return true
  5965  		}
  5966  		break
  5967  	}
  5968  	return false
  5969  }
  5970  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  5971  	v_1 := v.Args[1]
  5972  	v_0 := v.Args[0]
  5973  	b := v.Block
  5974  	// match: (FCMPD x (FMOVDconst [0]))
  5975  	// result: (FCMPD0 x)
  5976  	for {
  5977  		x := v_0
  5978  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  5979  			break
  5980  		}
  5981  		v.reset(OpARM64FCMPD0)
  5982  		v.AddArg(x)
  5983  		return true
  5984  	}
  5985  	// match: (FCMPD (FMOVDconst [0]) x)
  5986  	// result: (InvertFlags (FCMPD0 x))
  5987  	for {
  5988  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  5989  			break
  5990  		}
  5991  		x := v_1
  5992  		v.reset(OpARM64InvertFlags)
  5993  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  5994  		v0.AddArg(x)
  5995  		v.AddArg(v0)
  5996  		return true
  5997  	}
  5998  	return false
  5999  }
  6000  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  6001  	v_1 := v.Args[1]
  6002  	v_0 := v.Args[0]
  6003  	b := v.Block
  6004  	// match: (FCMPS x (FMOVSconst [0]))
  6005  	// result: (FCMPS0 x)
  6006  	for {
  6007  		x := v_0
  6008  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  6009  			break
  6010  		}
  6011  		v.reset(OpARM64FCMPS0)
  6012  		v.AddArg(x)
  6013  		return true
  6014  	}
  6015  	// match: (FCMPS (FMOVSconst [0]) x)
  6016  	// result: (InvertFlags (FCMPS0 x))
  6017  	for {
  6018  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  6019  			break
  6020  		}
  6021  		x := v_1
  6022  		v.reset(OpARM64InvertFlags)
  6023  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  6024  		v0.AddArg(x)
  6025  		v.AddArg(v0)
  6026  		return true
  6027  	}
  6028  	return false
  6029  }
  6030  func rewriteValueARM64_OpARM64FCVTDS(v *Value) bool {
  6031  	v_0 := v.Args[0]
  6032  	// match: (FCVTDS (FABSD (FCVTSD x)))
  6033  	// result: (FABSS x)
  6034  	for {
  6035  		if v_0.Op != OpARM64FABSD {
  6036  			break
  6037  		}
  6038  		v_0_0 := v_0.Args[0]
  6039  		if v_0_0.Op != OpARM64FCVTSD {
  6040  			break
  6041  		}
  6042  		x := v_0_0.Args[0]
  6043  		v.reset(OpARM64FABSS)
  6044  		v.AddArg(x)
  6045  		return true
  6046  	}
  6047  	// match: (FCVTDS (FSQRTD (FCVTSD x)))
  6048  	// result: (FSQRTS x)
  6049  	for {
  6050  		if v_0.Op != OpARM64FSQRTD {
  6051  			break
  6052  		}
  6053  		v_0_0 := v_0.Args[0]
  6054  		if v_0_0.Op != OpARM64FCVTSD {
  6055  			break
  6056  		}
  6057  		x := v_0_0.Args[0]
  6058  		v.reset(OpARM64FSQRTS)
  6059  		v.AddArg(x)
  6060  		return true
  6061  	}
  6062  	// match: (FCVTDS (FRINTPD (FCVTSD x)))
  6063  	// result: (FRINTPS x)
  6064  	for {
  6065  		if v_0.Op != OpARM64FRINTPD {
  6066  			break
  6067  		}
  6068  		v_0_0 := v_0.Args[0]
  6069  		if v_0_0.Op != OpARM64FCVTSD {
  6070  			break
  6071  		}
  6072  		x := v_0_0.Args[0]
  6073  		v.reset(OpARM64FRINTPS)
  6074  		v.AddArg(x)
  6075  		return true
  6076  	}
  6077  	// match: (FCVTDS (FRINTMD (FCVTSD x)))
  6078  	// result: (FRINTMS x)
  6079  	for {
  6080  		if v_0.Op != OpARM64FRINTMD {
  6081  			break
  6082  		}
  6083  		v_0_0 := v_0.Args[0]
  6084  		if v_0_0.Op != OpARM64FCVTSD {
  6085  			break
  6086  		}
  6087  		x := v_0_0.Args[0]
  6088  		v.reset(OpARM64FRINTMS)
  6089  		v.AddArg(x)
  6090  		return true
  6091  	}
  6092  	// match: (FCVTDS (FRINTAD (FCVTSD x)))
  6093  	// result: (FRINTAS x)
  6094  	for {
  6095  		if v_0.Op != OpARM64FRINTAD {
  6096  			break
  6097  		}
  6098  		v_0_0 := v_0.Args[0]
  6099  		if v_0_0.Op != OpARM64FCVTSD {
  6100  			break
  6101  		}
  6102  		x := v_0_0.Args[0]
  6103  		v.reset(OpARM64FRINTAS)
  6104  		v.AddArg(x)
  6105  		return true
  6106  	}
  6107  	// match: (FCVTDS (FRINTND (FCVTSD x)))
  6108  	// result: (FRINTNS x)
  6109  	for {
  6110  		if v_0.Op != OpARM64FRINTND {
  6111  			break
  6112  		}
  6113  		v_0_0 := v_0.Args[0]
  6114  		if v_0_0.Op != OpARM64FCVTSD {
  6115  			break
  6116  		}
  6117  		x := v_0_0.Args[0]
  6118  		v.reset(OpARM64FRINTNS)
  6119  		v.AddArg(x)
  6120  		return true
  6121  	}
  6122  	// match: (FCVTDS (FRINTZD (FCVTSD x)))
  6123  	// result: (FRINTZS x)
  6124  	for {
  6125  		if v_0.Op != OpARM64FRINTZD {
  6126  			break
  6127  		}
  6128  		v_0_0 := v_0.Args[0]
  6129  		if v_0_0.Op != OpARM64FCVTSD {
  6130  			break
  6131  		}
  6132  		x := v_0_0.Args[0]
  6133  		v.reset(OpARM64FRINTZS)
  6134  		v.AddArg(x)
  6135  		return true
  6136  	}
  6137  	return false
  6138  }
  6139  func rewriteValueARM64_OpARM64FLDPQ(v *Value) bool {
  6140  	v_1 := v.Args[1]
  6141  	v_0 := v.Args[0]
  6142  	b := v.Block
  6143  	config := b.Func.Config
  6144  	// match: (FLDPQ [off1] {sym} (ADDconst [off2] ptr) mem)
  6145  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6146  	// result: (FLDPQ [off1+int32(off2)] {sym} ptr mem)
  6147  	for {
  6148  		off1 := auxIntToInt32(v.AuxInt)
  6149  		sym := auxToSym(v.Aux)
  6150  		if v_0.Op != OpARM64ADDconst {
  6151  			break
  6152  		}
  6153  		off2 := auxIntToInt64(v_0.AuxInt)
  6154  		ptr := v_0.Args[0]
  6155  		mem := v_1
  6156  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6157  			break
  6158  		}
  6159  		v.reset(OpARM64FLDPQ)
  6160  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6161  		v.Aux = symToAux(sym)
  6162  		v.AddArg2(ptr, mem)
  6163  		return true
  6164  	}
  6165  	// match: (FLDPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6166  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6167  	// result: (FLDPQ [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6168  	for {
  6169  		off1 := auxIntToInt32(v.AuxInt)
  6170  		sym1 := auxToSym(v.Aux)
  6171  		if v_0.Op != OpARM64MOVDaddr {
  6172  			break
  6173  		}
  6174  		off2 := auxIntToInt32(v_0.AuxInt)
  6175  		sym2 := auxToSym(v_0.Aux)
  6176  		ptr := v_0.Args[0]
  6177  		mem := v_1
  6178  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6179  			break
  6180  		}
  6181  		v.reset(OpARM64FLDPQ)
  6182  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6183  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6184  		v.AddArg2(ptr, mem)
  6185  		return true
  6186  	}
  6187  	return false
  6188  }
  6189  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  6190  	v_0 := v.Args[0]
  6191  	b := v.Block
  6192  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  6193  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  6194  	for {
  6195  		t := v.Type
  6196  		if v_0.Op != OpArg {
  6197  			break
  6198  		}
  6199  		off := auxIntToInt32(v_0.AuxInt)
  6200  		sym := auxToSym(v_0.Aux)
  6201  		b = b.Func.Entry
  6202  		v0 := b.NewValue0(v.Pos, OpArg, t)
  6203  		v.copyOf(v0)
  6204  		v0.AuxInt = int32ToAuxInt(off)
  6205  		v0.Aux = symToAux(sym)
  6206  		return true
  6207  	}
  6208  	return false
  6209  }
  6210  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  6211  	v_0 := v.Args[0]
  6212  	b := v.Block
  6213  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  6214  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  6215  	for {
  6216  		t := v.Type
  6217  		if v_0.Op != OpArg {
  6218  			break
  6219  		}
  6220  		off := auxIntToInt32(v_0.AuxInt)
  6221  		sym := auxToSym(v_0.Aux)
  6222  		b = b.Func.Entry
  6223  		v0 := b.NewValue0(v.Pos, OpArg, t)
  6224  		v.copyOf(v0)
  6225  		v0.AuxInt = int32ToAuxInt(off)
  6226  		v0.Aux = symToAux(sym)
  6227  		return true
  6228  	}
  6229  	return false
  6230  }
  6231  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  6232  	v_1 := v.Args[1]
  6233  	v_0 := v.Args[0]
  6234  	b := v.Block
  6235  	config := b.Func.Config
  6236  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  6237  	// result: (FMOVDgpfp val)
  6238  	for {
  6239  		off := auxIntToInt32(v.AuxInt)
  6240  		sym := auxToSym(v.Aux)
  6241  		ptr := v_0
  6242  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  6243  			break
  6244  		}
  6245  		val := v_1.Args[1]
  6246  		if ptr != v_1.Args[0] {
  6247  			break
  6248  		}
  6249  		v.reset(OpARM64FMOVDgpfp)
  6250  		v.AddArg(val)
  6251  		return true
  6252  	}
  6253  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  6254  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6255  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  6256  	for {
  6257  		off1 := auxIntToInt32(v.AuxInt)
  6258  		sym := auxToSym(v.Aux)
  6259  		if v_0.Op != OpARM64ADDconst {
  6260  			break
  6261  		}
  6262  		off2 := auxIntToInt64(v_0.AuxInt)
  6263  		ptr := v_0.Args[0]
  6264  		mem := v_1
  6265  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6266  			break
  6267  		}
  6268  		v.reset(OpARM64FMOVDload)
  6269  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6270  		v.Aux = symToAux(sym)
  6271  		v.AddArg2(ptr, mem)
  6272  		return true
  6273  	}
  6274  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  6275  	// cond: off == 0 && sym == nil
  6276  	// result: (FMOVDloadidx ptr idx mem)
  6277  	for {
  6278  		off := auxIntToInt32(v.AuxInt)
  6279  		sym := auxToSym(v.Aux)
  6280  		if v_0.Op != OpARM64ADD {
  6281  			break
  6282  		}
  6283  		idx := v_0.Args[1]
  6284  		ptr := v_0.Args[0]
  6285  		mem := v_1
  6286  		if !(off == 0 && sym == nil) {
  6287  			break
  6288  		}
  6289  		v.reset(OpARM64FMOVDloadidx)
  6290  		v.AddArg3(ptr, idx, mem)
  6291  		return true
  6292  	}
  6293  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  6294  	// cond: off == 0 && sym == nil
  6295  	// result: (FMOVDloadidx8 ptr idx mem)
  6296  	for {
  6297  		off := auxIntToInt32(v.AuxInt)
  6298  		sym := auxToSym(v.Aux)
  6299  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  6300  			break
  6301  		}
  6302  		idx := v_0.Args[1]
  6303  		ptr := v_0.Args[0]
  6304  		mem := v_1
  6305  		if !(off == 0 && sym == nil) {
  6306  			break
  6307  		}
  6308  		v.reset(OpARM64FMOVDloadidx8)
  6309  		v.AddArg3(ptr, idx, mem)
  6310  		return true
  6311  	}
  6312  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6313  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6314  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6315  	for {
  6316  		off1 := auxIntToInt32(v.AuxInt)
  6317  		sym1 := auxToSym(v.Aux)
  6318  		if v_0.Op != OpARM64MOVDaddr {
  6319  			break
  6320  		}
  6321  		off2 := auxIntToInt32(v_0.AuxInt)
  6322  		sym2 := auxToSym(v_0.Aux)
  6323  		ptr := v_0.Args[0]
  6324  		mem := v_1
  6325  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6326  			break
  6327  		}
  6328  		v.reset(OpARM64FMOVDload)
  6329  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6330  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6331  		v.AddArg2(ptr, mem)
  6332  		return true
  6333  	}
  6334  	return false
  6335  }
  6336  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  6337  	v_2 := v.Args[2]
  6338  	v_1 := v.Args[1]
  6339  	v_0 := v.Args[0]
  6340  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  6341  	// cond: is32Bit(c)
  6342  	// result: (FMOVDload [int32(c)] ptr mem)
  6343  	for {
  6344  		ptr := v_0
  6345  		if v_1.Op != OpARM64MOVDconst {
  6346  			break
  6347  		}
  6348  		c := auxIntToInt64(v_1.AuxInt)
  6349  		mem := v_2
  6350  		if !(is32Bit(c)) {
  6351  			break
  6352  		}
  6353  		v.reset(OpARM64FMOVDload)
  6354  		v.AuxInt = int32ToAuxInt(int32(c))
  6355  		v.AddArg2(ptr, mem)
  6356  		return true
  6357  	}
  6358  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  6359  	// cond: is32Bit(c)
  6360  	// result: (FMOVDload [int32(c)] ptr mem)
  6361  	for {
  6362  		if v_0.Op != OpARM64MOVDconst {
  6363  			break
  6364  		}
  6365  		c := auxIntToInt64(v_0.AuxInt)
  6366  		ptr := v_1
  6367  		mem := v_2
  6368  		if !(is32Bit(c)) {
  6369  			break
  6370  		}
  6371  		v.reset(OpARM64FMOVDload)
  6372  		v.AuxInt = int32ToAuxInt(int32(c))
  6373  		v.AddArg2(ptr, mem)
  6374  		return true
  6375  	}
  6376  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  6377  	// result: (FMOVDloadidx8 ptr idx mem)
  6378  	for {
  6379  		ptr := v_0
  6380  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  6381  			break
  6382  		}
  6383  		idx := v_1.Args[0]
  6384  		mem := v_2
  6385  		v.reset(OpARM64FMOVDloadidx8)
  6386  		v.AddArg3(ptr, idx, mem)
  6387  		return true
  6388  	}
  6389  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  6390  	// result: (FMOVDloadidx8 ptr idx mem)
  6391  	for {
  6392  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  6393  			break
  6394  		}
  6395  		idx := v_0.Args[0]
  6396  		ptr := v_1
  6397  		mem := v_2
  6398  		v.reset(OpARM64FMOVDloadidx8)
  6399  		v.AddArg3(ptr, idx, mem)
  6400  		return true
  6401  	}
  6402  	return false
  6403  }
  6404  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  6405  	v_2 := v.Args[2]
  6406  	v_1 := v.Args[1]
  6407  	v_0 := v.Args[0]
  6408  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  6409  	// cond: is32Bit(c<<3)
  6410  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  6411  	for {
  6412  		ptr := v_0
  6413  		if v_1.Op != OpARM64MOVDconst {
  6414  			break
  6415  		}
  6416  		c := auxIntToInt64(v_1.AuxInt)
  6417  		mem := v_2
  6418  		if !(is32Bit(c << 3)) {
  6419  			break
  6420  		}
  6421  		v.reset(OpARM64FMOVDload)
  6422  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  6423  		v.AddArg2(ptr, mem)
  6424  		return true
  6425  	}
  6426  	return false
  6427  }
  6428  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  6429  	v_2 := v.Args[2]
  6430  	v_1 := v.Args[1]
  6431  	v_0 := v.Args[0]
  6432  	b := v.Block
  6433  	config := b.Func.Config
  6434  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  6435  	// result: (MOVDstore [off] {sym} ptr val mem)
  6436  	for {
  6437  		off := auxIntToInt32(v.AuxInt)
  6438  		sym := auxToSym(v.Aux)
  6439  		ptr := v_0
  6440  		if v_1.Op != OpARM64FMOVDgpfp {
  6441  			break
  6442  		}
  6443  		val := v_1.Args[0]
  6444  		mem := v_2
  6445  		v.reset(OpARM64MOVDstore)
  6446  		v.AuxInt = int32ToAuxInt(off)
  6447  		v.Aux = symToAux(sym)
  6448  		v.AddArg3(ptr, val, mem)
  6449  		return true
  6450  	}
  6451  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6452  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6453  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  6454  	for {
  6455  		off1 := auxIntToInt32(v.AuxInt)
  6456  		sym := auxToSym(v.Aux)
  6457  		if v_0.Op != OpARM64ADDconst {
  6458  			break
  6459  		}
  6460  		off2 := auxIntToInt64(v_0.AuxInt)
  6461  		ptr := v_0.Args[0]
  6462  		val := v_1
  6463  		mem := v_2
  6464  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6465  			break
  6466  		}
  6467  		v.reset(OpARM64FMOVDstore)
  6468  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6469  		v.Aux = symToAux(sym)
  6470  		v.AddArg3(ptr, val, mem)
  6471  		return true
  6472  	}
  6473  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  6474  	// cond: off == 0 && sym == nil
  6475  	// result: (FMOVDstoreidx ptr idx val mem)
  6476  	for {
  6477  		off := auxIntToInt32(v.AuxInt)
  6478  		sym := auxToSym(v.Aux)
  6479  		if v_0.Op != OpARM64ADD {
  6480  			break
  6481  		}
  6482  		idx := v_0.Args[1]
  6483  		ptr := v_0.Args[0]
  6484  		val := v_1
  6485  		mem := v_2
  6486  		if !(off == 0 && sym == nil) {
  6487  			break
  6488  		}
  6489  		v.reset(OpARM64FMOVDstoreidx)
  6490  		v.AddArg4(ptr, idx, val, mem)
  6491  		return true
  6492  	}
  6493  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  6494  	// cond: off == 0 && sym == nil
  6495  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6496  	for {
  6497  		off := auxIntToInt32(v.AuxInt)
  6498  		sym := auxToSym(v.Aux)
  6499  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  6500  			break
  6501  		}
  6502  		idx := v_0.Args[1]
  6503  		ptr := v_0.Args[0]
  6504  		val := v_1
  6505  		mem := v_2
  6506  		if !(off == 0 && sym == nil) {
  6507  			break
  6508  		}
  6509  		v.reset(OpARM64FMOVDstoreidx8)
  6510  		v.AddArg4(ptr, idx, val, mem)
  6511  		return true
  6512  	}
  6513  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  6514  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6515  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6516  	for {
  6517  		off1 := auxIntToInt32(v.AuxInt)
  6518  		sym1 := auxToSym(v.Aux)
  6519  		if v_0.Op != OpARM64MOVDaddr {
  6520  			break
  6521  		}
  6522  		off2 := auxIntToInt32(v_0.AuxInt)
  6523  		sym2 := auxToSym(v_0.Aux)
  6524  		ptr := v_0.Args[0]
  6525  		val := v_1
  6526  		mem := v_2
  6527  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6528  			break
  6529  		}
  6530  		v.reset(OpARM64FMOVDstore)
  6531  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6532  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6533  		v.AddArg3(ptr, val, mem)
  6534  		return true
  6535  	}
  6536  	return false
  6537  }
  6538  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  6539  	v_3 := v.Args[3]
  6540  	v_2 := v.Args[2]
  6541  	v_1 := v.Args[1]
  6542  	v_0 := v.Args[0]
  6543  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  6544  	// cond: is32Bit(c)
  6545  	// result: (FMOVDstore [int32(c)] ptr val mem)
  6546  	for {
  6547  		ptr := v_0
  6548  		if v_1.Op != OpARM64MOVDconst {
  6549  			break
  6550  		}
  6551  		c := auxIntToInt64(v_1.AuxInt)
  6552  		val := v_2
  6553  		mem := v_3
  6554  		if !(is32Bit(c)) {
  6555  			break
  6556  		}
  6557  		v.reset(OpARM64FMOVDstore)
  6558  		v.AuxInt = int32ToAuxInt(int32(c))
  6559  		v.AddArg3(ptr, val, mem)
  6560  		return true
  6561  	}
  6562  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  6563  	// cond: is32Bit(c)
  6564  	// result: (FMOVDstore [int32(c)] idx val mem)
  6565  	for {
  6566  		if v_0.Op != OpARM64MOVDconst {
  6567  			break
  6568  		}
  6569  		c := auxIntToInt64(v_0.AuxInt)
  6570  		idx := v_1
  6571  		val := v_2
  6572  		mem := v_3
  6573  		if !(is32Bit(c)) {
  6574  			break
  6575  		}
  6576  		v.reset(OpARM64FMOVDstore)
  6577  		v.AuxInt = int32ToAuxInt(int32(c))
  6578  		v.AddArg3(idx, val, mem)
  6579  		return true
  6580  	}
  6581  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  6582  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6583  	for {
  6584  		ptr := v_0
  6585  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  6586  			break
  6587  		}
  6588  		idx := v_1.Args[0]
  6589  		val := v_2
  6590  		mem := v_3
  6591  		v.reset(OpARM64FMOVDstoreidx8)
  6592  		v.AddArg4(ptr, idx, val, mem)
  6593  		return true
  6594  	}
  6595  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  6596  	// result: (FMOVDstoreidx8 ptr idx val mem)
  6597  	for {
  6598  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  6599  			break
  6600  		}
  6601  		idx := v_0.Args[0]
  6602  		ptr := v_1
  6603  		val := v_2
  6604  		mem := v_3
  6605  		v.reset(OpARM64FMOVDstoreidx8)
  6606  		v.AddArg4(ptr, idx, val, mem)
  6607  		return true
  6608  	}
  6609  	return false
  6610  }
  6611  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  6612  	v_3 := v.Args[3]
  6613  	v_2 := v.Args[2]
  6614  	v_1 := v.Args[1]
  6615  	v_0 := v.Args[0]
  6616  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  6617  	// cond: is32Bit(c<<3)
  6618  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  6619  	for {
  6620  		ptr := v_0
  6621  		if v_1.Op != OpARM64MOVDconst {
  6622  			break
  6623  		}
  6624  		c := auxIntToInt64(v_1.AuxInt)
  6625  		val := v_2
  6626  		mem := v_3
  6627  		if !(is32Bit(c << 3)) {
  6628  			break
  6629  		}
  6630  		v.reset(OpARM64FMOVDstore)
  6631  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  6632  		v.AddArg3(ptr, val, mem)
  6633  		return true
  6634  	}
  6635  	return false
  6636  }
  6637  func rewriteValueARM64_OpARM64FMOVQload(v *Value) bool {
  6638  	v_1 := v.Args[1]
  6639  	v_0 := v.Args[0]
  6640  	b := v.Block
  6641  	config := b.Func.Config
  6642  	// match: (FMOVQload [off1] {sym} (ADDconst [off2] ptr) mem)
  6643  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6644  	// result: (FMOVQload [off1+int32(off2)] {sym} ptr mem)
  6645  	for {
  6646  		off1 := auxIntToInt32(v.AuxInt)
  6647  		sym := auxToSym(v.Aux)
  6648  		if v_0.Op != OpARM64ADDconst {
  6649  			break
  6650  		}
  6651  		off2 := auxIntToInt64(v_0.AuxInt)
  6652  		ptr := v_0.Args[0]
  6653  		mem := v_1
  6654  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6655  			break
  6656  		}
  6657  		v.reset(OpARM64FMOVQload)
  6658  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6659  		v.Aux = symToAux(sym)
  6660  		v.AddArg2(ptr, mem)
  6661  		return true
  6662  	}
  6663  	// match: (FMOVQload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6664  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6665  	// result: (FMOVQload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6666  	for {
  6667  		off1 := auxIntToInt32(v.AuxInt)
  6668  		sym1 := auxToSym(v.Aux)
  6669  		if v_0.Op != OpARM64MOVDaddr {
  6670  			break
  6671  		}
  6672  		off2 := auxIntToInt32(v_0.AuxInt)
  6673  		sym2 := auxToSym(v_0.Aux)
  6674  		ptr := v_0.Args[0]
  6675  		mem := v_1
  6676  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6677  			break
  6678  		}
  6679  		v.reset(OpARM64FMOVQload)
  6680  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6681  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6682  		v.AddArg2(ptr, mem)
  6683  		return true
  6684  	}
  6685  	return false
  6686  }
  6687  func rewriteValueARM64_OpARM64FMOVQstore(v *Value) bool {
  6688  	v_2 := v.Args[2]
  6689  	v_1 := v.Args[1]
  6690  	v_0 := v.Args[0]
  6691  	b := v.Block
  6692  	config := b.Func.Config
  6693  	// match: (FMOVQstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6694  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6695  	// result: (FMOVQstore [off1+int32(off2)] {sym} ptr val mem)
  6696  	for {
  6697  		off1 := auxIntToInt32(v.AuxInt)
  6698  		sym := auxToSym(v.Aux)
  6699  		if v_0.Op != OpARM64ADDconst {
  6700  			break
  6701  		}
  6702  		off2 := auxIntToInt64(v_0.AuxInt)
  6703  		ptr := v_0.Args[0]
  6704  		val := v_1
  6705  		mem := v_2
  6706  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6707  			break
  6708  		}
  6709  		v.reset(OpARM64FMOVQstore)
  6710  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6711  		v.Aux = symToAux(sym)
  6712  		v.AddArg3(ptr, val, mem)
  6713  		return true
  6714  	}
  6715  	// match: (FMOVQstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  6716  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6717  	// result: (FMOVQstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6718  	for {
  6719  		off1 := auxIntToInt32(v.AuxInt)
  6720  		sym1 := auxToSym(v.Aux)
  6721  		if v_0.Op != OpARM64MOVDaddr {
  6722  			break
  6723  		}
  6724  		off2 := auxIntToInt32(v_0.AuxInt)
  6725  		sym2 := auxToSym(v_0.Aux)
  6726  		ptr := v_0.Args[0]
  6727  		val := v_1
  6728  		mem := v_2
  6729  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6730  			break
  6731  		}
  6732  		v.reset(OpARM64FMOVQstore)
  6733  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6734  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6735  		v.AddArg3(ptr, val, mem)
  6736  		return true
  6737  	}
  6738  	return false
  6739  }
  6740  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  6741  	v_1 := v.Args[1]
  6742  	v_0 := v.Args[0]
  6743  	b := v.Block
  6744  	config := b.Func.Config
  6745  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  6746  	// result: (FMOVSgpfp val)
  6747  	for {
  6748  		off := auxIntToInt32(v.AuxInt)
  6749  		sym := auxToSym(v.Aux)
  6750  		ptr := v_0
  6751  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  6752  			break
  6753  		}
  6754  		val := v_1.Args[1]
  6755  		if ptr != v_1.Args[0] {
  6756  			break
  6757  		}
  6758  		v.reset(OpARM64FMOVSgpfp)
  6759  		v.AddArg(val)
  6760  		return true
  6761  	}
  6762  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  6763  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6764  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  6765  	for {
  6766  		off1 := auxIntToInt32(v.AuxInt)
  6767  		sym := auxToSym(v.Aux)
  6768  		if v_0.Op != OpARM64ADDconst {
  6769  			break
  6770  		}
  6771  		off2 := auxIntToInt64(v_0.AuxInt)
  6772  		ptr := v_0.Args[0]
  6773  		mem := v_1
  6774  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6775  			break
  6776  		}
  6777  		v.reset(OpARM64FMOVSload)
  6778  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6779  		v.Aux = symToAux(sym)
  6780  		v.AddArg2(ptr, mem)
  6781  		return true
  6782  	}
  6783  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  6784  	// cond: off == 0 && sym == nil
  6785  	// result: (FMOVSloadidx ptr idx mem)
  6786  	for {
  6787  		off := auxIntToInt32(v.AuxInt)
  6788  		sym := auxToSym(v.Aux)
  6789  		if v_0.Op != OpARM64ADD {
  6790  			break
  6791  		}
  6792  		idx := v_0.Args[1]
  6793  		ptr := v_0.Args[0]
  6794  		mem := v_1
  6795  		if !(off == 0 && sym == nil) {
  6796  			break
  6797  		}
  6798  		v.reset(OpARM64FMOVSloadidx)
  6799  		v.AddArg3(ptr, idx, mem)
  6800  		return true
  6801  	}
  6802  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  6803  	// cond: off == 0 && sym == nil
  6804  	// result: (FMOVSloadidx4 ptr idx mem)
  6805  	for {
  6806  		off := auxIntToInt32(v.AuxInt)
  6807  		sym := auxToSym(v.Aux)
  6808  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  6809  			break
  6810  		}
  6811  		idx := v_0.Args[1]
  6812  		ptr := v_0.Args[0]
  6813  		mem := v_1
  6814  		if !(off == 0 && sym == nil) {
  6815  			break
  6816  		}
  6817  		v.reset(OpARM64FMOVSloadidx4)
  6818  		v.AddArg3(ptr, idx, mem)
  6819  		return true
  6820  	}
  6821  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6822  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6823  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6824  	for {
  6825  		off1 := auxIntToInt32(v.AuxInt)
  6826  		sym1 := auxToSym(v.Aux)
  6827  		if v_0.Op != OpARM64MOVDaddr {
  6828  			break
  6829  		}
  6830  		off2 := auxIntToInt32(v_0.AuxInt)
  6831  		sym2 := auxToSym(v_0.Aux)
  6832  		ptr := v_0.Args[0]
  6833  		mem := v_1
  6834  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6835  			break
  6836  		}
  6837  		v.reset(OpARM64FMOVSload)
  6838  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6839  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6840  		v.AddArg2(ptr, mem)
  6841  		return true
  6842  	}
  6843  	return false
  6844  }
  6845  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  6846  	v_2 := v.Args[2]
  6847  	v_1 := v.Args[1]
  6848  	v_0 := v.Args[0]
  6849  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  6850  	// cond: is32Bit(c)
  6851  	// result: (FMOVSload [int32(c)] ptr mem)
  6852  	for {
  6853  		ptr := v_0
  6854  		if v_1.Op != OpARM64MOVDconst {
  6855  			break
  6856  		}
  6857  		c := auxIntToInt64(v_1.AuxInt)
  6858  		mem := v_2
  6859  		if !(is32Bit(c)) {
  6860  			break
  6861  		}
  6862  		v.reset(OpARM64FMOVSload)
  6863  		v.AuxInt = int32ToAuxInt(int32(c))
  6864  		v.AddArg2(ptr, mem)
  6865  		return true
  6866  	}
  6867  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  6868  	// cond: is32Bit(c)
  6869  	// result: (FMOVSload [int32(c)] ptr mem)
  6870  	for {
  6871  		if v_0.Op != OpARM64MOVDconst {
  6872  			break
  6873  		}
  6874  		c := auxIntToInt64(v_0.AuxInt)
  6875  		ptr := v_1
  6876  		mem := v_2
  6877  		if !(is32Bit(c)) {
  6878  			break
  6879  		}
  6880  		v.reset(OpARM64FMOVSload)
  6881  		v.AuxInt = int32ToAuxInt(int32(c))
  6882  		v.AddArg2(ptr, mem)
  6883  		return true
  6884  	}
  6885  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  6886  	// result: (FMOVSloadidx4 ptr idx mem)
  6887  	for {
  6888  		ptr := v_0
  6889  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  6890  			break
  6891  		}
  6892  		idx := v_1.Args[0]
  6893  		mem := v_2
  6894  		v.reset(OpARM64FMOVSloadidx4)
  6895  		v.AddArg3(ptr, idx, mem)
  6896  		return true
  6897  	}
  6898  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  6899  	// result: (FMOVSloadidx4 ptr idx mem)
  6900  	for {
  6901  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  6902  			break
  6903  		}
  6904  		idx := v_0.Args[0]
  6905  		ptr := v_1
  6906  		mem := v_2
  6907  		v.reset(OpARM64FMOVSloadidx4)
  6908  		v.AddArg3(ptr, idx, mem)
  6909  		return true
  6910  	}
  6911  	return false
  6912  }
  6913  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  6914  	v_2 := v.Args[2]
  6915  	v_1 := v.Args[1]
  6916  	v_0 := v.Args[0]
  6917  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  6918  	// cond: is32Bit(c<<2)
  6919  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  6920  	for {
  6921  		ptr := v_0
  6922  		if v_1.Op != OpARM64MOVDconst {
  6923  			break
  6924  		}
  6925  		c := auxIntToInt64(v_1.AuxInt)
  6926  		mem := v_2
  6927  		if !(is32Bit(c << 2)) {
  6928  			break
  6929  		}
  6930  		v.reset(OpARM64FMOVSload)
  6931  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  6932  		v.AddArg2(ptr, mem)
  6933  		return true
  6934  	}
  6935  	return false
  6936  }
  6937  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  6938  	v_2 := v.Args[2]
  6939  	v_1 := v.Args[1]
  6940  	v_0 := v.Args[0]
  6941  	b := v.Block
  6942  	config := b.Func.Config
  6943  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  6944  	// result: (MOVWstore [off] {sym} ptr val mem)
  6945  	for {
  6946  		off := auxIntToInt32(v.AuxInt)
  6947  		sym := auxToSym(v.Aux)
  6948  		ptr := v_0
  6949  		if v_1.Op != OpARM64FMOVSgpfp {
  6950  			break
  6951  		}
  6952  		val := v_1.Args[0]
  6953  		mem := v_2
  6954  		v.reset(OpARM64MOVWstore)
  6955  		v.AuxInt = int32ToAuxInt(off)
  6956  		v.Aux = symToAux(sym)
  6957  		v.AddArg3(ptr, val, mem)
  6958  		return true
  6959  	}
  6960  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6961  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6962  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  6963  	for {
  6964  		off1 := auxIntToInt32(v.AuxInt)
  6965  		sym := auxToSym(v.Aux)
  6966  		if v_0.Op != OpARM64ADDconst {
  6967  			break
  6968  		}
  6969  		off2 := auxIntToInt64(v_0.AuxInt)
  6970  		ptr := v_0.Args[0]
  6971  		val := v_1
  6972  		mem := v_2
  6973  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6974  			break
  6975  		}
  6976  		v.reset(OpARM64FMOVSstore)
  6977  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6978  		v.Aux = symToAux(sym)
  6979  		v.AddArg3(ptr, val, mem)
  6980  		return true
  6981  	}
  6982  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  6983  	// cond: off == 0 && sym == nil
  6984  	// result: (FMOVSstoreidx ptr idx val mem)
  6985  	for {
  6986  		off := auxIntToInt32(v.AuxInt)
  6987  		sym := auxToSym(v.Aux)
  6988  		if v_0.Op != OpARM64ADD {
  6989  			break
  6990  		}
  6991  		idx := v_0.Args[1]
  6992  		ptr := v_0.Args[0]
  6993  		val := v_1
  6994  		mem := v_2
  6995  		if !(off == 0 && sym == nil) {
  6996  			break
  6997  		}
  6998  		v.reset(OpARM64FMOVSstoreidx)
  6999  		v.AddArg4(ptr, idx, val, mem)
  7000  		return true
  7001  	}
  7002  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  7003  	// cond: off == 0 && sym == nil
  7004  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7005  	for {
  7006  		off := auxIntToInt32(v.AuxInt)
  7007  		sym := auxToSym(v.Aux)
  7008  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  7009  			break
  7010  		}
  7011  		idx := v_0.Args[1]
  7012  		ptr := v_0.Args[0]
  7013  		val := v_1
  7014  		mem := v_2
  7015  		if !(off == 0 && sym == nil) {
  7016  			break
  7017  		}
  7018  		v.reset(OpARM64FMOVSstoreidx4)
  7019  		v.AddArg4(ptr, idx, val, mem)
  7020  		return true
  7021  	}
  7022  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  7023  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7024  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7025  	for {
  7026  		off1 := auxIntToInt32(v.AuxInt)
  7027  		sym1 := auxToSym(v.Aux)
  7028  		if v_0.Op != OpARM64MOVDaddr {
  7029  			break
  7030  		}
  7031  		off2 := auxIntToInt32(v_0.AuxInt)
  7032  		sym2 := auxToSym(v_0.Aux)
  7033  		ptr := v_0.Args[0]
  7034  		val := v_1
  7035  		mem := v_2
  7036  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7037  			break
  7038  		}
  7039  		v.reset(OpARM64FMOVSstore)
  7040  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7041  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7042  		v.AddArg3(ptr, val, mem)
  7043  		return true
  7044  	}
  7045  	return false
  7046  }
  7047  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  7048  	v_3 := v.Args[3]
  7049  	v_2 := v.Args[2]
  7050  	v_1 := v.Args[1]
  7051  	v_0 := v.Args[0]
  7052  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  7053  	// cond: is32Bit(c)
  7054  	// result: (FMOVSstore [int32(c)] ptr val mem)
  7055  	for {
  7056  		ptr := v_0
  7057  		if v_1.Op != OpARM64MOVDconst {
  7058  			break
  7059  		}
  7060  		c := auxIntToInt64(v_1.AuxInt)
  7061  		val := v_2
  7062  		mem := v_3
  7063  		if !(is32Bit(c)) {
  7064  			break
  7065  		}
  7066  		v.reset(OpARM64FMOVSstore)
  7067  		v.AuxInt = int32ToAuxInt(int32(c))
  7068  		v.AddArg3(ptr, val, mem)
  7069  		return true
  7070  	}
  7071  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  7072  	// cond: is32Bit(c)
  7073  	// result: (FMOVSstore [int32(c)] idx val mem)
  7074  	for {
  7075  		if v_0.Op != OpARM64MOVDconst {
  7076  			break
  7077  		}
  7078  		c := auxIntToInt64(v_0.AuxInt)
  7079  		idx := v_1
  7080  		val := v_2
  7081  		mem := v_3
  7082  		if !(is32Bit(c)) {
  7083  			break
  7084  		}
  7085  		v.reset(OpARM64FMOVSstore)
  7086  		v.AuxInt = int32ToAuxInt(int32(c))
  7087  		v.AddArg3(idx, val, mem)
  7088  		return true
  7089  	}
  7090  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  7091  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7092  	for {
  7093  		ptr := v_0
  7094  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  7095  			break
  7096  		}
  7097  		idx := v_1.Args[0]
  7098  		val := v_2
  7099  		mem := v_3
  7100  		v.reset(OpARM64FMOVSstoreidx4)
  7101  		v.AddArg4(ptr, idx, val, mem)
  7102  		return true
  7103  	}
  7104  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  7105  	// result: (FMOVSstoreidx4 ptr idx val mem)
  7106  	for {
  7107  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  7108  			break
  7109  		}
  7110  		idx := v_0.Args[0]
  7111  		ptr := v_1
  7112  		val := v_2
  7113  		mem := v_3
  7114  		v.reset(OpARM64FMOVSstoreidx4)
  7115  		v.AddArg4(ptr, idx, val, mem)
  7116  		return true
  7117  	}
  7118  	return false
  7119  }
  7120  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  7121  	v_3 := v.Args[3]
  7122  	v_2 := v.Args[2]
  7123  	v_1 := v.Args[1]
  7124  	v_0 := v.Args[0]
  7125  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  7126  	// cond: is32Bit(c<<2)
  7127  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  7128  	for {
  7129  		ptr := v_0
  7130  		if v_1.Op != OpARM64MOVDconst {
  7131  			break
  7132  		}
  7133  		c := auxIntToInt64(v_1.AuxInt)
  7134  		val := v_2
  7135  		mem := v_3
  7136  		if !(is32Bit(c << 2)) {
  7137  			break
  7138  		}
  7139  		v.reset(OpARM64FMOVSstore)
  7140  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  7141  		v.AddArg3(ptr, val, mem)
  7142  		return true
  7143  	}
  7144  	return false
  7145  }
  7146  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  7147  	v_1 := v.Args[1]
  7148  	v_0 := v.Args[0]
  7149  	// match: (FMULD (FNEGD x) y)
  7150  	// result: (FNMULD x y)
  7151  	for {
  7152  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7153  			if v_0.Op != OpARM64FNEGD {
  7154  				continue
  7155  			}
  7156  			x := v_0.Args[0]
  7157  			y := v_1
  7158  			v.reset(OpARM64FNMULD)
  7159  			v.AddArg2(x, y)
  7160  			return true
  7161  		}
  7162  		break
  7163  	}
  7164  	return false
  7165  }
  7166  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  7167  	v_1 := v.Args[1]
  7168  	v_0 := v.Args[0]
  7169  	// match: (FMULS (FNEGS x) y)
  7170  	// result: (FNMULS x y)
  7171  	for {
  7172  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7173  			if v_0.Op != OpARM64FNEGS {
  7174  				continue
  7175  			}
  7176  			x := v_0.Args[0]
  7177  			y := v_1
  7178  			v.reset(OpARM64FNMULS)
  7179  			v.AddArg2(x, y)
  7180  			return true
  7181  		}
  7182  		break
  7183  	}
  7184  	return false
  7185  }
  7186  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  7187  	v_0 := v.Args[0]
  7188  	// match: (FNEGD (FMULD x y))
  7189  	// result: (FNMULD x y)
  7190  	for {
  7191  		if v_0.Op != OpARM64FMULD {
  7192  			break
  7193  		}
  7194  		y := v_0.Args[1]
  7195  		x := v_0.Args[0]
  7196  		v.reset(OpARM64FNMULD)
  7197  		v.AddArg2(x, y)
  7198  		return true
  7199  	}
  7200  	// match: (FNEGD (FNMULD x y))
  7201  	// result: (FMULD x y)
  7202  	for {
  7203  		if v_0.Op != OpARM64FNMULD {
  7204  			break
  7205  		}
  7206  		y := v_0.Args[1]
  7207  		x := v_0.Args[0]
  7208  		v.reset(OpARM64FMULD)
  7209  		v.AddArg2(x, y)
  7210  		return true
  7211  	}
  7212  	return false
  7213  }
  7214  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  7215  	v_0 := v.Args[0]
  7216  	// match: (FNEGS (FMULS x y))
  7217  	// result: (FNMULS x y)
  7218  	for {
  7219  		if v_0.Op != OpARM64FMULS {
  7220  			break
  7221  		}
  7222  		y := v_0.Args[1]
  7223  		x := v_0.Args[0]
  7224  		v.reset(OpARM64FNMULS)
  7225  		v.AddArg2(x, y)
  7226  		return true
  7227  	}
  7228  	// match: (FNEGS (FNMULS x y))
  7229  	// result: (FMULS x y)
  7230  	for {
  7231  		if v_0.Op != OpARM64FNMULS {
  7232  			break
  7233  		}
  7234  		y := v_0.Args[1]
  7235  		x := v_0.Args[0]
  7236  		v.reset(OpARM64FMULS)
  7237  		v.AddArg2(x, y)
  7238  		return true
  7239  	}
  7240  	return false
  7241  }
  7242  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  7243  	v_1 := v.Args[1]
  7244  	v_0 := v.Args[0]
  7245  	// match: (FNMULD (FNEGD x) y)
  7246  	// result: (FMULD x y)
  7247  	for {
  7248  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7249  			if v_0.Op != OpARM64FNEGD {
  7250  				continue
  7251  			}
  7252  			x := v_0.Args[0]
  7253  			y := v_1
  7254  			v.reset(OpARM64FMULD)
  7255  			v.AddArg2(x, y)
  7256  			return true
  7257  		}
  7258  		break
  7259  	}
  7260  	return false
  7261  }
  7262  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  7263  	v_1 := v.Args[1]
  7264  	v_0 := v.Args[0]
  7265  	// match: (FNMULS (FNEGS x) y)
  7266  	// result: (FMULS x y)
  7267  	for {
  7268  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7269  			if v_0.Op != OpARM64FNEGS {
  7270  				continue
  7271  			}
  7272  			x := v_0.Args[0]
  7273  			y := v_1
  7274  			v.reset(OpARM64FMULS)
  7275  			v.AddArg2(x, y)
  7276  			return true
  7277  		}
  7278  		break
  7279  	}
  7280  	return false
  7281  }
  7282  func rewriteValueARM64_OpARM64FSTPQ(v *Value) bool {
  7283  	v_3 := v.Args[3]
  7284  	v_2 := v.Args[2]
  7285  	v_1 := v.Args[1]
  7286  	v_0 := v.Args[0]
  7287  	b := v.Block
  7288  	config := b.Func.Config
  7289  	// match: (FSTPQ [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
  7290  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7291  	// result: (FSTPQ [off1+int32(off2)] {sym} ptr val1 val2 mem)
  7292  	for {
  7293  		off1 := auxIntToInt32(v.AuxInt)
  7294  		sym := auxToSym(v.Aux)
  7295  		if v_0.Op != OpARM64ADDconst {
  7296  			break
  7297  		}
  7298  		off2 := auxIntToInt64(v_0.AuxInt)
  7299  		ptr := v_0.Args[0]
  7300  		val1 := v_1
  7301  		val2 := v_2
  7302  		mem := v_3
  7303  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7304  			break
  7305  		}
  7306  		v.reset(OpARM64FSTPQ)
  7307  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  7308  		v.Aux = symToAux(sym)
  7309  		v.AddArg4(ptr, val1, val2, mem)
  7310  		return true
  7311  	}
  7312  	// match: (FSTPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
  7313  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  7314  	// result: (FSTPQ [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
  7315  	for {
  7316  		off1 := auxIntToInt32(v.AuxInt)
  7317  		sym1 := auxToSym(v.Aux)
  7318  		if v_0.Op != OpARM64MOVDaddr {
  7319  			break
  7320  		}
  7321  		off2 := auxIntToInt32(v_0.AuxInt)
  7322  		sym2 := auxToSym(v_0.Aux)
  7323  		ptr := v_0.Args[0]
  7324  		val1 := v_1
  7325  		val2 := v_2
  7326  		mem := v_3
  7327  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  7328  			break
  7329  		}
  7330  		v.reset(OpARM64FSTPQ)
  7331  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7332  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7333  		v.AddArg4(ptr, val1, val2, mem)
  7334  		return true
  7335  	}
  7336  	return false
  7337  }
  7338  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  7339  	v_1 := v.Args[1]
  7340  	v_0 := v.Args[0]
  7341  	// match: (FSUBD a (FMULD x y))
  7342  	// cond: a.Block.Func.useFMA(v)
  7343  	// result: (FMSUBD a x y)
  7344  	for {
  7345  		a := v_0
  7346  		if v_1.Op != OpARM64FMULD {
  7347  			break
  7348  		}
  7349  		y := v_1.Args[1]
  7350  		x := v_1.Args[0]
  7351  		if !(a.Block.Func.useFMA(v)) {
  7352  			break
  7353  		}
  7354  		v.reset(OpARM64FMSUBD)
  7355  		v.AddArg3(a, x, y)
  7356  		return true
  7357  	}
  7358  	// match: (FSUBD (FMULD x y) a)
  7359  	// cond: a.Block.Func.useFMA(v)
  7360  	// result: (FNMSUBD a x y)
  7361  	for {
  7362  		if v_0.Op != OpARM64FMULD {
  7363  			break
  7364  		}
  7365  		y := v_0.Args[1]
  7366  		x := v_0.Args[0]
  7367  		a := v_1
  7368  		if !(a.Block.Func.useFMA(v)) {
  7369  			break
  7370  		}
  7371  		v.reset(OpARM64FNMSUBD)
  7372  		v.AddArg3(a, x, y)
  7373  		return true
  7374  	}
  7375  	// match: (FSUBD a (FNMULD x y))
  7376  	// cond: a.Block.Func.useFMA(v)
  7377  	// result: (FMADDD a x y)
  7378  	for {
  7379  		a := v_0
  7380  		if v_1.Op != OpARM64FNMULD {
  7381  			break
  7382  		}
  7383  		y := v_1.Args[1]
  7384  		x := v_1.Args[0]
  7385  		if !(a.Block.Func.useFMA(v)) {
  7386  			break
  7387  		}
  7388  		v.reset(OpARM64FMADDD)
  7389  		v.AddArg3(a, x, y)
  7390  		return true
  7391  	}
  7392  	// match: (FSUBD (FNMULD x y) a)
  7393  	// cond: a.Block.Func.useFMA(v)
  7394  	// result: (FNMADDD a x y)
  7395  	for {
  7396  		if v_0.Op != OpARM64FNMULD {
  7397  			break
  7398  		}
  7399  		y := v_0.Args[1]
  7400  		x := v_0.Args[0]
  7401  		a := v_1
  7402  		if !(a.Block.Func.useFMA(v)) {
  7403  			break
  7404  		}
  7405  		v.reset(OpARM64FNMADDD)
  7406  		v.AddArg3(a, x, y)
  7407  		return true
  7408  	}
  7409  	return false
  7410  }
  7411  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  7412  	v_1 := v.Args[1]
  7413  	v_0 := v.Args[0]
  7414  	// match: (FSUBS a (FMULS x y))
  7415  	// cond: a.Block.Func.useFMA(v)
  7416  	// result: (FMSUBS a x y)
  7417  	for {
  7418  		a := v_0
  7419  		if v_1.Op != OpARM64FMULS {
  7420  			break
  7421  		}
  7422  		y := v_1.Args[1]
  7423  		x := v_1.Args[0]
  7424  		if !(a.Block.Func.useFMA(v)) {
  7425  			break
  7426  		}
  7427  		v.reset(OpARM64FMSUBS)
  7428  		v.AddArg3(a, x, y)
  7429  		return true
  7430  	}
  7431  	// match: (FSUBS (FMULS x y) a)
  7432  	// cond: a.Block.Func.useFMA(v)
  7433  	// result: (FNMSUBS a x y)
  7434  	for {
  7435  		if v_0.Op != OpARM64FMULS {
  7436  			break
  7437  		}
  7438  		y := v_0.Args[1]
  7439  		x := v_0.Args[0]
  7440  		a := v_1
  7441  		if !(a.Block.Func.useFMA(v)) {
  7442  			break
  7443  		}
  7444  		v.reset(OpARM64FNMSUBS)
  7445  		v.AddArg3(a, x, y)
  7446  		return true
  7447  	}
  7448  	// match: (FSUBS a (FNMULS x y))
  7449  	// cond: a.Block.Func.useFMA(v)
  7450  	// result: (FMADDS a x y)
  7451  	for {
  7452  		a := v_0
  7453  		if v_1.Op != OpARM64FNMULS {
  7454  			break
  7455  		}
  7456  		y := v_1.Args[1]
  7457  		x := v_1.Args[0]
  7458  		if !(a.Block.Func.useFMA(v)) {
  7459  			break
  7460  		}
  7461  		v.reset(OpARM64FMADDS)
  7462  		v.AddArg3(a, x, y)
  7463  		return true
  7464  	}
  7465  	// match: (FSUBS (FNMULS x y) a)
  7466  	// cond: a.Block.Func.useFMA(v)
  7467  	// result: (FNMADDS a x y)
  7468  	for {
  7469  		if v_0.Op != OpARM64FNMULS {
  7470  			break
  7471  		}
  7472  		y := v_0.Args[1]
  7473  		x := v_0.Args[0]
  7474  		a := v_1
  7475  		if !(a.Block.Func.useFMA(v)) {
  7476  			break
  7477  		}
  7478  		v.reset(OpARM64FNMADDS)
  7479  		v.AddArg3(a, x, y)
  7480  		return true
  7481  	}
  7482  	return false
  7483  }
  7484  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  7485  	v_0 := v.Args[0]
  7486  	b := v.Block
  7487  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  7488  	// cond: z.Uses == 1
  7489  	// result: (GreaterEqual (TST x y))
  7490  	for {
  7491  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7492  			break
  7493  		}
  7494  		z := v_0.Args[0]
  7495  		if z.Op != OpARM64AND {
  7496  			break
  7497  		}
  7498  		y := z.Args[1]
  7499  		x := z.Args[0]
  7500  		if !(z.Uses == 1) {
  7501  			break
  7502  		}
  7503  		v.reset(OpARM64GreaterEqual)
  7504  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  7505  		v0.AddArg2(x, y)
  7506  		v.AddArg(v0)
  7507  		return true
  7508  	}
  7509  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  7510  	// cond: x.Uses == 1
  7511  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  7512  	for {
  7513  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7514  			break
  7515  		}
  7516  		x := v_0.Args[0]
  7517  		if x.Op != OpARM64ANDconst {
  7518  			break
  7519  		}
  7520  		c := auxIntToInt64(x.AuxInt)
  7521  		y := x.Args[0]
  7522  		if !(x.Uses == 1) {
  7523  			break
  7524  		}
  7525  		v.reset(OpARM64GreaterEqual)
  7526  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  7527  		v0.AuxInt = int32ToAuxInt(int32(c))
  7528  		v0.AddArg(y)
  7529  		v.AddArg(v0)
  7530  		return true
  7531  	}
  7532  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  7533  	// cond: z.Uses == 1
  7534  	// result: (GreaterEqual (TSTW x y))
  7535  	for {
  7536  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7537  			break
  7538  		}
  7539  		z := v_0.Args[0]
  7540  		if z.Op != OpARM64AND {
  7541  			break
  7542  		}
  7543  		y := z.Args[1]
  7544  		x := z.Args[0]
  7545  		if !(z.Uses == 1) {
  7546  			break
  7547  		}
  7548  		v.reset(OpARM64GreaterEqual)
  7549  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  7550  		v0.AddArg2(x, y)
  7551  		v.AddArg(v0)
  7552  		return true
  7553  	}
  7554  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  7555  	// cond: x.Uses == 1
  7556  	// result: (GreaterEqual (TSTconst [c] y))
  7557  	for {
  7558  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7559  			break
  7560  		}
  7561  		x := v_0.Args[0]
  7562  		if x.Op != OpARM64ANDconst {
  7563  			break
  7564  		}
  7565  		c := auxIntToInt64(x.AuxInt)
  7566  		y := x.Args[0]
  7567  		if !(x.Uses == 1) {
  7568  			break
  7569  		}
  7570  		v.reset(OpARM64GreaterEqual)
  7571  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  7572  		v0.AuxInt = int64ToAuxInt(c)
  7573  		v0.AddArg(y)
  7574  		v.AddArg(v0)
  7575  		return true
  7576  	}
  7577  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  7578  	// cond: x.Uses == 1
  7579  	// result: (GreaterEqualNoov (CMNconst [c] y))
  7580  	for {
  7581  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7582  			break
  7583  		}
  7584  		x := v_0.Args[0]
  7585  		if x.Op != OpARM64ADDconst {
  7586  			break
  7587  		}
  7588  		c := auxIntToInt64(x.AuxInt)
  7589  		y := x.Args[0]
  7590  		if !(x.Uses == 1) {
  7591  			break
  7592  		}
  7593  		v.reset(OpARM64GreaterEqualNoov)
  7594  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  7595  		v0.AuxInt = int64ToAuxInt(c)
  7596  		v0.AddArg(y)
  7597  		v.AddArg(v0)
  7598  		return true
  7599  	}
  7600  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  7601  	// cond: x.Uses == 1
  7602  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  7603  	for {
  7604  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7605  			break
  7606  		}
  7607  		x := v_0.Args[0]
  7608  		if x.Op != OpARM64ADDconst {
  7609  			break
  7610  		}
  7611  		c := auxIntToInt64(x.AuxInt)
  7612  		y := x.Args[0]
  7613  		if !(x.Uses == 1) {
  7614  			break
  7615  		}
  7616  		v.reset(OpARM64GreaterEqualNoov)
  7617  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  7618  		v0.AuxInt = int32ToAuxInt(int32(c))
  7619  		v0.AddArg(y)
  7620  		v.AddArg(v0)
  7621  		return true
  7622  	}
  7623  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  7624  	// cond: z.Uses == 1
  7625  	// result: (GreaterEqualNoov (CMN x y))
  7626  	for {
  7627  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7628  			break
  7629  		}
  7630  		z := v_0.Args[0]
  7631  		if z.Op != OpARM64ADD {
  7632  			break
  7633  		}
  7634  		y := z.Args[1]
  7635  		x := z.Args[0]
  7636  		if !(z.Uses == 1) {
  7637  			break
  7638  		}
  7639  		v.reset(OpARM64GreaterEqualNoov)
  7640  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7641  		v0.AddArg2(x, y)
  7642  		v.AddArg(v0)
  7643  		return true
  7644  	}
  7645  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  7646  	// cond: z.Uses == 1
  7647  	// result: (GreaterEqualNoov (CMNW x y))
  7648  	for {
  7649  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7650  			break
  7651  		}
  7652  		z := v_0.Args[0]
  7653  		if z.Op != OpARM64ADD {
  7654  			break
  7655  		}
  7656  		y := z.Args[1]
  7657  		x := z.Args[0]
  7658  		if !(z.Uses == 1) {
  7659  			break
  7660  		}
  7661  		v.reset(OpARM64GreaterEqualNoov)
  7662  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7663  		v0.AddArg2(x, y)
  7664  		v.AddArg(v0)
  7665  		return true
  7666  	}
  7667  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  7668  	// cond: z.Uses == 1
  7669  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  7670  	for {
  7671  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7672  			break
  7673  		}
  7674  		z := v_0.Args[0]
  7675  		if z.Op != OpARM64MADD {
  7676  			break
  7677  		}
  7678  		y := z.Args[2]
  7679  		a := z.Args[0]
  7680  		x := z.Args[1]
  7681  		if !(z.Uses == 1) {
  7682  			break
  7683  		}
  7684  		v.reset(OpARM64GreaterEqualNoov)
  7685  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7686  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7687  		v1.AddArg2(x, y)
  7688  		v0.AddArg2(a, v1)
  7689  		v.AddArg(v0)
  7690  		return true
  7691  	}
  7692  	// match: (GreaterEqual (CMPconst [0] z:(MSUB a x y)))
  7693  	// cond: z.Uses == 1
  7694  	// result: (GreaterEqualNoov (CMP a (MUL <x.Type> x y)))
  7695  	for {
  7696  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7697  			break
  7698  		}
  7699  		z := v_0.Args[0]
  7700  		if z.Op != OpARM64MSUB {
  7701  			break
  7702  		}
  7703  		y := z.Args[2]
  7704  		a := z.Args[0]
  7705  		x := z.Args[1]
  7706  		if !(z.Uses == 1) {
  7707  			break
  7708  		}
  7709  		v.reset(OpARM64GreaterEqualNoov)
  7710  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  7711  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7712  		v1.AddArg2(x, y)
  7713  		v0.AddArg2(a, v1)
  7714  		v.AddArg(v0)
  7715  		return true
  7716  	}
  7717  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  7718  	// cond: z.Uses == 1
  7719  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  7720  	for {
  7721  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7722  			break
  7723  		}
  7724  		z := v_0.Args[0]
  7725  		if z.Op != OpARM64MADDW {
  7726  			break
  7727  		}
  7728  		y := z.Args[2]
  7729  		a := z.Args[0]
  7730  		x := z.Args[1]
  7731  		if !(z.Uses == 1) {
  7732  			break
  7733  		}
  7734  		v.reset(OpARM64GreaterEqualNoov)
  7735  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7736  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7737  		v1.AddArg2(x, y)
  7738  		v0.AddArg2(a, v1)
  7739  		v.AddArg(v0)
  7740  		return true
  7741  	}
  7742  	// match: (GreaterEqual (CMPWconst [0] z:(MSUBW a x y)))
  7743  	// cond: z.Uses == 1
  7744  	// result: (GreaterEqualNoov (CMPW a (MULW <x.Type> x y)))
  7745  	for {
  7746  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7747  			break
  7748  		}
  7749  		z := v_0.Args[0]
  7750  		if z.Op != OpARM64MSUBW {
  7751  			break
  7752  		}
  7753  		y := z.Args[2]
  7754  		a := z.Args[0]
  7755  		x := z.Args[1]
  7756  		if !(z.Uses == 1) {
  7757  			break
  7758  		}
  7759  		v.reset(OpARM64GreaterEqualNoov)
  7760  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  7761  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7762  		v1.AddArg2(x, y)
  7763  		v0.AddArg2(a, v1)
  7764  		v.AddArg(v0)
  7765  		return true
  7766  	}
  7767  	// match: (GreaterEqual (FlagConstant [fc]))
  7768  	// result: (MOVDconst [b2i(fc.ge())])
  7769  	for {
  7770  		if v_0.Op != OpARM64FlagConstant {
  7771  			break
  7772  		}
  7773  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7774  		v.reset(OpARM64MOVDconst)
  7775  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  7776  		return true
  7777  	}
  7778  	// match: (GreaterEqual (InvertFlags x))
  7779  	// result: (LessEqual x)
  7780  	for {
  7781  		if v_0.Op != OpARM64InvertFlags {
  7782  			break
  7783  		}
  7784  		x := v_0.Args[0]
  7785  		v.reset(OpARM64LessEqual)
  7786  		v.AddArg(x)
  7787  		return true
  7788  	}
  7789  	return false
  7790  }
  7791  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  7792  	v_0 := v.Args[0]
  7793  	// match: (GreaterEqualF (InvertFlags x))
  7794  	// result: (LessEqualF x)
  7795  	for {
  7796  		if v_0.Op != OpARM64InvertFlags {
  7797  			break
  7798  		}
  7799  		x := v_0.Args[0]
  7800  		v.reset(OpARM64LessEqualF)
  7801  		v.AddArg(x)
  7802  		return true
  7803  	}
  7804  	return false
  7805  }
  7806  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  7807  	v_0 := v.Args[0]
  7808  	b := v.Block
  7809  	typ := &b.Func.Config.Types
  7810  	// match: (GreaterEqualNoov (FlagConstant [fc]))
  7811  	// result: (MOVDconst [b2i(fc.geNoov())])
  7812  	for {
  7813  		if v_0.Op != OpARM64FlagConstant {
  7814  			break
  7815  		}
  7816  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7817  		v.reset(OpARM64MOVDconst)
  7818  		v.AuxInt = int64ToAuxInt(b2i(fc.geNoov()))
  7819  		return true
  7820  	}
  7821  	// match: (GreaterEqualNoov (InvertFlags x))
  7822  	// result: (CSINC [OpARM64NotEqual] (LessThanNoov <typ.Bool> x) (MOVDconst [0]) x)
  7823  	for {
  7824  		if v_0.Op != OpARM64InvertFlags {
  7825  			break
  7826  		}
  7827  		x := v_0.Args[0]
  7828  		v.reset(OpARM64CSINC)
  7829  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  7830  		v0 := b.NewValue0(v.Pos, OpARM64LessThanNoov, typ.Bool)
  7831  		v0.AddArg(x)
  7832  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
  7833  		v1.AuxInt = int64ToAuxInt(0)
  7834  		v.AddArg3(v0, v1, x)
  7835  		return true
  7836  	}
  7837  	return false
  7838  }
  7839  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  7840  	v_0 := v.Args[0]
  7841  	// match: (GreaterEqualU (FlagConstant [fc]))
  7842  	// result: (MOVDconst [b2i(fc.uge())])
  7843  	for {
  7844  		if v_0.Op != OpARM64FlagConstant {
  7845  			break
  7846  		}
  7847  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7848  		v.reset(OpARM64MOVDconst)
  7849  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  7850  		return true
  7851  	}
  7852  	// match: (GreaterEqualU (InvertFlags x))
  7853  	// result: (LessEqualU x)
  7854  	for {
  7855  		if v_0.Op != OpARM64InvertFlags {
  7856  			break
  7857  		}
  7858  		x := v_0.Args[0]
  7859  		v.reset(OpARM64LessEqualU)
  7860  		v.AddArg(x)
  7861  		return true
  7862  	}
  7863  	return false
  7864  }
  7865  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  7866  	v_0 := v.Args[0]
  7867  	b := v.Block
  7868  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  7869  	// cond: z.Uses == 1
  7870  	// result: (GreaterThan (TST x y))
  7871  	for {
  7872  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7873  			break
  7874  		}
  7875  		z := v_0.Args[0]
  7876  		if z.Op != OpARM64AND {
  7877  			break
  7878  		}
  7879  		y := z.Args[1]
  7880  		x := z.Args[0]
  7881  		if !(z.Uses == 1) {
  7882  			break
  7883  		}
  7884  		v.reset(OpARM64GreaterThan)
  7885  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  7886  		v0.AddArg2(x, y)
  7887  		v.AddArg(v0)
  7888  		return true
  7889  	}
  7890  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  7891  	// cond: x.Uses == 1
  7892  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  7893  	for {
  7894  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7895  			break
  7896  		}
  7897  		x := v_0.Args[0]
  7898  		if x.Op != OpARM64ANDconst {
  7899  			break
  7900  		}
  7901  		c := auxIntToInt64(x.AuxInt)
  7902  		y := x.Args[0]
  7903  		if !(x.Uses == 1) {
  7904  			break
  7905  		}
  7906  		v.reset(OpARM64GreaterThan)
  7907  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  7908  		v0.AuxInt = int32ToAuxInt(int32(c))
  7909  		v0.AddArg(y)
  7910  		v.AddArg(v0)
  7911  		return true
  7912  	}
  7913  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  7914  	// cond: z.Uses == 1
  7915  	// result: (GreaterThan (TSTW x y))
  7916  	for {
  7917  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7918  			break
  7919  		}
  7920  		z := v_0.Args[0]
  7921  		if z.Op != OpARM64AND {
  7922  			break
  7923  		}
  7924  		y := z.Args[1]
  7925  		x := z.Args[0]
  7926  		if !(z.Uses == 1) {
  7927  			break
  7928  		}
  7929  		v.reset(OpARM64GreaterThan)
  7930  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  7931  		v0.AddArg2(x, y)
  7932  		v.AddArg(v0)
  7933  		return true
  7934  	}
  7935  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  7936  	// cond: x.Uses == 1
  7937  	// result: (GreaterThan (TSTconst [c] y))
  7938  	for {
  7939  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7940  			break
  7941  		}
  7942  		x := v_0.Args[0]
  7943  		if x.Op != OpARM64ANDconst {
  7944  			break
  7945  		}
  7946  		c := auxIntToInt64(x.AuxInt)
  7947  		y := x.Args[0]
  7948  		if !(x.Uses == 1) {
  7949  			break
  7950  		}
  7951  		v.reset(OpARM64GreaterThan)
  7952  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  7953  		v0.AuxInt = int64ToAuxInt(c)
  7954  		v0.AddArg(y)
  7955  		v.AddArg(v0)
  7956  		return true
  7957  	}
  7958  	// match: (GreaterThan (FlagConstant [fc]))
  7959  	// result: (MOVDconst [b2i(fc.gt())])
  7960  	for {
  7961  		if v_0.Op != OpARM64FlagConstant {
  7962  			break
  7963  		}
  7964  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7965  		v.reset(OpARM64MOVDconst)
  7966  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  7967  		return true
  7968  	}
  7969  	// match: (GreaterThan (InvertFlags x))
  7970  	// result: (LessThan x)
  7971  	for {
  7972  		if v_0.Op != OpARM64InvertFlags {
  7973  			break
  7974  		}
  7975  		x := v_0.Args[0]
  7976  		v.reset(OpARM64LessThan)
  7977  		v.AddArg(x)
  7978  		return true
  7979  	}
  7980  	return false
  7981  }
  7982  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  7983  	v_0 := v.Args[0]
  7984  	// match: (GreaterThanF (InvertFlags x))
  7985  	// result: (LessThanF x)
  7986  	for {
  7987  		if v_0.Op != OpARM64InvertFlags {
  7988  			break
  7989  		}
  7990  		x := v_0.Args[0]
  7991  		v.reset(OpARM64LessThanF)
  7992  		v.AddArg(x)
  7993  		return true
  7994  	}
  7995  	return false
  7996  }
  7997  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  7998  	v_0 := v.Args[0]
  7999  	// match: (GreaterThanU (FlagConstant [fc]))
  8000  	// result: (MOVDconst [b2i(fc.ugt())])
  8001  	for {
  8002  		if v_0.Op != OpARM64FlagConstant {
  8003  			break
  8004  		}
  8005  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8006  		v.reset(OpARM64MOVDconst)
  8007  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  8008  		return true
  8009  	}
  8010  	// match: (GreaterThanU (InvertFlags x))
  8011  	// result: (LessThanU x)
  8012  	for {
  8013  		if v_0.Op != OpARM64InvertFlags {
  8014  			break
  8015  		}
  8016  		x := v_0.Args[0]
  8017  		v.reset(OpARM64LessThanU)
  8018  		v.AddArg(x)
  8019  		return true
  8020  	}
  8021  	return false
  8022  }
  8023  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  8024  	v_1 := v.Args[1]
  8025  	v_0 := v.Args[0]
  8026  	b := v.Block
  8027  	config := b.Func.Config
  8028  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  8029  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8030  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  8031  	for {
  8032  		off1 := auxIntToInt32(v.AuxInt)
  8033  		sym := auxToSym(v.Aux)
  8034  		if v_0.Op != OpARM64ADDconst {
  8035  			break
  8036  		}
  8037  		off2 := auxIntToInt64(v_0.AuxInt)
  8038  		ptr := v_0.Args[0]
  8039  		mem := v_1
  8040  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8041  			break
  8042  		}
  8043  		v.reset(OpARM64LDP)
  8044  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8045  		v.Aux = symToAux(sym)
  8046  		v.AddArg2(ptr, mem)
  8047  		return true
  8048  	}
  8049  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8050  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8051  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8052  	for {
  8053  		off1 := auxIntToInt32(v.AuxInt)
  8054  		sym1 := auxToSym(v.Aux)
  8055  		if v_0.Op != OpARM64MOVDaddr {
  8056  			break
  8057  		}
  8058  		off2 := auxIntToInt32(v_0.AuxInt)
  8059  		sym2 := auxToSym(v_0.Aux)
  8060  		ptr := v_0.Args[0]
  8061  		mem := v_1
  8062  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8063  			break
  8064  		}
  8065  		v.reset(OpARM64LDP)
  8066  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8067  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8068  		v.AddArg2(ptr, mem)
  8069  		return true
  8070  	}
  8071  	return false
  8072  }
  8073  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  8074  	v_0 := v.Args[0]
  8075  	b := v.Block
  8076  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  8077  	// cond: z.Uses == 1
  8078  	// result: (LessEqual (TST x y))
  8079  	for {
  8080  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8081  			break
  8082  		}
  8083  		z := v_0.Args[0]
  8084  		if z.Op != OpARM64AND {
  8085  			break
  8086  		}
  8087  		y := z.Args[1]
  8088  		x := z.Args[0]
  8089  		if !(z.Uses == 1) {
  8090  			break
  8091  		}
  8092  		v.reset(OpARM64LessEqual)
  8093  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  8094  		v0.AddArg2(x, y)
  8095  		v.AddArg(v0)
  8096  		return true
  8097  	}
  8098  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  8099  	// cond: x.Uses == 1
  8100  	// result: (LessEqual (TSTWconst [int32(c)] y))
  8101  	for {
  8102  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8103  			break
  8104  		}
  8105  		x := v_0.Args[0]
  8106  		if x.Op != OpARM64ANDconst {
  8107  			break
  8108  		}
  8109  		c := auxIntToInt64(x.AuxInt)
  8110  		y := x.Args[0]
  8111  		if !(x.Uses == 1) {
  8112  			break
  8113  		}
  8114  		v.reset(OpARM64LessEqual)
  8115  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  8116  		v0.AuxInt = int32ToAuxInt(int32(c))
  8117  		v0.AddArg(y)
  8118  		v.AddArg(v0)
  8119  		return true
  8120  	}
  8121  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  8122  	// cond: z.Uses == 1
  8123  	// result: (LessEqual (TSTW x y))
  8124  	for {
  8125  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8126  			break
  8127  		}
  8128  		z := v_0.Args[0]
  8129  		if z.Op != OpARM64AND {
  8130  			break
  8131  		}
  8132  		y := z.Args[1]
  8133  		x := z.Args[0]
  8134  		if !(z.Uses == 1) {
  8135  			break
  8136  		}
  8137  		v.reset(OpARM64LessEqual)
  8138  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  8139  		v0.AddArg2(x, y)
  8140  		v.AddArg(v0)
  8141  		return true
  8142  	}
  8143  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  8144  	// cond: x.Uses == 1
  8145  	// result: (LessEqual (TSTconst [c] y))
  8146  	for {
  8147  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8148  			break
  8149  		}
  8150  		x := v_0.Args[0]
  8151  		if x.Op != OpARM64ANDconst {
  8152  			break
  8153  		}
  8154  		c := auxIntToInt64(x.AuxInt)
  8155  		y := x.Args[0]
  8156  		if !(x.Uses == 1) {
  8157  			break
  8158  		}
  8159  		v.reset(OpARM64LessEqual)
  8160  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  8161  		v0.AuxInt = int64ToAuxInt(c)
  8162  		v0.AddArg(y)
  8163  		v.AddArg(v0)
  8164  		return true
  8165  	}
  8166  	// match: (LessEqual (FlagConstant [fc]))
  8167  	// result: (MOVDconst [b2i(fc.le())])
  8168  	for {
  8169  		if v_0.Op != OpARM64FlagConstant {
  8170  			break
  8171  		}
  8172  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8173  		v.reset(OpARM64MOVDconst)
  8174  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  8175  		return true
  8176  	}
  8177  	// match: (LessEqual (InvertFlags x))
  8178  	// result: (GreaterEqual x)
  8179  	for {
  8180  		if v_0.Op != OpARM64InvertFlags {
  8181  			break
  8182  		}
  8183  		x := v_0.Args[0]
  8184  		v.reset(OpARM64GreaterEqual)
  8185  		v.AddArg(x)
  8186  		return true
  8187  	}
  8188  	return false
  8189  }
  8190  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  8191  	v_0 := v.Args[0]
  8192  	// match: (LessEqualF (InvertFlags x))
  8193  	// result: (GreaterEqualF x)
  8194  	for {
  8195  		if v_0.Op != OpARM64InvertFlags {
  8196  			break
  8197  		}
  8198  		x := v_0.Args[0]
  8199  		v.reset(OpARM64GreaterEqualF)
  8200  		v.AddArg(x)
  8201  		return true
  8202  	}
  8203  	return false
  8204  }
  8205  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  8206  	v_0 := v.Args[0]
  8207  	// match: (LessEqualU (FlagConstant [fc]))
  8208  	// result: (MOVDconst [b2i(fc.ule())])
  8209  	for {
  8210  		if v_0.Op != OpARM64FlagConstant {
  8211  			break
  8212  		}
  8213  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8214  		v.reset(OpARM64MOVDconst)
  8215  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  8216  		return true
  8217  	}
  8218  	// match: (LessEqualU (InvertFlags x))
  8219  	// result: (GreaterEqualU x)
  8220  	for {
  8221  		if v_0.Op != OpARM64InvertFlags {
  8222  			break
  8223  		}
  8224  		x := v_0.Args[0]
  8225  		v.reset(OpARM64GreaterEqualU)
  8226  		v.AddArg(x)
  8227  		return true
  8228  	}
  8229  	return false
  8230  }
  8231  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  8232  	v_0 := v.Args[0]
  8233  	b := v.Block
  8234  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  8235  	// cond: z.Uses == 1
  8236  	// result: (LessThan (TST x y))
  8237  	for {
  8238  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8239  			break
  8240  		}
  8241  		z := v_0.Args[0]
  8242  		if z.Op != OpARM64AND {
  8243  			break
  8244  		}
  8245  		y := z.Args[1]
  8246  		x := z.Args[0]
  8247  		if !(z.Uses == 1) {
  8248  			break
  8249  		}
  8250  		v.reset(OpARM64LessThan)
  8251  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  8252  		v0.AddArg2(x, y)
  8253  		v.AddArg(v0)
  8254  		return true
  8255  	}
  8256  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  8257  	// cond: x.Uses == 1
  8258  	// result: (LessThan (TSTWconst [int32(c)] y))
  8259  	for {
  8260  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8261  			break
  8262  		}
  8263  		x := v_0.Args[0]
  8264  		if x.Op != OpARM64ANDconst {
  8265  			break
  8266  		}
  8267  		c := auxIntToInt64(x.AuxInt)
  8268  		y := x.Args[0]
  8269  		if !(x.Uses == 1) {
  8270  			break
  8271  		}
  8272  		v.reset(OpARM64LessThan)
  8273  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  8274  		v0.AuxInt = int32ToAuxInt(int32(c))
  8275  		v0.AddArg(y)
  8276  		v.AddArg(v0)
  8277  		return true
  8278  	}
  8279  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  8280  	// cond: z.Uses == 1
  8281  	// result: (LessThan (TSTW x y))
  8282  	for {
  8283  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8284  			break
  8285  		}
  8286  		z := v_0.Args[0]
  8287  		if z.Op != OpARM64AND {
  8288  			break
  8289  		}
  8290  		y := z.Args[1]
  8291  		x := z.Args[0]
  8292  		if !(z.Uses == 1) {
  8293  			break
  8294  		}
  8295  		v.reset(OpARM64LessThan)
  8296  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  8297  		v0.AddArg2(x, y)
  8298  		v.AddArg(v0)
  8299  		return true
  8300  	}
  8301  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  8302  	// cond: x.Uses == 1
  8303  	// result: (LessThan (TSTconst [c] y))
  8304  	for {
  8305  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8306  			break
  8307  		}
  8308  		x := v_0.Args[0]
  8309  		if x.Op != OpARM64ANDconst {
  8310  			break
  8311  		}
  8312  		c := auxIntToInt64(x.AuxInt)
  8313  		y := x.Args[0]
  8314  		if !(x.Uses == 1) {
  8315  			break
  8316  		}
  8317  		v.reset(OpARM64LessThan)
  8318  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  8319  		v0.AuxInt = int64ToAuxInt(c)
  8320  		v0.AddArg(y)
  8321  		v.AddArg(v0)
  8322  		return true
  8323  	}
  8324  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  8325  	// cond: x.Uses == 1
  8326  	// result: (LessThanNoov (CMNconst [c] y))
  8327  	for {
  8328  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8329  			break
  8330  		}
  8331  		x := v_0.Args[0]
  8332  		if x.Op != OpARM64ADDconst {
  8333  			break
  8334  		}
  8335  		c := auxIntToInt64(x.AuxInt)
  8336  		y := x.Args[0]
  8337  		if !(x.Uses == 1) {
  8338  			break
  8339  		}
  8340  		v.reset(OpARM64LessThanNoov)
  8341  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  8342  		v0.AuxInt = int64ToAuxInt(c)
  8343  		v0.AddArg(y)
  8344  		v.AddArg(v0)
  8345  		return true
  8346  	}
  8347  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  8348  	// cond: x.Uses == 1
  8349  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  8350  	for {
  8351  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8352  			break
  8353  		}
  8354  		x := v_0.Args[0]
  8355  		if x.Op != OpARM64ADDconst {
  8356  			break
  8357  		}
  8358  		c := auxIntToInt64(x.AuxInt)
  8359  		y := x.Args[0]
  8360  		if !(x.Uses == 1) {
  8361  			break
  8362  		}
  8363  		v.reset(OpARM64LessThanNoov)
  8364  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  8365  		v0.AuxInt = int32ToAuxInt(int32(c))
  8366  		v0.AddArg(y)
  8367  		v.AddArg(v0)
  8368  		return true
  8369  	}
  8370  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  8371  	// cond: z.Uses == 1
  8372  	// result: (LessThanNoov (CMN x y))
  8373  	for {
  8374  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8375  			break
  8376  		}
  8377  		z := v_0.Args[0]
  8378  		if z.Op != OpARM64ADD {
  8379  			break
  8380  		}
  8381  		y := z.Args[1]
  8382  		x := z.Args[0]
  8383  		if !(z.Uses == 1) {
  8384  			break
  8385  		}
  8386  		v.reset(OpARM64LessThanNoov)
  8387  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  8388  		v0.AddArg2(x, y)
  8389  		v.AddArg(v0)
  8390  		return true
  8391  	}
  8392  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  8393  	// cond: z.Uses == 1
  8394  	// result: (LessThanNoov (CMNW x y))
  8395  	for {
  8396  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8397  			break
  8398  		}
  8399  		z := v_0.Args[0]
  8400  		if z.Op != OpARM64ADD {
  8401  			break
  8402  		}
  8403  		y := z.Args[1]
  8404  		x := z.Args[0]
  8405  		if !(z.Uses == 1) {
  8406  			break
  8407  		}
  8408  		v.reset(OpARM64LessThanNoov)
  8409  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  8410  		v0.AddArg2(x, y)
  8411  		v.AddArg(v0)
  8412  		return true
  8413  	}
  8414  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  8415  	// cond: z.Uses == 1
  8416  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  8417  	for {
  8418  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8419  			break
  8420  		}
  8421  		z := v_0.Args[0]
  8422  		if z.Op != OpARM64MADD {
  8423  			break
  8424  		}
  8425  		y := z.Args[2]
  8426  		a := z.Args[0]
  8427  		x := z.Args[1]
  8428  		if !(z.Uses == 1) {
  8429  			break
  8430  		}
  8431  		v.reset(OpARM64LessThanNoov)
  8432  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  8433  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  8434  		v1.AddArg2(x, y)
  8435  		v0.AddArg2(a, v1)
  8436  		v.AddArg(v0)
  8437  		return true
  8438  	}
  8439  	// match: (LessThan (CMPconst [0] z:(MSUB a x y)))
  8440  	// cond: z.Uses == 1
  8441  	// result: (LessThanNoov (CMP a (MUL <x.Type> x y)))
  8442  	for {
  8443  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  8444  			break
  8445  		}
  8446  		z := v_0.Args[0]
  8447  		if z.Op != OpARM64MSUB {
  8448  			break
  8449  		}
  8450  		y := z.Args[2]
  8451  		a := z.Args[0]
  8452  		x := z.Args[1]
  8453  		if !(z.Uses == 1) {
  8454  			break
  8455  		}
  8456  		v.reset(OpARM64LessThanNoov)
  8457  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  8458  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  8459  		v1.AddArg2(x, y)
  8460  		v0.AddArg2(a, v1)
  8461  		v.AddArg(v0)
  8462  		return true
  8463  	}
  8464  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  8465  	// cond: z.Uses == 1
  8466  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  8467  	for {
  8468  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8469  			break
  8470  		}
  8471  		z := v_0.Args[0]
  8472  		if z.Op != OpARM64MADDW {
  8473  			break
  8474  		}
  8475  		y := z.Args[2]
  8476  		a := z.Args[0]
  8477  		x := z.Args[1]
  8478  		if !(z.Uses == 1) {
  8479  			break
  8480  		}
  8481  		v.reset(OpARM64LessThanNoov)
  8482  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  8483  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  8484  		v1.AddArg2(x, y)
  8485  		v0.AddArg2(a, v1)
  8486  		v.AddArg(v0)
  8487  		return true
  8488  	}
  8489  	// match: (LessThan (CMPWconst [0] z:(MSUBW a x y)))
  8490  	// cond: z.Uses == 1
  8491  	// result: (LessThanNoov (CMPW a (MULW <x.Type> x y)))
  8492  	for {
  8493  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  8494  			break
  8495  		}
  8496  		z := v_0.Args[0]
  8497  		if z.Op != OpARM64MSUBW {
  8498  			break
  8499  		}
  8500  		y := z.Args[2]
  8501  		a := z.Args[0]
  8502  		x := z.Args[1]
  8503  		if !(z.Uses == 1) {
  8504  			break
  8505  		}
  8506  		v.reset(OpARM64LessThanNoov)
  8507  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  8508  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  8509  		v1.AddArg2(x, y)
  8510  		v0.AddArg2(a, v1)
  8511  		v.AddArg(v0)
  8512  		return true
  8513  	}
  8514  	// match: (LessThan (FlagConstant [fc]))
  8515  	// result: (MOVDconst [b2i(fc.lt())])
  8516  	for {
  8517  		if v_0.Op != OpARM64FlagConstant {
  8518  			break
  8519  		}
  8520  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8521  		v.reset(OpARM64MOVDconst)
  8522  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  8523  		return true
  8524  	}
  8525  	// match: (LessThan (InvertFlags x))
  8526  	// result: (GreaterThan x)
  8527  	for {
  8528  		if v_0.Op != OpARM64InvertFlags {
  8529  			break
  8530  		}
  8531  		x := v_0.Args[0]
  8532  		v.reset(OpARM64GreaterThan)
  8533  		v.AddArg(x)
  8534  		return true
  8535  	}
  8536  	return false
  8537  }
  8538  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  8539  	v_0 := v.Args[0]
  8540  	// match: (LessThanF (InvertFlags x))
  8541  	// result: (GreaterThanF x)
  8542  	for {
  8543  		if v_0.Op != OpARM64InvertFlags {
  8544  			break
  8545  		}
  8546  		x := v_0.Args[0]
  8547  		v.reset(OpARM64GreaterThanF)
  8548  		v.AddArg(x)
  8549  		return true
  8550  	}
  8551  	return false
  8552  }
  8553  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  8554  	v_0 := v.Args[0]
  8555  	b := v.Block
  8556  	typ := &b.Func.Config.Types
  8557  	// match: (LessThanNoov (FlagConstant [fc]))
  8558  	// result: (MOVDconst [b2i(fc.ltNoov())])
  8559  	for {
  8560  		if v_0.Op != OpARM64FlagConstant {
  8561  			break
  8562  		}
  8563  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8564  		v.reset(OpARM64MOVDconst)
  8565  		v.AuxInt = int64ToAuxInt(b2i(fc.ltNoov()))
  8566  		return true
  8567  	}
  8568  	// match: (LessThanNoov (InvertFlags x))
  8569  	// result: (CSEL0 [OpARM64NotEqual] (GreaterEqualNoov <typ.Bool> x) x)
  8570  	for {
  8571  		if v_0.Op != OpARM64InvertFlags {
  8572  			break
  8573  		}
  8574  		x := v_0.Args[0]
  8575  		v.reset(OpARM64CSEL0)
  8576  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  8577  		v0 := b.NewValue0(v.Pos, OpARM64GreaterEqualNoov, typ.Bool)
  8578  		v0.AddArg(x)
  8579  		v.AddArg2(v0, x)
  8580  		return true
  8581  	}
  8582  	return false
  8583  }
  8584  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  8585  	v_0 := v.Args[0]
  8586  	// match: (LessThanU (FlagConstant [fc]))
  8587  	// result: (MOVDconst [b2i(fc.ult())])
  8588  	for {
  8589  		if v_0.Op != OpARM64FlagConstant {
  8590  			break
  8591  		}
  8592  		fc := auxIntToFlagConstant(v_0.AuxInt)
  8593  		v.reset(OpARM64MOVDconst)
  8594  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  8595  		return true
  8596  	}
  8597  	// match: (LessThanU (InvertFlags x))
  8598  	// result: (GreaterThanU x)
  8599  	for {
  8600  		if v_0.Op != OpARM64InvertFlags {
  8601  			break
  8602  		}
  8603  		x := v_0.Args[0]
  8604  		v.reset(OpARM64GreaterThanU)
  8605  		v.AddArg(x)
  8606  		return true
  8607  	}
  8608  	return false
  8609  }
  8610  func rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v *Value) bool {
  8611  	v_1 := v.Args[1]
  8612  	v_0 := v.Args[0]
  8613  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  8614  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  8615  	for {
  8616  		kind := auxIntToInt64(v.AuxInt)
  8617  		p := auxToPanicBoundsC(v.Aux)
  8618  		if v_0.Op != OpARM64MOVDconst {
  8619  			break
  8620  		}
  8621  		c := auxIntToInt64(v_0.AuxInt)
  8622  		mem := v_1
  8623  		v.reset(OpARM64LoweredPanicBoundsCC)
  8624  		v.AuxInt = int64ToAuxInt(kind)
  8625  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
  8626  		v.AddArg(mem)
  8627  		return true
  8628  	}
  8629  	return false
  8630  }
  8631  func rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v *Value) bool {
  8632  	v_1 := v.Args[1]
  8633  	v_0 := v.Args[0]
  8634  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  8635  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  8636  	for {
  8637  		kind := auxIntToInt64(v.AuxInt)
  8638  		p := auxToPanicBoundsC(v.Aux)
  8639  		if v_0.Op != OpARM64MOVDconst {
  8640  			break
  8641  		}
  8642  		c := auxIntToInt64(v_0.AuxInt)
  8643  		mem := v_1
  8644  		v.reset(OpARM64LoweredPanicBoundsCC)
  8645  		v.AuxInt = int64ToAuxInt(kind)
  8646  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
  8647  		v.AddArg(mem)
  8648  		return true
  8649  	}
  8650  	return false
  8651  }
  8652  func rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v *Value) bool {
  8653  	v_2 := v.Args[2]
  8654  	v_1 := v.Args[1]
  8655  	v_0 := v.Args[0]
  8656  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  8657  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:c}} mem)
  8658  	for {
  8659  		kind := auxIntToInt64(v.AuxInt)
  8660  		x := v_0
  8661  		if v_1.Op != OpARM64MOVDconst {
  8662  			break
  8663  		}
  8664  		c := auxIntToInt64(v_1.AuxInt)
  8665  		mem := v_2
  8666  		v.reset(OpARM64LoweredPanicBoundsRC)
  8667  		v.AuxInt = int64ToAuxInt(kind)
  8668  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8669  		v.AddArg2(x, mem)
  8670  		return true
  8671  	}
  8672  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  8673  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:c}} y mem)
  8674  	for {
  8675  		kind := auxIntToInt64(v.AuxInt)
  8676  		if v_0.Op != OpARM64MOVDconst {
  8677  			break
  8678  		}
  8679  		c := auxIntToInt64(v_0.AuxInt)
  8680  		y := v_1
  8681  		mem := v_2
  8682  		v.reset(OpARM64LoweredPanicBoundsCR)
  8683  		v.AuxInt = int64ToAuxInt(kind)
  8684  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8685  		v.AddArg2(y, mem)
  8686  		return true
  8687  	}
  8688  	return false
  8689  }
  8690  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  8691  	v_2 := v.Args[2]
  8692  	v_1 := v.Args[1]
  8693  	v_0 := v.Args[0]
  8694  	b := v.Block
  8695  	// match: (MADD a x (MOVDconst [-1]))
  8696  	// result: (SUB a x)
  8697  	for {
  8698  		a := v_0
  8699  		x := v_1
  8700  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  8701  			break
  8702  		}
  8703  		v.reset(OpARM64SUB)
  8704  		v.AddArg2(a, x)
  8705  		return true
  8706  	}
  8707  	// match: (MADD a _ (MOVDconst [0]))
  8708  	// result: a
  8709  	for {
  8710  		a := v_0
  8711  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  8712  			break
  8713  		}
  8714  		v.copyOf(a)
  8715  		return true
  8716  	}
  8717  	// match: (MADD a x (MOVDconst [1]))
  8718  	// result: (ADD a x)
  8719  	for {
  8720  		a := v_0
  8721  		x := v_1
  8722  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  8723  			break
  8724  		}
  8725  		v.reset(OpARM64ADD)
  8726  		v.AddArg2(a, x)
  8727  		return true
  8728  	}
  8729  	// match: (MADD a x (MOVDconst [c]))
  8730  	// cond: isPowerOfTwo(c)
  8731  	// result: (ADDshiftLL a x [log64(c)])
  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 !(isPowerOfTwo(c)) {
  8740  			break
  8741  		}
  8742  		v.reset(OpARM64ADDshiftLL)
  8743  		v.AuxInt = int64ToAuxInt(log64(c))
  8744  		v.AddArg2(a, x)
  8745  		return true
  8746  	}
  8747  	// match: (MADD a x (MOVDconst [c]))
  8748  	// cond: isPowerOfTwo(c-1) && c>=3
  8749  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8750  	for {
  8751  		a := v_0
  8752  		x := v_1
  8753  		if v_2.Op != OpARM64MOVDconst {
  8754  			break
  8755  		}
  8756  		c := auxIntToInt64(v_2.AuxInt)
  8757  		if !(isPowerOfTwo(c-1) && c >= 3) {
  8758  			break
  8759  		}
  8760  		v.reset(OpARM64ADD)
  8761  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8762  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8763  		v0.AddArg2(x, x)
  8764  		v.AddArg2(a, v0)
  8765  		return true
  8766  	}
  8767  	// match: (MADD a x (MOVDconst [c]))
  8768  	// cond: isPowerOfTwo(c+1) && c>=7
  8769  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  8770  	for {
  8771  		a := v_0
  8772  		x := v_1
  8773  		if v_2.Op != OpARM64MOVDconst {
  8774  			break
  8775  		}
  8776  		c := auxIntToInt64(v_2.AuxInt)
  8777  		if !(isPowerOfTwo(c+1) && c >= 7) {
  8778  			break
  8779  		}
  8780  		v.reset(OpARM64SUB)
  8781  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8782  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8783  		v0.AddArg2(x, x)
  8784  		v.AddArg2(a, v0)
  8785  		return true
  8786  	}
  8787  	// match: (MADD a x (MOVDconst [c]))
  8788  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8789  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  8790  	for {
  8791  		a := v_0
  8792  		x := v_1
  8793  		if v_2.Op != OpARM64MOVDconst {
  8794  			break
  8795  		}
  8796  		c := auxIntToInt64(v_2.AuxInt)
  8797  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8798  			break
  8799  		}
  8800  		v.reset(OpARM64SUBshiftLL)
  8801  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  8802  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8803  		v0.AuxInt = int64ToAuxInt(2)
  8804  		v0.AddArg2(x, x)
  8805  		v.AddArg2(a, v0)
  8806  		return true
  8807  	}
  8808  	// match: (MADD a x (MOVDconst [c]))
  8809  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8810  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  8811  	for {
  8812  		a := v_0
  8813  		x := v_1
  8814  		if v_2.Op != OpARM64MOVDconst {
  8815  			break
  8816  		}
  8817  		c := auxIntToInt64(v_2.AuxInt)
  8818  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8819  			break
  8820  		}
  8821  		v.reset(OpARM64ADDshiftLL)
  8822  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  8823  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8824  		v0.AuxInt = int64ToAuxInt(2)
  8825  		v0.AddArg2(x, x)
  8826  		v.AddArg2(a, v0)
  8827  		return true
  8828  	}
  8829  	// match: (MADD a x (MOVDconst [c]))
  8830  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8831  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  8832  	for {
  8833  		a := v_0
  8834  		x := v_1
  8835  		if v_2.Op != OpARM64MOVDconst {
  8836  			break
  8837  		}
  8838  		c := auxIntToInt64(v_2.AuxInt)
  8839  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8840  			break
  8841  		}
  8842  		v.reset(OpARM64SUBshiftLL)
  8843  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  8844  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8845  		v0.AuxInt = int64ToAuxInt(3)
  8846  		v0.AddArg2(x, x)
  8847  		v.AddArg2(a, v0)
  8848  		return true
  8849  	}
  8850  	// match: (MADD a x (MOVDconst [c]))
  8851  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8852  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  8853  	for {
  8854  		a := v_0
  8855  		x := v_1
  8856  		if v_2.Op != OpARM64MOVDconst {
  8857  			break
  8858  		}
  8859  		c := auxIntToInt64(v_2.AuxInt)
  8860  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8861  			break
  8862  		}
  8863  		v.reset(OpARM64ADDshiftLL)
  8864  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  8865  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8866  		v0.AuxInt = int64ToAuxInt(3)
  8867  		v0.AddArg2(x, x)
  8868  		v.AddArg2(a, v0)
  8869  		return true
  8870  	}
  8871  	// match: (MADD a (MOVDconst [-1]) x)
  8872  	// result: (SUB a x)
  8873  	for {
  8874  		a := v_0
  8875  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  8876  			break
  8877  		}
  8878  		x := v_2
  8879  		v.reset(OpARM64SUB)
  8880  		v.AddArg2(a, x)
  8881  		return true
  8882  	}
  8883  	// match: (MADD a (MOVDconst [0]) _)
  8884  	// result: a
  8885  	for {
  8886  		a := v_0
  8887  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  8888  			break
  8889  		}
  8890  		v.copyOf(a)
  8891  		return true
  8892  	}
  8893  	// match: (MADD a (MOVDconst [1]) x)
  8894  	// result: (ADD a x)
  8895  	for {
  8896  		a := v_0
  8897  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  8898  			break
  8899  		}
  8900  		x := v_2
  8901  		v.reset(OpARM64ADD)
  8902  		v.AddArg2(a, x)
  8903  		return true
  8904  	}
  8905  	// match: (MADD a (MOVDconst [c]) x)
  8906  	// cond: isPowerOfTwo(c)
  8907  	// result: (ADDshiftLL a x [log64(c)])
  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 !(isPowerOfTwo(c)) {
  8916  			break
  8917  		}
  8918  		v.reset(OpARM64ADDshiftLL)
  8919  		v.AuxInt = int64ToAuxInt(log64(c))
  8920  		v.AddArg2(a, x)
  8921  		return true
  8922  	}
  8923  	// match: (MADD a (MOVDconst [c]) x)
  8924  	// cond: isPowerOfTwo(c-1) && c>=3
  8925  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8926  	for {
  8927  		a := v_0
  8928  		if v_1.Op != OpARM64MOVDconst {
  8929  			break
  8930  		}
  8931  		c := auxIntToInt64(v_1.AuxInt)
  8932  		x := v_2
  8933  		if !(isPowerOfTwo(c-1) && c >= 3) {
  8934  			break
  8935  		}
  8936  		v.reset(OpARM64ADD)
  8937  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8938  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8939  		v0.AddArg2(x, x)
  8940  		v.AddArg2(a, v0)
  8941  		return true
  8942  	}
  8943  	// match: (MADD a (MOVDconst [c]) x)
  8944  	// cond: isPowerOfTwo(c+1) && c>=7
  8945  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  8946  	for {
  8947  		a := v_0
  8948  		if v_1.Op != OpARM64MOVDconst {
  8949  			break
  8950  		}
  8951  		c := auxIntToInt64(v_1.AuxInt)
  8952  		x := v_2
  8953  		if !(isPowerOfTwo(c+1) && c >= 7) {
  8954  			break
  8955  		}
  8956  		v.reset(OpARM64SUB)
  8957  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8958  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8959  		v0.AddArg2(x, x)
  8960  		v.AddArg2(a, v0)
  8961  		return true
  8962  	}
  8963  	// match: (MADD a (MOVDconst [c]) x)
  8964  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8965  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  8966  	for {
  8967  		a := v_0
  8968  		if v_1.Op != OpARM64MOVDconst {
  8969  			break
  8970  		}
  8971  		c := auxIntToInt64(v_1.AuxInt)
  8972  		x := v_2
  8973  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8974  			break
  8975  		}
  8976  		v.reset(OpARM64SUBshiftLL)
  8977  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  8978  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8979  		v0.AuxInt = int64ToAuxInt(2)
  8980  		v0.AddArg2(x, x)
  8981  		v.AddArg2(a, v0)
  8982  		return true
  8983  	}
  8984  	// match: (MADD a (MOVDconst [c]) x)
  8985  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8986  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  8987  	for {
  8988  		a := v_0
  8989  		if v_1.Op != OpARM64MOVDconst {
  8990  			break
  8991  		}
  8992  		c := auxIntToInt64(v_1.AuxInt)
  8993  		x := v_2
  8994  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8995  			break
  8996  		}
  8997  		v.reset(OpARM64ADDshiftLL)
  8998  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  8999  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9000  		v0.AuxInt = int64ToAuxInt(2)
  9001  		v0.AddArg2(x, x)
  9002  		v.AddArg2(a, v0)
  9003  		return true
  9004  	}
  9005  	// match: (MADD a (MOVDconst [c]) x)
  9006  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  9007  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  9008  	for {
  9009  		a := v_0
  9010  		if v_1.Op != OpARM64MOVDconst {
  9011  			break
  9012  		}
  9013  		c := auxIntToInt64(v_1.AuxInt)
  9014  		x := v_2
  9015  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  9016  			break
  9017  		}
  9018  		v.reset(OpARM64SUBshiftLL)
  9019  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  9020  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9021  		v0.AuxInt = int64ToAuxInt(3)
  9022  		v0.AddArg2(x, x)
  9023  		v.AddArg2(a, v0)
  9024  		return true
  9025  	}
  9026  	// match: (MADD a (MOVDconst [c]) x)
  9027  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  9028  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  9029  	for {
  9030  		a := v_0
  9031  		if v_1.Op != OpARM64MOVDconst {
  9032  			break
  9033  		}
  9034  		c := auxIntToInt64(v_1.AuxInt)
  9035  		x := v_2
  9036  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  9037  			break
  9038  		}
  9039  		v.reset(OpARM64ADDshiftLL)
  9040  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  9041  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9042  		v0.AuxInt = int64ToAuxInt(3)
  9043  		v0.AddArg2(x, x)
  9044  		v.AddArg2(a, v0)
  9045  		return true
  9046  	}
  9047  	// match: (MADD (MOVDconst [c]) x y)
  9048  	// result: (ADDconst [c] (MUL <x.Type> x y))
  9049  	for {
  9050  		if v_0.Op != OpARM64MOVDconst {
  9051  			break
  9052  		}
  9053  		c := auxIntToInt64(v_0.AuxInt)
  9054  		x := v_1
  9055  		y := v_2
  9056  		v.reset(OpARM64ADDconst)
  9057  		v.AuxInt = int64ToAuxInt(c)
  9058  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  9059  		v0.AddArg2(x, y)
  9060  		v.AddArg(v0)
  9061  		return true
  9062  	}
  9063  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  9064  	// result: (ADDconst [c*d] a)
  9065  	for {
  9066  		a := v_0
  9067  		if v_1.Op != OpARM64MOVDconst {
  9068  			break
  9069  		}
  9070  		c := auxIntToInt64(v_1.AuxInt)
  9071  		if v_2.Op != OpARM64MOVDconst {
  9072  			break
  9073  		}
  9074  		d := auxIntToInt64(v_2.AuxInt)
  9075  		v.reset(OpARM64ADDconst)
  9076  		v.AuxInt = int64ToAuxInt(c * d)
  9077  		v.AddArg(a)
  9078  		return true
  9079  	}
  9080  	return false
  9081  }
  9082  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  9083  	v_2 := v.Args[2]
  9084  	v_1 := v.Args[1]
  9085  	v_0 := v.Args[0]
  9086  	b := v.Block
  9087  	// match: (MADDW a x (MOVDconst [c]))
  9088  	// cond: int32(c)==-1
  9089  	// result: (MOVWUreg (SUB <a.Type> a x))
  9090  	for {
  9091  		a := v_0
  9092  		x := v_1
  9093  		if v_2.Op != OpARM64MOVDconst {
  9094  			break
  9095  		}
  9096  		c := auxIntToInt64(v_2.AuxInt)
  9097  		if !(int32(c) == -1) {
  9098  			break
  9099  		}
  9100  		v.reset(OpARM64MOVWUreg)
  9101  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9102  		v0.AddArg2(a, x)
  9103  		v.AddArg(v0)
  9104  		return true
  9105  	}
  9106  	// match: (MADDW a _ (MOVDconst [c]))
  9107  	// cond: int32(c)==0
  9108  	// result: (MOVWUreg a)
  9109  	for {
  9110  		a := v_0
  9111  		if v_2.Op != OpARM64MOVDconst {
  9112  			break
  9113  		}
  9114  		c := auxIntToInt64(v_2.AuxInt)
  9115  		if !(int32(c) == 0) {
  9116  			break
  9117  		}
  9118  		v.reset(OpARM64MOVWUreg)
  9119  		v.AddArg(a)
  9120  		return true
  9121  	}
  9122  	// match: (MADDW a x (MOVDconst [c]))
  9123  	// cond: int32(c)==1
  9124  	// result: (MOVWUreg (ADD <a.Type> a x))
  9125  	for {
  9126  		a := v_0
  9127  		x := v_1
  9128  		if v_2.Op != OpARM64MOVDconst {
  9129  			break
  9130  		}
  9131  		c := auxIntToInt64(v_2.AuxInt)
  9132  		if !(int32(c) == 1) {
  9133  			break
  9134  		}
  9135  		v.reset(OpARM64MOVWUreg)
  9136  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9137  		v0.AddArg2(a, x)
  9138  		v.AddArg(v0)
  9139  		return true
  9140  	}
  9141  	// match: (MADDW a x (MOVDconst [c]))
  9142  	// cond: isPowerOfTwo(c)
  9143  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  9144  	for {
  9145  		a := v_0
  9146  		x := v_1
  9147  		if v_2.Op != OpARM64MOVDconst {
  9148  			break
  9149  		}
  9150  		c := auxIntToInt64(v_2.AuxInt)
  9151  		if !(isPowerOfTwo(c)) {
  9152  			break
  9153  		}
  9154  		v.reset(OpARM64MOVWUreg)
  9155  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9156  		v0.AuxInt = int64ToAuxInt(log64(c))
  9157  		v0.AddArg2(a, x)
  9158  		v.AddArg(v0)
  9159  		return true
  9160  	}
  9161  	// match: (MADDW a x (MOVDconst [c]))
  9162  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  9163  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9164  	for {
  9165  		a := v_0
  9166  		x := v_1
  9167  		if v_2.Op != OpARM64MOVDconst {
  9168  			break
  9169  		}
  9170  		c := auxIntToInt64(v_2.AuxInt)
  9171  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9172  			break
  9173  		}
  9174  		v.reset(OpARM64MOVWUreg)
  9175  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9176  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9177  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9178  		v1.AddArg2(x, x)
  9179  		v0.AddArg2(a, v1)
  9180  		v.AddArg(v0)
  9181  		return true
  9182  	}
  9183  	// match: (MADDW a x (MOVDconst [c]))
  9184  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  9185  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  9186  	for {
  9187  		a := v_0
  9188  		x := v_1
  9189  		if v_2.Op != OpARM64MOVDconst {
  9190  			break
  9191  		}
  9192  		c := auxIntToInt64(v_2.AuxInt)
  9193  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9194  			break
  9195  		}
  9196  		v.reset(OpARM64MOVWUreg)
  9197  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9198  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9199  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9200  		v1.AddArg2(x, x)
  9201  		v0.AddArg2(a, v1)
  9202  		v.AddArg(v0)
  9203  		return true
  9204  	}
  9205  	// match: (MADDW a x (MOVDconst [c]))
  9206  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9207  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  9208  	for {
  9209  		a := v_0
  9210  		x := v_1
  9211  		if v_2.Op != OpARM64MOVDconst {
  9212  			break
  9213  		}
  9214  		c := auxIntToInt64(v_2.AuxInt)
  9215  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9216  			break
  9217  		}
  9218  		v.reset(OpARM64MOVWUreg)
  9219  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9220  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9221  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9222  		v1.AuxInt = int64ToAuxInt(2)
  9223  		v1.AddArg2(x, x)
  9224  		v0.AddArg2(a, v1)
  9225  		v.AddArg(v0)
  9226  		return true
  9227  	}
  9228  	// match: (MADDW a x (MOVDconst [c]))
  9229  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9230  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  9231  	for {
  9232  		a := v_0
  9233  		x := v_1
  9234  		if v_2.Op != OpARM64MOVDconst {
  9235  			break
  9236  		}
  9237  		c := auxIntToInt64(v_2.AuxInt)
  9238  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9239  			break
  9240  		}
  9241  		v.reset(OpARM64MOVWUreg)
  9242  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9243  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9244  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9245  		v1.AuxInt = int64ToAuxInt(2)
  9246  		v1.AddArg2(x, x)
  9247  		v0.AddArg2(a, v1)
  9248  		v.AddArg(v0)
  9249  		return true
  9250  	}
  9251  	// match: (MADDW a x (MOVDconst [c]))
  9252  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9253  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  9254  	for {
  9255  		a := v_0
  9256  		x := v_1
  9257  		if v_2.Op != OpARM64MOVDconst {
  9258  			break
  9259  		}
  9260  		c := auxIntToInt64(v_2.AuxInt)
  9261  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9262  			break
  9263  		}
  9264  		v.reset(OpARM64MOVWUreg)
  9265  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9266  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9267  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9268  		v1.AuxInt = int64ToAuxInt(3)
  9269  		v1.AddArg2(x, x)
  9270  		v0.AddArg2(a, v1)
  9271  		v.AddArg(v0)
  9272  		return true
  9273  	}
  9274  	// match: (MADDW a x (MOVDconst [c]))
  9275  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9276  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  9277  	for {
  9278  		a := v_0
  9279  		x := v_1
  9280  		if v_2.Op != OpARM64MOVDconst {
  9281  			break
  9282  		}
  9283  		c := auxIntToInt64(v_2.AuxInt)
  9284  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9285  			break
  9286  		}
  9287  		v.reset(OpARM64MOVWUreg)
  9288  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9289  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9290  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9291  		v1.AuxInt = int64ToAuxInt(3)
  9292  		v1.AddArg2(x, x)
  9293  		v0.AddArg2(a, v1)
  9294  		v.AddArg(v0)
  9295  		return true
  9296  	}
  9297  	// match: (MADDW a (MOVDconst [c]) x)
  9298  	// cond: int32(c)==-1
  9299  	// result: (MOVWUreg (SUB <a.Type> a x))
  9300  	for {
  9301  		a := v_0
  9302  		if v_1.Op != OpARM64MOVDconst {
  9303  			break
  9304  		}
  9305  		c := auxIntToInt64(v_1.AuxInt)
  9306  		x := v_2
  9307  		if !(int32(c) == -1) {
  9308  			break
  9309  		}
  9310  		v.reset(OpARM64MOVWUreg)
  9311  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9312  		v0.AddArg2(a, x)
  9313  		v.AddArg(v0)
  9314  		return true
  9315  	}
  9316  	// match: (MADDW a (MOVDconst [c]) _)
  9317  	// cond: int32(c)==0
  9318  	// result: (MOVWUreg a)
  9319  	for {
  9320  		a := v_0
  9321  		if v_1.Op != OpARM64MOVDconst {
  9322  			break
  9323  		}
  9324  		c := auxIntToInt64(v_1.AuxInt)
  9325  		if !(int32(c) == 0) {
  9326  			break
  9327  		}
  9328  		v.reset(OpARM64MOVWUreg)
  9329  		v.AddArg(a)
  9330  		return true
  9331  	}
  9332  	// match: (MADDW a (MOVDconst [c]) x)
  9333  	// cond: int32(c)==1
  9334  	// result: (MOVWUreg (ADD <a.Type> a x))
  9335  	for {
  9336  		a := v_0
  9337  		if v_1.Op != OpARM64MOVDconst {
  9338  			break
  9339  		}
  9340  		c := auxIntToInt64(v_1.AuxInt)
  9341  		x := v_2
  9342  		if !(int32(c) == 1) {
  9343  			break
  9344  		}
  9345  		v.reset(OpARM64MOVWUreg)
  9346  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9347  		v0.AddArg2(a, x)
  9348  		v.AddArg(v0)
  9349  		return true
  9350  	}
  9351  	// match: (MADDW a (MOVDconst [c]) x)
  9352  	// cond: isPowerOfTwo(c)
  9353  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  9354  	for {
  9355  		a := v_0
  9356  		if v_1.Op != OpARM64MOVDconst {
  9357  			break
  9358  		}
  9359  		c := auxIntToInt64(v_1.AuxInt)
  9360  		x := v_2
  9361  		if !(isPowerOfTwo(c)) {
  9362  			break
  9363  		}
  9364  		v.reset(OpARM64MOVWUreg)
  9365  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9366  		v0.AuxInt = int64ToAuxInt(log64(c))
  9367  		v0.AddArg2(a, x)
  9368  		v.AddArg(v0)
  9369  		return true
  9370  	}
  9371  	// match: (MADDW a (MOVDconst [c]) x)
  9372  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  9373  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9374  	for {
  9375  		a := v_0
  9376  		if v_1.Op != OpARM64MOVDconst {
  9377  			break
  9378  		}
  9379  		c := auxIntToInt64(v_1.AuxInt)
  9380  		x := v_2
  9381  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9382  			break
  9383  		}
  9384  		v.reset(OpARM64MOVWUreg)
  9385  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  9386  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9387  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9388  		v1.AddArg2(x, x)
  9389  		v0.AddArg2(a, v1)
  9390  		v.AddArg(v0)
  9391  		return true
  9392  	}
  9393  	// match: (MADDW a (MOVDconst [c]) x)
  9394  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  9395  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  9396  	for {
  9397  		a := v_0
  9398  		if v_1.Op != OpARM64MOVDconst {
  9399  			break
  9400  		}
  9401  		c := auxIntToInt64(v_1.AuxInt)
  9402  		x := v_2
  9403  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9404  			break
  9405  		}
  9406  		v.reset(OpARM64MOVWUreg)
  9407  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  9408  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9409  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9410  		v1.AddArg2(x, x)
  9411  		v0.AddArg2(a, v1)
  9412  		v.AddArg(v0)
  9413  		return true
  9414  	}
  9415  	// match: (MADDW a (MOVDconst [c]) x)
  9416  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9417  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  9418  	for {
  9419  		a := v_0
  9420  		if v_1.Op != OpARM64MOVDconst {
  9421  			break
  9422  		}
  9423  		c := auxIntToInt64(v_1.AuxInt)
  9424  		x := v_2
  9425  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9426  			break
  9427  		}
  9428  		v.reset(OpARM64MOVWUreg)
  9429  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9430  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9431  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9432  		v1.AuxInt = int64ToAuxInt(2)
  9433  		v1.AddArg2(x, x)
  9434  		v0.AddArg2(a, v1)
  9435  		v.AddArg(v0)
  9436  		return true
  9437  	}
  9438  	// match: (MADDW a (MOVDconst [c]) x)
  9439  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9440  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  9441  	for {
  9442  		a := v_0
  9443  		if v_1.Op != OpARM64MOVDconst {
  9444  			break
  9445  		}
  9446  		c := auxIntToInt64(v_1.AuxInt)
  9447  		x := v_2
  9448  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9449  			break
  9450  		}
  9451  		v.reset(OpARM64MOVWUreg)
  9452  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9453  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9454  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9455  		v1.AuxInt = int64ToAuxInt(2)
  9456  		v1.AddArg2(x, x)
  9457  		v0.AddArg2(a, v1)
  9458  		v.AddArg(v0)
  9459  		return true
  9460  	}
  9461  	// match: (MADDW a (MOVDconst [c]) x)
  9462  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9463  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  9464  	for {
  9465  		a := v_0
  9466  		if v_1.Op != OpARM64MOVDconst {
  9467  			break
  9468  		}
  9469  		c := auxIntToInt64(v_1.AuxInt)
  9470  		x := v_2
  9471  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9472  			break
  9473  		}
  9474  		v.reset(OpARM64MOVWUreg)
  9475  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  9476  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9477  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9478  		v1.AuxInt = int64ToAuxInt(3)
  9479  		v1.AddArg2(x, x)
  9480  		v0.AddArg2(a, v1)
  9481  		v.AddArg(v0)
  9482  		return true
  9483  	}
  9484  	// match: (MADDW a (MOVDconst [c]) x)
  9485  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9486  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  9487  	for {
  9488  		a := v_0
  9489  		if v_1.Op != OpARM64MOVDconst {
  9490  			break
  9491  		}
  9492  		c := auxIntToInt64(v_1.AuxInt)
  9493  		x := v_2
  9494  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9495  			break
  9496  		}
  9497  		v.reset(OpARM64MOVWUreg)
  9498  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  9499  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9500  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9501  		v1.AuxInt = int64ToAuxInt(3)
  9502  		v1.AddArg2(x, x)
  9503  		v0.AddArg2(a, v1)
  9504  		v.AddArg(v0)
  9505  		return true
  9506  	}
  9507  	// match: (MADDW (MOVDconst [c]) x y)
  9508  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  9509  	for {
  9510  		if v_0.Op != OpARM64MOVDconst {
  9511  			break
  9512  		}
  9513  		c := auxIntToInt64(v_0.AuxInt)
  9514  		x := v_1
  9515  		y := v_2
  9516  		v.reset(OpARM64MOVWUreg)
  9517  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  9518  		v0.AuxInt = int64ToAuxInt(c)
  9519  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  9520  		v1.AddArg2(x, y)
  9521  		v0.AddArg(v1)
  9522  		v.AddArg(v0)
  9523  		return true
  9524  	}
  9525  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  9526  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  9527  	for {
  9528  		a := v_0
  9529  		if v_1.Op != OpARM64MOVDconst {
  9530  			break
  9531  		}
  9532  		c := auxIntToInt64(v_1.AuxInt)
  9533  		if v_2.Op != OpARM64MOVDconst {
  9534  			break
  9535  		}
  9536  		d := auxIntToInt64(v_2.AuxInt)
  9537  		v.reset(OpARM64MOVWUreg)
  9538  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  9539  		v0.AuxInt = int64ToAuxInt(c * d)
  9540  		v0.AddArg(a)
  9541  		v.AddArg(v0)
  9542  		return true
  9543  	}
  9544  	return false
  9545  }
  9546  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  9547  	v_1 := v.Args[1]
  9548  	v_0 := v.Args[0]
  9549  	b := v.Block
  9550  	// match: (MNEG x (MOVDconst [-1]))
  9551  	// result: x
  9552  	for {
  9553  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9554  			x := v_0
  9555  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  9556  				continue
  9557  			}
  9558  			v.copyOf(x)
  9559  			return true
  9560  		}
  9561  		break
  9562  	}
  9563  	// match: (MNEG _ (MOVDconst [0]))
  9564  	// result: (MOVDconst [0])
  9565  	for {
  9566  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9567  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  9568  				continue
  9569  			}
  9570  			v.reset(OpARM64MOVDconst)
  9571  			v.AuxInt = int64ToAuxInt(0)
  9572  			return true
  9573  		}
  9574  		break
  9575  	}
  9576  	// match: (MNEG x (MOVDconst [1]))
  9577  	// result: (NEG x)
  9578  	for {
  9579  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9580  			x := v_0
  9581  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  9582  				continue
  9583  			}
  9584  			v.reset(OpARM64NEG)
  9585  			v.AddArg(x)
  9586  			return true
  9587  		}
  9588  		break
  9589  	}
  9590  	// match: (MNEG x (MOVDconst [c]))
  9591  	// cond: isPowerOfTwo(c)
  9592  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  9593  	for {
  9594  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9595  			x := v_0
  9596  			if v_1.Op != OpARM64MOVDconst {
  9597  				continue
  9598  			}
  9599  			c := auxIntToInt64(v_1.AuxInt)
  9600  			if !(isPowerOfTwo(c)) {
  9601  				continue
  9602  			}
  9603  			v.reset(OpARM64NEG)
  9604  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9605  			v0.AuxInt = int64ToAuxInt(log64(c))
  9606  			v0.AddArg(x)
  9607  			v.AddArg(v0)
  9608  			return true
  9609  		}
  9610  		break
  9611  	}
  9612  	// match: (MNEG x (MOVDconst [c]))
  9613  	// cond: isPowerOfTwo(c-1) && c >= 3
  9614  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  9615  	for {
  9616  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9617  			x := v_0
  9618  			if v_1.Op != OpARM64MOVDconst {
  9619  				continue
  9620  			}
  9621  			c := auxIntToInt64(v_1.AuxInt)
  9622  			if !(isPowerOfTwo(c-1) && c >= 3) {
  9623  				continue
  9624  			}
  9625  			v.reset(OpARM64NEG)
  9626  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9627  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  9628  			v0.AddArg2(x, x)
  9629  			v.AddArg(v0)
  9630  			return true
  9631  		}
  9632  		break
  9633  	}
  9634  	// match: (MNEG x (MOVDconst [c]))
  9635  	// cond: isPowerOfTwo(c+1) && c >= 7
  9636  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  9637  	for {
  9638  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9639  			x := v_0
  9640  			if v_1.Op != OpARM64MOVDconst {
  9641  				continue
  9642  			}
  9643  			c := auxIntToInt64(v_1.AuxInt)
  9644  			if !(isPowerOfTwo(c+1) && c >= 7) {
  9645  				continue
  9646  			}
  9647  			v.reset(OpARM64NEG)
  9648  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9649  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  9650  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9651  			v1.AddArg(x)
  9652  			v0.AddArg2(v1, x)
  9653  			v.AddArg(v0)
  9654  			return true
  9655  		}
  9656  		break
  9657  	}
  9658  	// match: (MNEG x (MOVDconst [c]))
  9659  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  9660  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  9661  	for {
  9662  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9663  			x := v_0
  9664  			if v_1.Op != OpARM64MOVDconst {
  9665  				continue
  9666  			}
  9667  			c := auxIntToInt64(v_1.AuxInt)
  9668  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  9669  				continue
  9670  			}
  9671  			v.reset(OpARM64SLLconst)
  9672  			v.Type = x.Type
  9673  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  9674  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9675  			v0.AuxInt = int64ToAuxInt(2)
  9676  			v0.AddArg2(x, x)
  9677  			v.AddArg(v0)
  9678  			return true
  9679  		}
  9680  		break
  9681  	}
  9682  	// match: (MNEG x (MOVDconst [c]))
  9683  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  9684  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  9685  	for {
  9686  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9687  			x := v_0
  9688  			if v_1.Op != OpARM64MOVDconst {
  9689  				continue
  9690  			}
  9691  			c := auxIntToInt64(v_1.AuxInt)
  9692  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  9693  				continue
  9694  			}
  9695  			v.reset(OpARM64NEG)
  9696  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9697  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  9698  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9699  			v1.AuxInt = int64ToAuxInt(2)
  9700  			v1.AddArg2(x, x)
  9701  			v0.AddArg(v1)
  9702  			v.AddArg(v0)
  9703  			return true
  9704  		}
  9705  		break
  9706  	}
  9707  	// match: (MNEG x (MOVDconst [c]))
  9708  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  9709  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  9710  	for {
  9711  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9712  			x := v_0
  9713  			if v_1.Op != OpARM64MOVDconst {
  9714  				continue
  9715  			}
  9716  			c := auxIntToInt64(v_1.AuxInt)
  9717  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  9718  				continue
  9719  			}
  9720  			v.reset(OpARM64SLLconst)
  9721  			v.Type = x.Type
  9722  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  9723  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9724  			v0.AuxInt = int64ToAuxInt(3)
  9725  			v0.AddArg2(x, x)
  9726  			v.AddArg(v0)
  9727  			return true
  9728  		}
  9729  		break
  9730  	}
  9731  	// match: (MNEG x (MOVDconst [c]))
  9732  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  9733  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  9734  	for {
  9735  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9736  			x := v_0
  9737  			if v_1.Op != OpARM64MOVDconst {
  9738  				continue
  9739  			}
  9740  			c := auxIntToInt64(v_1.AuxInt)
  9741  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  9742  				continue
  9743  			}
  9744  			v.reset(OpARM64NEG)
  9745  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9746  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  9747  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9748  			v1.AuxInt = int64ToAuxInt(3)
  9749  			v1.AddArg2(x, x)
  9750  			v0.AddArg(v1)
  9751  			v.AddArg(v0)
  9752  			return true
  9753  		}
  9754  		break
  9755  	}
  9756  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  9757  	// result: (MOVDconst [-c*d])
  9758  	for {
  9759  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9760  			if v_0.Op != OpARM64MOVDconst {
  9761  				continue
  9762  			}
  9763  			c := auxIntToInt64(v_0.AuxInt)
  9764  			if v_1.Op != OpARM64MOVDconst {
  9765  				continue
  9766  			}
  9767  			d := auxIntToInt64(v_1.AuxInt)
  9768  			v.reset(OpARM64MOVDconst)
  9769  			v.AuxInt = int64ToAuxInt(-c * d)
  9770  			return true
  9771  		}
  9772  		break
  9773  	}
  9774  	return false
  9775  }
  9776  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  9777  	v_1 := v.Args[1]
  9778  	v_0 := v.Args[0]
  9779  	b := v.Block
  9780  	// match: (MNEGW x (MOVDconst [c]))
  9781  	// cond: int32(c)==-1
  9782  	// result: (MOVWUreg x)
  9783  	for {
  9784  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9785  			x := v_0
  9786  			if v_1.Op != OpARM64MOVDconst {
  9787  				continue
  9788  			}
  9789  			c := auxIntToInt64(v_1.AuxInt)
  9790  			if !(int32(c) == -1) {
  9791  				continue
  9792  			}
  9793  			v.reset(OpARM64MOVWUreg)
  9794  			v.AddArg(x)
  9795  			return true
  9796  		}
  9797  		break
  9798  	}
  9799  	// match: (MNEGW _ (MOVDconst [c]))
  9800  	// cond: int32(c)==0
  9801  	// result: (MOVDconst [0])
  9802  	for {
  9803  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9804  			if v_1.Op != OpARM64MOVDconst {
  9805  				continue
  9806  			}
  9807  			c := auxIntToInt64(v_1.AuxInt)
  9808  			if !(int32(c) == 0) {
  9809  				continue
  9810  			}
  9811  			v.reset(OpARM64MOVDconst)
  9812  			v.AuxInt = int64ToAuxInt(0)
  9813  			return true
  9814  		}
  9815  		break
  9816  	}
  9817  	// match: (MNEGW x (MOVDconst [c]))
  9818  	// cond: int32(c)==1
  9819  	// result: (MOVWUreg (NEG <x.Type> x))
  9820  	for {
  9821  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9822  			x := v_0
  9823  			if v_1.Op != OpARM64MOVDconst {
  9824  				continue
  9825  			}
  9826  			c := auxIntToInt64(v_1.AuxInt)
  9827  			if !(int32(c) == 1) {
  9828  				continue
  9829  			}
  9830  			v.reset(OpARM64MOVWUreg)
  9831  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9832  			v0.AddArg(x)
  9833  			v.AddArg(v0)
  9834  			return true
  9835  		}
  9836  		break
  9837  	}
  9838  	// match: (MNEGW x (MOVDconst [c]))
  9839  	// cond: isPowerOfTwo(c)
  9840  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  9841  	for {
  9842  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9843  			x := v_0
  9844  			if v_1.Op != OpARM64MOVDconst {
  9845  				continue
  9846  			}
  9847  			c := auxIntToInt64(v_1.AuxInt)
  9848  			if !(isPowerOfTwo(c)) {
  9849  				continue
  9850  			}
  9851  			v.reset(OpARM64NEG)
  9852  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9853  			v0.AuxInt = int64ToAuxInt(log64(c))
  9854  			v0.AddArg(x)
  9855  			v.AddArg(v0)
  9856  			return true
  9857  		}
  9858  		break
  9859  	}
  9860  	// match: (MNEGW x (MOVDconst [c]))
  9861  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  9862  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  9863  	for {
  9864  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9865  			x := v_0
  9866  			if v_1.Op != OpARM64MOVDconst {
  9867  				continue
  9868  			}
  9869  			c := auxIntToInt64(v_1.AuxInt)
  9870  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  9871  				continue
  9872  			}
  9873  			v.reset(OpARM64MOVWUreg)
  9874  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9875  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9876  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  9877  			v1.AddArg2(x, x)
  9878  			v0.AddArg(v1)
  9879  			v.AddArg(v0)
  9880  			return true
  9881  		}
  9882  		break
  9883  	}
  9884  	// match: (MNEGW x (MOVDconst [c]))
  9885  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  9886  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  9887  	for {
  9888  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9889  			x := v_0
  9890  			if v_1.Op != OpARM64MOVDconst {
  9891  				continue
  9892  			}
  9893  			c := auxIntToInt64(v_1.AuxInt)
  9894  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  9895  				continue
  9896  			}
  9897  			v.reset(OpARM64MOVWUreg)
  9898  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9899  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9900  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  9901  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9902  			v2.AddArg(x)
  9903  			v1.AddArg2(v2, x)
  9904  			v0.AddArg(v1)
  9905  			v.AddArg(v0)
  9906  			return true
  9907  		}
  9908  		break
  9909  	}
  9910  	// match: (MNEGW x (MOVDconst [c]))
  9911  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  9912  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  9913  	for {
  9914  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9915  			x := v_0
  9916  			if v_1.Op != OpARM64MOVDconst {
  9917  				continue
  9918  			}
  9919  			c := auxIntToInt64(v_1.AuxInt)
  9920  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  9921  				continue
  9922  			}
  9923  			v.reset(OpARM64MOVWUreg)
  9924  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9925  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  9926  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9927  			v1.AuxInt = int64ToAuxInt(2)
  9928  			v1.AddArg2(x, x)
  9929  			v0.AddArg(v1)
  9930  			v.AddArg(v0)
  9931  			return true
  9932  		}
  9933  		break
  9934  	}
  9935  	// match: (MNEGW x (MOVDconst [c]))
  9936  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  9937  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  9938  	for {
  9939  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9940  			x := v_0
  9941  			if v_1.Op != OpARM64MOVDconst {
  9942  				continue
  9943  			}
  9944  			c := auxIntToInt64(v_1.AuxInt)
  9945  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  9946  				continue
  9947  			}
  9948  			v.reset(OpARM64MOVWUreg)
  9949  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  9950  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9951  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  9952  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  9953  			v2.AuxInt = int64ToAuxInt(2)
  9954  			v2.AddArg2(x, x)
  9955  			v1.AddArg(v2)
  9956  			v0.AddArg(v1)
  9957  			v.AddArg(v0)
  9958  			return true
  9959  		}
  9960  		break
  9961  	}
  9962  	// match: (MNEGW x (MOVDconst [c]))
  9963  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  9964  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  9965  	for {
  9966  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9967  			x := v_0
  9968  			if v_1.Op != OpARM64MOVDconst {
  9969  				continue
  9970  			}
  9971  			c := auxIntToInt64(v_1.AuxInt)
  9972  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  9973  				continue
  9974  			}
  9975  			v.reset(OpARM64MOVWUreg)
  9976  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  9977  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  9978  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  9979  			v1.AuxInt = int64ToAuxInt(3)
  9980  			v1.AddArg2(x, x)
  9981  			v0.AddArg(v1)
  9982  			v.AddArg(v0)
  9983  			return true
  9984  		}
  9985  		break
  9986  	}
  9987  	// match: (MNEGW x (MOVDconst [c]))
  9988  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  9989  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  9990  	for {
  9991  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  9992  			x := v_0
  9993  			if v_1.Op != OpARM64MOVDconst {
  9994  				continue
  9995  			}
  9996  			c := auxIntToInt64(v_1.AuxInt)
  9997  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  9998  				continue
  9999  			}
 10000  			v.reset(OpARM64MOVWUreg)
 10001  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 10002  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 10003  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
 10004  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 10005  			v2.AuxInt = int64ToAuxInt(3)
 10006  			v2.AddArg2(x, x)
 10007  			v1.AddArg(v2)
 10008  			v0.AddArg(v1)
 10009  			v.AddArg(v0)
 10010  			return true
 10011  		}
 10012  		break
 10013  	}
 10014  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
 10015  	// result: (MOVDconst [int64(uint32(-c*d))])
 10016  	for {
 10017  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 10018  			if v_0.Op != OpARM64MOVDconst {
 10019  				continue
 10020  			}
 10021  			c := auxIntToInt64(v_0.AuxInt)
 10022  			if v_1.Op != OpARM64MOVDconst {
 10023  				continue
 10024  			}
 10025  			d := auxIntToInt64(v_1.AuxInt)
 10026  			v.reset(OpARM64MOVDconst)
 10027  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
 10028  			return true
 10029  		}
 10030  		break
 10031  	}
 10032  	return false
 10033  }
 10034  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
 10035  	v_1 := v.Args[1]
 10036  	v_0 := v.Args[0]
 10037  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
 10038  	// cond: d != 0
 10039  	// result: (MOVDconst [c%d])
 10040  	for {
 10041  		if v_0.Op != OpARM64MOVDconst {
 10042  			break
 10043  		}
 10044  		c := auxIntToInt64(v_0.AuxInt)
 10045  		if v_1.Op != OpARM64MOVDconst {
 10046  			break
 10047  		}
 10048  		d := auxIntToInt64(v_1.AuxInt)
 10049  		if !(d != 0) {
 10050  			break
 10051  		}
 10052  		v.reset(OpARM64MOVDconst)
 10053  		v.AuxInt = int64ToAuxInt(c % d)
 10054  		return true
 10055  	}
 10056  	return false
 10057  }
 10058  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
 10059  	v_1 := v.Args[1]
 10060  	v_0 := v.Args[0]
 10061  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
 10062  	// cond: d != 0
 10063  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
 10064  	for {
 10065  		if v_0.Op != OpARM64MOVDconst {
 10066  			break
 10067  		}
 10068  		c := auxIntToInt64(v_0.AuxInt)
 10069  		if v_1.Op != OpARM64MOVDconst {
 10070  			break
 10071  		}
 10072  		d := auxIntToInt64(v_1.AuxInt)
 10073  		if !(d != 0) {
 10074  			break
 10075  		}
 10076  		v.reset(OpARM64MOVDconst)
 10077  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
 10078  		return true
 10079  	}
 10080  	return false
 10081  }
 10082  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
 10083  	v_1 := v.Args[1]
 10084  	v_0 := v.Args[0]
 10085  	b := v.Block
 10086  	config := b.Func.Config
 10087  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10088  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10089  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
 10090  	for {
 10091  		off1 := auxIntToInt32(v.AuxInt)
 10092  		sym := auxToSym(v.Aux)
 10093  		if v_0.Op != OpARM64ADDconst {
 10094  			break
 10095  		}
 10096  		off2 := auxIntToInt64(v_0.AuxInt)
 10097  		ptr := v_0.Args[0]
 10098  		mem := v_1
 10099  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10100  			break
 10101  		}
 10102  		v.reset(OpARM64MOVBUload)
 10103  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10104  		v.Aux = symToAux(sym)
 10105  		v.AddArg2(ptr, mem)
 10106  		return true
 10107  	}
 10108  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
 10109  	// cond: off == 0 && sym == nil
 10110  	// result: (MOVBUloadidx ptr idx mem)
 10111  	for {
 10112  		off := auxIntToInt32(v.AuxInt)
 10113  		sym := auxToSym(v.Aux)
 10114  		if v_0.Op != OpARM64ADD {
 10115  			break
 10116  		}
 10117  		idx := v_0.Args[1]
 10118  		ptr := v_0.Args[0]
 10119  		mem := v_1
 10120  		if !(off == 0 && sym == nil) {
 10121  			break
 10122  		}
 10123  		v.reset(OpARM64MOVBUloadidx)
 10124  		v.AddArg3(ptr, idx, mem)
 10125  		return true
 10126  	}
 10127  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10128  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10129  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10130  	for {
 10131  		off1 := auxIntToInt32(v.AuxInt)
 10132  		sym1 := auxToSym(v.Aux)
 10133  		if v_0.Op != OpARM64MOVDaddr {
 10134  			break
 10135  		}
 10136  		off2 := auxIntToInt32(v_0.AuxInt)
 10137  		sym2 := auxToSym(v_0.Aux)
 10138  		ptr := v_0.Args[0]
 10139  		mem := v_1
 10140  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10141  			break
 10142  		}
 10143  		v.reset(OpARM64MOVBUload)
 10144  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10145  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10146  		v.AddArg2(ptr, mem)
 10147  		return true
 10148  	}
 10149  	// match: (MOVBUload [off] {sym} (SB) _)
 10150  	// cond: symIsRO(sym)
 10151  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
 10152  	for {
 10153  		off := auxIntToInt32(v.AuxInt)
 10154  		sym := auxToSym(v.Aux)
 10155  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10156  			break
 10157  		}
 10158  		v.reset(OpARM64MOVDconst)
 10159  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
 10160  		return true
 10161  	}
 10162  	return false
 10163  }
 10164  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
 10165  	v_2 := v.Args[2]
 10166  	v_1 := v.Args[1]
 10167  	v_0 := v.Args[0]
 10168  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
 10169  	// cond: is32Bit(c)
 10170  	// result: (MOVBUload [int32(c)] ptr mem)
 10171  	for {
 10172  		ptr := v_0
 10173  		if v_1.Op != OpARM64MOVDconst {
 10174  			break
 10175  		}
 10176  		c := auxIntToInt64(v_1.AuxInt)
 10177  		mem := v_2
 10178  		if !(is32Bit(c)) {
 10179  			break
 10180  		}
 10181  		v.reset(OpARM64MOVBUload)
 10182  		v.AuxInt = int32ToAuxInt(int32(c))
 10183  		v.AddArg2(ptr, mem)
 10184  		return true
 10185  	}
 10186  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
 10187  	// cond: is32Bit(c)
 10188  	// result: (MOVBUload [int32(c)] ptr mem)
 10189  	for {
 10190  		if v_0.Op != OpARM64MOVDconst {
 10191  			break
 10192  		}
 10193  		c := auxIntToInt64(v_0.AuxInt)
 10194  		ptr := v_1
 10195  		mem := v_2
 10196  		if !(is32Bit(c)) {
 10197  			break
 10198  		}
 10199  		v.reset(OpARM64MOVBUload)
 10200  		v.AuxInt = int32ToAuxInt(int32(c))
 10201  		v.AddArg2(ptr, mem)
 10202  		return true
 10203  	}
 10204  	return false
 10205  }
 10206  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
 10207  	v_0 := v.Args[0]
 10208  	// match: (MOVBUreg (ANDconst [c] x))
 10209  	// result: (ANDconst [c&(1<<8-1)] x)
 10210  	for {
 10211  		if v_0.Op != OpARM64ANDconst {
 10212  			break
 10213  		}
 10214  		c := auxIntToInt64(v_0.AuxInt)
 10215  		x := v_0.Args[0]
 10216  		v.reset(OpARM64ANDconst)
 10217  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
 10218  		v.AddArg(x)
 10219  		return true
 10220  	}
 10221  	// match: (MOVBUreg (MOVDconst [c]))
 10222  	// result: (MOVDconst [int64(uint8(c))])
 10223  	for {
 10224  		if v_0.Op != OpARM64MOVDconst {
 10225  			break
 10226  		}
 10227  		c := auxIntToInt64(v_0.AuxInt)
 10228  		v.reset(OpARM64MOVDconst)
 10229  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
 10230  		return true
 10231  	}
 10232  	// match: (MOVBUreg x)
 10233  	// cond: v.Type.Size() <= 1
 10234  	// result: x
 10235  	for {
 10236  		x := v_0
 10237  		if !(v.Type.Size() <= 1) {
 10238  			break
 10239  		}
 10240  		v.copyOf(x)
 10241  		return true
 10242  	}
 10243  	// match: (MOVBUreg (SLLconst [lc] x))
 10244  	// cond: lc >= 8
 10245  	// result: (MOVDconst [0])
 10246  	for {
 10247  		if v_0.Op != OpARM64SLLconst {
 10248  			break
 10249  		}
 10250  		lc := auxIntToInt64(v_0.AuxInt)
 10251  		if !(lc >= 8) {
 10252  			break
 10253  		}
 10254  		v.reset(OpARM64MOVDconst)
 10255  		v.AuxInt = int64ToAuxInt(0)
 10256  		return true
 10257  	}
 10258  	// match: (MOVBUreg (SLLconst [lc] x))
 10259  	// cond: lc < 8
 10260  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
 10261  	for {
 10262  		if v_0.Op != OpARM64SLLconst {
 10263  			break
 10264  		}
 10265  		lc := auxIntToInt64(v_0.AuxInt)
 10266  		x := v_0.Args[0]
 10267  		if !(lc < 8) {
 10268  			break
 10269  		}
 10270  		v.reset(OpARM64UBFIZ)
 10271  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
 10272  		v.AddArg(x)
 10273  		return true
 10274  	}
 10275  	// match: (MOVBUreg (SRLconst [rc] x))
 10276  	// cond: rc < 8
 10277  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
 10278  	for {
 10279  		if v_0.Op != OpARM64SRLconst {
 10280  			break
 10281  		}
 10282  		rc := auxIntToInt64(v_0.AuxInt)
 10283  		x := v_0.Args[0]
 10284  		if !(rc < 8) {
 10285  			break
 10286  		}
 10287  		v.reset(OpARM64UBFX)
 10288  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
 10289  		v.AddArg(x)
 10290  		return true
 10291  	}
 10292  	// match: (MOVBUreg (UBFX [bfc] x))
 10293  	// cond: bfc.width() <= 8
 10294  	// result: (UBFX [bfc] x)
 10295  	for {
 10296  		if v_0.Op != OpARM64UBFX {
 10297  			break
 10298  		}
 10299  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10300  		x := v_0.Args[0]
 10301  		if !(bfc.width() <= 8) {
 10302  			break
 10303  		}
 10304  		v.reset(OpARM64UBFX)
 10305  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10306  		v.AddArg(x)
 10307  		return true
 10308  	}
 10309  	return false
 10310  }
 10311  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
 10312  	v_1 := v.Args[1]
 10313  	v_0 := v.Args[0]
 10314  	b := v.Block
 10315  	config := b.Func.Config
 10316  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
 10317  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10318  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
 10319  	for {
 10320  		off1 := auxIntToInt32(v.AuxInt)
 10321  		sym := auxToSym(v.Aux)
 10322  		if v_0.Op != OpARM64ADDconst {
 10323  			break
 10324  		}
 10325  		off2 := auxIntToInt64(v_0.AuxInt)
 10326  		ptr := v_0.Args[0]
 10327  		mem := v_1
 10328  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10329  			break
 10330  		}
 10331  		v.reset(OpARM64MOVBload)
 10332  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10333  		v.Aux = symToAux(sym)
 10334  		v.AddArg2(ptr, mem)
 10335  		return true
 10336  	}
 10337  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
 10338  	// cond: off == 0 && sym == nil
 10339  	// result: (MOVBloadidx ptr idx mem)
 10340  	for {
 10341  		off := auxIntToInt32(v.AuxInt)
 10342  		sym := auxToSym(v.Aux)
 10343  		if v_0.Op != OpARM64ADD {
 10344  			break
 10345  		}
 10346  		idx := v_0.Args[1]
 10347  		ptr := v_0.Args[0]
 10348  		mem := v_1
 10349  		if !(off == 0 && sym == nil) {
 10350  			break
 10351  		}
 10352  		v.reset(OpARM64MOVBloadidx)
 10353  		v.AddArg3(ptr, idx, mem)
 10354  		return true
 10355  	}
 10356  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10357  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10358  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10359  	for {
 10360  		off1 := auxIntToInt32(v.AuxInt)
 10361  		sym1 := auxToSym(v.Aux)
 10362  		if v_0.Op != OpARM64MOVDaddr {
 10363  			break
 10364  		}
 10365  		off2 := auxIntToInt32(v_0.AuxInt)
 10366  		sym2 := auxToSym(v_0.Aux)
 10367  		ptr := v_0.Args[0]
 10368  		mem := v_1
 10369  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10370  			break
 10371  		}
 10372  		v.reset(OpARM64MOVBload)
 10373  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10374  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10375  		v.AddArg2(ptr, mem)
 10376  		return true
 10377  	}
 10378  	// match: (MOVBload [off] {sym} (SB) _)
 10379  	// cond: symIsRO(sym)
 10380  	// result: (MOVDconst [int64(int8(read8(sym, int64(off))))])
 10381  	for {
 10382  		off := auxIntToInt32(v.AuxInt)
 10383  		sym := auxToSym(v.Aux)
 10384  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10385  			break
 10386  		}
 10387  		v.reset(OpARM64MOVDconst)
 10388  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
 10389  		return true
 10390  	}
 10391  	return false
 10392  }
 10393  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
 10394  	v_2 := v.Args[2]
 10395  	v_1 := v.Args[1]
 10396  	v_0 := v.Args[0]
 10397  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
 10398  	// cond: is32Bit(c)
 10399  	// result: (MOVBload [int32(c)] ptr mem)
 10400  	for {
 10401  		ptr := v_0
 10402  		if v_1.Op != OpARM64MOVDconst {
 10403  			break
 10404  		}
 10405  		c := auxIntToInt64(v_1.AuxInt)
 10406  		mem := v_2
 10407  		if !(is32Bit(c)) {
 10408  			break
 10409  		}
 10410  		v.reset(OpARM64MOVBload)
 10411  		v.AuxInt = int32ToAuxInt(int32(c))
 10412  		v.AddArg2(ptr, mem)
 10413  		return true
 10414  	}
 10415  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
 10416  	// cond: is32Bit(c)
 10417  	// result: (MOVBload [int32(c)] ptr mem)
 10418  	for {
 10419  		if v_0.Op != OpARM64MOVDconst {
 10420  			break
 10421  		}
 10422  		c := auxIntToInt64(v_0.AuxInt)
 10423  		ptr := v_1
 10424  		mem := v_2
 10425  		if !(is32Bit(c)) {
 10426  			break
 10427  		}
 10428  		v.reset(OpARM64MOVBload)
 10429  		v.AuxInt = int32ToAuxInt(int32(c))
 10430  		v.AddArg2(ptr, mem)
 10431  		return true
 10432  	}
 10433  	return false
 10434  }
 10435  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
 10436  	v_0 := v.Args[0]
 10437  	// match: (MOVBreg (MOVDconst [c]))
 10438  	// result: (MOVDconst [int64(int8(c))])
 10439  	for {
 10440  		if v_0.Op != OpARM64MOVDconst {
 10441  			break
 10442  		}
 10443  		c := auxIntToInt64(v_0.AuxInt)
 10444  		v.reset(OpARM64MOVDconst)
 10445  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
 10446  		return true
 10447  	}
 10448  	// match: (MOVBreg x)
 10449  	// cond: v.Type.Size() <= 1
 10450  	// result: x
 10451  	for {
 10452  		x := v_0
 10453  		if !(v.Type.Size() <= 1) {
 10454  			break
 10455  		}
 10456  		v.copyOf(x)
 10457  		return true
 10458  	}
 10459  	// match: (MOVBreg <t> (ANDconst x [c]))
 10460  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
 10461  	// result: (ANDconst <t> x [c])
 10462  	for {
 10463  		t := v.Type
 10464  		if v_0.Op != OpARM64ANDconst {
 10465  			break
 10466  		}
 10467  		c := auxIntToInt64(v_0.AuxInt)
 10468  		x := v_0.Args[0]
 10469  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
 10470  			break
 10471  		}
 10472  		v.reset(OpARM64ANDconst)
 10473  		v.Type = t
 10474  		v.AuxInt = int64ToAuxInt(c)
 10475  		v.AddArg(x)
 10476  		return true
 10477  	}
 10478  	// match: (MOVBreg (SLLconst [lc] x))
 10479  	// cond: lc < 8
 10480  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
 10481  	for {
 10482  		if v_0.Op != OpARM64SLLconst {
 10483  			break
 10484  		}
 10485  		lc := auxIntToInt64(v_0.AuxInt)
 10486  		x := v_0.Args[0]
 10487  		if !(lc < 8) {
 10488  			break
 10489  		}
 10490  		v.reset(OpARM64SBFIZ)
 10491  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
 10492  		v.AddArg(x)
 10493  		return true
 10494  	}
 10495  	// match: (MOVBreg (SBFX [bfc] x))
 10496  	// cond: bfc.width() <= 8
 10497  	// result: (SBFX [bfc] x)
 10498  	for {
 10499  		if v_0.Op != OpARM64SBFX {
 10500  			break
 10501  		}
 10502  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10503  		x := v_0.Args[0]
 10504  		if !(bfc.width() <= 8) {
 10505  			break
 10506  		}
 10507  		v.reset(OpARM64SBFX)
 10508  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10509  		v.AddArg(x)
 10510  		return true
 10511  	}
 10512  	return false
 10513  }
 10514  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
 10515  	v_2 := v.Args[2]
 10516  	v_1 := v.Args[1]
 10517  	v_0 := v.Args[0]
 10518  	b := v.Block
 10519  	config := b.Func.Config
 10520  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10521  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10522  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
 10523  	for {
 10524  		off1 := auxIntToInt32(v.AuxInt)
 10525  		sym := auxToSym(v.Aux)
 10526  		if v_0.Op != OpARM64ADDconst {
 10527  			break
 10528  		}
 10529  		off2 := auxIntToInt64(v_0.AuxInt)
 10530  		ptr := v_0.Args[0]
 10531  		val := v_1
 10532  		mem := v_2
 10533  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10534  			break
 10535  		}
 10536  		v.reset(OpARM64MOVBstore)
 10537  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10538  		v.Aux = symToAux(sym)
 10539  		v.AddArg3(ptr, val, mem)
 10540  		return true
 10541  	}
 10542  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
 10543  	// cond: off == 0 && sym == nil
 10544  	// result: (MOVBstoreidx ptr idx val mem)
 10545  	for {
 10546  		off := auxIntToInt32(v.AuxInt)
 10547  		sym := auxToSym(v.Aux)
 10548  		if v_0.Op != OpARM64ADD {
 10549  			break
 10550  		}
 10551  		idx := v_0.Args[1]
 10552  		ptr := v_0.Args[0]
 10553  		val := v_1
 10554  		mem := v_2
 10555  		if !(off == 0 && sym == nil) {
 10556  			break
 10557  		}
 10558  		v.reset(OpARM64MOVBstoreidx)
 10559  		v.AddArg4(ptr, idx, val, mem)
 10560  		return true
 10561  	}
 10562  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10563  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10564  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10565  	for {
 10566  		off1 := auxIntToInt32(v.AuxInt)
 10567  		sym1 := auxToSym(v.Aux)
 10568  		if v_0.Op != OpARM64MOVDaddr {
 10569  			break
 10570  		}
 10571  		off2 := auxIntToInt32(v_0.AuxInt)
 10572  		sym2 := auxToSym(v_0.Aux)
 10573  		ptr := v_0.Args[0]
 10574  		val := v_1
 10575  		mem := v_2
 10576  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10577  			break
 10578  		}
 10579  		v.reset(OpARM64MOVBstore)
 10580  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10581  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10582  		v.AddArg3(ptr, val, mem)
 10583  		return true
 10584  	}
 10585  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
 10586  	// result: (MOVBstore [off] {sym} ptr x mem)
 10587  	for {
 10588  		off := auxIntToInt32(v.AuxInt)
 10589  		sym := auxToSym(v.Aux)
 10590  		ptr := v_0
 10591  		if v_1.Op != OpARM64MOVBreg {
 10592  			break
 10593  		}
 10594  		x := v_1.Args[0]
 10595  		mem := v_2
 10596  		v.reset(OpARM64MOVBstore)
 10597  		v.AuxInt = int32ToAuxInt(off)
 10598  		v.Aux = symToAux(sym)
 10599  		v.AddArg3(ptr, x, mem)
 10600  		return true
 10601  	}
 10602  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
 10603  	// result: (MOVBstore [off] {sym} ptr x mem)
 10604  	for {
 10605  		off := auxIntToInt32(v.AuxInt)
 10606  		sym := auxToSym(v.Aux)
 10607  		ptr := v_0
 10608  		if v_1.Op != OpARM64MOVBUreg {
 10609  			break
 10610  		}
 10611  		x := v_1.Args[0]
 10612  		mem := v_2
 10613  		v.reset(OpARM64MOVBstore)
 10614  		v.AuxInt = int32ToAuxInt(off)
 10615  		v.Aux = symToAux(sym)
 10616  		v.AddArg3(ptr, x, mem)
 10617  		return true
 10618  	}
 10619  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
 10620  	// result: (MOVBstore [off] {sym} ptr x mem)
 10621  	for {
 10622  		off := auxIntToInt32(v.AuxInt)
 10623  		sym := auxToSym(v.Aux)
 10624  		ptr := v_0
 10625  		if v_1.Op != OpARM64MOVHreg {
 10626  			break
 10627  		}
 10628  		x := v_1.Args[0]
 10629  		mem := v_2
 10630  		v.reset(OpARM64MOVBstore)
 10631  		v.AuxInt = int32ToAuxInt(off)
 10632  		v.Aux = symToAux(sym)
 10633  		v.AddArg3(ptr, x, mem)
 10634  		return true
 10635  	}
 10636  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
 10637  	// result: (MOVBstore [off] {sym} ptr x mem)
 10638  	for {
 10639  		off := auxIntToInt32(v.AuxInt)
 10640  		sym := auxToSym(v.Aux)
 10641  		ptr := v_0
 10642  		if v_1.Op != OpARM64MOVHUreg {
 10643  			break
 10644  		}
 10645  		x := v_1.Args[0]
 10646  		mem := v_2
 10647  		v.reset(OpARM64MOVBstore)
 10648  		v.AuxInt = int32ToAuxInt(off)
 10649  		v.Aux = symToAux(sym)
 10650  		v.AddArg3(ptr, x, mem)
 10651  		return true
 10652  	}
 10653  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
 10654  	// result: (MOVBstore [off] {sym} ptr x mem)
 10655  	for {
 10656  		off := auxIntToInt32(v.AuxInt)
 10657  		sym := auxToSym(v.Aux)
 10658  		ptr := v_0
 10659  		if v_1.Op != OpARM64MOVWreg {
 10660  			break
 10661  		}
 10662  		x := v_1.Args[0]
 10663  		mem := v_2
 10664  		v.reset(OpARM64MOVBstore)
 10665  		v.AuxInt = int32ToAuxInt(off)
 10666  		v.Aux = symToAux(sym)
 10667  		v.AddArg3(ptr, x, mem)
 10668  		return true
 10669  	}
 10670  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
 10671  	// result: (MOVBstore [off] {sym} ptr x mem)
 10672  	for {
 10673  		off := auxIntToInt32(v.AuxInt)
 10674  		sym := auxToSym(v.Aux)
 10675  		ptr := v_0
 10676  		if v_1.Op != OpARM64MOVWUreg {
 10677  			break
 10678  		}
 10679  		x := v_1.Args[0]
 10680  		mem := v_2
 10681  		v.reset(OpARM64MOVBstore)
 10682  		v.AuxInt = int32ToAuxInt(off)
 10683  		v.Aux = symToAux(sym)
 10684  		v.AddArg3(ptr, x, mem)
 10685  		return true
 10686  	}
 10687  	return false
 10688  }
 10689  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
 10690  	v_3 := v.Args[3]
 10691  	v_2 := v.Args[2]
 10692  	v_1 := v.Args[1]
 10693  	v_0 := v.Args[0]
 10694  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
 10695  	// cond: is32Bit(c)
 10696  	// result: (MOVBstore [int32(c)] ptr val mem)
 10697  	for {
 10698  		ptr := v_0
 10699  		if v_1.Op != OpARM64MOVDconst {
 10700  			break
 10701  		}
 10702  		c := auxIntToInt64(v_1.AuxInt)
 10703  		val := v_2
 10704  		mem := v_3
 10705  		if !(is32Bit(c)) {
 10706  			break
 10707  		}
 10708  		v.reset(OpARM64MOVBstore)
 10709  		v.AuxInt = int32ToAuxInt(int32(c))
 10710  		v.AddArg3(ptr, val, mem)
 10711  		return true
 10712  	}
 10713  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
 10714  	// cond: is32Bit(c)
 10715  	// result: (MOVBstore [int32(c)] idx val mem)
 10716  	for {
 10717  		if v_0.Op != OpARM64MOVDconst {
 10718  			break
 10719  		}
 10720  		c := auxIntToInt64(v_0.AuxInt)
 10721  		idx := v_1
 10722  		val := v_2
 10723  		mem := v_3
 10724  		if !(is32Bit(c)) {
 10725  			break
 10726  		}
 10727  		v.reset(OpARM64MOVBstore)
 10728  		v.AuxInt = int32ToAuxInt(int32(c))
 10729  		v.AddArg3(idx, val, mem)
 10730  		return true
 10731  	}
 10732  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
 10733  	// result: (MOVBstoreidx ptr idx x mem)
 10734  	for {
 10735  		ptr := v_0
 10736  		idx := v_1
 10737  		if v_2.Op != OpARM64MOVBreg {
 10738  			break
 10739  		}
 10740  		x := v_2.Args[0]
 10741  		mem := v_3
 10742  		v.reset(OpARM64MOVBstoreidx)
 10743  		v.AddArg4(ptr, idx, x, mem)
 10744  		return true
 10745  	}
 10746  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
 10747  	// result: (MOVBstoreidx ptr idx x mem)
 10748  	for {
 10749  		ptr := v_0
 10750  		idx := v_1
 10751  		if v_2.Op != OpARM64MOVBUreg {
 10752  			break
 10753  		}
 10754  		x := v_2.Args[0]
 10755  		mem := v_3
 10756  		v.reset(OpARM64MOVBstoreidx)
 10757  		v.AddArg4(ptr, idx, x, mem)
 10758  		return true
 10759  	}
 10760  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
 10761  	// result: (MOVBstoreidx ptr idx x mem)
 10762  	for {
 10763  		ptr := v_0
 10764  		idx := v_1
 10765  		if v_2.Op != OpARM64MOVHreg {
 10766  			break
 10767  		}
 10768  		x := v_2.Args[0]
 10769  		mem := v_3
 10770  		v.reset(OpARM64MOVBstoreidx)
 10771  		v.AddArg4(ptr, idx, x, mem)
 10772  		return true
 10773  	}
 10774  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
 10775  	// result: (MOVBstoreidx ptr idx x mem)
 10776  	for {
 10777  		ptr := v_0
 10778  		idx := v_1
 10779  		if v_2.Op != OpARM64MOVHUreg {
 10780  			break
 10781  		}
 10782  		x := v_2.Args[0]
 10783  		mem := v_3
 10784  		v.reset(OpARM64MOVBstoreidx)
 10785  		v.AddArg4(ptr, idx, x, mem)
 10786  		return true
 10787  	}
 10788  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
 10789  	// result: (MOVBstoreidx ptr idx x mem)
 10790  	for {
 10791  		ptr := v_0
 10792  		idx := v_1
 10793  		if v_2.Op != OpARM64MOVWreg {
 10794  			break
 10795  		}
 10796  		x := v_2.Args[0]
 10797  		mem := v_3
 10798  		v.reset(OpARM64MOVBstoreidx)
 10799  		v.AddArg4(ptr, idx, x, mem)
 10800  		return true
 10801  	}
 10802  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
 10803  	// result: (MOVBstoreidx ptr idx x mem)
 10804  	for {
 10805  		ptr := v_0
 10806  		idx := v_1
 10807  		if v_2.Op != OpARM64MOVWUreg {
 10808  			break
 10809  		}
 10810  		x := v_2.Args[0]
 10811  		mem := v_3
 10812  		v.reset(OpARM64MOVBstoreidx)
 10813  		v.AddArg4(ptr, idx, x, mem)
 10814  		return true
 10815  	}
 10816  	return false
 10817  }
 10818  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
 10819  	v_1 := v.Args[1]
 10820  	v_0 := v.Args[0]
 10821  	b := v.Block
 10822  	config := b.Func.Config
 10823  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
 10824  	// result: (FMOVDfpgp val)
 10825  	for {
 10826  		off := auxIntToInt32(v.AuxInt)
 10827  		sym := auxToSym(v.Aux)
 10828  		ptr := v_0
 10829  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10830  			break
 10831  		}
 10832  		val := v_1.Args[1]
 10833  		if ptr != v_1.Args[0] {
 10834  			break
 10835  		}
 10836  		v.reset(OpARM64FMOVDfpgp)
 10837  		v.AddArg(val)
 10838  		return true
 10839  	}
 10840  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
 10841  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10842  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
 10843  	for {
 10844  		off1 := auxIntToInt32(v.AuxInt)
 10845  		sym := auxToSym(v.Aux)
 10846  		if v_0.Op != OpARM64ADDconst {
 10847  			break
 10848  		}
 10849  		off2 := auxIntToInt64(v_0.AuxInt)
 10850  		ptr := v_0.Args[0]
 10851  		mem := v_1
 10852  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10853  			break
 10854  		}
 10855  		v.reset(OpARM64MOVDload)
 10856  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10857  		v.Aux = symToAux(sym)
 10858  		v.AddArg2(ptr, mem)
 10859  		return true
 10860  	}
 10861  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
 10862  	// cond: off == 0 && sym == nil
 10863  	// result: (MOVDloadidx ptr idx mem)
 10864  	for {
 10865  		off := auxIntToInt32(v.AuxInt)
 10866  		sym := auxToSym(v.Aux)
 10867  		if v_0.Op != OpARM64ADD {
 10868  			break
 10869  		}
 10870  		idx := v_0.Args[1]
 10871  		ptr := v_0.Args[0]
 10872  		mem := v_1
 10873  		if !(off == 0 && sym == nil) {
 10874  			break
 10875  		}
 10876  		v.reset(OpARM64MOVDloadidx)
 10877  		v.AddArg3(ptr, idx, mem)
 10878  		return true
 10879  	}
 10880  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
 10881  	// cond: off == 0 && sym == nil
 10882  	// result: (MOVDloadidx8 ptr idx mem)
 10883  	for {
 10884  		off := auxIntToInt32(v.AuxInt)
 10885  		sym := auxToSym(v.Aux)
 10886  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
 10887  			break
 10888  		}
 10889  		idx := v_0.Args[1]
 10890  		ptr := v_0.Args[0]
 10891  		mem := v_1
 10892  		if !(off == 0 && sym == nil) {
 10893  			break
 10894  		}
 10895  		v.reset(OpARM64MOVDloadidx8)
 10896  		v.AddArg3(ptr, idx, mem)
 10897  		return true
 10898  	}
 10899  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10900  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10901  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10902  	for {
 10903  		off1 := auxIntToInt32(v.AuxInt)
 10904  		sym1 := auxToSym(v.Aux)
 10905  		if v_0.Op != OpARM64MOVDaddr {
 10906  			break
 10907  		}
 10908  		off2 := auxIntToInt32(v_0.AuxInt)
 10909  		sym2 := auxToSym(v_0.Aux)
 10910  		ptr := v_0.Args[0]
 10911  		mem := v_1
 10912  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10913  			break
 10914  		}
 10915  		v.reset(OpARM64MOVDload)
 10916  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10917  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10918  		v.AddArg2(ptr, mem)
 10919  		return true
 10920  	}
 10921  	// match: (MOVDload [off] {sym} (SB) _)
 10922  	// cond: symIsRO(sym)
 10923  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10924  	for {
 10925  		off := auxIntToInt32(v.AuxInt)
 10926  		sym := auxToSym(v.Aux)
 10927  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10928  			break
 10929  		}
 10930  		v.reset(OpARM64MOVDconst)
 10931  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10932  		return true
 10933  	}
 10934  	return false
 10935  }
 10936  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
 10937  	v_2 := v.Args[2]
 10938  	v_1 := v.Args[1]
 10939  	v_0 := v.Args[0]
 10940  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
 10941  	// cond: is32Bit(c)
 10942  	// result: (MOVDload [int32(c)] ptr mem)
 10943  	for {
 10944  		ptr := v_0
 10945  		if v_1.Op != OpARM64MOVDconst {
 10946  			break
 10947  		}
 10948  		c := auxIntToInt64(v_1.AuxInt)
 10949  		mem := v_2
 10950  		if !(is32Bit(c)) {
 10951  			break
 10952  		}
 10953  		v.reset(OpARM64MOVDload)
 10954  		v.AuxInt = int32ToAuxInt(int32(c))
 10955  		v.AddArg2(ptr, mem)
 10956  		return true
 10957  	}
 10958  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
 10959  	// cond: is32Bit(c)
 10960  	// result: (MOVDload [int32(c)] ptr mem)
 10961  	for {
 10962  		if v_0.Op != OpARM64MOVDconst {
 10963  			break
 10964  		}
 10965  		c := auxIntToInt64(v_0.AuxInt)
 10966  		ptr := v_1
 10967  		mem := v_2
 10968  		if !(is32Bit(c)) {
 10969  			break
 10970  		}
 10971  		v.reset(OpARM64MOVDload)
 10972  		v.AuxInt = int32ToAuxInt(int32(c))
 10973  		v.AddArg2(ptr, mem)
 10974  		return true
 10975  	}
 10976  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
 10977  	// result: (MOVDloadidx8 ptr idx mem)
 10978  	for {
 10979  		ptr := v_0
 10980  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 10981  			break
 10982  		}
 10983  		idx := v_1.Args[0]
 10984  		mem := v_2
 10985  		v.reset(OpARM64MOVDloadidx8)
 10986  		v.AddArg3(ptr, idx, mem)
 10987  		return true
 10988  	}
 10989  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
 10990  	// result: (MOVDloadidx8 ptr idx mem)
 10991  	for {
 10992  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 10993  			break
 10994  		}
 10995  		idx := v_0.Args[0]
 10996  		ptr := v_1
 10997  		mem := v_2
 10998  		v.reset(OpARM64MOVDloadidx8)
 10999  		v.AddArg3(ptr, idx, mem)
 11000  		return true
 11001  	}
 11002  	return false
 11003  }
 11004  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
 11005  	v_2 := v.Args[2]
 11006  	v_1 := v.Args[1]
 11007  	v_0 := v.Args[0]
 11008  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
 11009  	// cond: is32Bit(c<<3)
 11010  	// result: (MOVDload [int32(c)<<3] ptr mem)
 11011  	for {
 11012  		ptr := v_0
 11013  		if v_1.Op != OpARM64MOVDconst {
 11014  			break
 11015  		}
 11016  		c := auxIntToInt64(v_1.AuxInt)
 11017  		mem := v_2
 11018  		if !(is32Bit(c << 3)) {
 11019  			break
 11020  		}
 11021  		v.reset(OpARM64MOVDload)
 11022  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
 11023  		v.AddArg2(ptr, mem)
 11024  		return true
 11025  	}
 11026  	return false
 11027  }
 11028  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
 11029  	v_0 := v.Args[0]
 11030  	// match: (MOVDnop (MOVDconst [c]))
 11031  	// result: (MOVDconst [c])
 11032  	for {
 11033  		if v_0.Op != OpARM64MOVDconst {
 11034  			break
 11035  		}
 11036  		c := auxIntToInt64(v_0.AuxInt)
 11037  		v.reset(OpARM64MOVDconst)
 11038  		v.AuxInt = int64ToAuxInt(c)
 11039  		return true
 11040  	}
 11041  	return false
 11042  }
 11043  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
 11044  	v_0 := v.Args[0]
 11045  	// match: (MOVDreg x)
 11046  	// cond: x.Uses == 1
 11047  	// result: (MOVDnop x)
 11048  	for {
 11049  		x := v_0
 11050  		if !(x.Uses == 1) {
 11051  			break
 11052  		}
 11053  		v.reset(OpARM64MOVDnop)
 11054  		v.AddArg(x)
 11055  		return true
 11056  	}
 11057  	// match: (MOVDreg (MOVDconst [c]))
 11058  	// result: (MOVDconst [c])
 11059  	for {
 11060  		if v_0.Op != OpARM64MOVDconst {
 11061  			break
 11062  		}
 11063  		c := auxIntToInt64(v_0.AuxInt)
 11064  		v.reset(OpARM64MOVDconst)
 11065  		v.AuxInt = int64ToAuxInt(c)
 11066  		return true
 11067  	}
 11068  	return false
 11069  }
 11070  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
 11071  	v_2 := v.Args[2]
 11072  	v_1 := v.Args[1]
 11073  	v_0 := v.Args[0]
 11074  	b := v.Block
 11075  	config := b.Func.Config
 11076  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
 11077  	// result: (FMOVDstore [off] {sym} ptr val mem)
 11078  	for {
 11079  		off := auxIntToInt32(v.AuxInt)
 11080  		sym := auxToSym(v.Aux)
 11081  		ptr := v_0
 11082  		if v_1.Op != OpARM64FMOVDfpgp {
 11083  			break
 11084  		}
 11085  		val := v_1.Args[0]
 11086  		mem := v_2
 11087  		v.reset(OpARM64FMOVDstore)
 11088  		v.AuxInt = int32ToAuxInt(off)
 11089  		v.Aux = symToAux(sym)
 11090  		v.AddArg3(ptr, val, mem)
 11091  		return true
 11092  	}
 11093  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11094  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11095  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
 11096  	for {
 11097  		off1 := auxIntToInt32(v.AuxInt)
 11098  		sym := auxToSym(v.Aux)
 11099  		if v_0.Op != OpARM64ADDconst {
 11100  			break
 11101  		}
 11102  		off2 := auxIntToInt64(v_0.AuxInt)
 11103  		ptr := v_0.Args[0]
 11104  		val := v_1
 11105  		mem := v_2
 11106  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11107  			break
 11108  		}
 11109  		v.reset(OpARM64MOVDstore)
 11110  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11111  		v.Aux = symToAux(sym)
 11112  		v.AddArg3(ptr, val, mem)
 11113  		return true
 11114  	}
 11115  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
 11116  	// cond: off == 0 && sym == nil
 11117  	// result: (MOVDstoreidx ptr idx val mem)
 11118  	for {
 11119  		off := auxIntToInt32(v.AuxInt)
 11120  		sym := auxToSym(v.Aux)
 11121  		if v_0.Op != OpARM64ADD {
 11122  			break
 11123  		}
 11124  		idx := v_0.Args[1]
 11125  		ptr := v_0.Args[0]
 11126  		val := v_1
 11127  		mem := v_2
 11128  		if !(off == 0 && sym == nil) {
 11129  			break
 11130  		}
 11131  		v.reset(OpARM64MOVDstoreidx)
 11132  		v.AddArg4(ptr, idx, val, mem)
 11133  		return true
 11134  	}
 11135  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
 11136  	// cond: off == 0 && sym == nil
 11137  	// result: (MOVDstoreidx8 ptr idx val mem)
 11138  	for {
 11139  		off := auxIntToInt32(v.AuxInt)
 11140  		sym := auxToSym(v.Aux)
 11141  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
 11142  			break
 11143  		}
 11144  		idx := v_0.Args[1]
 11145  		ptr := v_0.Args[0]
 11146  		val := v_1
 11147  		mem := v_2
 11148  		if !(off == 0 && sym == nil) {
 11149  			break
 11150  		}
 11151  		v.reset(OpARM64MOVDstoreidx8)
 11152  		v.AddArg4(ptr, idx, val, mem)
 11153  		return true
 11154  	}
 11155  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11156  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11157  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11158  	for {
 11159  		off1 := auxIntToInt32(v.AuxInt)
 11160  		sym1 := auxToSym(v.Aux)
 11161  		if v_0.Op != OpARM64MOVDaddr {
 11162  			break
 11163  		}
 11164  		off2 := auxIntToInt32(v_0.AuxInt)
 11165  		sym2 := auxToSym(v_0.Aux)
 11166  		ptr := v_0.Args[0]
 11167  		val := v_1
 11168  		mem := v_2
 11169  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11170  			break
 11171  		}
 11172  		v.reset(OpARM64MOVDstore)
 11173  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11174  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11175  		v.AddArg3(ptr, val, mem)
 11176  		return true
 11177  	}
 11178  	return false
 11179  }
 11180  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
 11181  	v_3 := v.Args[3]
 11182  	v_2 := v.Args[2]
 11183  	v_1 := v.Args[1]
 11184  	v_0 := v.Args[0]
 11185  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
 11186  	// cond: is32Bit(c)
 11187  	// result: (MOVDstore [int32(c)] ptr val mem)
 11188  	for {
 11189  		ptr := v_0
 11190  		if v_1.Op != OpARM64MOVDconst {
 11191  			break
 11192  		}
 11193  		c := auxIntToInt64(v_1.AuxInt)
 11194  		val := v_2
 11195  		mem := v_3
 11196  		if !(is32Bit(c)) {
 11197  			break
 11198  		}
 11199  		v.reset(OpARM64MOVDstore)
 11200  		v.AuxInt = int32ToAuxInt(int32(c))
 11201  		v.AddArg3(ptr, val, mem)
 11202  		return true
 11203  	}
 11204  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
 11205  	// cond: is32Bit(c)
 11206  	// result: (MOVDstore [int32(c)] idx val mem)
 11207  	for {
 11208  		if v_0.Op != OpARM64MOVDconst {
 11209  			break
 11210  		}
 11211  		c := auxIntToInt64(v_0.AuxInt)
 11212  		idx := v_1
 11213  		val := v_2
 11214  		mem := v_3
 11215  		if !(is32Bit(c)) {
 11216  			break
 11217  		}
 11218  		v.reset(OpARM64MOVDstore)
 11219  		v.AuxInt = int32ToAuxInt(int32(c))
 11220  		v.AddArg3(idx, val, mem)
 11221  		return true
 11222  	}
 11223  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
 11224  	// result: (MOVDstoreidx8 ptr idx val mem)
 11225  	for {
 11226  		ptr := v_0
 11227  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 11228  			break
 11229  		}
 11230  		idx := v_1.Args[0]
 11231  		val := v_2
 11232  		mem := v_3
 11233  		v.reset(OpARM64MOVDstoreidx8)
 11234  		v.AddArg4(ptr, idx, val, mem)
 11235  		return true
 11236  	}
 11237  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
 11238  	// result: (MOVDstoreidx8 ptr idx val mem)
 11239  	for {
 11240  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 11241  			break
 11242  		}
 11243  		idx := v_0.Args[0]
 11244  		ptr := v_1
 11245  		val := v_2
 11246  		mem := v_3
 11247  		v.reset(OpARM64MOVDstoreidx8)
 11248  		v.AddArg4(ptr, idx, val, mem)
 11249  		return true
 11250  	}
 11251  	return false
 11252  }
 11253  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
 11254  	v_3 := v.Args[3]
 11255  	v_2 := v.Args[2]
 11256  	v_1 := v.Args[1]
 11257  	v_0 := v.Args[0]
 11258  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
 11259  	// cond: is32Bit(c<<3)
 11260  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
 11261  	for {
 11262  		ptr := v_0
 11263  		if v_1.Op != OpARM64MOVDconst {
 11264  			break
 11265  		}
 11266  		c := auxIntToInt64(v_1.AuxInt)
 11267  		val := v_2
 11268  		mem := v_3
 11269  		if !(is32Bit(c << 3)) {
 11270  			break
 11271  		}
 11272  		v.reset(OpARM64MOVDstore)
 11273  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
 11274  		v.AddArg3(ptr, val, mem)
 11275  		return true
 11276  	}
 11277  	return false
 11278  }
 11279  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
 11280  	v_1 := v.Args[1]
 11281  	v_0 := v.Args[0]
 11282  	b := v.Block
 11283  	config := b.Func.Config
 11284  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
 11285  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11286  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
 11287  	for {
 11288  		off1 := auxIntToInt32(v.AuxInt)
 11289  		sym := auxToSym(v.Aux)
 11290  		if v_0.Op != OpARM64ADDconst {
 11291  			break
 11292  		}
 11293  		off2 := auxIntToInt64(v_0.AuxInt)
 11294  		ptr := v_0.Args[0]
 11295  		mem := v_1
 11296  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11297  			break
 11298  		}
 11299  		v.reset(OpARM64MOVHUload)
 11300  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11301  		v.Aux = symToAux(sym)
 11302  		v.AddArg2(ptr, mem)
 11303  		return true
 11304  	}
 11305  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
 11306  	// cond: off == 0 && sym == nil
 11307  	// result: (MOVHUloadidx ptr idx mem)
 11308  	for {
 11309  		off := auxIntToInt32(v.AuxInt)
 11310  		sym := auxToSym(v.Aux)
 11311  		if v_0.Op != OpARM64ADD {
 11312  			break
 11313  		}
 11314  		idx := v_0.Args[1]
 11315  		ptr := v_0.Args[0]
 11316  		mem := v_1
 11317  		if !(off == 0 && sym == nil) {
 11318  			break
 11319  		}
 11320  		v.reset(OpARM64MOVHUloadidx)
 11321  		v.AddArg3(ptr, idx, mem)
 11322  		return true
 11323  	}
 11324  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 11325  	// cond: off == 0 && sym == nil
 11326  	// result: (MOVHUloadidx2 ptr idx mem)
 11327  	for {
 11328  		off := auxIntToInt32(v.AuxInt)
 11329  		sym := auxToSym(v.Aux)
 11330  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11331  			break
 11332  		}
 11333  		idx := v_0.Args[1]
 11334  		ptr := v_0.Args[0]
 11335  		mem := v_1
 11336  		if !(off == 0 && sym == nil) {
 11337  			break
 11338  		}
 11339  		v.reset(OpARM64MOVHUloadidx2)
 11340  		v.AddArg3(ptr, idx, mem)
 11341  		return true
 11342  	}
 11343  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11344  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11345  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11346  	for {
 11347  		off1 := auxIntToInt32(v.AuxInt)
 11348  		sym1 := auxToSym(v.Aux)
 11349  		if v_0.Op != OpARM64MOVDaddr {
 11350  			break
 11351  		}
 11352  		off2 := auxIntToInt32(v_0.AuxInt)
 11353  		sym2 := auxToSym(v_0.Aux)
 11354  		ptr := v_0.Args[0]
 11355  		mem := v_1
 11356  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11357  			break
 11358  		}
 11359  		v.reset(OpARM64MOVHUload)
 11360  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11361  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11362  		v.AddArg2(ptr, mem)
 11363  		return true
 11364  	}
 11365  	// match: (MOVHUload [off] {sym} (SB) _)
 11366  	// cond: symIsRO(sym)
 11367  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 11368  	for {
 11369  		off := auxIntToInt32(v.AuxInt)
 11370  		sym := auxToSym(v.Aux)
 11371  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11372  			break
 11373  		}
 11374  		v.reset(OpARM64MOVDconst)
 11375  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 11376  		return true
 11377  	}
 11378  	return false
 11379  }
 11380  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
 11381  	v_2 := v.Args[2]
 11382  	v_1 := v.Args[1]
 11383  	v_0 := v.Args[0]
 11384  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
 11385  	// cond: is32Bit(c)
 11386  	// result: (MOVHUload [int32(c)] ptr mem)
 11387  	for {
 11388  		ptr := v_0
 11389  		if v_1.Op != OpARM64MOVDconst {
 11390  			break
 11391  		}
 11392  		c := auxIntToInt64(v_1.AuxInt)
 11393  		mem := v_2
 11394  		if !(is32Bit(c)) {
 11395  			break
 11396  		}
 11397  		v.reset(OpARM64MOVHUload)
 11398  		v.AuxInt = int32ToAuxInt(int32(c))
 11399  		v.AddArg2(ptr, mem)
 11400  		return true
 11401  	}
 11402  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
 11403  	// cond: is32Bit(c)
 11404  	// result: (MOVHUload [int32(c)] ptr mem)
 11405  	for {
 11406  		if v_0.Op != OpARM64MOVDconst {
 11407  			break
 11408  		}
 11409  		c := auxIntToInt64(v_0.AuxInt)
 11410  		ptr := v_1
 11411  		mem := v_2
 11412  		if !(is32Bit(c)) {
 11413  			break
 11414  		}
 11415  		v.reset(OpARM64MOVHUload)
 11416  		v.AuxInt = int32ToAuxInt(int32(c))
 11417  		v.AddArg2(ptr, mem)
 11418  		return true
 11419  	}
 11420  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
 11421  	// result: (MOVHUloadidx2 ptr idx mem)
 11422  	for {
 11423  		ptr := v_0
 11424  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11425  			break
 11426  		}
 11427  		idx := v_1.Args[0]
 11428  		mem := v_2
 11429  		v.reset(OpARM64MOVHUloadidx2)
 11430  		v.AddArg3(ptr, idx, mem)
 11431  		return true
 11432  	}
 11433  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
 11434  	// result: (MOVHUloadidx2 ptr idx mem)
 11435  	for {
 11436  		ptr := v_0
 11437  		if v_1.Op != OpARM64ADD {
 11438  			break
 11439  		}
 11440  		idx := v_1.Args[1]
 11441  		if idx != v_1.Args[0] {
 11442  			break
 11443  		}
 11444  		mem := v_2
 11445  		v.reset(OpARM64MOVHUloadidx2)
 11446  		v.AddArg3(ptr, idx, mem)
 11447  		return true
 11448  	}
 11449  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
 11450  	// result: (MOVHUloadidx2 ptr idx mem)
 11451  	for {
 11452  		if v_0.Op != OpARM64ADD {
 11453  			break
 11454  		}
 11455  		idx := v_0.Args[1]
 11456  		if idx != v_0.Args[0] {
 11457  			break
 11458  		}
 11459  		ptr := v_1
 11460  		mem := v_2
 11461  		v.reset(OpARM64MOVHUloadidx2)
 11462  		v.AddArg3(ptr, idx, mem)
 11463  		return true
 11464  	}
 11465  	return false
 11466  }
 11467  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
 11468  	v_2 := v.Args[2]
 11469  	v_1 := v.Args[1]
 11470  	v_0 := v.Args[0]
 11471  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
 11472  	// cond: is32Bit(c<<1)
 11473  	// result: (MOVHUload [int32(c)<<1] ptr mem)
 11474  	for {
 11475  		ptr := v_0
 11476  		if v_1.Op != OpARM64MOVDconst {
 11477  			break
 11478  		}
 11479  		c := auxIntToInt64(v_1.AuxInt)
 11480  		mem := v_2
 11481  		if !(is32Bit(c << 1)) {
 11482  			break
 11483  		}
 11484  		v.reset(OpARM64MOVHUload)
 11485  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11486  		v.AddArg2(ptr, mem)
 11487  		return true
 11488  	}
 11489  	return false
 11490  }
 11491  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
 11492  	v_0 := v.Args[0]
 11493  	// match: (MOVHUreg (ANDconst [c] x))
 11494  	// result: (ANDconst [c&(1<<16-1)] x)
 11495  	for {
 11496  		if v_0.Op != OpARM64ANDconst {
 11497  			break
 11498  		}
 11499  		c := auxIntToInt64(v_0.AuxInt)
 11500  		x := v_0.Args[0]
 11501  		v.reset(OpARM64ANDconst)
 11502  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
 11503  		v.AddArg(x)
 11504  		return true
 11505  	}
 11506  	// match: (MOVHUreg (MOVDconst [c]))
 11507  	// result: (MOVDconst [int64(uint16(c))])
 11508  	for {
 11509  		if v_0.Op != OpARM64MOVDconst {
 11510  			break
 11511  		}
 11512  		c := auxIntToInt64(v_0.AuxInt)
 11513  		v.reset(OpARM64MOVDconst)
 11514  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
 11515  		return true
 11516  	}
 11517  	// match: (MOVHUreg x)
 11518  	// cond: v.Type.Size() <= 2
 11519  	// result: x
 11520  	for {
 11521  		x := v_0
 11522  		if !(v.Type.Size() <= 2) {
 11523  			break
 11524  		}
 11525  		v.copyOf(x)
 11526  		return true
 11527  	}
 11528  	// match: (MOVHUreg (SLLconst [lc] x))
 11529  	// cond: lc >= 16
 11530  	// result: (MOVDconst [0])
 11531  	for {
 11532  		if v_0.Op != OpARM64SLLconst {
 11533  			break
 11534  		}
 11535  		lc := auxIntToInt64(v_0.AuxInt)
 11536  		if !(lc >= 16) {
 11537  			break
 11538  		}
 11539  		v.reset(OpARM64MOVDconst)
 11540  		v.AuxInt = int64ToAuxInt(0)
 11541  		return true
 11542  	}
 11543  	// match: (MOVHUreg (SLLconst [lc] x))
 11544  	// cond: lc < 16
 11545  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
 11546  	for {
 11547  		if v_0.Op != OpARM64SLLconst {
 11548  			break
 11549  		}
 11550  		lc := auxIntToInt64(v_0.AuxInt)
 11551  		x := v_0.Args[0]
 11552  		if !(lc < 16) {
 11553  			break
 11554  		}
 11555  		v.reset(OpARM64UBFIZ)
 11556  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 11557  		v.AddArg(x)
 11558  		return true
 11559  	}
 11560  	// match: (MOVHUreg (SRLconst [rc] x))
 11561  	// cond: rc < 16
 11562  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
 11563  	for {
 11564  		if v_0.Op != OpARM64SRLconst {
 11565  			break
 11566  		}
 11567  		rc := auxIntToInt64(v_0.AuxInt)
 11568  		x := v_0.Args[0]
 11569  		if !(rc < 16) {
 11570  			break
 11571  		}
 11572  		v.reset(OpARM64UBFX)
 11573  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
 11574  		v.AddArg(x)
 11575  		return true
 11576  	}
 11577  	// match: (MOVHUreg (UBFX [bfc] x))
 11578  	// cond: bfc.width() <= 16
 11579  	// result: (UBFX [bfc] x)
 11580  	for {
 11581  		if v_0.Op != OpARM64UBFX {
 11582  			break
 11583  		}
 11584  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11585  		x := v_0.Args[0]
 11586  		if !(bfc.width() <= 16) {
 11587  			break
 11588  		}
 11589  		v.reset(OpARM64UBFX)
 11590  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11591  		v.AddArg(x)
 11592  		return true
 11593  	}
 11594  	return false
 11595  }
 11596  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
 11597  	v_1 := v.Args[1]
 11598  	v_0 := v.Args[0]
 11599  	b := v.Block
 11600  	config := b.Func.Config
 11601  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
 11602  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11603  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
 11604  	for {
 11605  		off1 := auxIntToInt32(v.AuxInt)
 11606  		sym := auxToSym(v.Aux)
 11607  		if v_0.Op != OpARM64ADDconst {
 11608  			break
 11609  		}
 11610  		off2 := auxIntToInt64(v_0.AuxInt)
 11611  		ptr := v_0.Args[0]
 11612  		mem := v_1
 11613  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11614  			break
 11615  		}
 11616  		v.reset(OpARM64MOVHload)
 11617  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11618  		v.Aux = symToAux(sym)
 11619  		v.AddArg2(ptr, mem)
 11620  		return true
 11621  	}
 11622  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
 11623  	// cond: off == 0 && sym == nil
 11624  	// result: (MOVHloadidx ptr idx mem)
 11625  	for {
 11626  		off := auxIntToInt32(v.AuxInt)
 11627  		sym := auxToSym(v.Aux)
 11628  		if v_0.Op != OpARM64ADD {
 11629  			break
 11630  		}
 11631  		idx := v_0.Args[1]
 11632  		ptr := v_0.Args[0]
 11633  		mem := v_1
 11634  		if !(off == 0 && sym == nil) {
 11635  			break
 11636  		}
 11637  		v.reset(OpARM64MOVHloadidx)
 11638  		v.AddArg3(ptr, idx, mem)
 11639  		return true
 11640  	}
 11641  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 11642  	// cond: off == 0 && sym == nil
 11643  	// result: (MOVHloadidx2 ptr idx mem)
 11644  	for {
 11645  		off := auxIntToInt32(v.AuxInt)
 11646  		sym := auxToSym(v.Aux)
 11647  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11648  			break
 11649  		}
 11650  		idx := v_0.Args[1]
 11651  		ptr := v_0.Args[0]
 11652  		mem := v_1
 11653  		if !(off == 0 && sym == nil) {
 11654  			break
 11655  		}
 11656  		v.reset(OpARM64MOVHloadidx2)
 11657  		v.AddArg3(ptr, idx, mem)
 11658  		return true
 11659  	}
 11660  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11661  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11662  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11663  	for {
 11664  		off1 := auxIntToInt32(v.AuxInt)
 11665  		sym1 := auxToSym(v.Aux)
 11666  		if v_0.Op != OpARM64MOVDaddr {
 11667  			break
 11668  		}
 11669  		off2 := auxIntToInt32(v_0.AuxInt)
 11670  		sym2 := auxToSym(v_0.Aux)
 11671  		ptr := v_0.Args[0]
 11672  		mem := v_1
 11673  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11674  			break
 11675  		}
 11676  		v.reset(OpARM64MOVHload)
 11677  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11678  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11679  		v.AddArg2(ptr, mem)
 11680  		return true
 11681  	}
 11682  	// match: (MOVHload [off] {sym} (SB) _)
 11683  	// cond: symIsRO(sym)
 11684  	// result: (MOVDconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 11685  	for {
 11686  		off := auxIntToInt32(v.AuxInt)
 11687  		sym := auxToSym(v.Aux)
 11688  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11689  			break
 11690  		}
 11691  		v.reset(OpARM64MOVDconst)
 11692  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 11693  		return true
 11694  	}
 11695  	return false
 11696  }
 11697  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
 11698  	v_2 := v.Args[2]
 11699  	v_1 := v.Args[1]
 11700  	v_0 := v.Args[0]
 11701  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 11702  	// cond: is32Bit(c)
 11703  	// result: (MOVHload [int32(c)] ptr mem)
 11704  	for {
 11705  		ptr := v_0
 11706  		if v_1.Op != OpARM64MOVDconst {
 11707  			break
 11708  		}
 11709  		c := auxIntToInt64(v_1.AuxInt)
 11710  		mem := v_2
 11711  		if !(is32Bit(c)) {
 11712  			break
 11713  		}
 11714  		v.reset(OpARM64MOVHload)
 11715  		v.AuxInt = int32ToAuxInt(int32(c))
 11716  		v.AddArg2(ptr, mem)
 11717  		return true
 11718  	}
 11719  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 11720  	// cond: is32Bit(c)
 11721  	// result: (MOVHload [int32(c)] ptr mem)
 11722  	for {
 11723  		if v_0.Op != OpARM64MOVDconst {
 11724  			break
 11725  		}
 11726  		c := auxIntToInt64(v_0.AuxInt)
 11727  		ptr := v_1
 11728  		mem := v_2
 11729  		if !(is32Bit(c)) {
 11730  			break
 11731  		}
 11732  		v.reset(OpARM64MOVHload)
 11733  		v.AuxInt = int32ToAuxInt(int32(c))
 11734  		v.AddArg2(ptr, mem)
 11735  		return true
 11736  	}
 11737  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 11738  	// result: (MOVHloadidx2 ptr idx mem)
 11739  	for {
 11740  		ptr := v_0
 11741  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11742  			break
 11743  		}
 11744  		idx := v_1.Args[0]
 11745  		mem := v_2
 11746  		v.reset(OpARM64MOVHloadidx2)
 11747  		v.AddArg3(ptr, idx, mem)
 11748  		return true
 11749  	}
 11750  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 11751  	// result: (MOVHloadidx2 ptr idx mem)
 11752  	for {
 11753  		ptr := v_0
 11754  		if v_1.Op != OpARM64ADD {
 11755  			break
 11756  		}
 11757  		idx := v_1.Args[1]
 11758  		if idx != v_1.Args[0] {
 11759  			break
 11760  		}
 11761  		mem := v_2
 11762  		v.reset(OpARM64MOVHloadidx2)
 11763  		v.AddArg3(ptr, idx, mem)
 11764  		return true
 11765  	}
 11766  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 11767  	// result: (MOVHloadidx2 ptr idx mem)
 11768  	for {
 11769  		if v_0.Op != OpARM64ADD {
 11770  			break
 11771  		}
 11772  		idx := v_0.Args[1]
 11773  		if idx != v_0.Args[0] {
 11774  			break
 11775  		}
 11776  		ptr := v_1
 11777  		mem := v_2
 11778  		v.reset(OpARM64MOVHloadidx2)
 11779  		v.AddArg3(ptr, idx, mem)
 11780  		return true
 11781  	}
 11782  	return false
 11783  }
 11784  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 11785  	v_2 := v.Args[2]
 11786  	v_1 := v.Args[1]
 11787  	v_0 := v.Args[0]
 11788  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 11789  	// cond: is32Bit(c<<1)
 11790  	// result: (MOVHload [int32(c)<<1] ptr mem)
 11791  	for {
 11792  		ptr := v_0
 11793  		if v_1.Op != OpARM64MOVDconst {
 11794  			break
 11795  		}
 11796  		c := auxIntToInt64(v_1.AuxInt)
 11797  		mem := v_2
 11798  		if !(is32Bit(c << 1)) {
 11799  			break
 11800  		}
 11801  		v.reset(OpARM64MOVHload)
 11802  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11803  		v.AddArg2(ptr, mem)
 11804  		return true
 11805  	}
 11806  	return false
 11807  }
 11808  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 11809  	v_0 := v.Args[0]
 11810  	// match: (MOVHreg (MOVDconst [c]))
 11811  	// result: (MOVDconst [int64(int16(c))])
 11812  	for {
 11813  		if v_0.Op != OpARM64MOVDconst {
 11814  			break
 11815  		}
 11816  		c := auxIntToInt64(v_0.AuxInt)
 11817  		v.reset(OpARM64MOVDconst)
 11818  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 11819  		return true
 11820  	}
 11821  	// match: (MOVHreg x)
 11822  	// cond: v.Type.Size() <= 2
 11823  	// result: x
 11824  	for {
 11825  		x := v_0
 11826  		if !(v.Type.Size() <= 2) {
 11827  			break
 11828  		}
 11829  		v.copyOf(x)
 11830  		return true
 11831  	}
 11832  	// match: (MOVHreg <t> (ANDconst x [c]))
 11833  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 11834  	// result: (ANDconst <t> x [c])
 11835  	for {
 11836  		t := v.Type
 11837  		if v_0.Op != OpARM64ANDconst {
 11838  			break
 11839  		}
 11840  		c := auxIntToInt64(v_0.AuxInt)
 11841  		x := v_0.Args[0]
 11842  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 11843  			break
 11844  		}
 11845  		v.reset(OpARM64ANDconst)
 11846  		v.Type = t
 11847  		v.AuxInt = int64ToAuxInt(c)
 11848  		v.AddArg(x)
 11849  		return true
 11850  	}
 11851  	// match: (MOVHreg (SLLconst [lc] x))
 11852  	// cond: lc < 16
 11853  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 11854  	for {
 11855  		if v_0.Op != OpARM64SLLconst {
 11856  			break
 11857  		}
 11858  		lc := auxIntToInt64(v_0.AuxInt)
 11859  		x := v_0.Args[0]
 11860  		if !(lc < 16) {
 11861  			break
 11862  		}
 11863  		v.reset(OpARM64SBFIZ)
 11864  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 11865  		v.AddArg(x)
 11866  		return true
 11867  	}
 11868  	// match: (MOVHreg (SBFX [bfc] x))
 11869  	// cond: bfc.width() <= 16
 11870  	// result: (SBFX [bfc] x)
 11871  	for {
 11872  		if v_0.Op != OpARM64SBFX {
 11873  			break
 11874  		}
 11875  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11876  		x := v_0.Args[0]
 11877  		if !(bfc.width() <= 16) {
 11878  			break
 11879  		}
 11880  		v.reset(OpARM64SBFX)
 11881  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11882  		v.AddArg(x)
 11883  		return true
 11884  	}
 11885  	return false
 11886  }
 11887  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 11888  	v_2 := v.Args[2]
 11889  	v_1 := v.Args[1]
 11890  	v_0 := v.Args[0]
 11891  	b := v.Block
 11892  	config := b.Func.Config
 11893  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11894  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11895  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 11896  	for {
 11897  		off1 := auxIntToInt32(v.AuxInt)
 11898  		sym := auxToSym(v.Aux)
 11899  		if v_0.Op != OpARM64ADDconst {
 11900  			break
 11901  		}
 11902  		off2 := auxIntToInt64(v_0.AuxInt)
 11903  		ptr := v_0.Args[0]
 11904  		val := v_1
 11905  		mem := v_2
 11906  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11907  			break
 11908  		}
 11909  		v.reset(OpARM64MOVHstore)
 11910  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11911  		v.Aux = symToAux(sym)
 11912  		v.AddArg3(ptr, val, mem)
 11913  		return true
 11914  	}
 11915  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 11916  	// cond: off == 0 && sym == nil
 11917  	// result: (MOVHstoreidx ptr idx val mem)
 11918  	for {
 11919  		off := auxIntToInt32(v.AuxInt)
 11920  		sym := auxToSym(v.Aux)
 11921  		if v_0.Op != OpARM64ADD {
 11922  			break
 11923  		}
 11924  		idx := v_0.Args[1]
 11925  		ptr := v_0.Args[0]
 11926  		val := v_1
 11927  		mem := v_2
 11928  		if !(off == 0 && sym == nil) {
 11929  			break
 11930  		}
 11931  		v.reset(OpARM64MOVHstoreidx)
 11932  		v.AddArg4(ptr, idx, val, mem)
 11933  		return true
 11934  	}
 11935  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 11936  	// cond: off == 0 && sym == nil
 11937  	// result: (MOVHstoreidx2 ptr idx val mem)
 11938  	for {
 11939  		off := auxIntToInt32(v.AuxInt)
 11940  		sym := auxToSym(v.Aux)
 11941  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11942  			break
 11943  		}
 11944  		idx := v_0.Args[1]
 11945  		ptr := v_0.Args[0]
 11946  		val := v_1
 11947  		mem := v_2
 11948  		if !(off == 0 && sym == nil) {
 11949  			break
 11950  		}
 11951  		v.reset(OpARM64MOVHstoreidx2)
 11952  		v.AddArg4(ptr, idx, val, mem)
 11953  		return true
 11954  	}
 11955  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11956  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11957  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11958  	for {
 11959  		off1 := auxIntToInt32(v.AuxInt)
 11960  		sym1 := auxToSym(v.Aux)
 11961  		if v_0.Op != OpARM64MOVDaddr {
 11962  			break
 11963  		}
 11964  		off2 := auxIntToInt32(v_0.AuxInt)
 11965  		sym2 := auxToSym(v_0.Aux)
 11966  		ptr := v_0.Args[0]
 11967  		val := v_1
 11968  		mem := v_2
 11969  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11970  			break
 11971  		}
 11972  		v.reset(OpARM64MOVHstore)
 11973  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11974  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11975  		v.AddArg3(ptr, val, mem)
 11976  		return true
 11977  	}
 11978  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 11979  	// result: (MOVHstore [off] {sym} ptr x mem)
 11980  	for {
 11981  		off := auxIntToInt32(v.AuxInt)
 11982  		sym := auxToSym(v.Aux)
 11983  		ptr := v_0
 11984  		if v_1.Op != OpARM64MOVHreg {
 11985  			break
 11986  		}
 11987  		x := v_1.Args[0]
 11988  		mem := v_2
 11989  		v.reset(OpARM64MOVHstore)
 11990  		v.AuxInt = int32ToAuxInt(off)
 11991  		v.Aux = symToAux(sym)
 11992  		v.AddArg3(ptr, x, mem)
 11993  		return true
 11994  	}
 11995  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 11996  	// result: (MOVHstore [off] {sym} ptr x mem)
 11997  	for {
 11998  		off := auxIntToInt32(v.AuxInt)
 11999  		sym := auxToSym(v.Aux)
 12000  		ptr := v_0
 12001  		if v_1.Op != OpARM64MOVHUreg {
 12002  			break
 12003  		}
 12004  		x := v_1.Args[0]
 12005  		mem := v_2
 12006  		v.reset(OpARM64MOVHstore)
 12007  		v.AuxInt = int32ToAuxInt(off)
 12008  		v.Aux = symToAux(sym)
 12009  		v.AddArg3(ptr, x, mem)
 12010  		return true
 12011  	}
 12012  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 12013  	// result: (MOVHstore [off] {sym} ptr x mem)
 12014  	for {
 12015  		off := auxIntToInt32(v.AuxInt)
 12016  		sym := auxToSym(v.Aux)
 12017  		ptr := v_0
 12018  		if v_1.Op != OpARM64MOVWreg {
 12019  			break
 12020  		}
 12021  		x := v_1.Args[0]
 12022  		mem := v_2
 12023  		v.reset(OpARM64MOVHstore)
 12024  		v.AuxInt = int32ToAuxInt(off)
 12025  		v.Aux = symToAux(sym)
 12026  		v.AddArg3(ptr, x, mem)
 12027  		return true
 12028  	}
 12029  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 12030  	// result: (MOVHstore [off] {sym} ptr x mem)
 12031  	for {
 12032  		off := auxIntToInt32(v.AuxInt)
 12033  		sym := auxToSym(v.Aux)
 12034  		ptr := v_0
 12035  		if v_1.Op != OpARM64MOVWUreg {
 12036  			break
 12037  		}
 12038  		x := v_1.Args[0]
 12039  		mem := v_2
 12040  		v.reset(OpARM64MOVHstore)
 12041  		v.AuxInt = int32ToAuxInt(off)
 12042  		v.Aux = symToAux(sym)
 12043  		v.AddArg3(ptr, x, mem)
 12044  		return true
 12045  	}
 12046  	return false
 12047  }
 12048  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 12049  	v_3 := v.Args[3]
 12050  	v_2 := v.Args[2]
 12051  	v_1 := v.Args[1]
 12052  	v_0 := v.Args[0]
 12053  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 12054  	// cond: is32Bit(c)
 12055  	// result: (MOVHstore [int32(c)] ptr val mem)
 12056  	for {
 12057  		ptr := v_0
 12058  		if v_1.Op != OpARM64MOVDconst {
 12059  			break
 12060  		}
 12061  		c := auxIntToInt64(v_1.AuxInt)
 12062  		val := v_2
 12063  		mem := v_3
 12064  		if !(is32Bit(c)) {
 12065  			break
 12066  		}
 12067  		v.reset(OpARM64MOVHstore)
 12068  		v.AuxInt = int32ToAuxInt(int32(c))
 12069  		v.AddArg3(ptr, val, mem)
 12070  		return true
 12071  	}
 12072  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 12073  	// cond: is32Bit(c)
 12074  	// result: (MOVHstore [int32(c)] idx val mem)
 12075  	for {
 12076  		if v_0.Op != OpARM64MOVDconst {
 12077  			break
 12078  		}
 12079  		c := auxIntToInt64(v_0.AuxInt)
 12080  		idx := v_1
 12081  		val := v_2
 12082  		mem := v_3
 12083  		if !(is32Bit(c)) {
 12084  			break
 12085  		}
 12086  		v.reset(OpARM64MOVHstore)
 12087  		v.AuxInt = int32ToAuxInt(int32(c))
 12088  		v.AddArg3(idx, val, mem)
 12089  		return true
 12090  	}
 12091  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 12092  	// result: (MOVHstoreidx2 ptr idx val mem)
 12093  	for {
 12094  		ptr := v_0
 12095  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12096  			break
 12097  		}
 12098  		idx := v_1.Args[0]
 12099  		val := v_2
 12100  		mem := v_3
 12101  		v.reset(OpARM64MOVHstoreidx2)
 12102  		v.AddArg4(ptr, idx, val, mem)
 12103  		return true
 12104  	}
 12105  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 12106  	// result: (MOVHstoreidx2 ptr idx val mem)
 12107  	for {
 12108  		ptr := v_0
 12109  		if v_1.Op != OpARM64ADD {
 12110  			break
 12111  		}
 12112  		idx := v_1.Args[1]
 12113  		if idx != v_1.Args[0] {
 12114  			break
 12115  		}
 12116  		val := v_2
 12117  		mem := v_3
 12118  		v.reset(OpARM64MOVHstoreidx2)
 12119  		v.AddArg4(ptr, idx, val, mem)
 12120  		return true
 12121  	}
 12122  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 12123  	// result: (MOVHstoreidx2 ptr idx val mem)
 12124  	for {
 12125  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 12126  			break
 12127  		}
 12128  		idx := v_0.Args[0]
 12129  		ptr := v_1
 12130  		val := v_2
 12131  		mem := v_3
 12132  		v.reset(OpARM64MOVHstoreidx2)
 12133  		v.AddArg4(ptr, idx, val, mem)
 12134  		return true
 12135  	}
 12136  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 12137  	// result: (MOVHstoreidx2 ptr idx val mem)
 12138  	for {
 12139  		if v_0.Op != OpARM64ADD {
 12140  			break
 12141  		}
 12142  		idx := v_0.Args[1]
 12143  		if idx != v_0.Args[0] {
 12144  			break
 12145  		}
 12146  		ptr := v_1
 12147  		val := v_2
 12148  		mem := v_3
 12149  		v.reset(OpARM64MOVHstoreidx2)
 12150  		v.AddArg4(ptr, idx, val, mem)
 12151  		return true
 12152  	}
 12153  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 12154  	// result: (MOVHstoreidx ptr idx x mem)
 12155  	for {
 12156  		ptr := v_0
 12157  		idx := v_1
 12158  		if v_2.Op != OpARM64MOVHreg {
 12159  			break
 12160  		}
 12161  		x := v_2.Args[0]
 12162  		mem := v_3
 12163  		v.reset(OpARM64MOVHstoreidx)
 12164  		v.AddArg4(ptr, idx, x, mem)
 12165  		return true
 12166  	}
 12167  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 12168  	// result: (MOVHstoreidx ptr idx x mem)
 12169  	for {
 12170  		ptr := v_0
 12171  		idx := v_1
 12172  		if v_2.Op != OpARM64MOVHUreg {
 12173  			break
 12174  		}
 12175  		x := v_2.Args[0]
 12176  		mem := v_3
 12177  		v.reset(OpARM64MOVHstoreidx)
 12178  		v.AddArg4(ptr, idx, x, mem)
 12179  		return true
 12180  	}
 12181  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 12182  	// result: (MOVHstoreidx ptr idx x mem)
 12183  	for {
 12184  		ptr := v_0
 12185  		idx := v_1
 12186  		if v_2.Op != OpARM64MOVWreg {
 12187  			break
 12188  		}
 12189  		x := v_2.Args[0]
 12190  		mem := v_3
 12191  		v.reset(OpARM64MOVHstoreidx)
 12192  		v.AddArg4(ptr, idx, x, mem)
 12193  		return true
 12194  	}
 12195  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 12196  	// result: (MOVHstoreidx ptr idx x mem)
 12197  	for {
 12198  		ptr := v_0
 12199  		idx := v_1
 12200  		if v_2.Op != OpARM64MOVWUreg {
 12201  			break
 12202  		}
 12203  		x := v_2.Args[0]
 12204  		mem := v_3
 12205  		v.reset(OpARM64MOVHstoreidx)
 12206  		v.AddArg4(ptr, idx, x, mem)
 12207  		return true
 12208  	}
 12209  	return false
 12210  }
 12211  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 12212  	v_3 := v.Args[3]
 12213  	v_2 := v.Args[2]
 12214  	v_1 := v.Args[1]
 12215  	v_0 := v.Args[0]
 12216  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 12217  	// cond: is32Bit(c<<1)
 12218  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 12219  	for {
 12220  		ptr := v_0
 12221  		if v_1.Op != OpARM64MOVDconst {
 12222  			break
 12223  		}
 12224  		c := auxIntToInt64(v_1.AuxInt)
 12225  		val := v_2
 12226  		mem := v_3
 12227  		if !(is32Bit(c << 1)) {
 12228  			break
 12229  		}
 12230  		v.reset(OpARM64MOVHstore)
 12231  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 12232  		v.AddArg3(ptr, val, mem)
 12233  		return true
 12234  	}
 12235  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 12236  	// result: (MOVHstoreidx2 ptr idx x mem)
 12237  	for {
 12238  		ptr := v_0
 12239  		idx := v_1
 12240  		if v_2.Op != OpARM64MOVHreg {
 12241  			break
 12242  		}
 12243  		x := v_2.Args[0]
 12244  		mem := v_3
 12245  		v.reset(OpARM64MOVHstoreidx2)
 12246  		v.AddArg4(ptr, idx, x, mem)
 12247  		return true
 12248  	}
 12249  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 12250  	// result: (MOVHstoreidx2 ptr idx x mem)
 12251  	for {
 12252  		ptr := v_0
 12253  		idx := v_1
 12254  		if v_2.Op != OpARM64MOVHUreg {
 12255  			break
 12256  		}
 12257  		x := v_2.Args[0]
 12258  		mem := v_3
 12259  		v.reset(OpARM64MOVHstoreidx2)
 12260  		v.AddArg4(ptr, idx, x, mem)
 12261  		return true
 12262  	}
 12263  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 12264  	// result: (MOVHstoreidx2 ptr idx x mem)
 12265  	for {
 12266  		ptr := v_0
 12267  		idx := v_1
 12268  		if v_2.Op != OpARM64MOVWreg {
 12269  			break
 12270  		}
 12271  		x := v_2.Args[0]
 12272  		mem := v_3
 12273  		v.reset(OpARM64MOVHstoreidx2)
 12274  		v.AddArg4(ptr, idx, x, mem)
 12275  		return true
 12276  	}
 12277  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 12278  	// result: (MOVHstoreidx2 ptr idx x mem)
 12279  	for {
 12280  		ptr := v_0
 12281  		idx := v_1
 12282  		if v_2.Op != OpARM64MOVWUreg {
 12283  			break
 12284  		}
 12285  		x := v_2.Args[0]
 12286  		mem := v_3
 12287  		v.reset(OpARM64MOVHstoreidx2)
 12288  		v.AddArg4(ptr, idx, x, mem)
 12289  		return true
 12290  	}
 12291  	return false
 12292  }
 12293  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 12294  	v_1 := v.Args[1]
 12295  	v_0 := v.Args[0]
 12296  	b := v.Block
 12297  	config := b.Func.Config
 12298  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 12299  	// result: (FMOVSfpgp val)
 12300  	for {
 12301  		off := auxIntToInt32(v.AuxInt)
 12302  		sym := auxToSym(v.Aux)
 12303  		ptr := v_0
 12304  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 12305  			break
 12306  		}
 12307  		val := v_1.Args[1]
 12308  		if ptr != v_1.Args[0] {
 12309  			break
 12310  		}
 12311  		v.reset(OpARM64FMOVSfpgp)
 12312  		v.AddArg(val)
 12313  		return true
 12314  	}
 12315  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 12316  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12317  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 12318  	for {
 12319  		off1 := auxIntToInt32(v.AuxInt)
 12320  		sym := auxToSym(v.Aux)
 12321  		if v_0.Op != OpARM64ADDconst {
 12322  			break
 12323  		}
 12324  		off2 := auxIntToInt64(v_0.AuxInt)
 12325  		ptr := v_0.Args[0]
 12326  		mem := v_1
 12327  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12328  			break
 12329  		}
 12330  		v.reset(OpARM64MOVWUload)
 12331  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12332  		v.Aux = symToAux(sym)
 12333  		v.AddArg2(ptr, mem)
 12334  		return true
 12335  	}
 12336  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 12337  	// cond: off == 0 && sym == nil
 12338  	// result: (MOVWUloadidx ptr idx mem)
 12339  	for {
 12340  		off := auxIntToInt32(v.AuxInt)
 12341  		sym := auxToSym(v.Aux)
 12342  		if v_0.Op != OpARM64ADD {
 12343  			break
 12344  		}
 12345  		idx := v_0.Args[1]
 12346  		ptr := v_0.Args[0]
 12347  		mem := v_1
 12348  		if !(off == 0 && sym == nil) {
 12349  			break
 12350  		}
 12351  		v.reset(OpARM64MOVWUloadidx)
 12352  		v.AddArg3(ptr, idx, mem)
 12353  		return true
 12354  	}
 12355  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 12356  	// cond: off == 0 && sym == nil
 12357  	// result: (MOVWUloadidx4 ptr idx mem)
 12358  	for {
 12359  		off := auxIntToInt32(v.AuxInt)
 12360  		sym := auxToSym(v.Aux)
 12361  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12362  			break
 12363  		}
 12364  		idx := v_0.Args[1]
 12365  		ptr := v_0.Args[0]
 12366  		mem := v_1
 12367  		if !(off == 0 && sym == nil) {
 12368  			break
 12369  		}
 12370  		v.reset(OpARM64MOVWUloadidx4)
 12371  		v.AddArg3(ptr, idx, mem)
 12372  		return true
 12373  	}
 12374  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 12375  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12376  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 12377  	for {
 12378  		off1 := auxIntToInt32(v.AuxInt)
 12379  		sym1 := auxToSym(v.Aux)
 12380  		if v_0.Op != OpARM64MOVDaddr {
 12381  			break
 12382  		}
 12383  		off2 := auxIntToInt32(v_0.AuxInt)
 12384  		sym2 := auxToSym(v_0.Aux)
 12385  		ptr := v_0.Args[0]
 12386  		mem := v_1
 12387  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12388  			break
 12389  		}
 12390  		v.reset(OpARM64MOVWUload)
 12391  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12392  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12393  		v.AddArg2(ptr, mem)
 12394  		return true
 12395  	}
 12396  	// match: (MOVWUload [off] {sym} (SB) _)
 12397  	// cond: symIsRO(sym)
 12398  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 12399  	for {
 12400  		off := auxIntToInt32(v.AuxInt)
 12401  		sym := auxToSym(v.Aux)
 12402  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 12403  			break
 12404  		}
 12405  		v.reset(OpARM64MOVDconst)
 12406  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 12407  		return true
 12408  	}
 12409  	return false
 12410  }
 12411  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 12412  	v_2 := v.Args[2]
 12413  	v_1 := v.Args[1]
 12414  	v_0 := v.Args[0]
 12415  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 12416  	// cond: is32Bit(c)
 12417  	// result: (MOVWUload [int32(c)] ptr mem)
 12418  	for {
 12419  		ptr := v_0
 12420  		if v_1.Op != OpARM64MOVDconst {
 12421  			break
 12422  		}
 12423  		c := auxIntToInt64(v_1.AuxInt)
 12424  		mem := v_2
 12425  		if !(is32Bit(c)) {
 12426  			break
 12427  		}
 12428  		v.reset(OpARM64MOVWUload)
 12429  		v.AuxInt = int32ToAuxInt(int32(c))
 12430  		v.AddArg2(ptr, mem)
 12431  		return true
 12432  	}
 12433  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 12434  	// cond: is32Bit(c)
 12435  	// result: (MOVWUload [int32(c)] ptr mem)
 12436  	for {
 12437  		if v_0.Op != OpARM64MOVDconst {
 12438  			break
 12439  		}
 12440  		c := auxIntToInt64(v_0.AuxInt)
 12441  		ptr := v_1
 12442  		mem := v_2
 12443  		if !(is32Bit(c)) {
 12444  			break
 12445  		}
 12446  		v.reset(OpARM64MOVWUload)
 12447  		v.AuxInt = int32ToAuxInt(int32(c))
 12448  		v.AddArg2(ptr, mem)
 12449  		return true
 12450  	}
 12451  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 12452  	// result: (MOVWUloadidx4 ptr idx mem)
 12453  	for {
 12454  		ptr := v_0
 12455  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12456  			break
 12457  		}
 12458  		idx := v_1.Args[0]
 12459  		mem := v_2
 12460  		v.reset(OpARM64MOVWUloadidx4)
 12461  		v.AddArg3(ptr, idx, mem)
 12462  		return true
 12463  	}
 12464  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 12465  	// result: (MOVWUloadidx4 ptr idx mem)
 12466  	for {
 12467  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12468  			break
 12469  		}
 12470  		idx := v_0.Args[0]
 12471  		ptr := v_1
 12472  		mem := v_2
 12473  		v.reset(OpARM64MOVWUloadidx4)
 12474  		v.AddArg3(ptr, idx, mem)
 12475  		return true
 12476  	}
 12477  	return false
 12478  }
 12479  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 12480  	v_2 := v.Args[2]
 12481  	v_1 := v.Args[1]
 12482  	v_0 := v.Args[0]
 12483  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 12484  	// cond: is32Bit(c<<2)
 12485  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 12486  	for {
 12487  		ptr := v_0
 12488  		if v_1.Op != OpARM64MOVDconst {
 12489  			break
 12490  		}
 12491  		c := auxIntToInt64(v_1.AuxInt)
 12492  		mem := v_2
 12493  		if !(is32Bit(c << 2)) {
 12494  			break
 12495  		}
 12496  		v.reset(OpARM64MOVWUload)
 12497  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12498  		v.AddArg2(ptr, mem)
 12499  		return true
 12500  	}
 12501  	return false
 12502  }
 12503  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 12504  	v_0 := v.Args[0]
 12505  	// match: (MOVWUreg (ANDconst [c] x))
 12506  	// result: (ANDconst [c&(1<<32-1)] x)
 12507  	for {
 12508  		if v_0.Op != OpARM64ANDconst {
 12509  			break
 12510  		}
 12511  		c := auxIntToInt64(v_0.AuxInt)
 12512  		x := v_0.Args[0]
 12513  		v.reset(OpARM64ANDconst)
 12514  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 12515  		v.AddArg(x)
 12516  		return true
 12517  	}
 12518  	// match: (MOVWUreg (MOVDconst [c]))
 12519  	// result: (MOVDconst [int64(uint32(c))])
 12520  	for {
 12521  		if v_0.Op != OpARM64MOVDconst {
 12522  			break
 12523  		}
 12524  		c := auxIntToInt64(v_0.AuxInt)
 12525  		v.reset(OpARM64MOVDconst)
 12526  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 12527  		return true
 12528  	}
 12529  	// match: (MOVWUreg x)
 12530  	// cond: v.Type.Size() <= 4
 12531  	// result: x
 12532  	for {
 12533  		x := v_0
 12534  		if !(v.Type.Size() <= 4) {
 12535  			break
 12536  		}
 12537  		v.copyOf(x)
 12538  		return true
 12539  	}
 12540  	// match: (MOVWUreg (SLLconst [lc] x))
 12541  	// cond: lc >= 32
 12542  	// result: (MOVDconst [0])
 12543  	for {
 12544  		if v_0.Op != OpARM64SLLconst {
 12545  			break
 12546  		}
 12547  		lc := auxIntToInt64(v_0.AuxInt)
 12548  		if !(lc >= 32) {
 12549  			break
 12550  		}
 12551  		v.reset(OpARM64MOVDconst)
 12552  		v.AuxInt = int64ToAuxInt(0)
 12553  		return true
 12554  	}
 12555  	// match: (MOVWUreg (SLLconst [lc] x))
 12556  	// cond: lc < 32
 12557  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 12558  	for {
 12559  		if v_0.Op != OpARM64SLLconst {
 12560  			break
 12561  		}
 12562  		lc := auxIntToInt64(v_0.AuxInt)
 12563  		x := v_0.Args[0]
 12564  		if !(lc < 32) {
 12565  			break
 12566  		}
 12567  		v.reset(OpARM64UBFIZ)
 12568  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 12569  		v.AddArg(x)
 12570  		return true
 12571  	}
 12572  	// match: (MOVWUreg (SRLconst [rc] x))
 12573  	// cond: rc < 32
 12574  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 12575  	for {
 12576  		if v_0.Op != OpARM64SRLconst {
 12577  			break
 12578  		}
 12579  		rc := auxIntToInt64(v_0.AuxInt)
 12580  		x := v_0.Args[0]
 12581  		if !(rc < 32) {
 12582  			break
 12583  		}
 12584  		v.reset(OpARM64UBFX)
 12585  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 12586  		v.AddArg(x)
 12587  		return true
 12588  	}
 12589  	// match: (MOVWUreg (UBFX [bfc] x))
 12590  	// cond: bfc.width() <= 32
 12591  	// result: (UBFX [bfc] x)
 12592  	for {
 12593  		if v_0.Op != OpARM64UBFX {
 12594  			break
 12595  		}
 12596  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 12597  		x := v_0.Args[0]
 12598  		if !(bfc.width() <= 32) {
 12599  			break
 12600  		}
 12601  		v.reset(OpARM64UBFX)
 12602  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 12603  		v.AddArg(x)
 12604  		return true
 12605  	}
 12606  	return false
 12607  }
 12608  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 12609  	v_1 := v.Args[1]
 12610  	v_0 := v.Args[0]
 12611  	b := v.Block
 12612  	config := b.Func.Config
 12613  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 12614  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12615  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 12616  	for {
 12617  		off1 := auxIntToInt32(v.AuxInt)
 12618  		sym := auxToSym(v.Aux)
 12619  		if v_0.Op != OpARM64ADDconst {
 12620  			break
 12621  		}
 12622  		off2 := auxIntToInt64(v_0.AuxInt)
 12623  		ptr := v_0.Args[0]
 12624  		mem := v_1
 12625  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12626  			break
 12627  		}
 12628  		v.reset(OpARM64MOVWload)
 12629  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12630  		v.Aux = symToAux(sym)
 12631  		v.AddArg2(ptr, mem)
 12632  		return true
 12633  	}
 12634  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 12635  	// cond: off == 0 && sym == nil
 12636  	// result: (MOVWloadidx ptr idx mem)
 12637  	for {
 12638  		off := auxIntToInt32(v.AuxInt)
 12639  		sym := auxToSym(v.Aux)
 12640  		if v_0.Op != OpARM64ADD {
 12641  			break
 12642  		}
 12643  		idx := v_0.Args[1]
 12644  		ptr := v_0.Args[0]
 12645  		mem := v_1
 12646  		if !(off == 0 && sym == nil) {
 12647  			break
 12648  		}
 12649  		v.reset(OpARM64MOVWloadidx)
 12650  		v.AddArg3(ptr, idx, mem)
 12651  		return true
 12652  	}
 12653  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 12654  	// cond: off == 0 && sym == nil
 12655  	// result: (MOVWloadidx4 ptr idx mem)
 12656  	for {
 12657  		off := auxIntToInt32(v.AuxInt)
 12658  		sym := auxToSym(v.Aux)
 12659  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12660  			break
 12661  		}
 12662  		idx := v_0.Args[1]
 12663  		ptr := v_0.Args[0]
 12664  		mem := v_1
 12665  		if !(off == 0 && sym == nil) {
 12666  			break
 12667  		}
 12668  		v.reset(OpARM64MOVWloadidx4)
 12669  		v.AddArg3(ptr, idx, mem)
 12670  		return true
 12671  	}
 12672  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 12673  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12674  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 12675  	for {
 12676  		off1 := auxIntToInt32(v.AuxInt)
 12677  		sym1 := auxToSym(v.Aux)
 12678  		if v_0.Op != OpARM64MOVDaddr {
 12679  			break
 12680  		}
 12681  		off2 := auxIntToInt32(v_0.AuxInt)
 12682  		sym2 := auxToSym(v_0.Aux)
 12683  		ptr := v_0.Args[0]
 12684  		mem := v_1
 12685  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12686  			break
 12687  		}
 12688  		v.reset(OpARM64MOVWload)
 12689  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12690  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12691  		v.AddArg2(ptr, mem)
 12692  		return true
 12693  	}
 12694  	// match: (MOVWload [off] {sym} (SB) _)
 12695  	// cond: symIsRO(sym)
 12696  	// result: (MOVDconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 12697  	for {
 12698  		off := auxIntToInt32(v.AuxInt)
 12699  		sym := auxToSym(v.Aux)
 12700  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 12701  			break
 12702  		}
 12703  		v.reset(OpARM64MOVDconst)
 12704  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 12705  		return true
 12706  	}
 12707  	return false
 12708  }
 12709  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 12710  	v_2 := v.Args[2]
 12711  	v_1 := v.Args[1]
 12712  	v_0 := v.Args[0]
 12713  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 12714  	// cond: is32Bit(c)
 12715  	// result: (MOVWload [int32(c)] ptr mem)
 12716  	for {
 12717  		ptr := v_0
 12718  		if v_1.Op != OpARM64MOVDconst {
 12719  			break
 12720  		}
 12721  		c := auxIntToInt64(v_1.AuxInt)
 12722  		mem := v_2
 12723  		if !(is32Bit(c)) {
 12724  			break
 12725  		}
 12726  		v.reset(OpARM64MOVWload)
 12727  		v.AuxInt = int32ToAuxInt(int32(c))
 12728  		v.AddArg2(ptr, mem)
 12729  		return true
 12730  	}
 12731  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 12732  	// cond: is32Bit(c)
 12733  	// result: (MOVWload [int32(c)] ptr mem)
 12734  	for {
 12735  		if v_0.Op != OpARM64MOVDconst {
 12736  			break
 12737  		}
 12738  		c := auxIntToInt64(v_0.AuxInt)
 12739  		ptr := v_1
 12740  		mem := v_2
 12741  		if !(is32Bit(c)) {
 12742  			break
 12743  		}
 12744  		v.reset(OpARM64MOVWload)
 12745  		v.AuxInt = int32ToAuxInt(int32(c))
 12746  		v.AddArg2(ptr, mem)
 12747  		return true
 12748  	}
 12749  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 12750  	// result: (MOVWloadidx4 ptr idx mem)
 12751  	for {
 12752  		ptr := v_0
 12753  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12754  			break
 12755  		}
 12756  		idx := v_1.Args[0]
 12757  		mem := v_2
 12758  		v.reset(OpARM64MOVWloadidx4)
 12759  		v.AddArg3(ptr, idx, mem)
 12760  		return true
 12761  	}
 12762  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 12763  	// result: (MOVWloadidx4 ptr idx mem)
 12764  	for {
 12765  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12766  			break
 12767  		}
 12768  		idx := v_0.Args[0]
 12769  		ptr := v_1
 12770  		mem := v_2
 12771  		v.reset(OpARM64MOVWloadidx4)
 12772  		v.AddArg3(ptr, idx, mem)
 12773  		return true
 12774  	}
 12775  	return false
 12776  }
 12777  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 12778  	v_2 := v.Args[2]
 12779  	v_1 := v.Args[1]
 12780  	v_0 := v.Args[0]
 12781  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 12782  	// cond: is32Bit(c<<2)
 12783  	// result: (MOVWload [int32(c)<<2] ptr mem)
 12784  	for {
 12785  		ptr := v_0
 12786  		if v_1.Op != OpARM64MOVDconst {
 12787  			break
 12788  		}
 12789  		c := auxIntToInt64(v_1.AuxInt)
 12790  		mem := v_2
 12791  		if !(is32Bit(c << 2)) {
 12792  			break
 12793  		}
 12794  		v.reset(OpARM64MOVWload)
 12795  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12796  		v.AddArg2(ptr, mem)
 12797  		return true
 12798  	}
 12799  	return false
 12800  }
 12801  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 12802  	v_0 := v.Args[0]
 12803  	// match: (MOVWreg (MOVDconst [c]))
 12804  	// result: (MOVDconst [int64(int32(c))])
 12805  	for {
 12806  		if v_0.Op != OpARM64MOVDconst {
 12807  			break
 12808  		}
 12809  		c := auxIntToInt64(v_0.AuxInt)
 12810  		v.reset(OpARM64MOVDconst)
 12811  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 12812  		return true
 12813  	}
 12814  	// match: (MOVWreg x)
 12815  	// cond: v.Type.Size() <= 4
 12816  	// result: x
 12817  	for {
 12818  		x := v_0
 12819  		if !(v.Type.Size() <= 4) {
 12820  			break
 12821  		}
 12822  		v.copyOf(x)
 12823  		return true
 12824  	}
 12825  	// match: (MOVWreg <t> (ANDconst x [c]))
 12826  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 12827  	// result: (ANDconst <t> x [c])
 12828  	for {
 12829  		t := v.Type
 12830  		if v_0.Op != OpARM64ANDconst {
 12831  			break
 12832  		}
 12833  		c := auxIntToInt64(v_0.AuxInt)
 12834  		x := v_0.Args[0]
 12835  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 12836  			break
 12837  		}
 12838  		v.reset(OpARM64ANDconst)
 12839  		v.Type = t
 12840  		v.AuxInt = int64ToAuxInt(c)
 12841  		v.AddArg(x)
 12842  		return true
 12843  	}
 12844  	// match: (MOVWreg (SLLconst [lc] x))
 12845  	// cond: lc < 32
 12846  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 12847  	for {
 12848  		if v_0.Op != OpARM64SLLconst {
 12849  			break
 12850  		}
 12851  		lc := auxIntToInt64(v_0.AuxInt)
 12852  		x := v_0.Args[0]
 12853  		if !(lc < 32) {
 12854  			break
 12855  		}
 12856  		v.reset(OpARM64SBFIZ)
 12857  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 12858  		v.AddArg(x)
 12859  		return true
 12860  	}
 12861  	// match: (MOVWreg (SBFX [bfc] x))
 12862  	// cond: bfc.width() <= 32
 12863  	// result: (SBFX [bfc] x)
 12864  	for {
 12865  		if v_0.Op != OpARM64SBFX {
 12866  			break
 12867  		}
 12868  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 12869  		x := v_0.Args[0]
 12870  		if !(bfc.width() <= 32) {
 12871  			break
 12872  		}
 12873  		v.reset(OpARM64SBFX)
 12874  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 12875  		v.AddArg(x)
 12876  		return true
 12877  	}
 12878  	return false
 12879  }
 12880  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 12881  	v_2 := v.Args[2]
 12882  	v_1 := v.Args[1]
 12883  	v_0 := v.Args[0]
 12884  	b := v.Block
 12885  	config := b.Func.Config
 12886  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 12887  	// result: (FMOVSstore [off] {sym} ptr val mem)
 12888  	for {
 12889  		off := auxIntToInt32(v.AuxInt)
 12890  		sym := auxToSym(v.Aux)
 12891  		ptr := v_0
 12892  		if v_1.Op != OpARM64FMOVSfpgp {
 12893  			break
 12894  		}
 12895  		val := v_1.Args[0]
 12896  		mem := v_2
 12897  		v.reset(OpARM64FMOVSstore)
 12898  		v.AuxInt = int32ToAuxInt(off)
 12899  		v.Aux = symToAux(sym)
 12900  		v.AddArg3(ptr, val, mem)
 12901  		return true
 12902  	}
 12903  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 12904  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12905  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 12906  	for {
 12907  		off1 := auxIntToInt32(v.AuxInt)
 12908  		sym := auxToSym(v.Aux)
 12909  		if v_0.Op != OpARM64ADDconst {
 12910  			break
 12911  		}
 12912  		off2 := auxIntToInt64(v_0.AuxInt)
 12913  		ptr := v_0.Args[0]
 12914  		val := v_1
 12915  		mem := v_2
 12916  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12917  			break
 12918  		}
 12919  		v.reset(OpARM64MOVWstore)
 12920  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12921  		v.Aux = symToAux(sym)
 12922  		v.AddArg3(ptr, val, mem)
 12923  		return true
 12924  	}
 12925  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 12926  	// cond: off == 0 && sym == nil
 12927  	// result: (MOVWstoreidx ptr idx val mem)
 12928  	for {
 12929  		off := auxIntToInt32(v.AuxInt)
 12930  		sym := auxToSym(v.Aux)
 12931  		if v_0.Op != OpARM64ADD {
 12932  			break
 12933  		}
 12934  		idx := v_0.Args[1]
 12935  		ptr := v_0.Args[0]
 12936  		val := v_1
 12937  		mem := v_2
 12938  		if !(off == 0 && sym == nil) {
 12939  			break
 12940  		}
 12941  		v.reset(OpARM64MOVWstoreidx)
 12942  		v.AddArg4(ptr, idx, val, mem)
 12943  		return true
 12944  	}
 12945  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 12946  	// cond: off == 0 && sym == nil
 12947  	// result: (MOVWstoreidx4 ptr idx val mem)
 12948  	for {
 12949  		off := auxIntToInt32(v.AuxInt)
 12950  		sym := auxToSym(v.Aux)
 12951  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12952  			break
 12953  		}
 12954  		idx := v_0.Args[1]
 12955  		ptr := v_0.Args[0]
 12956  		val := v_1
 12957  		mem := v_2
 12958  		if !(off == 0 && sym == nil) {
 12959  			break
 12960  		}
 12961  		v.reset(OpARM64MOVWstoreidx4)
 12962  		v.AddArg4(ptr, idx, val, mem)
 12963  		return true
 12964  	}
 12965  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 12966  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12967  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 12968  	for {
 12969  		off1 := auxIntToInt32(v.AuxInt)
 12970  		sym1 := auxToSym(v.Aux)
 12971  		if v_0.Op != OpARM64MOVDaddr {
 12972  			break
 12973  		}
 12974  		off2 := auxIntToInt32(v_0.AuxInt)
 12975  		sym2 := auxToSym(v_0.Aux)
 12976  		ptr := v_0.Args[0]
 12977  		val := v_1
 12978  		mem := v_2
 12979  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12980  			break
 12981  		}
 12982  		v.reset(OpARM64MOVWstore)
 12983  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12984  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12985  		v.AddArg3(ptr, val, mem)
 12986  		return true
 12987  	}
 12988  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 12989  	// result: (MOVWstore [off] {sym} ptr x mem)
 12990  	for {
 12991  		off := auxIntToInt32(v.AuxInt)
 12992  		sym := auxToSym(v.Aux)
 12993  		ptr := v_0
 12994  		if v_1.Op != OpARM64MOVWreg {
 12995  			break
 12996  		}
 12997  		x := v_1.Args[0]
 12998  		mem := v_2
 12999  		v.reset(OpARM64MOVWstore)
 13000  		v.AuxInt = int32ToAuxInt(off)
 13001  		v.Aux = symToAux(sym)
 13002  		v.AddArg3(ptr, x, mem)
 13003  		return true
 13004  	}
 13005  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 13006  	// result: (MOVWstore [off] {sym} ptr x mem)
 13007  	for {
 13008  		off := auxIntToInt32(v.AuxInt)
 13009  		sym := auxToSym(v.Aux)
 13010  		ptr := v_0
 13011  		if v_1.Op != OpARM64MOVWUreg {
 13012  			break
 13013  		}
 13014  		x := v_1.Args[0]
 13015  		mem := v_2
 13016  		v.reset(OpARM64MOVWstore)
 13017  		v.AuxInt = int32ToAuxInt(off)
 13018  		v.Aux = symToAux(sym)
 13019  		v.AddArg3(ptr, x, mem)
 13020  		return true
 13021  	}
 13022  	return false
 13023  }
 13024  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 13025  	v_3 := v.Args[3]
 13026  	v_2 := v.Args[2]
 13027  	v_1 := v.Args[1]
 13028  	v_0 := v.Args[0]
 13029  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 13030  	// cond: is32Bit(c)
 13031  	// result: (MOVWstore [int32(c)] ptr val mem)
 13032  	for {
 13033  		ptr := v_0
 13034  		if v_1.Op != OpARM64MOVDconst {
 13035  			break
 13036  		}
 13037  		c := auxIntToInt64(v_1.AuxInt)
 13038  		val := v_2
 13039  		mem := v_3
 13040  		if !(is32Bit(c)) {
 13041  			break
 13042  		}
 13043  		v.reset(OpARM64MOVWstore)
 13044  		v.AuxInt = int32ToAuxInt(int32(c))
 13045  		v.AddArg3(ptr, val, mem)
 13046  		return true
 13047  	}
 13048  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 13049  	// cond: is32Bit(c)
 13050  	// result: (MOVWstore [int32(c)] idx val mem)
 13051  	for {
 13052  		if v_0.Op != OpARM64MOVDconst {
 13053  			break
 13054  		}
 13055  		c := auxIntToInt64(v_0.AuxInt)
 13056  		idx := v_1
 13057  		val := v_2
 13058  		mem := v_3
 13059  		if !(is32Bit(c)) {
 13060  			break
 13061  		}
 13062  		v.reset(OpARM64MOVWstore)
 13063  		v.AuxInt = int32ToAuxInt(int32(c))
 13064  		v.AddArg3(idx, val, mem)
 13065  		return true
 13066  	}
 13067  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 13068  	// result: (MOVWstoreidx4 ptr idx val mem)
 13069  	for {
 13070  		ptr := v_0
 13071  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 13072  			break
 13073  		}
 13074  		idx := v_1.Args[0]
 13075  		val := v_2
 13076  		mem := v_3
 13077  		v.reset(OpARM64MOVWstoreidx4)
 13078  		v.AddArg4(ptr, idx, val, mem)
 13079  		return true
 13080  	}
 13081  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 13082  	// result: (MOVWstoreidx4 ptr idx val mem)
 13083  	for {
 13084  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 13085  			break
 13086  		}
 13087  		idx := v_0.Args[0]
 13088  		ptr := v_1
 13089  		val := v_2
 13090  		mem := v_3
 13091  		v.reset(OpARM64MOVWstoreidx4)
 13092  		v.AddArg4(ptr, idx, val, mem)
 13093  		return true
 13094  	}
 13095  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 13096  	// result: (MOVWstoreidx ptr idx x mem)
 13097  	for {
 13098  		ptr := v_0
 13099  		idx := v_1
 13100  		if v_2.Op != OpARM64MOVWreg {
 13101  			break
 13102  		}
 13103  		x := v_2.Args[0]
 13104  		mem := v_3
 13105  		v.reset(OpARM64MOVWstoreidx)
 13106  		v.AddArg4(ptr, idx, x, mem)
 13107  		return true
 13108  	}
 13109  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 13110  	// result: (MOVWstoreidx ptr idx x mem)
 13111  	for {
 13112  		ptr := v_0
 13113  		idx := v_1
 13114  		if v_2.Op != OpARM64MOVWUreg {
 13115  			break
 13116  		}
 13117  		x := v_2.Args[0]
 13118  		mem := v_3
 13119  		v.reset(OpARM64MOVWstoreidx)
 13120  		v.AddArg4(ptr, idx, x, mem)
 13121  		return true
 13122  	}
 13123  	return false
 13124  }
 13125  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 13126  	v_3 := v.Args[3]
 13127  	v_2 := v.Args[2]
 13128  	v_1 := v.Args[1]
 13129  	v_0 := v.Args[0]
 13130  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 13131  	// cond: is32Bit(c<<2)
 13132  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 13133  	for {
 13134  		ptr := v_0
 13135  		if v_1.Op != OpARM64MOVDconst {
 13136  			break
 13137  		}
 13138  		c := auxIntToInt64(v_1.AuxInt)
 13139  		val := v_2
 13140  		mem := v_3
 13141  		if !(is32Bit(c << 2)) {
 13142  			break
 13143  		}
 13144  		v.reset(OpARM64MOVWstore)
 13145  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 13146  		v.AddArg3(ptr, val, mem)
 13147  		return true
 13148  	}
 13149  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 13150  	// result: (MOVWstoreidx4 ptr idx x mem)
 13151  	for {
 13152  		ptr := v_0
 13153  		idx := v_1
 13154  		if v_2.Op != OpARM64MOVWreg {
 13155  			break
 13156  		}
 13157  		x := v_2.Args[0]
 13158  		mem := v_3
 13159  		v.reset(OpARM64MOVWstoreidx4)
 13160  		v.AddArg4(ptr, idx, x, mem)
 13161  		return true
 13162  	}
 13163  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 13164  	// result: (MOVWstoreidx4 ptr idx x mem)
 13165  	for {
 13166  		ptr := v_0
 13167  		idx := v_1
 13168  		if v_2.Op != OpARM64MOVWUreg {
 13169  			break
 13170  		}
 13171  		x := v_2.Args[0]
 13172  		mem := v_3
 13173  		v.reset(OpARM64MOVWstoreidx4)
 13174  		v.AddArg4(ptr, idx, x, mem)
 13175  		return true
 13176  	}
 13177  	return false
 13178  }
 13179  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 13180  	v_2 := v.Args[2]
 13181  	v_1 := v.Args[1]
 13182  	v_0 := v.Args[0]
 13183  	b := v.Block
 13184  	// match: (MSUB a x (MOVDconst [-1]))
 13185  	// result: (ADD a x)
 13186  	for {
 13187  		a := v_0
 13188  		x := v_1
 13189  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 13190  			break
 13191  		}
 13192  		v.reset(OpARM64ADD)
 13193  		v.AddArg2(a, x)
 13194  		return true
 13195  	}
 13196  	// match: (MSUB a _ (MOVDconst [0]))
 13197  	// result: a
 13198  	for {
 13199  		a := v_0
 13200  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 13201  			break
 13202  		}
 13203  		v.copyOf(a)
 13204  		return true
 13205  	}
 13206  	// match: (MSUB a x (MOVDconst [1]))
 13207  	// result: (SUB a x)
 13208  	for {
 13209  		a := v_0
 13210  		x := v_1
 13211  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 13212  			break
 13213  		}
 13214  		v.reset(OpARM64SUB)
 13215  		v.AddArg2(a, x)
 13216  		return true
 13217  	}
 13218  	// match: (MSUB a x (MOVDconst [c]))
 13219  	// cond: isPowerOfTwo(c)
 13220  	// result: (SUBshiftLL a x [log64(c)])
 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 !(isPowerOfTwo(c)) {
 13229  			break
 13230  		}
 13231  		v.reset(OpARM64SUBshiftLL)
 13232  		v.AuxInt = int64ToAuxInt(log64(c))
 13233  		v.AddArg2(a, x)
 13234  		return true
 13235  	}
 13236  	// match: (MSUB a x (MOVDconst [c]))
 13237  	// cond: isPowerOfTwo(c-1) && c>=3
 13238  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 13239  	for {
 13240  		a := v_0
 13241  		x := v_1
 13242  		if v_2.Op != OpARM64MOVDconst {
 13243  			break
 13244  		}
 13245  		c := auxIntToInt64(v_2.AuxInt)
 13246  		if !(isPowerOfTwo(c-1) && c >= 3) {
 13247  			break
 13248  		}
 13249  		v.reset(OpARM64SUB)
 13250  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13251  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 13252  		v0.AddArg2(x, x)
 13253  		v.AddArg2(a, v0)
 13254  		return true
 13255  	}
 13256  	// match: (MSUB a x (MOVDconst [c]))
 13257  	// cond: isPowerOfTwo(c+1) && c>=7
 13258  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 13259  	for {
 13260  		a := v_0
 13261  		x := v_1
 13262  		if v_2.Op != OpARM64MOVDconst {
 13263  			break
 13264  		}
 13265  		c := auxIntToInt64(v_2.AuxInt)
 13266  		if !(isPowerOfTwo(c+1) && c >= 7) {
 13267  			break
 13268  		}
 13269  		v.reset(OpARM64ADD)
 13270  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13271  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 13272  		v0.AddArg2(x, x)
 13273  		v.AddArg2(a, v0)
 13274  		return true
 13275  	}
 13276  	// match: (MSUB a x (MOVDconst [c]))
 13277  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 13278  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 13279  	for {
 13280  		a := v_0
 13281  		x := v_1
 13282  		if v_2.Op != OpARM64MOVDconst {
 13283  			break
 13284  		}
 13285  		c := auxIntToInt64(v_2.AuxInt)
 13286  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13287  			break
 13288  		}
 13289  		v.reset(OpARM64ADDshiftLL)
 13290  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 13291  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13292  		v0.AuxInt = int64ToAuxInt(2)
 13293  		v0.AddArg2(x, x)
 13294  		v.AddArg2(a, v0)
 13295  		return true
 13296  	}
 13297  	// match: (MSUB a x (MOVDconst [c]))
 13298  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13299  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 13300  	for {
 13301  		a := v_0
 13302  		x := v_1
 13303  		if v_2.Op != OpARM64MOVDconst {
 13304  			break
 13305  		}
 13306  		c := auxIntToInt64(v_2.AuxInt)
 13307  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13308  			break
 13309  		}
 13310  		v.reset(OpARM64SUBshiftLL)
 13311  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 13312  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13313  		v0.AuxInt = int64ToAuxInt(2)
 13314  		v0.AddArg2(x, x)
 13315  		v.AddArg2(a, v0)
 13316  		return true
 13317  	}
 13318  	// match: (MSUB a x (MOVDconst [c]))
 13319  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13320  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 13321  	for {
 13322  		a := v_0
 13323  		x := v_1
 13324  		if v_2.Op != OpARM64MOVDconst {
 13325  			break
 13326  		}
 13327  		c := auxIntToInt64(v_2.AuxInt)
 13328  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13329  			break
 13330  		}
 13331  		v.reset(OpARM64ADDshiftLL)
 13332  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 13333  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13334  		v0.AuxInt = int64ToAuxInt(3)
 13335  		v0.AddArg2(x, x)
 13336  		v.AddArg2(a, v0)
 13337  		return true
 13338  	}
 13339  	// match: (MSUB a x (MOVDconst [c]))
 13340  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13341  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 13342  	for {
 13343  		a := v_0
 13344  		x := v_1
 13345  		if v_2.Op != OpARM64MOVDconst {
 13346  			break
 13347  		}
 13348  		c := auxIntToInt64(v_2.AuxInt)
 13349  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13350  			break
 13351  		}
 13352  		v.reset(OpARM64SUBshiftLL)
 13353  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 13354  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13355  		v0.AuxInt = int64ToAuxInt(3)
 13356  		v0.AddArg2(x, x)
 13357  		v.AddArg2(a, v0)
 13358  		return true
 13359  	}
 13360  	// match: (MSUB a (MOVDconst [-1]) x)
 13361  	// result: (ADD a x)
 13362  	for {
 13363  		a := v_0
 13364  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 13365  			break
 13366  		}
 13367  		x := v_2
 13368  		v.reset(OpARM64ADD)
 13369  		v.AddArg2(a, x)
 13370  		return true
 13371  	}
 13372  	// match: (MSUB a (MOVDconst [0]) _)
 13373  	// result: a
 13374  	for {
 13375  		a := v_0
 13376  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 13377  			break
 13378  		}
 13379  		v.copyOf(a)
 13380  		return true
 13381  	}
 13382  	// match: (MSUB a (MOVDconst [1]) x)
 13383  	// result: (SUB a x)
 13384  	for {
 13385  		a := v_0
 13386  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 13387  			break
 13388  		}
 13389  		x := v_2
 13390  		v.reset(OpARM64SUB)
 13391  		v.AddArg2(a, x)
 13392  		return true
 13393  	}
 13394  	// match: (MSUB a (MOVDconst [c]) x)
 13395  	// cond: isPowerOfTwo(c)
 13396  	// result: (SUBshiftLL a x [log64(c)])
 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 !(isPowerOfTwo(c)) {
 13405  			break
 13406  		}
 13407  		v.reset(OpARM64SUBshiftLL)
 13408  		v.AuxInt = int64ToAuxInt(log64(c))
 13409  		v.AddArg2(a, x)
 13410  		return true
 13411  	}
 13412  	// match: (MSUB a (MOVDconst [c]) x)
 13413  	// cond: isPowerOfTwo(c-1) && c>=3
 13414  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 13415  	for {
 13416  		a := v_0
 13417  		if v_1.Op != OpARM64MOVDconst {
 13418  			break
 13419  		}
 13420  		c := auxIntToInt64(v_1.AuxInt)
 13421  		x := v_2
 13422  		if !(isPowerOfTwo(c-1) && c >= 3) {
 13423  			break
 13424  		}
 13425  		v.reset(OpARM64SUB)
 13426  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13427  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 13428  		v0.AddArg2(x, x)
 13429  		v.AddArg2(a, v0)
 13430  		return true
 13431  	}
 13432  	// match: (MSUB a (MOVDconst [c]) x)
 13433  	// cond: isPowerOfTwo(c+1) && c>=7
 13434  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 13435  	for {
 13436  		a := v_0
 13437  		if v_1.Op != OpARM64MOVDconst {
 13438  			break
 13439  		}
 13440  		c := auxIntToInt64(v_1.AuxInt)
 13441  		x := v_2
 13442  		if !(isPowerOfTwo(c+1) && c >= 7) {
 13443  			break
 13444  		}
 13445  		v.reset(OpARM64ADD)
 13446  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13447  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 13448  		v0.AddArg2(x, x)
 13449  		v.AddArg2(a, v0)
 13450  		return true
 13451  	}
 13452  	// match: (MSUB a (MOVDconst [c]) x)
 13453  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 13454  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 13455  	for {
 13456  		a := v_0
 13457  		if v_1.Op != OpARM64MOVDconst {
 13458  			break
 13459  		}
 13460  		c := auxIntToInt64(v_1.AuxInt)
 13461  		x := v_2
 13462  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13463  			break
 13464  		}
 13465  		v.reset(OpARM64ADDshiftLL)
 13466  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 13467  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13468  		v0.AuxInt = int64ToAuxInt(2)
 13469  		v0.AddArg2(x, x)
 13470  		v.AddArg2(a, v0)
 13471  		return true
 13472  	}
 13473  	// match: (MSUB a (MOVDconst [c]) x)
 13474  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13475  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 13476  	for {
 13477  		a := v_0
 13478  		if v_1.Op != OpARM64MOVDconst {
 13479  			break
 13480  		}
 13481  		c := auxIntToInt64(v_1.AuxInt)
 13482  		x := v_2
 13483  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13484  			break
 13485  		}
 13486  		v.reset(OpARM64SUBshiftLL)
 13487  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 13488  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13489  		v0.AuxInt = int64ToAuxInt(2)
 13490  		v0.AddArg2(x, x)
 13491  		v.AddArg2(a, v0)
 13492  		return true
 13493  	}
 13494  	// match: (MSUB a (MOVDconst [c]) x)
 13495  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13496  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 13497  	for {
 13498  		a := v_0
 13499  		if v_1.Op != OpARM64MOVDconst {
 13500  			break
 13501  		}
 13502  		c := auxIntToInt64(v_1.AuxInt)
 13503  		x := v_2
 13504  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13505  			break
 13506  		}
 13507  		v.reset(OpARM64ADDshiftLL)
 13508  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 13509  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13510  		v0.AuxInt = int64ToAuxInt(3)
 13511  		v0.AddArg2(x, x)
 13512  		v.AddArg2(a, v0)
 13513  		return true
 13514  	}
 13515  	// match: (MSUB a (MOVDconst [c]) x)
 13516  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13517  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 13518  	for {
 13519  		a := v_0
 13520  		if v_1.Op != OpARM64MOVDconst {
 13521  			break
 13522  		}
 13523  		c := auxIntToInt64(v_1.AuxInt)
 13524  		x := v_2
 13525  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13526  			break
 13527  		}
 13528  		v.reset(OpARM64SUBshiftLL)
 13529  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 13530  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13531  		v0.AuxInt = int64ToAuxInt(3)
 13532  		v0.AddArg2(x, x)
 13533  		v.AddArg2(a, v0)
 13534  		return true
 13535  	}
 13536  	// match: (MSUB (MOVDconst [c]) x y)
 13537  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 13538  	for {
 13539  		if v_0.Op != OpARM64MOVDconst {
 13540  			break
 13541  		}
 13542  		c := auxIntToInt64(v_0.AuxInt)
 13543  		x := v_1
 13544  		y := v_2
 13545  		v.reset(OpARM64ADDconst)
 13546  		v.AuxInt = int64ToAuxInt(c)
 13547  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 13548  		v0.AddArg2(x, y)
 13549  		v.AddArg(v0)
 13550  		return true
 13551  	}
 13552  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 13553  	// result: (SUBconst [c*d] a)
 13554  	for {
 13555  		a := v_0
 13556  		if v_1.Op != OpARM64MOVDconst {
 13557  			break
 13558  		}
 13559  		c := auxIntToInt64(v_1.AuxInt)
 13560  		if v_2.Op != OpARM64MOVDconst {
 13561  			break
 13562  		}
 13563  		d := auxIntToInt64(v_2.AuxInt)
 13564  		v.reset(OpARM64SUBconst)
 13565  		v.AuxInt = int64ToAuxInt(c * d)
 13566  		v.AddArg(a)
 13567  		return true
 13568  	}
 13569  	return false
 13570  }
 13571  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 13572  	v_2 := v.Args[2]
 13573  	v_1 := v.Args[1]
 13574  	v_0 := v.Args[0]
 13575  	b := v.Block
 13576  	// match: (MSUBW a x (MOVDconst [c]))
 13577  	// cond: int32(c)==-1
 13578  	// result: (MOVWUreg (ADD <a.Type> a x))
 13579  	for {
 13580  		a := v_0
 13581  		x := v_1
 13582  		if v_2.Op != OpARM64MOVDconst {
 13583  			break
 13584  		}
 13585  		c := auxIntToInt64(v_2.AuxInt)
 13586  		if !(int32(c) == -1) {
 13587  			break
 13588  		}
 13589  		v.reset(OpARM64MOVWUreg)
 13590  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13591  		v0.AddArg2(a, x)
 13592  		v.AddArg(v0)
 13593  		return true
 13594  	}
 13595  	// match: (MSUBW a _ (MOVDconst [c]))
 13596  	// cond: int32(c)==0
 13597  	// result: (MOVWUreg a)
 13598  	for {
 13599  		a := v_0
 13600  		if v_2.Op != OpARM64MOVDconst {
 13601  			break
 13602  		}
 13603  		c := auxIntToInt64(v_2.AuxInt)
 13604  		if !(int32(c) == 0) {
 13605  			break
 13606  		}
 13607  		v.reset(OpARM64MOVWUreg)
 13608  		v.AddArg(a)
 13609  		return true
 13610  	}
 13611  	// match: (MSUBW a x (MOVDconst [c]))
 13612  	// cond: int32(c)==1
 13613  	// result: (MOVWUreg (SUB <a.Type> a x))
 13614  	for {
 13615  		a := v_0
 13616  		x := v_1
 13617  		if v_2.Op != OpARM64MOVDconst {
 13618  			break
 13619  		}
 13620  		c := auxIntToInt64(v_2.AuxInt)
 13621  		if !(int32(c) == 1) {
 13622  			break
 13623  		}
 13624  		v.reset(OpARM64MOVWUreg)
 13625  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13626  		v0.AddArg2(a, x)
 13627  		v.AddArg(v0)
 13628  		return true
 13629  	}
 13630  	// match: (MSUBW a x (MOVDconst [c]))
 13631  	// cond: isPowerOfTwo(c)
 13632  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13633  	for {
 13634  		a := v_0
 13635  		x := v_1
 13636  		if v_2.Op != OpARM64MOVDconst {
 13637  			break
 13638  		}
 13639  		c := auxIntToInt64(v_2.AuxInt)
 13640  		if !(isPowerOfTwo(c)) {
 13641  			break
 13642  		}
 13643  		v.reset(OpARM64MOVWUreg)
 13644  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13645  		v0.AuxInt = int64ToAuxInt(log64(c))
 13646  		v0.AddArg2(a, x)
 13647  		v.AddArg(v0)
 13648  		return true
 13649  	}
 13650  	// match: (MSUBW a x (MOVDconst [c]))
 13651  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13652  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13653  	for {
 13654  		a := v_0
 13655  		x := v_1
 13656  		if v_2.Op != OpARM64MOVDconst {
 13657  			break
 13658  		}
 13659  		c := auxIntToInt64(v_2.AuxInt)
 13660  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13661  			break
 13662  		}
 13663  		v.reset(OpARM64MOVWUreg)
 13664  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13665  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13666  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13667  		v1.AddArg2(x, x)
 13668  		v0.AddArg2(a, v1)
 13669  		v.AddArg(v0)
 13670  		return true
 13671  	}
 13672  	// match: (MSUBW a x (MOVDconst [c]))
 13673  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13674  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13675  	for {
 13676  		a := v_0
 13677  		x := v_1
 13678  		if v_2.Op != OpARM64MOVDconst {
 13679  			break
 13680  		}
 13681  		c := auxIntToInt64(v_2.AuxInt)
 13682  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13683  			break
 13684  		}
 13685  		v.reset(OpARM64MOVWUreg)
 13686  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13687  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13688  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13689  		v1.AddArg2(x, x)
 13690  		v0.AddArg2(a, v1)
 13691  		v.AddArg(v0)
 13692  		return true
 13693  	}
 13694  	// match: (MSUBW a x (MOVDconst [c]))
 13695  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13696  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13697  	for {
 13698  		a := v_0
 13699  		x := v_1
 13700  		if v_2.Op != OpARM64MOVDconst {
 13701  			break
 13702  		}
 13703  		c := auxIntToInt64(v_2.AuxInt)
 13704  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13705  			break
 13706  		}
 13707  		v.reset(OpARM64MOVWUreg)
 13708  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13709  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13710  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13711  		v1.AuxInt = int64ToAuxInt(2)
 13712  		v1.AddArg2(x, x)
 13713  		v0.AddArg2(a, v1)
 13714  		v.AddArg(v0)
 13715  		return true
 13716  	}
 13717  	// match: (MSUBW a x (MOVDconst [c]))
 13718  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13719  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13720  	for {
 13721  		a := v_0
 13722  		x := v_1
 13723  		if v_2.Op != OpARM64MOVDconst {
 13724  			break
 13725  		}
 13726  		c := auxIntToInt64(v_2.AuxInt)
 13727  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13728  			break
 13729  		}
 13730  		v.reset(OpARM64MOVWUreg)
 13731  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13732  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13733  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13734  		v1.AuxInt = int64ToAuxInt(2)
 13735  		v1.AddArg2(x, x)
 13736  		v0.AddArg2(a, v1)
 13737  		v.AddArg(v0)
 13738  		return true
 13739  	}
 13740  	// match: (MSUBW a x (MOVDconst [c]))
 13741  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13742  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13743  	for {
 13744  		a := v_0
 13745  		x := v_1
 13746  		if v_2.Op != OpARM64MOVDconst {
 13747  			break
 13748  		}
 13749  		c := auxIntToInt64(v_2.AuxInt)
 13750  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13751  			break
 13752  		}
 13753  		v.reset(OpARM64MOVWUreg)
 13754  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13755  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13756  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13757  		v1.AuxInt = int64ToAuxInt(3)
 13758  		v1.AddArg2(x, x)
 13759  		v0.AddArg2(a, v1)
 13760  		v.AddArg(v0)
 13761  		return true
 13762  	}
 13763  	// match: (MSUBW a x (MOVDconst [c]))
 13764  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13765  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13766  	for {
 13767  		a := v_0
 13768  		x := v_1
 13769  		if v_2.Op != OpARM64MOVDconst {
 13770  			break
 13771  		}
 13772  		c := auxIntToInt64(v_2.AuxInt)
 13773  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13774  			break
 13775  		}
 13776  		v.reset(OpARM64MOVWUreg)
 13777  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13778  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13779  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13780  		v1.AuxInt = int64ToAuxInt(3)
 13781  		v1.AddArg2(x, x)
 13782  		v0.AddArg2(a, v1)
 13783  		v.AddArg(v0)
 13784  		return true
 13785  	}
 13786  	// match: (MSUBW a (MOVDconst [c]) x)
 13787  	// cond: int32(c)==-1
 13788  	// result: (MOVWUreg (ADD <a.Type> a x))
 13789  	for {
 13790  		a := v_0
 13791  		if v_1.Op != OpARM64MOVDconst {
 13792  			break
 13793  		}
 13794  		c := auxIntToInt64(v_1.AuxInt)
 13795  		x := v_2
 13796  		if !(int32(c) == -1) {
 13797  			break
 13798  		}
 13799  		v.reset(OpARM64MOVWUreg)
 13800  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13801  		v0.AddArg2(a, x)
 13802  		v.AddArg(v0)
 13803  		return true
 13804  	}
 13805  	// match: (MSUBW a (MOVDconst [c]) _)
 13806  	// cond: int32(c)==0
 13807  	// result: (MOVWUreg a)
 13808  	for {
 13809  		a := v_0
 13810  		if v_1.Op != OpARM64MOVDconst {
 13811  			break
 13812  		}
 13813  		c := auxIntToInt64(v_1.AuxInt)
 13814  		if !(int32(c) == 0) {
 13815  			break
 13816  		}
 13817  		v.reset(OpARM64MOVWUreg)
 13818  		v.AddArg(a)
 13819  		return true
 13820  	}
 13821  	// match: (MSUBW a (MOVDconst [c]) x)
 13822  	// cond: int32(c)==1
 13823  	// result: (MOVWUreg (SUB <a.Type> a x))
 13824  	for {
 13825  		a := v_0
 13826  		if v_1.Op != OpARM64MOVDconst {
 13827  			break
 13828  		}
 13829  		c := auxIntToInt64(v_1.AuxInt)
 13830  		x := v_2
 13831  		if !(int32(c) == 1) {
 13832  			break
 13833  		}
 13834  		v.reset(OpARM64MOVWUreg)
 13835  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13836  		v0.AddArg2(a, x)
 13837  		v.AddArg(v0)
 13838  		return true
 13839  	}
 13840  	// match: (MSUBW a (MOVDconst [c]) x)
 13841  	// cond: isPowerOfTwo(c)
 13842  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13843  	for {
 13844  		a := v_0
 13845  		if v_1.Op != OpARM64MOVDconst {
 13846  			break
 13847  		}
 13848  		c := auxIntToInt64(v_1.AuxInt)
 13849  		x := v_2
 13850  		if !(isPowerOfTwo(c)) {
 13851  			break
 13852  		}
 13853  		v.reset(OpARM64MOVWUreg)
 13854  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13855  		v0.AuxInt = int64ToAuxInt(log64(c))
 13856  		v0.AddArg2(a, x)
 13857  		v.AddArg(v0)
 13858  		return true
 13859  	}
 13860  	// match: (MSUBW a (MOVDconst [c]) x)
 13861  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13862  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13863  	for {
 13864  		a := v_0
 13865  		if v_1.Op != OpARM64MOVDconst {
 13866  			break
 13867  		}
 13868  		c := auxIntToInt64(v_1.AuxInt)
 13869  		x := v_2
 13870  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13871  			break
 13872  		}
 13873  		v.reset(OpARM64MOVWUreg)
 13874  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13875  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13876  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13877  		v1.AddArg2(x, x)
 13878  		v0.AddArg2(a, v1)
 13879  		v.AddArg(v0)
 13880  		return true
 13881  	}
 13882  	// match: (MSUBW a (MOVDconst [c]) x)
 13883  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13884  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13885  	for {
 13886  		a := v_0
 13887  		if v_1.Op != OpARM64MOVDconst {
 13888  			break
 13889  		}
 13890  		c := auxIntToInt64(v_1.AuxInt)
 13891  		x := v_2
 13892  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13893  			break
 13894  		}
 13895  		v.reset(OpARM64MOVWUreg)
 13896  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13897  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13898  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13899  		v1.AddArg2(x, x)
 13900  		v0.AddArg2(a, v1)
 13901  		v.AddArg(v0)
 13902  		return true
 13903  	}
 13904  	// match: (MSUBW a (MOVDconst [c]) x)
 13905  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13906  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13907  	for {
 13908  		a := v_0
 13909  		if v_1.Op != OpARM64MOVDconst {
 13910  			break
 13911  		}
 13912  		c := auxIntToInt64(v_1.AuxInt)
 13913  		x := v_2
 13914  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13915  			break
 13916  		}
 13917  		v.reset(OpARM64MOVWUreg)
 13918  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13919  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13920  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13921  		v1.AuxInt = int64ToAuxInt(2)
 13922  		v1.AddArg2(x, x)
 13923  		v0.AddArg2(a, v1)
 13924  		v.AddArg(v0)
 13925  		return true
 13926  	}
 13927  	// match: (MSUBW a (MOVDconst [c]) x)
 13928  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13929  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13930  	for {
 13931  		a := v_0
 13932  		if v_1.Op != OpARM64MOVDconst {
 13933  			break
 13934  		}
 13935  		c := auxIntToInt64(v_1.AuxInt)
 13936  		x := v_2
 13937  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13938  			break
 13939  		}
 13940  		v.reset(OpARM64MOVWUreg)
 13941  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13942  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13943  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13944  		v1.AuxInt = int64ToAuxInt(2)
 13945  		v1.AddArg2(x, x)
 13946  		v0.AddArg2(a, v1)
 13947  		v.AddArg(v0)
 13948  		return true
 13949  	}
 13950  	// match: (MSUBW a (MOVDconst [c]) x)
 13951  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13952  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13953  	for {
 13954  		a := v_0
 13955  		if v_1.Op != OpARM64MOVDconst {
 13956  			break
 13957  		}
 13958  		c := auxIntToInt64(v_1.AuxInt)
 13959  		x := v_2
 13960  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13961  			break
 13962  		}
 13963  		v.reset(OpARM64MOVWUreg)
 13964  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13965  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13966  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13967  		v1.AuxInt = int64ToAuxInt(3)
 13968  		v1.AddArg2(x, x)
 13969  		v0.AddArg2(a, v1)
 13970  		v.AddArg(v0)
 13971  		return true
 13972  	}
 13973  	// match: (MSUBW a (MOVDconst [c]) x)
 13974  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13975  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13976  	for {
 13977  		a := v_0
 13978  		if v_1.Op != OpARM64MOVDconst {
 13979  			break
 13980  		}
 13981  		c := auxIntToInt64(v_1.AuxInt)
 13982  		x := v_2
 13983  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13984  			break
 13985  		}
 13986  		v.reset(OpARM64MOVWUreg)
 13987  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13988  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13989  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13990  		v1.AuxInt = int64ToAuxInt(3)
 13991  		v1.AddArg2(x, x)
 13992  		v0.AddArg2(a, v1)
 13993  		v.AddArg(v0)
 13994  		return true
 13995  	}
 13996  	// match: (MSUBW (MOVDconst [c]) x y)
 13997  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 13998  	for {
 13999  		if v_0.Op != OpARM64MOVDconst {
 14000  			break
 14001  		}
 14002  		c := auxIntToInt64(v_0.AuxInt)
 14003  		x := v_1
 14004  		y := v_2
 14005  		v.reset(OpARM64MOVWUreg)
 14006  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 14007  		v0.AuxInt = int64ToAuxInt(c)
 14008  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 14009  		v1.AddArg2(x, y)
 14010  		v0.AddArg(v1)
 14011  		v.AddArg(v0)
 14012  		return true
 14013  	}
 14014  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 14015  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 14016  	for {
 14017  		a := v_0
 14018  		if v_1.Op != OpARM64MOVDconst {
 14019  			break
 14020  		}
 14021  		c := auxIntToInt64(v_1.AuxInt)
 14022  		if v_2.Op != OpARM64MOVDconst {
 14023  			break
 14024  		}
 14025  		d := auxIntToInt64(v_2.AuxInt)
 14026  		v.reset(OpARM64MOVWUreg)
 14027  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 14028  		v0.AuxInt = int64ToAuxInt(c * d)
 14029  		v0.AddArg(a)
 14030  		v.AddArg(v0)
 14031  		return true
 14032  	}
 14033  	return false
 14034  }
 14035  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 14036  	v_1 := v.Args[1]
 14037  	v_0 := v.Args[0]
 14038  	b := v.Block
 14039  	config := b.Func.Config
 14040  	// match: (MUL (NEG x) y)
 14041  	// result: (MNEG x y)
 14042  	for {
 14043  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14044  			if v_0.Op != OpARM64NEG {
 14045  				continue
 14046  			}
 14047  			x := v_0.Args[0]
 14048  			y := v_1
 14049  			v.reset(OpARM64MNEG)
 14050  			v.AddArg2(x, y)
 14051  			return true
 14052  		}
 14053  		break
 14054  	}
 14055  	// match: (MUL _ (MOVDconst [0]))
 14056  	// result: (MOVDconst [0])
 14057  	for {
 14058  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14059  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 14060  				continue
 14061  			}
 14062  			v.reset(OpARM64MOVDconst)
 14063  			v.AuxInt = int64ToAuxInt(0)
 14064  			return true
 14065  		}
 14066  		break
 14067  	}
 14068  	// match: (MUL x (MOVDconst [1]))
 14069  	// result: x
 14070  	for {
 14071  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14072  			x := v_0
 14073  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 14074  				continue
 14075  			}
 14076  			v.copyOf(x)
 14077  			return true
 14078  		}
 14079  		break
 14080  	}
 14081  	// match: (MUL x (MOVDconst [c]))
 14082  	// cond: canMulStrengthReduce(config, c)
 14083  	// result: {mulStrengthReduce(v, x, c)}
 14084  	for {
 14085  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14086  			x := v_0
 14087  			if v_1.Op != OpARM64MOVDconst {
 14088  				continue
 14089  			}
 14090  			c := auxIntToInt64(v_1.AuxInt)
 14091  			if !(canMulStrengthReduce(config, c)) {
 14092  				continue
 14093  			}
 14094  			v.copyOf(mulStrengthReduce(v, x, c))
 14095  			return true
 14096  		}
 14097  		break
 14098  	}
 14099  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 14100  	// result: (MOVDconst [c*d])
 14101  	for {
 14102  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14103  			if v_0.Op != OpARM64MOVDconst {
 14104  				continue
 14105  			}
 14106  			c := auxIntToInt64(v_0.AuxInt)
 14107  			if v_1.Op != OpARM64MOVDconst {
 14108  				continue
 14109  			}
 14110  			d := auxIntToInt64(v_1.AuxInt)
 14111  			v.reset(OpARM64MOVDconst)
 14112  			v.AuxInt = int64ToAuxInt(c * d)
 14113  			return true
 14114  		}
 14115  		break
 14116  	}
 14117  	// match: (MUL r:(MOVWUreg x) s:(MOVWUreg y))
 14118  	// cond: r.Uses == 1 && s.Uses == 1
 14119  	// result: (UMULL x y)
 14120  	for {
 14121  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14122  			r := v_0
 14123  			if r.Op != OpARM64MOVWUreg {
 14124  				continue
 14125  			}
 14126  			x := r.Args[0]
 14127  			s := v_1
 14128  			if s.Op != OpARM64MOVWUreg {
 14129  				continue
 14130  			}
 14131  			y := s.Args[0]
 14132  			if !(r.Uses == 1 && s.Uses == 1) {
 14133  				continue
 14134  			}
 14135  			v.reset(OpARM64UMULL)
 14136  			v.AddArg2(x, y)
 14137  			return true
 14138  		}
 14139  		break
 14140  	}
 14141  	// match: (MUL r:(MOVWreg x) s:(MOVWreg y))
 14142  	// cond: r.Uses == 1 && s.Uses == 1
 14143  	// result: (MULL x y)
 14144  	for {
 14145  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14146  			r := v_0
 14147  			if r.Op != OpARM64MOVWreg {
 14148  				continue
 14149  			}
 14150  			x := r.Args[0]
 14151  			s := v_1
 14152  			if s.Op != OpARM64MOVWreg {
 14153  				continue
 14154  			}
 14155  			y := s.Args[0]
 14156  			if !(r.Uses == 1 && s.Uses == 1) {
 14157  				continue
 14158  			}
 14159  			v.reset(OpARM64MULL)
 14160  			v.AddArg2(x, y)
 14161  			return true
 14162  		}
 14163  		break
 14164  	}
 14165  	return false
 14166  }
 14167  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 14168  	v_1 := v.Args[1]
 14169  	v_0 := v.Args[0]
 14170  	b := v.Block
 14171  	config := b.Func.Config
 14172  	// match: (MULW (NEG x) y)
 14173  	// result: (MNEGW x y)
 14174  	for {
 14175  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14176  			if v_0.Op != OpARM64NEG {
 14177  				continue
 14178  			}
 14179  			x := v_0.Args[0]
 14180  			y := v_1
 14181  			v.reset(OpARM64MNEGW)
 14182  			v.AddArg2(x, y)
 14183  			return true
 14184  		}
 14185  		break
 14186  	}
 14187  	// match: (MULW _ (MOVDconst [c]))
 14188  	// cond: int32(c)==0
 14189  	// result: (MOVDconst [0])
 14190  	for {
 14191  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14192  			if v_1.Op != OpARM64MOVDconst {
 14193  				continue
 14194  			}
 14195  			c := auxIntToInt64(v_1.AuxInt)
 14196  			if !(int32(c) == 0) {
 14197  				continue
 14198  			}
 14199  			v.reset(OpARM64MOVDconst)
 14200  			v.AuxInt = int64ToAuxInt(0)
 14201  			return true
 14202  		}
 14203  		break
 14204  	}
 14205  	// match: (MULW x (MOVDconst [c]))
 14206  	// cond: int32(c)==1
 14207  	// result: (MOVWUreg x)
 14208  	for {
 14209  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14210  			x := v_0
 14211  			if v_1.Op != OpARM64MOVDconst {
 14212  				continue
 14213  			}
 14214  			c := auxIntToInt64(v_1.AuxInt)
 14215  			if !(int32(c) == 1) {
 14216  				continue
 14217  			}
 14218  			v.reset(OpARM64MOVWUreg)
 14219  			v.AddArg(x)
 14220  			return true
 14221  		}
 14222  		break
 14223  	}
 14224  	// match: (MULW x (MOVDconst [c]))
 14225  	// cond: v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))
 14226  	// result: {mulStrengthReduce32(v, x, int32(c))}
 14227  	for {
 14228  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14229  			x := v_0
 14230  			if v_1.Op != OpARM64MOVDconst {
 14231  				continue
 14232  			}
 14233  			c := auxIntToInt64(v_1.AuxInt)
 14234  			if !(v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))) {
 14235  				continue
 14236  			}
 14237  			v.copyOf(mulStrengthReduce32(v, x, int32(c)))
 14238  			return true
 14239  		}
 14240  		break
 14241  	}
 14242  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 14243  	// result: (MOVDconst [int64(uint32(c*d))])
 14244  	for {
 14245  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14246  			if v_0.Op != OpARM64MOVDconst {
 14247  				continue
 14248  			}
 14249  			c := auxIntToInt64(v_0.AuxInt)
 14250  			if v_1.Op != OpARM64MOVDconst {
 14251  				continue
 14252  			}
 14253  			d := auxIntToInt64(v_1.AuxInt)
 14254  			v.reset(OpARM64MOVDconst)
 14255  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 14256  			return true
 14257  		}
 14258  		break
 14259  	}
 14260  	return false
 14261  }
 14262  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 14263  	v_0 := v.Args[0]
 14264  	// match: (MVN (XOR x y))
 14265  	// result: (EON x y)
 14266  	for {
 14267  		if v_0.Op != OpARM64XOR {
 14268  			break
 14269  		}
 14270  		y := v_0.Args[1]
 14271  		x := v_0.Args[0]
 14272  		v.reset(OpARM64EON)
 14273  		v.AddArg2(x, y)
 14274  		return true
 14275  	}
 14276  	// match: (MVN (MOVDconst [c]))
 14277  	// result: (MOVDconst [^c])
 14278  	for {
 14279  		if v_0.Op != OpARM64MOVDconst {
 14280  			break
 14281  		}
 14282  		c := auxIntToInt64(v_0.AuxInt)
 14283  		v.reset(OpARM64MOVDconst)
 14284  		v.AuxInt = int64ToAuxInt(^c)
 14285  		return true
 14286  	}
 14287  	// match: (MVN x:(SLLconst [c] y))
 14288  	// cond: clobberIfDead(x)
 14289  	// result: (MVNshiftLL [c] y)
 14290  	for {
 14291  		x := v_0
 14292  		if x.Op != OpARM64SLLconst {
 14293  			break
 14294  		}
 14295  		c := auxIntToInt64(x.AuxInt)
 14296  		y := x.Args[0]
 14297  		if !(clobberIfDead(x)) {
 14298  			break
 14299  		}
 14300  		v.reset(OpARM64MVNshiftLL)
 14301  		v.AuxInt = int64ToAuxInt(c)
 14302  		v.AddArg(y)
 14303  		return true
 14304  	}
 14305  	// match: (MVN x:(SRLconst [c] y))
 14306  	// cond: clobberIfDead(x)
 14307  	// result: (MVNshiftRL [c] y)
 14308  	for {
 14309  		x := v_0
 14310  		if x.Op != OpARM64SRLconst {
 14311  			break
 14312  		}
 14313  		c := auxIntToInt64(x.AuxInt)
 14314  		y := x.Args[0]
 14315  		if !(clobberIfDead(x)) {
 14316  			break
 14317  		}
 14318  		v.reset(OpARM64MVNshiftRL)
 14319  		v.AuxInt = int64ToAuxInt(c)
 14320  		v.AddArg(y)
 14321  		return true
 14322  	}
 14323  	// match: (MVN x:(SRAconst [c] y))
 14324  	// cond: clobberIfDead(x)
 14325  	// result: (MVNshiftRA [c] y)
 14326  	for {
 14327  		x := v_0
 14328  		if x.Op != OpARM64SRAconst {
 14329  			break
 14330  		}
 14331  		c := auxIntToInt64(x.AuxInt)
 14332  		y := x.Args[0]
 14333  		if !(clobberIfDead(x)) {
 14334  			break
 14335  		}
 14336  		v.reset(OpARM64MVNshiftRA)
 14337  		v.AuxInt = int64ToAuxInt(c)
 14338  		v.AddArg(y)
 14339  		return true
 14340  	}
 14341  	// match: (MVN x:(RORconst [c] y))
 14342  	// cond: clobberIfDead(x)
 14343  	// result: (MVNshiftRO [c] y)
 14344  	for {
 14345  		x := v_0
 14346  		if x.Op != OpARM64RORconst {
 14347  			break
 14348  		}
 14349  		c := auxIntToInt64(x.AuxInt)
 14350  		y := x.Args[0]
 14351  		if !(clobberIfDead(x)) {
 14352  			break
 14353  		}
 14354  		v.reset(OpARM64MVNshiftRO)
 14355  		v.AuxInt = int64ToAuxInt(c)
 14356  		v.AddArg(y)
 14357  		return true
 14358  	}
 14359  	return false
 14360  }
 14361  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 14362  	v_0 := v.Args[0]
 14363  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 14364  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 14365  	for {
 14366  		d := auxIntToInt64(v.AuxInt)
 14367  		if v_0.Op != OpARM64MOVDconst {
 14368  			break
 14369  		}
 14370  		c := auxIntToInt64(v_0.AuxInt)
 14371  		v.reset(OpARM64MOVDconst)
 14372  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 14373  		return true
 14374  	}
 14375  	return false
 14376  }
 14377  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 14378  	v_0 := v.Args[0]
 14379  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 14380  	// result: (MOVDconst [^(c>>uint64(d))])
 14381  	for {
 14382  		d := auxIntToInt64(v.AuxInt)
 14383  		if v_0.Op != OpARM64MOVDconst {
 14384  			break
 14385  		}
 14386  		c := auxIntToInt64(v_0.AuxInt)
 14387  		v.reset(OpARM64MOVDconst)
 14388  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 14389  		return true
 14390  	}
 14391  	return false
 14392  }
 14393  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 14394  	v_0 := v.Args[0]
 14395  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 14396  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 14397  	for {
 14398  		d := auxIntToInt64(v.AuxInt)
 14399  		if v_0.Op != OpARM64MOVDconst {
 14400  			break
 14401  		}
 14402  		c := auxIntToInt64(v_0.AuxInt)
 14403  		v.reset(OpARM64MOVDconst)
 14404  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 14405  		return true
 14406  	}
 14407  	return false
 14408  }
 14409  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 14410  	v_0 := v.Args[0]
 14411  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 14412  	// result: (MOVDconst [^rotateRight64(c, d)])
 14413  	for {
 14414  		d := auxIntToInt64(v.AuxInt)
 14415  		if v_0.Op != OpARM64MOVDconst {
 14416  			break
 14417  		}
 14418  		c := auxIntToInt64(v_0.AuxInt)
 14419  		v.reset(OpARM64MOVDconst)
 14420  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 14421  		return true
 14422  	}
 14423  	return false
 14424  }
 14425  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 14426  	v_0 := v.Args[0]
 14427  	// match: (NEG (MUL x y))
 14428  	// result: (MNEG x y)
 14429  	for {
 14430  		if v_0.Op != OpARM64MUL {
 14431  			break
 14432  		}
 14433  		y := v_0.Args[1]
 14434  		x := v_0.Args[0]
 14435  		v.reset(OpARM64MNEG)
 14436  		v.AddArg2(x, y)
 14437  		return true
 14438  	}
 14439  	// match: (NEG (MULW x y))
 14440  	// cond: v.Type.Size() <= 4
 14441  	// result: (MNEGW x y)
 14442  	for {
 14443  		if v_0.Op != OpARM64MULW {
 14444  			break
 14445  		}
 14446  		y := v_0.Args[1]
 14447  		x := v_0.Args[0]
 14448  		if !(v.Type.Size() <= 4) {
 14449  			break
 14450  		}
 14451  		v.reset(OpARM64MNEGW)
 14452  		v.AddArg2(x, y)
 14453  		return true
 14454  	}
 14455  	// match: (NEG (SUB x y))
 14456  	// result: (SUB y x)
 14457  	for {
 14458  		if v_0.Op != OpARM64SUB {
 14459  			break
 14460  		}
 14461  		y := v_0.Args[1]
 14462  		x := v_0.Args[0]
 14463  		v.reset(OpARM64SUB)
 14464  		v.AddArg2(y, x)
 14465  		return true
 14466  	}
 14467  	// match: (NEG (NEG x))
 14468  	// result: x
 14469  	for {
 14470  		if v_0.Op != OpARM64NEG {
 14471  			break
 14472  		}
 14473  		x := v_0.Args[0]
 14474  		v.copyOf(x)
 14475  		return true
 14476  	}
 14477  	// match: (NEG (MOVDconst [c]))
 14478  	// result: (MOVDconst [-c])
 14479  	for {
 14480  		if v_0.Op != OpARM64MOVDconst {
 14481  			break
 14482  		}
 14483  		c := auxIntToInt64(v_0.AuxInt)
 14484  		v.reset(OpARM64MOVDconst)
 14485  		v.AuxInt = int64ToAuxInt(-c)
 14486  		return true
 14487  	}
 14488  	// match: (NEG x:(SLLconst [c] y))
 14489  	// cond: clobberIfDead(x)
 14490  	// result: (NEGshiftLL [c] y)
 14491  	for {
 14492  		x := v_0
 14493  		if x.Op != OpARM64SLLconst {
 14494  			break
 14495  		}
 14496  		c := auxIntToInt64(x.AuxInt)
 14497  		y := x.Args[0]
 14498  		if !(clobberIfDead(x)) {
 14499  			break
 14500  		}
 14501  		v.reset(OpARM64NEGshiftLL)
 14502  		v.AuxInt = int64ToAuxInt(c)
 14503  		v.AddArg(y)
 14504  		return true
 14505  	}
 14506  	// match: (NEG x:(SRLconst [c] y))
 14507  	// cond: clobberIfDead(x)
 14508  	// result: (NEGshiftRL [c] y)
 14509  	for {
 14510  		x := v_0
 14511  		if x.Op != OpARM64SRLconst {
 14512  			break
 14513  		}
 14514  		c := auxIntToInt64(x.AuxInt)
 14515  		y := x.Args[0]
 14516  		if !(clobberIfDead(x)) {
 14517  			break
 14518  		}
 14519  		v.reset(OpARM64NEGshiftRL)
 14520  		v.AuxInt = int64ToAuxInt(c)
 14521  		v.AddArg(y)
 14522  		return true
 14523  	}
 14524  	// match: (NEG x:(SRAconst [c] y))
 14525  	// cond: clobberIfDead(x)
 14526  	// result: (NEGshiftRA [c] y)
 14527  	for {
 14528  		x := v_0
 14529  		if x.Op != OpARM64SRAconst {
 14530  			break
 14531  		}
 14532  		c := auxIntToInt64(x.AuxInt)
 14533  		y := x.Args[0]
 14534  		if !(clobberIfDead(x)) {
 14535  			break
 14536  		}
 14537  		v.reset(OpARM64NEGshiftRA)
 14538  		v.AuxInt = int64ToAuxInt(c)
 14539  		v.AddArg(y)
 14540  		return true
 14541  	}
 14542  	return false
 14543  }
 14544  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 14545  	v_0 := v.Args[0]
 14546  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 14547  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 14548  	for {
 14549  		d := auxIntToInt64(v.AuxInt)
 14550  		if v_0.Op != OpARM64MOVDconst {
 14551  			break
 14552  		}
 14553  		c := auxIntToInt64(v_0.AuxInt)
 14554  		v.reset(OpARM64MOVDconst)
 14555  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 14556  		return true
 14557  	}
 14558  	return false
 14559  }
 14560  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 14561  	v_0 := v.Args[0]
 14562  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 14563  	// result: (MOVDconst [-(c>>uint64(d))])
 14564  	for {
 14565  		d := auxIntToInt64(v.AuxInt)
 14566  		if v_0.Op != OpARM64MOVDconst {
 14567  			break
 14568  		}
 14569  		c := auxIntToInt64(v_0.AuxInt)
 14570  		v.reset(OpARM64MOVDconst)
 14571  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 14572  		return true
 14573  	}
 14574  	return false
 14575  }
 14576  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 14577  	v_0 := v.Args[0]
 14578  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 14579  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 14580  	for {
 14581  		d := auxIntToInt64(v.AuxInt)
 14582  		if v_0.Op != OpARM64MOVDconst {
 14583  			break
 14584  		}
 14585  		c := auxIntToInt64(v_0.AuxInt)
 14586  		v.reset(OpARM64MOVDconst)
 14587  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 14588  		return true
 14589  	}
 14590  	return false
 14591  }
 14592  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 14593  	v_0 := v.Args[0]
 14594  	b := v.Block
 14595  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 14596  	// cond: z.Uses == 1
 14597  	// result: (NotEqual (TST x y))
 14598  	for {
 14599  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14600  			break
 14601  		}
 14602  		z := v_0.Args[0]
 14603  		if z.Op != OpARM64AND {
 14604  			break
 14605  		}
 14606  		y := z.Args[1]
 14607  		x := z.Args[0]
 14608  		if !(z.Uses == 1) {
 14609  			break
 14610  		}
 14611  		v.reset(OpARM64NotEqual)
 14612  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 14613  		v0.AddArg2(x, y)
 14614  		v.AddArg(v0)
 14615  		return true
 14616  	}
 14617  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 14618  	// cond: x.Uses == 1
 14619  	// result: (NotEqual (TSTWconst [int32(c)] y))
 14620  	for {
 14621  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14622  			break
 14623  		}
 14624  		x := v_0.Args[0]
 14625  		if x.Op != OpARM64ANDconst {
 14626  			break
 14627  		}
 14628  		c := auxIntToInt64(x.AuxInt)
 14629  		y := x.Args[0]
 14630  		if !(x.Uses == 1) {
 14631  			break
 14632  		}
 14633  		v.reset(OpARM64NotEqual)
 14634  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 14635  		v0.AuxInt = int32ToAuxInt(int32(c))
 14636  		v0.AddArg(y)
 14637  		v.AddArg(v0)
 14638  		return true
 14639  	}
 14640  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 14641  	// cond: z.Uses == 1
 14642  	// result: (NotEqual (TSTW x y))
 14643  	for {
 14644  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14645  			break
 14646  		}
 14647  		z := v_0.Args[0]
 14648  		if z.Op != OpARM64AND {
 14649  			break
 14650  		}
 14651  		y := z.Args[1]
 14652  		x := z.Args[0]
 14653  		if !(z.Uses == 1) {
 14654  			break
 14655  		}
 14656  		v.reset(OpARM64NotEqual)
 14657  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 14658  		v0.AddArg2(x, y)
 14659  		v.AddArg(v0)
 14660  		return true
 14661  	}
 14662  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 14663  	// cond: x.Uses == 1
 14664  	// result: (NotEqual (TSTconst [c] y))
 14665  	for {
 14666  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14667  			break
 14668  		}
 14669  		x := v_0.Args[0]
 14670  		if x.Op != OpARM64ANDconst {
 14671  			break
 14672  		}
 14673  		c := auxIntToInt64(x.AuxInt)
 14674  		y := x.Args[0]
 14675  		if !(x.Uses == 1) {
 14676  			break
 14677  		}
 14678  		v.reset(OpARM64NotEqual)
 14679  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 14680  		v0.AuxInt = int64ToAuxInt(c)
 14681  		v0.AddArg(y)
 14682  		v.AddArg(v0)
 14683  		return true
 14684  	}
 14685  	// match: (NotEqual (CMP x z:(NEG y)))
 14686  	// cond: z.Uses == 1
 14687  	// result: (NotEqual (CMN x y))
 14688  	for {
 14689  		if v_0.Op != OpARM64CMP {
 14690  			break
 14691  		}
 14692  		_ = v_0.Args[1]
 14693  		x := v_0.Args[0]
 14694  		z := v_0.Args[1]
 14695  		if z.Op != OpARM64NEG {
 14696  			break
 14697  		}
 14698  		y := z.Args[0]
 14699  		if !(z.Uses == 1) {
 14700  			break
 14701  		}
 14702  		v.reset(OpARM64NotEqual)
 14703  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14704  		v0.AddArg2(x, y)
 14705  		v.AddArg(v0)
 14706  		return true
 14707  	}
 14708  	// match: (NotEqual (CMPW x z:(NEG y)))
 14709  	// cond: z.Uses == 1
 14710  	// result: (NotEqual (CMNW x y))
 14711  	for {
 14712  		if v_0.Op != OpARM64CMPW {
 14713  			break
 14714  		}
 14715  		_ = v_0.Args[1]
 14716  		x := v_0.Args[0]
 14717  		z := v_0.Args[1]
 14718  		if z.Op != OpARM64NEG {
 14719  			break
 14720  		}
 14721  		y := z.Args[0]
 14722  		if !(z.Uses == 1) {
 14723  			break
 14724  		}
 14725  		v.reset(OpARM64NotEqual)
 14726  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14727  		v0.AddArg2(x, y)
 14728  		v.AddArg(v0)
 14729  		return true
 14730  	}
 14731  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 14732  	// cond: x.Uses == 1
 14733  	// result: (NotEqual (CMNconst [c] y))
 14734  	for {
 14735  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14736  			break
 14737  		}
 14738  		x := v_0.Args[0]
 14739  		if x.Op != OpARM64ADDconst {
 14740  			break
 14741  		}
 14742  		c := auxIntToInt64(x.AuxInt)
 14743  		y := x.Args[0]
 14744  		if !(x.Uses == 1) {
 14745  			break
 14746  		}
 14747  		v.reset(OpARM64NotEqual)
 14748  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 14749  		v0.AuxInt = int64ToAuxInt(c)
 14750  		v0.AddArg(y)
 14751  		v.AddArg(v0)
 14752  		return true
 14753  	}
 14754  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 14755  	// cond: x.Uses == 1
 14756  	// result: (NotEqual (CMNWconst [int32(c)] y))
 14757  	for {
 14758  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14759  			break
 14760  		}
 14761  		x := v_0.Args[0]
 14762  		if x.Op != OpARM64ADDconst {
 14763  			break
 14764  		}
 14765  		c := auxIntToInt64(x.AuxInt)
 14766  		y := x.Args[0]
 14767  		if !(x.Uses == 1) {
 14768  			break
 14769  		}
 14770  		v.reset(OpARM64NotEqual)
 14771  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 14772  		v0.AuxInt = int32ToAuxInt(int32(c))
 14773  		v0.AddArg(y)
 14774  		v.AddArg(v0)
 14775  		return true
 14776  	}
 14777  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 14778  	// cond: z.Uses == 1
 14779  	// result: (NotEqual (CMN x y))
 14780  	for {
 14781  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14782  			break
 14783  		}
 14784  		z := v_0.Args[0]
 14785  		if z.Op != OpARM64ADD {
 14786  			break
 14787  		}
 14788  		y := z.Args[1]
 14789  		x := z.Args[0]
 14790  		if !(z.Uses == 1) {
 14791  			break
 14792  		}
 14793  		v.reset(OpARM64NotEqual)
 14794  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14795  		v0.AddArg2(x, y)
 14796  		v.AddArg(v0)
 14797  		return true
 14798  	}
 14799  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 14800  	// cond: z.Uses == 1
 14801  	// result: (NotEqual (CMNW x y))
 14802  	for {
 14803  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14804  			break
 14805  		}
 14806  		z := v_0.Args[0]
 14807  		if z.Op != OpARM64ADD {
 14808  			break
 14809  		}
 14810  		y := z.Args[1]
 14811  		x := z.Args[0]
 14812  		if !(z.Uses == 1) {
 14813  			break
 14814  		}
 14815  		v.reset(OpARM64NotEqual)
 14816  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14817  		v0.AddArg2(x, y)
 14818  		v.AddArg(v0)
 14819  		return true
 14820  	}
 14821  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 14822  	// cond: z.Uses == 1
 14823  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 14824  	for {
 14825  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14826  			break
 14827  		}
 14828  		z := v_0.Args[0]
 14829  		if z.Op != OpARM64MADD {
 14830  			break
 14831  		}
 14832  		y := z.Args[2]
 14833  		a := z.Args[0]
 14834  		x := z.Args[1]
 14835  		if !(z.Uses == 1) {
 14836  			break
 14837  		}
 14838  		v.reset(OpARM64NotEqual)
 14839  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14840  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14841  		v1.AddArg2(x, y)
 14842  		v0.AddArg2(a, v1)
 14843  		v.AddArg(v0)
 14844  		return true
 14845  	}
 14846  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 14847  	// cond: z.Uses == 1
 14848  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 14849  	for {
 14850  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14851  			break
 14852  		}
 14853  		z := v_0.Args[0]
 14854  		if z.Op != OpARM64MSUB {
 14855  			break
 14856  		}
 14857  		y := z.Args[2]
 14858  		a := z.Args[0]
 14859  		x := z.Args[1]
 14860  		if !(z.Uses == 1) {
 14861  			break
 14862  		}
 14863  		v.reset(OpARM64NotEqual)
 14864  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 14865  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14866  		v1.AddArg2(x, y)
 14867  		v0.AddArg2(a, v1)
 14868  		v.AddArg(v0)
 14869  		return true
 14870  	}
 14871  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 14872  	// cond: z.Uses == 1
 14873  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 14874  	for {
 14875  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14876  			break
 14877  		}
 14878  		z := v_0.Args[0]
 14879  		if z.Op != OpARM64MADDW {
 14880  			break
 14881  		}
 14882  		y := z.Args[2]
 14883  		a := z.Args[0]
 14884  		x := z.Args[1]
 14885  		if !(z.Uses == 1) {
 14886  			break
 14887  		}
 14888  		v.reset(OpARM64NotEqual)
 14889  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14890  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14891  		v1.AddArg2(x, y)
 14892  		v0.AddArg2(a, v1)
 14893  		v.AddArg(v0)
 14894  		return true
 14895  	}
 14896  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 14897  	// cond: z.Uses == 1
 14898  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 14899  	for {
 14900  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14901  			break
 14902  		}
 14903  		z := v_0.Args[0]
 14904  		if z.Op != OpARM64MSUBW {
 14905  			break
 14906  		}
 14907  		y := z.Args[2]
 14908  		a := z.Args[0]
 14909  		x := z.Args[1]
 14910  		if !(z.Uses == 1) {
 14911  			break
 14912  		}
 14913  		v.reset(OpARM64NotEqual)
 14914  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 14915  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14916  		v1.AddArg2(x, y)
 14917  		v0.AddArg2(a, v1)
 14918  		v.AddArg(v0)
 14919  		return true
 14920  	}
 14921  	// match: (NotEqual (FlagConstant [fc]))
 14922  	// result: (MOVDconst [b2i(fc.ne())])
 14923  	for {
 14924  		if v_0.Op != OpARM64FlagConstant {
 14925  			break
 14926  		}
 14927  		fc := auxIntToFlagConstant(v_0.AuxInt)
 14928  		v.reset(OpARM64MOVDconst)
 14929  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 14930  		return true
 14931  	}
 14932  	// match: (NotEqual (InvertFlags x))
 14933  	// result: (NotEqual x)
 14934  	for {
 14935  		if v_0.Op != OpARM64InvertFlags {
 14936  			break
 14937  		}
 14938  		x := v_0.Args[0]
 14939  		v.reset(OpARM64NotEqual)
 14940  		v.AddArg(x)
 14941  		return true
 14942  	}
 14943  	return false
 14944  }
 14945  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 14946  	v_1 := v.Args[1]
 14947  	v_0 := v.Args[0]
 14948  	// match: (OR x (MOVDconst [c]))
 14949  	// result: (ORconst [c] x)
 14950  	for {
 14951  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14952  			x := v_0
 14953  			if v_1.Op != OpARM64MOVDconst {
 14954  				continue
 14955  			}
 14956  			c := auxIntToInt64(v_1.AuxInt)
 14957  			v.reset(OpARM64ORconst)
 14958  			v.AuxInt = int64ToAuxInt(c)
 14959  			v.AddArg(x)
 14960  			return true
 14961  		}
 14962  		break
 14963  	}
 14964  	// match: (OR x x)
 14965  	// result: x
 14966  	for {
 14967  		x := v_0
 14968  		if x != v_1 {
 14969  			break
 14970  		}
 14971  		v.copyOf(x)
 14972  		return true
 14973  	}
 14974  	// match: (OR x (MVN y))
 14975  	// result: (ORN x y)
 14976  	for {
 14977  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14978  			x := v_0
 14979  			if v_1.Op != OpARM64MVN {
 14980  				continue
 14981  			}
 14982  			y := v_1.Args[0]
 14983  			v.reset(OpARM64ORN)
 14984  			v.AddArg2(x, y)
 14985  			return true
 14986  		}
 14987  		break
 14988  	}
 14989  	// match: (OR x0 x1:(SLLconst [c] y))
 14990  	// cond: clobberIfDead(x1)
 14991  	// result: (ORshiftLL x0 y [c])
 14992  	for {
 14993  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14994  			x0 := v_0
 14995  			x1 := v_1
 14996  			if x1.Op != OpARM64SLLconst {
 14997  				continue
 14998  			}
 14999  			c := auxIntToInt64(x1.AuxInt)
 15000  			y := x1.Args[0]
 15001  			if !(clobberIfDead(x1)) {
 15002  				continue
 15003  			}
 15004  			v.reset(OpARM64ORshiftLL)
 15005  			v.AuxInt = int64ToAuxInt(c)
 15006  			v.AddArg2(x0, y)
 15007  			return true
 15008  		}
 15009  		break
 15010  	}
 15011  	// match: (OR x0 x1:(SRLconst [c] y))
 15012  	// cond: clobberIfDead(x1)
 15013  	// result: (ORshiftRL x0 y [c])
 15014  	for {
 15015  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15016  			x0 := v_0
 15017  			x1 := v_1
 15018  			if x1.Op != OpARM64SRLconst {
 15019  				continue
 15020  			}
 15021  			c := auxIntToInt64(x1.AuxInt)
 15022  			y := x1.Args[0]
 15023  			if !(clobberIfDead(x1)) {
 15024  				continue
 15025  			}
 15026  			v.reset(OpARM64ORshiftRL)
 15027  			v.AuxInt = int64ToAuxInt(c)
 15028  			v.AddArg2(x0, y)
 15029  			return true
 15030  		}
 15031  		break
 15032  	}
 15033  	// match: (OR x0 x1:(SRAconst [c] y))
 15034  	// cond: clobberIfDead(x1)
 15035  	// result: (ORshiftRA x0 y [c])
 15036  	for {
 15037  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15038  			x0 := v_0
 15039  			x1 := v_1
 15040  			if x1.Op != OpARM64SRAconst {
 15041  				continue
 15042  			}
 15043  			c := auxIntToInt64(x1.AuxInt)
 15044  			y := x1.Args[0]
 15045  			if !(clobberIfDead(x1)) {
 15046  				continue
 15047  			}
 15048  			v.reset(OpARM64ORshiftRA)
 15049  			v.AuxInt = int64ToAuxInt(c)
 15050  			v.AddArg2(x0, y)
 15051  			return true
 15052  		}
 15053  		break
 15054  	}
 15055  	// match: (OR x0 x1:(RORconst [c] y))
 15056  	// cond: clobberIfDead(x1)
 15057  	// result: (ORshiftRO x0 y [c])
 15058  	for {
 15059  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15060  			x0 := v_0
 15061  			x1 := v_1
 15062  			if x1.Op != OpARM64RORconst {
 15063  				continue
 15064  			}
 15065  			c := auxIntToInt64(x1.AuxInt)
 15066  			y := x1.Args[0]
 15067  			if !(clobberIfDead(x1)) {
 15068  				continue
 15069  			}
 15070  			v.reset(OpARM64ORshiftRO)
 15071  			v.AuxInt = int64ToAuxInt(c)
 15072  			v.AddArg2(x0, y)
 15073  			return true
 15074  		}
 15075  		break
 15076  	}
 15077  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 15078  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 15079  	// result: (BFI [bfc] y x)
 15080  	for {
 15081  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15082  			if v_0.Op != OpARM64UBFIZ {
 15083  				continue
 15084  			}
 15085  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 15086  			x := v_0.Args[0]
 15087  			if v_1.Op != OpARM64ANDconst {
 15088  				continue
 15089  			}
 15090  			ac := auxIntToInt64(v_1.AuxInt)
 15091  			y := v_1.Args[0]
 15092  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 15093  				continue
 15094  			}
 15095  			v.reset(OpARM64BFI)
 15096  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15097  			v.AddArg2(y, x)
 15098  			return true
 15099  		}
 15100  		break
 15101  	}
 15102  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 15103  	// cond: ac == ^(1<<uint(bfc.width())-1)
 15104  	// result: (BFXIL [bfc] y x)
 15105  	for {
 15106  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15107  			if v_0.Op != OpARM64UBFX {
 15108  				continue
 15109  			}
 15110  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 15111  			x := v_0.Args[0]
 15112  			if v_1.Op != OpARM64ANDconst {
 15113  				continue
 15114  			}
 15115  			ac := auxIntToInt64(v_1.AuxInt)
 15116  			y := v_1.Args[0]
 15117  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 15118  				continue
 15119  			}
 15120  			v.reset(OpARM64BFXIL)
 15121  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15122  			v.AddArg2(y, x)
 15123  			return true
 15124  		}
 15125  		break
 15126  	}
 15127  	return false
 15128  }
 15129  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 15130  	v_1 := v.Args[1]
 15131  	v_0 := v.Args[0]
 15132  	// match: (ORN x (MOVDconst [c]))
 15133  	// result: (ORconst [^c] x)
 15134  	for {
 15135  		x := v_0
 15136  		if v_1.Op != OpARM64MOVDconst {
 15137  			break
 15138  		}
 15139  		c := auxIntToInt64(v_1.AuxInt)
 15140  		v.reset(OpARM64ORconst)
 15141  		v.AuxInt = int64ToAuxInt(^c)
 15142  		v.AddArg(x)
 15143  		return true
 15144  	}
 15145  	// match: (ORN x x)
 15146  	// result: (MOVDconst [-1])
 15147  	for {
 15148  		x := v_0
 15149  		if x != v_1 {
 15150  			break
 15151  		}
 15152  		v.reset(OpARM64MOVDconst)
 15153  		v.AuxInt = int64ToAuxInt(-1)
 15154  		return true
 15155  	}
 15156  	// match: (ORN x0 x1:(SLLconst [c] y))
 15157  	// cond: clobberIfDead(x1)
 15158  	// result: (ORNshiftLL x0 y [c])
 15159  	for {
 15160  		x0 := v_0
 15161  		x1 := v_1
 15162  		if x1.Op != OpARM64SLLconst {
 15163  			break
 15164  		}
 15165  		c := auxIntToInt64(x1.AuxInt)
 15166  		y := x1.Args[0]
 15167  		if !(clobberIfDead(x1)) {
 15168  			break
 15169  		}
 15170  		v.reset(OpARM64ORNshiftLL)
 15171  		v.AuxInt = int64ToAuxInt(c)
 15172  		v.AddArg2(x0, y)
 15173  		return true
 15174  	}
 15175  	// match: (ORN x0 x1:(SRLconst [c] y))
 15176  	// cond: clobberIfDead(x1)
 15177  	// result: (ORNshiftRL x0 y [c])
 15178  	for {
 15179  		x0 := v_0
 15180  		x1 := v_1
 15181  		if x1.Op != OpARM64SRLconst {
 15182  			break
 15183  		}
 15184  		c := auxIntToInt64(x1.AuxInt)
 15185  		y := x1.Args[0]
 15186  		if !(clobberIfDead(x1)) {
 15187  			break
 15188  		}
 15189  		v.reset(OpARM64ORNshiftRL)
 15190  		v.AuxInt = int64ToAuxInt(c)
 15191  		v.AddArg2(x0, y)
 15192  		return true
 15193  	}
 15194  	// match: (ORN x0 x1:(SRAconst [c] y))
 15195  	// cond: clobberIfDead(x1)
 15196  	// result: (ORNshiftRA x0 y [c])
 15197  	for {
 15198  		x0 := v_0
 15199  		x1 := v_1
 15200  		if x1.Op != OpARM64SRAconst {
 15201  			break
 15202  		}
 15203  		c := auxIntToInt64(x1.AuxInt)
 15204  		y := x1.Args[0]
 15205  		if !(clobberIfDead(x1)) {
 15206  			break
 15207  		}
 15208  		v.reset(OpARM64ORNshiftRA)
 15209  		v.AuxInt = int64ToAuxInt(c)
 15210  		v.AddArg2(x0, y)
 15211  		return true
 15212  	}
 15213  	// match: (ORN x0 x1:(RORconst [c] y))
 15214  	// cond: clobberIfDead(x1)
 15215  	// result: (ORNshiftRO x0 y [c])
 15216  	for {
 15217  		x0 := v_0
 15218  		x1 := v_1
 15219  		if x1.Op != OpARM64RORconst {
 15220  			break
 15221  		}
 15222  		c := auxIntToInt64(x1.AuxInt)
 15223  		y := x1.Args[0]
 15224  		if !(clobberIfDead(x1)) {
 15225  			break
 15226  		}
 15227  		v.reset(OpARM64ORNshiftRO)
 15228  		v.AuxInt = int64ToAuxInt(c)
 15229  		v.AddArg2(x0, y)
 15230  		return true
 15231  	}
 15232  	return false
 15233  }
 15234  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 15235  	v_1 := v.Args[1]
 15236  	v_0 := v.Args[0]
 15237  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 15238  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 15239  	for {
 15240  		d := auxIntToInt64(v.AuxInt)
 15241  		x := v_0
 15242  		if v_1.Op != OpARM64MOVDconst {
 15243  			break
 15244  		}
 15245  		c := auxIntToInt64(v_1.AuxInt)
 15246  		v.reset(OpARM64ORconst)
 15247  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 15248  		v.AddArg(x)
 15249  		return true
 15250  	}
 15251  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 15252  	// result: (MOVDconst [-1])
 15253  	for {
 15254  		c := auxIntToInt64(v.AuxInt)
 15255  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15256  			break
 15257  		}
 15258  		x := v_0.Args[0]
 15259  		if x != v_1 {
 15260  			break
 15261  		}
 15262  		v.reset(OpARM64MOVDconst)
 15263  		v.AuxInt = int64ToAuxInt(-1)
 15264  		return true
 15265  	}
 15266  	return false
 15267  }
 15268  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 15269  	v_1 := v.Args[1]
 15270  	v_0 := v.Args[0]
 15271  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 15272  	// result: (ORconst x [^(c>>uint64(d))])
 15273  	for {
 15274  		d := auxIntToInt64(v.AuxInt)
 15275  		x := v_0
 15276  		if v_1.Op != OpARM64MOVDconst {
 15277  			break
 15278  		}
 15279  		c := auxIntToInt64(v_1.AuxInt)
 15280  		v.reset(OpARM64ORconst)
 15281  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 15282  		v.AddArg(x)
 15283  		return true
 15284  	}
 15285  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 15286  	// result: (MOVDconst [-1])
 15287  	for {
 15288  		c := auxIntToInt64(v.AuxInt)
 15289  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15290  			break
 15291  		}
 15292  		x := v_0.Args[0]
 15293  		if x != v_1 {
 15294  			break
 15295  		}
 15296  		v.reset(OpARM64MOVDconst)
 15297  		v.AuxInt = int64ToAuxInt(-1)
 15298  		return true
 15299  	}
 15300  	return false
 15301  }
 15302  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 15303  	v_1 := v.Args[1]
 15304  	v_0 := v.Args[0]
 15305  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 15306  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 15307  	for {
 15308  		d := auxIntToInt64(v.AuxInt)
 15309  		x := v_0
 15310  		if v_1.Op != OpARM64MOVDconst {
 15311  			break
 15312  		}
 15313  		c := auxIntToInt64(v_1.AuxInt)
 15314  		v.reset(OpARM64ORconst)
 15315  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 15316  		v.AddArg(x)
 15317  		return true
 15318  	}
 15319  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 15320  	// result: (MOVDconst [-1])
 15321  	for {
 15322  		c := auxIntToInt64(v.AuxInt)
 15323  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15324  			break
 15325  		}
 15326  		x := v_0.Args[0]
 15327  		if x != v_1 {
 15328  			break
 15329  		}
 15330  		v.reset(OpARM64MOVDconst)
 15331  		v.AuxInt = int64ToAuxInt(-1)
 15332  		return true
 15333  	}
 15334  	return false
 15335  }
 15336  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 15337  	v_1 := v.Args[1]
 15338  	v_0 := v.Args[0]
 15339  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 15340  	// result: (ORconst x [^rotateRight64(c, d)])
 15341  	for {
 15342  		d := auxIntToInt64(v.AuxInt)
 15343  		x := v_0
 15344  		if v_1.Op != OpARM64MOVDconst {
 15345  			break
 15346  		}
 15347  		c := auxIntToInt64(v_1.AuxInt)
 15348  		v.reset(OpARM64ORconst)
 15349  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 15350  		v.AddArg(x)
 15351  		return true
 15352  	}
 15353  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 15354  	// result: (MOVDconst [-1])
 15355  	for {
 15356  		c := auxIntToInt64(v.AuxInt)
 15357  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 15358  			break
 15359  		}
 15360  		x := v_0.Args[0]
 15361  		if x != v_1 {
 15362  			break
 15363  		}
 15364  		v.reset(OpARM64MOVDconst)
 15365  		v.AuxInt = int64ToAuxInt(-1)
 15366  		return true
 15367  	}
 15368  	return false
 15369  }
 15370  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 15371  	v_0 := v.Args[0]
 15372  	// match: (ORconst [0] x)
 15373  	// result: x
 15374  	for {
 15375  		if auxIntToInt64(v.AuxInt) != 0 {
 15376  			break
 15377  		}
 15378  		x := v_0
 15379  		v.copyOf(x)
 15380  		return true
 15381  	}
 15382  	// match: (ORconst [-1] _)
 15383  	// result: (MOVDconst [-1])
 15384  	for {
 15385  		if auxIntToInt64(v.AuxInt) != -1 {
 15386  			break
 15387  		}
 15388  		v.reset(OpARM64MOVDconst)
 15389  		v.AuxInt = int64ToAuxInt(-1)
 15390  		return true
 15391  	}
 15392  	// match: (ORconst [c] (MOVDconst [d]))
 15393  	// result: (MOVDconst [c|d])
 15394  	for {
 15395  		c := auxIntToInt64(v.AuxInt)
 15396  		if v_0.Op != OpARM64MOVDconst {
 15397  			break
 15398  		}
 15399  		d := auxIntToInt64(v_0.AuxInt)
 15400  		v.reset(OpARM64MOVDconst)
 15401  		v.AuxInt = int64ToAuxInt(c | d)
 15402  		return true
 15403  	}
 15404  	// match: (ORconst [c] (ORconst [d] x))
 15405  	// result: (ORconst [c|d] x)
 15406  	for {
 15407  		c := auxIntToInt64(v.AuxInt)
 15408  		if v_0.Op != OpARM64ORconst {
 15409  			break
 15410  		}
 15411  		d := auxIntToInt64(v_0.AuxInt)
 15412  		x := v_0.Args[0]
 15413  		v.reset(OpARM64ORconst)
 15414  		v.AuxInt = int64ToAuxInt(c | d)
 15415  		v.AddArg(x)
 15416  		return true
 15417  	}
 15418  	// match: (ORconst [c1] (ANDconst [c2] x))
 15419  	// cond: c2|c1 == ^0
 15420  	// result: (ORconst [c1] x)
 15421  	for {
 15422  		c1 := auxIntToInt64(v.AuxInt)
 15423  		if v_0.Op != OpARM64ANDconst {
 15424  			break
 15425  		}
 15426  		c2 := auxIntToInt64(v_0.AuxInt)
 15427  		x := v_0.Args[0]
 15428  		if !(c2|c1 == ^0) {
 15429  			break
 15430  		}
 15431  		v.reset(OpARM64ORconst)
 15432  		v.AuxInt = int64ToAuxInt(c1)
 15433  		v.AddArg(x)
 15434  		return true
 15435  	}
 15436  	return false
 15437  }
 15438  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 15439  	v_1 := v.Args[1]
 15440  	v_0 := v.Args[0]
 15441  	b := v.Block
 15442  	typ := &b.Func.Config.Types
 15443  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 15444  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 15445  	for {
 15446  		d := auxIntToInt64(v.AuxInt)
 15447  		if v_0.Op != OpARM64MOVDconst {
 15448  			break
 15449  		}
 15450  		c := auxIntToInt64(v_0.AuxInt)
 15451  		x := v_1
 15452  		v.reset(OpARM64ORconst)
 15453  		v.AuxInt = int64ToAuxInt(c)
 15454  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 15455  		v0.AuxInt = int64ToAuxInt(d)
 15456  		v0.AddArg(x)
 15457  		v.AddArg(v0)
 15458  		return true
 15459  	}
 15460  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 15461  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 15462  	for {
 15463  		d := auxIntToInt64(v.AuxInt)
 15464  		x := v_0
 15465  		if v_1.Op != OpARM64MOVDconst {
 15466  			break
 15467  		}
 15468  		c := auxIntToInt64(v_1.AuxInt)
 15469  		v.reset(OpARM64ORconst)
 15470  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15471  		v.AddArg(x)
 15472  		return true
 15473  	}
 15474  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 15475  	// result: y
 15476  	for {
 15477  		c := auxIntToInt64(v.AuxInt)
 15478  		y := v_0
 15479  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 15480  			break
 15481  		}
 15482  		x := y.Args[0]
 15483  		if x != v_1 {
 15484  			break
 15485  		}
 15486  		v.copyOf(y)
 15487  		return true
 15488  	}
 15489  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 15490  	// result: (REV16W x)
 15491  	for {
 15492  		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) {
 15493  			break
 15494  		}
 15495  		x := v_0.Args[0]
 15496  		if x != v_1 {
 15497  			break
 15498  		}
 15499  		v.reset(OpARM64REV16W)
 15500  		v.AddArg(x)
 15501  		return true
 15502  	}
 15503  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 15504  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 15505  	// result: (REV16W x)
 15506  	for {
 15507  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 15508  			break
 15509  		}
 15510  		v_0_0 := v_0.Args[0]
 15511  		if v_0_0.Op != OpARM64ANDconst {
 15512  			break
 15513  		}
 15514  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15515  		x := v_0_0.Args[0]
 15516  		if v_1.Op != OpARM64ANDconst {
 15517  			break
 15518  		}
 15519  		c2 := auxIntToInt64(v_1.AuxInt)
 15520  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 15521  			break
 15522  		}
 15523  		v.reset(OpARM64REV16W)
 15524  		v.AddArg(x)
 15525  		return true
 15526  	}
 15527  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15528  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 15529  	// result: (REV16 x)
 15530  	for {
 15531  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15532  			break
 15533  		}
 15534  		v_0_0 := v_0.Args[0]
 15535  		if v_0_0.Op != OpARM64ANDconst {
 15536  			break
 15537  		}
 15538  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15539  		x := v_0_0.Args[0]
 15540  		if v_1.Op != OpARM64ANDconst {
 15541  			break
 15542  		}
 15543  		c2 := auxIntToInt64(v_1.AuxInt)
 15544  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 15545  			break
 15546  		}
 15547  		v.reset(OpARM64REV16)
 15548  		v.AddArg(x)
 15549  		return true
 15550  	}
 15551  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15552  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 15553  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 15554  	for {
 15555  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15556  			break
 15557  		}
 15558  		v_0_0 := v_0.Args[0]
 15559  		if v_0_0.Op != OpARM64ANDconst {
 15560  			break
 15561  		}
 15562  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15563  		x := v_0_0.Args[0]
 15564  		if v_1.Op != OpARM64ANDconst {
 15565  			break
 15566  		}
 15567  		c2 := auxIntToInt64(v_1.AuxInt)
 15568  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 15569  			break
 15570  		}
 15571  		v.reset(OpARM64REV16)
 15572  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 15573  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 15574  		v0.AddArg(x)
 15575  		v.AddArg(v0)
 15576  		return true
 15577  	}
 15578  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 15579  	// result: (EXTRconst [64-c] x2 x)
 15580  	for {
 15581  		c := auxIntToInt64(v.AuxInt)
 15582  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 15583  			break
 15584  		}
 15585  		x := v_0.Args[0]
 15586  		x2 := v_1
 15587  		v.reset(OpARM64EXTRconst)
 15588  		v.AuxInt = int64ToAuxInt(64 - c)
 15589  		v.AddArg2(x2, x)
 15590  		return true
 15591  	}
 15592  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 15593  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 15594  	// result: (EXTRWconst [32-c] x2 x)
 15595  	for {
 15596  		t := v.Type
 15597  		c := auxIntToInt64(v.AuxInt)
 15598  		if v_0.Op != OpARM64UBFX {
 15599  			break
 15600  		}
 15601  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15602  		x := v_0.Args[0]
 15603  		x2 := v_1
 15604  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 15605  			break
 15606  		}
 15607  		v.reset(OpARM64EXTRWconst)
 15608  		v.AuxInt = int64ToAuxInt(32 - c)
 15609  		v.AddArg2(x2, x)
 15610  		return true
 15611  	}
 15612  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 15613  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 15614  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 15615  	for {
 15616  		s := auxIntToInt64(v.AuxInt)
 15617  		if v_0.Op != OpARM64ANDconst {
 15618  			break
 15619  		}
 15620  		xc := auxIntToInt64(v_0.AuxInt)
 15621  		x := v_0.Args[0]
 15622  		if v_1.Op != OpARM64ANDconst {
 15623  			break
 15624  		}
 15625  		yc := auxIntToInt64(v_1.AuxInt)
 15626  		y := v_1.Args[0]
 15627  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 15628  			break
 15629  		}
 15630  		v.reset(OpARM64BFI)
 15631  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 15632  		v.AddArg2(x, y)
 15633  		return true
 15634  	}
 15635  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 15636  	// cond: sc == bfc.width()
 15637  	// result: (BFXIL [bfc] y x)
 15638  	for {
 15639  		sc := auxIntToInt64(v.AuxInt)
 15640  		if v_0.Op != OpARM64UBFX {
 15641  			break
 15642  		}
 15643  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15644  		x := v_0.Args[0]
 15645  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 15646  			break
 15647  		}
 15648  		y := v_1.Args[0]
 15649  		if !(sc == bfc.width()) {
 15650  			break
 15651  		}
 15652  		v.reset(OpARM64BFXIL)
 15653  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15654  		v.AddArg2(y, x)
 15655  		return true
 15656  	}
 15657  	return false
 15658  }
 15659  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 15660  	v_1 := v.Args[1]
 15661  	v_0 := v.Args[0]
 15662  	b := v.Block
 15663  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 15664  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 15665  	for {
 15666  		d := auxIntToInt64(v.AuxInt)
 15667  		if v_0.Op != OpARM64MOVDconst {
 15668  			break
 15669  		}
 15670  		c := auxIntToInt64(v_0.AuxInt)
 15671  		x := v_1
 15672  		v.reset(OpARM64ORconst)
 15673  		v.AuxInt = int64ToAuxInt(c)
 15674  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 15675  		v0.AuxInt = int64ToAuxInt(d)
 15676  		v0.AddArg(x)
 15677  		v.AddArg(v0)
 15678  		return true
 15679  	}
 15680  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 15681  	// result: (ORconst x [c>>uint64(d)])
 15682  	for {
 15683  		d := auxIntToInt64(v.AuxInt)
 15684  		x := v_0
 15685  		if v_1.Op != OpARM64MOVDconst {
 15686  			break
 15687  		}
 15688  		c := auxIntToInt64(v_1.AuxInt)
 15689  		v.reset(OpARM64ORconst)
 15690  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15691  		v.AddArg(x)
 15692  		return true
 15693  	}
 15694  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 15695  	// result: y
 15696  	for {
 15697  		c := auxIntToInt64(v.AuxInt)
 15698  		y := v_0
 15699  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 15700  			break
 15701  		}
 15702  		x := y.Args[0]
 15703  		if x != v_1 {
 15704  			break
 15705  		}
 15706  		v.copyOf(y)
 15707  		return true
 15708  	}
 15709  	return false
 15710  }
 15711  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 15712  	v_1 := v.Args[1]
 15713  	v_0 := v.Args[0]
 15714  	b := v.Block
 15715  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 15716  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 15717  	for {
 15718  		d := auxIntToInt64(v.AuxInt)
 15719  		if v_0.Op != OpARM64MOVDconst {
 15720  			break
 15721  		}
 15722  		c := auxIntToInt64(v_0.AuxInt)
 15723  		x := v_1
 15724  		v.reset(OpARM64ORconst)
 15725  		v.AuxInt = int64ToAuxInt(c)
 15726  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 15727  		v0.AuxInt = int64ToAuxInt(d)
 15728  		v0.AddArg(x)
 15729  		v.AddArg(v0)
 15730  		return true
 15731  	}
 15732  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 15733  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 15734  	for {
 15735  		d := auxIntToInt64(v.AuxInt)
 15736  		x := v_0
 15737  		if v_1.Op != OpARM64MOVDconst {
 15738  			break
 15739  		}
 15740  		c := auxIntToInt64(v_1.AuxInt)
 15741  		v.reset(OpARM64ORconst)
 15742  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15743  		v.AddArg(x)
 15744  		return true
 15745  	}
 15746  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 15747  	// result: y
 15748  	for {
 15749  		c := auxIntToInt64(v.AuxInt)
 15750  		y := v_0
 15751  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 15752  			break
 15753  		}
 15754  		x := y.Args[0]
 15755  		if x != v_1 {
 15756  			break
 15757  		}
 15758  		v.copyOf(y)
 15759  		return true
 15760  	}
 15761  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 15762  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 15763  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 15764  	for {
 15765  		rc := auxIntToInt64(v.AuxInt)
 15766  		if v_0.Op != OpARM64ANDconst {
 15767  			break
 15768  		}
 15769  		ac := auxIntToInt64(v_0.AuxInt)
 15770  		x := v_0.Args[0]
 15771  		if v_1.Op != OpARM64SLLconst {
 15772  			break
 15773  		}
 15774  		lc := auxIntToInt64(v_1.AuxInt)
 15775  		y := v_1.Args[0]
 15776  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 15777  			break
 15778  		}
 15779  		v.reset(OpARM64BFI)
 15780  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 15781  		v.AddArg2(x, y)
 15782  		return true
 15783  	}
 15784  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 15785  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 15786  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 15787  	for {
 15788  		rc := auxIntToInt64(v.AuxInt)
 15789  		if v_0.Op != OpARM64ANDconst {
 15790  			break
 15791  		}
 15792  		ac := auxIntToInt64(v_0.AuxInt)
 15793  		y := v_0.Args[0]
 15794  		if v_1.Op != OpARM64SLLconst {
 15795  			break
 15796  		}
 15797  		lc := auxIntToInt64(v_1.AuxInt)
 15798  		x := v_1.Args[0]
 15799  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 15800  			break
 15801  		}
 15802  		v.reset(OpARM64BFXIL)
 15803  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 15804  		v.AddArg2(y, x)
 15805  		return true
 15806  	}
 15807  	return false
 15808  }
 15809  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 15810  	v_1 := v.Args[1]
 15811  	v_0 := v.Args[0]
 15812  	b := v.Block
 15813  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 15814  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 15815  	for {
 15816  		d := auxIntToInt64(v.AuxInt)
 15817  		if v_0.Op != OpARM64MOVDconst {
 15818  			break
 15819  		}
 15820  		c := auxIntToInt64(v_0.AuxInt)
 15821  		x := v_1
 15822  		v.reset(OpARM64ORconst)
 15823  		v.AuxInt = int64ToAuxInt(c)
 15824  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 15825  		v0.AuxInt = int64ToAuxInt(d)
 15826  		v0.AddArg(x)
 15827  		v.AddArg(v0)
 15828  		return true
 15829  	}
 15830  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 15831  	// result: (ORconst x [rotateRight64(c, d)])
 15832  	for {
 15833  		d := auxIntToInt64(v.AuxInt)
 15834  		x := v_0
 15835  		if v_1.Op != OpARM64MOVDconst {
 15836  			break
 15837  		}
 15838  		c := auxIntToInt64(v_1.AuxInt)
 15839  		v.reset(OpARM64ORconst)
 15840  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 15841  		v.AddArg(x)
 15842  		return true
 15843  	}
 15844  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 15845  	// result: y
 15846  	for {
 15847  		c := auxIntToInt64(v.AuxInt)
 15848  		y := v_0
 15849  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 15850  			break
 15851  		}
 15852  		x := y.Args[0]
 15853  		if x != v_1 {
 15854  			break
 15855  		}
 15856  		v.copyOf(y)
 15857  		return true
 15858  	}
 15859  	return false
 15860  }
 15861  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 15862  	v_0 := v.Args[0]
 15863  	// match: (REV (REV p))
 15864  	// result: p
 15865  	for {
 15866  		if v_0.Op != OpARM64REV {
 15867  			break
 15868  		}
 15869  		p := v_0.Args[0]
 15870  		v.copyOf(p)
 15871  		return true
 15872  	}
 15873  	return false
 15874  }
 15875  func rewriteValueARM64_OpARM64REV16(v *Value) bool {
 15876  	v_0 := v.Args[0]
 15877  	// match: (REV16 (MOVWUreg x))
 15878  	// result: (REV16W x)
 15879  	for {
 15880  		if v_0.Op != OpARM64MOVWUreg {
 15881  			break
 15882  		}
 15883  		x := v_0.Args[0]
 15884  		v.reset(OpARM64REV16W)
 15885  		v.AddArg(x)
 15886  		return true
 15887  	}
 15888  	return false
 15889  }
 15890  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 15891  	v_0 := v.Args[0]
 15892  	// match: (REVW (REVW p))
 15893  	// result: p
 15894  	for {
 15895  		if v_0.Op != OpARM64REVW {
 15896  			break
 15897  		}
 15898  		p := v_0.Args[0]
 15899  		v.copyOf(p)
 15900  		return true
 15901  	}
 15902  	return false
 15903  }
 15904  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 15905  	v_1 := v.Args[1]
 15906  	v_0 := v.Args[0]
 15907  	// match: (ROR x (MOVDconst [c]))
 15908  	// result: (RORconst x [c&63])
 15909  	for {
 15910  		x := v_0
 15911  		if v_1.Op != OpARM64MOVDconst {
 15912  			break
 15913  		}
 15914  		c := auxIntToInt64(v_1.AuxInt)
 15915  		v.reset(OpARM64RORconst)
 15916  		v.AuxInt = int64ToAuxInt(c & 63)
 15917  		v.AddArg(x)
 15918  		return true
 15919  	}
 15920  	return false
 15921  }
 15922  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 15923  	v_1 := v.Args[1]
 15924  	v_0 := v.Args[0]
 15925  	// match: (RORW x (MOVDconst [c]))
 15926  	// result: (RORWconst x [c&31])
 15927  	for {
 15928  		x := v_0
 15929  		if v_1.Op != OpARM64MOVDconst {
 15930  			break
 15931  		}
 15932  		c := auxIntToInt64(v_1.AuxInt)
 15933  		v.reset(OpARM64RORWconst)
 15934  		v.AuxInt = int64ToAuxInt(c & 31)
 15935  		v.AddArg(x)
 15936  		return true
 15937  	}
 15938  	return false
 15939  }
 15940  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 15941  	v_2 := v.Args[2]
 15942  	v_1 := v.Args[1]
 15943  	v_0 := v.Args[0]
 15944  	b := v.Block
 15945  	typ := &b.Func.Config.Types
 15946  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 15947  	// result: (SBCSflags x y bo)
 15948  	for {
 15949  		x := v_0
 15950  		y := v_1
 15951  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15952  			break
 15953  		}
 15954  		v_2_0 := v_2.Args[0]
 15955  		if v_2_0.Op != OpARM64NEGSflags {
 15956  			break
 15957  		}
 15958  		v_2_0_0 := v_2_0.Args[0]
 15959  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 15960  			break
 15961  		}
 15962  		v_2_0_0_0 := v_2_0_0.Args[0]
 15963  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 15964  			break
 15965  		}
 15966  		bo := v_2_0_0_0.Args[0]
 15967  		v.reset(OpARM64SBCSflags)
 15968  		v.AddArg3(x, y, bo)
 15969  		return true
 15970  	}
 15971  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 15972  	// result: (SUBSflags x y)
 15973  	for {
 15974  		x := v_0
 15975  		y := v_1
 15976  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15977  			break
 15978  		}
 15979  		v_2_0 := v_2.Args[0]
 15980  		if v_2_0.Op != OpARM64NEGSflags {
 15981  			break
 15982  		}
 15983  		v_2_0_0 := v_2_0.Args[0]
 15984  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 15985  			break
 15986  		}
 15987  		v.reset(OpARM64SUBSflags)
 15988  		v.AddArg2(x, y)
 15989  		return true
 15990  	}
 15991  	return false
 15992  }
 15993  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 15994  	v_0 := v.Args[0]
 15995  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 15996  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 15997  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 15998  	for {
 15999  		bfc := auxIntToArm64BitField(v.AuxInt)
 16000  		s := v_0
 16001  		if s.Op != OpARM64SLLconst {
 16002  			break
 16003  		}
 16004  		sc := auxIntToInt64(s.AuxInt)
 16005  		x := s.Args[0]
 16006  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 16007  			break
 16008  		}
 16009  		v.reset(OpARM64SBFX)
 16010  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16011  		v.AddArg(x)
 16012  		return true
 16013  	}
 16014  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 16015  	// cond: s.Uses == 1 && sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16016  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 16017  	for {
 16018  		bfc := auxIntToArm64BitField(v.AuxInt)
 16019  		s := v_0
 16020  		if s.Op != OpARM64SLLconst {
 16021  			break
 16022  		}
 16023  		sc := auxIntToInt64(s.AuxInt)
 16024  		x := s.Args[0]
 16025  		if !(s.Uses == 1 && sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16026  			break
 16027  		}
 16028  		v.reset(OpARM64SBFIZ)
 16029  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 16030  		v.AddArg(x)
 16031  		return true
 16032  	}
 16033  	return false
 16034  }
 16035  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 16036  	v_1 := v.Args[1]
 16037  	v_0 := v.Args[0]
 16038  	// match: (SLL x (MOVDconst [c]))
 16039  	// result: (SLLconst x [c&63])
 16040  	for {
 16041  		x := v_0
 16042  		if v_1.Op != OpARM64MOVDconst {
 16043  			break
 16044  		}
 16045  		c := auxIntToInt64(v_1.AuxInt)
 16046  		v.reset(OpARM64SLLconst)
 16047  		v.AuxInt = int64ToAuxInt(c & 63)
 16048  		v.AddArg(x)
 16049  		return true
 16050  	}
 16051  	// match: (SLL x (ANDconst [63] y))
 16052  	// result: (SLL x y)
 16053  	for {
 16054  		x := v_0
 16055  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16056  			break
 16057  		}
 16058  		y := v_1.Args[0]
 16059  		v.reset(OpARM64SLL)
 16060  		v.AddArg2(x, y)
 16061  		return true
 16062  	}
 16063  	return false
 16064  }
 16065  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 16066  	v_0 := v.Args[0]
 16067  	// match: (SLLconst [c] (MOVDconst [d]))
 16068  	// result: (MOVDconst [d<<uint64(c)])
 16069  	for {
 16070  		c := auxIntToInt64(v.AuxInt)
 16071  		if v_0.Op != OpARM64MOVDconst {
 16072  			break
 16073  		}
 16074  		d := auxIntToInt64(v_0.AuxInt)
 16075  		v.reset(OpARM64MOVDconst)
 16076  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 16077  		return true
 16078  	}
 16079  	// match: (SLLconst [c] (SRLconst [c] x))
 16080  	// cond: 0 < c && c < 64
 16081  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 16082  	for {
 16083  		c := auxIntToInt64(v.AuxInt)
 16084  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 16085  			break
 16086  		}
 16087  		x := v_0.Args[0]
 16088  		if !(0 < c && c < 64) {
 16089  			break
 16090  		}
 16091  		v.reset(OpARM64ANDconst)
 16092  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 16093  		v.AddArg(x)
 16094  		return true
 16095  	}
 16096  	// match: (SLLconst [lc] (MOVWreg x))
 16097  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 16098  	for {
 16099  		lc := auxIntToInt64(v.AuxInt)
 16100  		if v_0.Op != OpARM64MOVWreg {
 16101  			break
 16102  		}
 16103  		x := v_0.Args[0]
 16104  		v.reset(OpARM64SBFIZ)
 16105  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 16106  		v.AddArg(x)
 16107  		return true
 16108  	}
 16109  	// match: (SLLconst [lc] (MOVHreg x))
 16110  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 16111  	for {
 16112  		lc := auxIntToInt64(v.AuxInt)
 16113  		if v_0.Op != OpARM64MOVHreg {
 16114  			break
 16115  		}
 16116  		x := v_0.Args[0]
 16117  		v.reset(OpARM64SBFIZ)
 16118  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 16119  		v.AddArg(x)
 16120  		return true
 16121  	}
 16122  	// match: (SLLconst [lc] (MOVBreg x))
 16123  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 16124  	for {
 16125  		lc := auxIntToInt64(v.AuxInt)
 16126  		if v_0.Op != OpARM64MOVBreg {
 16127  			break
 16128  		}
 16129  		x := v_0.Args[0]
 16130  		v.reset(OpARM64SBFIZ)
 16131  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 16132  		v.AddArg(x)
 16133  		return true
 16134  	}
 16135  	// match: (SLLconst [lc] (MOVWUreg x))
 16136  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 16137  	for {
 16138  		lc := auxIntToInt64(v.AuxInt)
 16139  		if v_0.Op != OpARM64MOVWUreg {
 16140  			break
 16141  		}
 16142  		x := v_0.Args[0]
 16143  		v.reset(OpARM64UBFIZ)
 16144  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 16145  		v.AddArg(x)
 16146  		return true
 16147  	}
 16148  	// match: (SLLconst [lc] (MOVHUreg x))
 16149  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 16150  	for {
 16151  		lc := auxIntToInt64(v.AuxInt)
 16152  		if v_0.Op != OpARM64MOVHUreg {
 16153  			break
 16154  		}
 16155  		x := v_0.Args[0]
 16156  		v.reset(OpARM64UBFIZ)
 16157  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 16158  		v.AddArg(x)
 16159  		return true
 16160  	}
 16161  	// match: (SLLconst [lc] (MOVBUreg x))
 16162  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 16163  	for {
 16164  		lc := auxIntToInt64(v.AuxInt)
 16165  		if v_0.Op != OpARM64MOVBUreg {
 16166  			break
 16167  		}
 16168  		x := v_0.Args[0]
 16169  		v.reset(OpARM64UBFIZ)
 16170  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 16171  		v.AddArg(x)
 16172  		return true
 16173  	}
 16174  	// match: (SLLconst [sc] (ANDconst [ac] x))
 16175  	// cond: isARM64BFMask(sc, ac, 0)
 16176  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 16177  	for {
 16178  		sc := auxIntToInt64(v.AuxInt)
 16179  		if v_0.Op != OpARM64ANDconst {
 16180  			break
 16181  		}
 16182  		ac := auxIntToInt64(v_0.AuxInt)
 16183  		x := v_0.Args[0]
 16184  		if !(isARM64BFMask(sc, ac, 0)) {
 16185  			break
 16186  		}
 16187  		v.reset(OpARM64UBFIZ)
 16188  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 16189  		v.AddArg(x)
 16190  		return true
 16191  	}
 16192  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 16193  	// cond: sc+bfc.width()+bfc.lsb() < 64
 16194  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 16195  	for {
 16196  		sc := auxIntToInt64(v.AuxInt)
 16197  		if v_0.Op != OpARM64UBFIZ {
 16198  			break
 16199  		}
 16200  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16201  		x := v_0.Args[0]
 16202  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 16203  			break
 16204  		}
 16205  		v.reset(OpARM64UBFIZ)
 16206  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 16207  		v.AddArg(x)
 16208  		return true
 16209  	}
 16210  	return false
 16211  }
 16212  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 16213  	v_1 := v.Args[1]
 16214  	v_0 := v.Args[0]
 16215  	// match: (SRA x (MOVDconst [c]))
 16216  	// result: (SRAconst x [c&63])
 16217  	for {
 16218  		x := v_0
 16219  		if v_1.Op != OpARM64MOVDconst {
 16220  			break
 16221  		}
 16222  		c := auxIntToInt64(v_1.AuxInt)
 16223  		v.reset(OpARM64SRAconst)
 16224  		v.AuxInt = int64ToAuxInt(c & 63)
 16225  		v.AddArg(x)
 16226  		return true
 16227  	}
 16228  	// match: (SRA x (ANDconst [63] y))
 16229  	// result: (SRA x y)
 16230  	for {
 16231  		x := v_0
 16232  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16233  			break
 16234  		}
 16235  		y := v_1.Args[0]
 16236  		v.reset(OpARM64SRA)
 16237  		v.AddArg2(x, y)
 16238  		return true
 16239  	}
 16240  	return false
 16241  }
 16242  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 16243  	v_0 := v.Args[0]
 16244  	// match: (SRAconst [c] (MOVDconst [d]))
 16245  	// result: (MOVDconst [d>>uint64(c)])
 16246  	for {
 16247  		c := auxIntToInt64(v.AuxInt)
 16248  		if v_0.Op != OpARM64MOVDconst {
 16249  			break
 16250  		}
 16251  		d := auxIntToInt64(v_0.AuxInt)
 16252  		v.reset(OpARM64MOVDconst)
 16253  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 16254  		return true
 16255  	}
 16256  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16257  	// cond: lc > rc
 16258  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16259  	for {
 16260  		rc := auxIntToInt64(v.AuxInt)
 16261  		if v_0.Op != OpARM64SLLconst {
 16262  			break
 16263  		}
 16264  		lc := auxIntToInt64(v_0.AuxInt)
 16265  		x := v_0.Args[0]
 16266  		if !(lc > rc) {
 16267  			break
 16268  		}
 16269  		v.reset(OpARM64SBFIZ)
 16270  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16271  		v.AddArg(x)
 16272  		return true
 16273  	}
 16274  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16275  	// cond: lc <= rc
 16276  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16277  	for {
 16278  		rc := auxIntToInt64(v.AuxInt)
 16279  		if v_0.Op != OpARM64SLLconst {
 16280  			break
 16281  		}
 16282  		lc := auxIntToInt64(v_0.AuxInt)
 16283  		x := v_0.Args[0]
 16284  		if !(lc <= rc) {
 16285  			break
 16286  		}
 16287  		v.reset(OpARM64SBFX)
 16288  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16289  		v.AddArg(x)
 16290  		return true
 16291  	}
 16292  	// match: (SRAconst [rc] (MOVWreg x))
 16293  	// cond: rc < 32
 16294  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 16295  	for {
 16296  		rc := auxIntToInt64(v.AuxInt)
 16297  		if v_0.Op != OpARM64MOVWreg {
 16298  			break
 16299  		}
 16300  		x := v_0.Args[0]
 16301  		if !(rc < 32) {
 16302  			break
 16303  		}
 16304  		v.reset(OpARM64SBFX)
 16305  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16306  		v.AddArg(x)
 16307  		return true
 16308  	}
 16309  	// match: (SRAconst [rc] (MOVHreg x))
 16310  	// cond: rc < 16
 16311  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 16312  	for {
 16313  		rc := auxIntToInt64(v.AuxInt)
 16314  		if v_0.Op != OpARM64MOVHreg {
 16315  			break
 16316  		}
 16317  		x := v_0.Args[0]
 16318  		if !(rc < 16) {
 16319  			break
 16320  		}
 16321  		v.reset(OpARM64SBFX)
 16322  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16323  		v.AddArg(x)
 16324  		return true
 16325  	}
 16326  	// match: (SRAconst [rc] (MOVBreg x))
 16327  	// cond: rc < 8
 16328  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 16329  	for {
 16330  		rc := auxIntToInt64(v.AuxInt)
 16331  		if v_0.Op != OpARM64MOVBreg {
 16332  			break
 16333  		}
 16334  		x := v_0.Args[0]
 16335  		if !(rc < 8) {
 16336  			break
 16337  		}
 16338  		v.reset(OpARM64SBFX)
 16339  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16340  		v.AddArg(x)
 16341  		return true
 16342  	}
 16343  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16344  	// cond: sc < bfc.lsb()
 16345  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16346  	for {
 16347  		sc := auxIntToInt64(v.AuxInt)
 16348  		if v_0.Op != OpARM64SBFIZ {
 16349  			break
 16350  		}
 16351  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16352  		x := v_0.Args[0]
 16353  		if !(sc < bfc.lsb()) {
 16354  			break
 16355  		}
 16356  		v.reset(OpARM64SBFIZ)
 16357  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16358  		v.AddArg(x)
 16359  		return true
 16360  	}
 16361  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16362  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16363  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16364  	for {
 16365  		sc := auxIntToInt64(v.AuxInt)
 16366  		if v_0.Op != OpARM64SBFIZ {
 16367  			break
 16368  		}
 16369  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16370  		x := v_0.Args[0]
 16371  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16372  			break
 16373  		}
 16374  		v.reset(OpARM64SBFX)
 16375  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16376  		v.AddArg(x)
 16377  		return true
 16378  	}
 16379  	return false
 16380  }
 16381  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 16382  	v_1 := v.Args[1]
 16383  	v_0 := v.Args[0]
 16384  	// match: (SRL x (MOVDconst [c]))
 16385  	// result: (SRLconst x [c&63])
 16386  	for {
 16387  		x := v_0
 16388  		if v_1.Op != OpARM64MOVDconst {
 16389  			break
 16390  		}
 16391  		c := auxIntToInt64(v_1.AuxInt)
 16392  		v.reset(OpARM64SRLconst)
 16393  		v.AuxInt = int64ToAuxInt(c & 63)
 16394  		v.AddArg(x)
 16395  		return true
 16396  	}
 16397  	// match: (SRL x (ANDconst [63] y))
 16398  	// result: (SRL x y)
 16399  	for {
 16400  		x := v_0
 16401  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16402  			break
 16403  		}
 16404  		y := v_1.Args[0]
 16405  		v.reset(OpARM64SRL)
 16406  		v.AddArg2(x, y)
 16407  		return true
 16408  	}
 16409  	return false
 16410  }
 16411  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 16412  	v_0 := v.Args[0]
 16413  	// match: (SRLconst [c] (MOVDconst [d]))
 16414  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 16415  	for {
 16416  		c := auxIntToInt64(v.AuxInt)
 16417  		if v_0.Op != OpARM64MOVDconst {
 16418  			break
 16419  		}
 16420  		d := auxIntToInt64(v_0.AuxInt)
 16421  		v.reset(OpARM64MOVDconst)
 16422  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 16423  		return true
 16424  	}
 16425  	// match: (SRLconst [c] (SLLconst [c] x))
 16426  	// cond: 0 < c && c < 64
 16427  	// result: (ANDconst [1<<uint(64-c)-1] x)
 16428  	for {
 16429  		c := auxIntToInt64(v.AuxInt)
 16430  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16431  			break
 16432  		}
 16433  		x := v_0.Args[0]
 16434  		if !(0 < c && c < 64) {
 16435  			break
 16436  		}
 16437  		v.reset(OpARM64ANDconst)
 16438  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 16439  		v.AddArg(x)
 16440  		return true
 16441  	}
 16442  	// match: (SRLconst [rc] (MOVWUreg x))
 16443  	// cond: rc >= 32
 16444  	// result: (MOVDconst [0])
 16445  	for {
 16446  		rc := auxIntToInt64(v.AuxInt)
 16447  		if v_0.Op != OpARM64MOVWUreg {
 16448  			break
 16449  		}
 16450  		if !(rc >= 32) {
 16451  			break
 16452  		}
 16453  		v.reset(OpARM64MOVDconst)
 16454  		v.AuxInt = int64ToAuxInt(0)
 16455  		return true
 16456  	}
 16457  	// match: (SRLconst [rc] (MOVHUreg x))
 16458  	// cond: rc >= 16
 16459  	// result: (MOVDconst [0])
 16460  	for {
 16461  		rc := auxIntToInt64(v.AuxInt)
 16462  		if v_0.Op != OpARM64MOVHUreg {
 16463  			break
 16464  		}
 16465  		if !(rc >= 16) {
 16466  			break
 16467  		}
 16468  		v.reset(OpARM64MOVDconst)
 16469  		v.AuxInt = int64ToAuxInt(0)
 16470  		return true
 16471  	}
 16472  	// match: (SRLconst [rc] (MOVBUreg x))
 16473  	// cond: rc >= 8
 16474  	// result: (MOVDconst [0])
 16475  	for {
 16476  		rc := auxIntToInt64(v.AuxInt)
 16477  		if v_0.Op != OpARM64MOVBUreg {
 16478  			break
 16479  		}
 16480  		if !(rc >= 8) {
 16481  			break
 16482  		}
 16483  		v.reset(OpARM64MOVDconst)
 16484  		v.AuxInt = int64ToAuxInt(0)
 16485  		return true
 16486  	}
 16487  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16488  	// cond: lc > rc
 16489  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16490  	for {
 16491  		rc := auxIntToInt64(v.AuxInt)
 16492  		if v_0.Op != OpARM64SLLconst {
 16493  			break
 16494  		}
 16495  		lc := auxIntToInt64(v_0.AuxInt)
 16496  		x := v_0.Args[0]
 16497  		if !(lc > rc) {
 16498  			break
 16499  		}
 16500  		v.reset(OpARM64UBFIZ)
 16501  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16502  		v.AddArg(x)
 16503  		return true
 16504  	}
 16505  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16506  	// cond: lc < rc
 16507  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16508  	for {
 16509  		rc := auxIntToInt64(v.AuxInt)
 16510  		if v_0.Op != OpARM64SLLconst {
 16511  			break
 16512  		}
 16513  		lc := auxIntToInt64(v_0.AuxInt)
 16514  		x := v_0.Args[0]
 16515  		if !(lc < rc) {
 16516  			break
 16517  		}
 16518  		v.reset(OpARM64UBFX)
 16519  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16520  		v.AddArg(x)
 16521  		return true
 16522  	}
 16523  	// match: (SRLconst [rc] (MOVWUreg x))
 16524  	// cond: rc < 32
 16525  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 16526  	for {
 16527  		rc := auxIntToInt64(v.AuxInt)
 16528  		if v_0.Op != OpARM64MOVWUreg {
 16529  			break
 16530  		}
 16531  		x := v_0.Args[0]
 16532  		if !(rc < 32) {
 16533  			break
 16534  		}
 16535  		v.reset(OpARM64UBFX)
 16536  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16537  		v.AddArg(x)
 16538  		return true
 16539  	}
 16540  	// match: (SRLconst [rc] (MOVHUreg x))
 16541  	// cond: rc < 16
 16542  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 16543  	for {
 16544  		rc := auxIntToInt64(v.AuxInt)
 16545  		if v_0.Op != OpARM64MOVHUreg {
 16546  			break
 16547  		}
 16548  		x := v_0.Args[0]
 16549  		if !(rc < 16) {
 16550  			break
 16551  		}
 16552  		v.reset(OpARM64UBFX)
 16553  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16554  		v.AddArg(x)
 16555  		return true
 16556  	}
 16557  	// match: (SRLconst [rc] (MOVBUreg x))
 16558  	// cond: rc < 8
 16559  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 16560  	for {
 16561  		rc := auxIntToInt64(v.AuxInt)
 16562  		if v_0.Op != OpARM64MOVBUreg {
 16563  			break
 16564  		}
 16565  		x := v_0.Args[0]
 16566  		if !(rc < 8) {
 16567  			break
 16568  		}
 16569  		v.reset(OpARM64UBFX)
 16570  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16571  		v.AddArg(x)
 16572  		return true
 16573  	}
 16574  	// match: (SRLconst [sc] (ANDconst [ac] x))
 16575  	// cond: isARM64BFMask(sc, ac, sc)
 16576  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 16577  	for {
 16578  		sc := auxIntToInt64(v.AuxInt)
 16579  		if v_0.Op != OpARM64ANDconst {
 16580  			break
 16581  		}
 16582  		ac := auxIntToInt64(v_0.AuxInt)
 16583  		x := v_0.Args[0]
 16584  		if !(isARM64BFMask(sc, ac, sc)) {
 16585  			break
 16586  		}
 16587  		v.reset(OpARM64UBFX)
 16588  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 16589  		v.AddArg(x)
 16590  		return true
 16591  	}
 16592  	// match: (SRLconst [sc] (UBFX [bfc] x))
 16593  	// cond: sc < bfc.width()
 16594  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 16595  	for {
 16596  		sc := auxIntToInt64(v.AuxInt)
 16597  		if v_0.Op != OpARM64UBFX {
 16598  			break
 16599  		}
 16600  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16601  		x := v_0.Args[0]
 16602  		if !(sc < bfc.width()) {
 16603  			break
 16604  		}
 16605  		v.reset(OpARM64UBFX)
 16606  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 16607  		v.AddArg(x)
 16608  		return true
 16609  	}
 16610  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16611  	// cond: sc == bfc.lsb()
 16612  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 16613  	for {
 16614  		sc := auxIntToInt64(v.AuxInt)
 16615  		if v_0.Op != OpARM64UBFIZ {
 16616  			break
 16617  		}
 16618  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16619  		x := v_0.Args[0]
 16620  		if !(sc == bfc.lsb()) {
 16621  			break
 16622  		}
 16623  		v.reset(OpARM64ANDconst)
 16624  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 16625  		v.AddArg(x)
 16626  		return true
 16627  	}
 16628  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16629  	// cond: sc < bfc.lsb()
 16630  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16631  	for {
 16632  		sc := auxIntToInt64(v.AuxInt)
 16633  		if v_0.Op != OpARM64UBFIZ {
 16634  			break
 16635  		}
 16636  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16637  		x := v_0.Args[0]
 16638  		if !(sc < bfc.lsb()) {
 16639  			break
 16640  		}
 16641  		v.reset(OpARM64UBFIZ)
 16642  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16643  		v.AddArg(x)
 16644  		return true
 16645  	}
 16646  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16647  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16648  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16649  	for {
 16650  		sc := auxIntToInt64(v.AuxInt)
 16651  		if v_0.Op != OpARM64UBFIZ {
 16652  			break
 16653  		}
 16654  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16655  		x := v_0.Args[0]
 16656  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16657  			break
 16658  		}
 16659  		v.reset(OpARM64UBFX)
 16660  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16661  		v.AddArg(x)
 16662  		return true
 16663  	}
 16664  	return false
 16665  }
 16666  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 16667  	v_3 := v.Args[3]
 16668  	v_2 := v.Args[2]
 16669  	v_1 := v.Args[1]
 16670  	v_0 := v.Args[0]
 16671  	b := v.Block
 16672  	config := b.Func.Config
 16673  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 16674  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16675  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 16676  	for {
 16677  		off1 := auxIntToInt32(v.AuxInt)
 16678  		sym := auxToSym(v.Aux)
 16679  		if v_0.Op != OpARM64ADDconst {
 16680  			break
 16681  		}
 16682  		off2 := auxIntToInt64(v_0.AuxInt)
 16683  		ptr := v_0.Args[0]
 16684  		val1 := v_1
 16685  		val2 := v_2
 16686  		mem := v_3
 16687  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16688  			break
 16689  		}
 16690  		v.reset(OpARM64STP)
 16691  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 16692  		v.Aux = symToAux(sym)
 16693  		v.AddArg4(ptr, val1, val2, mem)
 16694  		return true
 16695  	}
 16696  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 16697  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16698  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 16699  	for {
 16700  		off1 := auxIntToInt32(v.AuxInt)
 16701  		sym1 := auxToSym(v.Aux)
 16702  		if v_0.Op != OpARM64MOVDaddr {
 16703  			break
 16704  		}
 16705  		off2 := auxIntToInt32(v_0.AuxInt)
 16706  		sym2 := auxToSym(v_0.Aux)
 16707  		ptr := v_0.Args[0]
 16708  		val1 := v_1
 16709  		val2 := v_2
 16710  		mem := v_3
 16711  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16712  			break
 16713  		}
 16714  		v.reset(OpARM64STP)
 16715  		v.AuxInt = int32ToAuxInt(off1 + off2)
 16716  		v.Aux = symToAux(mergeSym(sym1, sym2))
 16717  		v.AddArg4(ptr, val1, val2, mem)
 16718  		return true
 16719  	}
 16720  	return false
 16721  }
 16722  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 16723  	v_1 := v.Args[1]
 16724  	v_0 := v.Args[0]
 16725  	b := v.Block
 16726  	// match: (SUB x (MOVDconst [c]))
 16727  	// result: (SUBconst [c] x)
 16728  	for {
 16729  		x := v_0
 16730  		if v_1.Op != OpARM64MOVDconst {
 16731  			break
 16732  		}
 16733  		c := auxIntToInt64(v_1.AuxInt)
 16734  		v.reset(OpARM64SUBconst)
 16735  		v.AuxInt = int64ToAuxInt(c)
 16736  		v.AddArg(x)
 16737  		return true
 16738  	}
 16739  	// match: (SUB a l:(MUL x y))
 16740  	// cond: l.Uses==1 && clobber(l)
 16741  	// result: (MSUB a x y)
 16742  	for {
 16743  		a := v_0
 16744  		l := v_1
 16745  		if l.Op != OpARM64MUL {
 16746  			break
 16747  		}
 16748  		y := l.Args[1]
 16749  		x := l.Args[0]
 16750  		if !(l.Uses == 1 && clobber(l)) {
 16751  			break
 16752  		}
 16753  		v.reset(OpARM64MSUB)
 16754  		v.AddArg3(a, x, y)
 16755  		return true
 16756  	}
 16757  	// match: (SUB a l:(MNEG x y))
 16758  	// cond: l.Uses==1 && clobber(l)
 16759  	// result: (MADD a x y)
 16760  	for {
 16761  		a := v_0
 16762  		l := v_1
 16763  		if l.Op != OpARM64MNEG {
 16764  			break
 16765  		}
 16766  		y := l.Args[1]
 16767  		x := l.Args[0]
 16768  		if !(l.Uses == 1 && clobber(l)) {
 16769  			break
 16770  		}
 16771  		v.reset(OpARM64MADD)
 16772  		v.AddArg3(a, x, y)
 16773  		return true
 16774  	}
 16775  	// match: (SUB a l:(MULW x y))
 16776  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16777  	// result: (MSUBW a x y)
 16778  	for {
 16779  		a := v_0
 16780  		l := v_1
 16781  		if l.Op != OpARM64MULW {
 16782  			break
 16783  		}
 16784  		y := l.Args[1]
 16785  		x := l.Args[0]
 16786  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16787  			break
 16788  		}
 16789  		v.reset(OpARM64MSUBW)
 16790  		v.AddArg3(a, x, y)
 16791  		return true
 16792  	}
 16793  	// match: (SUB a l:(MNEGW x y))
 16794  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16795  	// result: (MADDW a x y)
 16796  	for {
 16797  		a := v_0
 16798  		l := v_1
 16799  		if l.Op != OpARM64MNEGW {
 16800  			break
 16801  		}
 16802  		y := l.Args[1]
 16803  		x := l.Args[0]
 16804  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16805  			break
 16806  		}
 16807  		v.reset(OpARM64MADDW)
 16808  		v.AddArg3(a, x, y)
 16809  		return true
 16810  	}
 16811  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 16812  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16813  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16814  	for {
 16815  		t := v.Type
 16816  		a := v_0
 16817  		p := v_1
 16818  		if p.Op != OpARM64ADDconst {
 16819  			break
 16820  		}
 16821  		c := auxIntToInt64(p.AuxInt)
 16822  		m := p.Args[0]
 16823  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16824  			break
 16825  		}
 16826  		v.reset(OpARM64SUBconst)
 16827  		v.AuxInt = int64ToAuxInt(c)
 16828  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16829  		v0.AddArg2(a, m)
 16830  		v.AddArg(v0)
 16831  		return true
 16832  	}
 16833  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 16834  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16835  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16836  	for {
 16837  		t := v.Type
 16838  		a := v_0
 16839  		p := v_1
 16840  		if p.Op != OpARM64ADDconst {
 16841  			break
 16842  		}
 16843  		c := auxIntToInt64(p.AuxInt)
 16844  		m := p.Args[0]
 16845  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16846  			break
 16847  		}
 16848  		v.reset(OpARM64SUBconst)
 16849  		v.AuxInt = int64ToAuxInt(c)
 16850  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16851  		v0.AddArg2(a, m)
 16852  		v.AddArg(v0)
 16853  		return true
 16854  	}
 16855  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 16856  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16857  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16858  	for {
 16859  		t := v.Type
 16860  		a := v_0
 16861  		p := v_1
 16862  		if p.Op != OpARM64ADDconst {
 16863  			break
 16864  		}
 16865  		c := auxIntToInt64(p.AuxInt)
 16866  		m := p.Args[0]
 16867  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16868  			break
 16869  		}
 16870  		v.reset(OpARM64SUBconst)
 16871  		v.AuxInt = int64ToAuxInt(c)
 16872  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16873  		v0.AddArg2(a, m)
 16874  		v.AddArg(v0)
 16875  		return true
 16876  	}
 16877  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 16878  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16879  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16880  	for {
 16881  		t := v.Type
 16882  		a := v_0
 16883  		p := v_1
 16884  		if p.Op != OpARM64ADDconst {
 16885  			break
 16886  		}
 16887  		c := auxIntToInt64(p.AuxInt)
 16888  		m := p.Args[0]
 16889  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16890  			break
 16891  		}
 16892  		v.reset(OpARM64SUBconst)
 16893  		v.AuxInt = int64ToAuxInt(c)
 16894  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16895  		v0.AddArg2(a, m)
 16896  		v.AddArg(v0)
 16897  		return true
 16898  	}
 16899  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 16900  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16901  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16902  	for {
 16903  		t := v.Type
 16904  		a := v_0
 16905  		p := v_1
 16906  		if p.Op != OpARM64SUBconst {
 16907  			break
 16908  		}
 16909  		c := auxIntToInt64(p.AuxInt)
 16910  		m := p.Args[0]
 16911  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16912  			break
 16913  		}
 16914  		v.reset(OpARM64ADDconst)
 16915  		v.AuxInt = int64ToAuxInt(c)
 16916  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16917  		v0.AddArg2(a, m)
 16918  		v.AddArg(v0)
 16919  		return true
 16920  	}
 16921  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 16922  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16923  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16924  	for {
 16925  		t := v.Type
 16926  		a := v_0
 16927  		p := v_1
 16928  		if p.Op != OpARM64SUBconst {
 16929  			break
 16930  		}
 16931  		c := auxIntToInt64(p.AuxInt)
 16932  		m := p.Args[0]
 16933  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16934  			break
 16935  		}
 16936  		v.reset(OpARM64ADDconst)
 16937  		v.AuxInt = int64ToAuxInt(c)
 16938  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16939  		v0.AddArg2(a, m)
 16940  		v.AddArg(v0)
 16941  		return true
 16942  	}
 16943  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 16944  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16945  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16946  	for {
 16947  		t := v.Type
 16948  		a := v_0
 16949  		p := v_1
 16950  		if p.Op != OpARM64SUBconst {
 16951  			break
 16952  		}
 16953  		c := auxIntToInt64(p.AuxInt)
 16954  		m := p.Args[0]
 16955  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16956  			break
 16957  		}
 16958  		v.reset(OpARM64ADDconst)
 16959  		v.AuxInt = int64ToAuxInt(c)
 16960  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16961  		v0.AddArg2(a, m)
 16962  		v.AddArg(v0)
 16963  		return true
 16964  	}
 16965  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 16966  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16967  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16968  	for {
 16969  		t := v.Type
 16970  		a := v_0
 16971  		p := v_1
 16972  		if p.Op != OpARM64SUBconst {
 16973  			break
 16974  		}
 16975  		c := auxIntToInt64(p.AuxInt)
 16976  		m := p.Args[0]
 16977  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16978  			break
 16979  		}
 16980  		v.reset(OpARM64ADDconst)
 16981  		v.AuxInt = int64ToAuxInt(c)
 16982  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16983  		v0.AddArg2(a, m)
 16984  		v.AddArg(v0)
 16985  		return true
 16986  	}
 16987  	// match: (SUB x (NEG y))
 16988  	// result: (ADD x y)
 16989  	for {
 16990  		x := v_0
 16991  		if v_1.Op != OpARM64NEG {
 16992  			break
 16993  		}
 16994  		y := v_1.Args[0]
 16995  		v.reset(OpARM64ADD)
 16996  		v.AddArg2(x, y)
 16997  		return true
 16998  	}
 16999  	// match: (SUB x x)
 17000  	// result: (MOVDconst [0])
 17001  	for {
 17002  		x := v_0
 17003  		if x != v_1 {
 17004  			break
 17005  		}
 17006  		v.reset(OpARM64MOVDconst)
 17007  		v.AuxInt = int64ToAuxInt(0)
 17008  		return true
 17009  	}
 17010  	// match: (SUB x (SUB y z))
 17011  	// result: (SUB (ADD <v.Type> x z) y)
 17012  	for {
 17013  		x := v_0
 17014  		if v_1.Op != OpARM64SUB {
 17015  			break
 17016  		}
 17017  		z := v_1.Args[1]
 17018  		y := v_1.Args[0]
 17019  		v.reset(OpARM64SUB)
 17020  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 17021  		v0.AddArg2(x, z)
 17022  		v.AddArg2(v0, y)
 17023  		return true
 17024  	}
 17025  	// match: (SUB (SUB x y) z)
 17026  	// result: (SUB x (ADD <y.Type> y z))
 17027  	for {
 17028  		if v_0.Op != OpARM64SUB {
 17029  			break
 17030  		}
 17031  		y := v_0.Args[1]
 17032  		x := v_0.Args[0]
 17033  		z := v_1
 17034  		v.reset(OpARM64SUB)
 17035  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 17036  		v0.AddArg2(y, z)
 17037  		v.AddArg2(x, v0)
 17038  		return true
 17039  	}
 17040  	// match: (SUB x0 x1:(SLLconst [c] y))
 17041  	// cond: clobberIfDead(x1)
 17042  	// result: (SUBshiftLL x0 y [c])
 17043  	for {
 17044  		x0 := v_0
 17045  		x1 := v_1
 17046  		if x1.Op != OpARM64SLLconst {
 17047  			break
 17048  		}
 17049  		c := auxIntToInt64(x1.AuxInt)
 17050  		y := x1.Args[0]
 17051  		if !(clobberIfDead(x1)) {
 17052  			break
 17053  		}
 17054  		v.reset(OpARM64SUBshiftLL)
 17055  		v.AuxInt = int64ToAuxInt(c)
 17056  		v.AddArg2(x0, y)
 17057  		return true
 17058  	}
 17059  	// match: (SUB x0 x1:(SRLconst [c] y))
 17060  	// cond: clobberIfDead(x1)
 17061  	// result: (SUBshiftRL x0 y [c])
 17062  	for {
 17063  		x0 := v_0
 17064  		x1 := v_1
 17065  		if x1.Op != OpARM64SRLconst {
 17066  			break
 17067  		}
 17068  		c := auxIntToInt64(x1.AuxInt)
 17069  		y := x1.Args[0]
 17070  		if !(clobberIfDead(x1)) {
 17071  			break
 17072  		}
 17073  		v.reset(OpARM64SUBshiftRL)
 17074  		v.AuxInt = int64ToAuxInt(c)
 17075  		v.AddArg2(x0, y)
 17076  		return true
 17077  	}
 17078  	// match: (SUB x0 x1:(SRAconst [c] y))
 17079  	// cond: clobberIfDead(x1)
 17080  	// result: (SUBshiftRA x0 y [c])
 17081  	for {
 17082  		x0 := v_0
 17083  		x1 := v_1
 17084  		if x1.Op != OpARM64SRAconst {
 17085  			break
 17086  		}
 17087  		c := auxIntToInt64(x1.AuxInt)
 17088  		y := x1.Args[0]
 17089  		if !(clobberIfDead(x1)) {
 17090  			break
 17091  		}
 17092  		v.reset(OpARM64SUBshiftRA)
 17093  		v.AuxInt = int64ToAuxInt(c)
 17094  		v.AddArg2(x0, y)
 17095  		return true
 17096  	}
 17097  	return false
 17098  }
 17099  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 17100  	v_0 := v.Args[0]
 17101  	// match: (SUBconst [0] x)
 17102  	// result: x
 17103  	for {
 17104  		if auxIntToInt64(v.AuxInt) != 0 {
 17105  			break
 17106  		}
 17107  		x := v_0
 17108  		v.copyOf(x)
 17109  		return true
 17110  	}
 17111  	// match: (SUBconst [c] (MOVDconst [d]))
 17112  	// result: (MOVDconst [d-c])
 17113  	for {
 17114  		c := auxIntToInt64(v.AuxInt)
 17115  		if v_0.Op != OpARM64MOVDconst {
 17116  			break
 17117  		}
 17118  		d := auxIntToInt64(v_0.AuxInt)
 17119  		v.reset(OpARM64MOVDconst)
 17120  		v.AuxInt = int64ToAuxInt(d - c)
 17121  		return true
 17122  	}
 17123  	// match: (SUBconst [c] (SUBconst [d] x))
 17124  	// result: (ADDconst [-c-d] x)
 17125  	for {
 17126  		c := auxIntToInt64(v.AuxInt)
 17127  		if v_0.Op != OpARM64SUBconst {
 17128  			break
 17129  		}
 17130  		d := auxIntToInt64(v_0.AuxInt)
 17131  		x := v_0.Args[0]
 17132  		v.reset(OpARM64ADDconst)
 17133  		v.AuxInt = int64ToAuxInt(-c - d)
 17134  		v.AddArg(x)
 17135  		return true
 17136  	}
 17137  	// match: (SUBconst [c] (ADDconst [d] x))
 17138  	// result: (ADDconst [-c+d] x)
 17139  	for {
 17140  		c := auxIntToInt64(v.AuxInt)
 17141  		if v_0.Op != OpARM64ADDconst {
 17142  			break
 17143  		}
 17144  		d := auxIntToInt64(v_0.AuxInt)
 17145  		x := v_0.Args[0]
 17146  		v.reset(OpARM64ADDconst)
 17147  		v.AuxInt = int64ToAuxInt(-c + d)
 17148  		v.AddArg(x)
 17149  		return true
 17150  	}
 17151  	return false
 17152  }
 17153  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 17154  	v_1 := v.Args[1]
 17155  	v_0 := v.Args[0]
 17156  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 17157  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 17158  	for {
 17159  		d := auxIntToInt64(v.AuxInt)
 17160  		x := v_0
 17161  		if v_1.Op != OpARM64MOVDconst {
 17162  			break
 17163  		}
 17164  		c := auxIntToInt64(v_1.AuxInt)
 17165  		v.reset(OpARM64SUBconst)
 17166  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17167  		v.AddArg(x)
 17168  		return true
 17169  	}
 17170  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 17171  	// result: (MOVDconst [0])
 17172  	for {
 17173  		c := auxIntToInt64(v.AuxInt)
 17174  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 17175  			break
 17176  		}
 17177  		x := v_0.Args[0]
 17178  		if x != v_1 {
 17179  			break
 17180  		}
 17181  		v.reset(OpARM64MOVDconst)
 17182  		v.AuxInt = int64ToAuxInt(0)
 17183  		return true
 17184  	}
 17185  	return false
 17186  }
 17187  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 17188  	v_1 := v.Args[1]
 17189  	v_0 := v.Args[0]
 17190  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 17191  	// result: (SUBconst x [c>>uint64(d)])
 17192  	for {
 17193  		d := auxIntToInt64(v.AuxInt)
 17194  		x := v_0
 17195  		if v_1.Op != OpARM64MOVDconst {
 17196  			break
 17197  		}
 17198  		c := auxIntToInt64(v_1.AuxInt)
 17199  		v.reset(OpARM64SUBconst)
 17200  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17201  		v.AddArg(x)
 17202  		return true
 17203  	}
 17204  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 17205  	// result: (MOVDconst [0])
 17206  	for {
 17207  		c := auxIntToInt64(v.AuxInt)
 17208  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 17209  			break
 17210  		}
 17211  		x := v_0.Args[0]
 17212  		if x != v_1 {
 17213  			break
 17214  		}
 17215  		v.reset(OpARM64MOVDconst)
 17216  		v.AuxInt = int64ToAuxInt(0)
 17217  		return true
 17218  	}
 17219  	return false
 17220  }
 17221  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 17222  	v_1 := v.Args[1]
 17223  	v_0 := v.Args[0]
 17224  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 17225  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 17226  	for {
 17227  		d := auxIntToInt64(v.AuxInt)
 17228  		x := v_0
 17229  		if v_1.Op != OpARM64MOVDconst {
 17230  			break
 17231  		}
 17232  		c := auxIntToInt64(v_1.AuxInt)
 17233  		v.reset(OpARM64SUBconst)
 17234  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17235  		v.AddArg(x)
 17236  		return true
 17237  	}
 17238  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 17239  	// result: (MOVDconst [0])
 17240  	for {
 17241  		c := auxIntToInt64(v.AuxInt)
 17242  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 17243  			break
 17244  		}
 17245  		x := v_0.Args[0]
 17246  		if x != v_1 {
 17247  			break
 17248  		}
 17249  		v.reset(OpARM64MOVDconst)
 17250  		v.AuxInt = int64ToAuxInt(0)
 17251  		return true
 17252  	}
 17253  	return false
 17254  }
 17255  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 17256  	v_1 := v.Args[1]
 17257  	v_0 := v.Args[0]
 17258  	// match: (TST x (MOVDconst [c]))
 17259  	// result: (TSTconst [c] x)
 17260  	for {
 17261  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17262  			x := v_0
 17263  			if v_1.Op != OpARM64MOVDconst {
 17264  				continue
 17265  			}
 17266  			c := auxIntToInt64(v_1.AuxInt)
 17267  			v.reset(OpARM64TSTconst)
 17268  			v.AuxInt = int64ToAuxInt(c)
 17269  			v.AddArg(x)
 17270  			return true
 17271  		}
 17272  		break
 17273  	}
 17274  	// match: (TST x0 x1:(SLLconst [c] y))
 17275  	// cond: clobberIfDead(x1)
 17276  	// result: (TSTshiftLL x0 y [c])
 17277  	for {
 17278  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17279  			x0 := v_0
 17280  			x1 := v_1
 17281  			if x1.Op != OpARM64SLLconst {
 17282  				continue
 17283  			}
 17284  			c := auxIntToInt64(x1.AuxInt)
 17285  			y := x1.Args[0]
 17286  			if !(clobberIfDead(x1)) {
 17287  				continue
 17288  			}
 17289  			v.reset(OpARM64TSTshiftLL)
 17290  			v.AuxInt = int64ToAuxInt(c)
 17291  			v.AddArg2(x0, y)
 17292  			return true
 17293  		}
 17294  		break
 17295  	}
 17296  	// match: (TST x0 x1:(SRLconst [c] y))
 17297  	// cond: clobberIfDead(x1)
 17298  	// result: (TSTshiftRL x0 y [c])
 17299  	for {
 17300  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17301  			x0 := v_0
 17302  			x1 := v_1
 17303  			if x1.Op != OpARM64SRLconst {
 17304  				continue
 17305  			}
 17306  			c := auxIntToInt64(x1.AuxInt)
 17307  			y := x1.Args[0]
 17308  			if !(clobberIfDead(x1)) {
 17309  				continue
 17310  			}
 17311  			v.reset(OpARM64TSTshiftRL)
 17312  			v.AuxInt = int64ToAuxInt(c)
 17313  			v.AddArg2(x0, y)
 17314  			return true
 17315  		}
 17316  		break
 17317  	}
 17318  	// match: (TST x0 x1:(SRAconst [c] y))
 17319  	// cond: clobberIfDead(x1)
 17320  	// result: (TSTshiftRA x0 y [c])
 17321  	for {
 17322  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17323  			x0 := v_0
 17324  			x1 := v_1
 17325  			if x1.Op != OpARM64SRAconst {
 17326  				continue
 17327  			}
 17328  			c := auxIntToInt64(x1.AuxInt)
 17329  			y := x1.Args[0]
 17330  			if !(clobberIfDead(x1)) {
 17331  				continue
 17332  			}
 17333  			v.reset(OpARM64TSTshiftRA)
 17334  			v.AuxInt = int64ToAuxInt(c)
 17335  			v.AddArg2(x0, y)
 17336  			return true
 17337  		}
 17338  		break
 17339  	}
 17340  	// match: (TST x0 x1:(RORconst [c] y))
 17341  	// cond: clobberIfDead(x1)
 17342  	// result: (TSTshiftRO x0 y [c])
 17343  	for {
 17344  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17345  			x0 := v_0
 17346  			x1 := v_1
 17347  			if x1.Op != OpARM64RORconst {
 17348  				continue
 17349  			}
 17350  			c := auxIntToInt64(x1.AuxInt)
 17351  			y := x1.Args[0]
 17352  			if !(clobberIfDead(x1)) {
 17353  				continue
 17354  			}
 17355  			v.reset(OpARM64TSTshiftRO)
 17356  			v.AuxInt = int64ToAuxInt(c)
 17357  			v.AddArg2(x0, y)
 17358  			return true
 17359  		}
 17360  		break
 17361  	}
 17362  	return false
 17363  }
 17364  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 17365  	v_1 := v.Args[1]
 17366  	v_0 := v.Args[0]
 17367  	// match: (TSTW x (MOVDconst [c]))
 17368  	// result: (TSTWconst [int32(c)] x)
 17369  	for {
 17370  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17371  			x := v_0
 17372  			if v_1.Op != OpARM64MOVDconst {
 17373  				continue
 17374  			}
 17375  			c := auxIntToInt64(v_1.AuxInt)
 17376  			v.reset(OpARM64TSTWconst)
 17377  			v.AuxInt = int32ToAuxInt(int32(c))
 17378  			v.AddArg(x)
 17379  			return true
 17380  		}
 17381  		break
 17382  	}
 17383  	return false
 17384  }
 17385  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 17386  	v_0 := v.Args[0]
 17387  	// match: (TSTWconst (MOVDconst [x]) [y])
 17388  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 17389  	for {
 17390  		y := auxIntToInt32(v.AuxInt)
 17391  		if v_0.Op != OpARM64MOVDconst {
 17392  			break
 17393  		}
 17394  		x := auxIntToInt64(v_0.AuxInt)
 17395  		v.reset(OpARM64FlagConstant)
 17396  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 17397  		return true
 17398  	}
 17399  	return false
 17400  }
 17401  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 17402  	v_0 := v.Args[0]
 17403  	// match: (TSTconst (MOVDconst [x]) [y])
 17404  	// result: (FlagConstant [logicFlags64(x&y)])
 17405  	for {
 17406  		y := auxIntToInt64(v.AuxInt)
 17407  		if v_0.Op != OpARM64MOVDconst {
 17408  			break
 17409  		}
 17410  		x := auxIntToInt64(v_0.AuxInt)
 17411  		v.reset(OpARM64FlagConstant)
 17412  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 17413  		return true
 17414  	}
 17415  	return false
 17416  }
 17417  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 17418  	v_1 := v.Args[1]
 17419  	v_0 := v.Args[0]
 17420  	b := v.Block
 17421  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 17422  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 17423  	for {
 17424  		d := auxIntToInt64(v.AuxInt)
 17425  		if v_0.Op != OpARM64MOVDconst {
 17426  			break
 17427  		}
 17428  		c := auxIntToInt64(v_0.AuxInt)
 17429  		x := v_1
 17430  		v.reset(OpARM64TSTconst)
 17431  		v.AuxInt = int64ToAuxInt(c)
 17432  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 17433  		v0.AuxInt = int64ToAuxInt(d)
 17434  		v0.AddArg(x)
 17435  		v.AddArg(v0)
 17436  		return true
 17437  	}
 17438  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 17439  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 17440  	for {
 17441  		d := auxIntToInt64(v.AuxInt)
 17442  		x := v_0
 17443  		if v_1.Op != OpARM64MOVDconst {
 17444  			break
 17445  		}
 17446  		c := auxIntToInt64(v_1.AuxInt)
 17447  		v.reset(OpARM64TSTconst)
 17448  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17449  		v.AddArg(x)
 17450  		return true
 17451  	}
 17452  	return false
 17453  }
 17454  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 17455  	v_1 := v.Args[1]
 17456  	v_0 := v.Args[0]
 17457  	b := v.Block
 17458  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 17459  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 17460  	for {
 17461  		d := auxIntToInt64(v.AuxInt)
 17462  		if v_0.Op != OpARM64MOVDconst {
 17463  			break
 17464  		}
 17465  		c := auxIntToInt64(v_0.AuxInt)
 17466  		x := v_1
 17467  		v.reset(OpARM64TSTconst)
 17468  		v.AuxInt = int64ToAuxInt(c)
 17469  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 17470  		v0.AuxInt = int64ToAuxInt(d)
 17471  		v0.AddArg(x)
 17472  		v.AddArg(v0)
 17473  		return true
 17474  	}
 17475  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 17476  	// result: (TSTconst x [c>>uint64(d)])
 17477  	for {
 17478  		d := auxIntToInt64(v.AuxInt)
 17479  		x := v_0
 17480  		if v_1.Op != OpARM64MOVDconst {
 17481  			break
 17482  		}
 17483  		c := auxIntToInt64(v_1.AuxInt)
 17484  		v.reset(OpARM64TSTconst)
 17485  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17486  		v.AddArg(x)
 17487  		return true
 17488  	}
 17489  	return false
 17490  }
 17491  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 17492  	v_1 := v.Args[1]
 17493  	v_0 := v.Args[0]
 17494  	b := v.Block
 17495  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 17496  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 17497  	for {
 17498  		d := auxIntToInt64(v.AuxInt)
 17499  		if v_0.Op != OpARM64MOVDconst {
 17500  			break
 17501  		}
 17502  		c := auxIntToInt64(v_0.AuxInt)
 17503  		x := v_1
 17504  		v.reset(OpARM64TSTconst)
 17505  		v.AuxInt = int64ToAuxInt(c)
 17506  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 17507  		v0.AuxInt = int64ToAuxInt(d)
 17508  		v0.AddArg(x)
 17509  		v.AddArg(v0)
 17510  		return true
 17511  	}
 17512  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 17513  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 17514  	for {
 17515  		d := auxIntToInt64(v.AuxInt)
 17516  		x := v_0
 17517  		if v_1.Op != OpARM64MOVDconst {
 17518  			break
 17519  		}
 17520  		c := auxIntToInt64(v_1.AuxInt)
 17521  		v.reset(OpARM64TSTconst)
 17522  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17523  		v.AddArg(x)
 17524  		return true
 17525  	}
 17526  	return false
 17527  }
 17528  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 17529  	v_1 := v.Args[1]
 17530  	v_0 := v.Args[0]
 17531  	b := v.Block
 17532  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 17533  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 17534  	for {
 17535  		d := auxIntToInt64(v.AuxInt)
 17536  		if v_0.Op != OpARM64MOVDconst {
 17537  			break
 17538  		}
 17539  		c := auxIntToInt64(v_0.AuxInt)
 17540  		x := v_1
 17541  		v.reset(OpARM64TSTconst)
 17542  		v.AuxInt = int64ToAuxInt(c)
 17543  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 17544  		v0.AuxInt = int64ToAuxInt(d)
 17545  		v0.AddArg(x)
 17546  		v.AddArg(v0)
 17547  		return true
 17548  	}
 17549  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 17550  	// result: (TSTconst x [rotateRight64(c, d)])
 17551  	for {
 17552  		d := auxIntToInt64(v.AuxInt)
 17553  		x := v_0
 17554  		if v_1.Op != OpARM64MOVDconst {
 17555  			break
 17556  		}
 17557  		c := auxIntToInt64(v_1.AuxInt)
 17558  		v.reset(OpARM64TSTconst)
 17559  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 17560  		v.AddArg(x)
 17561  		return true
 17562  	}
 17563  	return false
 17564  }
 17565  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 17566  	v_0 := v.Args[0]
 17567  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 17568  	// cond: sc < bfc.width()
 17569  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 17570  	for {
 17571  		bfc := auxIntToArm64BitField(v.AuxInt)
 17572  		if v_0.Op != OpARM64SLLconst {
 17573  			break
 17574  		}
 17575  		sc := auxIntToInt64(v_0.AuxInt)
 17576  		x := v_0.Args[0]
 17577  		if !(sc < bfc.width()) {
 17578  			break
 17579  		}
 17580  		v.reset(OpARM64UBFIZ)
 17581  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 17582  		v.AddArg(x)
 17583  		return true
 17584  	}
 17585  	return false
 17586  }
 17587  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 17588  	v_0 := v.Args[0]
 17589  	// match: (UBFX [bfc] (ANDconst [c] x))
 17590  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 17591  	// result: (UBFX [bfc] x)
 17592  	for {
 17593  		bfc := auxIntToArm64BitField(v.AuxInt)
 17594  		if v_0.Op != OpARM64ANDconst {
 17595  			break
 17596  		}
 17597  		c := auxIntToInt64(v_0.AuxInt)
 17598  		x := v_0.Args[0]
 17599  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 17600  			break
 17601  		}
 17602  		v.reset(OpARM64UBFX)
 17603  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 17604  		v.AddArg(x)
 17605  		return true
 17606  	}
 17607  	// match: (UBFX [bfc] e:(MOVWUreg x))
 17608  	// cond: e.Uses == 1 && bfc.lsb() < 32
 17609  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 17610  	for {
 17611  		bfc := auxIntToArm64BitField(v.AuxInt)
 17612  		e := v_0
 17613  		if e.Op != OpARM64MOVWUreg {
 17614  			break
 17615  		}
 17616  		x := e.Args[0]
 17617  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 17618  			break
 17619  		}
 17620  		v.reset(OpARM64UBFX)
 17621  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 17622  		v.AddArg(x)
 17623  		return true
 17624  	}
 17625  	// match: (UBFX [bfc] e:(MOVHUreg x))
 17626  	// cond: e.Uses == 1 && bfc.lsb() < 16
 17627  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 17628  	for {
 17629  		bfc := auxIntToArm64BitField(v.AuxInt)
 17630  		e := v_0
 17631  		if e.Op != OpARM64MOVHUreg {
 17632  			break
 17633  		}
 17634  		x := e.Args[0]
 17635  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 17636  			break
 17637  		}
 17638  		v.reset(OpARM64UBFX)
 17639  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 17640  		v.AddArg(x)
 17641  		return true
 17642  	}
 17643  	// match: (UBFX [bfc] e:(MOVBUreg x))
 17644  	// cond: e.Uses == 1 && bfc.lsb() < 8
 17645  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 17646  	for {
 17647  		bfc := auxIntToArm64BitField(v.AuxInt)
 17648  		e := v_0
 17649  		if e.Op != OpARM64MOVBUreg {
 17650  			break
 17651  		}
 17652  		x := e.Args[0]
 17653  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 17654  			break
 17655  		}
 17656  		v.reset(OpARM64UBFX)
 17657  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 17658  		v.AddArg(x)
 17659  		return true
 17660  	}
 17661  	// match: (UBFX [bfc] (SRLconst [sc] x))
 17662  	// cond: sc+bfc.width()+bfc.lsb() < 64
 17663  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 17664  	for {
 17665  		bfc := auxIntToArm64BitField(v.AuxInt)
 17666  		if v_0.Op != OpARM64SRLconst {
 17667  			break
 17668  		}
 17669  		sc := auxIntToInt64(v_0.AuxInt)
 17670  		x := v_0.Args[0]
 17671  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 17672  			break
 17673  		}
 17674  		v.reset(OpARM64UBFX)
 17675  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 17676  		v.AddArg(x)
 17677  		return true
 17678  	}
 17679  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17680  	// cond: sc == bfc.lsb()
 17681  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 17682  	for {
 17683  		bfc := auxIntToArm64BitField(v.AuxInt)
 17684  		if v_0.Op != OpARM64SLLconst {
 17685  			break
 17686  		}
 17687  		sc := auxIntToInt64(v_0.AuxInt)
 17688  		x := v_0.Args[0]
 17689  		if !(sc == bfc.lsb()) {
 17690  			break
 17691  		}
 17692  		v.reset(OpARM64ANDconst)
 17693  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 17694  		v.AddArg(x)
 17695  		return true
 17696  	}
 17697  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17698  	// cond: sc < bfc.lsb()
 17699  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 17700  	for {
 17701  		bfc := auxIntToArm64BitField(v.AuxInt)
 17702  		if v_0.Op != OpARM64SLLconst {
 17703  			break
 17704  		}
 17705  		sc := auxIntToInt64(v_0.AuxInt)
 17706  		x := v_0.Args[0]
 17707  		if !(sc < bfc.lsb()) {
 17708  			break
 17709  		}
 17710  		v.reset(OpARM64UBFX)
 17711  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 17712  		v.AddArg(x)
 17713  		return true
 17714  	}
 17715  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17716  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 17717  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 17718  	for {
 17719  		bfc := auxIntToArm64BitField(v.AuxInt)
 17720  		if v_0.Op != OpARM64SLLconst {
 17721  			break
 17722  		}
 17723  		sc := auxIntToInt64(v_0.AuxInt)
 17724  		x := v_0.Args[0]
 17725  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 17726  			break
 17727  		}
 17728  		v.reset(OpARM64UBFIZ)
 17729  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 17730  		v.AddArg(x)
 17731  		return true
 17732  	}
 17733  	return false
 17734  }
 17735  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 17736  	v_1 := v.Args[1]
 17737  	v_0 := v.Args[0]
 17738  	// match: (UDIV x (MOVDconst [1]))
 17739  	// result: x
 17740  	for {
 17741  		x := v_0
 17742  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17743  			break
 17744  		}
 17745  		v.copyOf(x)
 17746  		return true
 17747  	}
 17748  	// match: (UDIV x (MOVDconst [c]))
 17749  	// cond: isPowerOfTwo(c)
 17750  	// result: (SRLconst [log64(c)] x)
 17751  	for {
 17752  		x := v_0
 17753  		if v_1.Op != OpARM64MOVDconst {
 17754  			break
 17755  		}
 17756  		c := auxIntToInt64(v_1.AuxInt)
 17757  		if !(isPowerOfTwo(c)) {
 17758  			break
 17759  		}
 17760  		v.reset(OpARM64SRLconst)
 17761  		v.AuxInt = int64ToAuxInt(log64(c))
 17762  		v.AddArg(x)
 17763  		return true
 17764  	}
 17765  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 17766  	// cond: d != 0
 17767  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 17768  	for {
 17769  		if v_0.Op != OpARM64MOVDconst {
 17770  			break
 17771  		}
 17772  		c := auxIntToInt64(v_0.AuxInt)
 17773  		if v_1.Op != OpARM64MOVDconst {
 17774  			break
 17775  		}
 17776  		d := auxIntToInt64(v_1.AuxInt)
 17777  		if !(d != 0) {
 17778  			break
 17779  		}
 17780  		v.reset(OpARM64MOVDconst)
 17781  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 17782  		return true
 17783  	}
 17784  	return false
 17785  }
 17786  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 17787  	v_1 := v.Args[1]
 17788  	v_0 := v.Args[0]
 17789  	b := v.Block
 17790  	// match: (UDIVW x (MOVDconst [c]))
 17791  	// cond: uint32(c)==1
 17792  	// result: (MOVWUreg x)
 17793  	for {
 17794  		x := v_0
 17795  		if v_1.Op != OpARM64MOVDconst {
 17796  			break
 17797  		}
 17798  		c := auxIntToInt64(v_1.AuxInt)
 17799  		if !(uint32(c) == 1) {
 17800  			break
 17801  		}
 17802  		v.reset(OpARM64MOVWUreg)
 17803  		v.AddArg(x)
 17804  		return true
 17805  	}
 17806  	// match: (UDIVW x (MOVDconst [c]))
 17807  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17808  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 17809  	for {
 17810  		x := v_0
 17811  		if v_1.Op != OpARM64MOVDconst {
 17812  			break
 17813  		}
 17814  		c := auxIntToInt64(v_1.AuxInt)
 17815  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17816  			break
 17817  		}
 17818  		v.reset(OpARM64SRLconst)
 17819  		v.AuxInt = int64ToAuxInt(log64(c))
 17820  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 17821  		v0.AddArg(x)
 17822  		v.AddArg(v0)
 17823  		return true
 17824  	}
 17825  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 17826  	// cond: d != 0
 17827  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 17828  	for {
 17829  		if v_0.Op != OpARM64MOVDconst {
 17830  			break
 17831  		}
 17832  		c := auxIntToInt64(v_0.AuxInt)
 17833  		if v_1.Op != OpARM64MOVDconst {
 17834  			break
 17835  		}
 17836  		d := auxIntToInt64(v_1.AuxInt)
 17837  		if !(d != 0) {
 17838  			break
 17839  		}
 17840  		v.reset(OpARM64MOVDconst)
 17841  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 17842  		return true
 17843  	}
 17844  	return false
 17845  }
 17846  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 17847  	v_1 := v.Args[1]
 17848  	v_0 := v.Args[0]
 17849  	b := v.Block
 17850  	typ := &b.Func.Config.Types
 17851  	// match: (UMOD <typ.UInt64> x y)
 17852  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 17853  	for {
 17854  		if v.Type != typ.UInt64 {
 17855  			break
 17856  		}
 17857  		x := v_0
 17858  		y := v_1
 17859  		v.reset(OpARM64MSUB)
 17860  		v.Type = typ.UInt64
 17861  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 17862  		v0.AddArg2(x, y)
 17863  		v.AddArg3(x, y, v0)
 17864  		return true
 17865  	}
 17866  	// match: (UMOD _ (MOVDconst [1]))
 17867  	// result: (MOVDconst [0])
 17868  	for {
 17869  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17870  			break
 17871  		}
 17872  		v.reset(OpARM64MOVDconst)
 17873  		v.AuxInt = int64ToAuxInt(0)
 17874  		return true
 17875  	}
 17876  	// match: (UMOD x (MOVDconst [c]))
 17877  	// cond: isPowerOfTwo(c)
 17878  	// result: (ANDconst [c-1] x)
 17879  	for {
 17880  		x := v_0
 17881  		if v_1.Op != OpARM64MOVDconst {
 17882  			break
 17883  		}
 17884  		c := auxIntToInt64(v_1.AuxInt)
 17885  		if !(isPowerOfTwo(c)) {
 17886  			break
 17887  		}
 17888  		v.reset(OpARM64ANDconst)
 17889  		v.AuxInt = int64ToAuxInt(c - 1)
 17890  		v.AddArg(x)
 17891  		return true
 17892  	}
 17893  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 17894  	// cond: d != 0
 17895  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 17896  	for {
 17897  		if v_0.Op != OpARM64MOVDconst {
 17898  			break
 17899  		}
 17900  		c := auxIntToInt64(v_0.AuxInt)
 17901  		if v_1.Op != OpARM64MOVDconst {
 17902  			break
 17903  		}
 17904  		d := auxIntToInt64(v_1.AuxInt)
 17905  		if !(d != 0) {
 17906  			break
 17907  		}
 17908  		v.reset(OpARM64MOVDconst)
 17909  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 17910  		return true
 17911  	}
 17912  	return false
 17913  }
 17914  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 17915  	v_1 := v.Args[1]
 17916  	v_0 := v.Args[0]
 17917  	b := v.Block
 17918  	typ := &b.Func.Config.Types
 17919  	// match: (UMODW <typ.UInt32> x y)
 17920  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 17921  	for {
 17922  		if v.Type != typ.UInt32 {
 17923  			break
 17924  		}
 17925  		x := v_0
 17926  		y := v_1
 17927  		v.reset(OpARM64MSUBW)
 17928  		v.Type = typ.UInt32
 17929  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 17930  		v0.AddArg2(x, y)
 17931  		v.AddArg3(x, y, v0)
 17932  		return true
 17933  	}
 17934  	// match: (UMODW _ (MOVDconst [c]))
 17935  	// cond: uint32(c)==1
 17936  	// result: (MOVDconst [0])
 17937  	for {
 17938  		if v_1.Op != OpARM64MOVDconst {
 17939  			break
 17940  		}
 17941  		c := auxIntToInt64(v_1.AuxInt)
 17942  		if !(uint32(c) == 1) {
 17943  			break
 17944  		}
 17945  		v.reset(OpARM64MOVDconst)
 17946  		v.AuxInt = int64ToAuxInt(0)
 17947  		return true
 17948  	}
 17949  	// match: (UMODW x (MOVDconst [c]))
 17950  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17951  	// result: (ANDconst [c-1] x)
 17952  	for {
 17953  		x := v_0
 17954  		if v_1.Op != OpARM64MOVDconst {
 17955  			break
 17956  		}
 17957  		c := auxIntToInt64(v_1.AuxInt)
 17958  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17959  			break
 17960  		}
 17961  		v.reset(OpARM64ANDconst)
 17962  		v.AuxInt = int64ToAuxInt(c - 1)
 17963  		v.AddArg(x)
 17964  		return true
 17965  	}
 17966  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 17967  	// cond: d != 0
 17968  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 17969  	for {
 17970  		if v_0.Op != OpARM64MOVDconst {
 17971  			break
 17972  		}
 17973  		c := auxIntToInt64(v_0.AuxInt)
 17974  		if v_1.Op != OpARM64MOVDconst {
 17975  			break
 17976  		}
 17977  		d := auxIntToInt64(v_1.AuxInt)
 17978  		if !(d != 0) {
 17979  			break
 17980  		}
 17981  		v.reset(OpARM64MOVDconst)
 17982  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 17983  		return true
 17984  	}
 17985  	return false
 17986  }
 17987  func rewriteValueARM64_OpARM64VBIF16B(v *Value) bool {
 17988  	v_2 := v.Args[2]
 17989  	v_1 := v.Args[1]
 17990  	v_0 := v.Args[0]
 17991  	// match: (VBIF16B x y (VNOT16B mask))
 17992  	// result: (VBIT16B x y mask)
 17993  	for {
 17994  		x := v_0
 17995  		y := v_1
 17996  		if v_2.Op != OpARM64VNOT16B {
 17997  			break
 17998  		}
 17999  		mask := v_2.Args[0]
 18000  		v.reset(OpARM64VBIT16B)
 18001  		v.AddArg3(x, y, mask)
 18002  		return true
 18003  	}
 18004  	return false
 18005  }
 18006  func rewriteValueARM64_OpARM64VBIT16B(v *Value) bool {
 18007  	v_2 := v.Args[2]
 18008  	v_1 := v.Args[1]
 18009  	v_0 := v.Args[0]
 18010  	// match: (VBIT16B x y (VNOT16B mask))
 18011  	// result: (VBIF16B x y mask)
 18012  	for {
 18013  		x := v_0
 18014  		y := v_1
 18015  		if v_2.Op != OpARM64VNOT16B {
 18016  			break
 18017  		}
 18018  		mask := v_2.Args[0]
 18019  		v.reset(OpARM64VBIF16B)
 18020  		v.AddArg3(x, y, mask)
 18021  		return true
 18022  	}
 18023  	return false
 18024  }
 18025  func rewriteValueARM64_OpARM64VDUPBbcast(v *Value) bool {
 18026  	v_0 := v.Args[0]
 18027  	// match: (VDUPBbcast [i] (VMOVBins [j] _ (MOVDconst [c])))
 18028  	// cond: i == j && c>=-128 && c<=255
 18029  	// result: (VMOVI16B [uint8(c)])
 18030  	for {
 18031  		i := auxIntToUint8(v.AuxInt)
 18032  		if v_0.Op != OpARM64VMOVBins {
 18033  			break
 18034  		}
 18035  		j := auxIntToUint8(v_0.AuxInt)
 18036  		_ = v_0.Args[1]
 18037  		v_0_1 := v_0.Args[1]
 18038  		if v_0_1.Op != OpARM64MOVDconst {
 18039  			break
 18040  		}
 18041  		c := auxIntToInt64(v_0_1.AuxInt)
 18042  		if !(i == j && c >= -128 && c <= 255) {
 18043  			break
 18044  		}
 18045  		v.reset(OpARM64VMOVI16B)
 18046  		v.AuxInt = uint8ToAuxInt(uint8(c))
 18047  		return true
 18048  	}
 18049  	return false
 18050  }
 18051  func rewriteValueARM64_OpARM64VFCVTL4S(v *Value) bool {
 18052  	v_0 := v.Args[0]
 18053  	// match: (VFCVTL4S (VDUPDextr [1] x))
 18054  	// result: (VFCVTL2_4S x)
 18055  	for {
 18056  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18057  			break
 18058  		}
 18059  		x := v_0.Args[0]
 18060  		v.reset(OpARM64VFCVTL2_4S)
 18061  		v.AddArg(x)
 18062  		return true
 18063  	}
 18064  	return false
 18065  }
 18066  func rewriteValueARM64_OpARM64VMOVDins0(v *Value) bool {
 18067  	v_1 := v.Args[1]
 18068  	v_0 := v.Args[0]
 18069  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VFCVTN2D y)))
 18070  	// result: (VFCVTN2_2D dst y)
 18071  	for {
 18072  		if auxIntToUint8(v.AuxInt) != 1 {
 18073  			break
 18074  		}
 18075  		dst := v_0
 18076  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18077  			break
 18078  		}
 18079  		v_1_0 := v_1.Args[0]
 18080  		if v_1_0.Op != OpARM64VFCVTN2D {
 18081  			break
 18082  		}
 18083  		y := v_1_0.Args[0]
 18084  		v.reset(OpARM64VFCVTN2_2D)
 18085  		v.AddArg2(dst, y)
 18086  		return true
 18087  	}
 18088  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN2D [c] y)))
 18089  	// result: (VSHRN2_2D dst [c] y)
 18090  	for {
 18091  		if auxIntToUint8(v.AuxInt) != 1 {
 18092  			break
 18093  		}
 18094  		dst := v_0
 18095  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18096  			break
 18097  		}
 18098  		v_1_0 := v_1.Args[0]
 18099  		if v_1_0.Op != OpARM64VSHRN2D {
 18100  			break
 18101  		}
 18102  		c := auxIntToUint8(v_1_0.AuxInt)
 18103  		y := v_1_0.Args[0]
 18104  		v.reset(OpARM64VSHRN2_2D)
 18105  		v.AuxInt = uint8ToAuxInt(c)
 18106  		v.AddArg2(dst, y)
 18107  		return true
 18108  	}
 18109  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN4S [c] y)))
 18110  	// result: (VSHRN2_4S dst [c] y)
 18111  	for {
 18112  		if auxIntToUint8(v.AuxInt) != 1 {
 18113  			break
 18114  		}
 18115  		dst := v_0
 18116  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18117  			break
 18118  		}
 18119  		v_1_0 := v_1.Args[0]
 18120  		if v_1_0.Op != OpARM64VSHRN4S {
 18121  			break
 18122  		}
 18123  		c := auxIntToUint8(v_1_0.AuxInt)
 18124  		y := v_1_0.Args[0]
 18125  		v.reset(OpARM64VSHRN2_4S)
 18126  		v.AuxInt = uint8ToAuxInt(c)
 18127  		v.AddArg2(dst, y)
 18128  		return true
 18129  	}
 18130  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSHRN8H [c] y)))
 18131  	// result: (VSHRN2_8H dst [c] y)
 18132  	for {
 18133  		if auxIntToUint8(v.AuxInt) != 1 {
 18134  			break
 18135  		}
 18136  		dst := v_0
 18137  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18138  			break
 18139  		}
 18140  		v_1_0 := v_1.Args[0]
 18141  		if v_1_0.Op != OpARM64VSHRN8H {
 18142  			break
 18143  		}
 18144  		c := auxIntToUint8(v_1_0.AuxInt)
 18145  		y := v_1_0.Args[0]
 18146  		v.reset(OpARM64VSHRN2_8H)
 18147  		v.AuxInt = uint8ToAuxInt(c)
 18148  		v.AddArg2(dst, y)
 18149  		return true
 18150  	}
 18151  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN2D y)))
 18152  	// result: (VSQXTN2_2D dst y)
 18153  	for {
 18154  		if auxIntToUint8(v.AuxInt) != 1 {
 18155  			break
 18156  		}
 18157  		dst := v_0
 18158  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18159  			break
 18160  		}
 18161  		v_1_0 := v_1.Args[0]
 18162  		if v_1_0.Op != OpARM64VSQXTN2D {
 18163  			break
 18164  		}
 18165  		y := v_1_0.Args[0]
 18166  		v.reset(OpARM64VSQXTN2_2D)
 18167  		v.AddArg2(dst, y)
 18168  		return true
 18169  	}
 18170  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN4S y)))
 18171  	// result: (VSQXTN2_4S dst y)
 18172  	for {
 18173  		if auxIntToUint8(v.AuxInt) != 1 {
 18174  			break
 18175  		}
 18176  		dst := v_0
 18177  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18178  			break
 18179  		}
 18180  		v_1_0 := v_1.Args[0]
 18181  		if v_1_0.Op != OpARM64VSQXTN4S {
 18182  			break
 18183  		}
 18184  		y := v_1_0.Args[0]
 18185  		v.reset(OpARM64VSQXTN2_4S)
 18186  		v.AddArg2(dst, y)
 18187  		return true
 18188  	}
 18189  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTN8H y)))
 18190  	// result: (VSQXTN2_8H dst y)
 18191  	for {
 18192  		if auxIntToUint8(v.AuxInt) != 1 {
 18193  			break
 18194  		}
 18195  		dst := v_0
 18196  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18197  			break
 18198  		}
 18199  		v_1_0 := v_1.Args[0]
 18200  		if v_1_0.Op != OpARM64VSQXTN8H {
 18201  			break
 18202  		}
 18203  		y := v_1_0.Args[0]
 18204  		v.reset(OpARM64VSQXTN2_8H)
 18205  		v.AddArg2(dst, y)
 18206  		return true
 18207  	}
 18208  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN2D y)))
 18209  	// result: (VSQXTUN2_2D dst y)
 18210  	for {
 18211  		if auxIntToUint8(v.AuxInt) != 1 {
 18212  			break
 18213  		}
 18214  		dst := v_0
 18215  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18216  			break
 18217  		}
 18218  		v_1_0 := v_1.Args[0]
 18219  		if v_1_0.Op != OpARM64VSQXTUN2D {
 18220  			break
 18221  		}
 18222  		y := v_1_0.Args[0]
 18223  		v.reset(OpARM64VSQXTUN2_2D)
 18224  		v.AddArg2(dst, y)
 18225  		return true
 18226  	}
 18227  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN4S y)))
 18228  	// result: (VSQXTUN2_4S dst y)
 18229  	for {
 18230  		if auxIntToUint8(v.AuxInt) != 1 {
 18231  			break
 18232  		}
 18233  		dst := v_0
 18234  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18235  			break
 18236  		}
 18237  		v_1_0 := v_1.Args[0]
 18238  		if v_1_0.Op != OpARM64VSQXTUN4S {
 18239  			break
 18240  		}
 18241  		y := v_1_0.Args[0]
 18242  		v.reset(OpARM64VSQXTUN2_4S)
 18243  		v.AddArg2(dst, y)
 18244  		return true
 18245  	}
 18246  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VSQXTUN8H y)))
 18247  	// result: (VSQXTUN2_8H dst y)
 18248  	for {
 18249  		if auxIntToUint8(v.AuxInt) != 1 {
 18250  			break
 18251  		}
 18252  		dst := v_0
 18253  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18254  			break
 18255  		}
 18256  		v_1_0 := v_1.Args[0]
 18257  		if v_1_0.Op != OpARM64VSQXTUN8H {
 18258  			break
 18259  		}
 18260  		y := v_1_0.Args[0]
 18261  		v.reset(OpARM64VSQXTUN2_8H)
 18262  		v.AddArg2(dst, y)
 18263  		return true
 18264  	}
 18265  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN2D y)))
 18266  	// result: (VUQXTN2_2D dst y)
 18267  	for {
 18268  		if auxIntToUint8(v.AuxInt) != 1 {
 18269  			break
 18270  		}
 18271  		dst := v_0
 18272  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18273  			break
 18274  		}
 18275  		v_1_0 := v_1.Args[0]
 18276  		if v_1_0.Op != OpARM64VUQXTN2D {
 18277  			break
 18278  		}
 18279  		y := v_1_0.Args[0]
 18280  		v.reset(OpARM64VUQXTN2_2D)
 18281  		v.AddArg2(dst, y)
 18282  		return true
 18283  	}
 18284  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN4S y)))
 18285  	// result: (VUQXTN2_4S dst y)
 18286  	for {
 18287  		if auxIntToUint8(v.AuxInt) != 1 {
 18288  			break
 18289  		}
 18290  		dst := v_0
 18291  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18292  			break
 18293  		}
 18294  		v_1_0 := v_1.Args[0]
 18295  		if v_1_0.Op != OpARM64VUQXTN4S {
 18296  			break
 18297  		}
 18298  		y := v_1_0.Args[0]
 18299  		v.reset(OpARM64VUQXTN2_4S)
 18300  		v.AddArg2(dst, y)
 18301  		return true
 18302  	}
 18303  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VUQXTN8H y)))
 18304  	// result: (VUQXTN2_8H dst y)
 18305  	for {
 18306  		if auxIntToUint8(v.AuxInt) != 1 {
 18307  			break
 18308  		}
 18309  		dst := v_0
 18310  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18311  			break
 18312  		}
 18313  		v_1_0 := v_1.Args[0]
 18314  		if v_1_0.Op != OpARM64VUQXTN8H {
 18315  			break
 18316  		}
 18317  		y := v_1_0.Args[0]
 18318  		v.reset(OpARM64VUQXTN2_8H)
 18319  		v.AddArg2(dst, y)
 18320  		return true
 18321  	}
 18322  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN2D y)))
 18323  	// result: (VXTN2_2D dst y)
 18324  	for {
 18325  		if auxIntToUint8(v.AuxInt) != 1 {
 18326  			break
 18327  		}
 18328  		dst := v_0
 18329  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18330  			break
 18331  		}
 18332  		v_1_0 := v_1.Args[0]
 18333  		if v_1_0.Op != OpARM64VXTN2D {
 18334  			break
 18335  		}
 18336  		y := v_1_0.Args[0]
 18337  		v.reset(OpARM64VXTN2_2D)
 18338  		v.AddArg2(dst, y)
 18339  		return true
 18340  	}
 18341  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN4S y)))
 18342  	// result: (VXTN2_4S dst y)
 18343  	for {
 18344  		if auxIntToUint8(v.AuxInt) != 1 {
 18345  			break
 18346  		}
 18347  		dst := v_0
 18348  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18349  			break
 18350  		}
 18351  		v_1_0 := v_1.Args[0]
 18352  		if v_1_0.Op != OpARM64VXTN4S {
 18353  			break
 18354  		}
 18355  		y := v_1_0.Args[0]
 18356  		v.reset(OpARM64VXTN2_4S)
 18357  		v.AddArg2(dst, y)
 18358  		return true
 18359  	}
 18360  	// match: (VMOVDins0 [1] dst (VDUPDextr [0] (VXTN8H y)))
 18361  	// result: (VXTN2_8H dst y)
 18362  	for {
 18363  		if auxIntToUint8(v.AuxInt) != 1 {
 18364  			break
 18365  		}
 18366  		dst := v_0
 18367  		if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 0 {
 18368  			break
 18369  		}
 18370  		v_1_0 := v_1.Args[0]
 18371  		if v_1_0.Op != OpARM64VXTN8H {
 18372  			break
 18373  		}
 18374  		y := v_1_0.Args[0]
 18375  		v.reset(OpARM64VXTN2_8H)
 18376  		v.AddArg2(dst, y)
 18377  		return true
 18378  	}
 18379  	// match: (VMOVDins0 [0] (VMOVI16B [0]) y:(VDUPDextr [i] _))
 18380  	// result: y
 18381  	for {
 18382  		if auxIntToUint8(v.AuxInt) != 0 || v_0.Op != OpARM64VMOVI16B || auxIntToUint8(v_0.AuxInt) != 0 {
 18383  			break
 18384  		}
 18385  		y := v_1
 18386  		if y.Op != OpARM64VDUPDextr {
 18387  			break
 18388  		}
 18389  		v.copyOf(y)
 18390  		return true
 18391  	}
 18392  	return false
 18393  }
 18394  func rewriteValueARM64_OpARM64VMOVSins0(v *Value) bool {
 18395  	v_1 := v.Args[1]
 18396  	v_0 := v.Args[0]
 18397  	// match: (VMOVSins0 [0] (VMOVI16B [0]) y:(VDUPSextr [i] _))
 18398  	// result: y
 18399  	for {
 18400  		if auxIntToUint8(v.AuxInt) != 0 || v_0.Op != OpARM64VMOVI16B || auxIntToUint8(v_0.AuxInt) != 0 {
 18401  			break
 18402  		}
 18403  		y := v_1
 18404  		if y.Op != OpARM64VDUPSextr {
 18405  			break
 18406  		}
 18407  		v.copyOf(y)
 18408  		return true
 18409  	}
 18410  	return false
 18411  }
 18412  func rewriteValueARM64_OpARM64VPMULL2D(v *Value) bool {
 18413  	v_1 := v.Args[1]
 18414  	v_0 := v.Args[0]
 18415  	// match: (VPMULL2D (VDUPDextr [1] x) (VDUPDextr [1] y))
 18416  	// result: (VPMULL2_2D x y)
 18417  	for {
 18418  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18419  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18420  				continue
 18421  			}
 18422  			x := v_0.Args[0]
 18423  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18424  				continue
 18425  			}
 18426  			y := v_1.Args[0]
 18427  			v.reset(OpARM64VPMULL2_2D)
 18428  			v.AddArg2(x, y)
 18429  			return true
 18430  		}
 18431  		break
 18432  	}
 18433  	return false
 18434  }
 18435  func rewriteValueARM64_OpARM64VSHL16B(v *Value) bool {
 18436  	v_0 := v.Args[0]
 18437  	// match: (VSHL16B [a] x)
 18438  	// cond: a==0
 18439  	// result: x
 18440  	for {
 18441  		a := auxIntToUint8(v.AuxInt)
 18442  		x := v_0
 18443  		if !(a == 0) {
 18444  			break
 18445  		}
 18446  		v.copyOf(x)
 18447  		return true
 18448  	}
 18449  	return false
 18450  }
 18451  func rewriteValueARM64_OpARM64VSHL2D(v *Value) bool {
 18452  	v_0 := v.Args[0]
 18453  	// match: (VSHL2D [a] x)
 18454  	// cond: a==0
 18455  	// result: x
 18456  	for {
 18457  		a := auxIntToUint8(v.AuxInt)
 18458  		x := v_0
 18459  		if !(a == 0) {
 18460  			break
 18461  		}
 18462  		v.copyOf(x)
 18463  		return true
 18464  	}
 18465  	return false
 18466  }
 18467  func rewriteValueARM64_OpARM64VSHL4S(v *Value) bool {
 18468  	v_0 := v.Args[0]
 18469  	// match: (VSHL4S [a] x)
 18470  	// cond: a==0
 18471  	// result: x
 18472  	for {
 18473  		a := auxIntToUint8(v.AuxInt)
 18474  		x := v_0
 18475  		if !(a == 0) {
 18476  			break
 18477  		}
 18478  		v.copyOf(x)
 18479  		return true
 18480  	}
 18481  	return false
 18482  }
 18483  func rewriteValueARM64_OpARM64VSHL8H(v *Value) bool {
 18484  	v_0 := v.Args[0]
 18485  	// match: (VSHL8H [a] x)
 18486  	// cond: a==0
 18487  	// result: x
 18488  	for {
 18489  		a := auxIntToUint8(v.AuxInt)
 18490  		x := v_0
 18491  		if !(a == 0) {
 18492  			break
 18493  		}
 18494  		v.copyOf(x)
 18495  		return true
 18496  	}
 18497  	return false
 18498  }
 18499  func rewriteValueARM64_OpARM64VSHRN2D(v *Value) bool {
 18500  	v_0 := v.Args[0]
 18501  	// match: (VSHRN2D [0] x)
 18502  	// result: (VXTN2D x)
 18503  	for {
 18504  		if auxIntToUint8(v.AuxInt) != 0 {
 18505  			break
 18506  		}
 18507  		x := v_0
 18508  		v.reset(OpARM64VXTN2D)
 18509  		v.AddArg(x)
 18510  		return true
 18511  	}
 18512  	return false
 18513  }
 18514  func rewriteValueARM64_OpARM64VSHRN4S(v *Value) bool {
 18515  	v_0 := v.Args[0]
 18516  	// match: (VSHRN4S [0] x)
 18517  	// result: (VXTN4S x)
 18518  	for {
 18519  		if auxIntToUint8(v.AuxInt) != 0 {
 18520  			break
 18521  		}
 18522  		x := v_0
 18523  		v.reset(OpARM64VXTN4S)
 18524  		v.AddArg(x)
 18525  		return true
 18526  	}
 18527  	return false
 18528  }
 18529  func rewriteValueARM64_OpARM64VSHRN8H(v *Value) bool {
 18530  	v_0 := v.Args[0]
 18531  	// match: (VSHRN8H [0] x)
 18532  	// result: (VXTN8H x)
 18533  	for {
 18534  		if auxIntToUint8(v.AuxInt) != 0 {
 18535  			break
 18536  		}
 18537  		x := v_0
 18538  		v.reset(OpARM64VXTN8H)
 18539  		v.AddArg(x)
 18540  		return true
 18541  	}
 18542  	return false
 18543  }
 18544  func rewriteValueARM64_OpARM64VSMULL16B(v *Value) bool {
 18545  	v_1 := v.Args[1]
 18546  	v_0 := v.Args[0]
 18547  	// match: (VSMULL16B (VDUPDextr [1] x) (VDUPDextr [1] y))
 18548  	// result: (VSMULL2_16B x y)
 18549  	for {
 18550  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18551  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18552  				continue
 18553  			}
 18554  			x := v_0.Args[0]
 18555  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18556  				continue
 18557  			}
 18558  			y := v_1.Args[0]
 18559  			v.reset(OpARM64VSMULL2_16B)
 18560  			v.AddArg2(x, y)
 18561  			return true
 18562  		}
 18563  		break
 18564  	}
 18565  	return false
 18566  }
 18567  func rewriteValueARM64_OpARM64VSMULL4S(v *Value) bool {
 18568  	v_1 := v.Args[1]
 18569  	v_0 := v.Args[0]
 18570  	// match: (VSMULL4S (VDUPDextr [1] x) (VDUPDextr [1] y))
 18571  	// result: (VSMULL2_4S x y)
 18572  	for {
 18573  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18574  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18575  				continue
 18576  			}
 18577  			x := v_0.Args[0]
 18578  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18579  				continue
 18580  			}
 18581  			y := v_1.Args[0]
 18582  			v.reset(OpARM64VSMULL2_4S)
 18583  			v.AddArg2(x, y)
 18584  			return true
 18585  		}
 18586  		break
 18587  	}
 18588  	return false
 18589  }
 18590  func rewriteValueARM64_OpARM64VSMULL8H(v *Value) bool {
 18591  	v_1 := v.Args[1]
 18592  	v_0 := v.Args[0]
 18593  	// match: (VSMULL8H (VDUPDextr [1] x) (VDUPDextr [1] y))
 18594  	// result: (VSMULL2_8H x y)
 18595  	for {
 18596  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18597  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18598  				continue
 18599  			}
 18600  			x := v_0.Args[0]
 18601  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18602  				continue
 18603  			}
 18604  			y := v_1.Args[0]
 18605  			v.reset(OpARM64VSMULL2_8H)
 18606  			v.AddArg2(x, y)
 18607  			return true
 18608  		}
 18609  		break
 18610  	}
 18611  	return false
 18612  }
 18613  func rewriteValueARM64_OpARM64VSQSHL16Bconst(v *Value) bool {
 18614  	v_0 := v.Args[0]
 18615  	// match: (VSQSHL16Bconst [a] x)
 18616  	// cond: a==0
 18617  	// result: x
 18618  	for {
 18619  		a := auxIntToUint8(v.AuxInt)
 18620  		x := v_0
 18621  		if !(a == 0) {
 18622  			break
 18623  		}
 18624  		v.copyOf(x)
 18625  		return true
 18626  	}
 18627  	return false
 18628  }
 18629  func rewriteValueARM64_OpARM64VSQSHL2Dconst(v *Value) bool {
 18630  	v_0 := v.Args[0]
 18631  	// match: (VSQSHL2Dconst [a] x)
 18632  	// cond: a==0
 18633  	// result: x
 18634  	for {
 18635  		a := auxIntToUint8(v.AuxInt)
 18636  		x := v_0
 18637  		if !(a == 0) {
 18638  			break
 18639  		}
 18640  		v.copyOf(x)
 18641  		return true
 18642  	}
 18643  	return false
 18644  }
 18645  func rewriteValueARM64_OpARM64VSQSHL4Sconst(v *Value) bool {
 18646  	v_0 := v.Args[0]
 18647  	// match: (VSQSHL4Sconst [a] x)
 18648  	// cond: a==0
 18649  	// result: x
 18650  	for {
 18651  		a := auxIntToUint8(v.AuxInt)
 18652  		x := v_0
 18653  		if !(a == 0) {
 18654  			break
 18655  		}
 18656  		v.copyOf(x)
 18657  		return true
 18658  	}
 18659  	return false
 18660  }
 18661  func rewriteValueARM64_OpARM64VSQSHL8Hconst(v *Value) bool {
 18662  	v_0 := v.Args[0]
 18663  	// match: (VSQSHL8Hconst [a] x)
 18664  	// cond: a==0
 18665  	// result: x
 18666  	for {
 18667  		a := auxIntToUint8(v.AuxInt)
 18668  		x := v_0
 18669  		if !(a == 0) {
 18670  			break
 18671  		}
 18672  		v.copyOf(x)
 18673  		return true
 18674  	}
 18675  	return false
 18676  }
 18677  func rewriteValueARM64_OpARM64VSSHLL16B(v *Value) bool {
 18678  	v_0 := v.Args[0]
 18679  	// match: (VSSHLL16B [a] (VDUPDextr [1] x))
 18680  	// result: (VSSHLL2_16B [a] x)
 18681  	for {
 18682  		a := auxIntToUint8(v.AuxInt)
 18683  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18684  			break
 18685  		}
 18686  		x := v_0.Args[0]
 18687  		v.reset(OpARM64VSSHLL2_16B)
 18688  		v.AuxInt = uint8ToAuxInt(a)
 18689  		v.AddArg(x)
 18690  		return true
 18691  	}
 18692  	return false
 18693  }
 18694  func rewriteValueARM64_OpARM64VSSHLL4S(v *Value) bool {
 18695  	v_0 := v.Args[0]
 18696  	// match: (VSSHLL4S [a] (VDUPDextr [1] x))
 18697  	// result: (VSSHLL2_4S [a] x)
 18698  	for {
 18699  		a := auxIntToUint8(v.AuxInt)
 18700  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18701  			break
 18702  		}
 18703  		x := v_0.Args[0]
 18704  		v.reset(OpARM64VSSHLL2_4S)
 18705  		v.AuxInt = uint8ToAuxInt(a)
 18706  		v.AddArg(x)
 18707  		return true
 18708  	}
 18709  	return false
 18710  }
 18711  func rewriteValueARM64_OpARM64VSSHLL8H(v *Value) bool {
 18712  	v_0 := v.Args[0]
 18713  	// match: (VSSHLL8H [a] (VDUPDextr [1] x))
 18714  	// result: (VSSHLL2_8H [a] x)
 18715  	for {
 18716  		a := auxIntToUint8(v.AuxInt)
 18717  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18718  			break
 18719  		}
 18720  		x := v_0.Args[0]
 18721  		v.reset(OpARM64VSSHLL2_8H)
 18722  		v.AuxInt = uint8ToAuxInt(a)
 18723  		v.AddArg(x)
 18724  		return true
 18725  	}
 18726  	return false
 18727  }
 18728  func rewriteValueARM64_OpARM64VSSHR16B(v *Value) bool {
 18729  	v_0 := v.Args[0]
 18730  	// match: (VSSHR16B [a] x)
 18731  	// cond: a==0
 18732  	// result: x
 18733  	for {
 18734  		a := auxIntToUint8(v.AuxInt)
 18735  		x := v_0
 18736  		if !(a == 0) {
 18737  			break
 18738  		}
 18739  		v.copyOf(x)
 18740  		return true
 18741  	}
 18742  	return false
 18743  }
 18744  func rewriteValueARM64_OpARM64VSSHR2D(v *Value) bool {
 18745  	v_0 := v.Args[0]
 18746  	// match: (VSSHR2D [a] x)
 18747  	// cond: a==0
 18748  	// result: x
 18749  	for {
 18750  		a := auxIntToUint8(v.AuxInt)
 18751  		x := v_0
 18752  		if !(a == 0) {
 18753  			break
 18754  		}
 18755  		v.copyOf(x)
 18756  		return true
 18757  	}
 18758  	return false
 18759  }
 18760  func rewriteValueARM64_OpARM64VSSHR4S(v *Value) bool {
 18761  	v_0 := v.Args[0]
 18762  	// match: (VSSHR4S [a] x)
 18763  	// cond: a==0
 18764  	// result: x
 18765  	for {
 18766  		a := auxIntToUint8(v.AuxInt)
 18767  		x := v_0
 18768  		if !(a == 0) {
 18769  			break
 18770  		}
 18771  		v.copyOf(x)
 18772  		return true
 18773  	}
 18774  	return false
 18775  }
 18776  func rewriteValueARM64_OpARM64VSSHR8H(v *Value) bool {
 18777  	v_0 := v.Args[0]
 18778  	// match: (VSSHR8H [a] x)
 18779  	// cond: a==0
 18780  	// result: x
 18781  	for {
 18782  		a := auxIntToUint8(v.AuxInt)
 18783  		x := v_0
 18784  		if !(a == 0) {
 18785  			break
 18786  		}
 18787  		v.copyOf(x)
 18788  		return true
 18789  	}
 18790  	return false
 18791  }
 18792  func rewriteValueARM64_OpARM64VSXTL16B(v *Value) bool {
 18793  	v_0 := v.Args[0]
 18794  	// match: (VSXTL16B (VDUPDextr [1] x))
 18795  	// result: (VSXTL2_16B x)
 18796  	for {
 18797  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18798  			break
 18799  		}
 18800  		x := v_0.Args[0]
 18801  		v.reset(OpARM64VSXTL2_16B)
 18802  		v.AddArg(x)
 18803  		return true
 18804  	}
 18805  	return false
 18806  }
 18807  func rewriteValueARM64_OpARM64VSXTL4S(v *Value) bool {
 18808  	v_0 := v.Args[0]
 18809  	// match: (VSXTL4S (VDUPDextr [1] x))
 18810  	// result: (VSXTL2_4S x)
 18811  	for {
 18812  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18813  			break
 18814  		}
 18815  		x := v_0.Args[0]
 18816  		v.reset(OpARM64VSXTL2_4S)
 18817  		v.AddArg(x)
 18818  		return true
 18819  	}
 18820  	return false
 18821  }
 18822  func rewriteValueARM64_OpARM64VSXTL8H(v *Value) bool {
 18823  	v_0 := v.Args[0]
 18824  	// match: (VSXTL8H (VDUPDextr [1] x))
 18825  	// result: (VSXTL2_8H x)
 18826  	for {
 18827  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18828  			break
 18829  		}
 18830  		x := v_0.Args[0]
 18831  		v.reset(OpARM64VSXTL2_8H)
 18832  		v.AddArg(x)
 18833  		return true
 18834  	}
 18835  	return false
 18836  }
 18837  func rewriteValueARM64_OpARM64VUMULL16B(v *Value) bool {
 18838  	v_1 := v.Args[1]
 18839  	v_0 := v.Args[0]
 18840  	// match: (VUMULL16B (VDUPDextr [1] x) (VDUPDextr [1] y))
 18841  	// result: (VUMULL2_16B x y)
 18842  	for {
 18843  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18844  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18845  				continue
 18846  			}
 18847  			x := v_0.Args[0]
 18848  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18849  				continue
 18850  			}
 18851  			y := v_1.Args[0]
 18852  			v.reset(OpARM64VUMULL2_16B)
 18853  			v.AddArg2(x, y)
 18854  			return true
 18855  		}
 18856  		break
 18857  	}
 18858  	return false
 18859  }
 18860  func rewriteValueARM64_OpARM64VUMULL4S(v *Value) bool {
 18861  	v_1 := v.Args[1]
 18862  	v_0 := v.Args[0]
 18863  	// match: (VUMULL4S (VDUPDextr [1] x) (VDUPDextr [1] y))
 18864  	// result: (VUMULL2_4S x y)
 18865  	for {
 18866  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18867  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18868  				continue
 18869  			}
 18870  			x := v_0.Args[0]
 18871  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18872  				continue
 18873  			}
 18874  			y := v_1.Args[0]
 18875  			v.reset(OpARM64VUMULL2_4S)
 18876  			v.AddArg2(x, y)
 18877  			return true
 18878  		}
 18879  		break
 18880  	}
 18881  	return false
 18882  }
 18883  func rewriteValueARM64_OpARM64VUMULL8H(v *Value) bool {
 18884  	v_1 := v.Args[1]
 18885  	v_0 := v.Args[0]
 18886  	// match: (VUMULL8H (VDUPDextr [1] x) (VDUPDextr [1] y))
 18887  	// result: (VUMULL2_8H x y)
 18888  	for {
 18889  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 18890  			if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18891  				continue
 18892  			}
 18893  			x := v_0.Args[0]
 18894  			if v_1.Op != OpARM64VDUPDextr || auxIntToUint8(v_1.AuxInt) != 1 {
 18895  				continue
 18896  			}
 18897  			y := v_1.Args[0]
 18898  			v.reset(OpARM64VUMULL2_8H)
 18899  			v.AddArg2(x, y)
 18900  			return true
 18901  		}
 18902  		break
 18903  	}
 18904  	return false
 18905  }
 18906  func rewriteValueARM64_OpARM64VUQSHL16Bconst(v *Value) bool {
 18907  	v_0 := v.Args[0]
 18908  	// match: (VUQSHL16Bconst [a] x)
 18909  	// cond: a==0
 18910  	// result: x
 18911  	for {
 18912  		a := auxIntToUint8(v.AuxInt)
 18913  		x := v_0
 18914  		if !(a == 0) {
 18915  			break
 18916  		}
 18917  		v.copyOf(x)
 18918  		return true
 18919  	}
 18920  	return false
 18921  }
 18922  func rewriteValueARM64_OpARM64VUQSHL2Dconst(v *Value) bool {
 18923  	v_0 := v.Args[0]
 18924  	// match: (VUQSHL2Dconst [a] x)
 18925  	// cond: a==0
 18926  	// result: x
 18927  	for {
 18928  		a := auxIntToUint8(v.AuxInt)
 18929  		x := v_0
 18930  		if !(a == 0) {
 18931  			break
 18932  		}
 18933  		v.copyOf(x)
 18934  		return true
 18935  	}
 18936  	return false
 18937  }
 18938  func rewriteValueARM64_OpARM64VUQSHL4Sconst(v *Value) bool {
 18939  	v_0 := v.Args[0]
 18940  	// match: (VUQSHL4Sconst [a] x)
 18941  	// cond: a==0
 18942  	// result: x
 18943  	for {
 18944  		a := auxIntToUint8(v.AuxInt)
 18945  		x := v_0
 18946  		if !(a == 0) {
 18947  			break
 18948  		}
 18949  		v.copyOf(x)
 18950  		return true
 18951  	}
 18952  	return false
 18953  }
 18954  func rewriteValueARM64_OpARM64VUQSHL8Hconst(v *Value) bool {
 18955  	v_0 := v.Args[0]
 18956  	// match: (VUQSHL8Hconst [a] x)
 18957  	// cond: a==0
 18958  	// result: x
 18959  	for {
 18960  		a := auxIntToUint8(v.AuxInt)
 18961  		x := v_0
 18962  		if !(a == 0) {
 18963  			break
 18964  		}
 18965  		v.copyOf(x)
 18966  		return true
 18967  	}
 18968  	return false
 18969  }
 18970  func rewriteValueARM64_OpARM64VUSHLL16B(v *Value) bool {
 18971  	v_0 := v.Args[0]
 18972  	// match: (VUSHLL16B [a] (VDUPDextr [1] x))
 18973  	// result: (VUSHLL2_16B [a] x)
 18974  	for {
 18975  		a := auxIntToUint8(v.AuxInt)
 18976  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18977  			break
 18978  		}
 18979  		x := v_0.Args[0]
 18980  		v.reset(OpARM64VUSHLL2_16B)
 18981  		v.AuxInt = uint8ToAuxInt(a)
 18982  		v.AddArg(x)
 18983  		return true
 18984  	}
 18985  	return false
 18986  }
 18987  func rewriteValueARM64_OpARM64VUSHLL4S(v *Value) bool {
 18988  	v_0 := v.Args[0]
 18989  	// match: (VUSHLL4S [a] (VDUPDextr [1] x))
 18990  	// result: (VUSHLL2_4S [a] x)
 18991  	for {
 18992  		a := auxIntToUint8(v.AuxInt)
 18993  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 18994  			break
 18995  		}
 18996  		x := v_0.Args[0]
 18997  		v.reset(OpARM64VUSHLL2_4S)
 18998  		v.AuxInt = uint8ToAuxInt(a)
 18999  		v.AddArg(x)
 19000  		return true
 19001  	}
 19002  	return false
 19003  }
 19004  func rewriteValueARM64_OpARM64VUSHLL8H(v *Value) bool {
 19005  	v_0 := v.Args[0]
 19006  	// match: (VUSHLL8H [a] (VDUPDextr [1] x))
 19007  	// result: (VUSHLL2_8H [a] x)
 19008  	for {
 19009  		a := auxIntToUint8(v.AuxInt)
 19010  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19011  			break
 19012  		}
 19013  		x := v_0.Args[0]
 19014  		v.reset(OpARM64VUSHLL2_8H)
 19015  		v.AuxInt = uint8ToAuxInt(a)
 19016  		v.AddArg(x)
 19017  		return true
 19018  	}
 19019  	return false
 19020  }
 19021  func rewriteValueARM64_OpARM64VUSHR16B(v *Value) bool {
 19022  	v_0 := v.Args[0]
 19023  	// match: (VUSHR16B [a] x)
 19024  	// cond: a==0
 19025  	// result: x
 19026  	for {
 19027  		a := auxIntToUint8(v.AuxInt)
 19028  		x := v_0
 19029  		if !(a == 0) {
 19030  			break
 19031  		}
 19032  		v.copyOf(x)
 19033  		return true
 19034  	}
 19035  	return false
 19036  }
 19037  func rewriteValueARM64_OpARM64VUSHR2D(v *Value) bool {
 19038  	v_0 := v.Args[0]
 19039  	// match: (VUSHR2D [a] x)
 19040  	// cond: a==0
 19041  	// result: x
 19042  	for {
 19043  		a := auxIntToUint8(v.AuxInt)
 19044  		x := v_0
 19045  		if !(a == 0) {
 19046  			break
 19047  		}
 19048  		v.copyOf(x)
 19049  		return true
 19050  	}
 19051  	return false
 19052  }
 19053  func rewriteValueARM64_OpARM64VUSHR4S(v *Value) bool {
 19054  	v_0 := v.Args[0]
 19055  	// match: (VUSHR4S [a] x)
 19056  	// cond: a==0
 19057  	// result: x
 19058  	for {
 19059  		a := auxIntToUint8(v.AuxInt)
 19060  		x := v_0
 19061  		if !(a == 0) {
 19062  			break
 19063  		}
 19064  		v.copyOf(x)
 19065  		return true
 19066  	}
 19067  	return false
 19068  }
 19069  func rewriteValueARM64_OpARM64VUSHR8H(v *Value) bool {
 19070  	v_0 := v.Args[0]
 19071  	// match: (VUSHR8H [a] x)
 19072  	// cond: a==0
 19073  	// result: x
 19074  	for {
 19075  		a := auxIntToUint8(v.AuxInt)
 19076  		x := v_0
 19077  		if !(a == 0) {
 19078  			break
 19079  		}
 19080  		v.copyOf(x)
 19081  		return true
 19082  	}
 19083  	return false
 19084  }
 19085  func rewriteValueARM64_OpARM64VUXTL16B(v *Value) bool {
 19086  	v_0 := v.Args[0]
 19087  	// match: (VUXTL16B (VDUPDextr [1] x))
 19088  	// result: (VUXTL2_16B x)
 19089  	for {
 19090  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19091  			break
 19092  		}
 19093  		x := v_0.Args[0]
 19094  		v.reset(OpARM64VUXTL2_16B)
 19095  		v.AddArg(x)
 19096  		return true
 19097  	}
 19098  	return false
 19099  }
 19100  func rewriteValueARM64_OpARM64VUXTL4S(v *Value) bool {
 19101  	v_0 := v.Args[0]
 19102  	// match: (VUXTL4S (VDUPDextr [1] x))
 19103  	// result: (VUXTL2_4S x)
 19104  	for {
 19105  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19106  			break
 19107  		}
 19108  		x := v_0.Args[0]
 19109  		v.reset(OpARM64VUXTL2_4S)
 19110  		v.AddArg(x)
 19111  		return true
 19112  	}
 19113  	return false
 19114  }
 19115  func rewriteValueARM64_OpARM64VUXTL8H(v *Value) bool {
 19116  	v_0 := v.Args[0]
 19117  	// match: (VUXTL8H (VDUPDextr [1] x))
 19118  	// result: (VUXTL2_8H x)
 19119  	for {
 19120  		if v_0.Op != OpARM64VDUPDextr || auxIntToUint8(v_0.AuxInt) != 1 {
 19121  			break
 19122  		}
 19123  		x := v_0.Args[0]
 19124  		v.reset(OpARM64VUXTL2_8H)
 19125  		v.AddArg(x)
 19126  		return true
 19127  	}
 19128  	return false
 19129  }
 19130  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 19131  	v_1 := v.Args[1]
 19132  	v_0 := v.Args[0]
 19133  	// match: (XOR x (MOVDconst [c]))
 19134  	// result: (XORconst [c] x)
 19135  	for {
 19136  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19137  			x := v_0
 19138  			if v_1.Op != OpARM64MOVDconst {
 19139  				continue
 19140  			}
 19141  			c := auxIntToInt64(v_1.AuxInt)
 19142  			v.reset(OpARM64XORconst)
 19143  			v.AuxInt = int64ToAuxInt(c)
 19144  			v.AddArg(x)
 19145  			return true
 19146  		}
 19147  		break
 19148  	}
 19149  	// match: (XOR x x)
 19150  	// result: (MOVDconst [0])
 19151  	for {
 19152  		x := v_0
 19153  		if x != v_1 {
 19154  			break
 19155  		}
 19156  		v.reset(OpARM64MOVDconst)
 19157  		v.AuxInt = int64ToAuxInt(0)
 19158  		return true
 19159  	}
 19160  	// match: (XOR x (MVN y))
 19161  	// result: (EON x y)
 19162  	for {
 19163  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19164  			x := v_0
 19165  			if v_1.Op != OpARM64MVN {
 19166  				continue
 19167  			}
 19168  			y := v_1.Args[0]
 19169  			v.reset(OpARM64EON)
 19170  			v.AddArg2(x, y)
 19171  			return true
 19172  		}
 19173  		break
 19174  	}
 19175  	// match: (XOR x0 x1:(SLLconst [c] y))
 19176  	// cond: clobberIfDead(x1)
 19177  	// result: (XORshiftLL x0 y [c])
 19178  	for {
 19179  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19180  			x0 := v_0
 19181  			x1 := v_1
 19182  			if x1.Op != OpARM64SLLconst {
 19183  				continue
 19184  			}
 19185  			c := auxIntToInt64(x1.AuxInt)
 19186  			y := x1.Args[0]
 19187  			if !(clobberIfDead(x1)) {
 19188  				continue
 19189  			}
 19190  			v.reset(OpARM64XORshiftLL)
 19191  			v.AuxInt = int64ToAuxInt(c)
 19192  			v.AddArg2(x0, y)
 19193  			return true
 19194  		}
 19195  		break
 19196  	}
 19197  	// match: (XOR x0 x1:(SRLconst [c] y))
 19198  	// cond: clobberIfDead(x1)
 19199  	// result: (XORshiftRL x0 y [c])
 19200  	for {
 19201  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19202  			x0 := v_0
 19203  			x1 := v_1
 19204  			if x1.Op != OpARM64SRLconst {
 19205  				continue
 19206  			}
 19207  			c := auxIntToInt64(x1.AuxInt)
 19208  			y := x1.Args[0]
 19209  			if !(clobberIfDead(x1)) {
 19210  				continue
 19211  			}
 19212  			v.reset(OpARM64XORshiftRL)
 19213  			v.AuxInt = int64ToAuxInt(c)
 19214  			v.AddArg2(x0, y)
 19215  			return true
 19216  		}
 19217  		break
 19218  	}
 19219  	// match: (XOR x0 x1:(SRAconst [c] y))
 19220  	// cond: clobberIfDead(x1)
 19221  	// result: (XORshiftRA x0 y [c])
 19222  	for {
 19223  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19224  			x0 := v_0
 19225  			x1 := v_1
 19226  			if x1.Op != OpARM64SRAconst {
 19227  				continue
 19228  			}
 19229  			c := auxIntToInt64(x1.AuxInt)
 19230  			y := x1.Args[0]
 19231  			if !(clobberIfDead(x1)) {
 19232  				continue
 19233  			}
 19234  			v.reset(OpARM64XORshiftRA)
 19235  			v.AuxInt = int64ToAuxInt(c)
 19236  			v.AddArg2(x0, y)
 19237  			return true
 19238  		}
 19239  		break
 19240  	}
 19241  	// match: (XOR x0 x1:(RORconst [c] y))
 19242  	// cond: clobberIfDead(x1)
 19243  	// result: (XORshiftRO x0 y [c])
 19244  	for {
 19245  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 19246  			x0 := v_0
 19247  			x1 := v_1
 19248  			if x1.Op != OpARM64RORconst {
 19249  				continue
 19250  			}
 19251  			c := auxIntToInt64(x1.AuxInt)
 19252  			y := x1.Args[0]
 19253  			if !(clobberIfDead(x1)) {
 19254  				continue
 19255  			}
 19256  			v.reset(OpARM64XORshiftRO)
 19257  			v.AuxInt = int64ToAuxInt(c)
 19258  			v.AddArg2(x0, y)
 19259  			return true
 19260  		}
 19261  		break
 19262  	}
 19263  	return false
 19264  }
 19265  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 19266  	v_0 := v.Args[0]
 19267  	// match: (XORconst [0] x)
 19268  	// result: x
 19269  	for {
 19270  		if auxIntToInt64(v.AuxInt) != 0 {
 19271  			break
 19272  		}
 19273  		x := v_0
 19274  		v.copyOf(x)
 19275  		return true
 19276  	}
 19277  	// match: (XORconst [-1] x)
 19278  	// result: (MVN x)
 19279  	for {
 19280  		if auxIntToInt64(v.AuxInt) != -1 {
 19281  			break
 19282  		}
 19283  		x := v_0
 19284  		v.reset(OpARM64MVN)
 19285  		v.AddArg(x)
 19286  		return true
 19287  	}
 19288  	// match: (XORconst [c] (MOVDconst [d]))
 19289  	// result: (MOVDconst [c^d])
 19290  	for {
 19291  		c := auxIntToInt64(v.AuxInt)
 19292  		if v_0.Op != OpARM64MOVDconst {
 19293  			break
 19294  		}
 19295  		d := auxIntToInt64(v_0.AuxInt)
 19296  		v.reset(OpARM64MOVDconst)
 19297  		v.AuxInt = int64ToAuxInt(c ^ d)
 19298  		return true
 19299  	}
 19300  	// match: (XORconst [c] (XORconst [d] x))
 19301  	// result: (XORconst [c^d] x)
 19302  	for {
 19303  		c := auxIntToInt64(v.AuxInt)
 19304  		if v_0.Op != OpARM64XORconst {
 19305  			break
 19306  		}
 19307  		d := auxIntToInt64(v_0.AuxInt)
 19308  		x := v_0.Args[0]
 19309  		v.reset(OpARM64XORconst)
 19310  		v.AuxInt = int64ToAuxInt(c ^ d)
 19311  		v.AddArg(x)
 19312  		return true
 19313  	}
 19314  	return false
 19315  }
 19316  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 19317  	v_1 := v.Args[1]
 19318  	v_0 := v.Args[0]
 19319  	b := v.Block
 19320  	typ := &b.Func.Config.Types
 19321  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 19322  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 19323  	for {
 19324  		d := auxIntToInt64(v.AuxInt)
 19325  		if v_0.Op != OpARM64MOVDconst {
 19326  			break
 19327  		}
 19328  		c := auxIntToInt64(v_0.AuxInt)
 19329  		x := v_1
 19330  		v.reset(OpARM64XORconst)
 19331  		v.AuxInt = int64ToAuxInt(c)
 19332  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 19333  		v0.AuxInt = int64ToAuxInt(d)
 19334  		v0.AddArg(x)
 19335  		v.AddArg(v0)
 19336  		return true
 19337  	}
 19338  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 19339  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 19340  	for {
 19341  		d := auxIntToInt64(v.AuxInt)
 19342  		x := v_0
 19343  		if v_1.Op != OpARM64MOVDconst {
 19344  			break
 19345  		}
 19346  		c := auxIntToInt64(v_1.AuxInt)
 19347  		v.reset(OpARM64XORconst)
 19348  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 19349  		v.AddArg(x)
 19350  		return true
 19351  	}
 19352  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 19353  	// result: (MOVDconst [0])
 19354  	for {
 19355  		c := auxIntToInt64(v.AuxInt)
 19356  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 19357  			break
 19358  		}
 19359  		x := v_0.Args[0]
 19360  		if x != v_1 {
 19361  			break
 19362  		}
 19363  		v.reset(OpARM64MOVDconst)
 19364  		v.AuxInt = int64ToAuxInt(0)
 19365  		return true
 19366  	}
 19367  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 19368  	// result: (REV16W x)
 19369  	for {
 19370  		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) {
 19371  			break
 19372  		}
 19373  		x := v_0.Args[0]
 19374  		if x != v_1 {
 19375  			break
 19376  		}
 19377  		v.reset(OpARM64REV16W)
 19378  		v.AddArg(x)
 19379  		return true
 19380  	}
 19381  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 19382  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 19383  	// result: (REV16W x)
 19384  	for {
 19385  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 19386  			break
 19387  		}
 19388  		v_0_0 := v_0.Args[0]
 19389  		if v_0_0.Op != OpARM64ANDconst {
 19390  			break
 19391  		}
 19392  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19393  		x := v_0_0.Args[0]
 19394  		if v_1.Op != OpARM64ANDconst {
 19395  			break
 19396  		}
 19397  		c2 := auxIntToInt64(v_1.AuxInt)
 19398  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 19399  			break
 19400  		}
 19401  		v.reset(OpARM64REV16W)
 19402  		v.AddArg(x)
 19403  		return true
 19404  	}
 19405  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 19406  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 19407  	// result: (REV16 x)
 19408  	for {
 19409  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 19410  			break
 19411  		}
 19412  		v_0_0 := v_0.Args[0]
 19413  		if v_0_0.Op != OpARM64ANDconst {
 19414  			break
 19415  		}
 19416  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19417  		x := v_0_0.Args[0]
 19418  		if v_1.Op != OpARM64ANDconst {
 19419  			break
 19420  		}
 19421  		c2 := auxIntToInt64(v_1.AuxInt)
 19422  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 19423  			break
 19424  		}
 19425  		v.reset(OpARM64REV16)
 19426  		v.AddArg(x)
 19427  		return true
 19428  	}
 19429  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 19430  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 19431  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 19432  	for {
 19433  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 19434  			break
 19435  		}
 19436  		v_0_0 := v_0.Args[0]
 19437  		if v_0_0.Op != OpARM64ANDconst {
 19438  			break
 19439  		}
 19440  		c1 := auxIntToInt64(v_0_0.AuxInt)
 19441  		x := v_0_0.Args[0]
 19442  		if v_1.Op != OpARM64ANDconst {
 19443  			break
 19444  		}
 19445  		c2 := auxIntToInt64(v_1.AuxInt)
 19446  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 19447  			break
 19448  		}
 19449  		v.reset(OpARM64REV16)
 19450  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 19451  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 19452  		v0.AddArg(x)
 19453  		v.AddArg(v0)
 19454  		return true
 19455  	}
 19456  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 19457  	// result: (EXTRconst [64-c] x2 x)
 19458  	for {
 19459  		c := auxIntToInt64(v.AuxInt)
 19460  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 19461  			break
 19462  		}
 19463  		x := v_0.Args[0]
 19464  		x2 := v_1
 19465  		v.reset(OpARM64EXTRconst)
 19466  		v.AuxInt = int64ToAuxInt(64 - c)
 19467  		v.AddArg2(x2, x)
 19468  		return true
 19469  	}
 19470  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 19471  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 19472  	// result: (EXTRWconst [32-c] x2 x)
 19473  	for {
 19474  		t := v.Type
 19475  		c := auxIntToInt64(v.AuxInt)
 19476  		if v_0.Op != OpARM64UBFX {
 19477  			break
 19478  		}
 19479  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 19480  		x := v_0.Args[0]
 19481  		x2 := v_1
 19482  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 19483  			break
 19484  		}
 19485  		v.reset(OpARM64EXTRWconst)
 19486  		v.AuxInt = int64ToAuxInt(32 - c)
 19487  		v.AddArg2(x2, x)
 19488  		return true
 19489  	}
 19490  	return false
 19491  }
 19492  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 19493  	v_1 := v.Args[1]
 19494  	v_0 := v.Args[0]
 19495  	b := v.Block
 19496  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 19497  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 19498  	for {
 19499  		d := auxIntToInt64(v.AuxInt)
 19500  		if v_0.Op != OpARM64MOVDconst {
 19501  			break
 19502  		}
 19503  		c := auxIntToInt64(v_0.AuxInt)
 19504  		x := v_1
 19505  		v.reset(OpARM64XORconst)
 19506  		v.AuxInt = int64ToAuxInt(c)
 19507  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 19508  		v0.AuxInt = int64ToAuxInt(d)
 19509  		v0.AddArg(x)
 19510  		v.AddArg(v0)
 19511  		return true
 19512  	}
 19513  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 19514  	// result: (XORconst x [c>>uint64(d)])
 19515  	for {
 19516  		d := auxIntToInt64(v.AuxInt)
 19517  		x := v_0
 19518  		if v_1.Op != OpARM64MOVDconst {
 19519  			break
 19520  		}
 19521  		c := auxIntToInt64(v_1.AuxInt)
 19522  		v.reset(OpARM64XORconst)
 19523  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 19524  		v.AddArg(x)
 19525  		return true
 19526  	}
 19527  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 19528  	// result: (MOVDconst [0])
 19529  	for {
 19530  		c := auxIntToInt64(v.AuxInt)
 19531  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 19532  			break
 19533  		}
 19534  		x := v_0.Args[0]
 19535  		if x != v_1 {
 19536  			break
 19537  		}
 19538  		v.reset(OpARM64MOVDconst)
 19539  		v.AuxInt = int64ToAuxInt(0)
 19540  		return true
 19541  	}
 19542  	return false
 19543  }
 19544  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 19545  	v_1 := v.Args[1]
 19546  	v_0 := v.Args[0]
 19547  	b := v.Block
 19548  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 19549  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 19550  	for {
 19551  		d := auxIntToInt64(v.AuxInt)
 19552  		if v_0.Op != OpARM64MOVDconst {
 19553  			break
 19554  		}
 19555  		c := auxIntToInt64(v_0.AuxInt)
 19556  		x := v_1
 19557  		v.reset(OpARM64XORconst)
 19558  		v.AuxInt = int64ToAuxInt(c)
 19559  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 19560  		v0.AuxInt = int64ToAuxInt(d)
 19561  		v0.AddArg(x)
 19562  		v.AddArg(v0)
 19563  		return true
 19564  	}
 19565  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 19566  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 19567  	for {
 19568  		d := auxIntToInt64(v.AuxInt)
 19569  		x := v_0
 19570  		if v_1.Op != OpARM64MOVDconst {
 19571  			break
 19572  		}
 19573  		c := auxIntToInt64(v_1.AuxInt)
 19574  		v.reset(OpARM64XORconst)
 19575  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 19576  		v.AddArg(x)
 19577  		return true
 19578  	}
 19579  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 19580  	// result: (MOVDconst [0])
 19581  	for {
 19582  		c := auxIntToInt64(v.AuxInt)
 19583  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 19584  			break
 19585  		}
 19586  		x := v_0.Args[0]
 19587  		if x != v_1 {
 19588  			break
 19589  		}
 19590  		v.reset(OpARM64MOVDconst)
 19591  		v.AuxInt = int64ToAuxInt(0)
 19592  		return true
 19593  	}
 19594  	return false
 19595  }
 19596  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 19597  	v_1 := v.Args[1]
 19598  	v_0 := v.Args[0]
 19599  	b := v.Block
 19600  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 19601  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 19602  	for {
 19603  		d := auxIntToInt64(v.AuxInt)
 19604  		if v_0.Op != OpARM64MOVDconst {
 19605  			break
 19606  		}
 19607  		c := auxIntToInt64(v_0.AuxInt)
 19608  		x := v_1
 19609  		v.reset(OpARM64XORconst)
 19610  		v.AuxInt = int64ToAuxInt(c)
 19611  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 19612  		v0.AuxInt = int64ToAuxInt(d)
 19613  		v0.AddArg(x)
 19614  		v.AddArg(v0)
 19615  		return true
 19616  	}
 19617  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 19618  	// result: (XORconst x [rotateRight64(c, d)])
 19619  	for {
 19620  		d := auxIntToInt64(v.AuxInt)
 19621  		x := v_0
 19622  		if v_1.Op != OpARM64MOVDconst {
 19623  			break
 19624  		}
 19625  		c := auxIntToInt64(v_1.AuxInt)
 19626  		v.reset(OpARM64XORconst)
 19627  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 19628  		v.AddArg(x)
 19629  		return true
 19630  	}
 19631  	// match: (XORshiftRO (RORconst x [c]) x [c])
 19632  	// result: (MOVDconst [0])
 19633  	for {
 19634  		c := auxIntToInt64(v.AuxInt)
 19635  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 19636  			break
 19637  		}
 19638  		x := v_0.Args[0]
 19639  		if x != v_1 {
 19640  			break
 19641  		}
 19642  		v.reset(OpARM64MOVDconst)
 19643  		v.AuxInt = int64ToAuxInt(0)
 19644  		return true
 19645  	}
 19646  	return false
 19647  }
 19648  func rewriteValueARM64_OpAddr(v *Value) bool {
 19649  	v_0 := v.Args[0]
 19650  	// match: (Addr {sym} base)
 19651  	// result: (MOVDaddr {sym} base)
 19652  	for {
 19653  		sym := auxToSym(v.Aux)
 19654  		base := v_0
 19655  		v.reset(OpARM64MOVDaddr)
 19656  		v.Aux = symToAux(sym)
 19657  		v.AddArg(base)
 19658  		return true
 19659  	}
 19660  }
 19661  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 19662  	v_1 := v.Args[1]
 19663  	v_0 := v.Args[0]
 19664  	b := v.Block
 19665  	// match: (Avg64u <t> x y)
 19666  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 19667  	for {
 19668  		t := v.Type
 19669  		x := v_0
 19670  		y := v_1
 19671  		v.reset(OpARM64ADD)
 19672  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 19673  		v0.AuxInt = int64ToAuxInt(1)
 19674  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 19675  		v1.AddArg2(x, y)
 19676  		v0.AddArg(v1)
 19677  		v.AddArg2(v0, y)
 19678  		return true
 19679  	}
 19680  }
 19681  func rewriteValueARM64_OpBitLen16(v *Value) bool {
 19682  	v_0 := v.Args[0]
 19683  	b := v.Block
 19684  	typ := &b.Func.Config.Types
 19685  	// match: (BitLen16 x)
 19686  	// result: (BitLen64 (ZeroExt16to64 x))
 19687  	for {
 19688  		x := v_0
 19689  		v.reset(OpBitLen64)
 19690  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19691  		v0.AddArg(x)
 19692  		v.AddArg(v0)
 19693  		return true
 19694  	}
 19695  }
 19696  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 19697  	v_0 := v.Args[0]
 19698  	b := v.Block
 19699  	typ := &b.Func.Config.Types
 19700  	// match: (BitLen32 x)
 19701  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 19702  	for {
 19703  		x := v_0
 19704  		v.reset(OpARM64SUB)
 19705  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19706  		v0.AuxInt = int64ToAuxInt(32)
 19707  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 19708  		v1.AddArg(x)
 19709  		v.AddArg2(v0, v1)
 19710  		return true
 19711  	}
 19712  }
 19713  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 19714  	v_0 := v.Args[0]
 19715  	b := v.Block
 19716  	typ := &b.Func.Config.Types
 19717  	// match: (BitLen64 x)
 19718  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 19719  	for {
 19720  		x := v_0
 19721  		v.reset(OpARM64SUB)
 19722  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19723  		v0.AuxInt = int64ToAuxInt(64)
 19724  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 19725  		v1.AddArg(x)
 19726  		v.AddArg2(v0, v1)
 19727  		return true
 19728  	}
 19729  }
 19730  func rewriteValueARM64_OpBitLen8(v *Value) bool {
 19731  	v_0 := v.Args[0]
 19732  	b := v.Block
 19733  	typ := &b.Func.Config.Types
 19734  	// match: (BitLen8 x)
 19735  	// result: (BitLen64 (ZeroExt8to64 x))
 19736  	for {
 19737  		x := v_0
 19738  		v.reset(OpBitLen64)
 19739  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19740  		v0.AddArg(x)
 19741  		v.AddArg(v0)
 19742  		return true
 19743  	}
 19744  }
 19745  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 19746  	v_0 := v.Args[0]
 19747  	b := v.Block
 19748  	typ := &b.Func.Config.Types
 19749  	// match: (BitRev16 x)
 19750  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 19751  	for {
 19752  		x := v_0
 19753  		v.reset(OpARM64SRLconst)
 19754  		v.AuxInt = int64ToAuxInt(48)
 19755  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 19756  		v0.AddArg(x)
 19757  		v.AddArg(v0)
 19758  		return true
 19759  	}
 19760  }
 19761  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 19762  	v_0 := v.Args[0]
 19763  	b := v.Block
 19764  	typ := &b.Func.Config.Types
 19765  	// match: (BitRev8 x)
 19766  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 19767  	for {
 19768  		x := v_0
 19769  		v.reset(OpARM64SRLconst)
 19770  		v.AuxInt = int64ToAuxInt(56)
 19771  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 19772  		v0.AddArg(x)
 19773  		v.AddArg(v0)
 19774  		return true
 19775  	}
 19776  }
 19777  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 19778  	v_2 := v.Args[2]
 19779  	v_1 := v.Args[1]
 19780  	v_0 := v.Args[0]
 19781  	b := v.Block
 19782  	// match: (CondSelect x y boolval)
 19783  	// cond: flagArg(boolval) != nil
 19784  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 19785  	for {
 19786  		x := v_0
 19787  		y := v_1
 19788  		boolval := v_2
 19789  		if !(flagArg(boolval) != nil) {
 19790  			break
 19791  		}
 19792  		v.reset(OpARM64CSEL)
 19793  		v.AuxInt = opToAuxInt(boolval.Op)
 19794  		v.AddArg3(x, y, flagArg(boolval))
 19795  		return true
 19796  	}
 19797  	// match: (CondSelect x y boolval)
 19798  	// cond: flagArg(boolval) == nil
 19799  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 19800  	for {
 19801  		x := v_0
 19802  		y := v_1
 19803  		boolval := v_2
 19804  		if !(flagArg(boolval) == nil) {
 19805  			break
 19806  		}
 19807  		v.reset(OpARM64CSEL)
 19808  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 19809  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 19810  		v0.AuxInt = int32ToAuxInt(1)
 19811  		v0.AddArg(boolval)
 19812  		v.AddArg3(x, y, v0)
 19813  		return true
 19814  	}
 19815  	return false
 19816  }
 19817  func rewriteValueARM64_OpConst16(v *Value) bool {
 19818  	// match: (Const16 [val])
 19819  	// result: (MOVDconst [int64(val)])
 19820  	for {
 19821  		val := auxIntToInt16(v.AuxInt)
 19822  		v.reset(OpARM64MOVDconst)
 19823  		v.AuxInt = int64ToAuxInt(int64(val))
 19824  		return true
 19825  	}
 19826  }
 19827  func rewriteValueARM64_OpConst32(v *Value) bool {
 19828  	// match: (Const32 [val])
 19829  	// result: (MOVDconst [int64(val)])
 19830  	for {
 19831  		val := auxIntToInt32(v.AuxInt)
 19832  		v.reset(OpARM64MOVDconst)
 19833  		v.AuxInt = int64ToAuxInt(int64(val))
 19834  		return true
 19835  	}
 19836  }
 19837  func rewriteValueARM64_OpConst32F(v *Value) bool {
 19838  	// match: (Const32F [val])
 19839  	// result: (FMOVSconst [float64(val)])
 19840  	for {
 19841  		val := auxIntToFloat32(v.AuxInt)
 19842  		v.reset(OpARM64FMOVSconst)
 19843  		v.AuxInt = float64ToAuxInt(float64(val))
 19844  		return true
 19845  	}
 19846  }
 19847  func rewriteValueARM64_OpConst64(v *Value) bool {
 19848  	// match: (Const64 [val])
 19849  	// result: (MOVDconst [int64(val)])
 19850  	for {
 19851  		val := auxIntToInt64(v.AuxInt)
 19852  		v.reset(OpARM64MOVDconst)
 19853  		v.AuxInt = int64ToAuxInt(int64(val))
 19854  		return true
 19855  	}
 19856  }
 19857  func rewriteValueARM64_OpConst64F(v *Value) bool {
 19858  	// match: (Const64F [val])
 19859  	// result: (FMOVDconst [float64(val)])
 19860  	for {
 19861  		val := auxIntToFloat64(v.AuxInt)
 19862  		v.reset(OpARM64FMOVDconst)
 19863  		v.AuxInt = float64ToAuxInt(float64(val))
 19864  		return true
 19865  	}
 19866  }
 19867  func rewriteValueARM64_OpConst8(v *Value) bool {
 19868  	// match: (Const8 [val])
 19869  	// result: (MOVDconst [int64(val)])
 19870  	for {
 19871  		val := auxIntToInt8(v.AuxInt)
 19872  		v.reset(OpARM64MOVDconst)
 19873  		v.AuxInt = int64ToAuxInt(int64(val))
 19874  		return true
 19875  	}
 19876  }
 19877  func rewriteValueARM64_OpConstBool(v *Value) bool {
 19878  	// match: (ConstBool [t])
 19879  	// result: (MOVDconst [b2i(t)])
 19880  	for {
 19881  		t := auxIntToBool(v.AuxInt)
 19882  		v.reset(OpARM64MOVDconst)
 19883  		v.AuxInt = int64ToAuxInt(b2i(t))
 19884  		return true
 19885  	}
 19886  }
 19887  func rewriteValueARM64_OpConstNil(v *Value) bool {
 19888  	// match: (ConstNil)
 19889  	// result: (MOVDconst [0])
 19890  	for {
 19891  		v.reset(OpARM64MOVDconst)
 19892  		v.AuxInt = int64ToAuxInt(0)
 19893  		return true
 19894  	}
 19895  }
 19896  func rewriteValueARM64_OpCtz16(v *Value) bool {
 19897  	v_0 := v.Args[0]
 19898  	b := v.Block
 19899  	typ := &b.Func.Config.Types
 19900  	// match: (Ctz16 <t> x)
 19901  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 19902  	for {
 19903  		t := v.Type
 19904  		x := v_0
 19905  		v.reset(OpARM64CLZW)
 19906  		v.Type = t
 19907  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 19908  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 19909  		v1.AuxInt = int64ToAuxInt(0x10000)
 19910  		v1.AddArg(x)
 19911  		v0.AddArg(v1)
 19912  		v.AddArg(v0)
 19913  		return true
 19914  	}
 19915  }
 19916  func rewriteValueARM64_OpCtz32(v *Value) bool {
 19917  	v_0 := v.Args[0]
 19918  	b := v.Block
 19919  	// match: (Ctz32 <t> x)
 19920  	// result: (CLZW (RBITW <t> x))
 19921  	for {
 19922  		t := v.Type
 19923  		x := v_0
 19924  		v.reset(OpARM64CLZW)
 19925  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 19926  		v0.AddArg(x)
 19927  		v.AddArg(v0)
 19928  		return true
 19929  	}
 19930  }
 19931  func rewriteValueARM64_OpCtz64(v *Value) bool {
 19932  	v_0 := v.Args[0]
 19933  	b := v.Block
 19934  	// match: (Ctz64 <t> x)
 19935  	// result: (CLZ (RBIT <t> x))
 19936  	for {
 19937  		t := v.Type
 19938  		x := v_0
 19939  		v.reset(OpARM64CLZ)
 19940  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 19941  		v0.AddArg(x)
 19942  		v.AddArg(v0)
 19943  		return true
 19944  	}
 19945  }
 19946  func rewriteValueARM64_OpCtz8(v *Value) bool {
 19947  	v_0 := v.Args[0]
 19948  	b := v.Block
 19949  	typ := &b.Func.Config.Types
 19950  	// match: (Ctz8 <t> x)
 19951  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 19952  	for {
 19953  		t := v.Type
 19954  		x := v_0
 19955  		v.reset(OpARM64CLZW)
 19956  		v.Type = t
 19957  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 19958  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 19959  		v1.AuxInt = int64ToAuxInt(0x100)
 19960  		v1.AddArg(x)
 19961  		v0.AddArg(v1)
 19962  		v.AddArg(v0)
 19963  		return true
 19964  	}
 19965  }
 19966  func rewriteValueARM64_OpDiv16(v *Value) bool {
 19967  	v_1 := v.Args[1]
 19968  	v_0 := v.Args[0]
 19969  	b := v.Block
 19970  	typ := &b.Func.Config.Types
 19971  	// match: (Div16 [false] x y)
 19972  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 19973  	for {
 19974  		if auxIntToBool(v.AuxInt) != false {
 19975  			break
 19976  		}
 19977  		x := v_0
 19978  		y := v_1
 19979  		v.reset(OpARM64DIVW)
 19980  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19981  		v0.AddArg(x)
 19982  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19983  		v1.AddArg(y)
 19984  		v.AddArg2(v0, v1)
 19985  		return true
 19986  	}
 19987  	return false
 19988  }
 19989  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 19990  	v_1 := v.Args[1]
 19991  	v_0 := v.Args[0]
 19992  	b := v.Block
 19993  	typ := &b.Func.Config.Types
 19994  	// match: (Div16u x y)
 19995  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 19996  	for {
 19997  		x := v_0
 19998  		y := v_1
 19999  		v.reset(OpARM64UDIVW)
 20000  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20001  		v0.AddArg(x)
 20002  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20003  		v1.AddArg(y)
 20004  		v.AddArg2(v0, v1)
 20005  		return true
 20006  	}
 20007  }
 20008  func rewriteValueARM64_OpDiv32(v *Value) bool {
 20009  	v_1 := v.Args[1]
 20010  	v_0 := v.Args[0]
 20011  	// match: (Div32 [false] x y)
 20012  	// result: (DIVW x y)
 20013  	for {
 20014  		if auxIntToBool(v.AuxInt) != false {
 20015  			break
 20016  		}
 20017  		x := v_0
 20018  		y := v_1
 20019  		v.reset(OpARM64DIVW)
 20020  		v.AddArg2(x, y)
 20021  		return true
 20022  	}
 20023  	return false
 20024  }
 20025  func rewriteValueARM64_OpDiv64(v *Value) bool {
 20026  	v_1 := v.Args[1]
 20027  	v_0 := v.Args[0]
 20028  	// match: (Div64 [false] x y)
 20029  	// result: (DIV x y)
 20030  	for {
 20031  		if auxIntToBool(v.AuxInt) != false {
 20032  			break
 20033  		}
 20034  		x := v_0
 20035  		y := v_1
 20036  		v.reset(OpARM64DIV)
 20037  		v.AddArg2(x, y)
 20038  		return true
 20039  	}
 20040  	return false
 20041  }
 20042  func rewriteValueARM64_OpDiv8(v *Value) bool {
 20043  	v_1 := v.Args[1]
 20044  	v_0 := v.Args[0]
 20045  	b := v.Block
 20046  	typ := &b.Func.Config.Types
 20047  	// match: (Div8 x y)
 20048  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 20049  	for {
 20050  		x := v_0
 20051  		y := v_1
 20052  		v.reset(OpARM64DIVW)
 20053  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20054  		v0.AddArg(x)
 20055  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20056  		v1.AddArg(y)
 20057  		v.AddArg2(v0, v1)
 20058  		return true
 20059  	}
 20060  }
 20061  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 20062  	v_1 := v.Args[1]
 20063  	v_0 := v.Args[0]
 20064  	b := v.Block
 20065  	typ := &b.Func.Config.Types
 20066  	// match: (Div8u x y)
 20067  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 20068  	for {
 20069  		x := v_0
 20070  		y := v_1
 20071  		v.reset(OpARM64UDIVW)
 20072  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20073  		v0.AddArg(x)
 20074  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20075  		v1.AddArg(y)
 20076  		v.AddArg2(v0, v1)
 20077  		return true
 20078  	}
 20079  }
 20080  func rewriteValueARM64_OpEq16(v *Value) bool {
 20081  	v_1 := v.Args[1]
 20082  	v_0 := v.Args[0]
 20083  	b := v.Block
 20084  	typ := &b.Func.Config.Types
 20085  	// match: (Eq16 x y)
 20086  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20087  	for {
 20088  		x := v_0
 20089  		y := v_1
 20090  		v.reset(OpARM64Equal)
 20091  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20092  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20093  		v1.AddArg(x)
 20094  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20095  		v2.AddArg(y)
 20096  		v0.AddArg2(v1, v2)
 20097  		v.AddArg(v0)
 20098  		return true
 20099  	}
 20100  }
 20101  func rewriteValueARM64_OpEq32(v *Value) bool {
 20102  	v_1 := v.Args[1]
 20103  	v_0 := v.Args[0]
 20104  	b := v.Block
 20105  	// match: (Eq32 x y)
 20106  	// result: (Equal (CMPW x y))
 20107  	for {
 20108  		x := v_0
 20109  		y := v_1
 20110  		v.reset(OpARM64Equal)
 20111  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20112  		v0.AddArg2(x, y)
 20113  		v.AddArg(v0)
 20114  		return true
 20115  	}
 20116  }
 20117  func rewriteValueARM64_OpEq32F(v *Value) bool {
 20118  	v_1 := v.Args[1]
 20119  	v_0 := v.Args[0]
 20120  	b := v.Block
 20121  	// match: (Eq32F x y)
 20122  	// result: (Equal (FCMPS x y))
 20123  	for {
 20124  		x := v_0
 20125  		y := v_1
 20126  		v.reset(OpARM64Equal)
 20127  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20128  		v0.AddArg2(x, y)
 20129  		v.AddArg(v0)
 20130  		return true
 20131  	}
 20132  }
 20133  func rewriteValueARM64_OpEq64(v *Value) bool {
 20134  	v_1 := v.Args[1]
 20135  	v_0 := v.Args[0]
 20136  	b := v.Block
 20137  	// match: (Eq64 x y)
 20138  	// result: (Equal (CMP x y))
 20139  	for {
 20140  		x := v_0
 20141  		y := v_1
 20142  		v.reset(OpARM64Equal)
 20143  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20144  		v0.AddArg2(x, y)
 20145  		v.AddArg(v0)
 20146  		return true
 20147  	}
 20148  }
 20149  func rewriteValueARM64_OpEq64F(v *Value) bool {
 20150  	v_1 := v.Args[1]
 20151  	v_0 := v.Args[0]
 20152  	b := v.Block
 20153  	// match: (Eq64F x y)
 20154  	// result: (Equal (FCMPD x y))
 20155  	for {
 20156  		x := v_0
 20157  		y := v_1
 20158  		v.reset(OpARM64Equal)
 20159  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20160  		v0.AddArg2(x, y)
 20161  		v.AddArg(v0)
 20162  		return true
 20163  	}
 20164  }
 20165  func rewriteValueARM64_OpEq8(v *Value) bool {
 20166  	v_1 := v.Args[1]
 20167  	v_0 := v.Args[0]
 20168  	b := v.Block
 20169  	typ := &b.Func.Config.Types
 20170  	// match: (Eq8 x y)
 20171  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20172  	for {
 20173  		x := v_0
 20174  		y := v_1
 20175  		v.reset(OpARM64Equal)
 20176  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20177  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20178  		v1.AddArg(x)
 20179  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20180  		v2.AddArg(y)
 20181  		v0.AddArg2(v1, v2)
 20182  		v.AddArg(v0)
 20183  		return true
 20184  	}
 20185  }
 20186  func rewriteValueARM64_OpEqB(v *Value) bool {
 20187  	v_1 := v.Args[1]
 20188  	v_0 := v.Args[0]
 20189  	b := v.Block
 20190  	typ := &b.Func.Config.Types
 20191  	// match: (EqB x y)
 20192  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 20193  	for {
 20194  		x := v_0
 20195  		y := v_1
 20196  		v.reset(OpARM64XOR)
 20197  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20198  		v0.AuxInt = int64ToAuxInt(1)
 20199  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 20200  		v1.AddArg2(x, y)
 20201  		v.AddArg2(v0, v1)
 20202  		return true
 20203  	}
 20204  }
 20205  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 20206  	v_1 := v.Args[1]
 20207  	v_0 := v.Args[0]
 20208  	b := v.Block
 20209  	// match: (EqPtr x y)
 20210  	// result: (Equal (CMP x y))
 20211  	for {
 20212  		x := v_0
 20213  		y := v_1
 20214  		v.reset(OpARM64Equal)
 20215  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20216  		v0.AddArg2(x, y)
 20217  		v.AddArg(v0)
 20218  		return true
 20219  	}
 20220  }
 20221  func rewriteValueARM64_OpFMA(v *Value) bool {
 20222  	v_2 := v.Args[2]
 20223  	v_1 := v.Args[1]
 20224  	v_0 := v.Args[0]
 20225  	// match: (FMA x y z)
 20226  	// result: (FMADDD z x y)
 20227  	for {
 20228  		x := v_0
 20229  		y := v_1
 20230  		z := v_2
 20231  		v.reset(OpARM64FMADDD)
 20232  		v.AddArg3(z, x, y)
 20233  		return true
 20234  	}
 20235  }
 20236  func rewriteValueARM64_OpHmul32(v *Value) bool {
 20237  	v_1 := v.Args[1]
 20238  	v_0 := v.Args[0]
 20239  	b := v.Block
 20240  	typ := &b.Func.Config.Types
 20241  	// match: (Hmul32 x y)
 20242  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 20243  	for {
 20244  		x := v_0
 20245  		y := v_1
 20246  		v.reset(OpARM64SRAconst)
 20247  		v.AuxInt = int64ToAuxInt(32)
 20248  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 20249  		v0.AddArg2(x, y)
 20250  		v.AddArg(v0)
 20251  		return true
 20252  	}
 20253  }
 20254  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 20255  	v_1 := v.Args[1]
 20256  	v_0 := v.Args[0]
 20257  	b := v.Block
 20258  	typ := &b.Func.Config.Types
 20259  	// match: (Hmul32u x y)
 20260  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 20261  	for {
 20262  		x := v_0
 20263  		y := v_1
 20264  		v.reset(OpARM64SRAconst)
 20265  		v.AuxInt = int64ToAuxInt(32)
 20266  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 20267  		v0.AddArg2(x, y)
 20268  		v.AddArg(v0)
 20269  		return true
 20270  	}
 20271  }
 20272  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 20273  	v_1 := v.Args[1]
 20274  	v_0 := v.Args[0]
 20275  	b := v.Block
 20276  	// match: (IsInBounds idx len)
 20277  	// result: (LessThanU (CMP idx len))
 20278  	for {
 20279  		idx := v_0
 20280  		len := v_1
 20281  		v.reset(OpARM64LessThanU)
 20282  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20283  		v0.AddArg2(idx, len)
 20284  		v.AddArg(v0)
 20285  		return true
 20286  	}
 20287  }
 20288  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 20289  	v_0 := v.Args[0]
 20290  	b := v.Block
 20291  	// match: (IsNonNil ptr)
 20292  	// result: (NotEqual (CMPconst [0] ptr))
 20293  	for {
 20294  		ptr := v_0
 20295  		v.reset(OpARM64NotEqual)
 20296  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20297  		v0.AuxInt = int64ToAuxInt(0)
 20298  		v0.AddArg(ptr)
 20299  		v.AddArg(v0)
 20300  		return true
 20301  	}
 20302  }
 20303  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 20304  	v_1 := v.Args[1]
 20305  	v_0 := v.Args[0]
 20306  	b := v.Block
 20307  	// match: (IsSliceInBounds idx len)
 20308  	// result: (LessEqualU (CMP idx len))
 20309  	for {
 20310  		idx := v_0
 20311  		len := v_1
 20312  		v.reset(OpARM64LessEqualU)
 20313  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20314  		v0.AddArg2(idx, len)
 20315  		v.AddArg(v0)
 20316  		return true
 20317  	}
 20318  }
 20319  func rewriteValueARM64_OpLeq16(v *Value) bool {
 20320  	v_1 := v.Args[1]
 20321  	v_0 := v.Args[0]
 20322  	b := v.Block
 20323  	typ := &b.Func.Config.Types
 20324  	// match: (Leq16 x y)
 20325  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 20326  	for {
 20327  		x := v_0
 20328  		y := v_1
 20329  		v.reset(OpARM64LessEqual)
 20330  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20331  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20332  		v1.AddArg(x)
 20333  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20334  		v2.AddArg(y)
 20335  		v0.AddArg2(v1, v2)
 20336  		v.AddArg(v0)
 20337  		return true
 20338  	}
 20339  }
 20340  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 20341  	v_1 := v.Args[1]
 20342  	v_0 := v.Args[0]
 20343  	b := v.Block
 20344  	typ := &b.Func.Config.Types
 20345  	// match: (Leq16U x zero:(MOVDconst [0]))
 20346  	// result: (Eq16 x zero)
 20347  	for {
 20348  		x := v_0
 20349  		zero := v_1
 20350  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20351  			break
 20352  		}
 20353  		v.reset(OpEq16)
 20354  		v.AddArg2(x, zero)
 20355  		return true
 20356  	}
 20357  	// match: (Leq16U (MOVDconst [1]) x)
 20358  	// result: (Neq16 (MOVDconst [0]) x)
 20359  	for {
 20360  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20361  			break
 20362  		}
 20363  		x := v_1
 20364  		v.reset(OpNeq16)
 20365  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20366  		v0.AuxInt = int64ToAuxInt(0)
 20367  		v.AddArg2(v0, x)
 20368  		return true
 20369  	}
 20370  	// match: (Leq16U x y)
 20371  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20372  	for {
 20373  		x := v_0
 20374  		y := v_1
 20375  		v.reset(OpARM64LessEqualU)
 20376  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20377  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20378  		v1.AddArg(x)
 20379  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20380  		v2.AddArg(y)
 20381  		v0.AddArg2(v1, v2)
 20382  		v.AddArg(v0)
 20383  		return true
 20384  	}
 20385  }
 20386  func rewriteValueARM64_OpLeq32(v *Value) bool {
 20387  	v_1 := v.Args[1]
 20388  	v_0 := v.Args[0]
 20389  	b := v.Block
 20390  	// match: (Leq32 x y)
 20391  	// result: (LessEqual (CMPW x y))
 20392  	for {
 20393  		x := v_0
 20394  		y := v_1
 20395  		v.reset(OpARM64LessEqual)
 20396  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20397  		v0.AddArg2(x, y)
 20398  		v.AddArg(v0)
 20399  		return true
 20400  	}
 20401  }
 20402  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 20403  	v_1 := v.Args[1]
 20404  	v_0 := v.Args[0]
 20405  	b := v.Block
 20406  	// match: (Leq32F x y)
 20407  	// result: (LessEqualF (FCMPS x y))
 20408  	for {
 20409  		x := v_0
 20410  		y := v_1
 20411  		v.reset(OpARM64LessEqualF)
 20412  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20413  		v0.AddArg2(x, y)
 20414  		v.AddArg(v0)
 20415  		return true
 20416  	}
 20417  }
 20418  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 20419  	v_1 := v.Args[1]
 20420  	v_0 := v.Args[0]
 20421  	b := v.Block
 20422  	typ := &b.Func.Config.Types
 20423  	// match: (Leq32U x zero:(MOVDconst [0]))
 20424  	// result: (Eq32 x zero)
 20425  	for {
 20426  		x := v_0
 20427  		zero := v_1
 20428  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20429  			break
 20430  		}
 20431  		v.reset(OpEq32)
 20432  		v.AddArg2(x, zero)
 20433  		return true
 20434  	}
 20435  	// match: (Leq32U (MOVDconst [1]) x)
 20436  	// result: (Neq32 (MOVDconst [0]) x)
 20437  	for {
 20438  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20439  			break
 20440  		}
 20441  		x := v_1
 20442  		v.reset(OpNeq32)
 20443  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20444  		v0.AuxInt = int64ToAuxInt(0)
 20445  		v.AddArg2(v0, x)
 20446  		return true
 20447  	}
 20448  	// match: (Leq32U x y)
 20449  	// result: (LessEqualU (CMPW x y))
 20450  	for {
 20451  		x := v_0
 20452  		y := v_1
 20453  		v.reset(OpARM64LessEqualU)
 20454  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20455  		v0.AddArg2(x, y)
 20456  		v.AddArg(v0)
 20457  		return true
 20458  	}
 20459  }
 20460  func rewriteValueARM64_OpLeq64(v *Value) bool {
 20461  	v_1 := v.Args[1]
 20462  	v_0 := v.Args[0]
 20463  	b := v.Block
 20464  	// match: (Leq64 x y)
 20465  	// result: (LessEqual (CMP x y))
 20466  	for {
 20467  		x := v_0
 20468  		y := v_1
 20469  		v.reset(OpARM64LessEqual)
 20470  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20471  		v0.AddArg2(x, y)
 20472  		v.AddArg(v0)
 20473  		return true
 20474  	}
 20475  }
 20476  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 20477  	v_1 := v.Args[1]
 20478  	v_0 := v.Args[0]
 20479  	b := v.Block
 20480  	// match: (Leq64F x y)
 20481  	// result: (LessEqualF (FCMPD x y))
 20482  	for {
 20483  		x := v_0
 20484  		y := v_1
 20485  		v.reset(OpARM64LessEqualF)
 20486  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20487  		v0.AddArg2(x, y)
 20488  		v.AddArg(v0)
 20489  		return true
 20490  	}
 20491  }
 20492  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 20493  	v_1 := v.Args[1]
 20494  	v_0 := v.Args[0]
 20495  	b := v.Block
 20496  	typ := &b.Func.Config.Types
 20497  	// match: (Leq64U x zero:(MOVDconst [0]))
 20498  	// result: (Eq64 x zero)
 20499  	for {
 20500  		x := v_0
 20501  		zero := v_1
 20502  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20503  			break
 20504  		}
 20505  		v.reset(OpEq64)
 20506  		v.AddArg2(x, zero)
 20507  		return true
 20508  	}
 20509  	// match: (Leq64U (MOVDconst [1]) x)
 20510  	// result: (Neq64 (MOVDconst [0]) x)
 20511  	for {
 20512  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20513  			break
 20514  		}
 20515  		x := v_1
 20516  		v.reset(OpNeq64)
 20517  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20518  		v0.AuxInt = int64ToAuxInt(0)
 20519  		v.AddArg2(v0, x)
 20520  		return true
 20521  	}
 20522  	// match: (Leq64U x y)
 20523  	// result: (LessEqualU (CMP x y))
 20524  	for {
 20525  		x := v_0
 20526  		y := v_1
 20527  		v.reset(OpARM64LessEqualU)
 20528  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20529  		v0.AddArg2(x, y)
 20530  		v.AddArg(v0)
 20531  		return true
 20532  	}
 20533  }
 20534  func rewriteValueARM64_OpLeq8(v *Value) bool {
 20535  	v_1 := v.Args[1]
 20536  	v_0 := v.Args[0]
 20537  	b := v.Block
 20538  	typ := &b.Func.Config.Types
 20539  	// match: (Leq8 x y)
 20540  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 20541  	for {
 20542  		x := v_0
 20543  		y := v_1
 20544  		v.reset(OpARM64LessEqual)
 20545  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20546  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20547  		v1.AddArg(x)
 20548  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20549  		v2.AddArg(y)
 20550  		v0.AddArg2(v1, v2)
 20551  		v.AddArg(v0)
 20552  		return true
 20553  	}
 20554  }
 20555  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 20556  	v_1 := v.Args[1]
 20557  	v_0 := v.Args[0]
 20558  	b := v.Block
 20559  	typ := &b.Func.Config.Types
 20560  	// match: (Leq8U x zero:(MOVDconst [0]))
 20561  	// result: (Eq8 x zero)
 20562  	for {
 20563  		x := v_0
 20564  		zero := v_1
 20565  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20566  			break
 20567  		}
 20568  		v.reset(OpEq8)
 20569  		v.AddArg2(x, zero)
 20570  		return true
 20571  	}
 20572  	// match: (Leq8U (MOVDconst [1]) x)
 20573  	// result: (Neq8 (MOVDconst [0]) x)
 20574  	for {
 20575  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 20576  			break
 20577  		}
 20578  		x := v_1
 20579  		v.reset(OpNeq8)
 20580  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20581  		v0.AuxInt = int64ToAuxInt(0)
 20582  		v.AddArg2(v0, x)
 20583  		return true
 20584  	}
 20585  	// match: (Leq8U x y)
 20586  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20587  	for {
 20588  		x := v_0
 20589  		y := v_1
 20590  		v.reset(OpARM64LessEqualU)
 20591  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20592  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20593  		v1.AddArg(x)
 20594  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20595  		v2.AddArg(y)
 20596  		v0.AddArg2(v1, v2)
 20597  		v.AddArg(v0)
 20598  		return true
 20599  	}
 20600  }
 20601  func rewriteValueARM64_OpLess16(v *Value) bool {
 20602  	v_1 := v.Args[1]
 20603  	v_0 := v.Args[0]
 20604  	b := v.Block
 20605  	typ := &b.Func.Config.Types
 20606  	// match: (Less16 x y)
 20607  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 20608  	for {
 20609  		x := v_0
 20610  		y := v_1
 20611  		v.reset(OpARM64LessThan)
 20612  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20613  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20614  		v1.AddArg(x)
 20615  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20616  		v2.AddArg(y)
 20617  		v0.AddArg2(v1, v2)
 20618  		v.AddArg(v0)
 20619  		return true
 20620  	}
 20621  }
 20622  func rewriteValueARM64_OpLess16U(v *Value) bool {
 20623  	v_1 := v.Args[1]
 20624  	v_0 := v.Args[0]
 20625  	b := v.Block
 20626  	typ := &b.Func.Config.Types
 20627  	// match: (Less16U zero:(MOVDconst [0]) x)
 20628  	// result: (Neq16 zero x)
 20629  	for {
 20630  		zero := v_0
 20631  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20632  			break
 20633  		}
 20634  		x := v_1
 20635  		v.reset(OpNeq16)
 20636  		v.AddArg2(zero, x)
 20637  		return true
 20638  	}
 20639  	// match: (Less16U x (MOVDconst [1]))
 20640  	// result: (Eq16 x (MOVDconst [0]))
 20641  	for {
 20642  		x := v_0
 20643  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20644  			break
 20645  		}
 20646  		v.reset(OpEq16)
 20647  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20648  		v0.AuxInt = int64ToAuxInt(0)
 20649  		v.AddArg2(x, v0)
 20650  		return true
 20651  	}
 20652  	// match: (Less16U x y)
 20653  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20654  	for {
 20655  		x := v_0
 20656  		y := v_1
 20657  		v.reset(OpARM64LessThanU)
 20658  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20659  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20660  		v1.AddArg(x)
 20661  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20662  		v2.AddArg(y)
 20663  		v0.AddArg2(v1, v2)
 20664  		v.AddArg(v0)
 20665  		return true
 20666  	}
 20667  }
 20668  func rewriteValueARM64_OpLess32(v *Value) bool {
 20669  	v_1 := v.Args[1]
 20670  	v_0 := v.Args[0]
 20671  	b := v.Block
 20672  	// match: (Less32 x y)
 20673  	// result: (LessThan (CMPW x y))
 20674  	for {
 20675  		x := v_0
 20676  		y := v_1
 20677  		v.reset(OpARM64LessThan)
 20678  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20679  		v0.AddArg2(x, y)
 20680  		v.AddArg(v0)
 20681  		return true
 20682  	}
 20683  }
 20684  func rewriteValueARM64_OpLess32F(v *Value) bool {
 20685  	v_1 := v.Args[1]
 20686  	v_0 := v.Args[0]
 20687  	b := v.Block
 20688  	// match: (Less32F x y)
 20689  	// result: (LessThanF (FCMPS x y))
 20690  	for {
 20691  		x := v_0
 20692  		y := v_1
 20693  		v.reset(OpARM64LessThanF)
 20694  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20695  		v0.AddArg2(x, y)
 20696  		v.AddArg(v0)
 20697  		return true
 20698  	}
 20699  }
 20700  func rewriteValueARM64_OpLess32U(v *Value) bool {
 20701  	v_1 := v.Args[1]
 20702  	v_0 := v.Args[0]
 20703  	b := v.Block
 20704  	typ := &b.Func.Config.Types
 20705  	// match: (Less32U zero:(MOVDconst [0]) x)
 20706  	// result: (Neq32 zero x)
 20707  	for {
 20708  		zero := v_0
 20709  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20710  			break
 20711  		}
 20712  		x := v_1
 20713  		v.reset(OpNeq32)
 20714  		v.AddArg2(zero, x)
 20715  		return true
 20716  	}
 20717  	// match: (Less32U x (MOVDconst [1]))
 20718  	// result: (Eq32 x (MOVDconst [0]))
 20719  	for {
 20720  		x := v_0
 20721  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20722  			break
 20723  		}
 20724  		v.reset(OpEq32)
 20725  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20726  		v0.AuxInt = int64ToAuxInt(0)
 20727  		v.AddArg2(x, v0)
 20728  		return true
 20729  	}
 20730  	// match: (Less32U x y)
 20731  	// result: (LessThanU (CMPW x y))
 20732  	for {
 20733  		x := v_0
 20734  		y := v_1
 20735  		v.reset(OpARM64LessThanU)
 20736  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20737  		v0.AddArg2(x, y)
 20738  		v.AddArg(v0)
 20739  		return true
 20740  	}
 20741  }
 20742  func rewriteValueARM64_OpLess64(v *Value) bool {
 20743  	v_1 := v.Args[1]
 20744  	v_0 := v.Args[0]
 20745  	b := v.Block
 20746  	// match: (Less64 x y)
 20747  	// result: (LessThan (CMP x y))
 20748  	for {
 20749  		x := v_0
 20750  		y := v_1
 20751  		v.reset(OpARM64LessThan)
 20752  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20753  		v0.AddArg2(x, y)
 20754  		v.AddArg(v0)
 20755  		return true
 20756  	}
 20757  }
 20758  func rewriteValueARM64_OpLess64F(v *Value) bool {
 20759  	v_1 := v.Args[1]
 20760  	v_0 := v.Args[0]
 20761  	b := v.Block
 20762  	// match: (Less64F x y)
 20763  	// result: (LessThanF (FCMPD x y))
 20764  	for {
 20765  		x := v_0
 20766  		y := v_1
 20767  		v.reset(OpARM64LessThanF)
 20768  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20769  		v0.AddArg2(x, y)
 20770  		v.AddArg(v0)
 20771  		return true
 20772  	}
 20773  }
 20774  func rewriteValueARM64_OpLess64U(v *Value) bool {
 20775  	v_1 := v.Args[1]
 20776  	v_0 := v.Args[0]
 20777  	b := v.Block
 20778  	typ := &b.Func.Config.Types
 20779  	// match: (Less64U zero:(MOVDconst [0]) x)
 20780  	// result: (Neq64 zero x)
 20781  	for {
 20782  		zero := v_0
 20783  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20784  			break
 20785  		}
 20786  		x := v_1
 20787  		v.reset(OpNeq64)
 20788  		v.AddArg2(zero, x)
 20789  		return true
 20790  	}
 20791  	// match: (Less64U x (MOVDconst [1]))
 20792  	// result: (Eq64 x (MOVDconst [0]))
 20793  	for {
 20794  		x := v_0
 20795  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20796  			break
 20797  		}
 20798  		v.reset(OpEq64)
 20799  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20800  		v0.AuxInt = int64ToAuxInt(0)
 20801  		v.AddArg2(x, v0)
 20802  		return true
 20803  	}
 20804  	// match: (Less64U x y)
 20805  	// result: (LessThanU (CMP x y))
 20806  	for {
 20807  		x := v_0
 20808  		y := v_1
 20809  		v.reset(OpARM64LessThanU)
 20810  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20811  		v0.AddArg2(x, y)
 20812  		v.AddArg(v0)
 20813  		return true
 20814  	}
 20815  }
 20816  func rewriteValueARM64_OpLess8(v *Value) bool {
 20817  	v_1 := v.Args[1]
 20818  	v_0 := v.Args[0]
 20819  	b := v.Block
 20820  	typ := &b.Func.Config.Types
 20821  	// match: (Less8 x y)
 20822  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 20823  	for {
 20824  		x := v_0
 20825  		y := v_1
 20826  		v.reset(OpARM64LessThan)
 20827  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20828  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20829  		v1.AddArg(x)
 20830  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20831  		v2.AddArg(y)
 20832  		v0.AddArg2(v1, v2)
 20833  		v.AddArg(v0)
 20834  		return true
 20835  	}
 20836  }
 20837  func rewriteValueARM64_OpLess8U(v *Value) bool {
 20838  	v_1 := v.Args[1]
 20839  	v_0 := v.Args[0]
 20840  	b := v.Block
 20841  	typ := &b.Func.Config.Types
 20842  	// match: (Less8U zero:(MOVDconst [0]) x)
 20843  	// result: (Neq8 zero x)
 20844  	for {
 20845  		zero := v_0
 20846  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 20847  			break
 20848  		}
 20849  		x := v_1
 20850  		v.reset(OpNeq8)
 20851  		v.AddArg2(zero, x)
 20852  		return true
 20853  	}
 20854  	// match: (Less8U x (MOVDconst [1]))
 20855  	// result: (Eq8 x (MOVDconst [0]))
 20856  	for {
 20857  		x := v_0
 20858  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 20859  			break
 20860  		}
 20861  		v.reset(OpEq8)
 20862  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20863  		v0.AuxInt = int64ToAuxInt(0)
 20864  		v.AddArg2(x, v0)
 20865  		return true
 20866  	}
 20867  	// match: (Less8U x y)
 20868  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20869  	for {
 20870  		x := v_0
 20871  		y := v_1
 20872  		v.reset(OpARM64LessThanU)
 20873  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20874  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20875  		v1.AddArg(x)
 20876  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20877  		v2.AddArg(y)
 20878  		v0.AddArg2(v1, v2)
 20879  		v.AddArg(v0)
 20880  		return true
 20881  	}
 20882  }
 20883  func rewriteValueARM64_OpLoad(v *Value) bool {
 20884  	v_1 := v.Args[1]
 20885  	v_0 := v.Args[0]
 20886  	// match: (Load <t> ptr mem)
 20887  	// cond: t.IsBoolean()
 20888  	// result: (MOVBUload ptr mem)
 20889  	for {
 20890  		t := v.Type
 20891  		ptr := v_0
 20892  		mem := v_1
 20893  		if !(t.IsBoolean()) {
 20894  			break
 20895  		}
 20896  		v.reset(OpARM64MOVBUload)
 20897  		v.AddArg2(ptr, mem)
 20898  		return true
 20899  	}
 20900  	// match: (Load <t> ptr mem)
 20901  	// cond: (is8BitInt(t) && t.IsSigned())
 20902  	// result: (MOVBload ptr mem)
 20903  	for {
 20904  		t := v.Type
 20905  		ptr := v_0
 20906  		mem := v_1
 20907  		if !(is8BitInt(t) && t.IsSigned()) {
 20908  			break
 20909  		}
 20910  		v.reset(OpARM64MOVBload)
 20911  		v.AddArg2(ptr, mem)
 20912  		return true
 20913  	}
 20914  	// match: (Load <t> ptr mem)
 20915  	// cond: (is8BitInt(t) && !t.IsSigned())
 20916  	// result: (MOVBUload ptr mem)
 20917  	for {
 20918  		t := v.Type
 20919  		ptr := v_0
 20920  		mem := v_1
 20921  		if !(is8BitInt(t) && !t.IsSigned()) {
 20922  			break
 20923  		}
 20924  		v.reset(OpARM64MOVBUload)
 20925  		v.AddArg2(ptr, mem)
 20926  		return true
 20927  	}
 20928  	// match: (Load <t> ptr mem)
 20929  	// cond: (is16BitInt(t) && t.IsSigned())
 20930  	// result: (MOVHload ptr mem)
 20931  	for {
 20932  		t := v.Type
 20933  		ptr := v_0
 20934  		mem := v_1
 20935  		if !(is16BitInt(t) && t.IsSigned()) {
 20936  			break
 20937  		}
 20938  		v.reset(OpARM64MOVHload)
 20939  		v.AddArg2(ptr, mem)
 20940  		return true
 20941  	}
 20942  	// match: (Load <t> ptr mem)
 20943  	// cond: (is16BitInt(t) && !t.IsSigned())
 20944  	// result: (MOVHUload ptr mem)
 20945  	for {
 20946  		t := v.Type
 20947  		ptr := v_0
 20948  		mem := v_1
 20949  		if !(is16BitInt(t) && !t.IsSigned()) {
 20950  			break
 20951  		}
 20952  		v.reset(OpARM64MOVHUload)
 20953  		v.AddArg2(ptr, mem)
 20954  		return true
 20955  	}
 20956  	// match: (Load <t> ptr mem)
 20957  	// cond: (is32BitInt(t) && t.IsSigned())
 20958  	// result: (MOVWload ptr mem)
 20959  	for {
 20960  		t := v.Type
 20961  		ptr := v_0
 20962  		mem := v_1
 20963  		if !(is32BitInt(t) && t.IsSigned()) {
 20964  			break
 20965  		}
 20966  		v.reset(OpARM64MOVWload)
 20967  		v.AddArg2(ptr, mem)
 20968  		return true
 20969  	}
 20970  	// match: (Load <t> ptr mem)
 20971  	// cond: (is32BitInt(t) && !t.IsSigned())
 20972  	// result: (MOVWUload ptr mem)
 20973  	for {
 20974  		t := v.Type
 20975  		ptr := v_0
 20976  		mem := v_1
 20977  		if !(is32BitInt(t) && !t.IsSigned()) {
 20978  			break
 20979  		}
 20980  		v.reset(OpARM64MOVWUload)
 20981  		v.AddArg2(ptr, mem)
 20982  		return true
 20983  	}
 20984  	// match: (Load <t> ptr mem)
 20985  	// cond: (is64BitInt(t) || isPtr(t))
 20986  	// result: (MOVDload ptr mem)
 20987  	for {
 20988  		t := v.Type
 20989  		ptr := v_0
 20990  		mem := v_1
 20991  		if !(is64BitInt(t) || isPtr(t)) {
 20992  			break
 20993  		}
 20994  		v.reset(OpARM64MOVDload)
 20995  		v.AddArg2(ptr, mem)
 20996  		return true
 20997  	}
 20998  	// match: (Load <t> ptr mem)
 20999  	// cond: is32BitFloat(t)
 21000  	// result: (FMOVSload ptr mem)
 21001  	for {
 21002  		t := v.Type
 21003  		ptr := v_0
 21004  		mem := v_1
 21005  		if !(is32BitFloat(t)) {
 21006  			break
 21007  		}
 21008  		v.reset(OpARM64FMOVSload)
 21009  		v.AddArg2(ptr, mem)
 21010  		return true
 21011  	}
 21012  	// match: (Load <t> ptr mem)
 21013  	// cond: is64BitFloat(t)
 21014  	// result: (FMOVDload ptr mem)
 21015  	for {
 21016  		t := v.Type
 21017  		ptr := v_0
 21018  		mem := v_1
 21019  		if !(is64BitFloat(t)) {
 21020  			break
 21021  		}
 21022  		v.reset(OpARM64FMOVDload)
 21023  		v.AddArg2(ptr, mem)
 21024  		return true
 21025  	}
 21026  	// match: (Load <t> ptr mem)
 21027  	// cond: t.Size() == 16
 21028  	// result: (FMOVQload ptr mem)
 21029  	for {
 21030  		t := v.Type
 21031  		ptr := v_0
 21032  		mem := v_1
 21033  		if !(t.Size() == 16) {
 21034  			break
 21035  		}
 21036  		v.reset(OpARM64FMOVQload)
 21037  		v.AddArg2(ptr, mem)
 21038  		return true
 21039  	}
 21040  	return false
 21041  }
 21042  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 21043  	v_1 := v.Args[1]
 21044  	v_0 := v.Args[0]
 21045  	b := v.Block
 21046  	typ := &b.Func.Config.Types
 21047  	// match: (LocalAddr <t> {sym} base mem)
 21048  	// cond: t.Elem().HasPointers()
 21049  	// result: (MOVDaddr {sym} (SPanchored base mem))
 21050  	for {
 21051  		t := v.Type
 21052  		sym := auxToSym(v.Aux)
 21053  		base := v_0
 21054  		mem := v_1
 21055  		if !(t.Elem().HasPointers()) {
 21056  			break
 21057  		}
 21058  		v.reset(OpARM64MOVDaddr)
 21059  		v.Aux = symToAux(sym)
 21060  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 21061  		v0.AddArg2(base, mem)
 21062  		v.AddArg(v0)
 21063  		return true
 21064  	}
 21065  	// match: (LocalAddr <t> {sym} base _)
 21066  	// cond: !t.Elem().HasPointers()
 21067  	// result: (MOVDaddr {sym} base)
 21068  	for {
 21069  		t := v.Type
 21070  		sym := auxToSym(v.Aux)
 21071  		base := v_0
 21072  		if !(!t.Elem().HasPointers()) {
 21073  			break
 21074  		}
 21075  		v.reset(OpARM64MOVDaddr)
 21076  		v.Aux = symToAux(sym)
 21077  		v.AddArg(base)
 21078  		return true
 21079  	}
 21080  	return false
 21081  }
 21082  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 21083  	v_1 := v.Args[1]
 21084  	v_0 := v.Args[0]
 21085  	b := v.Block
 21086  	typ := &b.Func.Config.Types
 21087  	// match: (Lsh64x16 <t> x y)
 21088  	// cond: shiftIsBounded(v)
 21089  	// result: (SLL <t> x y)
 21090  	for {
 21091  		t := v.Type
 21092  		x := v_0
 21093  		y := v_1
 21094  		if !(shiftIsBounded(v)) {
 21095  			break
 21096  		}
 21097  		v.reset(OpARM64SLL)
 21098  		v.Type = t
 21099  		v.AddArg2(x, y)
 21100  		return true
 21101  	}
 21102  	// match: (Lsh64x16 <t> [bounded] x y)
 21103  	// cond: !shiftIsBounded(v)
 21104  	// result: (Lsh64x32 <t> [bounded] x (ZeroExt16to32 y))
 21105  	for {
 21106  		t := v.Type
 21107  		bounded := auxIntToBool(v.AuxInt)
 21108  		x := v_0
 21109  		y := v_1
 21110  		if !(!shiftIsBounded(v)) {
 21111  			break
 21112  		}
 21113  		v.reset(OpLsh64x32)
 21114  		v.Type = t
 21115  		v.AuxInt = boolToAuxInt(bounded)
 21116  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21117  		v0.AddArg(y)
 21118  		v.AddArg2(x, v0)
 21119  		return true
 21120  	}
 21121  	return false
 21122  }
 21123  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 21124  	v_1 := v.Args[1]
 21125  	v_0 := v.Args[0]
 21126  	b := v.Block
 21127  	// match: (Lsh64x32 <t> x y)
 21128  	// cond: shiftIsBounded(v)
 21129  	// result: (SLL <t> x y)
 21130  	for {
 21131  		t := v.Type
 21132  		x := v_0
 21133  		y := v_1
 21134  		if !(shiftIsBounded(v)) {
 21135  			break
 21136  		}
 21137  		v.reset(OpARM64SLL)
 21138  		v.Type = t
 21139  		v.AddArg2(x, y)
 21140  		return true
 21141  	}
 21142  	// match: (Lsh64x32 <t> x y)
 21143  	// cond: !shiftIsBounded(v)
 21144  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPWconst [64] y))
 21145  	for {
 21146  		t := v.Type
 21147  		x := v_0
 21148  		y := v_1
 21149  		if !(!shiftIsBounded(v)) {
 21150  			break
 21151  		}
 21152  		v.reset(OpARM64CSEL)
 21153  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21154  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 21155  		v0.AddArg2(x, y)
 21156  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21157  		v1.AuxInt = int64ToAuxInt(0)
 21158  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 21159  		v2.AuxInt = int32ToAuxInt(64)
 21160  		v2.AddArg(y)
 21161  		v.AddArg3(v0, v1, v2)
 21162  		return true
 21163  	}
 21164  	return false
 21165  }
 21166  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 21167  	v_1 := v.Args[1]
 21168  	v_0 := v.Args[0]
 21169  	b := v.Block
 21170  	// match: (Lsh64x64 <t> x y)
 21171  	// cond: shiftIsBounded(v)
 21172  	// result: (SLL <t> x y)
 21173  	for {
 21174  		t := v.Type
 21175  		x := v_0
 21176  		y := v_1
 21177  		if !(shiftIsBounded(v)) {
 21178  			break
 21179  		}
 21180  		v.reset(OpARM64SLL)
 21181  		v.Type = t
 21182  		v.AddArg2(x, y)
 21183  		return true
 21184  	}
 21185  	// match: (Lsh64x64 <t> x y)
 21186  	// cond: !shiftIsBounded(v)
 21187  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 21188  	for {
 21189  		t := v.Type
 21190  		x := v_0
 21191  		y := v_1
 21192  		if !(!shiftIsBounded(v)) {
 21193  			break
 21194  		}
 21195  		v.reset(OpARM64CSEL)
 21196  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21197  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 21198  		v0.AddArg2(x, y)
 21199  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21200  		v1.AuxInt = int64ToAuxInt(0)
 21201  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21202  		v2.AuxInt = int64ToAuxInt(64)
 21203  		v2.AddArg(y)
 21204  		v.AddArg3(v0, v1, v2)
 21205  		return true
 21206  	}
 21207  	return false
 21208  }
 21209  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 21210  	v_1 := v.Args[1]
 21211  	v_0 := v.Args[0]
 21212  	b := v.Block
 21213  	typ := &b.Func.Config.Types
 21214  	// match: (Lsh64x8 <t> x y)
 21215  	// cond: shiftIsBounded(v)
 21216  	// result: (SLL <t> x y)
 21217  	for {
 21218  		t := v.Type
 21219  		x := v_0
 21220  		y := v_1
 21221  		if !(shiftIsBounded(v)) {
 21222  			break
 21223  		}
 21224  		v.reset(OpARM64SLL)
 21225  		v.Type = t
 21226  		v.AddArg2(x, y)
 21227  		return true
 21228  	}
 21229  	// match: (Lsh64x8 <t> [bounded] x y)
 21230  	// cond: !shiftIsBounded(v)
 21231  	// result: (Lsh64x32 <t> [bounded] x (ZeroExt8to32 y))
 21232  	for {
 21233  		t := v.Type
 21234  		bounded := auxIntToBool(v.AuxInt)
 21235  		x := v_0
 21236  		y := v_1
 21237  		if !(!shiftIsBounded(v)) {
 21238  			break
 21239  		}
 21240  		v.reset(OpLsh64x32)
 21241  		v.Type = t
 21242  		v.AuxInt = boolToAuxInt(bounded)
 21243  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21244  		v0.AddArg(y)
 21245  		v.AddArg2(x, v0)
 21246  		return true
 21247  	}
 21248  	return false
 21249  }
 21250  func rewriteValueARM64_OpMod16(v *Value) bool {
 21251  	v_1 := v.Args[1]
 21252  	v_0 := v.Args[0]
 21253  	b := v.Block
 21254  	typ := &b.Func.Config.Types
 21255  	// match: (Mod16 x y)
 21256  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 21257  	for {
 21258  		x := v_0
 21259  		y := v_1
 21260  		v.reset(OpARM64MODW)
 21261  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 21262  		v0.AddArg(x)
 21263  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 21264  		v1.AddArg(y)
 21265  		v.AddArg2(v0, v1)
 21266  		return true
 21267  	}
 21268  }
 21269  func rewriteValueARM64_OpMod16u(v *Value) bool {
 21270  	v_1 := v.Args[1]
 21271  	v_0 := v.Args[0]
 21272  	b := v.Block
 21273  	typ := &b.Func.Config.Types
 21274  	// match: (Mod16u x y)
 21275  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 21276  	for {
 21277  		x := v_0
 21278  		y := v_1
 21279  		v.reset(OpARM64UMODW)
 21280  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21281  		v0.AddArg(x)
 21282  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21283  		v1.AddArg(y)
 21284  		v.AddArg2(v0, v1)
 21285  		return true
 21286  	}
 21287  }
 21288  func rewriteValueARM64_OpMod32(v *Value) bool {
 21289  	v_1 := v.Args[1]
 21290  	v_0 := v.Args[0]
 21291  	// match: (Mod32 x y)
 21292  	// result: (MODW x y)
 21293  	for {
 21294  		x := v_0
 21295  		y := v_1
 21296  		v.reset(OpARM64MODW)
 21297  		v.AddArg2(x, y)
 21298  		return true
 21299  	}
 21300  }
 21301  func rewriteValueARM64_OpMod64(v *Value) bool {
 21302  	v_1 := v.Args[1]
 21303  	v_0 := v.Args[0]
 21304  	// match: (Mod64 x y)
 21305  	// result: (MOD x y)
 21306  	for {
 21307  		x := v_0
 21308  		y := v_1
 21309  		v.reset(OpARM64MOD)
 21310  		v.AddArg2(x, y)
 21311  		return true
 21312  	}
 21313  }
 21314  func rewriteValueARM64_OpMod8(v *Value) bool {
 21315  	v_1 := v.Args[1]
 21316  	v_0 := v.Args[0]
 21317  	b := v.Block
 21318  	typ := &b.Func.Config.Types
 21319  	// match: (Mod8 x y)
 21320  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 21321  	for {
 21322  		x := v_0
 21323  		y := v_1
 21324  		v.reset(OpARM64MODW)
 21325  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 21326  		v0.AddArg(x)
 21327  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 21328  		v1.AddArg(y)
 21329  		v.AddArg2(v0, v1)
 21330  		return true
 21331  	}
 21332  }
 21333  func rewriteValueARM64_OpMod8u(v *Value) bool {
 21334  	v_1 := v.Args[1]
 21335  	v_0 := v.Args[0]
 21336  	b := v.Block
 21337  	typ := &b.Func.Config.Types
 21338  	// match: (Mod8u x y)
 21339  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 21340  	for {
 21341  		x := v_0
 21342  		y := v_1
 21343  		v.reset(OpARM64UMODW)
 21344  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21345  		v0.AddArg(x)
 21346  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21347  		v1.AddArg(y)
 21348  		v.AddArg2(v0, v1)
 21349  		return true
 21350  	}
 21351  }
 21352  func rewriteValueARM64_OpMove(v *Value) bool {
 21353  	v_2 := v.Args[2]
 21354  	v_1 := v.Args[1]
 21355  	v_0 := v.Args[0]
 21356  	b := v.Block
 21357  	typ := &b.Func.Config.Types
 21358  	// match: (Move [0] _ _ mem)
 21359  	// result: mem
 21360  	for {
 21361  		if auxIntToInt64(v.AuxInt) != 0 {
 21362  			break
 21363  		}
 21364  		mem := v_2
 21365  		v.copyOf(mem)
 21366  		return true
 21367  	}
 21368  	// match: (Move [1] dst src mem)
 21369  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 21370  	for {
 21371  		if auxIntToInt64(v.AuxInt) != 1 {
 21372  			break
 21373  		}
 21374  		dst := v_0
 21375  		src := v_1
 21376  		mem := v_2
 21377  		v.reset(OpARM64MOVBstore)
 21378  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21379  		v0.AddArg2(src, mem)
 21380  		v.AddArg3(dst, v0, mem)
 21381  		return true
 21382  	}
 21383  	// match: (Move [2] dst src mem)
 21384  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 21385  	for {
 21386  		if auxIntToInt64(v.AuxInt) != 2 {
 21387  			break
 21388  		}
 21389  		dst := v_0
 21390  		src := v_1
 21391  		mem := v_2
 21392  		v.reset(OpARM64MOVHstore)
 21393  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21394  		v0.AddArg2(src, mem)
 21395  		v.AddArg3(dst, v0, mem)
 21396  		return true
 21397  	}
 21398  	// match: (Move [3] dst src mem)
 21399  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 21400  	for {
 21401  		if auxIntToInt64(v.AuxInt) != 3 {
 21402  			break
 21403  		}
 21404  		dst := v_0
 21405  		src := v_1
 21406  		mem := v_2
 21407  		v.reset(OpARM64MOVBstore)
 21408  		v.AuxInt = int32ToAuxInt(2)
 21409  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21410  		v0.AuxInt = int32ToAuxInt(2)
 21411  		v0.AddArg2(src, mem)
 21412  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 21413  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21414  		v2.AddArg2(src, mem)
 21415  		v1.AddArg3(dst, v2, mem)
 21416  		v.AddArg3(dst, v0, v1)
 21417  		return true
 21418  	}
 21419  	// match: (Move [4] dst src mem)
 21420  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 21421  	for {
 21422  		if auxIntToInt64(v.AuxInt) != 4 {
 21423  			break
 21424  		}
 21425  		dst := v_0
 21426  		src := v_1
 21427  		mem := v_2
 21428  		v.reset(OpARM64MOVWstore)
 21429  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21430  		v0.AddArg2(src, mem)
 21431  		v.AddArg3(dst, v0, mem)
 21432  		return true
 21433  	}
 21434  	// match: (Move [5] dst src mem)
 21435  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21436  	for {
 21437  		if auxIntToInt64(v.AuxInt) != 5 {
 21438  			break
 21439  		}
 21440  		dst := v_0
 21441  		src := v_1
 21442  		mem := v_2
 21443  		v.reset(OpARM64MOVBstore)
 21444  		v.AuxInt = int32ToAuxInt(4)
 21445  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21446  		v0.AuxInt = int32ToAuxInt(4)
 21447  		v0.AddArg2(src, mem)
 21448  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21449  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21450  		v2.AddArg2(src, mem)
 21451  		v1.AddArg3(dst, v2, mem)
 21452  		v.AddArg3(dst, v0, v1)
 21453  		return true
 21454  	}
 21455  	// match: (Move [6] dst src mem)
 21456  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21457  	for {
 21458  		if auxIntToInt64(v.AuxInt) != 6 {
 21459  			break
 21460  		}
 21461  		dst := v_0
 21462  		src := v_1
 21463  		mem := v_2
 21464  		v.reset(OpARM64MOVHstore)
 21465  		v.AuxInt = int32ToAuxInt(4)
 21466  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21467  		v0.AuxInt = int32ToAuxInt(4)
 21468  		v0.AddArg2(src, mem)
 21469  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21470  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21471  		v2.AddArg2(src, mem)
 21472  		v1.AddArg3(dst, v2, mem)
 21473  		v.AddArg3(dst, v0, v1)
 21474  		return true
 21475  	}
 21476  	// match: (Move [7] dst src mem)
 21477  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 21478  	for {
 21479  		if auxIntToInt64(v.AuxInt) != 7 {
 21480  			break
 21481  		}
 21482  		dst := v_0
 21483  		src := v_1
 21484  		mem := v_2
 21485  		v.reset(OpARM64MOVWstore)
 21486  		v.AuxInt = int32ToAuxInt(3)
 21487  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21488  		v0.AuxInt = int32ToAuxInt(3)
 21489  		v0.AddArg2(src, mem)
 21490  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21491  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21492  		v2.AddArg2(src, mem)
 21493  		v1.AddArg3(dst, v2, mem)
 21494  		v.AddArg3(dst, v0, v1)
 21495  		return true
 21496  	}
 21497  	// match: (Move [8] dst src mem)
 21498  	// result: (MOVDstore dst (MOVDload src mem) mem)
 21499  	for {
 21500  		if auxIntToInt64(v.AuxInt) != 8 {
 21501  			break
 21502  		}
 21503  		dst := v_0
 21504  		src := v_1
 21505  		mem := v_2
 21506  		v.reset(OpARM64MOVDstore)
 21507  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21508  		v0.AddArg2(src, mem)
 21509  		v.AddArg3(dst, v0, mem)
 21510  		return true
 21511  	}
 21512  	// match: (Move [9] dst src mem)
 21513  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21514  	for {
 21515  		if auxIntToInt64(v.AuxInt) != 9 {
 21516  			break
 21517  		}
 21518  		dst := v_0
 21519  		src := v_1
 21520  		mem := v_2
 21521  		v.reset(OpARM64MOVBstore)
 21522  		v.AuxInt = int32ToAuxInt(8)
 21523  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 21524  		v0.AuxInt = int32ToAuxInt(8)
 21525  		v0.AddArg2(src, mem)
 21526  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21527  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21528  		v2.AddArg2(src, mem)
 21529  		v1.AddArg3(dst, v2, mem)
 21530  		v.AddArg3(dst, v0, v1)
 21531  		return true
 21532  	}
 21533  	// match: (Move [10] dst src mem)
 21534  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21535  	for {
 21536  		if auxIntToInt64(v.AuxInt) != 10 {
 21537  			break
 21538  		}
 21539  		dst := v_0
 21540  		src := v_1
 21541  		mem := v_2
 21542  		v.reset(OpARM64MOVHstore)
 21543  		v.AuxInt = int32ToAuxInt(8)
 21544  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 21545  		v0.AuxInt = int32ToAuxInt(8)
 21546  		v0.AddArg2(src, mem)
 21547  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21548  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21549  		v2.AddArg2(src, mem)
 21550  		v1.AddArg3(dst, v2, mem)
 21551  		v.AddArg3(dst, v0, v1)
 21552  		return true
 21553  	}
 21554  	// match: (Move [11] dst src mem)
 21555  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21556  	for {
 21557  		if auxIntToInt64(v.AuxInt) != 11 {
 21558  			break
 21559  		}
 21560  		dst := v_0
 21561  		src := v_1
 21562  		mem := v_2
 21563  		v.reset(OpARM64MOVDstore)
 21564  		v.AuxInt = int32ToAuxInt(3)
 21565  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21566  		v0.AuxInt = int32ToAuxInt(3)
 21567  		v0.AddArg2(src, mem)
 21568  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21569  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21570  		v2.AddArg2(src, mem)
 21571  		v1.AddArg3(dst, v2, mem)
 21572  		v.AddArg3(dst, v0, v1)
 21573  		return true
 21574  	}
 21575  	// match: (Move [12] dst src mem)
 21576  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21577  	for {
 21578  		if auxIntToInt64(v.AuxInt) != 12 {
 21579  			break
 21580  		}
 21581  		dst := v_0
 21582  		src := v_1
 21583  		mem := v_2
 21584  		v.reset(OpARM64MOVWstore)
 21585  		v.AuxInt = int32ToAuxInt(8)
 21586  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 21587  		v0.AuxInt = int32ToAuxInt(8)
 21588  		v0.AddArg2(src, mem)
 21589  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21590  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21591  		v2.AddArg2(src, mem)
 21592  		v1.AddArg3(dst, v2, mem)
 21593  		v.AddArg3(dst, v0, v1)
 21594  		return true
 21595  	}
 21596  	// match: (Move [13] dst src mem)
 21597  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21598  	for {
 21599  		if auxIntToInt64(v.AuxInt) != 13 {
 21600  			break
 21601  		}
 21602  		dst := v_0
 21603  		src := v_1
 21604  		mem := v_2
 21605  		v.reset(OpARM64MOVDstore)
 21606  		v.AuxInt = int32ToAuxInt(5)
 21607  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21608  		v0.AuxInt = int32ToAuxInt(5)
 21609  		v0.AddArg2(src, mem)
 21610  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21611  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21612  		v2.AddArg2(src, mem)
 21613  		v1.AddArg3(dst, v2, mem)
 21614  		v.AddArg3(dst, v0, v1)
 21615  		return true
 21616  	}
 21617  	// match: (Move [14] dst src mem)
 21618  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21619  	for {
 21620  		if auxIntToInt64(v.AuxInt) != 14 {
 21621  			break
 21622  		}
 21623  		dst := v_0
 21624  		src := v_1
 21625  		mem := v_2
 21626  		v.reset(OpARM64MOVDstore)
 21627  		v.AuxInt = int32ToAuxInt(6)
 21628  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21629  		v0.AuxInt = int32ToAuxInt(6)
 21630  		v0.AddArg2(src, mem)
 21631  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21632  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21633  		v2.AddArg2(src, mem)
 21634  		v1.AddArg3(dst, v2, mem)
 21635  		v.AddArg3(dst, v0, v1)
 21636  		return true
 21637  	}
 21638  	// match: (Move [15] dst src mem)
 21639  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 21640  	for {
 21641  		if auxIntToInt64(v.AuxInt) != 15 {
 21642  			break
 21643  		}
 21644  		dst := v_0
 21645  		src := v_1
 21646  		mem := v_2
 21647  		v.reset(OpARM64MOVDstore)
 21648  		v.AuxInt = int32ToAuxInt(7)
 21649  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21650  		v0.AuxInt = int32ToAuxInt(7)
 21651  		v0.AddArg2(src, mem)
 21652  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21653  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21654  		v2.AddArg2(src, mem)
 21655  		v1.AddArg3(dst, v2, mem)
 21656  		v.AddArg3(dst, v0, v1)
 21657  		return true
 21658  	}
 21659  	// match: (Move [16] dst src mem)
 21660  	// result: (FMOVQstore dst (FMOVQload src mem) mem)
 21661  	for {
 21662  		if auxIntToInt64(v.AuxInt) != 16 {
 21663  			break
 21664  		}
 21665  		dst := v_0
 21666  		src := v_1
 21667  		mem := v_2
 21668  		v.reset(OpARM64FMOVQstore)
 21669  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21670  		v0.AddArg2(src, mem)
 21671  		v.AddArg3(dst, v0, mem)
 21672  		return true
 21673  	}
 21674  	// match: (Move [s] dst src mem)
 21675  	// cond: s > 16 && s <= 24
 21676  	// result: (MOVDstore [int32(s-8)] dst (MOVDload [int32(s-8)] src mem) (FMOVQstore dst (FMOVQload src mem) mem))
 21677  	for {
 21678  		s := auxIntToInt64(v.AuxInt)
 21679  		dst := v_0
 21680  		src := v_1
 21681  		mem := v_2
 21682  		if !(s > 16 && s <= 24) {
 21683  			break
 21684  		}
 21685  		v.reset(OpARM64MOVDstore)
 21686  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 21687  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21688  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 21689  		v0.AddArg2(src, mem)
 21690  		v1 := b.NewValue0(v.Pos, OpARM64FMOVQstore, types.TypeMem)
 21691  		v2 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21692  		v2.AddArg2(src, mem)
 21693  		v1.AddArg3(dst, v2, mem)
 21694  		v.AddArg3(dst, v0, v1)
 21695  		return true
 21696  	}
 21697  	// match: (Move [s] dst src mem)
 21698  	// cond: s > 24 && s < 32
 21699  	// result: (FMOVQstore [int32(s-16)] dst (FMOVQload [int32(s-16)] src mem) (FMOVQstore dst (FMOVQload src mem) mem))
 21700  	for {
 21701  		s := auxIntToInt64(v.AuxInt)
 21702  		dst := v_0
 21703  		src := v_1
 21704  		mem := v_2
 21705  		if !(s > 24 && s < 32) {
 21706  			break
 21707  		}
 21708  		v.reset(OpARM64FMOVQstore)
 21709  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 21710  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21711  		v0.AuxInt = int32ToAuxInt(int32(s - 16))
 21712  		v0.AddArg2(src, mem)
 21713  		v1 := b.NewValue0(v.Pos, OpARM64FMOVQstore, types.TypeMem)
 21714  		v2 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21715  		v2.AddArg2(src, mem)
 21716  		v1.AddArg3(dst, v2, mem)
 21717  		v.AddArg3(dst, v0, v1)
 21718  		return true
 21719  	}
 21720  	// match: (Move [32] dst src mem)
 21721  	// result: (FSTPQ dst (Select0 <typ.Vec128> (FLDPQ src mem)) (Select1 <typ.Vec128> (FLDPQ src mem)) mem)
 21722  	for {
 21723  		if auxIntToInt64(v.AuxInt) != 32 {
 21724  			break
 21725  		}
 21726  		dst := v_0
 21727  		src := v_1
 21728  		mem := v_2
 21729  		v.reset(OpARM64FSTPQ)
 21730  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21731  		v1 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21732  		v1.AddArg2(src, mem)
 21733  		v0.AddArg(v1)
 21734  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21735  		v2.AddArg(v1)
 21736  		v.AddArg4(dst, v0, v2, mem)
 21737  		return true
 21738  	}
 21739  	// match: (Move [s] dst src mem)
 21740  	// cond: s > 32 && s <= 40
 21741  	// 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))
 21742  	for {
 21743  		s := auxIntToInt64(v.AuxInt)
 21744  		dst := v_0
 21745  		src := v_1
 21746  		mem := v_2
 21747  		if !(s > 32 && s <= 40) {
 21748  			break
 21749  		}
 21750  		v.reset(OpARM64MOVDstore)
 21751  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 21752  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 21753  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 21754  		v0.AddArg2(src, mem)
 21755  		v1 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21756  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21757  		v3 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21758  		v3.AddArg2(src, mem)
 21759  		v2.AddArg(v3)
 21760  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21761  		v4.AddArg(v3)
 21762  		v1.AddArg4(dst, v2, v4, mem)
 21763  		v.AddArg3(dst, v0, v1)
 21764  		return true
 21765  	}
 21766  	// match: (Move [s] dst src mem)
 21767  	// cond: s > 40 && s <= 48
 21768  	// 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))
 21769  	for {
 21770  		s := auxIntToInt64(v.AuxInt)
 21771  		dst := v_0
 21772  		src := v_1
 21773  		mem := v_2
 21774  		if !(s > 40 && s <= 48) {
 21775  			break
 21776  		}
 21777  		v.reset(OpARM64FMOVQstore)
 21778  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 21779  		v0 := b.NewValue0(v.Pos, OpARM64FMOVQload, typ.Vec128)
 21780  		v0.AuxInt = int32ToAuxInt(int32(s - 16))
 21781  		v0.AddArg2(src, mem)
 21782  		v1 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21783  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21784  		v3 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21785  		v3.AddArg2(src, mem)
 21786  		v2.AddArg(v3)
 21787  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21788  		v4.AddArg(v3)
 21789  		v1.AddArg4(dst, v2, v4, mem)
 21790  		v.AddArg3(dst, v0, v1)
 21791  		return true
 21792  	}
 21793  	// match: (Move [s] dst src mem)
 21794  	// cond: s > 48 && s <= 64
 21795  	// 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))
 21796  	for {
 21797  		s := auxIntToInt64(v.AuxInt)
 21798  		dst := v_0
 21799  		src := v_1
 21800  		mem := v_2
 21801  		if !(s > 48 && s <= 64) {
 21802  			break
 21803  		}
 21804  		v.reset(OpARM64FSTPQ)
 21805  		v.AuxInt = int32ToAuxInt(int32(s - 32))
 21806  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21807  		v1 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21808  		v1.AuxInt = int32ToAuxInt(int32(s - 32))
 21809  		v1.AddArg2(src, mem)
 21810  		v0.AddArg(v1)
 21811  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21812  		v2.AddArg(v1)
 21813  		v3 := b.NewValue0(v.Pos, OpARM64FSTPQ, types.TypeMem)
 21814  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.Vec128)
 21815  		v5 := b.NewValue0(v.Pos, OpARM64FLDPQ, types.NewTuple(typ.Vec128, typ.Vec128))
 21816  		v5.AddArg2(src, mem)
 21817  		v4.AddArg(v5)
 21818  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.Vec128)
 21819  		v6.AddArg(v5)
 21820  		v3.AddArg4(dst, v4, v6, mem)
 21821  		v.AddArg4(dst, v0, v2, v3)
 21822  		return true
 21823  	}
 21824  	// match: (Move [s] dst src mem)
 21825  	// cond: s > 64 && s < 192 && logLargeCopy(v, s)
 21826  	// result: (LoweredMove [s] dst src mem)
 21827  	for {
 21828  		s := auxIntToInt64(v.AuxInt)
 21829  		dst := v_0
 21830  		src := v_1
 21831  		mem := v_2
 21832  		if !(s > 64 && s < 192 && logLargeCopy(v, s)) {
 21833  			break
 21834  		}
 21835  		v.reset(OpARM64LoweredMove)
 21836  		v.AuxInt = int64ToAuxInt(s)
 21837  		v.AddArg3(dst, src, mem)
 21838  		return true
 21839  	}
 21840  	// match: (Move [s] dst src mem)
 21841  	// cond: s >= 192 && logLargeCopy(v, s)
 21842  	// result: (LoweredMoveLoop [s] dst src mem)
 21843  	for {
 21844  		s := auxIntToInt64(v.AuxInt)
 21845  		dst := v_0
 21846  		src := v_1
 21847  		mem := v_2
 21848  		if !(s >= 192 && logLargeCopy(v, s)) {
 21849  			break
 21850  		}
 21851  		v.reset(OpARM64LoweredMoveLoop)
 21852  		v.AuxInt = int64ToAuxInt(s)
 21853  		v.AddArg3(dst, src, mem)
 21854  		return true
 21855  	}
 21856  	return false
 21857  }
 21858  func rewriteValueARM64_OpMulAddFloat32x4(v *Value) bool {
 21859  	v_2 := v.Args[2]
 21860  	v_1 := v.Args[1]
 21861  	v_0 := v.Args[0]
 21862  	// match: (MulAddFloat32x4 x y z)
 21863  	// result: (VFMLA4S z x y)
 21864  	for {
 21865  		x := v_0
 21866  		y := v_1
 21867  		z := v_2
 21868  		v.reset(OpARM64VFMLA4S)
 21869  		v.AddArg3(z, x, y)
 21870  		return true
 21871  	}
 21872  }
 21873  func rewriteValueARM64_OpMulAddFloat64x2(v *Value) bool {
 21874  	v_2 := v.Args[2]
 21875  	v_1 := v.Args[1]
 21876  	v_0 := v.Args[0]
 21877  	// match: (MulAddFloat64x2 x y z)
 21878  	// result: (VFMLA2D z x y)
 21879  	for {
 21880  		x := v_0
 21881  		y := v_1
 21882  		z := v_2
 21883  		v.reset(OpARM64VFMLA2D)
 21884  		v.AddArg3(z, x, y)
 21885  		return true
 21886  	}
 21887  }
 21888  func rewriteValueARM64_OpMulAddInt16x8(v *Value) bool {
 21889  	v_2 := v.Args[2]
 21890  	v_1 := v.Args[1]
 21891  	v_0 := v.Args[0]
 21892  	// match: (MulAddInt16x8 x y z)
 21893  	// result: (VMLA8H z x y)
 21894  	for {
 21895  		x := v_0
 21896  		y := v_1
 21897  		z := v_2
 21898  		v.reset(OpARM64VMLA8H)
 21899  		v.AddArg3(z, x, y)
 21900  		return true
 21901  	}
 21902  }
 21903  func rewriteValueARM64_OpMulAddInt32x4(v *Value) bool {
 21904  	v_2 := v.Args[2]
 21905  	v_1 := v.Args[1]
 21906  	v_0 := v.Args[0]
 21907  	// match: (MulAddInt32x4 x y z)
 21908  	// result: (VMLA4S z x y)
 21909  	for {
 21910  		x := v_0
 21911  		y := v_1
 21912  		z := v_2
 21913  		v.reset(OpARM64VMLA4S)
 21914  		v.AddArg3(z, x, y)
 21915  		return true
 21916  	}
 21917  }
 21918  func rewriteValueARM64_OpMulAddInt8x16(v *Value) bool {
 21919  	v_2 := v.Args[2]
 21920  	v_1 := v.Args[1]
 21921  	v_0 := v.Args[0]
 21922  	// match: (MulAddInt8x16 x y z)
 21923  	// result: (VMLA16B z x y)
 21924  	for {
 21925  		x := v_0
 21926  		y := v_1
 21927  		z := v_2
 21928  		v.reset(OpARM64VMLA16B)
 21929  		v.AddArg3(z, x, y)
 21930  		return true
 21931  	}
 21932  }
 21933  func rewriteValueARM64_OpMulAddUint16x8(v *Value) bool {
 21934  	v_2 := v.Args[2]
 21935  	v_1 := v.Args[1]
 21936  	v_0 := v.Args[0]
 21937  	// match: (MulAddUint16x8 x y z)
 21938  	// result: (VMLA8H z x y)
 21939  	for {
 21940  		x := v_0
 21941  		y := v_1
 21942  		z := v_2
 21943  		v.reset(OpARM64VMLA8H)
 21944  		v.AddArg3(z, x, y)
 21945  		return true
 21946  	}
 21947  }
 21948  func rewriteValueARM64_OpMulAddUint32x4(v *Value) bool {
 21949  	v_2 := v.Args[2]
 21950  	v_1 := v.Args[1]
 21951  	v_0 := v.Args[0]
 21952  	// match: (MulAddUint32x4 x y z)
 21953  	// result: (VMLA4S z x y)
 21954  	for {
 21955  		x := v_0
 21956  		y := v_1
 21957  		z := v_2
 21958  		v.reset(OpARM64VMLA4S)
 21959  		v.AddArg3(z, x, y)
 21960  		return true
 21961  	}
 21962  }
 21963  func rewriteValueARM64_OpMulAddUint8x16(v *Value) bool {
 21964  	v_2 := v.Args[2]
 21965  	v_1 := v.Args[1]
 21966  	v_0 := v.Args[0]
 21967  	// match: (MulAddUint8x16 x y z)
 21968  	// result: (VMLA16B z x y)
 21969  	for {
 21970  		x := v_0
 21971  		y := v_1
 21972  		z := v_2
 21973  		v.reset(OpARM64VMLA16B)
 21974  		v.AddArg3(z, x, y)
 21975  		return true
 21976  	}
 21977  }
 21978  func rewriteValueARM64_OpNeq16(v *Value) bool {
 21979  	v_1 := v.Args[1]
 21980  	v_0 := v.Args[0]
 21981  	b := v.Block
 21982  	typ := &b.Func.Config.Types
 21983  	// match: (Neq16 x y)
 21984  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 21985  	for {
 21986  		x := v_0
 21987  		y := v_1
 21988  		v.reset(OpARM64NotEqual)
 21989  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21990  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21991  		v1.AddArg(x)
 21992  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21993  		v2.AddArg(y)
 21994  		v0.AddArg2(v1, v2)
 21995  		v.AddArg(v0)
 21996  		return true
 21997  	}
 21998  }
 21999  func rewriteValueARM64_OpNeq32(v *Value) bool {
 22000  	v_1 := v.Args[1]
 22001  	v_0 := v.Args[0]
 22002  	b := v.Block
 22003  	// match: (Neq32 x y)
 22004  	// result: (NotEqual (CMPW x y))
 22005  	for {
 22006  		x := v_0
 22007  		y := v_1
 22008  		v.reset(OpARM64NotEqual)
 22009  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 22010  		v0.AddArg2(x, y)
 22011  		v.AddArg(v0)
 22012  		return true
 22013  	}
 22014  }
 22015  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 22016  	v_1 := v.Args[1]
 22017  	v_0 := v.Args[0]
 22018  	b := v.Block
 22019  	// match: (Neq32F x y)
 22020  	// result: (NotEqual (FCMPS x y))
 22021  	for {
 22022  		x := v_0
 22023  		y := v_1
 22024  		v.reset(OpARM64NotEqual)
 22025  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 22026  		v0.AddArg2(x, y)
 22027  		v.AddArg(v0)
 22028  		return true
 22029  	}
 22030  }
 22031  func rewriteValueARM64_OpNeq64(v *Value) bool {
 22032  	v_1 := v.Args[1]
 22033  	v_0 := v.Args[0]
 22034  	b := v.Block
 22035  	// match: (Neq64 x y)
 22036  	// result: (NotEqual (CMP x y))
 22037  	for {
 22038  		x := v_0
 22039  		y := v_1
 22040  		v.reset(OpARM64NotEqual)
 22041  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 22042  		v0.AddArg2(x, y)
 22043  		v.AddArg(v0)
 22044  		return true
 22045  	}
 22046  }
 22047  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 22048  	v_1 := v.Args[1]
 22049  	v_0 := v.Args[0]
 22050  	b := v.Block
 22051  	// match: (Neq64F x y)
 22052  	// result: (NotEqual (FCMPD x y))
 22053  	for {
 22054  		x := v_0
 22055  		y := v_1
 22056  		v.reset(OpARM64NotEqual)
 22057  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 22058  		v0.AddArg2(x, y)
 22059  		v.AddArg(v0)
 22060  		return true
 22061  	}
 22062  }
 22063  func rewriteValueARM64_OpNeq8(v *Value) bool {
 22064  	v_1 := v.Args[1]
 22065  	v_0 := v.Args[0]
 22066  	b := v.Block
 22067  	typ := &b.Func.Config.Types
 22068  	// match: (Neq8 x y)
 22069  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 22070  	for {
 22071  		x := v_0
 22072  		y := v_1
 22073  		v.reset(OpARM64NotEqual)
 22074  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 22075  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 22076  		v1.AddArg(x)
 22077  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 22078  		v2.AddArg(y)
 22079  		v0.AddArg2(v1, v2)
 22080  		v.AddArg(v0)
 22081  		return true
 22082  	}
 22083  }
 22084  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 22085  	v_1 := v.Args[1]
 22086  	v_0 := v.Args[0]
 22087  	b := v.Block
 22088  	// match: (NeqPtr x y)
 22089  	// result: (NotEqual (CMP x y))
 22090  	for {
 22091  		x := v_0
 22092  		y := v_1
 22093  		v.reset(OpARM64NotEqual)
 22094  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 22095  		v0.AddArg2(x, y)
 22096  		v.AddArg(v0)
 22097  		return true
 22098  	}
 22099  }
 22100  func rewriteValueARM64_OpNot(v *Value) bool {
 22101  	v_0 := v.Args[0]
 22102  	b := v.Block
 22103  	typ := &b.Func.Config.Types
 22104  	// match: (Not x)
 22105  	// result: (XOR (MOVDconst [1]) x)
 22106  	for {
 22107  		x := v_0
 22108  		v.reset(OpARM64XOR)
 22109  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22110  		v0.AuxInt = int64ToAuxInt(1)
 22111  		v.AddArg2(v0, x)
 22112  		return true
 22113  	}
 22114  }
 22115  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 22116  	v_0 := v.Args[0]
 22117  	// match: (OffPtr [off] ptr:(SP))
 22118  	// cond: is32Bit(off)
 22119  	// result: (MOVDaddr [int32(off)] ptr)
 22120  	for {
 22121  		off := auxIntToInt64(v.AuxInt)
 22122  		ptr := v_0
 22123  		if ptr.Op != OpSP || !(is32Bit(off)) {
 22124  			break
 22125  		}
 22126  		v.reset(OpARM64MOVDaddr)
 22127  		v.AuxInt = int32ToAuxInt(int32(off))
 22128  		v.AddArg(ptr)
 22129  		return true
 22130  	}
 22131  	// match: (OffPtr [off] ptr)
 22132  	// result: (ADDconst [off] ptr)
 22133  	for {
 22134  		off := auxIntToInt64(v.AuxInt)
 22135  		ptr := v_0
 22136  		v.reset(OpARM64ADDconst)
 22137  		v.AuxInt = int64ToAuxInt(off)
 22138  		v.AddArg(ptr)
 22139  		return true
 22140  	}
 22141  }
 22142  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 22143  	v_0 := v.Args[0]
 22144  	b := v.Block
 22145  	typ := &b.Func.Config.Types
 22146  	// match: (PopCount16 <t> x)
 22147  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 22148  	for {
 22149  		t := v.Type
 22150  		x := v_0
 22151  		v.reset(OpARM64FMOVDfpgp)
 22152  		v.Type = t
 22153  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22154  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22155  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22156  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22157  		v3.AddArg(x)
 22158  		v2.AddArg(v3)
 22159  		v1.AddArg(v2)
 22160  		v0.AddArg(v1)
 22161  		v.AddArg(v0)
 22162  		return true
 22163  	}
 22164  }
 22165  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 22166  	v_0 := v.Args[0]
 22167  	b := v.Block
 22168  	typ := &b.Func.Config.Types
 22169  	// match: (PopCount32 <t> x)
 22170  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 22171  	for {
 22172  		t := v.Type
 22173  		x := v_0
 22174  		v.reset(OpARM64FMOVDfpgp)
 22175  		v.Type = t
 22176  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22177  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22178  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22179  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22180  		v3.AddArg(x)
 22181  		v2.AddArg(v3)
 22182  		v1.AddArg(v2)
 22183  		v0.AddArg(v1)
 22184  		v.AddArg(v0)
 22185  		return true
 22186  	}
 22187  }
 22188  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 22189  	v_0 := v.Args[0]
 22190  	b := v.Block
 22191  	typ := &b.Func.Config.Types
 22192  	// match: (PopCount64 <t> x)
 22193  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 22194  	for {
 22195  		t := v.Type
 22196  		x := v_0
 22197  		v.reset(OpARM64FMOVDfpgp)
 22198  		v.Type = t
 22199  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 22200  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 22201  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 22202  		v2.AddArg(x)
 22203  		v1.AddArg(v2)
 22204  		v0.AddArg(v1)
 22205  		v.AddArg(v0)
 22206  		return true
 22207  	}
 22208  }
 22209  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 22210  	v_1 := v.Args[1]
 22211  	v_0 := v.Args[0]
 22212  	// match: (PrefetchCache addr mem)
 22213  	// result: (PRFM [0] addr mem)
 22214  	for {
 22215  		addr := v_0
 22216  		mem := v_1
 22217  		v.reset(OpARM64PRFM)
 22218  		v.AuxInt = int64ToAuxInt(0)
 22219  		v.AddArg2(addr, mem)
 22220  		return true
 22221  	}
 22222  }
 22223  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 22224  	v_1 := v.Args[1]
 22225  	v_0 := v.Args[0]
 22226  	// match: (PrefetchCacheStreamed addr mem)
 22227  	// result: (PRFM [1] addr mem)
 22228  	for {
 22229  		addr := v_0
 22230  		mem := v_1
 22231  		v.reset(OpARM64PRFM)
 22232  		v.AuxInt = int64ToAuxInt(1)
 22233  		v.AddArg2(addr, mem)
 22234  		return true
 22235  	}
 22236  }
 22237  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 22238  	v_0 := v.Args[0]
 22239  	// match: (PubBarrier mem)
 22240  	// result: (DMB [0xe] mem)
 22241  	for {
 22242  		mem := v_0
 22243  		v.reset(OpARM64DMB)
 22244  		v.AuxInt = int64ToAuxInt(0xe)
 22245  		v.AddArg(mem)
 22246  		return true
 22247  	}
 22248  }
 22249  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 22250  	v_1 := v.Args[1]
 22251  	v_0 := v.Args[0]
 22252  	b := v.Block
 22253  	typ := &b.Func.Config.Types
 22254  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 22255  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 22256  	for {
 22257  		t := v.Type
 22258  		x := v_0
 22259  		if v_1.Op != OpARM64MOVDconst {
 22260  			break
 22261  		}
 22262  		c := auxIntToInt64(v_1.AuxInt)
 22263  		v.reset(OpOr16)
 22264  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 22265  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22266  		v1.AuxInt = int64ToAuxInt(c & 15)
 22267  		v0.AddArg2(x, v1)
 22268  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 22269  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22270  		v3.AuxInt = int64ToAuxInt(-c & 15)
 22271  		v2.AddArg2(x, v3)
 22272  		v.AddArg2(v0, v2)
 22273  		return true
 22274  	}
 22275  	// match: (RotateLeft16 <t> x y)
 22276  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 22277  	for {
 22278  		t := v.Type
 22279  		x := v_0
 22280  		y := v_1
 22281  		v.reset(OpARM64RORW)
 22282  		v.Type = t
 22283  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 22284  		v0.AuxInt = int64ToAuxInt(16)
 22285  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22286  		v1.AddArg(x)
 22287  		v0.AddArg2(v1, v1)
 22288  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 22289  		v2.AddArg(y)
 22290  		v.AddArg2(v0, v2)
 22291  		return true
 22292  	}
 22293  }
 22294  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 22295  	v_1 := v.Args[1]
 22296  	v_0 := v.Args[0]
 22297  	b := v.Block
 22298  	// match: (RotateLeft32 x y)
 22299  	// result: (RORW x (NEG <y.Type> y))
 22300  	for {
 22301  		x := v_0
 22302  		y := v_1
 22303  		v.reset(OpARM64RORW)
 22304  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 22305  		v0.AddArg(y)
 22306  		v.AddArg2(x, v0)
 22307  		return true
 22308  	}
 22309  }
 22310  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 22311  	v_1 := v.Args[1]
 22312  	v_0 := v.Args[0]
 22313  	b := v.Block
 22314  	// match: (RotateLeft64 x y)
 22315  	// result: (ROR x (NEG <y.Type> y))
 22316  	for {
 22317  		x := v_0
 22318  		y := v_1
 22319  		v.reset(OpARM64ROR)
 22320  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 22321  		v0.AddArg(y)
 22322  		v.AddArg2(x, v0)
 22323  		return true
 22324  	}
 22325  }
 22326  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 22327  	v_1 := v.Args[1]
 22328  	v_0 := v.Args[0]
 22329  	b := v.Block
 22330  	typ := &b.Func.Config.Types
 22331  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 22332  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 22333  	for {
 22334  		t := v.Type
 22335  		x := v_0
 22336  		if v_1.Op != OpARM64MOVDconst {
 22337  			break
 22338  		}
 22339  		c := auxIntToInt64(v_1.AuxInt)
 22340  		v.reset(OpOr8)
 22341  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 22342  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22343  		v1.AuxInt = int64ToAuxInt(c & 7)
 22344  		v0.AddArg2(x, v1)
 22345  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 22346  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22347  		v3.AuxInt = int64ToAuxInt(-c & 7)
 22348  		v2.AddArg2(x, v3)
 22349  		v.AddArg2(v0, v2)
 22350  		return true
 22351  	}
 22352  	// match: (RotateLeft8 <t> x y)
 22353  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 22354  	for {
 22355  		t := v.Type
 22356  		x := v_0
 22357  		y := v_1
 22358  		v.reset(OpARM64OR)
 22359  		v.Type = t
 22360  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 22361  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 22362  		v1.AuxInt = int64ToAuxInt(7)
 22363  		v1.AddArg(y)
 22364  		v0.AddArg2(x, v1)
 22365  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22366  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22367  		v3.AddArg(x)
 22368  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 22369  		v4.AuxInt = int64ToAuxInt(7)
 22370  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 22371  		v5.AddArg(y)
 22372  		v4.AddArg(v5)
 22373  		v2.AddArg2(v3, v4)
 22374  		v.AddArg2(v0, v2)
 22375  		return true
 22376  	}
 22377  }
 22378  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 22379  	v_1 := v.Args[1]
 22380  	v_0 := v.Args[0]
 22381  	b := v.Block
 22382  	typ := &b.Func.Config.Types
 22383  	// match: (Rsh16Ux16 <t> [bounded] x y)
 22384  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt16to64 x) y)
 22385  	for {
 22386  		t := v.Type
 22387  		bounded := auxIntToBool(v.AuxInt)
 22388  		x := v_0
 22389  		y := v_1
 22390  		v.reset(OpRsh64Ux16)
 22391  		v.Type = t
 22392  		v.AuxInt = boolToAuxInt(bounded)
 22393  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22394  		v0.AddArg(x)
 22395  		v.AddArg2(v0, y)
 22396  		return true
 22397  	}
 22398  }
 22399  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 22400  	v_1 := v.Args[1]
 22401  	v_0 := v.Args[0]
 22402  	b := v.Block
 22403  	typ := &b.Func.Config.Types
 22404  	// match: (Rsh16Ux32 <t> [bounded] x y)
 22405  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt16to64 x) y)
 22406  	for {
 22407  		t := v.Type
 22408  		bounded := auxIntToBool(v.AuxInt)
 22409  		x := v_0
 22410  		y := v_1
 22411  		v.reset(OpRsh64Ux32)
 22412  		v.Type = t
 22413  		v.AuxInt = boolToAuxInt(bounded)
 22414  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22415  		v0.AddArg(x)
 22416  		v.AddArg2(v0, y)
 22417  		return true
 22418  	}
 22419  }
 22420  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 22421  	v_1 := v.Args[1]
 22422  	v_0 := v.Args[0]
 22423  	b := v.Block
 22424  	typ := &b.Func.Config.Types
 22425  	// match: (Rsh16Ux64 <t> [bounded] x y)
 22426  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt16to64 x) y)
 22427  	for {
 22428  		t := v.Type
 22429  		bounded := auxIntToBool(v.AuxInt)
 22430  		x := v_0
 22431  		y := v_1
 22432  		v.reset(OpRsh64Ux64)
 22433  		v.Type = t
 22434  		v.AuxInt = boolToAuxInt(bounded)
 22435  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22436  		v0.AddArg(x)
 22437  		v.AddArg2(v0, y)
 22438  		return true
 22439  	}
 22440  }
 22441  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 22442  	v_1 := v.Args[1]
 22443  	v_0 := v.Args[0]
 22444  	b := v.Block
 22445  	typ := &b.Func.Config.Types
 22446  	// match: (Rsh16Ux8 <t> [bounded] x y)
 22447  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt16to64 x) y)
 22448  	for {
 22449  		t := v.Type
 22450  		bounded := auxIntToBool(v.AuxInt)
 22451  		x := v_0
 22452  		y := v_1
 22453  		v.reset(OpRsh64Ux8)
 22454  		v.Type = t
 22455  		v.AuxInt = boolToAuxInt(bounded)
 22456  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22457  		v0.AddArg(x)
 22458  		v.AddArg2(v0, y)
 22459  		return true
 22460  	}
 22461  }
 22462  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 22463  	v_1 := v.Args[1]
 22464  	v_0 := v.Args[0]
 22465  	b := v.Block
 22466  	typ := &b.Func.Config.Types
 22467  	// match: (Rsh16x16 <t> [bounded] x y)
 22468  	// result: (Rsh64x16 <t> [bounded] (SignExt16to64 x) y)
 22469  	for {
 22470  		t := v.Type
 22471  		bounded := auxIntToBool(v.AuxInt)
 22472  		x := v_0
 22473  		y := v_1
 22474  		v.reset(OpRsh64x16)
 22475  		v.Type = t
 22476  		v.AuxInt = boolToAuxInt(bounded)
 22477  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22478  		v0.AddArg(x)
 22479  		v.AddArg2(v0, y)
 22480  		return true
 22481  	}
 22482  }
 22483  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 22484  	v_1 := v.Args[1]
 22485  	v_0 := v.Args[0]
 22486  	b := v.Block
 22487  	typ := &b.Func.Config.Types
 22488  	// match: (Rsh16x32 <t> [bounded] x y)
 22489  	// result: (Rsh64x32 <t> [bounded] (SignExt16to64 x) y)
 22490  	for {
 22491  		t := v.Type
 22492  		bounded := auxIntToBool(v.AuxInt)
 22493  		x := v_0
 22494  		y := v_1
 22495  		v.reset(OpRsh64x32)
 22496  		v.Type = t
 22497  		v.AuxInt = boolToAuxInt(bounded)
 22498  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22499  		v0.AddArg(x)
 22500  		v.AddArg2(v0, y)
 22501  		return true
 22502  	}
 22503  }
 22504  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 22505  	v_1 := v.Args[1]
 22506  	v_0 := v.Args[0]
 22507  	b := v.Block
 22508  	typ := &b.Func.Config.Types
 22509  	// match: (Rsh16x64 <t> [bounded] x y)
 22510  	// result: (Rsh64x64 <t> [bounded] (SignExt16to64 x) y)
 22511  	for {
 22512  		t := v.Type
 22513  		bounded := auxIntToBool(v.AuxInt)
 22514  		x := v_0
 22515  		y := v_1
 22516  		v.reset(OpRsh64x64)
 22517  		v.Type = t
 22518  		v.AuxInt = boolToAuxInt(bounded)
 22519  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22520  		v0.AddArg(x)
 22521  		v.AddArg2(v0, y)
 22522  		return true
 22523  	}
 22524  }
 22525  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 22526  	v_1 := v.Args[1]
 22527  	v_0 := v.Args[0]
 22528  	b := v.Block
 22529  	typ := &b.Func.Config.Types
 22530  	// match: (Rsh16x8 <t> [bounded] x y)
 22531  	// result: (Rsh64x8 <t> [bounded] (SignExt16to64 x) y)
 22532  	for {
 22533  		t := v.Type
 22534  		bounded := auxIntToBool(v.AuxInt)
 22535  		x := v_0
 22536  		y := v_1
 22537  		v.reset(OpRsh64x8)
 22538  		v.Type = t
 22539  		v.AuxInt = boolToAuxInt(bounded)
 22540  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 22541  		v0.AddArg(x)
 22542  		v.AddArg2(v0, y)
 22543  		return true
 22544  	}
 22545  }
 22546  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 22547  	v_1 := v.Args[1]
 22548  	v_0 := v.Args[0]
 22549  	b := v.Block
 22550  	typ := &b.Func.Config.Types
 22551  	// match: (Rsh32Ux16 <t> [bounded] x y)
 22552  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt32to64 x) y)
 22553  	for {
 22554  		t := v.Type
 22555  		bounded := auxIntToBool(v.AuxInt)
 22556  		x := v_0
 22557  		y := v_1
 22558  		v.reset(OpRsh64Ux16)
 22559  		v.Type = t
 22560  		v.AuxInt = boolToAuxInt(bounded)
 22561  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22562  		v0.AddArg(x)
 22563  		v.AddArg2(v0, y)
 22564  		return true
 22565  	}
 22566  }
 22567  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 22568  	v_1 := v.Args[1]
 22569  	v_0 := v.Args[0]
 22570  	b := v.Block
 22571  	typ := &b.Func.Config.Types
 22572  	// match: (Rsh32Ux32 <t> [bounded] x y)
 22573  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt32to64 x) y)
 22574  	for {
 22575  		t := v.Type
 22576  		bounded := auxIntToBool(v.AuxInt)
 22577  		x := v_0
 22578  		y := v_1
 22579  		v.reset(OpRsh64Ux32)
 22580  		v.Type = t
 22581  		v.AuxInt = boolToAuxInt(bounded)
 22582  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22583  		v0.AddArg(x)
 22584  		v.AddArg2(v0, y)
 22585  		return true
 22586  	}
 22587  }
 22588  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 22589  	v_1 := v.Args[1]
 22590  	v_0 := v.Args[0]
 22591  	b := v.Block
 22592  	typ := &b.Func.Config.Types
 22593  	// match: (Rsh32Ux64 <t> [bounded] x y)
 22594  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt32to64 x) y)
 22595  	for {
 22596  		t := v.Type
 22597  		bounded := auxIntToBool(v.AuxInt)
 22598  		x := v_0
 22599  		y := v_1
 22600  		v.reset(OpRsh64Ux64)
 22601  		v.Type = t
 22602  		v.AuxInt = boolToAuxInt(bounded)
 22603  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22604  		v0.AddArg(x)
 22605  		v.AddArg2(v0, y)
 22606  		return true
 22607  	}
 22608  }
 22609  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 22610  	v_1 := v.Args[1]
 22611  	v_0 := v.Args[0]
 22612  	b := v.Block
 22613  	typ := &b.Func.Config.Types
 22614  	// match: (Rsh32Ux8 <t> [bounded] x y)
 22615  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt32to64 x) y)
 22616  	for {
 22617  		t := v.Type
 22618  		bounded := auxIntToBool(v.AuxInt)
 22619  		x := v_0
 22620  		y := v_1
 22621  		v.reset(OpRsh64Ux8)
 22622  		v.Type = t
 22623  		v.AuxInt = boolToAuxInt(bounded)
 22624  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22625  		v0.AddArg(x)
 22626  		v.AddArg2(v0, y)
 22627  		return true
 22628  	}
 22629  }
 22630  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 22631  	v_1 := v.Args[1]
 22632  	v_0 := v.Args[0]
 22633  	b := v.Block
 22634  	typ := &b.Func.Config.Types
 22635  	// match: (Rsh32x16 <t> [bounded] x y)
 22636  	// result: (Rsh64x16 <t> [bounded] (SignExt32to64 x) y)
 22637  	for {
 22638  		t := v.Type
 22639  		bounded := auxIntToBool(v.AuxInt)
 22640  		x := v_0
 22641  		y := v_1
 22642  		v.reset(OpRsh64x16)
 22643  		v.Type = t
 22644  		v.AuxInt = boolToAuxInt(bounded)
 22645  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22646  		v0.AddArg(x)
 22647  		v.AddArg2(v0, y)
 22648  		return true
 22649  	}
 22650  }
 22651  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 22652  	v_1 := v.Args[1]
 22653  	v_0 := v.Args[0]
 22654  	b := v.Block
 22655  	typ := &b.Func.Config.Types
 22656  	// match: (Rsh32x32 <t> [bounded] x y)
 22657  	// result: (Rsh64x32 <t> [bounded] (SignExt32to64 x) y)
 22658  	for {
 22659  		t := v.Type
 22660  		bounded := auxIntToBool(v.AuxInt)
 22661  		x := v_0
 22662  		y := v_1
 22663  		v.reset(OpRsh64x32)
 22664  		v.Type = t
 22665  		v.AuxInt = boolToAuxInt(bounded)
 22666  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22667  		v0.AddArg(x)
 22668  		v.AddArg2(v0, y)
 22669  		return true
 22670  	}
 22671  }
 22672  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 22673  	v_1 := v.Args[1]
 22674  	v_0 := v.Args[0]
 22675  	b := v.Block
 22676  	typ := &b.Func.Config.Types
 22677  	// match: (Rsh32x64 <t> [bounded] x y)
 22678  	// result: (Rsh64x64 <t> [bounded] (SignExt32to64 x) y)
 22679  	for {
 22680  		t := v.Type
 22681  		bounded := auxIntToBool(v.AuxInt)
 22682  		x := v_0
 22683  		y := v_1
 22684  		v.reset(OpRsh64x64)
 22685  		v.Type = t
 22686  		v.AuxInt = boolToAuxInt(bounded)
 22687  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22688  		v0.AddArg(x)
 22689  		v.AddArg2(v0, y)
 22690  		return true
 22691  	}
 22692  }
 22693  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 22694  	v_1 := v.Args[1]
 22695  	v_0 := v.Args[0]
 22696  	b := v.Block
 22697  	typ := &b.Func.Config.Types
 22698  	// match: (Rsh32x8 <t> [bounded] x y)
 22699  	// result: (Rsh64x8 <t> [bounded] (SignExt32to64 x) y)
 22700  	for {
 22701  		t := v.Type
 22702  		bounded := auxIntToBool(v.AuxInt)
 22703  		x := v_0
 22704  		y := v_1
 22705  		v.reset(OpRsh64x8)
 22706  		v.Type = t
 22707  		v.AuxInt = boolToAuxInt(bounded)
 22708  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22709  		v0.AddArg(x)
 22710  		v.AddArg2(v0, y)
 22711  		return true
 22712  	}
 22713  }
 22714  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 22715  	v_1 := v.Args[1]
 22716  	v_0 := v.Args[0]
 22717  	b := v.Block
 22718  	typ := &b.Func.Config.Types
 22719  	// match: (Rsh64Ux16 <t> x y)
 22720  	// cond: shiftIsBounded(v)
 22721  	// result: (SRL <t> x y)
 22722  	for {
 22723  		t := v.Type
 22724  		x := v_0
 22725  		y := v_1
 22726  		if !(shiftIsBounded(v)) {
 22727  			break
 22728  		}
 22729  		v.reset(OpARM64SRL)
 22730  		v.Type = t
 22731  		v.AddArg2(x, y)
 22732  		return true
 22733  	}
 22734  	// match: (Rsh64Ux16 <t> [bounded] x y)
 22735  	// cond: !shiftIsBounded(v)
 22736  	// result: (Rsh64Ux32 <t> [bounded] x (ZeroExt16to32 y))
 22737  	for {
 22738  		t := v.Type
 22739  		bounded := auxIntToBool(v.AuxInt)
 22740  		x := v_0
 22741  		y := v_1
 22742  		if !(!shiftIsBounded(v)) {
 22743  			break
 22744  		}
 22745  		v.reset(OpRsh64Ux32)
 22746  		v.Type = t
 22747  		v.AuxInt = boolToAuxInt(bounded)
 22748  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22749  		v0.AddArg(y)
 22750  		v.AddArg2(x, v0)
 22751  		return true
 22752  	}
 22753  	return false
 22754  }
 22755  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 22756  	v_1 := v.Args[1]
 22757  	v_0 := v.Args[0]
 22758  	b := v.Block
 22759  	// match: (Rsh64Ux32 <t> x y)
 22760  	// cond: shiftIsBounded(v)
 22761  	// result: (SRL <t> x y)
 22762  	for {
 22763  		t := v.Type
 22764  		x := v_0
 22765  		y := v_1
 22766  		if !(shiftIsBounded(v)) {
 22767  			break
 22768  		}
 22769  		v.reset(OpARM64SRL)
 22770  		v.Type = t
 22771  		v.AddArg2(x, y)
 22772  		return true
 22773  	}
 22774  	// match: (Rsh64Ux32 <t> x y)
 22775  	// cond: !shiftIsBounded(v)
 22776  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPWconst [64] y))
 22777  	for {
 22778  		t := v.Type
 22779  		x := v_0
 22780  		y := v_1
 22781  		if !(!shiftIsBounded(v)) {
 22782  			break
 22783  		}
 22784  		v.reset(OpARM64CSEL)
 22785  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22786  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22787  		v0.AddArg2(x, y)
 22788  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22789  		v1.AuxInt = int64ToAuxInt(0)
 22790  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 22791  		v2.AuxInt = int32ToAuxInt(64)
 22792  		v2.AddArg(y)
 22793  		v.AddArg3(v0, v1, v2)
 22794  		return true
 22795  	}
 22796  	return false
 22797  }
 22798  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 22799  	v_1 := v.Args[1]
 22800  	v_0 := v.Args[0]
 22801  	b := v.Block
 22802  	// match: (Rsh64Ux64 <t> x y)
 22803  	// cond: shiftIsBounded(v)
 22804  	// result: (SRL <t> x y)
 22805  	for {
 22806  		t := v.Type
 22807  		x := v_0
 22808  		y := v_1
 22809  		if !(shiftIsBounded(v)) {
 22810  			break
 22811  		}
 22812  		v.reset(OpARM64SRL)
 22813  		v.Type = t
 22814  		v.AddArg2(x, y)
 22815  		return true
 22816  	}
 22817  	// match: (Rsh64Ux64 <t> x y)
 22818  	// cond: !shiftIsBounded(v)
 22819  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 22820  	for {
 22821  		t := v.Type
 22822  		x := v_0
 22823  		y := v_1
 22824  		if !(!shiftIsBounded(v)) {
 22825  			break
 22826  		}
 22827  		v.reset(OpARM64CSEL)
 22828  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22829  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22830  		v0.AddArg2(x, y)
 22831  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22832  		v1.AuxInt = int64ToAuxInt(0)
 22833  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22834  		v2.AuxInt = int64ToAuxInt(64)
 22835  		v2.AddArg(y)
 22836  		v.AddArg3(v0, v1, v2)
 22837  		return true
 22838  	}
 22839  	return false
 22840  }
 22841  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 22842  	v_1 := v.Args[1]
 22843  	v_0 := v.Args[0]
 22844  	b := v.Block
 22845  	typ := &b.Func.Config.Types
 22846  	// match: (Rsh64Ux8 <t> x y)
 22847  	// cond: shiftIsBounded(v)
 22848  	// result: (SRL <t> x y)
 22849  	for {
 22850  		t := v.Type
 22851  		x := v_0
 22852  		y := v_1
 22853  		if !(shiftIsBounded(v)) {
 22854  			break
 22855  		}
 22856  		v.reset(OpARM64SRL)
 22857  		v.Type = t
 22858  		v.AddArg2(x, y)
 22859  		return true
 22860  	}
 22861  	// match: (Rsh64Ux8 <t> [bounded] x y)
 22862  	// cond: !shiftIsBounded(v)
 22863  	// result: (Rsh64Ux32 <t> [bounded] x (ZeroExt8to32 y))
 22864  	for {
 22865  		t := v.Type
 22866  		bounded := auxIntToBool(v.AuxInt)
 22867  		x := v_0
 22868  		y := v_1
 22869  		if !(!shiftIsBounded(v)) {
 22870  			break
 22871  		}
 22872  		v.reset(OpRsh64Ux32)
 22873  		v.Type = t
 22874  		v.AuxInt = boolToAuxInt(bounded)
 22875  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 22876  		v0.AddArg(y)
 22877  		v.AddArg2(x, v0)
 22878  		return true
 22879  	}
 22880  	return false
 22881  }
 22882  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 22883  	v_1 := v.Args[1]
 22884  	v_0 := v.Args[0]
 22885  	b := v.Block
 22886  	typ := &b.Func.Config.Types
 22887  	// match: (Rsh64x16 <t> x y)
 22888  	// cond: shiftIsBounded(v)
 22889  	// result: (SRA <t> x y)
 22890  	for {
 22891  		t := v.Type
 22892  		x := v_0
 22893  		y := v_1
 22894  		if !(shiftIsBounded(v)) {
 22895  			break
 22896  		}
 22897  		v.reset(OpARM64SRA)
 22898  		v.Type = t
 22899  		v.AddArg2(x, y)
 22900  		return true
 22901  	}
 22902  	// match: (Rsh64x16 <t> [bounded] x y)
 22903  	// cond: !shiftIsBounded(v)
 22904  	// result: (Rsh64x32 <t> [bounded] x (ZeroExt16to32 y))
 22905  	for {
 22906  		t := v.Type
 22907  		bounded := auxIntToBool(v.AuxInt)
 22908  		x := v_0
 22909  		y := v_1
 22910  		if !(!shiftIsBounded(v)) {
 22911  			break
 22912  		}
 22913  		v.reset(OpRsh64x32)
 22914  		v.Type = t
 22915  		v.AuxInt = boolToAuxInt(bounded)
 22916  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 22917  		v0.AddArg(y)
 22918  		v.AddArg2(x, v0)
 22919  		return true
 22920  	}
 22921  	return false
 22922  }
 22923  func rewriteValueARM64_OpRsh64x32(v *Value) bool {
 22924  	v_1 := v.Args[1]
 22925  	v_0 := v.Args[0]
 22926  	b := v.Block
 22927  	// match: (Rsh64x32 <t> x y)
 22928  	// cond: shiftIsBounded(v)
 22929  	// result: (SRA <t> x y)
 22930  	for {
 22931  		t := v.Type
 22932  		x := v_0
 22933  		y := v_1
 22934  		if !(shiftIsBounded(v)) {
 22935  			break
 22936  		}
 22937  		v.reset(OpARM64SRA)
 22938  		v.Type = t
 22939  		v.AddArg2(x, y)
 22940  		return true
 22941  	}
 22942  	// match: (Rsh64x32 <t> x y)
 22943  	// cond: !shiftIsBounded(v)
 22944  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPWconst [64] y)))
 22945  	for {
 22946  		x := v_0
 22947  		y := v_1
 22948  		if !(!shiftIsBounded(v)) {
 22949  			break
 22950  		}
 22951  		v.reset(OpARM64SRA)
 22952  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22953  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22954  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22955  		v1.AuxInt = int64ToAuxInt(63)
 22956  		v2 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
 22957  		v2.AuxInt = int32ToAuxInt(64)
 22958  		v2.AddArg(y)
 22959  		v0.AddArg3(y, v1, v2)
 22960  		v.AddArg2(x, v0)
 22961  		return true
 22962  	}
 22963  	return false
 22964  }
 22965  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 22966  	v_1 := v.Args[1]
 22967  	v_0 := v.Args[0]
 22968  	b := v.Block
 22969  	// match: (Rsh64x64 <t> x y)
 22970  	// cond: shiftIsBounded(v)
 22971  	// result: (SRA <t> x y)
 22972  	for {
 22973  		t := v.Type
 22974  		x := v_0
 22975  		y := v_1
 22976  		if !(shiftIsBounded(v)) {
 22977  			break
 22978  		}
 22979  		v.reset(OpARM64SRA)
 22980  		v.Type = t
 22981  		v.AddArg2(x, y)
 22982  		return true
 22983  	}
 22984  	// match: (Rsh64x64 <t> x y)
 22985  	// cond: !shiftIsBounded(v)
 22986  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 22987  	for {
 22988  		x := v_0
 22989  		y := v_1
 22990  		if !(!shiftIsBounded(v)) {
 22991  			break
 22992  		}
 22993  		v.reset(OpARM64SRA)
 22994  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22995  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22996  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22997  		v1.AuxInt = int64ToAuxInt(63)
 22998  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22999  		v2.AuxInt = int64ToAuxInt(64)
 23000  		v2.AddArg(y)
 23001  		v0.AddArg3(y, v1, v2)
 23002  		v.AddArg2(x, v0)
 23003  		return true
 23004  	}
 23005  	return false
 23006  }
 23007  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 23008  	v_1 := v.Args[1]
 23009  	v_0 := v.Args[0]
 23010  	b := v.Block
 23011  	typ := &b.Func.Config.Types
 23012  	// match: (Rsh64x8 <t> x y)
 23013  	// cond: shiftIsBounded(v)
 23014  	// result: (SRA <t> x y)
 23015  	for {
 23016  		t := v.Type
 23017  		x := v_0
 23018  		y := v_1
 23019  		if !(shiftIsBounded(v)) {
 23020  			break
 23021  		}
 23022  		v.reset(OpARM64SRA)
 23023  		v.Type = t
 23024  		v.AddArg2(x, y)
 23025  		return true
 23026  	}
 23027  	// match: (Rsh64x8 <t> [bounded] x y)
 23028  	// cond: !shiftIsBounded(v)
 23029  	// result: (Rsh64x32 <t> [bounded] x (ZeroExt8to32 y))
 23030  	for {
 23031  		t := v.Type
 23032  		bounded := auxIntToBool(v.AuxInt)
 23033  		x := v_0
 23034  		y := v_1
 23035  		if !(!shiftIsBounded(v)) {
 23036  			break
 23037  		}
 23038  		v.reset(OpRsh64x32)
 23039  		v.Type = t
 23040  		v.AuxInt = boolToAuxInt(bounded)
 23041  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 23042  		v0.AddArg(y)
 23043  		v.AddArg2(x, v0)
 23044  		return true
 23045  	}
 23046  	return false
 23047  }
 23048  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 23049  	v_1 := v.Args[1]
 23050  	v_0 := v.Args[0]
 23051  	b := v.Block
 23052  	typ := &b.Func.Config.Types
 23053  	// match: (Rsh8Ux16 <t> [bounded] x y)
 23054  	// result: (Rsh64Ux16 <t> [bounded] (ZeroExt8to64 x) y)
 23055  	for {
 23056  		t := v.Type
 23057  		bounded := auxIntToBool(v.AuxInt)
 23058  		x := v_0
 23059  		y := v_1
 23060  		v.reset(OpRsh64Ux16)
 23061  		v.Type = t
 23062  		v.AuxInt = boolToAuxInt(bounded)
 23063  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23064  		v0.AddArg(x)
 23065  		v.AddArg2(v0, y)
 23066  		return true
 23067  	}
 23068  }
 23069  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 23070  	v_1 := v.Args[1]
 23071  	v_0 := v.Args[0]
 23072  	b := v.Block
 23073  	typ := &b.Func.Config.Types
 23074  	// match: (Rsh8Ux32 <t> [bounded] x y)
 23075  	// result: (Rsh64Ux32 <t> [bounded] (ZeroExt8to64 x) y)
 23076  	for {
 23077  		t := v.Type
 23078  		bounded := auxIntToBool(v.AuxInt)
 23079  		x := v_0
 23080  		y := v_1
 23081  		v.reset(OpRsh64Ux32)
 23082  		v.Type = t
 23083  		v.AuxInt = boolToAuxInt(bounded)
 23084  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23085  		v0.AddArg(x)
 23086  		v.AddArg2(v0, y)
 23087  		return true
 23088  	}
 23089  }
 23090  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 23091  	v_1 := v.Args[1]
 23092  	v_0 := v.Args[0]
 23093  	b := v.Block
 23094  	typ := &b.Func.Config.Types
 23095  	// match: (Rsh8Ux64 <t> [bounded] x y)
 23096  	// result: (Rsh64Ux64 <t> [bounded] (ZeroExt8to64 x) y)
 23097  	for {
 23098  		t := v.Type
 23099  		bounded := auxIntToBool(v.AuxInt)
 23100  		x := v_0
 23101  		y := v_1
 23102  		v.reset(OpRsh64Ux64)
 23103  		v.Type = t
 23104  		v.AuxInt = boolToAuxInt(bounded)
 23105  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23106  		v0.AddArg(x)
 23107  		v.AddArg2(v0, y)
 23108  		return true
 23109  	}
 23110  }
 23111  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 23112  	v_1 := v.Args[1]
 23113  	v_0 := v.Args[0]
 23114  	b := v.Block
 23115  	typ := &b.Func.Config.Types
 23116  	// match: (Rsh8Ux8 <t> [bounded] x y)
 23117  	// result: (Rsh64Ux8 <t> [bounded] (ZeroExt8to64 x) y)
 23118  	for {
 23119  		t := v.Type
 23120  		bounded := auxIntToBool(v.AuxInt)
 23121  		x := v_0
 23122  		y := v_1
 23123  		v.reset(OpRsh64Ux8)
 23124  		v.Type = t
 23125  		v.AuxInt = boolToAuxInt(bounded)
 23126  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23127  		v0.AddArg(x)
 23128  		v.AddArg2(v0, y)
 23129  		return true
 23130  	}
 23131  }
 23132  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 23133  	v_1 := v.Args[1]
 23134  	v_0 := v.Args[0]
 23135  	b := v.Block
 23136  	typ := &b.Func.Config.Types
 23137  	// match: (Rsh8x16 <t> [bounded] x y)
 23138  	// result: (Rsh64x16 <t> [bounded] (SignExt8to64 x) y)
 23139  	for {
 23140  		t := v.Type
 23141  		bounded := auxIntToBool(v.AuxInt)
 23142  		x := v_0
 23143  		y := v_1
 23144  		v.reset(OpRsh64x16)
 23145  		v.Type = t
 23146  		v.AuxInt = boolToAuxInt(bounded)
 23147  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23148  		v0.AddArg(x)
 23149  		v.AddArg2(v0, y)
 23150  		return true
 23151  	}
 23152  }
 23153  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 23154  	v_1 := v.Args[1]
 23155  	v_0 := v.Args[0]
 23156  	b := v.Block
 23157  	typ := &b.Func.Config.Types
 23158  	// match: (Rsh8x32 <t> [bounded] x y)
 23159  	// result: (Rsh64x32 <t> [bounded] (SignExt8to64 x) y)
 23160  	for {
 23161  		t := v.Type
 23162  		bounded := auxIntToBool(v.AuxInt)
 23163  		x := v_0
 23164  		y := v_1
 23165  		v.reset(OpRsh64x32)
 23166  		v.Type = t
 23167  		v.AuxInt = boolToAuxInt(bounded)
 23168  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23169  		v0.AddArg(x)
 23170  		v.AddArg2(v0, y)
 23171  		return true
 23172  	}
 23173  }
 23174  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 23175  	v_1 := v.Args[1]
 23176  	v_0 := v.Args[0]
 23177  	b := v.Block
 23178  	typ := &b.Func.Config.Types
 23179  	// match: (Rsh8x64 <t> [bounded] x y)
 23180  	// result: (Rsh64x64 <t> [bounded] (SignExt8to64 x) y)
 23181  	for {
 23182  		t := v.Type
 23183  		bounded := auxIntToBool(v.AuxInt)
 23184  		x := v_0
 23185  		y := v_1
 23186  		v.reset(OpRsh64x64)
 23187  		v.Type = t
 23188  		v.AuxInt = boolToAuxInt(bounded)
 23189  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23190  		v0.AddArg(x)
 23191  		v.AddArg2(v0, y)
 23192  		return true
 23193  	}
 23194  }
 23195  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 23196  	v_1 := v.Args[1]
 23197  	v_0 := v.Args[0]
 23198  	b := v.Block
 23199  	typ := &b.Func.Config.Types
 23200  	// match: (Rsh8x8 <t> [bounded] x y)
 23201  	// result: (Rsh64x8 <t> [bounded] (SignExt8to64 x) y)
 23202  	for {
 23203  		t := v.Type
 23204  		bounded := auxIntToBool(v.AuxInt)
 23205  		x := v_0
 23206  		y := v_1
 23207  		v.reset(OpRsh64x8)
 23208  		v.Type = t
 23209  		v.AuxInt = boolToAuxInt(bounded)
 23210  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23211  		v0.AddArg(x)
 23212  		v.AddArg2(v0, y)
 23213  		return true
 23214  	}
 23215  }
 23216  func rewriteValueARM64_OpSelect0(v *Value) bool {
 23217  	v_0 := v.Args[0]
 23218  	b := v.Block
 23219  	typ := &b.Func.Config.Types
 23220  	// match: (Select0 (Mul64uhilo x y))
 23221  	// result: (UMULH x y)
 23222  	for {
 23223  		if v_0.Op != OpMul64uhilo {
 23224  			break
 23225  		}
 23226  		y := v_0.Args[1]
 23227  		x := v_0.Args[0]
 23228  		v.reset(OpARM64UMULH)
 23229  		v.AddArg2(x, y)
 23230  		return true
 23231  	}
 23232  	// match: (Select0 (Add64carry x y c))
 23233  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 23234  	for {
 23235  		if v_0.Op != OpAdd64carry {
 23236  			break
 23237  		}
 23238  		c := v_0.Args[2]
 23239  		x := v_0.Args[0]
 23240  		y := v_0.Args[1]
 23241  		v.reset(OpSelect0)
 23242  		v.Type = typ.UInt64
 23243  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23244  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23245  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23246  		v2.AuxInt = int64ToAuxInt(-1)
 23247  		v2.AddArg(c)
 23248  		v1.AddArg(v2)
 23249  		v0.AddArg3(x, y, v1)
 23250  		v.AddArg(v0)
 23251  		return true
 23252  	}
 23253  	// match: (Select0 (Sub64borrow x y bo))
 23254  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 23255  	for {
 23256  		if v_0.Op != OpSub64borrow {
 23257  			break
 23258  		}
 23259  		bo := v_0.Args[2]
 23260  		x := v_0.Args[0]
 23261  		y := v_0.Args[1]
 23262  		v.reset(OpSelect0)
 23263  		v.Type = typ.UInt64
 23264  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23265  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23266  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23267  		v2.AddArg(bo)
 23268  		v1.AddArg(v2)
 23269  		v0.AddArg3(x, y, v1)
 23270  		v.AddArg(v0)
 23271  		return true
 23272  	}
 23273  	// match: (Select0 (Mul64uover x y))
 23274  	// result: (MUL x y)
 23275  	for {
 23276  		if v_0.Op != OpMul64uover {
 23277  			break
 23278  		}
 23279  		y := v_0.Args[1]
 23280  		x := v_0.Args[0]
 23281  		v.reset(OpARM64MUL)
 23282  		v.AddArg2(x, y)
 23283  		return true
 23284  	}
 23285  	return false
 23286  }
 23287  func rewriteValueARM64_OpSelect1(v *Value) bool {
 23288  	v_0 := v.Args[0]
 23289  	b := v.Block
 23290  	typ := &b.Func.Config.Types
 23291  	// match: (Select1 (Mul64uhilo x y))
 23292  	// result: (MUL x y)
 23293  	for {
 23294  		if v_0.Op != OpMul64uhilo {
 23295  			break
 23296  		}
 23297  		y := v_0.Args[1]
 23298  		x := v_0.Args[0]
 23299  		v.reset(OpARM64MUL)
 23300  		v.AddArg2(x, y)
 23301  		return true
 23302  	}
 23303  	// match: (Select1 (Add64carry x y c))
 23304  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 23305  	for {
 23306  		if v_0.Op != OpAdd64carry {
 23307  			break
 23308  		}
 23309  		c := v_0.Args[2]
 23310  		x := v_0.Args[0]
 23311  		y := v_0.Args[1]
 23312  		v.reset(OpARM64ADCzerocarry)
 23313  		v.Type = typ.UInt64
 23314  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23315  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23316  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23317  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23318  		v3.AuxInt = int64ToAuxInt(-1)
 23319  		v3.AddArg(c)
 23320  		v2.AddArg(v3)
 23321  		v1.AddArg3(x, y, v2)
 23322  		v0.AddArg(v1)
 23323  		v.AddArg(v0)
 23324  		return true
 23325  	}
 23326  	// match: (Select1 (Sub64borrow x y bo))
 23327  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 23328  	for {
 23329  		if v_0.Op != OpSub64borrow {
 23330  			break
 23331  		}
 23332  		bo := v_0.Args[2]
 23333  		x := v_0.Args[0]
 23334  		y := v_0.Args[1]
 23335  		v.reset(OpARM64NEG)
 23336  		v.Type = typ.UInt64
 23337  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 23338  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23339  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23340  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23341  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23342  		v4.AddArg(bo)
 23343  		v3.AddArg(v4)
 23344  		v2.AddArg3(x, y, v3)
 23345  		v1.AddArg(v2)
 23346  		v0.AddArg(v1)
 23347  		v.AddArg(v0)
 23348  		return true
 23349  	}
 23350  	// match: (Select1 (Mul64uover x y))
 23351  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 23352  	for {
 23353  		if v_0.Op != OpMul64uover {
 23354  			break
 23355  		}
 23356  		y := v_0.Args[1]
 23357  		x := v_0.Args[0]
 23358  		v.reset(OpARM64NotEqual)
 23359  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23360  		v0.AuxInt = int64ToAuxInt(0)
 23361  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 23362  		v1.AddArg2(x, y)
 23363  		v0.AddArg(v1)
 23364  		v.AddArg(v0)
 23365  		return true
 23366  	}
 23367  	return false
 23368  }
 23369  func rewriteValueARM64_OpSelectN(v *Value) bool {
 23370  	v_0 := v.Args[0]
 23371  	b := v.Block
 23372  	config := b.Func.Config
 23373  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 23374  	// 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)
 23375  	// result: (Move [sz] dst src mem)
 23376  	for {
 23377  		if auxIntToInt64(v.AuxInt) != 0 {
 23378  			break
 23379  		}
 23380  		call := v_0
 23381  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 23382  			break
 23383  		}
 23384  		sym := auxToCall(call.Aux)
 23385  		s1 := call.Args[0]
 23386  		if s1.Op != OpARM64MOVDstore {
 23387  			break
 23388  		}
 23389  		_ = s1.Args[2]
 23390  		s1_1 := s1.Args[1]
 23391  		if s1_1.Op != OpARM64MOVDconst {
 23392  			break
 23393  		}
 23394  		sz := auxIntToInt64(s1_1.AuxInt)
 23395  		s2 := s1.Args[2]
 23396  		if s2.Op != OpARM64MOVDstore {
 23397  			break
 23398  		}
 23399  		_ = s2.Args[2]
 23400  		src := s2.Args[1]
 23401  		s3 := s2.Args[2]
 23402  		if s3.Op != OpARM64MOVDstore {
 23403  			break
 23404  		}
 23405  		mem := s3.Args[2]
 23406  		dst := s3.Args[1]
 23407  		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)) {
 23408  			break
 23409  		}
 23410  		v.reset(OpMove)
 23411  		v.AuxInt = int64ToAuxInt(sz)
 23412  		v.AddArg3(dst, src, mem)
 23413  		return true
 23414  	}
 23415  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 23416  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 23417  	// result: (Move [sz] dst src mem)
 23418  	for {
 23419  		if auxIntToInt64(v.AuxInt) != 0 {
 23420  			break
 23421  		}
 23422  		call := v_0
 23423  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 23424  			break
 23425  		}
 23426  		sym := auxToCall(call.Aux)
 23427  		mem := call.Args[3]
 23428  		dst := call.Args[0]
 23429  		src := call.Args[1]
 23430  		call_2 := call.Args[2]
 23431  		if call_2.Op != OpARM64MOVDconst {
 23432  			break
 23433  		}
 23434  		sz := auxIntToInt64(call_2.AuxInt)
 23435  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 23436  			break
 23437  		}
 23438  		v.reset(OpMove)
 23439  		v.AuxInt = int64ToAuxInt(sz)
 23440  		v.AddArg3(dst, src, mem)
 23441  		return true
 23442  	}
 23443  	return false
 23444  }
 23445  func rewriteValueARM64_OpShiftAllLeftInt16x8(v *Value) bool {
 23446  	v_1 := v.Args[1]
 23447  	v_0 := v.Args[0]
 23448  	b := v.Block
 23449  	typ := &b.Func.Config.Types
 23450  	// match: (ShiftAllLeftInt16x8 x y)
 23451  	// result: (VSSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23452  	for {
 23453  		x := v_0
 23454  		y := v_1
 23455  		v.reset(OpARM64VSSHL8H)
 23456  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23457  		v0.AuxInt = uint8ToAuxInt(0)
 23458  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23459  		v1.AuxInt = uint8ToAuxInt(0)
 23460  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23461  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23462  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23463  		v3.AuxInt = int64ToAuxInt(127)
 23464  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23465  		v4.AuxInt = int64ToAuxInt(127)
 23466  		v4.AddArg(y)
 23467  		v2.AddArg3(y, v3, v4)
 23468  		v1.AddArg2(x, v2)
 23469  		v0.AddArg(v1)
 23470  		v.AddArg2(x, v0)
 23471  		return true
 23472  	}
 23473  }
 23474  func rewriteValueARM64_OpShiftAllLeftInt32x4(v *Value) bool {
 23475  	v_1 := v.Args[1]
 23476  	v_0 := v.Args[0]
 23477  	b := v.Block
 23478  	typ := &b.Func.Config.Types
 23479  	// match: (ShiftAllLeftInt32x4 x y)
 23480  	// result: (VSSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23481  	for {
 23482  		x := v_0
 23483  		y := v_1
 23484  		v.reset(OpARM64VSSHL4S)
 23485  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23486  		v0.AuxInt = uint8ToAuxInt(0)
 23487  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23488  		v1.AuxInt = uint8ToAuxInt(0)
 23489  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23490  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23491  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23492  		v3.AuxInt = int64ToAuxInt(127)
 23493  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23494  		v4.AuxInt = int64ToAuxInt(127)
 23495  		v4.AddArg(y)
 23496  		v2.AddArg3(y, v3, v4)
 23497  		v1.AddArg2(x, v2)
 23498  		v0.AddArg(v1)
 23499  		v.AddArg2(x, v0)
 23500  		return true
 23501  	}
 23502  }
 23503  func rewriteValueARM64_OpShiftAllLeftInt64x2(v *Value) bool {
 23504  	v_1 := v.Args[1]
 23505  	v_0 := v.Args[0]
 23506  	b := v.Block
 23507  	typ := &b.Func.Config.Types
 23508  	// match: (ShiftAllLeftInt64x2 x y)
 23509  	// result: (VSSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23510  	for {
 23511  		x := v_0
 23512  		y := v_1
 23513  		v.reset(OpARM64VSSHL2D)
 23514  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23515  		v0.AuxInt = uint8ToAuxInt(0)
 23516  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23517  		v1.AuxInt = uint8ToAuxInt(0)
 23518  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23519  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23520  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23521  		v3.AuxInt = int64ToAuxInt(127)
 23522  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23523  		v4.AuxInt = int64ToAuxInt(127)
 23524  		v4.AddArg(y)
 23525  		v2.AddArg3(y, v3, v4)
 23526  		v1.AddArg2(x, v2)
 23527  		v0.AddArg(v1)
 23528  		v.AddArg2(x, v0)
 23529  		return true
 23530  	}
 23531  }
 23532  func rewriteValueARM64_OpShiftAllLeftInt8x16(v *Value) bool {
 23533  	v_1 := v.Args[1]
 23534  	v_0 := v.Args[0]
 23535  	b := v.Block
 23536  	typ := &b.Func.Config.Types
 23537  	// match: (ShiftAllLeftInt8x16 x y)
 23538  	// result: (VSSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23539  	for {
 23540  		x := v_0
 23541  		y := v_1
 23542  		v.reset(OpARM64VSSHL16B)
 23543  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23544  		v0.AuxInt = uint8ToAuxInt(0)
 23545  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23546  		v1.AuxInt = uint8ToAuxInt(0)
 23547  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23548  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23549  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23550  		v3.AuxInt = int64ToAuxInt(127)
 23551  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23552  		v4.AuxInt = int64ToAuxInt(127)
 23553  		v4.AddArg(y)
 23554  		v2.AddArg3(y, v3, v4)
 23555  		v1.AddArg2(x, v2)
 23556  		v0.AddArg(v1)
 23557  		v.AddArg2(x, v0)
 23558  		return true
 23559  	}
 23560  }
 23561  func rewriteValueARM64_OpShiftAllLeftUint16x8(v *Value) bool {
 23562  	v_1 := v.Args[1]
 23563  	v_0 := v.Args[0]
 23564  	b := v.Block
 23565  	typ := &b.Func.Config.Types
 23566  	// match: (ShiftAllLeftUint16x8 x y)
 23567  	// result: (VUSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23568  	for {
 23569  		x := v_0
 23570  		y := v_1
 23571  		v.reset(OpARM64VUSHL8H)
 23572  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23573  		v0.AuxInt = uint8ToAuxInt(0)
 23574  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23575  		v1.AuxInt = uint8ToAuxInt(0)
 23576  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23577  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23578  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23579  		v3.AuxInt = int64ToAuxInt(127)
 23580  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23581  		v4.AuxInt = int64ToAuxInt(127)
 23582  		v4.AddArg(y)
 23583  		v2.AddArg3(y, v3, v4)
 23584  		v1.AddArg2(x, v2)
 23585  		v0.AddArg(v1)
 23586  		v.AddArg2(x, v0)
 23587  		return true
 23588  	}
 23589  }
 23590  func rewriteValueARM64_OpShiftAllLeftUint32x4(v *Value) bool {
 23591  	v_1 := v.Args[1]
 23592  	v_0 := v.Args[0]
 23593  	b := v.Block
 23594  	typ := &b.Func.Config.Types
 23595  	// match: (ShiftAllLeftUint32x4 x y)
 23596  	// result: (VUSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23597  	for {
 23598  		x := v_0
 23599  		y := v_1
 23600  		v.reset(OpARM64VUSHL4S)
 23601  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23602  		v0.AuxInt = uint8ToAuxInt(0)
 23603  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23604  		v1.AuxInt = uint8ToAuxInt(0)
 23605  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23606  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23607  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23608  		v3.AuxInt = int64ToAuxInt(127)
 23609  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23610  		v4.AuxInt = int64ToAuxInt(127)
 23611  		v4.AddArg(y)
 23612  		v2.AddArg3(y, v3, v4)
 23613  		v1.AddArg2(x, v2)
 23614  		v0.AddArg(v1)
 23615  		v.AddArg2(x, v0)
 23616  		return true
 23617  	}
 23618  }
 23619  func rewriteValueARM64_OpShiftAllLeftUint64x2(v *Value) bool {
 23620  	v_1 := v.Args[1]
 23621  	v_0 := v.Args[0]
 23622  	b := v.Block
 23623  	typ := &b.Func.Config.Types
 23624  	// match: (ShiftAllLeftUint64x2 x y)
 23625  	// result: (VUSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23626  	for {
 23627  		x := v_0
 23628  		y := v_1
 23629  		v.reset(OpARM64VUSHL2D)
 23630  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23631  		v0.AuxInt = uint8ToAuxInt(0)
 23632  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23633  		v1.AuxInt = uint8ToAuxInt(0)
 23634  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23635  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23636  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23637  		v3.AuxInt = int64ToAuxInt(127)
 23638  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23639  		v4.AuxInt = int64ToAuxInt(127)
 23640  		v4.AddArg(y)
 23641  		v2.AddArg3(y, v3, v4)
 23642  		v1.AddArg2(x, v2)
 23643  		v0.AddArg(v1)
 23644  		v.AddArg2(x, v0)
 23645  		return true
 23646  	}
 23647  }
 23648  func rewriteValueARM64_OpShiftAllLeftUint8x16(v *Value) bool {
 23649  	v_1 := v.Args[1]
 23650  	v_0 := v.Args[0]
 23651  	b := v.Block
 23652  	typ := &b.Func.Config.Types
 23653  	// match: (ShiftAllLeftUint8x16 x y)
 23654  	// result: (VUSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y)))))
 23655  	for {
 23656  		x := v_0
 23657  		y := v_1
 23658  		v.reset(OpARM64VUSHL16B)
 23659  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23660  		v0.AuxInt = uint8ToAuxInt(0)
 23661  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23662  		v1.AuxInt = uint8ToAuxInt(0)
 23663  		v2 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23664  		v2.AuxInt = opToAuxInt(OpARM64LessThanU)
 23665  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23666  		v3.AuxInt = int64ToAuxInt(127)
 23667  		v4 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23668  		v4.AuxInt = int64ToAuxInt(127)
 23669  		v4.AddArg(y)
 23670  		v2.AddArg3(y, v3, v4)
 23671  		v1.AddArg2(x, v2)
 23672  		v0.AddArg(v1)
 23673  		v.AddArg2(x, v0)
 23674  		return true
 23675  	}
 23676  }
 23677  func rewriteValueARM64_OpShiftAllRightInt16x8(v *Value) bool {
 23678  	v_1 := v.Args[1]
 23679  	v_0 := v.Args[0]
 23680  	b := v.Block
 23681  	typ := &b.Func.Config.Types
 23682  	// match: (ShiftAllRightInt16x8 x y)
 23683  	// result: (VSSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23684  	for {
 23685  		x := v_0
 23686  		y := v_1
 23687  		v.reset(OpARM64VSSHL8H)
 23688  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23689  		v0.AuxInt = uint8ToAuxInt(0)
 23690  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23691  		v1.AuxInt = uint8ToAuxInt(0)
 23692  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23693  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23694  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23695  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23696  		v4.AuxInt = int64ToAuxInt(127)
 23697  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23698  		v5.AuxInt = int64ToAuxInt(127)
 23699  		v5.AddArg(y)
 23700  		v3.AddArg3(y, v4, v5)
 23701  		v2.AddArg(v3)
 23702  		v1.AddArg2(x, v2)
 23703  		v0.AddArg(v1)
 23704  		v.AddArg2(x, v0)
 23705  		return true
 23706  	}
 23707  }
 23708  func rewriteValueARM64_OpShiftAllRightInt32x4(v *Value) bool {
 23709  	v_1 := v.Args[1]
 23710  	v_0 := v.Args[0]
 23711  	b := v.Block
 23712  	typ := &b.Func.Config.Types
 23713  	// match: (ShiftAllRightInt32x4 x y)
 23714  	// result: (VSSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23715  	for {
 23716  		x := v_0
 23717  		y := v_1
 23718  		v.reset(OpARM64VSSHL4S)
 23719  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23720  		v0.AuxInt = uint8ToAuxInt(0)
 23721  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23722  		v1.AuxInt = uint8ToAuxInt(0)
 23723  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23724  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23725  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23726  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23727  		v4.AuxInt = int64ToAuxInt(127)
 23728  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23729  		v5.AuxInt = int64ToAuxInt(127)
 23730  		v5.AddArg(y)
 23731  		v3.AddArg3(y, v4, v5)
 23732  		v2.AddArg(v3)
 23733  		v1.AddArg2(x, v2)
 23734  		v0.AddArg(v1)
 23735  		v.AddArg2(x, v0)
 23736  		return true
 23737  	}
 23738  }
 23739  func rewriteValueARM64_OpShiftAllRightInt64x2(v *Value) bool {
 23740  	v_1 := v.Args[1]
 23741  	v_0 := v.Args[0]
 23742  	b := v.Block
 23743  	typ := &b.Func.Config.Types
 23744  	// match: (ShiftAllRightInt64x2 x y)
 23745  	// result: (VSSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23746  	for {
 23747  		x := v_0
 23748  		y := v_1
 23749  		v.reset(OpARM64VSSHL2D)
 23750  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23751  		v0.AuxInt = uint8ToAuxInt(0)
 23752  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23753  		v1.AuxInt = uint8ToAuxInt(0)
 23754  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23755  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23756  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23757  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23758  		v4.AuxInt = int64ToAuxInt(127)
 23759  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23760  		v5.AuxInt = int64ToAuxInt(127)
 23761  		v5.AddArg(y)
 23762  		v3.AddArg3(y, v4, v5)
 23763  		v2.AddArg(v3)
 23764  		v1.AddArg2(x, v2)
 23765  		v0.AddArg(v1)
 23766  		v.AddArg2(x, v0)
 23767  		return true
 23768  	}
 23769  }
 23770  func rewriteValueARM64_OpShiftAllRightInt8x16(v *Value) bool {
 23771  	v_1 := v.Args[1]
 23772  	v_0 := v.Args[0]
 23773  	b := v.Block
 23774  	typ := &b.Func.Config.Types
 23775  	// match: (ShiftAllRightInt8x16 x y)
 23776  	// result: (VSSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23777  	for {
 23778  		x := v_0
 23779  		y := v_1
 23780  		v.reset(OpARM64VSSHL16B)
 23781  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23782  		v0.AuxInt = uint8ToAuxInt(0)
 23783  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23784  		v1.AuxInt = uint8ToAuxInt(0)
 23785  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23786  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23787  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23788  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23789  		v4.AuxInt = int64ToAuxInt(127)
 23790  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23791  		v5.AuxInt = int64ToAuxInt(127)
 23792  		v5.AddArg(y)
 23793  		v3.AddArg3(y, v4, v5)
 23794  		v2.AddArg(v3)
 23795  		v1.AddArg2(x, v2)
 23796  		v0.AddArg(v1)
 23797  		v.AddArg2(x, v0)
 23798  		return true
 23799  	}
 23800  }
 23801  func rewriteValueARM64_OpShiftAllRightUint16x8(v *Value) bool {
 23802  	v_1 := v.Args[1]
 23803  	v_0 := v.Args[0]
 23804  	b := v.Block
 23805  	typ := &b.Func.Config.Types
 23806  	// match: (ShiftAllRightUint16x8 x y)
 23807  	// result: (VUSHL8H x (VDUPHbcast [0] (VMOVHins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23808  	for {
 23809  		x := v_0
 23810  		y := v_1
 23811  		v.reset(OpARM64VUSHL8H)
 23812  		v0 := b.NewValue0(v.Pos, OpARM64VDUPHbcast, typ.Vec128)
 23813  		v0.AuxInt = uint8ToAuxInt(0)
 23814  		v1 := b.NewValue0(v.Pos, OpARM64VMOVHins, typ.Vec128)
 23815  		v1.AuxInt = uint8ToAuxInt(0)
 23816  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23817  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23818  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23819  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23820  		v4.AuxInt = int64ToAuxInt(127)
 23821  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23822  		v5.AuxInt = int64ToAuxInt(127)
 23823  		v5.AddArg(y)
 23824  		v3.AddArg3(y, v4, v5)
 23825  		v2.AddArg(v3)
 23826  		v1.AddArg2(x, v2)
 23827  		v0.AddArg(v1)
 23828  		v.AddArg2(x, v0)
 23829  		return true
 23830  	}
 23831  }
 23832  func rewriteValueARM64_OpShiftAllRightUint32x4(v *Value) bool {
 23833  	v_1 := v.Args[1]
 23834  	v_0 := v.Args[0]
 23835  	b := v.Block
 23836  	typ := &b.Func.Config.Types
 23837  	// match: (ShiftAllRightUint32x4 x y)
 23838  	// result: (VUSHL4S x (VDUPSbcast [0] (VMOVSins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23839  	for {
 23840  		x := v_0
 23841  		y := v_1
 23842  		v.reset(OpARM64VUSHL4S)
 23843  		v0 := b.NewValue0(v.Pos, OpARM64VDUPSbcast, typ.Vec128)
 23844  		v0.AuxInt = uint8ToAuxInt(0)
 23845  		v1 := b.NewValue0(v.Pos, OpARM64VMOVSins, typ.Vec128)
 23846  		v1.AuxInt = uint8ToAuxInt(0)
 23847  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23848  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23849  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23850  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23851  		v4.AuxInt = int64ToAuxInt(127)
 23852  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23853  		v5.AuxInt = int64ToAuxInt(127)
 23854  		v5.AddArg(y)
 23855  		v3.AddArg3(y, v4, v5)
 23856  		v2.AddArg(v3)
 23857  		v1.AddArg2(x, v2)
 23858  		v0.AddArg(v1)
 23859  		v.AddArg2(x, v0)
 23860  		return true
 23861  	}
 23862  }
 23863  func rewriteValueARM64_OpShiftAllRightUint64x2(v *Value) bool {
 23864  	v_1 := v.Args[1]
 23865  	v_0 := v.Args[0]
 23866  	b := v.Block
 23867  	typ := &b.Func.Config.Types
 23868  	// match: (ShiftAllRightUint64x2 x y)
 23869  	// result: (VUSHL2D x (VDUPDbcast [0] (VMOVDins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23870  	for {
 23871  		x := v_0
 23872  		y := v_1
 23873  		v.reset(OpARM64VUSHL2D)
 23874  		v0 := b.NewValue0(v.Pos, OpARM64VDUPDbcast, typ.Vec128)
 23875  		v0.AuxInt = uint8ToAuxInt(0)
 23876  		v1 := b.NewValue0(v.Pos, OpARM64VMOVDins, typ.Vec128)
 23877  		v1.AuxInt = uint8ToAuxInt(0)
 23878  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23879  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23880  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23881  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23882  		v4.AuxInt = int64ToAuxInt(127)
 23883  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23884  		v5.AuxInt = int64ToAuxInt(127)
 23885  		v5.AddArg(y)
 23886  		v3.AddArg3(y, v4, v5)
 23887  		v2.AddArg(v3)
 23888  		v1.AddArg2(x, v2)
 23889  		v0.AddArg(v1)
 23890  		v.AddArg2(x, v0)
 23891  		return true
 23892  	}
 23893  }
 23894  func rewriteValueARM64_OpShiftAllRightUint8x16(v *Value) bool {
 23895  	v_1 := v.Args[1]
 23896  	v_0 := v.Args[0]
 23897  	b := v.Block
 23898  	typ := &b.Func.Config.Types
 23899  	// match: (ShiftAllRightUint8x16 x y)
 23900  	// result: (VUSHL16B x (VDUPBbcast [0] (VMOVBins [0] x (NEG <typ.Int64> (CSEL <typ.UInt64> [OpARM64LessThanU] y (MOVDconst [127]) (CMPconst [127] y))))))
 23901  	for {
 23902  		x := v_0
 23903  		y := v_1
 23904  		v.reset(OpARM64VUSHL16B)
 23905  		v0 := b.NewValue0(v.Pos, OpARM64VDUPBbcast, typ.Vec128)
 23906  		v0.AuxInt = uint8ToAuxInt(0)
 23907  		v1 := b.NewValue0(v.Pos, OpARM64VMOVBins, typ.Vec128)
 23908  		v1.AuxInt = uint8ToAuxInt(0)
 23909  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 23910  		v3 := b.NewValue0(v.Pos, OpARM64CSEL, typ.UInt64)
 23911  		v3.AuxInt = opToAuxInt(OpARM64LessThanU)
 23912  		v4 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23913  		v4.AuxInt = int64ToAuxInt(127)
 23914  		v5 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23915  		v5.AuxInt = int64ToAuxInt(127)
 23916  		v5.AddArg(y)
 23917  		v3.AddArg3(y, v4, v5)
 23918  		v2.AddArg(v3)
 23919  		v1.AddArg2(x, v2)
 23920  		v0.AddArg(v1)
 23921  		v.AddArg2(x, v0)
 23922  		return true
 23923  	}
 23924  }
 23925  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 23926  	v_0 := v.Args[0]
 23927  	b := v.Block
 23928  	// match: (Slicemask <t> x)
 23929  	// result: (SRAconst (NEG <t> x) [63])
 23930  	for {
 23931  		t := v.Type
 23932  		x := v_0
 23933  		v.reset(OpARM64SRAconst)
 23934  		v.AuxInt = int64ToAuxInt(63)
 23935  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 23936  		v0.AddArg(x)
 23937  		v.AddArg(v0)
 23938  		return true
 23939  	}
 23940  }
 23941  func rewriteValueARM64_OpStore(v *Value) bool {
 23942  	v_2 := v.Args[2]
 23943  	v_1 := v.Args[1]
 23944  	v_0 := v.Args[0]
 23945  	// match: (Store {t} ptr val mem)
 23946  	// cond: t.Size() == 1
 23947  	// result: (MOVBstore ptr val mem)
 23948  	for {
 23949  		t := auxToType(v.Aux)
 23950  		ptr := v_0
 23951  		val := v_1
 23952  		mem := v_2
 23953  		if !(t.Size() == 1) {
 23954  			break
 23955  		}
 23956  		v.reset(OpARM64MOVBstore)
 23957  		v.AddArg3(ptr, val, mem)
 23958  		return true
 23959  	}
 23960  	// match: (Store {t} ptr val mem)
 23961  	// cond: t.Size() == 2
 23962  	// result: (MOVHstore ptr val mem)
 23963  	for {
 23964  		t := auxToType(v.Aux)
 23965  		ptr := v_0
 23966  		val := v_1
 23967  		mem := v_2
 23968  		if !(t.Size() == 2) {
 23969  			break
 23970  		}
 23971  		v.reset(OpARM64MOVHstore)
 23972  		v.AddArg3(ptr, val, mem)
 23973  		return true
 23974  	}
 23975  	// match: (Store {t} ptr val mem)
 23976  	// cond: t.Size() == 4 && !t.IsFloat()
 23977  	// result: (MOVWstore ptr val mem)
 23978  	for {
 23979  		t := auxToType(v.Aux)
 23980  		ptr := v_0
 23981  		val := v_1
 23982  		mem := v_2
 23983  		if !(t.Size() == 4 && !t.IsFloat()) {
 23984  			break
 23985  		}
 23986  		v.reset(OpARM64MOVWstore)
 23987  		v.AddArg3(ptr, val, mem)
 23988  		return true
 23989  	}
 23990  	// match: (Store {t} ptr val mem)
 23991  	// cond: t.Size() == 8 && !t.IsFloat()
 23992  	// result: (MOVDstore ptr val mem)
 23993  	for {
 23994  		t := auxToType(v.Aux)
 23995  		ptr := v_0
 23996  		val := v_1
 23997  		mem := v_2
 23998  		if !(t.Size() == 8 && !t.IsFloat()) {
 23999  			break
 24000  		}
 24001  		v.reset(OpARM64MOVDstore)
 24002  		v.AddArg3(ptr, val, mem)
 24003  		return true
 24004  	}
 24005  	// match: (Store {t} ptr val mem)
 24006  	// cond: t.Size() == 4 && t.IsFloat()
 24007  	// result: (FMOVSstore ptr val mem)
 24008  	for {
 24009  		t := auxToType(v.Aux)
 24010  		ptr := v_0
 24011  		val := v_1
 24012  		mem := v_2
 24013  		if !(t.Size() == 4 && t.IsFloat()) {
 24014  			break
 24015  		}
 24016  		v.reset(OpARM64FMOVSstore)
 24017  		v.AddArg3(ptr, val, mem)
 24018  		return true
 24019  	}
 24020  	// match: (Store {t} ptr val mem)
 24021  	// cond: t.Size() == 8 && t.IsFloat()
 24022  	// result: (FMOVDstore ptr val mem)
 24023  	for {
 24024  		t := auxToType(v.Aux)
 24025  		ptr := v_0
 24026  		val := v_1
 24027  		mem := v_2
 24028  		if !(t.Size() == 8 && t.IsFloat()) {
 24029  			break
 24030  		}
 24031  		v.reset(OpARM64FMOVDstore)
 24032  		v.AddArg3(ptr, val, mem)
 24033  		return true
 24034  	}
 24035  	// match: (Store {t} ptr val mem)
 24036  	// cond: t.Size() == 16
 24037  	// result: (FMOVQstore ptr val mem)
 24038  	for {
 24039  		t := auxToType(v.Aux)
 24040  		ptr := v_0
 24041  		val := v_1
 24042  		mem := v_2
 24043  		if !(t.Size() == 16) {
 24044  			break
 24045  		}
 24046  		v.reset(OpARM64FMOVQstore)
 24047  		v.AddArg3(ptr, val, mem)
 24048  		return true
 24049  	}
 24050  	return false
 24051  }
 24052  func rewriteValueARM64_OpZero(v *Value) bool {
 24053  	v_1 := v.Args[1]
 24054  	v_0 := v.Args[0]
 24055  	b := v.Block
 24056  	typ := &b.Func.Config.Types
 24057  	// match: (Zero [0] _ mem)
 24058  	// result: mem
 24059  	for {
 24060  		if auxIntToInt64(v.AuxInt) != 0 {
 24061  			break
 24062  		}
 24063  		mem := v_1
 24064  		v.copyOf(mem)
 24065  		return true
 24066  	}
 24067  	// match: (Zero [1] ptr mem)
 24068  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 24069  	for {
 24070  		if auxIntToInt64(v.AuxInt) != 1 {
 24071  			break
 24072  		}
 24073  		ptr := v_0
 24074  		mem := v_1
 24075  		v.reset(OpARM64MOVBstore)
 24076  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24077  		v0.AuxInt = int64ToAuxInt(0)
 24078  		v.AddArg3(ptr, v0, mem)
 24079  		return true
 24080  	}
 24081  	// match: (Zero [2] ptr mem)
 24082  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 24083  	for {
 24084  		if auxIntToInt64(v.AuxInt) != 2 {
 24085  			break
 24086  		}
 24087  		ptr := v_0
 24088  		mem := v_1
 24089  		v.reset(OpARM64MOVHstore)
 24090  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24091  		v0.AuxInt = int64ToAuxInt(0)
 24092  		v.AddArg3(ptr, v0, mem)
 24093  		return true
 24094  	}
 24095  	// match: (Zero [4] ptr mem)
 24096  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 24097  	for {
 24098  		if auxIntToInt64(v.AuxInt) != 4 {
 24099  			break
 24100  		}
 24101  		ptr := v_0
 24102  		mem := v_1
 24103  		v.reset(OpARM64MOVWstore)
 24104  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24105  		v0.AuxInt = int64ToAuxInt(0)
 24106  		v.AddArg3(ptr, v0, mem)
 24107  		return true
 24108  	}
 24109  	// match: (Zero [3] ptr mem)
 24110  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 24111  	for {
 24112  		if auxIntToInt64(v.AuxInt) != 3 {
 24113  			break
 24114  		}
 24115  		ptr := v_0
 24116  		mem := v_1
 24117  		v.reset(OpARM64MOVBstore)
 24118  		v.AuxInt = int32ToAuxInt(2)
 24119  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24120  		v0.AuxInt = int64ToAuxInt(0)
 24121  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 24122  		v1.AddArg3(ptr, v0, mem)
 24123  		v.AddArg3(ptr, v0, v1)
 24124  		return true
 24125  	}
 24126  	// match: (Zero [5] ptr mem)
 24127  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24128  	for {
 24129  		if auxIntToInt64(v.AuxInt) != 5 {
 24130  			break
 24131  		}
 24132  		ptr := v_0
 24133  		mem := v_1
 24134  		v.reset(OpARM64MOVBstore)
 24135  		v.AuxInt = int32ToAuxInt(4)
 24136  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24137  		v0.AuxInt = int64ToAuxInt(0)
 24138  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24139  		v1.AddArg3(ptr, v0, mem)
 24140  		v.AddArg3(ptr, v0, v1)
 24141  		return true
 24142  	}
 24143  	// match: (Zero [6] ptr mem)
 24144  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24145  	for {
 24146  		if auxIntToInt64(v.AuxInt) != 6 {
 24147  			break
 24148  		}
 24149  		ptr := v_0
 24150  		mem := v_1
 24151  		v.reset(OpARM64MOVHstore)
 24152  		v.AuxInt = int32ToAuxInt(4)
 24153  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24154  		v0.AuxInt = int64ToAuxInt(0)
 24155  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24156  		v1.AddArg3(ptr, v0, mem)
 24157  		v.AddArg3(ptr, v0, v1)
 24158  		return true
 24159  	}
 24160  	// match: (Zero [7] ptr mem)
 24161  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 24162  	for {
 24163  		if auxIntToInt64(v.AuxInt) != 7 {
 24164  			break
 24165  		}
 24166  		ptr := v_0
 24167  		mem := v_1
 24168  		v.reset(OpARM64MOVWstore)
 24169  		v.AuxInt = int32ToAuxInt(3)
 24170  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24171  		v0.AuxInt = int64ToAuxInt(0)
 24172  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 24173  		v1.AddArg3(ptr, v0, mem)
 24174  		v.AddArg3(ptr, v0, v1)
 24175  		return true
 24176  	}
 24177  	// match: (Zero [8] ptr mem)
 24178  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 24179  	for {
 24180  		if auxIntToInt64(v.AuxInt) != 8 {
 24181  			break
 24182  		}
 24183  		ptr := v_0
 24184  		mem := v_1
 24185  		v.reset(OpARM64MOVDstore)
 24186  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24187  		v0.AuxInt = int64ToAuxInt(0)
 24188  		v.AddArg3(ptr, v0, mem)
 24189  		return true
 24190  	}
 24191  	// match: (Zero [9] ptr mem)
 24192  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24193  	for {
 24194  		if auxIntToInt64(v.AuxInt) != 9 {
 24195  			break
 24196  		}
 24197  		ptr := v_0
 24198  		mem := v_1
 24199  		v.reset(OpARM64MOVBstore)
 24200  		v.AuxInt = int32ToAuxInt(8)
 24201  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24202  		v0.AuxInt = int64ToAuxInt(0)
 24203  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24204  		v1.AddArg3(ptr, v0, mem)
 24205  		v.AddArg3(ptr, v0, v1)
 24206  		return true
 24207  	}
 24208  	// match: (Zero [10] ptr mem)
 24209  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24210  	for {
 24211  		if auxIntToInt64(v.AuxInt) != 10 {
 24212  			break
 24213  		}
 24214  		ptr := v_0
 24215  		mem := v_1
 24216  		v.reset(OpARM64MOVHstore)
 24217  		v.AuxInt = int32ToAuxInt(8)
 24218  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24219  		v0.AuxInt = int64ToAuxInt(0)
 24220  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24221  		v1.AddArg3(ptr, v0, mem)
 24222  		v.AddArg3(ptr, v0, v1)
 24223  		return true
 24224  	}
 24225  	// match: (Zero [11] ptr mem)
 24226  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24227  	for {
 24228  		if auxIntToInt64(v.AuxInt) != 11 {
 24229  			break
 24230  		}
 24231  		ptr := v_0
 24232  		mem := v_1
 24233  		v.reset(OpARM64MOVDstore)
 24234  		v.AuxInt = int32ToAuxInt(3)
 24235  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24236  		v0.AuxInt = int64ToAuxInt(0)
 24237  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24238  		v1.AddArg3(ptr, v0, mem)
 24239  		v.AddArg3(ptr, v0, v1)
 24240  		return true
 24241  	}
 24242  	// match: (Zero [12] ptr mem)
 24243  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24244  	for {
 24245  		if auxIntToInt64(v.AuxInt) != 12 {
 24246  			break
 24247  		}
 24248  		ptr := v_0
 24249  		mem := v_1
 24250  		v.reset(OpARM64MOVWstore)
 24251  		v.AuxInt = int32ToAuxInt(8)
 24252  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24253  		v0.AuxInt = int64ToAuxInt(0)
 24254  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24255  		v1.AddArg3(ptr, v0, mem)
 24256  		v.AddArg3(ptr, v0, v1)
 24257  		return true
 24258  	}
 24259  	// match: (Zero [13] ptr mem)
 24260  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24261  	for {
 24262  		if auxIntToInt64(v.AuxInt) != 13 {
 24263  			break
 24264  		}
 24265  		ptr := v_0
 24266  		mem := v_1
 24267  		v.reset(OpARM64MOVDstore)
 24268  		v.AuxInt = int32ToAuxInt(5)
 24269  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24270  		v0.AuxInt = int64ToAuxInt(0)
 24271  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24272  		v1.AddArg3(ptr, v0, mem)
 24273  		v.AddArg3(ptr, v0, v1)
 24274  		return true
 24275  	}
 24276  	// match: (Zero [14] ptr mem)
 24277  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24278  	for {
 24279  		if auxIntToInt64(v.AuxInt) != 14 {
 24280  			break
 24281  		}
 24282  		ptr := v_0
 24283  		mem := v_1
 24284  		v.reset(OpARM64MOVDstore)
 24285  		v.AuxInt = int32ToAuxInt(6)
 24286  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24287  		v0.AuxInt = int64ToAuxInt(0)
 24288  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24289  		v1.AddArg3(ptr, v0, mem)
 24290  		v.AddArg3(ptr, v0, v1)
 24291  		return true
 24292  	}
 24293  	// match: (Zero [15] ptr mem)
 24294  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 24295  	for {
 24296  		if auxIntToInt64(v.AuxInt) != 15 {
 24297  			break
 24298  		}
 24299  		ptr := v_0
 24300  		mem := v_1
 24301  		v.reset(OpARM64MOVDstore)
 24302  		v.AuxInt = int32ToAuxInt(7)
 24303  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24304  		v0.AuxInt = int64ToAuxInt(0)
 24305  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 24306  		v1.AddArg3(ptr, v0, mem)
 24307  		v.AddArg3(ptr, v0, v1)
 24308  		return true
 24309  	}
 24310  	// match: (Zero [16] ptr mem)
 24311  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 24312  	for {
 24313  		if auxIntToInt64(v.AuxInt) != 16 {
 24314  			break
 24315  		}
 24316  		ptr := v_0
 24317  		mem := v_1
 24318  		v.reset(OpARM64STP)
 24319  		v.AuxInt = int32ToAuxInt(0)
 24320  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 24321  		v0.AuxInt = int64ToAuxInt(0)
 24322  		v.AddArg4(ptr, v0, v0, mem)
 24323  		return true
 24324  	}
 24325  	// match: (Zero [s] ptr mem)
 24326  	// cond: s > 16 && s < 192
 24327  	// result: (LoweredZero [s] ptr mem)
 24328  	for {
 24329  		s := auxIntToInt64(v.AuxInt)
 24330  		ptr := v_0
 24331  		mem := v_1
 24332  		if !(s > 16 && s < 192) {
 24333  			break
 24334  		}
 24335  		v.reset(OpARM64LoweredZero)
 24336  		v.AuxInt = int64ToAuxInt(s)
 24337  		v.AddArg2(ptr, mem)
 24338  		return true
 24339  	}
 24340  	// match: (Zero [s] ptr mem)
 24341  	// cond: s >= 192
 24342  	// result: (LoweredZeroLoop [s] ptr mem)
 24343  	for {
 24344  		s := auxIntToInt64(v.AuxInt)
 24345  		ptr := v_0
 24346  		mem := v_1
 24347  		if !(s >= 192) {
 24348  			break
 24349  		}
 24350  		v.reset(OpARM64LoweredZeroLoop)
 24351  		v.AuxInt = int64ToAuxInt(s)
 24352  		v.AddArg2(ptr, mem)
 24353  		return true
 24354  	}
 24355  	return false
 24356  }
 24357  func rewriteValueARM64_OpZeroSIMD(v *Value) bool {
 24358  	// match: (ZeroSIMD <t>)
 24359  	// cond: t.Size() == 16
 24360  	// result: (VMOVI16B [0] <t>)
 24361  	for {
 24362  		t := v.Type
 24363  		if !(t.Size() == 16) {
 24364  			break
 24365  		}
 24366  		v.reset(OpARM64VMOVI16B)
 24367  		v.Type = t
 24368  		v.AuxInt = uint8ToAuxInt(0)
 24369  		return true
 24370  	}
 24371  	return false
 24372  }
 24373  func rewriteValueARM64_Opbroadcast1To16Int8x16(v *Value) bool {
 24374  	v_0 := v.Args[0]
 24375  	// match: (broadcast1To16Int8x16 x)
 24376  	// result: (VDUPBbcast [0] x)
 24377  	for {
 24378  		x := v_0
 24379  		v.reset(OpARM64VDUPBbcast)
 24380  		v.AuxInt = uint8ToAuxInt(0)
 24381  		v.AddArg(x)
 24382  		return true
 24383  	}
 24384  }
 24385  func rewriteValueARM64_Opbroadcast1To16Uint8x16(v *Value) bool {
 24386  	v_0 := v.Args[0]
 24387  	// match: (broadcast1To16Uint8x16 x)
 24388  	// result: (VDUPBbcast [0] x)
 24389  	for {
 24390  		x := v_0
 24391  		v.reset(OpARM64VDUPBbcast)
 24392  		v.AuxInt = uint8ToAuxInt(0)
 24393  		v.AddArg(x)
 24394  		return true
 24395  	}
 24396  }
 24397  func rewriteValueARM64_Opbroadcast1To2Float64x2(v *Value) bool {
 24398  	v_0 := v.Args[0]
 24399  	// match: (broadcast1To2Float64x2 x)
 24400  	// result: (VDUPDbcast [0] x)
 24401  	for {
 24402  		x := v_0
 24403  		v.reset(OpARM64VDUPDbcast)
 24404  		v.AuxInt = uint8ToAuxInt(0)
 24405  		v.AddArg(x)
 24406  		return true
 24407  	}
 24408  }
 24409  func rewriteValueARM64_Opbroadcast1To2Int64x2(v *Value) bool {
 24410  	v_0 := v.Args[0]
 24411  	// match: (broadcast1To2Int64x2 x)
 24412  	// result: (VDUPDbcast [0] x)
 24413  	for {
 24414  		x := v_0
 24415  		v.reset(OpARM64VDUPDbcast)
 24416  		v.AuxInt = uint8ToAuxInt(0)
 24417  		v.AddArg(x)
 24418  		return true
 24419  	}
 24420  }
 24421  func rewriteValueARM64_Opbroadcast1To2Uint64x2(v *Value) bool {
 24422  	v_0 := v.Args[0]
 24423  	// match: (broadcast1To2Uint64x2 x)
 24424  	// result: (VDUPDbcast [0] x)
 24425  	for {
 24426  		x := v_0
 24427  		v.reset(OpARM64VDUPDbcast)
 24428  		v.AuxInt = uint8ToAuxInt(0)
 24429  		v.AddArg(x)
 24430  		return true
 24431  	}
 24432  }
 24433  func rewriteValueARM64_Opbroadcast1To4Float32x4(v *Value) bool {
 24434  	v_0 := v.Args[0]
 24435  	// match: (broadcast1To4Float32x4 x)
 24436  	// result: (VDUPSbcast [0] x)
 24437  	for {
 24438  		x := v_0
 24439  		v.reset(OpARM64VDUPSbcast)
 24440  		v.AuxInt = uint8ToAuxInt(0)
 24441  		v.AddArg(x)
 24442  		return true
 24443  	}
 24444  }
 24445  func rewriteValueARM64_Opbroadcast1To4Int32x4(v *Value) bool {
 24446  	v_0 := v.Args[0]
 24447  	// match: (broadcast1To4Int32x4 x)
 24448  	// result: (VDUPSbcast [0] x)
 24449  	for {
 24450  		x := v_0
 24451  		v.reset(OpARM64VDUPSbcast)
 24452  		v.AuxInt = uint8ToAuxInt(0)
 24453  		v.AddArg(x)
 24454  		return true
 24455  	}
 24456  }
 24457  func rewriteValueARM64_Opbroadcast1To4Uint32x4(v *Value) bool {
 24458  	v_0 := v.Args[0]
 24459  	// match: (broadcast1To4Uint32x4 x)
 24460  	// result: (VDUPSbcast [0] x)
 24461  	for {
 24462  		x := v_0
 24463  		v.reset(OpARM64VDUPSbcast)
 24464  		v.AuxInt = uint8ToAuxInt(0)
 24465  		v.AddArg(x)
 24466  		return true
 24467  	}
 24468  }
 24469  func rewriteValueARM64_Opbroadcast1To8Int16x8(v *Value) bool {
 24470  	v_0 := v.Args[0]
 24471  	// match: (broadcast1To8Int16x8 x)
 24472  	// result: (VDUPHbcast [0] x)
 24473  	for {
 24474  		x := v_0
 24475  		v.reset(OpARM64VDUPHbcast)
 24476  		v.AuxInt = uint8ToAuxInt(0)
 24477  		v.AddArg(x)
 24478  		return true
 24479  	}
 24480  }
 24481  func rewriteValueARM64_Opbroadcast1To8Uint16x8(v *Value) bool {
 24482  	v_0 := v.Args[0]
 24483  	// match: (broadcast1To8Uint16x8 x)
 24484  	// result: (VDUPHbcast [0] x)
 24485  	for {
 24486  		x := v_0
 24487  		v.reset(OpARM64VDUPHbcast)
 24488  		v.AuxInt = uint8ToAuxInt(0)
 24489  		v.AddArg(x)
 24490  		return true
 24491  	}
 24492  }
 24493  func rewriteBlockARM64(b *Block) bool {
 24494  	typ := &b.Func.Config.Types
 24495  	switch b.Kind {
 24496  	case BlockARM64EQ:
 24497  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 24498  		// cond: z.Uses == 1
 24499  		// result: (EQ (TST x y) yes no)
 24500  		for b.Controls[0].Op == OpARM64CMPconst {
 24501  			v_0 := b.Controls[0]
 24502  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24503  				break
 24504  			}
 24505  			z := v_0.Args[0]
 24506  			if z.Op != OpARM64AND {
 24507  				break
 24508  			}
 24509  			_ = z.Args[1]
 24510  			z_0 := z.Args[0]
 24511  			z_1 := z.Args[1]
 24512  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24513  				x := z_0
 24514  				y := z_1
 24515  				if !(z.Uses == 1) {
 24516  					continue
 24517  				}
 24518  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24519  				v0.AddArg2(x, y)
 24520  				b.resetWithControl(BlockARM64EQ, v0)
 24521  				return true
 24522  			}
 24523  			break
 24524  		}
 24525  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24526  		// cond: x.Uses == 1
 24527  		// result: (EQ (TSTconst [c] y) yes no)
 24528  		for b.Controls[0].Op == OpARM64CMPconst {
 24529  			v_0 := b.Controls[0]
 24530  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24531  				break
 24532  			}
 24533  			x := v_0.Args[0]
 24534  			if x.Op != OpARM64ANDconst {
 24535  				break
 24536  			}
 24537  			c := auxIntToInt64(x.AuxInt)
 24538  			y := x.Args[0]
 24539  			if !(x.Uses == 1) {
 24540  				break
 24541  			}
 24542  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24543  			v0.AuxInt = int64ToAuxInt(c)
 24544  			v0.AddArg(y)
 24545  			b.resetWithControl(BlockARM64EQ, v0)
 24546  			return true
 24547  		}
 24548  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 24549  		// cond: z.Uses == 1
 24550  		// result: (EQ (TSTW x y) yes no)
 24551  		for b.Controls[0].Op == OpARM64CMPWconst {
 24552  			v_0 := b.Controls[0]
 24553  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24554  				break
 24555  			}
 24556  			z := v_0.Args[0]
 24557  			if z.Op != OpARM64AND {
 24558  				break
 24559  			}
 24560  			_ = z.Args[1]
 24561  			z_0 := z.Args[0]
 24562  			z_1 := z.Args[1]
 24563  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24564  				x := z_0
 24565  				y := z_1
 24566  				if !(z.Uses == 1) {
 24567  					continue
 24568  				}
 24569  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24570  				v0.AddArg2(x, y)
 24571  				b.resetWithControl(BlockARM64EQ, v0)
 24572  				return true
 24573  			}
 24574  			break
 24575  		}
 24576  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24577  		// cond: x.Uses == 1
 24578  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 24579  		for b.Controls[0].Op == OpARM64CMPWconst {
 24580  			v_0 := b.Controls[0]
 24581  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24582  				break
 24583  			}
 24584  			x := v_0.Args[0]
 24585  			if x.Op != OpARM64ANDconst {
 24586  				break
 24587  			}
 24588  			c := auxIntToInt64(x.AuxInt)
 24589  			y := x.Args[0]
 24590  			if !(x.Uses == 1) {
 24591  				break
 24592  			}
 24593  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24594  			v0.AuxInt = int32ToAuxInt(int32(c))
 24595  			v0.AddArg(y)
 24596  			b.resetWithControl(BlockARM64EQ, v0)
 24597  			return true
 24598  		}
 24599  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24600  		// cond: x.Uses == 1
 24601  		// result: (EQ (CMNconst [c] y) yes no)
 24602  		for b.Controls[0].Op == OpARM64CMPconst {
 24603  			v_0 := b.Controls[0]
 24604  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24605  				break
 24606  			}
 24607  			x := v_0.Args[0]
 24608  			if x.Op != OpARM64ADDconst {
 24609  				break
 24610  			}
 24611  			c := auxIntToInt64(x.AuxInt)
 24612  			y := x.Args[0]
 24613  			if !(x.Uses == 1) {
 24614  				break
 24615  			}
 24616  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24617  			v0.AuxInt = int64ToAuxInt(c)
 24618  			v0.AddArg(y)
 24619  			b.resetWithControl(BlockARM64EQ, v0)
 24620  			return true
 24621  		}
 24622  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24623  		// cond: x.Uses == 1
 24624  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 24625  		for b.Controls[0].Op == OpARM64CMPWconst {
 24626  			v_0 := b.Controls[0]
 24627  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24628  				break
 24629  			}
 24630  			x := v_0.Args[0]
 24631  			if x.Op != OpARM64ADDconst {
 24632  				break
 24633  			}
 24634  			c := auxIntToInt64(x.AuxInt)
 24635  			y := x.Args[0]
 24636  			if !(x.Uses == 1) {
 24637  				break
 24638  			}
 24639  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24640  			v0.AuxInt = int32ToAuxInt(int32(c))
 24641  			v0.AddArg(y)
 24642  			b.resetWithControl(BlockARM64EQ, v0)
 24643  			return true
 24644  		}
 24645  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 24646  		// cond: z.Uses == 1
 24647  		// result: (EQ (CMN x y) yes no)
 24648  		for b.Controls[0].Op == OpARM64CMPconst {
 24649  			v_0 := b.Controls[0]
 24650  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24651  				break
 24652  			}
 24653  			z := v_0.Args[0]
 24654  			if z.Op != OpARM64ADD {
 24655  				break
 24656  			}
 24657  			_ = z.Args[1]
 24658  			z_0 := z.Args[0]
 24659  			z_1 := z.Args[1]
 24660  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24661  				x := z_0
 24662  				y := z_1
 24663  				if !(z.Uses == 1) {
 24664  					continue
 24665  				}
 24666  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24667  				v0.AddArg2(x, y)
 24668  				b.resetWithControl(BlockARM64EQ, v0)
 24669  				return true
 24670  			}
 24671  			break
 24672  		}
 24673  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 24674  		// cond: z.Uses == 1
 24675  		// result: (EQ (CMNW x y) yes no)
 24676  		for b.Controls[0].Op == OpARM64CMPWconst {
 24677  			v_0 := b.Controls[0]
 24678  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24679  				break
 24680  			}
 24681  			z := v_0.Args[0]
 24682  			if z.Op != OpARM64ADD {
 24683  				break
 24684  			}
 24685  			_ = z.Args[1]
 24686  			z_0 := z.Args[0]
 24687  			z_1 := z.Args[1]
 24688  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24689  				x := z_0
 24690  				y := z_1
 24691  				if !(z.Uses == 1) {
 24692  					continue
 24693  				}
 24694  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24695  				v0.AddArg2(x, y)
 24696  				b.resetWithControl(BlockARM64EQ, v0)
 24697  				return true
 24698  			}
 24699  			break
 24700  		}
 24701  		// match: (EQ (CMP x z:(NEG y)) yes no)
 24702  		// cond: z.Uses == 1
 24703  		// result: (EQ (CMN x y) yes no)
 24704  		for b.Controls[0].Op == OpARM64CMP {
 24705  			v_0 := b.Controls[0]
 24706  			_ = v_0.Args[1]
 24707  			x := v_0.Args[0]
 24708  			z := v_0.Args[1]
 24709  			if z.Op != OpARM64NEG {
 24710  				break
 24711  			}
 24712  			y := z.Args[0]
 24713  			if !(z.Uses == 1) {
 24714  				break
 24715  			}
 24716  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24717  			v0.AddArg2(x, y)
 24718  			b.resetWithControl(BlockARM64EQ, v0)
 24719  			return true
 24720  		}
 24721  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 24722  		// cond: z.Uses == 1
 24723  		// result: (EQ (CMNW x y) yes no)
 24724  		for b.Controls[0].Op == OpARM64CMPW {
 24725  			v_0 := b.Controls[0]
 24726  			_ = v_0.Args[1]
 24727  			x := v_0.Args[0]
 24728  			z := v_0.Args[1]
 24729  			if z.Op != OpARM64NEG {
 24730  				break
 24731  			}
 24732  			y := z.Args[0]
 24733  			if !(z.Uses == 1) {
 24734  				break
 24735  			}
 24736  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24737  			v0.AddArg2(x, y)
 24738  			b.resetWithControl(BlockARM64EQ, v0)
 24739  			return true
 24740  		}
 24741  		// match: (EQ (CMPconst [0] x) yes no)
 24742  		// result: (Z x yes no)
 24743  		for b.Controls[0].Op == OpARM64CMPconst {
 24744  			v_0 := b.Controls[0]
 24745  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24746  				break
 24747  			}
 24748  			x := v_0.Args[0]
 24749  			b.resetWithControl(BlockARM64Z, x)
 24750  			return true
 24751  		}
 24752  		// match: (EQ (CMPWconst [0] x) yes no)
 24753  		// result: (ZW x yes no)
 24754  		for b.Controls[0].Op == OpARM64CMPWconst {
 24755  			v_0 := b.Controls[0]
 24756  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24757  				break
 24758  			}
 24759  			x := v_0.Args[0]
 24760  			b.resetWithControl(BlockARM64ZW, x)
 24761  			return true
 24762  		}
 24763  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 24764  		// cond: z.Uses==1
 24765  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 24766  		for b.Controls[0].Op == OpARM64CMPconst {
 24767  			v_0 := b.Controls[0]
 24768  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24769  				break
 24770  			}
 24771  			z := v_0.Args[0]
 24772  			if z.Op != OpARM64MADD {
 24773  				break
 24774  			}
 24775  			y := z.Args[2]
 24776  			a := z.Args[0]
 24777  			x := z.Args[1]
 24778  			if !(z.Uses == 1) {
 24779  				break
 24780  			}
 24781  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24782  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24783  			v1.AddArg2(x, y)
 24784  			v0.AddArg2(a, v1)
 24785  			b.resetWithControl(BlockARM64EQ, v0)
 24786  			return true
 24787  		}
 24788  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 24789  		// cond: z.Uses==1
 24790  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 24791  		for b.Controls[0].Op == OpARM64CMPconst {
 24792  			v_0 := b.Controls[0]
 24793  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24794  				break
 24795  			}
 24796  			z := v_0.Args[0]
 24797  			if z.Op != OpARM64MSUB {
 24798  				break
 24799  			}
 24800  			y := z.Args[2]
 24801  			a := z.Args[0]
 24802  			x := z.Args[1]
 24803  			if !(z.Uses == 1) {
 24804  				break
 24805  			}
 24806  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24807  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24808  			v1.AddArg2(x, y)
 24809  			v0.AddArg2(a, v1)
 24810  			b.resetWithControl(BlockARM64EQ, v0)
 24811  			return true
 24812  		}
 24813  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 24814  		// cond: z.Uses==1
 24815  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 24816  		for b.Controls[0].Op == OpARM64CMPWconst {
 24817  			v_0 := b.Controls[0]
 24818  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24819  				break
 24820  			}
 24821  			z := v_0.Args[0]
 24822  			if z.Op != OpARM64MADDW {
 24823  				break
 24824  			}
 24825  			y := z.Args[2]
 24826  			a := z.Args[0]
 24827  			x := z.Args[1]
 24828  			if !(z.Uses == 1) {
 24829  				break
 24830  			}
 24831  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24832  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24833  			v1.AddArg2(x, y)
 24834  			v0.AddArg2(a, v1)
 24835  			b.resetWithControl(BlockARM64EQ, v0)
 24836  			return true
 24837  		}
 24838  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24839  		// cond: z.Uses==1
 24840  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 24841  		for b.Controls[0].Op == OpARM64CMPWconst {
 24842  			v_0 := b.Controls[0]
 24843  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24844  				break
 24845  			}
 24846  			z := v_0.Args[0]
 24847  			if z.Op != OpARM64MSUBW {
 24848  				break
 24849  			}
 24850  			y := z.Args[2]
 24851  			a := z.Args[0]
 24852  			x := z.Args[1]
 24853  			if !(z.Uses == 1) {
 24854  				break
 24855  			}
 24856  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24857  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24858  			v1.AddArg2(x, y)
 24859  			v0.AddArg2(a, v1)
 24860  			b.resetWithControl(BlockARM64EQ, v0)
 24861  			return true
 24862  		}
 24863  		// match: (EQ (TSTconst [c] x) yes no)
 24864  		// cond: oneBit(c)
 24865  		// result: (TBZ [int64(ntz64(c))] x yes no)
 24866  		for b.Controls[0].Op == OpARM64TSTconst {
 24867  			v_0 := b.Controls[0]
 24868  			c := auxIntToInt64(v_0.AuxInt)
 24869  			x := v_0.Args[0]
 24870  			if !(oneBit(c)) {
 24871  				break
 24872  			}
 24873  			b.resetWithControl(BlockARM64TBZ, x)
 24874  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 24875  			return true
 24876  		}
 24877  		// match: (EQ (TSTWconst [c] x) yes no)
 24878  		// cond: oneBit(int64(uint32(c)))
 24879  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 24880  		for b.Controls[0].Op == OpARM64TSTWconst {
 24881  			v_0 := b.Controls[0]
 24882  			c := auxIntToInt32(v_0.AuxInt)
 24883  			x := v_0.Args[0]
 24884  			if !(oneBit(int64(uint32(c)))) {
 24885  				break
 24886  			}
 24887  			b.resetWithControl(BlockARM64TBZ, x)
 24888  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 24889  			return true
 24890  		}
 24891  		// match: (EQ (FlagConstant [fc]) yes no)
 24892  		// cond: fc.eq()
 24893  		// result: (First yes no)
 24894  		for b.Controls[0].Op == OpARM64FlagConstant {
 24895  			v_0 := b.Controls[0]
 24896  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24897  			if !(fc.eq()) {
 24898  				break
 24899  			}
 24900  			b.Reset(BlockFirst)
 24901  			return true
 24902  		}
 24903  		// match: (EQ (FlagConstant [fc]) yes no)
 24904  		// cond: !fc.eq()
 24905  		// result: (First no yes)
 24906  		for b.Controls[0].Op == OpARM64FlagConstant {
 24907  			v_0 := b.Controls[0]
 24908  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24909  			if !(!fc.eq()) {
 24910  				break
 24911  			}
 24912  			b.Reset(BlockFirst)
 24913  			b.swapSuccessors()
 24914  			return true
 24915  		}
 24916  		// match: (EQ (InvertFlags cmp) yes no)
 24917  		// result: (EQ cmp yes no)
 24918  		for b.Controls[0].Op == OpARM64InvertFlags {
 24919  			v_0 := b.Controls[0]
 24920  			cmp := v_0.Args[0]
 24921  			b.resetWithControl(BlockARM64EQ, cmp)
 24922  			return true
 24923  		}
 24924  	case BlockARM64FGE:
 24925  		// match: (FGE (InvertFlags cmp) yes no)
 24926  		// result: (FLE cmp yes no)
 24927  		for b.Controls[0].Op == OpARM64InvertFlags {
 24928  			v_0 := b.Controls[0]
 24929  			cmp := v_0.Args[0]
 24930  			b.resetWithControl(BlockARM64FLE, cmp)
 24931  			return true
 24932  		}
 24933  	case BlockARM64FGT:
 24934  		// match: (FGT (InvertFlags cmp) yes no)
 24935  		// result: (FLT cmp yes no)
 24936  		for b.Controls[0].Op == OpARM64InvertFlags {
 24937  			v_0 := b.Controls[0]
 24938  			cmp := v_0.Args[0]
 24939  			b.resetWithControl(BlockARM64FLT, cmp)
 24940  			return true
 24941  		}
 24942  	case BlockARM64FLE:
 24943  		// match: (FLE (InvertFlags cmp) yes no)
 24944  		// result: (FGE cmp yes no)
 24945  		for b.Controls[0].Op == OpARM64InvertFlags {
 24946  			v_0 := b.Controls[0]
 24947  			cmp := v_0.Args[0]
 24948  			b.resetWithControl(BlockARM64FGE, cmp)
 24949  			return true
 24950  		}
 24951  	case BlockARM64FLT:
 24952  		// match: (FLT (InvertFlags cmp) yes no)
 24953  		// result: (FGT cmp yes no)
 24954  		for b.Controls[0].Op == OpARM64InvertFlags {
 24955  			v_0 := b.Controls[0]
 24956  			cmp := v_0.Args[0]
 24957  			b.resetWithControl(BlockARM64FGT, cmp)
 24958  			return true
 24959  		}
 24960  	case BlockARM64GE:
 24961  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 24962  		// cond: z.Uses == 1
 24963  		// result: (GE (TST x y) yes no)
 24964  		for b.Controls[0].Op == OpARM64CMPconst {
 24965  			v_0 := b.Controls[0]
 24966  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24967  				break
 24968  			}
 24969  			z := v_0.Args[0]
 24970  			if z.Op != OpARM64AND {
 24971  				break
 24972  			}
 24973  			_ = z.Args[1]
 24974  			z_0 := z.Args[0]
 24975  			z_1 := z.Args[1]
 24976  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24977  				x := z_0
 24978  				y := z_1
 24979  				if !(z.Uses == 1) {
 24980  					continue
 24981  				}
 24982  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24983  				v0.AddArg2(x, y)
 24984  				b.resetWithControl(BlockARM64GE, v0)
 24985  				return true
 24986  			}
 24987  			break
 24988  		}
 24989  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24990  		// cond: x.Uses == 1
 24991  		// result: (GE (TSTconst [c] y) yes no)
 24992  		for b.Controls[0].Op == OpARM64CMPconst {
 24993  			v_0 := b.Controls[0]
 24994  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24995  				break
 24996  			}
 24997  			x := v_0.Args[0]
 24998  			if x.Op != OpARM64ANDconst {
 24999  				break
 25000  			}
 25001  			c := auxIntToInt64(x.AuxInt)
 25002  			y := x.Args[0]
 25003  			if !(x.Uses == 1) {
 25004  				break
 25005  			}
 25006  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25007  			v0.AuxInt = int64ToAuxInt(c)
 25008  			v0.AddArg(y)
 25009  			b.resetWithControl(BlockARM64GE, v0)
 25010  			return true
 25011  		}
 25012  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 25013  		// cond: z.Uses == 1
 25014  		// result: (GE (TSTW x y) yes no)
 25015  		for b.Controls[0].Op == OpARM64CMPWconst {
 25016  			v_0 := b.Controls[0]
 25017  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25018  				break
 25019  			}
 25020  			z := v_0.Args[0]
 25021  			if z.Op != OpARM64AND {
 25022  				break
 25023  			}
 25024  			_ = z.Args[1]
 25025  			z_0 := z.Args[0]
 25026  			z_1 := z.Args[1]
 25027  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25028  				x := z_0
 25029  				y := z_1
 25030  				if !(z.Uses == 1) {
 25031  					continue
 25032  				}
 25033  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25034  				v0.AddArg2(x, y)
 25035  				b.resetWithControl(BlockARM64GE, v0)
 25036  				return true
 25037  			}
 25038  			break
 25039  		}
 25040  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25041  		// cond: x.Uses == 1
 25042  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 25043  		for b.Controls[0].Op == OpARM64CMPWconst {
 25044  			v_0 := b.Controls[0]
 25045  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25046  				break
 25047  			}
 25048  			x := v_0.Args[0]
 25049  			if x.Op != OpARM64ANDconst {
 25050  				break
 25051  			}
 25052  			c := auxIntToInt64(x.AuxInt)
 25053  			y := x.Args[0]
 25054  			if !(x.Uses == 1) {
 25055  				break
 25056  			}
 25057  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25058  			v0.AuxInt = int32ToAuxInt(int32(c))
 25059  			v0.AddArg(y)
 25060  			b.resetWithControl(BlockARM64GE, v0)
 25061  			return true
 25062  		}
 25063  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25064  		// cond: x.Uses == 1
 25065  		// result: (GEnoov (CMNconst [c] y) yes no)
 25066  		for b.Controls[0].Op == OpARM64CMPconst {
 25067  			v_0 := b.Controls[0]
 25068  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25069  				break
 25070  			}
 25071  			x := v_0.Args[0]
 25072  			if x.Op != OpARM64ADDconst {
 25073  				break
 25074  			}
 25075  			c := auxIntToInt64(x.AuxInt)
 25076  			y := x.Args[0]
 25077  			if !(x.Uses == 1) {
 25078  				break
 25079  			}
 25080  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25081  			v0.AuxInt = int64ToAuxInt(c)
 25082  			v0.AddArg(y)
 25083  			b.resetWithControl(BlockARM64GEnoov, v0)
 25084  			return true
 25085  		}
 25086  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25087  		// cond: x.Uses == 1
 25088  		// result: (GEnoov (CMNWconst [int32(c)] y) yes no)
 25089  		for b.Controls[0].Op == OpARM64CMPWconst {
 25090  			v_0 := b.Controls[0]
 25091  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25092  				break
 25093  			}
 25094  			x := v_0.Args[0]
 25095  			if x.Op != OpARM64ADDconst {
 25096  				break
 25097  			}
 25098  			c := auxIntToInt64(x.AuxInt)
 25099  			y := x.Args[0]
 25100  			if !(x.Uses == 1) {
 25101  				break
 25102  			}
 25103  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25104  			v0.AuxInt = int32ToAuxInt(int32(c))
 25105  			v0.AddArg(y)
 25106  			b.resetWithControl(BlockARM64GEnoov, v0)
 25107  			return true
 25108  		}
 25109  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 25110  		// cond: z.Uses == 1
 25111  		// result: (GEnoov (CMN x y) yes no)
 25112  		for b.Controls[0].Op == OpARM64CMPconst {
 25113  			v_0 := b.Controls[0]
 25114  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25115  				break
 25116  			}
 25117  			z := v_0.Args[0]
 25118  			if z.Op != OpARM64ADD {
 25119  				break
 25120  			}
 25121  			_ = z.Args[1]
 25122  			z_0 := z.Args[0]
 25123  			z_1 := z.Args[1]
 25124  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25125  				x := z_0
 25126  				y := z_1
 25127  				if !(z.Uses == 1) {
 25128  					continue
 25129  				}
 25130  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25131  				v0.AddArg2(x, y)
 25132  				b.resetWithControl(BlockARM64GEnoov, v0)
 25133  				return true
 25134  			}
 25135  			break
 25136  		}
 25137  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 25138  		// cond: z.Uses == 1
 25139  		// result: (GEnoov (CMNW x y) yes no)
 25140  		for b.Controls[0].Op == OpARM64CMPWconst {
 25141  			v_0 := b.Controls[0]
 25142  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25143  				break
 25144  			}
 25145  			z := v_0.Args[0]
 25146  			if z.Op != OpARM64ADD {
 25147  				break
 25148  			}
 25149  			_ = z.Args[1]
 25150  			z_0 := z.Args[0]
 25151  			z_1 := z.Args[1]
 25152  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25153  				x := z_0
 25154  				y := z_1
 25155  				if !(z.Uses == 1) {
 25156  					continue
 25157  				}
 25158  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25159  				v0.AddArg2(x, y)
 25160  				b.resetWithControl(BlockARM64GEnoov, v0)
 25161  				return true
 25162  			}
 25163  			break
 25164  		}
 25165  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 25166  		// cond: z.Uses==1
 25167  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 25168  		for b.Controls[0].Op == OpARM64CMPconst {
 25169  			v_0 := b.Controls[0]
 25170  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25171  				break
 25172  			}
 25173  			z := v_0.Args[0]
 25174  			if z.Op != OpARM64MADD {
 25175  				break
 25176  			}
 25177  			y := z.Args[2]
 25178  			a := z.Args[0]
 25179  			x := z.Args[1]
 25180  			if !(z.Uses == 1) {
 25181  				break
 25182  			}
 25183  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25184  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25185  			v1.AddArg2(x, y)
 25186  			v0.AddArg2(a, v1)
 25187  			b.resetWithControl(BlockARM64GEnoov, v0)
 25188  			return true
 25189  		}
 25190  		// match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
 25191  		// cond: z.Uses==1
 25192  		// result: (GEnoov (CMP a (MUL <x.Type> x y)) yes no)
 25193  		for b.Controls[0].Op == OpARM64CMPconst {
 25194  			v_0 := b.Controls[0]
 25195  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25196  				break
 25197  			}
 25198  			z := v_0.Args[0]
 25199  			if z.Op != OpARM64MSUB {
 25200  				break
 25201  			}
 25202  			y := z.Args[2]
 25203  			a := z.Args[0]
 25204  			x := z.Args[1]
 25205  			if !(z.Uses == 1) {
 25206  				break
 25207  			}
 25208  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 25209  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25210  			v1.AddArg2(x, y)
 25211  			v0.AddArg2(a, v1)
 25212  			b.resetWithControl(BlockARM64GEnoov, v0)
 25213  			return true
 25214  		}
 25215  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25216  		// cond: z.Uses==1
 25217  		// result: (GEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25218  		for b.Controls[0].Op == OpARM64CMPWconst {
 25219  			v_0 := b.Controls[0]
 25220  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25221  				break
 25222  			}
 25223  			z := v_0.Args[0]
 25224  			if z.Op != OpARM64MADDW {
 25225  				break
 25226  			}
 25227  			y := z.Args[2]
 25228  			a := z.Args[0]
 25229  			x := z.Args[1]
 25230  			if !(z.Uses == 1) {
 25231  				break
 25232  			}
 25233  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25234  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25235  			v1.AddArg2(x, y)
 25236  			v0.AddArg2(a, v1)
 25237  			b.resetWithControl(BlockARM64GEnoov, v0)
 25238  			return true
 25239  		}
 25240  		// match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 25241  		// cond: z.Uses==1
 25242  		// result: (GEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 25243  		for b.Controls[0].Op == OpARM64CMPWconst {
 25244  			v_0 := b.Controls[0]
 25245  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25246  				break
 25247  			}
 25248  			z := v_0.Args[0]
 25249  			if z.Op != OpARM64MSUBW {
 25250  				break
 25251  			}
 25252  			y := z.Args[2]
 25253  			a := z.Args[0]
 25254  			x := z.Args[1]
 25255  			if !(z.Uses == 1) {
 25256  				break
 25257  			}
 25258  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 25259  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25260  			v1.AddArg2(x, y)
 25261  			v0.AddArg2(a, v1)
 25262  			b.resetWithControl(BlockARM64GEnoov, v0)
 25263  			return true
 25264  		}
 25265  		// match: (GE (CMPWconst [0] x) yes no)
 25266  		// result: (TBZ [31] x yes no)
 25267  		for b.Controls[0].Op == OpARM64CMPWconst {
 25268  			v_0 := b.Controls[0]
 25269  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25270  				break
 25271  			}
 25272  			x := v_0.Args[0]
 25273  			b.resetWithControl(BlockARM64TBZ, x)
 25274  			b.AuxInt = int64ToAuxInt(31)
 25275  			return true
 25276  		}
 25277  		// match: (GE (CMPconst [0] x) yes no)
 25278  		// result: (TBZ [63] x yes no)
 25279  		for b.Controls[0].Op == OpARM64CMPconst {
 25280  			v_0 := b.Controls[0]
 25281  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25282  				break
 25283  			}
 25284  			x := v_0.Args[0]
 25285  			b.resetWithControl(BlockARM64TBZ, x)
 25286  			b.AuxInt = int64ToAuxInt(63)
 25287  			return true
 25288  		}
 25289  		// match: (GE (FlagConstant [fc]) yes no)
 25290  		// cond: fc.ge()
 25291  		// result: (First yes no)
 25292  		for b.Controls[0].Op == OpARM64FlagConstant {
 25293  			v_0 := b.Controls[0]
 25294  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25295  			if !(fc.ge()) {
 25296  				break
 25297  			}
 25298  			b.Reset(BlockFirst)
 25299  			return true
 25300  		}
 25301  		// match: (GE (FlagConstant [fc]) yes no)
 25302  		// cond: !fc.ge()
 25303  		// result: (First no yes)
 25304  		for b.Controls[0].Op == OpARM64FlagConstant {
 25305  			v_0 := b.Controls[0]
 25306  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25307  			if !(!fc.ge()) {
 25308  				break
 25309  			}
 25310  			b.Reset(BlockFirst)
 25311  			b.swapSuccessors()
 25312  			return true
 25313  		}
 25314  		// match: (GE (InvertFlags cmp) yes no)
 25315  		// result: (LE cmp yes no)
 25316  		for b.Controls[0].Op == OpARM64InvertFlags {
 25317  			v_0 := b.Controls[0]
 25318  			cmp := v_0.Args[0]
 25319  			b.resetWithControl(BlockARM64LE, cmp)
 25320  			return true
 25321  		}
 25322  	case BlockARM64GEnoov:
 25323  		// match: (GEnoov (FlagConstant [fc]) yes no)
 25324  		// cond: fc.geNoov()
 25325  		// result: (First yes no)
 25326  		for b.Controls[0].Op == OpARM64FlagConstant {
 25327  			v_0 := b.Controls[0]
 25328  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25329  			if !(fc.geNoov()) {
 25330  				break
 25331  			}
 25332  			b.Reset(BlockFirst)
 25333  			return true
 25334  		}
 25335  		// match: (GEnoov (FlagConstant [fc]) yes no)
 25336  		// cond: !fc.geNoov()
 25337  		// result: (First no yes)
 25338  		for b.Controls[0].Op == OpARM64FlagConstant {
 25339  			v_0 := b.Controls[0]
 25340  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25341  			if !(!fc.geNoov()) {
 25342  				break
 25343  			}
 25344  			b.Reset(BlockFirst)
 25345  			b.swapSuccessors()
 25346  			return true
 25347  		}
 25348  		// match: (GEnoov (InvertFlags cmp) yes no)
 25349  		// result: (LEnoov cmp yes no)
 25350  		for b.Controls[0].Op == OpARM64InvertFlags {
 25351  			v_0 := b.Controls[0]
 25352  			cmp := v_0.Args[0]
 25353  			b.resetWithControl(BlockARM64LEnoov, cmp)
 25354  			return true
 25355  		}
 25356  	case BlockARM64GT:
 25357  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 25358  		// cond: z.Uses == 1
 25359  		// result: (GT (TST x y) yes no)
 25360  		for b.Controls[0].Op == OpARM64CMPconst {
 25361  			v_0 := b.Controls[0]
 25362  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25363  				break
 25364  			}
 25365  			z := v_0.Args[0]
 25366  			if z.Op != OpARM64AND {
 25367  				break
 25368  			}
 25369  			_ = z.Args[1]
 25370  			z_0 := z.Args[0]
 25371  			z_1 := z.Args[1]
 25372  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25373  				x := z_0
 25374  				y := z_1
 25375  				if !(z.Uses == 1) {
 25376  					continue
 25377  				}
 25378  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25379  				v0.AddArg2(x, y)
 25380  				b.resetWithControl(BlockARM64GT, v0)
 25381  				return true
 25382  			}
 25383  			break
 25384  		}
 25385  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25386  		// cond: x.Uses == 1
 25387  		// result: (GT (TSTconst [c] y) yes no)
 25388  		for b.Controls[0].Op == OpARM64CMPconst {
 25389  			v_0 := b.Controls[0]
 25390  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25391  				break
 25392  			}
 25393  			x := v_0.Args[0]
 25394  			if x.Op != OpARM64ANDconst {
 25395  				break
 25396  			}
 25397  			c := auxIntToInt64(x.AuxInt)
 25398  			y := x.Args[0]
 25399  			if !(x.Uses == 1) {
 25400  				break
 25401  			}
 25402  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25403  			v0.AuxInt = int64ToAuxInt(c)
 25404  			v0.AddArg(y)
 25405  			b.resetWithControl(BlockARM64GT, v0)
 25406  			return true
 25407  		}
 25408  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 25409  		// cond: z.Uses == 1
 25410  		// result: (GT (TSTW x y) yes no)
 25411  		for b.Controls[0].Op == OpARM64CMPWconst {
 25412  			v_0 := b.Controls[0]
 25413  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25414  				break
 25415  			}
 25416  			z := v_0.Args[0]
 25417  			if z.Op != OpARM64AND {
 25418  				break
 25419  			}
 25420  			_ = z.Args[1]
 25421  			z_0 := z.Args[0]
 25422  			z_1 := z.Args[1]
 25423  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25424  				x := z_0
 25425  				y := z_1
 25426  				if !(z.Uses == 1) {
 25427  					continue
 25428  				}
 25429  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25430  				v0.AddArg2(x, y)
 25431  				b.resetWithControl(BlockARM64GT, v0)
 25432  				return true
 25433  			}
 25434  			break
 25435  		}
 25436  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25437  		// cond: x.Uses == 1
 25438  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 25439  		for b.Controls[0].Op == OpARM64CMPWconst {
 25440  			v_0 := b.Controls[0]
 25441  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25442  				break
 25443  			}
 25444  			x := v_0.Args[0]
 25445  			if x.Op != OpARM64ANDconst {
 25446  				break
 25447  			}
 25448  			c := auxIntToInt64(x.AuxInt)
 25449  			y := x.Args[0]
 25450  			if !(x.Uses == 1) {
 25451  				break
 25452  			}
 25453  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25454  			v0.AuxInt = int32ToAuxInt(int32(c))
 25455  			v0.AddArg(y)
 25456  			b.resetWithControl(BlockARM64GT, v0)
 25457  			return true
 25458  		}
 25459  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25460  		// cond: x.Uses == 1
 25461  		// result: (GTnoov (CMNconst [c] y) yes no)
 25462  		for b.Controls[0].Op == OpARM64CMPconst {
 25463  			v_0 := b.Controls[0]
 25464  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25465  				break
 25466  			}
 25467  			x := v_0.Args[0]
 25468  			if x.Op != OpARM64ADDconst {
 25469  				break
 25470  			}
 25471  			c := auxIntToInt64(x.AuxInt)
 25472  			y := x.Args[0]
 25473  			if !(x.Uses == 1) {
 25474  				break
 25475  			}
 25476  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25477  			v0.AuxInt = int64ToAuxInt(c)
 25478  			v0.AddArg(y)
 25479  			b.resetWithControl(BlockARM64GTnoov, v0)
 25480  			return true
 25481  		}
 25482  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25483  		// cond: x.Uses == 1
 25484  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 25485  		for b.Controls[0].Op == OpARM64CMPWconst {
 25486  			v_0 := b.Controls[0]
 25487  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25488  				break
 25489  			}
 25490  			x := v_0.Args[0]
 25491  			if x.Op != OpARM64ADDconst {
 25492  				break
 25493  			}
 25494  			c := auxIntToInt64(x.AuxInt)
 25495  			y := x.Args[0]
 25496  			if !(x.Uses == 1) {
 25497  				break
 25498  			}
 25499  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25500  			v0.AuxInt = int32ToAuxInt(int32(c))
 25501  			v0.AddArg(y)
 25502  			b.resetWithControl(BlockARM64GTnoov, v0)
 25503  			return true
 25504  		}
 25505  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 25506  		// cond: z.Uses == 1
 25507  		// result: (GTnoov (CMN x y) yes no)
 25508  		for b.Controls[0].Op == OpARM64CMPconst {
 25509  			v_0 := b.Controls[0]
 25510  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25511  				break
 25512  			}
 25513  			z := v_0.Args[0]
 25514  			if z.Op != OpARM64ADD {
 25515  				break
 25516  			}
 25517  			_ = z.Args[1]
 25518  			z_0 := z.Args[0]
 25519  			z_1 := z.Args[1]
 25520  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25521  				x := z_0
 25522  				y := z_1
 25523  				if !(z.Uses == 1) {
 25524  					continue
 25525  				}
 25526  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25527  				v0.AddArg2(x, y)
 25528  				b.resetWithControl(BlockARM64GTnoov, v0)
 25529  				return true
 25530  			}
 25531  			break
 25532  		}
 25533  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 25534  		// cond: z.Uses == 1
 25535  		// result: (GTnoov (CMNW x y) yes no)
 25536  		for b.Controls[0].Op == OpARM64CMPWconst {
 25537  			v_0 := b.Controls[0]
 25538  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25539  				break
 25540  			}
 25541  			z := v_0.Args[0]
 25542  			if z.Op != OpARM64ADD {
 25543  				break
 25544  			}
 25545  			_ = z.Args[1]
 25546  			z_0 := z.Args[0]
 25547  			z_1 := z.Args[1]
 25548  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25549  				x := z_0
 25550  				y := z_1
 25551  				if !(z.Uses == 1) {
 25552  					continue
 25553  				}
 25554  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25555  				v0.AddArg2(x, y)
 25556  				b.resetWithControl(BlockARM64GTnoov, v0)
 25557  				return true
 25558  			}
 25559  			break
 25560  		}
 25561  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 25562  		// cond: z.Uses==1
 25563  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 25564  		for b.Controls[0].Op == OpARM64CMPconst {
 25565  			v_0 := b.Controls[0]
 25566  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25567  				break
 25568  			}
 25569  			z := v_0.Args[0]
 25570  			if z.Op != OpARM64MADD {
 25571  				break
 25572  			}
 25573  			y := z.Args[2]
 25574  			a := z.Args[0]
 25575  			x := z.Args[1]
 25576  			if !(z.Uses == 1) {
 25577  				break
 25578  			}
 25579  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25580  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25581  			v1.AddArg2(x, y)
 25582  			v0.AddArg2(a, v1)
 25583  			b.resetWithControl(BlockARM64GTnoov, v0)
 25584  			return true
 25585  		}
 25586  		// match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
 25587  		// cond: z.Uses==1
 25588  		// result: (GTnoov (CMP a (MUL <x.Type> x y)) yes no)
 25589  		for b.Controls[0].Op == OpARM64CMPconst {
 25590  			v_0 := b.Controls[0]
 25591  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25592  				break
 25593  			}
 25594  			z := v_0.Args[0]
 25595  			if z.Op != OpARM64MSUB {
 25596  				break
 25597  			}
 25598  			y := z.Args[2]
 25599  			a := z.Args[0]
 25600  			x := z.Args[1]
 25601  			if !(z.Uses == 1) {
 25602  				break
 25603  			}
 25604  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 25605  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25606  			v1.AddArg2(x, y)
 25607  			v0.AddArg2(a, v1)
 25608  			b.resetWithControl(BlockARM64GTnoov, v0)
 25609  			return true
 25610  		}
 25611  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 25612  		// cond: z.Uses==1
 25613  		// result: (GTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25614  		for b.Controls[0].Op == OpARM64CMPWconst {
 25615  			v_0 := b.Controls[0]
 25616  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25617  				break
 25618  			}
 25619  			z := v_0.Args[0]
 25620  			if z.Op != OpARM64MADDW {
 25621  				break
 25622  			}
 25623  			y := z.Args[2]
 25624  			a := z.Args[0]
 25625  			x := z.Args[1]
 25626  			if !(z.Uses == 1) {
 25627  				break
 25628  			}
 25629  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25630  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25631  			v1.AddArg2(x, y)
 25632  			v0.AddArg2(a, v1)
 25633  			b.resetWithControl(BlockARM64GTnoov, v0)
 25634  			return true
 25635  		}
 25636  		// match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 25637  		// cond: z.Uses==1
 25638  		// result: (GTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 25639  		for b.Controls[0].Op == OpARM64CMPWconst {
 25640  			v_0 := b.Controls[0]
 25641  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25642  				break
 25643  			}
 25644  			z := v_0.Args[0]
 25645  			if z.Op != OpARM64MSUBW {
 25646  				break
 25647  			}
 25648  			y := z.Args[2]
 25649  			a := z.Args[0]
 25650  			x := z.Args[1]
 25651  			if !(z.Uses == 1) {
 25652  				break
 25653  			}
 25654  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 25655  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25656  			v1.AddArg2(x, y)
 25657  			v0.AddArg2(a, v1)
 25658  			b.resetWithControl(BlockARM64GTnoov, v0)
 25659  			return true
 25660  		}
 25661  		// match: (GT (FlagConstant [fc]) yes no)
 25662  		// cond: fc.gt()
 25663  		// result: (First yes no)
 25664  		for b.Controls[0].Op == OpARM64FlagConstant {
 25665  			v_0 := b.Controls[0]
 25666  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25667  			if !(fc.gt()) {
 25668  				break
 25669  			}
 25670  			b.Reset(BlockFirst)
 25671  			return true
 25672  		}
 25673  		// match: (GT (FlagConstant [fc]) yes no)
 25674  		// cond: !fc.gt()
 25675  		// result: (First no yes)
 25676  		for b.Controls[0].Op == OpARM64FlagConstant {
 25677  			v_0 := b.Controls[0]
 25678  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25679  			if !(!fc.gt()) {
 25680  				break
 25681  			}
 25682  			b.Reset(BlockFirst)
 25683  			b.swapSuccessors()
 25684  			return true
 25685  		}
 25686  		// match: (GT (InvertFlags cmp) yes no)
 25687  		// result: (LT cmp yes no)
 25688  		for b.Controls[0].Op == OpARM64InvertFlags {
 25689  			v_0 := b.Controls[0]
 25690  			cmp := v_0.Args[0]
 25691  			b.resetWithControl(BlockARM64LT, cmp)
 25692  			return true
 25693  		}
 25694  	case BlockARM64GTnoov:
 25695  		// match: (GTnoov (FlagConstant [fc]) yes no)
 25696  		// cond: fc.gtNoov()
 25697  		// result: (First yes no)
 25698  		for b.Controls[0].Op == OpARM64FlagConstant {
 25699  			v_0 := b.Controls[0]
 25700  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25701  			if !(fc.gtNoov()) {
 25702  				break
 25703  			}
 25704  			b.Reset(BlockFirst)
 25705  			return true
 25706  		}
 25707  		// match: (GTnoov (FlagConstant [fc]) yes no)
 25708  		// cond: !fc.gtNoov()
 25709  		// result: (First no yes)
 25710  		for b.Controls[0].Op == OpARM64FlagConstant {
 25711  			v_0 := b.Controls[0]
 25712  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25713  			if !(!fc.gtNoov()) {
 25714  				break
 25715  			}
 25716  			b.Reset(BlockFirst)
 25717  			b.swapSuccessors()
 25718  			return true
 25719  		}
 25720  		// match: (GTnoov (InvertFlags cmp) yes no)
 25721  		// result: (LTnoov cmp yes no)
 25722  		for b.Controls[0].Op == OpARM64InvertFlags {
 25723  			v_0 := b.Controls[0]
 25724  			cmp := v_0.Args[0]
 25725  			b.resetWithControl(BlockARM64LTnoov, cmp)
 25726  			return true
 25727  		}
 25728  	case BlockIf:
 25729  		// match: (If (Equal cc) yes no)
 25730  		// result: (EQ cc yes no)
 25731  		for b.Controls[0].Op == OpARM64Equal {
 25732  			v_0 := b.Controls[0]
 25733  			cc := v_0.Args[0]
 25734  			b.resetWithControl(BlockARM64EQ, cc)
 25735  			return true
 25736  		}
 25737  		// match: (If (NotEqual cc) yes no)
 25738  		// result: (NE cc yes no)
 25739  		for b.Controls[0].Op == OpARM64NotEqual {
 25740  			v_0 := b.Controls[0]
 25741  			cc := v_0.Args[0]
 25742  			b.resetWithControl(BlockARM64NE, cc)
 25743  			return true
 25744  		}
 25745  		// match: (If (LessThan cc) yes no)
 25746  		// result: (LT cc yes no)
 25747  		for b.Controls[0].Op == OpARM64LessThan {
 25748  			v_0 := b.Controls[0]
 25749  			cc := v_0.Args[0]
 25750  			b.resetWithControl(BlockARM64LT, cc)
 25751  			return true
 25752  		}
 25753  		// match: (If (LessThanU cc) yes no)
 25754  		// result: (ULT cc yes no)
 25755  		for b.Controls[0].Op == OpARM64LessThanU {
 25756  			v_0 := b.Controls[0]
 25757  			cc := v_0.Args[0]
 25758  			b.resetWithControl(BlockARM64ULT, cc)
 25759  			return true
 25760  		}
 25761  		// match: (If (LessEqual cc) yes no)
 25762  		// result: (LE cc yes no)
 25763  		for b.Controls[0].Op == OpARM64LessEqual {
 25764  			v_0 := b.Controls[0]
 25765  			cc := v_0.Args[0]
 25766  			b.resetWithControl(BlockARM64LE, cc)
 25767  			return true
 25768  		}
 25769  		// match: (If (LessEqualU cc) yes no)
 25770  		// result: (ULE cc yes no)
 25771  		for b.Controls[0].Op == OpARM64LessEqualU {
 25772  			v_0 := b.Controls[0]
 25773  			cc := v_0.Args[0]
 25774  			b.resetWithControl(BlockARM64ULE, cc)
 25775  			return true
 25776  		}
 25777  		// match: (If (GreaterThan cc) yes no)
 25778  		// result: (GT cc yes no)
 25779  		for b.Controls[0].Op == OpARM64GreaterThan {
 25780  			v_0 := b.Controls[0]
 25781  			cc := v_0.Args[0]
 25782  			b.resetWithControl(BlockARM64GT, cc)
 25783  			return true
 25784  		}
 25785  		// match: (If (GreaterThanU cc) yes no)
 25786  		// result: (UGT cc yes no)
 25787  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25788  			v_0 := b.Controls[0]
 25789  			cc := v_0.Args[0]
 25790  			b.resetWithControl(BlockARM64UGT, cc)
 25791  			return true
 25792  		}
 25793  		// match: (If (GreaterEqual cc) yes no)
 25794  		// result: (GE cc yes no)
 25795  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25796  			v_0 := b.Controls[0]
 25797  			cc := v_0.Args[0]
 25798  			b.resetWithControl(BlockARM64GE, cc)
 25799  			return true
 25800  		}
 25801  		// match: (If (GreaterEqualU cc) yes no)
 25802  		// result: (UGE cc yes no)
 25803  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25804  			v_0 := b.Controls[0]
 25805  			cc := v_0.Args[0]
 25806  			b.resetWithControl(BlockARM64UGE, cc)
 25807  			return true
 25808  		}
 25809  		// match: (If (LessThanF cc) yes no)
 25810  		// result: (FLT cc yes no)
 25811  		for b.Controls[0].Op == OpARM64LessThanF {
 25812  			v_0 := b.Controls[0]
 25813  			cc := v_0.Args[0]
 25814  			b.resetWithControl(BlockARM64FLT, cc)
 25815  			return true
 25816  		}
 25817  		// match: (If (LessEqualF cc) yes no)
 25818  		// result: (FLE cc yes no)
 25819  		for b.Controls[0].Op == OpARM64LessEqualF {
 25820  			v_0 := b.Controls[0]
 25821  			cc := v_0.Args[0]
 25822  			b.resetWithControl(BlockARM64FLE, cc)
 25823  			return true
 25824  		}
 25825  		// match: (If (GreaterThanF cc) yes no)
 25826  		// result: (FGT cc yes no)
 25827  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25828  			v_0 := b.Controls[0]
 25829  			cc := v_0.Args[0]
 25830  			b.resetWithControl(BlockARM64FGT, cc)
 25831  			return true
 25832  		}
 25833  		// match: (If (GreaterEqualF cc) yes no)
 25834  		// result: (FGE cc yes no)
 25835  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25836  			v_0 := b.Controls[0]
 25837  			cc := v_0.Args[0]
 25838  			b.resetWithControl(BlockARM64FGE, cc)
 25839  			return true
 25840  		}
 25841  		// match: (If cond yes no)
 25842  		// result: (TBNZ [0] cond yes no)
 25843  		for {
 25844  			cond := b.Controls[0]
 25845  			b.resetWithControl(BlockARM64TBNZ, cond)
 25846  			b.AuxInt = int64ToAuxInt(0)
 25847  			return true
 25848  		}
 25849  	case BlockJumpTable:
 25850  		// match: (JumpTable idx)
 25851  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 25852  		for {
 25853  			idx := b.Controls[0]
 25854  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 25855  			v0.Aux = symToAux(makeJumpTableSym(b))
 25856  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 25857  			v0.AddArg(v1)
 25858  			b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
 25859  			b.Aux = symToAux(makeJumpTableSym(b))
 25860  			return true
 25861  		}
 25862  	case BlockARM64LE:
 25863  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 25864  		// cond: z.Uses == 1
 25865  		// result: (LE (TST x y) yes no)
 25866  		for b.Controls[0].Op == OpARM64CMPconst {
 25867  			v_0 := b.Controls[0]
 25868  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25869  				break
 25870  			}
 25871  			z := v_0.Args[0]
 25872  			if z.Op != OpARM64AND {
 25873  				break
 25874  			}
 25875  			_ = z.Args[1]
 25876  			z_0 := z.Args[0]
 25877  			z_1 := z.Args[1]
 25878  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25879  				x := z_0
 25880  				y := z_1
 25881  				if !(z.Uses == 1) {
 25882  					continue
 25883  				}
 25884  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25885  				v0.AddArg2(x, y)
 25886  				b.resetWithControl(BlockARM64LE, v0)
 25887  				return true
 25888  			}
 25889  			break
 25890  		}
 25891  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25892  		// cond: x.Uses == 1
 25893  		// result: (LE (TSTconst [c] y) yes no)
 25894  		for b.Controls[0].Op == OpARM64CMPconst {
 25895  			v_0 := b.Controls[0]
 25896  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25897  				break
 25898  			}
 25899  			x := v_0.Args[0]
 25900  			if x.Op != OpARM64ANDconst {
 25901  				break
 25902  			}
 25903  			c := auxIntToInt64(x.AuxInt)
 25904  			y := x.Args[0]
 25905  			if !(x.Uses == 1) {
 25906  				break
 25907  			}
 25908  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25909  			v0.AuxInt = int64ToAuxInt(c)
 25910  			v0.AddArg(y)
 25911  			b.resetWithControl(BlockARM64LE, v0)
 25912  			return true
 25913  		}
 25914  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 25915  		// cond: z.Uses == 1
 25916  		// result: (LE (TSTW x y) yes no)
 25917  		for b.Controls[0].Op == OpARM64CMPWconst {
 25918  			v_0 := b.Controls[0]
 25919  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25920  				break
 25921  			}
 25922  			z := v_0.Args[0]
 25923  			if z.Op != OpARM64AND {
 25924  				break
 25925  			}
 25926  			_ = z.Args[1]
 25927  			z_0 := z.Args[0]
 25928  			z_1 := z.Args[1]
 25929  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25930  				x := z_0
 25931  				y := z_1
 25932  				if !(z.Uses == 1) {
 25933  					continue
 25934  				}
 25935  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25936  				v0.AddArg2(x, y)
 25937  				b.resetWithControl(BlockARM64LE, v0)
 25938  				return true
 25939  			}
 25940  			break
 25941  		}
 25942  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25943  		// cond: x.Uses == 1
 25944  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 25945  		for b.Controls[0].Op == OpARM64CMPWconst {
 25946  			v_0 := b.Controls[0]
 25947  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25948  				break
 25949  			}
 25950  			x := v_0.Args[0]
 25951  			if x.Op != OpARM64ANDconst {
 25952  				break
 25953  			}
 25954  			c := auxIntToInt64(x.AuxInt)
 25955  			y := x.Args[0]
 25956  			if !(x.Uses == 1) {
 25957  				break
 25958  			}
 25959  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25960  			v0.AuxInt = int32ToAuxInt(int32(c))
 25961  			v0.AddArg(y)
 25962  			b.resetWithControl(BlockARM64LE, v0)
 25963  			return true
 25964  		}
 25965  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25966  		// cond: x.Uses == 1
 25967  		// result: (LEnoov (CMNconst [c] y) yes no)
 25968  		for b.Controls[0].Op == OpARM64CMPconst {
 25969  			v_0 := b.Controls[0]
 25970  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25971  				break
 25972  			}
 25973  			x := v_0.Args[0]
 25974  			if x.Op != OpARM64ADDconst {
 25975  				break
 25976  			}
 25977  			c := auxIntToInt64(x.AuxInt)
 25978  			y := x.Args[0]
 25979  			if !(x.Uses == 1) {
 25980  				break
 25981  			}
 25982  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25983  			v0.AuxInt = int64ToAuxInt(c)
 25984  			v0.AddArg(y)
 25985  			b.resetWithControl(BlockARM64LEnoov, v0)
 25986  			return true
 25987  		}
 25988  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25989  		// cond: x.Uses == 1
 25990  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 25991  		for b.Controls[0].Op == OpARM64CMPWconst {
 25992  			v_0 := b.Controls[0]
 25993  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25994  				break
 25995  			}
 25996  			x := v_0.Args[0]
 25997  			if x.Op != OpARM64ADDconst {
 25998  				break
 25999  			}
 26000  			c := auxIntToInt64(x.AuxInt)
 26001  			y := x.Args[0]
 26002  			if !(x.Uses == 1) {
 26003  				break
 26004  			}
 26005  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26006  			v0.AuxInt = int32ToAuxInt(int32(c))
 26007  			v0.AddArg(y)
 26008  			b.resetWithControl(BlockARM64LEnoov, v0)
 26009  			return true
 26010  		}
 26011  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 26012  		// cond: z.Uses == 1
 26013  		// result: (LEnoov (CMN x y) yes no)
 26014  		for b.Controls[0].Op == OpARM64CMPconst {
 26015  			v_0 := b.Controls[0]
 26016  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26017  				break
 26018  			}
 26019  			z := v_0.Args[0]
 26020  			if z.Op != OpARM64ADD {
 26021  				break
 26022  			}
 26023  			_ = z.Args[1]
 26024  			z_0 := z.Args[0]
 26025  			z_1 := z.Args[1]
 26026  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26027  				x := z_0
 26028  				y := z_1
 26029  				if !(z.Uses == 1) {
 26030  					continue
 26031  				}
 26032  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26033  				v0.AddArg2(x, y)
 26034  				b.resetWithControl(BlockARM64LEnoov, v0)
 26035  				return true
 26036  			}
 26037  			break
 26038  		}
 26039  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 26040  		// cond: z.Uses == 1
 26041  		// result: (LEnoov (CMNW x y) yes no)
 26042  		for b.Controls[0].Op == OpARM64CMPWconst {
 26043  			v_0 := b.Controls[0]
 26044  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26045  				break
 26046  			}
 26047  			z := v_0.Args[0]
 26048  			if z.Op != OpARM64ADD {
 26049  				break
 26050  			}
 26051  			_ = z.Args[1]
 26052  			z_0 := z.Args[0]
 26053  			z_1 := z.Args[1]
 26054  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26055  				x := z_0
 26056  				y := z_1
 26057  				if !(z.Uses == 1) {
 26058  					continue
 26059  				}
 26060  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26061  				v0.AddArg2(x, y)
 26062  				b.resetWithControl(BlockARM64LEnoov, v0)
 26063  				return true
 26064  			}
 26065  			break
 26066  		}
 26067  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 26068  		// cond: z.Uses==1
 26069  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 26070  		for b.Controls[0].Op == OpARM64CMPconst {
 26071  			v_0 := b.Controls[0]
 26072  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26073  				break
 26074  			}
 26075  			z := v_0.Args[0]
 26076  			if z.Op != OpARM64MADD {
 26077  				break
 26078  			}
 26079  			y := z.Args[2]
 26080  			a := z.Args[0]
 26081  			x := z.Args[1]
 26082  			if !(z.Uses == 1) {
 26083  				break
 26084  			}
 26085  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26086  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26087  			v1.AddArg2(x, y)
 26088  			v0.AddArg2(a, v1)
 26089  			b.resetWithControl(BlockARM64LEnoov, v0)
 26090  			return true
 26091  		}
 26092  		// match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
 26093  		// cond: z.Uses==1
 26094  		// result: (LEnoov (CMP a (MUL <x.Type> x y)) yes no)
 26095  		for b.Controls[0].Op == OpARM64CMPconst {
 26096  			v_0 := b.Controls[0]
 26097  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26098  				break
 26099  			}
 26100  			z := v_0.Args[0]
 26101  			if z.Op != OpARM64MSUB {
 26102  				break
 26103  			}
 26104  			y := z.Args[2]
 26105  			a := z.Args[0]
 26106  			x := z.Args[1]
 26107  			if !(z.Uses == 1) {
 26108  				break
 26109  			}
 26110  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 26111  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26112  			v1.AddArg2(x, y)
 26113  			v0.AddArg2(a, v1)
 26114  			b.resetWithControl(BlockARM64LEnoov, v0)
 26115  			return true
 26116  		}
 26117  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 26118  		// cond: z.Uses==1
 26119  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 26120  		for b.Controls[0].Op == OpARM64CMPWconst {
 26121  			v_0 := b.Controls[0]
 26122  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26123  				break
 26124  			}
 26125  			z := v_0.Args[0]
 26126  			if z.Op != OpARM64MADDW {
 26127  				break
 26128  			}
 26129  			y := z.Args[2]
 26130  			a := z.Args[0]
 26131  			x := z.Args[1]
 26132  			if !(z.Uses == 1) {
 26133  				break
 26134  			}
 26135  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26136  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26137  			v1.AddArg2(x, y)
 26138  			v0.AddArg2(a, v1)
 26139  			b.resetWithControl(BlockARM64LEnoov, v0)
 26140  			return true
 26141  		}
 26142  		// match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 26143  		// cond: z.Uses==1
 26144  		// result: (LEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 26145  		for b.Controls[0].Op == OpARM64CMPWconst {
 26146  			v_0 := b.Controls[0]
 26147  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26148  				break
 26149  			}
 26150  			z := v_0.Args[0]
 26151  			if z.Op != OpARM64MSUBW {
 26152  				break
 26153  			}
 26154  			y := z.Args[2]
 26155  			a := z.Args[0]
 26156  			x := z.Args[1]
 26157  			if !(z.Uses == 1) {
 26158  				break
 26159  			}
 26160  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 26161  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26162  			v1.AddArg2(x, y)
 26163  			v0.AddArg2(a, v1)
 26164  			b.resetWithControl(BlockARM64LEnoov, v0)
 26165  			return true
 26166  		}
 26167  		// match: (LE (FlagConstant [fc]) yes no)
 26168  		// cond: fc.le()
 26169  		// result: (First yes no)
 26170  		for b.Controls[0].Op == OpARM64FlagConstant {
 26171  			v_0 := b.Controls[0]
 26172  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26173  			if !(fc.le()) {
 26174  				break
 26175  			}
 26176  			b.Reset(BlockFirst)
 26177  			return true
 26178  		}
 26179  		// match: (LE (FlagConstant [fc]) yes no)
 26180  		// cond: !fc.le()
 26181  		// result: (First no yes)
 26182  		for b.Controls[0].Op == OpARM64FlagConstant {
 26183  			v_0 := b.Controls[0]
 26184  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26185  			if !(!fc.le()) {
 26186  				break
 26187  			}
 26188  			b.Reset(BlockFirst)
 26189  			b.swapSuccessors()
 26190  			return true
 26191  		}
 26192  		// match: (LE (InvertFlags cmp) yes no)
 26193  		// result: (GE cmp yes no)
 26194  		for b.Controls[0].Op == OpARM64InvertFlags {
 26195  			v_0 := b.Controls[0]
 26196  			cmp := v_0.Args[0]
 26197  			b.resetWithControl(BlockARM64GE, cmp)
 26198  			return true
 26199  		}
 26200  	case BlockARM64LEnoov:
 26201  		// match: (LEnoov (FlagConstant [fc]) yes no)
 26202  		// cond: fc.leNoov()
 26203  		// result: (First yes no)
 26204  		for b.Controls[0].Op == OpARM64FlagConstant {
 26205  			v_0 := b.Controls[0]
 26206  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26207  			if !(fc.leNoov()) {
 26208  				break
 26209  			}
 26210  			b.Reset(BlockFirst)
 26211  			return true
 26212  		}
 26213  		// match: (LEnoov (FlagConstant [fc]) yes no)
 26214  		// cond: !fc.leNoov()
 26215  		// result: (First no yes)
 26216  		for b.Controls[0].Op == OpARM64FlagConstant {
 26217  			v_0 := b.Controls[0]
 26218  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26219  			if !(!fc.leNoov()) {
 26220  				break
 26221  			}
 26222  			b.Reset(BlockFirst)
 26223  			b.swapSuccessors()
 26224  			return true
 26225  		}
 26226  		// match: (LEnoov (InvertFlags cmp) yes no)
 26227  		// result: (GEnoov cmp yes no)
 26228  		for b.Controls[0].Op == OpARM64InvertFlags {
 26229  			v_0 := b.Controls[0]
 26230  			cmp := v_0.Args[0]
 26231  			b.resetWithControl(BlockARM64GEnoov, cmp)
 26232  			return true
 26233  		}
 26234  	case BlockARM64LT:
 26235  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 26236  		// cond: z.Uses == 1
 26237  		// result: (LT (TST x y) yes no)
 26238  		for b.Controls[0].Op == OpARM64CMPconst {
 26239  			v_0 := b.Controls[0]
 26240  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26241  				break
 26242  			}
 26243  			z := v_0.Args[0]
 26244  			if z.Op != OpARM64AND {
 26245  				break
 26246  			}
 26247  			_ = z.Args[1]
 26248  			z_0 := z.Args[0]
 26249  			z_1 := z.Args[1]
 26250  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26251  				x := z_0
 26252  				y := z_1
 26253  				if !(z.Uses == 1) {
 26254  					continue
 26255  				}
 26256  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 26257  				v0.AddArg2(x, y)
 26258  				b.resetWithControl(BlockARM64LT, v0)
 26259  				return true
 26260  			}
 26261  			break
 26262  		}
 26263  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 26264  		// cond: x.Uses == 1
 26265  		// result: (LT (TSTconst [c] y) yes no)
 26266  		for b.Controls[0].Op == OpARM64CMPconst {
 26267  			v_0 := b.Controls[0]
 26268  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26269  				break
 26270  			}
 26271  			x := v_0.Args[0]
 26272  			if x.Op != OpARM64ANDconst {
 26273  				break
 26274  			}
 26275  			c := auxIntToInt64(x.AuxInt)
 26276  			y := x.Args[0]
 26277  			if !(x.Uses == 1) {
 26278  				break
 26279  			}
 26280  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 26281  			v0.AuxInt = int64ToAuxInt(c)
 26282  			v0.AddArg(y)
 26283  			b.resetWithControl(BlockARM64LT, v0)
 26284  			return true
 26285  		}
 26286  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 26287  		// cond: z.Uses == 1
 26288  		// result: (LT (TSTW x y) yes no)
 26289  		for b.Controls[0].Op == OpARM64CMPWconst {
 26290  			v_0 := b.Controls[0]
 26291  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26292  				break
 26293  			}
 26294  			z := v_0.Args[0]
 26295  			if z.Op != OpARM64AND {
 26296  				break
 26297  			}
 26298  			_ = z.Args[1]
 26299  			z_0 := z.Args[0]
 26300  			z_1 := z.Args[1]
 26301  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26302  				x := z_0
 26303  				y := z_1
 26304  				if !(z.Uses == 1) {
 26305  					continue
 26306  				}
 26307  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 26308  				v0.AddArg2(x, y)
 26309  				b.resetWithControl(BlockARM64LT, v0)
 26310  				return true
 26311  			}
 26312  			break
 26313  		}
 26314  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 26315  		// cond: x.Uses == 1
 26316  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 26317  		for b.Controls[0].Op == OpARM64CMPWconst {
 26318  			v_0 := b.Controls[0]
 26319  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26320  				break
 26321  			}
 26322  			x := v_0.Args[0]
 26323  			if x.Op != OpARM64ANDconst {
 26324  				break
 26325  			}
 26326  			c := auxIntToInt64(x.AuxInt)
 26327  			y := x.Args[0]
 26328  			if !(x.Uses == 1) {
 26329  				break
 26330  			}
 26331  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 26332  			v0.AuxInt = int32ToAuxInt(int32(c))
 26333  			v0.AddArg(y)
 26334  			b.resetWithControl(BlockARM64LT, v0)
 26335  			return true
 26336  		}
 26337  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 26338  		// cond: x.Uses == 1
 26339  		// result: (LTnoov (CMNconst [c] y) yes no)
 26340  		for b.Controls[0].Op == OpARM64CMPconst {
 26341  			v_0 := b.Controls[0]
 26342  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26343  				break
 26344  			}
 26345  			x := v_0.Args[0]
 26346  			if x.Op != OpARM64ADDconst {
 26347  				break
 26348  			}
 26349  			c := auxIntToInt64(x.AuxInt)
 26350  			y := x.Args[0]
 26351  			if !(x.Uses == 1) {
 26352  				break
 26353  			}
 26354  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 26355  			v0.AuxInt = int64ToAuxInt(c)
 26356  			v0.AddArg(y)
 26357  			b.resetWithControl(BlockARM64LTnoov, v0)
 26358  			return true
 26359  		}
 26360  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 26361  		// cond: x.Uses == 1
 26362  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 26363  		for b.Controls[0].Op == OpARM64CMPWconst {
 26364  			v_0 := b.Controls[0]
 26365  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26366  				break
 26367  			}
 26368  			x := v_0.Args[0]
 26369  			if x.Op != OpARM64ADDconst {
 26370  				break
 26371  			}
 26372  			c := auxIntToInt64(x.AuxInt)
 26373  			y := x.Args[0]
 26374  			if !(x.Uses == 1) {
 26375  				break
 26376  			}
 26377  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26378  			v0.AuxInt = int32ToAuxInt(int32(c))
 26379  			v0.AddArg(y)
 26380  			b.resetWithControl(BlockARM64LTnoov, v0)
 26381  			return true
 26382  		}
 26383  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 26384  		// cond: z.Uses == 1
 26385  		// result: (LTnoov (CMN x y) yes no)
 26386  		for b.Controls[0].Op == OpARM64CMPconst {
 26387  			v_0 := b.Controls[0]
 26388  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26389  				break
 26390  			}
 26391  			z := v_0.Args[0]
 26392  			if z.Op != OpARM64ADD {
 26393  				break
 26394  			}
 26395  			_ = z.Args[1]
 26396  			z_0 := z.Args[0]
 26397  			z_1 := z.Args[1]
 26398  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26399  				x := z_0
 26400  				y := z_1
 26401  				if !(z.Uses == 1) {
 26402  					continue
 26403  				}
 26404  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26405  				v0.AddArg2(x, y)
 26406  				b.resetWithControl(BlockARM64LTnoov, v0)
 26407  				return true
 26408  			}
 26409  			break
 26410  		}
 26411  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 26412  		// cond: z.Uses == 1
 26413  		// result: (LTnoov (CMNW x y) yes no)
 26414  		for b.Controls[0].Op == OpARM64CMPWconst {
 26415  			v_0 := b.Controls[0]
 26416  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26417  				break
 26418  			}
 26419  			z := v_0.Args[0]
 26420  			if z.Op != OpARM64ADD {
 26421  				break
 26422  			}
 26423  			_ = z.Args[1]
 26424  			z_0 := z.Args[0]
 26425  			z_1 := z.Args[1]
 26426  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26427  				x := z_0
 26428  				y := z_1
 26429  				if !(z.Uses == 1) {
 26430  					continue
 26431  				}
 26432  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26433  				v0.AddArg2(x, y)
 26434  				b.resetWithControl(BlockARM64LTnoov, v0)
 26435  				return true
 26436  			}
 26437  			break
 26438  		}
 26439  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 26440  		// cond: z.Uses==1
 26441  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 26442  		for b.Controls[0].Op == OpARM64CMPconst {
 26443  			v_0 := b.Controls[0]
 26444  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26445  				break
 26446  			}
 26447  			z := v_0.Args[0]
 26448  			if z.Op != OpARM64MADD {
 26449  				break
 26450  			}
 26451  			y := z.Args[2]
 26452  			a := z.Args[0]
 26453  			x := z.Args[1]
 26454  			if !(z.Uses == 1) {
 26455  				break
 26456  			}
 26457  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26458  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26459  			v1.AddArg2(x, y)
 26460  			v0.AddArg2(a, v1)
 26461  			b.resetWithControl(BlockARM64LTnoov, v0)
 26462  			return true
 26463  		}
 26464  		// match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
 26465  		// cond: z.Uses==1
 26466  		// result: (LTnoov (CMP a (MUL <x.Type> x y)) yes no)
 26467  		for b.Controls[0].Op == OpARM64CMPconst {
 26468  			v_0 := b.Controls[0]
 26469  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26470  				break
 26471  			}
 26472  			z := v_0.Args[0]
 26473  			if z.Op != OpARM64MSUB {
 26474  				break
 26475  			}
 26476  			y := z.Args[2]
 26477  			a := z.Args[0]
 26478  			x := z.Args[1]
 26479  			if !(z.Uses == 1) {
 26480  				break
 26481  			}
 26482  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 26483  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26484  			v1.AddArg2(x, y)
 26485  			v0.AddArg2(a, v1)
 26486  			b.resetWithControl(BlockARM64LTnoov, v0)
 26487  			return true
 26488  		}
 26489  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 26490  		// cond: z.Uses==1
 26491  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 26492  		for b.Controls[0].Op == OpARM64CMPWconst {
 26493  			v_0 := b.Controls[0]
 26494  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26495  				break
 26496  			}
 26497  			z := v_0.Args[0]
 26498  			if z.Op != OpARM64MADDW {
 26499  				break
 26500  			}
 26501  			y := z.Args[2]
 26502  			a := z.Args[0]
 26503  			x := z.Args[1]
 26504  			if !(z.Uses == 1) {
 26505  				break
 26506  			}
 26507  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26508  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26509  			v1.AddArg2(x, y)
 26510  			v0.AddArg2(a, v1)
 26511  			b.resetWithControl(BlockARM64LTnoov, v0)
 26512  			return true
 26513  		}
 26514  		// match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 26515  		// cond: z.Uses==1
 26516  		// result: (LTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 26517  		for b.Controls[0].Op == OpARM64CMPWconst {
 26518  			v_0 := b.Controls[0]
 26519  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26520  				break
 26521  			}
 26522  			z := v_0.Args[0]
 26523  			if z.Op != OpARM64MSUBW {
 26524  				break
 26525  			}
 26526  			y := z.Args[2]
 26527  			a := z.Args[0]
 26528  			x := z.Args[1]
 26529  			if !(z.Uses == 1) {
 26530  				break
 26531  			}
 26532  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 26533  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26534  			v1.AddArg2(x, y)
 26535  			v0.AddArg2(a, v1)
 26536  			b.resetWithControl(BlockARM64LTnoov, v0)
 26537  			return true
 26538  		}
 26539  		// match: (LT (CMPWconst [0] x) yes no)
 26540  		// result: (TBNZ [31] x yes no)
 26541  		for b.Controls[0].Op == OpARM64CMPWconst {
 26542  			v_0 := b.Controls[0]
 26543  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26544  				break
 26545  			}
 26546  			x := v_0.Args[0]
 26547  			b.resetWithControl(BlockARM64TBNZ, x)
 26548  			b.AuxInt = int64ToAuxInt(31)
 26549  			return true
 26550  		}
 26551  		// match: (LT (CMPconst [0] x) yes no)
 26552  		// result: (TBNZ [63] x yes no)
 26553  		for b.Controls[0].Op == OpARM64CMPconst {
 26554  			v_0 := b.Controls[0]
 26555  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26556  				break
 26557  			}
 26558  			x := v_0.Args[0]
 26559  			b.resetWithControl(BlockARM64TBNZ, x)
 26560  			b.AuxInt = int64ToAuxInt(63)
 26561  			return true
 26562  		}
 26563  		// match: (LT (FlagConstant [fc]) yes no)
 26564  		// cond: fc.lt()
 26565  		// result: (First yes no)
 26566  		for b.Controls[0].Op == OpARM64FlagConstant {
 26567  			v_0 := b.Controls[0]
 26568  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26569  			if !(fc.lt()) {
 26570  				break
 26571  			}
 26572  			b.Reset(BlockFirst)
 26573  			return true
 26574  		}
 26575  		// match: (LT (FlagConstant [fc]) yes no)
 26576  		// cond: !fc.lt()
 26577  		// result: (First no yes)
 26578  		for b.Controls[0].Op == OpARM64FlagConstant {
 26579  			v_0 := b.Controls[0]
 26580  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26581  			if !(!fc.lt()) {
 26582  				break
 26583  			}
 26584  			b.Reset(BlockFirst)
 26585  			b.swapSuccessors()
 26586  			return true
 26587  		}
 26588  		// match: (LT (InvertFlags cmp) yes no)
 26589  		// result: (GT cmp yes no)
 26590  		for b.Controls[0].Op == OpARM64InvertFlags {
 26591  			v_0 := b.Controls[0]
 26592  			cmp := v_0.Args[0]
 26593  			b.resetWithControl(BlockARM64GT, cmp)
 26594  			return true
 26595  		}
 26596  	case BlockARM64LTnoov:
 26597  		// match: (LTnoov (FlagConstant [fc]) yes no)
 26598  		// cond: fc.ltNoov()
 26599  		// result: (First yes no)
 26600  		for b.Controls[0].Op == OpARM64FlagConstant {
 26601  			v_0 := b.Controls[0]
 26602  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26603  			if !(fc.ltNoov()) {
 26604  				break
 26605  			}
 26606  			b.Reset(BlockFirst)
 26607  			return true
 26608  		}
 26609  		// match: (LTnoov (FlagConstant [fc]) yes no)
 26610  		// cond: !fc.ltNoov()
 26611  		// result: (First no yes)
 26612  		for b.Controls[0].Op == OpARM64FlagConstant {
 26613  			v_0 := b.Controls[0]
 26614  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26615  			if !(!fc.ltNoov()) {
 26616  				break
 26617  			}
 26618  			b.Reset(BlockFirst)
 26619  			b.swapSuccessors()
 26620  			return true
 26621  		}
 26622  		// match: (LTnoov (InvertFlags cmp) yes no)
 26623  		// result: (GTnoov cmp yes no)
 26624  		for b.Controls[0].Op == OpARM64InvertFlags {
 26625  			v_0 := b.Controls[0]
 26626  			cmp := v_0.Args[0]
 26627  			b.resetWithControl(BlockARM64GTnoov, cmp)
 26628  			return true
 26629  		}
 26630  	case BlockARM64NE:
 26631  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 26632  		// cond: z.Uses == 1
 26633  		// result: (NE (TST x y) yes no)
 26634  		for b.Controls[0].Op == OpARM64CMPconst {
 26635  			v_0 := b.Controls[0]
 26636  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26637  				break
 26638  			}
 26639  			z := v_0.Args[0]
 26640  			if z.Op != OpARM64AND {
 26641  				break
 26642  			}
 26643  			_ = z.Args[1]
 26644  			z_0 := z.Args[0]
 26645  			z_1 := z.Args[1]
 26646  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26647  				x := z_0
 26648  				y := z_1
 26649  				if !(z.Uses == 1) {
 26650  					continue
 26651  				}
 26652  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 26653  				v0.AddArg2(x, y)
 26654  				b.resetWithControl(BlockARM64NE, v0)
 26655  				return true
 26656  			}
 26657  			break
 26658  		}
 26659  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 26660  		// cond: x.Uses == 1
 26661  		// result: (NE (TSTconst [c] y) yes no)
 26662  		for b.Controls[0].Op == OpARM64CMPconst {
 26663  			v_0 := b.Controls[0]
 26664  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26665  				break
 26666  			}
 26667  			x := v_0.Args[0]
 26668  			if x.Op != OpARM64ANDconst {
 26669  				break
 26670  			}
 26671  			c := auxIntToInt64(x.AuxInt)
 26672  			y := x.Args[0]
 26673  			if !(x.Uses == 1) {
 26674  				break
 26675  			}
 26676  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 26677  			v0.AuxInt = int64ToAuxInt(c)
 26678  			v0.AddArg(y)
 26679  			b.resetWithControl(BlockARM64NE, v0)
 26680  			return true
 26681  		}
 26682  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 26683  		// cond: z.Uses == 1
 26684  		// result: (NE (TSTW x y) yes no)
 26685  		for b.Controls[0].Op == OpARM64CMPWconst {
 26686  			v_0 := b.Controls[0]
 26687  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26688  				break
 26689  			}
 26690  			z := v_0.Args[0]
 26691  			if z.Op != OpARM64AND {
 26692  				break
 26693  			}
 26694  			_ = z.Args[1]
 26695  			z_0 := z.Args[0]
 26696  			z_1 := z.Args[1]
 26697  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26698  				x := z_0
 26699  				y := z_1
 26700  				if !(z.Uses == 1) {
 26701  					continue
 26702  				}
 26703  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 26704  				v0.AddArg2(x, y)
 26705  				b.resetWithControl(BlockARM64NE, v0)
 26706  				return true
 26707  			}
 26708  			break
 26709  		}
 26710  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 26711  		// cond: x.Uses == 1
 26712  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 26713  		for b.Controls[0].Op == OpARM64CMPWconst {
 26714  			v_0 := b.Controls[0]
 26715  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26716  				break
 26717  			}
 26718  			x := v_0.Args[0]
 26719  			if x.Op != OpARM64ANDconst {
 26720  				break
 26721  			}
 26722  			c := auxIntToInt64(x.AuxInt)
 26723  			y := x.Args[0]
 26724  			if !(x.Uses == 1) {
 26725  				break
 26726  			}
 26727  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 26728  			v0.AuxInt = int32ToAuxInt(int32(c))
 26729  			v0.AddArg(y)
 26730  			b.resetWithControl(BlockARM64NE, v0)
 26731  			return true
 26732  		}
 26733  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 26734  		// cond: x.Uses == 1
 26735  		// result: (NE (CMNconst [c] y) yes no)
 26736  		for b.Controls[0].Op == OpARM64CMPconst {
 26737  			v_0 := b.Controls[0]
 26738  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26739  				break
 26740  			}
 26741  			x := v_0.Args[0]
 26742  			if x.Op != OpARM64ADDconst {
 26743  				break
 26744  			}
 26745  			c := auxIntToInt64(x.AuxInt)
 26746  			y := x.Args[0]
 26747  			if !(x.Uses == 1) {
 26748  				break
 26749  			}
 26750  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 26751  			v0.AuxInt = int64ToAuxInt(c)
 26752  			v0.AddArg(y)
 26753  			b.resetWithControl(BlockARM64NE, v0)
 26754  			return true
 26755  		}
 26756  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 26757  		// cond: x.Uses == 1
 26758  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 26759  		for b.Controls[0].Op == OpARM64CMPWconst {
 26760  			v_0 := b.Controls[0]
 26761  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26762  				break
 26763  			}
 26764  			x := v_0.Args[0]
 26765  			if x.Op != OpARM64ADDconst {
 26766  				break
 26767  			}
 26768  			c := auxIntToInt64(x.AuxInt)
 26769  			y := x.Args[0]
 26770  			if !(x.Uses == 1) {
 26771  				break
 26772  			}
 26773  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26774  			v0.AuxInt = int32ToAuxInt(int32(c))
 26775  			v0.AddArg(y)
 26776  			b.resetWithControl(BlockARM64NE, v0)
 26777  			return true
 26778  		}
 26779  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 26780  		// cond: z.Uses == 1
 26781  		// result: (NE (CMN x y) yes no)
 26782  		for b.Controls[0].Op == OpARM64CMPconst {
 26783  			v_0 := b.Controls[0]
 26784  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26785  				break
 26786  			}
 26787  			z := v_0.Args[0]
 26788  			if z.Op != OpARM64ADD {
 26789  				break
 26790  			}
 26791  			_ = z.Args[1]
 26792  			z_0 := z.Args[0]
 26793  			z_1 := z.Args[1]
 26794  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26795  				x := z_0
 26796  				y := z_1
 26797  				if !(z.Uses == 1) {
 26798  					continue
 26799  				}
 26800  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26801  				v0.AddArg2(x, y)
 26802  				b.resetWithControl(BlockARM64NE, v0)
 26803  				return true
 26804  			}
 26805  			break
 26806  		}
 26807  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 26808  		// cond: z.Uses == 1
 26809  		// result: (NE (CMNW x y) yes no)
 26810  		for b.Controls[0].Op == OpARM64CMPWconst {
 26811  			v_0 := b.Controls[0]
 26812  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26813  				break
 26814  			}
 26815  			z := v_0.Args[0]
 26816  			if z.Op != OpARM64ADD {
 26817  				break
 26818  			}
 26819  			_ = z.Args[1]
 26820  			z_0 := z.Args[0]
 26821  			z_1 := z.Args[1]
 26822  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26823  				x := z_0
 26824  				y := z_1
 26825  				if !(z.Uses == 1) {
 26826  					continue
 26827  				}
 26828  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26829  				v0.AddArg2(x, y)
 26830  				b.resetWithControl(BlockARM64NE, v0)
 26831  				return true
 26832  			}
 26833  			break
 26834  		}
 26835  		// match: (NE (CMP x z:(NEG y)) yes no)
 26836  		// cond: z.Uses == 1
 26837  		// result: (NE (CMN x y) yes no)
 26838  		for b.Controls[0].Op == OpARM64CMP {
 26839  			v_0 := b.Controls[0]
 26840  			_ = v_0.Args[1]
 26841  			x := v_0.Args[0]
 26842  			z := v_0.Args[1]
 26843  			if z.Op != OpARM64NEG {
 26844  				break
 26845  			}
 26846  			y := z.Args[0]
 26847  			if !(z.Uses == 1) {
 26848  				break
 26849  			}
 26850  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26851  			v0.AddArg2(x, y)
 26852  			b.resetWithControl(BlockARM64NE, v0)
 26853  			return true
 26854  		}
 26855  		// match: (NE (CMPW x z:(NEG y)) yes no)
 26856  		// cond: z.Uses == 1
 26857  		// result: (NE (CMNW x y) yes no)
 26858  		for b.Controls[0].Op == OpARM64CMPW {
 26859  			v_0 := b.Controls[0]
 26860  			_ = v_0.Args[1]
 26861  			x := v_0.Args[0]
 26862  			z := v_0.Args[1]
 26863  			if z.Op != OpARM64NEG {
 26864  				break
 26865  			}
 26866  			y := z.Args[0]
 26867  			if !(z.Uses == 1) {
 26868  				break
 26869  			}
 26870  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26871  			v0.AddArg2(x, y)
 26872  			b.resetWithControl(BlockARM64NE, v0)
 26873  			return true
 26874  		}
 26875  		// match: (NE (CMPconst [0] x) yes no)
 26876  		// result: (NZ x yes no)
 26877  		for b.Controls[0].Op == OpARM64CMPconst {
 26878  			v_0 := b.Controls[0]
 26879  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26880  				break
 26881  			}
 26882  			x := v_0.Args[0]
 26883  			b.resetWithControl(BlockARM64NZ, x)
 26884  			return true
 26885  		}
 26886  		// match: (NE (CMPWconst [0] x) yes no)
 26887  		// result: (NZW x yes no)
 26888  		for b.Controls[0].Op == OpARM64CMPWconst {
 26889  			v_0 := b.Controls[0]
 26890  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26891  				break
 26892  			}
 26893  			x := v_0.Args[0]
 26894  			b.resetWithControl(BlockARM64NZW, x)
 26895  			return true
 26896  		}
 26897  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 26898  		// cond: z.Uses==1
 26899  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 26900  		for b.Controls[0].Op == OpARM64CMPconst {
 26901  			v_0 := b.Controls[0]
 26902  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26903  				break
 26904  			}
 26905  			z := v_0.Args[0]
 26906  			if z.Op != OpARM64MADD {
 26907  				break
 26908  			}
 26909  			y := z.Args[2]
 26910  			a := z.Args[0]
 26911  			x := z.Args[1]
 26912  			if !(z.Uses == 1) {
 26913  				break
 26914  			}
 26915  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26916  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26917  			v1.AddArg2(x, y)
 26918  			v0.AddArg2(a, v1)
 26919  			b.resetWithControl(BlockARM64NE, v0)
 26920  			return true
 26921  		}
 26922  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 26923  		// cond: z.Uses==1
 26924  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 26925  		for b.Controls[0].Op == OpARM64CMPconst {
 26926  			v_0 := b.Controls[0]
 26927  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26928  				break
 26929  			}
 26930  			z := v_0.Args[0]
 26931  			if z.Op != OpARM64MSUB {
 26932  				break
 26933  			}
 26934  			y := z.Args[2]
 26935  			a := z.Args[0]
 26936  			x := z.Args[1]
 26937  			if !(z.Uses == 1) {
 26938  				break
 26939  			}
 26940  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 26941  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26942  			v1.AddArg2(x, y)
 26943  			v0.AddArg2(a, v1)
 26944  			b.resetWithControl(BlockARM64NE, v0)
 26945  			return true
 26946  		}
 26947  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 26948  		// cond: z.Uses==1
 26949  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 26950  		for b.Controls[0].Op == OpARM64CMPWconst {
 26951  			v_0 := b.Controls[0]
 26952  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26953  				break
 26954  			}
 26955  			z := v_0.Args[0]
 26956  			if z.Op != OpARM64MADDW {
 26957  				break
 26958  			}
 26959  			y := z.Args[2]
 26960  			a := z.Args[0]
 26961  			x := z.Args[1]
 26962  			if !(z.Uses == 1) {
 26963  				break
 26964  			}
 26965  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26966  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26967  			v1.AddArg2(x, y)
 26968  			v0.AddArg2(a, v1)
 26969  			b.resetWithControl(BlockARM64NE, v0)
 26970  			return true
 26971  		}
 26972  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 26973  		// cond: z.Uses==1
 26974  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 26975  		for b.Controls[0].Op == OpARM64CMPWconst {
 26976  			v_0 := b.Controls[0]
 26977  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26978  				break
 26979  			}
 26980  			z := v_0.Args[0]
 26981  			if z.Op != OpARM64MSUBW {
 26982  				break
 26983  			}
 26984  			y := z.Args[2]
 26985  			a := z.Args[0]
 26986  			x := z.Args[1]
 26987  			if !(z.Uses == 1) {
 26988  				break
 26989  			}
 26990  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 26991  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26992  			v1.AddArg2(x, y)
 26993  			v0.AddArg2(a, v1)
 26994  			b.resetWithControl(BlockARM64NE, v0)
 26995  			return true
 26996  		}
 26997  		// match: (NE (TSTconst [c] x) yes no)
 26998  		// cond: oneBit(c)
 26999  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 27000  		for b.Controls[0].Op == OpARM64TSTconst {
 27001  			v_0 := b.Controls[0]
 27002  			c := auxIntToInt64(v_0.AuxInt)
 27003  			x := v_0.Args[0]
 27004  			if !(oneBit(c)) {
 27005  				break
 27006  			}
 27007  			b.resetWithControl(BlockARM64TBNZ, x)
 27008  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 27009  			return true
 27010  		}
 27011  		// match: (NE (TSTWconst [c] x) yes no)
 27012  		// cond: oneBit(int64(uint32(c)))
 27013  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 27014  		for b.Controls[0].Op == OpARM64TSTWconst {
 27015  			v_0 := b.Controls[0]
 27016  			c := auxIntToInt32(v_0.AuxInt)
 27017  			x := v_0.Args[0]
 27018  			if !(oneBit(int64(uint32(c)))) {
 27019  				break
 27020  			}
 27021  			b.resetWithControl(BlockARM64TBNZ, x)
 27022  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 27023  			return true
 27024  		}
 27025  		// match: (NE (FlagConstant [fc]) yes no)
 27026  		// cond: fc.ne()
 27027  		// result: (First yes no)
 27028  		for b.Controls[0].Op == OpARM64FlagConstant {
 27029  			v_0 := b.Controls[0]
 27030  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27031  			if !(fc.ne()) {
 27032  				break
 27033  			}
 27034  			b.Reset(BlockFirst)
 27035  			return true
 27036  		}
 27037  		// match: (NE (FlagConstant [fc]) yes no)
 27038  		// cond: !fc.ne()
 27039  		// result: (First no yes)
 27040  		for b.Controls[0].Op == OpARM64FlagConstant {
 27041  			v_0 := b.Controls[0]
 27042  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27043  			if !(!fc.ne()) {
 27044  				break
 27045  			}
 27046  			b.Reset(BlockFirst)
 27047  			b.swapSuccessors()
 27048  			return true
 27049  		}
 27050  		// match: (NE (InvertFlags cmp) yes no)
 27051  		// result: (NE cmp yes no)
 27052  		for b.Controls[0].Op == OpARM64InvertFlags {
 27053  			v_0 := b.Controls[0]
 27054  			cmp := v_0.Args[0]
 27055  			b.resetWithControl(BlockARM64NE, cmp)
 27056  			return true
 27057  		}
 27058  	case BlockARM64NZ:
 27059  		// match: (NZ (Equal cc) yes no)
 27060  		// result: (EQ cc yes no)
 27061  		for b.Controls[0].Op == OpARM64Equal {
 27062  			v_0 := b.Controls[0]
 27063  			cc := v_0.Args[0]
 27064  			b.resetWithControl(BlockARM64EQ, cc)
 27065  			return true
 27066  		}
 27067  		// match: (NZ (NotEqual cc) yes no)
 27068  		// result: (NE cc yes no)
 27069  		for b.Controls[0].Op == OpARM64NotEqual {
 27070  			v_0 := b.Controls[0]
 27071  			cc := v_0.Args[0]
 27072  			b.resetWithControl(BlockARM64NE, cc)
 27073  			return true
 27074  		}
 27075  		// match: (NZ (LessThan cc) yes no)
 27076  		// result: (LT cc yes no)
 27077  		for b.Controls[0].Op == OpARM64LessThan {
 27078  			v_0 := b.Controls[0]
 27079  			cc := v_0.Args[0]
 27080  			b.resetWithControl(BlockARM64LT, cc)
 27081  			return true
 27082  		}
 27083  		// match: (NZ (LessThanU cc) yes no)
 27084  		// result: (ULT cc yes no)
 27085  		for b.Controls[0].Op == OpARM64LessThanU {
 27086  			v_0 := b.Controls[0]
 27087  			cc := v_0.Args[0]
 27088  			b.resetWithControl(BlockARM64ULT, cc)
 27089  			return true
 27090  		}
 27091  		// match: (NZ (LessEqual cc) yes no)
 27092  		// result: (LE cc yes no)
 27093  		for b.Controls[0].Op == OpARM64LessEqual {
 27094  			v_0 := b.Controls[0]
 27095  			cc := v_0.Args[0]
 27096  			b.resetWithControl(BlockARM64LE, cc)
 27097  			return true
 27098  		}
 27099  		// match: (NZ (LessEqualU cc) yes no)
 27100  		// result: (ULE cc yes no)
 27101  		for b.Controls[0].Op == OpARM64LessEqualU {
 27102  			v_0 := b.Controls[0]
 27103  			cc := v_0.Args[0]
 27104  			b.resetWithControl(BlockARM64ULE, cc)
 27105  			return true
 27106  		}
 27107  		// match: (NZ (GreaterThan cc) yes no)
 27108  		// result: (GT cc yes no)
 27109  		for b.Controls[0].Op == OpARM64GreaterThan {
 27110  			v_0 := b.Controls[0]
 27111  			cc := v_0.Args[0]
 27112  			b.resetWithControl(BlockARM64GT, cc)
 27113  			return true
 27114  		}
 27115  		// match: (NZ (GreaterThanU cc) yes no)
 27116  		// result: (UGT cc yes no)
 27117  		for b.Controls[0].Op == OpARM64GreaterThanU {
 27118  			v_0 := b.Controls[0]
 27119  			cc := v_0.Args[0]
 27120  			b.resetWithControl(BlockARM64UGT, cc)
 27121  			return true
 27122  		}
 27123  		// match: (NZ (GreaterEqual cc) yes no)
 27124  		// result: (GE cc yes no)
 27125  		for b.Controls[0].Op == OpARM64GreaterEqual {
 27126  			v_0 := b.Controls[0]
 27127  			cc := v_0.Args[0]
 27128  			b.resetWithControl(BlockARM64GE, cc)
 27129  			return true
 27130  		}
 27131  		// match: (NZ (GreaterEqualU cc) yes no)
 27132  		// result: (UGE cc yes no)
 27133  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 27134  			v_0 := b.Controls[0]
 27135  			cc := v_0.Args[0]
 27136  			b.resetWithControl(BlockARM64UGE, cc)
 27137  			return true
 27138  		}
 27139  		// match: (NZ (LessThanF cc) yes no)
 27140  		// result: (FLT cc yes no)
 27141  		for b.Controls[0].Op == OpARM64LessThanF {
 27142  			v_0 := b.Controls[0]
 27143  			cc := v_0.Args[0]
 27144  			b.resetWithControl(BlockARM64FLT, cc)
 27145  			return true
 27146  		}
 27147  		// match: (NZ (LessEqualF cc) yes no)
 27148  		// result: (FLE cc yes no)
 27149  		for b.Controls[0].Op == OpARM64LessEqualF {
 27150  			v_0 := b.Controls[0]
 27151  			cc := v_0.Args[0]
 27152  			b.resetWithControl(BlockARM64FLE, cc)
 27153  			return true
 27154  		}
 27155  		// match: (NZ (GreaterThanF cc) yes no)
 27156  		// result: (FGT cc yes no)
 27157  		for b.Controls[0].Op == OpARM64GreaterThanF {
 27158  			v_0 := b.Controls[0]
 27159  			cc := v_0.Args[0]
 27160  			b.resetWithControl(BlockARM64FGT, cc)
 27161  			return true
 27162  		}
 27163  		// match: (NZ (GreaterEqualF cc) yes no)
 27164  		// result: (FGE cc yes no)
 27165  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 27166  			v_0 := b.Controls[0]
 27167  			cc := v_0.Args[0]
 27168  			b.resetWithControl(BlockARM64FGE, cc)
 27169  			return true
 27170  		}
 27171  		// match: (NZ sub:(SUB x y))
 27172  		// cond: sub.Uses == 1
 27173  		// result: (NE (CMP x y))
 27174  		for b.Controls[0].Op == OpARM64SUB {
 27175  			sub := b.Controls[0]
 27176  			y := sub.Args[1]
 27177  			x := sub.Args[0]
 27178  			if !(sub.Uses == 1) {
 27179  				break
 27180  			}
 27181  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 27182  			v0.AddArg2(x, y)
 27183  			b.resetWithControl(BlockARM64NE, v0)
 27184  			return true
 27185  		}
 27186  		// match: (NZ sub:(SUBconst [c] y))
 27187  		// cond: sub.Uses == 1
 27188  		// result: (NE (CMPconst [c] y))
 27189  		for b.Controls[0].Op == OpARM64SUBconst {
 27190  			sub := b.Controls[0]
 27191  			c := auxIntToInt64(sub.AuxInt)
 27192  			y := sub.Args[0]
 27193  			if !(sub.Uses == 1) {
 27194  				break
 27195  			}
 27196  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 27197  			v0.AuxInt = int64ToAuxInt(c)
 27198  			v0.AddArg(y)
 27199  			b.resetWithControl(BlockARM64NE, v0)
 27200  			return true
 27201  		}
 27202  		// match: (NZ (ANDconst [c] x) yes no)
 27203  		// cond: oneBit(c)
 27204  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 27205  		for b.Controls[0].Op == OpARM64ANDconst {
 27206  			v_0 := b.Controls[0]
 27207  			c := auxIntToInt64(v_0.AuxInt)
 27208  			x := v_0.Args[0]
 27209  			if !(oneBit(c)) {
 27210  				break
 27211  			}
 27212  			b.resetWithControl(BlockARM64TBNZ, x)
 27213  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 27214  			return true
 27215  		}
 27216  		// match: (NZ s:(SRLconst [63] x) yes no)
 27217  		// cond: s.Uses == 1
 27218  		// result: (TBNZ [63] x yes no)
 27219  		for b.Controls[0].Op == OpARM64SRLconst {
 27220  			s := b.Controls[0]
 27221  			if auxIntToInt64(s.AuxInt) != 63 {
 27222  				break
 27223  			}
 27224  			x := s.Args[0]
 27225  			if !(s.Uses == 1) {
 27226  				break
 27227  			}
 27228  			b.resetWithControl(BlockARM64TBNZ, x)
 27229  			b.AuxInt = int64ToAuxInt(63)
 27230  			return true
 27231  		}
 27232  		// match: (NZ s:(SRAconst [63] x) yes no)
 27233  		// cond: s.Uses == 1
 27234  		// result: (TBNZ [63] x yes no)
 27235  		for b.Controls[0].Op == OpARM64SRAconst {
 27236  			s := b.Controls[0]
 27237  			if auxIntToInt64(s.AuxInt) != 63 {
 27238  				break
 27239  			}
 27240  			x := s.Args[0]
 27241  			if !(s.Uses == 1) {
 27242  				break
 27243  			}
 27244  			b.resetWithControl(BlockARM64TBNZ, x)
 27245  			b.AuxInt = int64ToAuxInt(63)
 27246  			return true
 27247  		}
 27248  		// match: (NZ (MOVDconst [0]) yes no)
 27249  		// result: (First no yes)
 27250  		for b.Controls[0].Op == OpARM64MOVDconst {
 27251  			v_0 := b.Controls[0]
 27252  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27253  				break
 27254  			}
 27255  			b.Reset(BlockFirst)
 27256  			b.swapSuccessors()
 27257  			return true
 27258  		}
 27259  		// match: (NZ (MOVDconst [c]) yes no)
 27260  		// cond: c != 0
 27261  		// result: (First yes no)
 27262  		for b.Controls[0].Op == OpARM64MOVDconst {
 27263  			v_0 := b.Controls[0]
 27264  			c := auxIntToInt64(v_0.AuxInt)
 27265  			if !(c != 0) {
 27266  				break
 27267  			}
 27268  			b.Reset(BlockFirst)
 27269  			return true
 27270  		}
 27271  	case BlockARM64NZW:
 27272  		// match: (NZW sub:(SUB x y))
 27273  		// cond: sub.Uses == 1
 27274  		// result: (NE (CMPW x y))
 27275  		for b.Controls[0].Op == OpARM64SUB {
 27276  			sub := b.Controls[0]
 27277  			y := sub.Args[1]
 27278  			x := sub.Args[0]
 27279  			if !(sub.Uses == 1) {
 27280  				break
 27281  			}
 27282  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 27283  			v0.AddArg2(x, y)
 27284  			b.resetWithControl(BlockARM64NE, v0)
 27285  			return true
 27286  		}
 27287  		// match: (NZW sub:(SUBconst [c] y))
 27288  		// cond: sub.Uses == 1
 27289  		// result: (NE (CMPWconst [int32(c)] y))
 27290  		for b.Controls[0].Op == OpARM64SUBconst {
 27291  			sub := b.Controls[0]
 27292  			c := auxIntToInt64(sub.AuxInt)
 27293  			y := sub.Args[0]
 27294  			if !(sub.Uses == 1) {
 27295  				break
 27296  			}
 27297  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 27298  			v0.AuxInt = int32ToAuxInt(int32(c))
 27299  			v0.AddArg(y)
 27300  			b.resetWithControl(BlockARM64NE, v0)
 27301  			return true
 27302  		}
 27303  		// match: (NZW (ANDconst [c] x) yes no)
 27304  		// cond: oneBit(int64(uint32(c)))
 27305  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 27306  		for b.Controls[0].Op == OpARM64ANDconst {
 27307  			v_0 := b.Controls[0]
 27308  			c := auxIntToInt64(v_0.AuxInt)
 27309  			x := v_0.Args[0]
 27310  			if !(oneBit(int64(uint32(c)))) {
 27311  				break
 27312  			}
 27313  			b.resetWithControl(BlockARM64TBNZ, x)
 27314  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 27315  			return true
 27316  		}
 27317  		// match: (NZW (MOVDconst [c]) yes no)
 27318  		// cond: int32(c) == 0
 27319  		// result: (First no yes)
 27320  		for b.Controls[0].Op == OpARM64MOVDconst {
 27321  			v_0 := b.Controls[0]
 27322  			c := auxIntToInt64(v_0.AuxInt)
 27323  			if !(int32(c) == 0) {
 27324  				break
 27325  			}
 27326  			b.Reset(BlockFirst)
 27327  			b.swapSuccessors()
 27328  			return true
 27329  		}
 27330  		// match: (NZW (MOVDconst [c]) yes no)
 27331  		// cond: int32(c) != 0
 27332  		// result: (First yes no)
 27333  		for b.Controls[0].Op == OpARM64MOVDconst {
 27334  			v_0 := b.Controls[0]
 27335  			c := auxIntToInt64(v_0.AuxInt)
 27336  			if !(int32(c) != 0) {
 27337  				break
 27338  			}
 27339  			b.Reset(BlockFirst)
 27340  			return true
 27341  		}
 27342  	case BlockARM64TBNZ:
 27343  		// match: (TBNZ [0] (Equal cc) yes no)
 27344  		// result: (EQ cc yes no)
 27345  		for b.Controls[0].Op == OpARM64Equal {
 27346  			v_0 := b.Controls[0]
 27347  			cc := v_0.Args[0]
 27348  			if auxIntToInt64(b.AuxInt) != 0 {
 27349  				break
 27350  			}
 27351  			b.resetWithControl(BlockARM64EQ, cc)
 27352  			return true
 27353  		}
 27354  		// match: (TBNZ [0] (NotEqual cc) yes no)
 27355  		// result: (NE cc yes no)
 27356  		for b.Controls[0].Op == OpARM64NotEqual {
 27357  			v_0 := b.Controls[0]
 27358  			cc := v_0.Args[0]
 27359  			if auxIntToInt64(b.AuxInt) != 0 {
 27360  				break
 27361  			}
 27362  			b.resetWithControl(BlockARM64NE, cc)
 27363  			return true
 27364  		}
 27365  		// match: (TBNZ [0] (LessThan cc) yes no)
 27366  		// result: (LT cc yes no)
 27367  		for b.Controls[0].Op == OpARM64LessThan {
 27368  			v_0 := b.Controls[0]
 27369  			cc := v_0.Args[0]
 27370  			if auxIntToInt64(b.AuxInt) != 0 {
 27371  				break
 27372  			}
 27373  			b.resetWithControl(BlockARM64LT, cc)
 27374  			return true
 27375  		}
 27376  		// match: (TBNZ [0] (LessThanU cc) yes no)
 27377  		// result: (ULT cc yes no)
 27378  		for b.Controls[0].Op == OpARM64LessThanU {
 27379  			v_0 := b.Controls[0]
 27380  			cc := v_0.Args[0]
 27381  			if auxIntToInt64(b.AuxInt) != 0 {
 27382  				break
 27383  			}
 27384  			b.resetWithControl(BlockARM64ULT, cc)
 27385  			return true
 27386  		}
 27387  		// match: (TBNZ [0] (LessEqual cc) yes no)
 27388  		// result: (LE cc yes no)
 27389  		for b.Controls[0].Op == OpARM64LessEqual {
 27390  			v_0 := b.Controls[0]
 27391  			cc := v_0.Args[0]
 27392  			if auxIntToInt64(b.AuxInt) != 0 {
 27393  				break
 27394  			}
 27395  			b.resetWithControl(BlockARM64LE, cc)
 27396  			return true
 27397  		}
 27398  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 27399  		// result: (ULE cc yes no)
 27400  		for b.Controls[0].Op == OpARM64LessEqualU {
 27401  			v_0 := b.Controls[0]
 27402  			cc := v_0.Args[0]
 27403  			if auxIntToInt64(b.AuxInt) != 0 {
 27404  				break
 27405  			}
 27406  			b.resetWithControl(BlockARM64ULE, cc)
 27407  			return true
 27408  		}
 27409  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 27410  		// result: (GT cc yes no)
 27411  		for b.Controls[0].Op == OpARM64GreaterThan {
 27412  			v_0 := b.Controls[0]
 27413  			cc := v_0.Args[0]
 27414  			if auxIntToInt64(b.AuxInt) != 0 {
 27415  				break
 27416  			}
 27417  			b.resetWithControl(BlockARM64GT, cc)
 27418  			return true
 27419  		}
 27420  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 27421  		// result: (UGT cc yes no)
 27422  		for b.Controls[0].Op == OpARM64GreaterThanU {
 27423  			v_0 := b.Controls[0]
 27424  			cc := v_0.Args[0]
 27425  			if auxIntToInt64(b.AuxInt) != 0 {
 27426  				break
 27427  			}
 27428  			b.resetWithControl(BlockARM64UGT, cc)
 27429  			return true
 27430  		}
 27431  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 27432  		// result: (GE cc yes no)
 27433  		for b.Controls[0].Op == OpARM64GreaterEqual {
 27434  			v_0 := b.Controls[0]
 27435  			cc := v_0.Args[0]
 27436  			if auxIntToInt64(b.AuxInt) != 0 {
 27437  				break
 27438  			}
 27439  			b.resetWithControl(BlockARM64GE, cc)
 27440  			return true
 27441  		}
 27442  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 27443  		// result: (UGE cc yes no)
 27444  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 27445  			v_0 := b.Controls[0]
 27446  			cc := v_0.Args[0]
 27447  			if auxIntToInt64(b.AuxInt) != 0 {
 27448  				break
 27449  			}
 27450  			b.resetWithControl(BlockARM64UGE, cc)
 27451  			return true
 27452  		}
 27453  		// match: (TBNZ [0] (LessThanF cc) yes no)
 27454  		// result: (FLT cc yes no)
 27455  		for b.Controls[0].Op == OpARM64LessThanF {
 27456  			v_0 := b.Controls[0]
 27457  			cc := v_0.Args[0]
 27458  			if auxIntToInt64(b.AuxInt) != 0 {
 27459  				break
 27460  			}
 27461  			b.resetWithControl(BlockARM64FLT, cc)
 27462  			return true
 27463  		}
 27464  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 27465  		// result: (FLE cc yes no)
 27466  		for b.Controls[0].Op == OpARM64LessEqualF {
 27467  			v_0 := b.Controls[0]
 27468  			cc := v_0.Args[0]
 27469  			if auxIntToInt64(b.AuxInt) != 0 {
 27470  				break
 27471  			}
 27472  			b.resetWithControl(BlockARM64FLE, cc)
 27473  			return true
 27474  		}
 27475  		// match: (TBNZ [0] (GreaterThanF cc) yes no)
 27476  		// result: (FGT cc yes no)
 27477  		for b.Controls[0].Op == OpARM64GreaterThanF {
 27478  			v_0 := b.Controls[0]
 27479  			cc := v_0.Args[0]
 27480  			if auxIntToInt64(b.AuxInt) != 0 {
 27481  				break
 27482  			}
 27483  			b.resetWithControl(BlockARM64FGT, cc)
 27484  			return true
 27485  		}
 27486  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 27487  		// result: (FGE cc yes no)
 27488  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 27489  			v_0 := b.Controls[0]
 27490  			cc := v_0.Args[0]
 27491  			if auxIntToInt64(b.AuxInt) != 0 {
 27492  				break
 27493  			}
 27494  			b.resetWithControl(BlockARM64FGE, cc)
 27495  			return true
 27496  		}
 27497  		// match: (TBNZ [0] (XORconst [1] x) yes no)
 27498  		// result: (TBZ [0] x yes no)
 27499  		for b.Controls[0].Op == OpARM64XORconst {
 27500  			v_0 := b.Controls[0]
 27501  			if auxIntToInt64(v_0.AuxInt) != 1 {
 27502  				break
 27503  			}
 27504  			x := v_0.Args[0]
 27505  			if auxIntToInt64(b.AuxInt) != 0 {
 27506  				break
 27507  			}
 27508  			b.resetWithControl(BlockARM64TBZ, x)
 27509  			b.AuxInt = int64ToAuxInt(0)
 27510  			return true
 27511  		}
 27512  		// match: (TBNZ [t] sv:(SRLconst [s] x) yes no)
 27513  		// cond: t+s < 64 && sv.Uses == 1
 27514  		// result: (TBNZ [t+s] x yes no )
 27515  		for b.Controls[0].Op == OpARM64SRLconst {
 27516  			sv := b.Controls[0]
 27517  			s := auxIntToInt64(sv.AuxInt)
 27518  			x := sv.Args[0]
 27519  			t := auxIntToInt64(b.AuxInt)
 27520  			if !(t+s < 64 && sv.Uses == 1) {
 27521  				break
 27522  			}
 27523  			b.resetWithControl(BlockARM64TBNZ, x)
 27524  			b.AuxInt = int64ToAuxInt(t + s)
 27525  			return true
 27526  		}
 27527  		// match: (TBNZ [t] (SRLconst [s] x) yes no)
 27528  		// cond: t+s >= 64
 27529  		// result: (First no yes)
 27530  		for b.Controls[0].Op == OpARM64SRLconst {
 27531  			v_0 := b.Controls[0]
 27532  			s := auxIntToInt64(v_0.AuxInt)
 27533  			t := auxIntToInt64(b.AuxInt)
 27534  			if !(t+s >= 64) {
 27535  				break
 27536  			}
 27537  			b.Reset(BlockFirst)
 27538  			b.swapSuccessors()
 27539  			return true
 27540  		}
 27541  		// match: (TBNZ [t] sv:(SLLconst [s] x) yes no)
 27542  		// cond: t-s >= 0 && sv.Uses == 1
 27543  		// result: (TBNZ [t-s] x yes no )
 27544  		for b.Controls[0].Op == OpARM64SLLconst {
 27545  			sv := b.Controls[0]
 27546  			s := auxIntToInt64(sv.AuxInt)
 27547  			x := sv.Args[0]
 27548  			t := auxIntToInt64(b.AuxInt)
 27549  			if !(t-s >= 0 && sv.Uses == 1) {
 27550  				break
 27551  			}
 27552  			b.resetWithControl(BlockARM64TBNZ, x)
 27553  			b.AuxInt = int64ToAuxInt(t - s)
 27554  			return true
 27555  		}
 27556  		// match: (TBNZ [t] (SLLconst [s] x) yes no)
 27557  		// cond: t-s < 0
 27558  		// result: (First no yes)
 27559  		for b.Controls[0].Op == OpARM64SLLconst {
 27560  			v_0 := b.Controls[0]
 27561  			s := auxIntToInt64(v_0.AuxInt)
 27562  			t := auxIntToInt64(b.AuxInt)
 27563  			if !(t-s < 0) {
 27564  				break
 27565  			}
 27566  			b.Reset(BlockFirst)
 27567  			b.swapSuccessors()
 27568  			return true
 27569  		}
 27570  		// match: (TBNZ [t] rv:(RORconst [r] x) yes no)
 27571  		// cond: rv.Uses == 1
 27572  		// result: (TBNZ [int64(uint64(t+r)%64)] x yes no)
 27573  		for b.Controls[0].Op == OpARM64RORconst {
 27574  			rv := b.Controls[0]
 27575  			r := auxIntToInt64(rv.AuxInt)
 27576  			x := rv.Args[0]
 27577  			t := auxIntToInt64(b.AuxInt)
 27578  			if !(rv.Uses == 1) {
 27579  				break
 27580  			}
 27581  			b.resetWithControl(BlockARM64TBNZ, x)
 27582  			b.AuxInt = int64ToAuxInt(int64(uint64(t+r) % 64))
 27583  			return true
 27584  		}
 27585  		// match: (TBNZ [t] sv:(SRAconst [s] x) yes no)
 27586  		// cond: t+s < 64 && sv.Uses == 1
 27587  		// result: (TBNZ [t+s] x yes no)
 27588  		for b.Controls[0].Op == OpARM64SRAconst {
 27589  			sv := b.Controls[0]
 27590  			s := auxIntToInt64(sv.AuxInt)
 27591  			x := sv.Args[0]
 27592  			t := auxIntToInt64(b.AuxInt)
 27593  			if !(t+s < 64 && sv.Uses == 1) {
 27594  				break
 27595  			}
 27596  			b.resetWithControl(BlockARM64TBNZ, x)
 27597  			b.AuxInt = int64ToAuxInt(t + s)
 27598  			return true
 27599  		}
 27600  		// match: (TBNZ [t] sv:(SRAconst [s] x) yes no)
 27601  		// cond: t+s >= 64 && sv.Uses == 1
 27602  		// result: (TBNZ [63 ] x yes no)
 27603  		for b.Controls[0].Op == OpARM64SRAconst {
 27604  			sv := b.Controls[0]
 27605  			s := auxIntToInt64(sv.AuxInt)
 27606  			x := sv.Args[0]
 27607  			t := auxIntToInt64(b.AuxInt)
 27608  			if !(t+s >= 64 && sv.Uses == 1) {
 27609  				break
 27610  			}
 27611  			b.resetWithControl(BlockARM64TBNZ, x)
 27612  			b.AuxInt = int64ToAuxInt(63)
 27613  			return true
 27614  		}
 27615  	case BlockARM64TBZ:
 27616  		// match: (TBZ [0] (XORconst [1] x) yes no)
 27617  		// result: (TBNZ [0] x yes no)
 27618  		for b.Controls[0].Op == OpARM64XORconst {
 27619  			v_0 := b.Controls[0]
 27620  			if auxIntToInt64(v_0.AuxInt) != 1 {
 27621  				break
 27622  			}
 27623  			x := v_0.Args[0]
 27624  			if auxIntToInt64(b.AuxInt) != 0 {
 27625  				break
 27626  			}
 27627  			b.resetWithControl(BlockARM64TBNZ, x)
 27628  			b.AuxInt = int64ToAuxInt(0)
 27629  			return true
 27630  		}
 27631  		// match: (TBZ [t] sv:(SRLconst [s] x) yes no)
 27632  		// cond: t+s < 64 && sv.Uses == 1
 27633  		// result: (TBZ [t+s] x yes no )
 27634  		for b.Controls[0].Op == OpARM64SRLconst {
 27635  			sv := b.Controls[0]
 27636  			s := auxIntToInt64(sv.AuxInt)
 27637  			x := sv.Args[0]
 27638  			t := auxIntToInt64(b.AuxInt)
 27639  			if !(t+s < 64 && sv.Uses == 1) {
 27640  				break
 27641  			}
 27642  			b.resetWithControl(BlockARM64TBZ, x)
 27643  			b.AuxInt = int64ToAuxInt(t + s)
 27644  			return true
 27645  		}
 27646  		// match: (TBZ [t] (SRLconst [s] x) yes no)
 27647  		// cond: t+s >= 64
 27648  		// result: (First yes no )
 27649  		for b.Controls[0].Op == OpARM64SRLconst {
 27650  			v_0 := b.Controls[0]
 27651  			s := auxIntToInt64(v_0.AuxInt)
 27652  			t := auxIntToInt64(b.AuxInt)
 27653  			if !(t+s >= 64) {
 27654  				break
 27655  			}
 27656  			b.Reset(BlockFirst)
 27657  			return true
 27658  		}
 27659  		// match: (TBZ [t] sv:(SLLconst [s] x) yes no)
 27660  		// cond: t-s >= 0 && sv.Uses == 1
 27661  		// result: (TBZ [t-s] x yes no )
 27662  		for b.Controls[0].Op == OpARM64SLLconst {
 27663  			sv := b.Controls[0]
 27664  			s := auxIntToInt64(sv.AuxInt)
 27665  			x := sv.Args[0]
 27666  			t := auxIntToInt64(b.AuxInt)
 27667  			if !(t-s >= 0 && sv.Uses == 1) {
 27668  				break
 27669  			}
 27670  			b.resetWithControl(BlockARM64TBZ, x)
 27671  			b.AuxInt = int64ToAuxInt(t - s)
 27672  			return true
 27673  		}
 27674  		// match: (TBZ [t] (SLLconst [s] x) yes no)
 27675  		// cond: t-s < 0
 27676  		// result: (First yes no )
 27677  		for b.Controls[0].Op == OpARM64SLLconst {
 27678  			v_0 := b.Controls[0]
 27679  			s := auxIntToInt64(v_0.AuxInt)
 27680  			t := auxIntToInt64(b.AuxInt)
 27681  			if !(t-s < 0) {
 27682  				break
 27683  			}
 27684  			b.Reset(BlockFirst)
 27685  			return true
 27686  		}
 27687  		// match: (TBZ [t] rv:(RORconst [r] x) yes no)
 27688  		// cond: rv.Uses == 1
 27689  		// result: (TBZ [int64(uint64(t+r)%64)] x yes no)
 27690  		for b.Controls[0].Op == OpARM64RORconst {
 27691  			rv := b.Controls[0]
 27692  			r := auxIntToInt64(rv.AuxInt)
 27693  			x := rv.Args[0]
 27694  			t := auxIntToInt64(b.AuxInt)
 27695  			if !(rv.Uses == 1) {
 27696  				break
 27697  			}
 27698  			b.resetWithControl(BlockARM64TBZ, x)
 27699  			b.AuxInt = int64ToAuxInt(int64(uint64(t+r) % 64))
 27700  			return true
 27701  		}
 27702  		// match: (TBZ [t] sv:(SRAconst [s] x) yes no)
 27703  		// cond: t+s < 64 && sv.Uses == 1
 27704  		// result: (TBZ [t+s] x yes no)
 27705  		for b.Controls[0].Op == OpARM64SRAconst {
 27706  			sv := b.Controls[0]
 27707  			s := auxIntToInt64(sv.AuxInt)
 27708  			x := sv.Args[0]
 27709  			t := auxIntToInt64(b.AuxInt)
 27710  			if !(t+s < 64 && sv.Uses == 1) {
 27711  				break
 27712  			}
 27713  			b.resetWithControl(BlockARM64TBZ, x)
 27714  			b.AuxInt = int64ToAuxInt(t + s)
 27715  			return true
 27716  		}
 27717  		// match: (TBZ [t] sv:(SRAconst [s] x) yes no)
 27718  		// cond: t+s >= 64 && sv.Uses == 1
 27719  		// result: (TBZ [63 ] x yes no)
 27720  		for b.Controls[0].Op == OpARM64SRAconst {
 27721  			sv := b.Controls[0]
 27722  			s := auxIntToInt64(sv.AuxInt)
 27723  			x := sv.Args[0]
 27724  			t := auxIntToInt64(b.AuxInt)
 27725  			if !(t+s >= 64 && sv.Uses == 1) {
 27726  				break
 27727  			}
 27728  			b.resetWithControl(BlockARM64TBZ, x)
 27729  			b.AuxInt = int64ToAuxInt(63)
 27730  			return true
 27731  		}
 27732  	case BlockARM64UGE:
 27733  		// match: (UGE (FlagConstant [fc]) yes no)
 27734  		// cond: fc.uge()
 27735  		// result: (First yes no)
 27736  		for b.Controls[0].Op == OpARM64FlagConstant {
 27737  			v_0 := b.Controls[0]
 27738  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27739  			if !(fc.uge()) {
 27740  				break
 27741  			}
 27742  			b.Reset(BlockFirst)
 27743  			return true
 27744  		}
 27745  		// match: (UGE (FlagConstant [fc]) yes no)
 27746  		// cond: !fc.uge()
 27747  		// result: (First no yes)
 27748  		for b.Controls[0].Op == OpARM64FlagConstant {
 27749  			v_0 := b.Controls[0]
 27750  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27751  			if !(!fc.uge()) {
 27752  				break
 27753  			}
 27754  			b.Reset(BlockFirst)
 27755  			b.swapSuccessors()
 27756  			return true
 27757  		}
 27758  		// match: (UGE (InvertFlags cmp) yes no)
 27759  		// result: (ULE cmp yes no)
 27760  		for b.Controls[0].Op == OpARM64InvertFlags {
 27761  			v_0 := b.Controls[0]
 27762  			cmp := v_0.Args[0]
 27763  			b.resetWithControl(BlockARM64ULE, cmp)
 27764  			return true
 27765  		}
 27766  	case BlockARM64UGT:
 27767  		// match: (UGT (CMPconst [0] x))
 27768  		// result: (NE (CMPconst [0] x))
 27769  		for b.Controls[0].Op == OpARM64CMPconst {
 27770  			v_0 := b.Controls[0]
 27771  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27772  				break
 27773  			}
 27774  			x := v_0.Args[0]
 27775  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 27776  			v0.AuxInt = int64ToAuxInt(0)
 27777  			v0.AddArg(x)
 27778  			b.resetWithControl(BlockARM64NE, v0)
 27779  			return true
 27780  		}
 27781  		// match: (UGT (CMPWconst [0] x))
 27782  		// result: (NE (CMPWconst [0] x))
 27783  		for b.Controls[0].Op == OpARM64CMPWconst {
 27784  			v_0 := b.Controls[0]
 27785  			if auxIntToInt32(v_0.AuxInt) != 0 {
 27786  				break
 27787  			}
 27788  			x := v_0.Args[0]
 27789  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 27790  			v0.AuxInt = int32ToAuxInt(0)
 27791  			v0.AddArg(x)
 27792  			b.resetWithControl(BlockARM64NE, v0)
 27793  			return true
 27794  		}
 27795  		// match: (UGT (FlagConstant [fc]) yes no)
 27796  		// cond: fc.ugt()
 27797  		// result: (First yes no)
 27798  		for b.Controls[0].Op == OpARM64FlagConstant {
 27799  			v_0 := b.Controls[0]
 27800  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27801  			if !(fc.ugt()) {
 27802  				break
 27803  			}
 27804  			b.Reset(BlockFirst)
 27805  			return true
 27806  		}
 27807  		// match: (UGT (FlagConstant [fc]) yes no)
 27808  		// cond: !fc.ugt()
 27809  		// result: (First no yes)
 27810  		for b.Controls[0].Op == OpARM64FlagConstant {
 27811  			v_0 := b.Controls[0]
 27812  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27813  			if !(!fc.ugt()) {
 27814  				break
 27815  			}
 27816  			b.Reset(BlockFirst)
 27817  			b.swapSuccessors()
 27818  			return true
 27819  		}
 27820  		// match: (UGT (InvertFlags cmp) yes no)
 27821  		// result: (ULT cmp yes no)
 27822  		for b.Controls[0].Op == OpARM64InvertFlags {
 27823  			v_0 := b.Controls[0]
 27824  			cmp := v_0.Args[0]
 27825  			b.resetWithControl(BlockARM64ULT, cmp)
 27826  			return true
 27827  		}
 27828  	case BlockARM64ULE:
 27829  		// match: (ULE (CMPconst [0] x))
 27830  		// result: (EQ (CMPconst [0] x))
 27831  		for b.Controls[0].Op == OpARM64CMPconst {
 27832  			v_0 := b.Controls[0]
 27833  			if auxIntToInt64(v_0.AuxInt) != 0 {
 27834  				break
 27835  			}
 27836  			x := v_0.Args[0]
 27837  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 27838  			v0.AuxInt = int64ToAuxInt(0)
 27839  			v0.AddArg(x)
 27840  			b.resetWithControl(BlockARM64EQ, v0)
 27841  			return true
 27842  		}
 27843  		// match: (ULE (CMPWconst [0] x))
 27844  		// result: (EQ (CMPWconst [0] x))
 27845  		for b.Controls[0].Op == OpARM64CMPWconst {
 27846  			v_0 := b.Controls[0]
 27847  			if auxIntToInt32(v_0.AuxInt) != 0 {
 27848  				break
 27849  			}
 27850  			x := v_0.Args[0]
 27851  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 27852  			v0.AuxInt = int32ToAuxInt(0)
 27853  			v0.AddArg(x)
 27854  			b.resetWithControl(BlockARM64EQ, v0)
 27855  			return true
 27856  		}
 27857  		// match: (ULE (FlagConstant [fc]) yes no)
 27858  		// cond: fc.ule()
 27859  		// result: (First yes no)
 27860  		for b.Controls[0].Op == OpARM64FlagConstant {
 27861  			v_0 := b.Controls[0]
 27862  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27863  			if !(fc.ule()) {
 27864  				break
 27865  			}
 27866  			b.Reset(BlockFirst)
 27867  			return true
 27868  		}
 27869  		// match: (ULE (FlagConstant [fc]) yes no)
 27870  		// cond: !fc.ule()
 27871  		// result: (First no yes)
 27872  		for b.Controls[0].Op == OpARM64FlagConstant {
 27873  			v_0 := b.Controls[0]
 27874  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27875  			if !(!fc.ule()) {
 27876  				break
 27877  			}
 27878  			b.Reset(BlockFirst)
 27879  			b.swapSuccessors()
 27880  			return true
 27881  		}
 27882  		// match: (ULE (InvertFlags cmp) yes no)
 27883  		// result: (UGE cmp yes no)
 27884  		for b.Controls[0].Op == OpARM64InvertFlags {
 27885  			v_0 := b.Controls[0]
 27886  			cmp := v_0.Args[0]
 27887  			b.resetWithControl(BlockARM64UGE, cmp)
 27888  			return true
 27889  		}
 27890  	case BlockARM64ULT:
 27891  		// match: (ULT (FlagConstant [fc]) yes no)
 27892  		// cond: fc.ult()
 27893  		// result: (First yes no)
 27894  		for b.Controls[0].Op == OpARM64FlagConstant {
 27895  			v_0 := b.Controls[0]
 27896  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27897  			if !(fc.ult()) {
 27898  				break
 27899  			}
 27900  			b.Reset(BlockFirst)
 27901  			return true
 27902  		}
 27903  		// match: (ULT (FlagConstant [fc]) yes no)
 27904  		// cond: !fc.ult()
 27905  		// result: (First no yes)
 27906  		for b.Controls[0].Op == OpARM64FlagConstant {
 27907  			v_0 := b.Controls[0]
 27908  			fc := auxIntToFlagConstant(v_0.AuxInt)
 27909  			if !(!fc.ult()) {
 27910  				break
 27911  			}
 27912  			b.Reset(BlockFirst)
 27913  			b.swapSuccessors()
 27914  			return true
 27915  		}
 27916  		// match: (ULT (InvertFlags cmp) yes no)
 27917  		// result: (UGT cmp yes no)
 27918  		for b.Controls[0].Op == OpARM64InvertFlags {
 27919  			v_0 := b.Controls[0]
 27920  			cmp := v_0.Args[0]
 27921  			b.resetWithControl(BlockARM64UGT, cmp)
 27922  			return true
 27923  		}
 27924  	case BlockARM64Z:
 27925  		// match: (Z sub:(SUB x y))
 27926  		// cond: sub.Uses == 1
 27927  		// result: (EQ (CMP x y))
 27928  		for b.Controls[0].Op == OpARM64SUB {
 27929  			sub := b.Controls[0]
 27930  			y := sub.Args[1]
 27931  			x := sub.Args[0]
 27932  			if !(sub.Uses == 1) {
 27933  				break
 27934  			}
 27935  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 27936  			v0.AddArg2(x, y)
 27937  			b.resetWithControl(BlockARM64EQ, v0)
 27938  			return true
 27939  		}
 27940  		// match: (Z sub:(SUBconst [c] y))
 27941  		// cond: sub.Uses == 1
 27942  		// result: (EQ (CMPconst [c] y))
 27943  		for b.Controls[0].Op == OpARM64SUBconst {
 27944  			sub := b.Controls[0]
 27945  			c := auxIntToInt64(sub.AuxInt)
 27946  			y := sub.Args[0]
 27947  			if !(sub.Uses == 1) {
 27948  				break
 27949  			}
 27950  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 27951  			v0.AuxInt = int64ToAuxInt(c)
 27952  			v0.AddArg(y)
 27953  			b.resetWithControl(BlockARM64EQ, v0)
 27954  			return true
 27955  		}
 27956  		// match: (Z (ANDconst [c] x) yes no)
 27957  		// cond: oneBit(c)
 27958  		// result: (TBZ [int64(ntz64(c))] x yes no)
 27959  		for b.Controls[0].Op == OpARM64ANDconst {
 27960  			v_0 := b.Controls[0]
 27961  			c := auxIntToInt64(v_0.AuxInt)
 27962  			x := v_0.Args[0]
 27963  			if !(oneBit(c)) {
 27964  				break
 27965  			}
 27966  			b.resetWithControl(BlockARM64TBZ, x)
 27967  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 27968  			return true
 27969  		}
 27970  		// match: (Z s:(SRLconst [63] x) yes no)
 27971  		// cond: s.Uses == 1
 27972  		// result: (TBZ [63] x yes no)
 27973  		for b.Controls[0].Op == OpARM64SRLconst {
 27974  			s := b.Controls[0]
 27975  			if auxIntToInt64(s.AuxInt) != 63 {
 27976  				break
 27977  			}
 27978  			x := s.Args[0]
 27979  			if !(s.Uses == 1) {
 27980  				break
 27981  			}
 27982  			b.resetWithControl(BlockARM64TBZ, x)
 27983  			b.AuxInt = int64ToAuxInt(63)
 27984  			return true
 27985  		}
 27986  		// match: (Z s:(SRAconst [63] x) yes no)
 27987  		// cond: s.Uses == 1
 27988  		// result: (TBZ [63] x yes no)
 27989  		for b.Controls[0].Op == OpARM64SRAconst {
 27990  			s := b.Controls[0]
 27991  			if auxIntToInt64(s.AuxInt) != 63 {
 27992  				break
 27993  			}
 27994  			x := s.Args[0]
 27995  			if !(s.Uses == 1) {
 27996  				break
 27997  			}
 27998  			b.resetWithControl(BlockARM64TBZ, x)
 27999  			b.AuxInt = int64ToAuxInt(63)
 28000  			return true
 28001  		}
 28002  		// match: (Z (MOVDconst [0]) yes no)
 28003  		// result: (First yes no)
 28004  		for b.Controls[0].Op == OpARM64MOVDconst {
 28005  			v_0 := b.Controls[0]
 28006  			if auxIntToInt64(v_0.AuxInt) != 0 {
 28007  				break
 28008  			}
 28009  			b.Reset(BlockFirst)
 28010  			return true
 28011  		}
 28012  		// match: (Z (MOVDconst [c]) yes no)
 28013  		// cond: c != 0
 28014  		// result: (First no yes)
 28015  		for b.Controls[0].Op == OpARM64MOVDconst {
 28016  			v_0 := b.Controls[0]
 28017  			c := auxIntToInt64(v_0.AuxInt)
 28018  			if !(c != 0) {
 28019  				break
 28020  			}
 28021  			b.Reset(BlockFirst)
 28022  			b.swapSuccessors()
 28023  			return true
 28024  		}
 28025  	case BlockARM64ZW:
 28026  		// match: (ZW sub:(SUB x y))
 28027  		// cond: sub.Uses == 1
 28028  		// result: (EQ (CMPW x y))
 28029  		for b.Controls[0].Op == OpARM64SUB {
 28030  			sub := b.Controls[0]
 28031  			y := sub.Args[1]
 28032  			x := sub.Args[0]
 28033  			if !(sub.Uses == 1) {
 28034  				break
 28035  			}
 28036  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 28037  			v0.AddArg2(x, y)
 28038  			b.resetWithControl(BlockARM64EQ, v0)
 28039  			return true
 28040  		}
 28041  		// match: (ZW sub:(SUBconst [c] y))
 28042  		// cond: sub.Uses == 1
 28043  		// result: (EQ (CMPWconst [int32(c)] y))
 28044  		for b.Controls[0].Op == OpARM64SUBconst {
 28045  			sub := b.Controls[0]
 28046  			c := auxIntToInt64(sub.AuxInt)
 28047  			y := sub.Args[0]
 28048  			if !(sub.Uses == 1) {
 28049  				break
 28050  			}
 28051  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 28052  			v0.AuxInt = int32ToAuxInt(int32(c))
 28053  			v0.AddArg(y)
 28054  			b.resetWithControl(BlockARM64EQ, v0)
 28055  			return true
 28056  		}
 28057  		// match: (ZW (ANDconst [c] x) yes no)
 28058  		// cond: oneBit(int64(uint32(c)))
 28059  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 28060  		for b.Controls[0].Op == OpARM64ANDconst {
 28061  			v_0 := b.Controls[0]
 28062  			c := auxIntToInt64(v_0.AuxInt)
 28063  			x := v_0.Args[0]
 28064  			if !(oneBit(int64(uint32(c)))) {
 28065  				break
 28066  			}
 28067  			b.resetWithControl(BlockARM64TBZ, x)
 28068  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 28069  			return true
 28070  		}
 28071  		// match: (ZW (MOVDconst [c]) yes no)
 28072  		// cond: int32(c) == 0
 28073  		// result: (First yes no)
 28074  		for b.Controls[0].Op == OpARM64MOVDconst {
 28075  			v_0 := b.Controls[0]
 28076  			c := auxIntToInt64(v_0.AuxInt)
 28077  			if !(int32(c) == 0) {
 28078  				break
 28079  			}
 28080  			b.Reset(BlockFirst)
 28081  			return true
 28082  		}
 28083  		// match: (ZW (MOVDconst [c]) yes no)
 28084  		// cond: int32(c) != 0
 28085  		// result: (First no yes)
 28086  		for b.Controls[0].Op == OpARM64MOVDconst {
 28087  			v_0 := b.Controls[0]
 28088  			c := auxIntToInt64(v_0.AuxInt)
 28089  			if !(int32(c) != 0) {
 28090  				break
 28091  			}
 28092  			b.Reset(BlockFirst)
 28093  			b.swapSuccessors()
 28094  			return true
 28095  		}
 28096  	}
 28097  	return false
 28098  }
 28099  

View as plain text