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

     1  // Code generated from _gen/ARM64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "cmd/compile/internal/types"
     6  
     7  func rewriteValueARM64(v *Value) bool {
     8  	switch v.Op {
     9  	case OpARM64ADCSflags:
    10  		return rewriteValueARM64_OpARM64ADCSflags(v)
    11  	case OpARM64ADD:
    12  		return rewriteValueARM64_OpARM64ADD(v)
    13  	case OpARM64ADDSflags:
    14  		return rewriteValueARM64_OpARM64ADDSflags(v)
    15  	case OpARM64ADDconst:
    16  		return rewriteValueARM64_OpARM64ADDconst(v)
    17  	case OpARM64ADDshiftLL:
    18  		return rewriteValueARM64_OpARM64ADDshiftLL(v)
    19  	case OpARM64ADDshiftRA:
    20  		return rewriteValueARM64_OpARM64ADDshiftRA(v)
    21  	case OpARM64ADDshiftRL:
    22  		return rewriteValueARM64_OpARM64ADDshiftRL(v)
    23  	case OpARM64AND:
    24  		return rewriteValueARM64_OpARM64AND(v)
    25  	case OpARM64ANDconst:
    26  		return rewriteValueARM64_OpARM64ANDconst(v)
    27  	case OpARM64ANDshiftLL:
    28  		return rewriteValueARM64_OpARM64ANDshiftLL(v)
    29  	case OpARM64ANDshiftRA:
    30  		return rewriteValueARM64_OpARM64ANDshiftRA(v)
    31  	case OpARM64ANDshiftRL:
    32  		return rewriteValueARM64_OpARM64ANDshiftRL(v)
    33  	case OpARM64ANDshiftRO:
    34  		return rewriteValueARM64_OpARM64ANDshiftRO(v)
    35  	case OpARM64BIC:
    36  		return rewriteValueARM64_OpARM64BIC(v)
    37  	case OpARM64BICshiftLL:
    38  		return rewriteValueARM64_OpARM64BICshiftLL(v)
    39  	case OpARM64BICshiftRA:
    40  		return rewriteValueARM64_OpARM64BICshiftRA(v)
    41  	case OpARM64BICshiftRL:
    42  		return rewriteValueARM64_OpARM64BICshiftRL(v)
    43  	case OpARM64BICshiftRO:
    44  		return rewriteValueARM64_OpARM64BICshiftRO(v)
    45  	case OpARM64CMN:
    46  		return rewriteValueARM64_OpARM64CMN(v)
    47  	case OpARM64CMNW:
    48  		return rewriteValueARM64_OpARM64CMNW(v)
    49  	case OpARM64CMNWconst:
    50  		return rewriteValueARM64_OpARM64CMNWconst(v)
    51  	case OpARM64CMNconst:
    52  		return rewriteValueARM64_OpARM64CMNconst(v)
    53  	case OpARM64CMNshiftLL:
    54  		return rewriteValueARM64_OpARM64CMNshiftLL(v)
    55  	case OpARM64CMNshiftRA:
    56  		return rewriteValueARM64_OpARM64CMNshiftRA(v)
    57  	case OpARM64CMNshiftRL:
    58  		return rewriteValueARM64_OpARM64CMNshiftRL(v)
    59  	case OpARM64CMP:
    60  		return rewriteValueARM64_OpARM64CMP(v)
    61  	case OpARM64CMPW:
    62  		return rewriteValueARM64_OpARM64CMPW(v)
    63  	case OpARM64CMPWconst:
    64  		return rewriteValueARM64_OpARM64CMPWconst(v)
    65  	case OpARM64CMPconst:
    66  		return rewriteValueARM64_OpARM64CMPconst(v)
    67  	case OpARM64CMPshiftLL:
    68  		return rewriteValueARM64_OpARM64CMPshiftLL(v)
    69  	case OpARM64CMPshiftRA:
    70  		return rewriteValueARM64_OpARM64CMPshiftRA(v)
    71  	case OpARM64CMPshiftRL:
    72  		return rewriteValueARM64_OpARM64CMPshiftRL(v)
    73  	case OpARM64CSEL:
    74  		return rewriteValueARM64_OpARM64CSEL(v)
    75  	case OpARM64CSEL0:
    76  		return rewriteValueARM64_OpARM64CSEL0(v)
    77  	case OpARM64CSETM:
    78  		return rewriteValueARM64_OpARM64CSETM(v)
    79  	case OpARM64CSINC:
    80  		return rewriteValueARM64_OpARM64CSINC(v)
    81  	case OpARM64CSINV:
    82  		return rewriteValueARM64_OpARM64CSINV(v)
    83  	case OpARM64CSNEG:
    84  		return rewriteValueARM64_OpARM64CSNEG(v)
    85  	case OpARM64DIV:
    86  		return rewriteValueARM64_OpARM64DIV(v)
    87  	case OpARM64DIVW:
    88  		return rewriteValueARM64_OpARM64DIVW(v)
    89  	case OpARM64EON:
    90  		return rewriteValueARM64_OpARM64EON(v)
    91  	case OpARM64EONshiftLL:
    92  		return rewriteValueARM64_OpARM64EONshiftLL(v)
    93  	case OpARM64EONshiftRA:
    94  		return rewriteValueARM64_OpARM64EONshiftRA(v)
    95  	case OpARM64EONshiftRL:
    96  		return rewriteValueARM64_OpARM64EONshiftRL(v)
    97  	case OpARM64EONshiftRO:
    98  		return rewriteValueARM64_OpARM64EONshiftRO(v)
    99  	case OpARM64Equal:
   100  		return rewriteValueARM64_OpARM64Equal(v)
   101  	case OpARM64FADDD:
   102  		return rewriteValueARM64_OpARM64FADDD(v)
   103  	case OpARM64FADDS:
   104  		return rewriteValueARM64_OpARM64FADDS(v)
   105  	case OpARM64FCMPD:
   106  		return rewriteValueARM64_OpARM64FCMPD(v)
   107  	case OpARM64FCMPS:
   108  		return rewriteValueARM64_OpARM64FCMPS(v)
   109  	case OpARM64FMOVDfpgp:
   110  		return rewriteValueARM64_OpARM64FMOVDfpgp(v)
   111  	case OpARM64FMOVDgpfp:
   112  		return rewriteValueARM64_OpARM64FMOVDgpfp(v)
   113  	case OpARM64FMOVDload:
   114  		return rewriteValueARM64_OpARM64FMOVDload(v)
   115  	case OpARM64FMOVDloadidx:
   116  		return rewriteValueARM64_OpARM64FMOVDloadidx(v)
   117  	case OpARM64FMOVDloadidx8:
   118  		return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
   119  	case OpARM64FMOVDstore:
   120  		return rewriteValueARM64_OpARM64FMOVDstore(v)
   121  	case OpARM64FMOVDstoreidx:
   122  		return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
   123  	case OpARM64FMOVDstoreidx8:
   124  		return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
   125  	case OpARM64FMOVSload:
   126  		return rewriteValueARM64_OpARM64FMOVSload(v)
   127  	case OpARM64FMOVSloadidx:
   128  		return rewriteValueARM64_OpARM64FMOVSloadidx(v)
   129  	case OpARM64FMOVSloadidx4:
   130  		return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
   131  	case OpARM64FMOVSstore:
   132  		return rewriteValueARM64_OpARM64FMOVSstore(v)
   133  	case OpARM64FMOVSstoreidx:
   134  		return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
   135  	case OpARM64FMOVSstoreidx4:
   136  		return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
   137  	case OpARM64FMULD:
   138  		return rewriteValueARM64_OpARM64FMULD(v)
   139  	case OpARM64FMULS:
   140  		return rewriteValueARM64_OpARM64FMULS(v)
   141  	case OpARM64FNEGD:
   142  		return rewriteValueARM64_OpARM64FNEGD(v)
   143  	case OpARM64FNEGS:
   144  		return rewriteValueARM64_OpARM64FNEGS(v)
   145  	case OpARM64FNMULD:
   146  		return rewriteValueARM64_OpARM64FNMULD(v)
   147  	case OpARM64FNMULS:
   148  		return rewriteValueARM64_OpARM64FNMULS(v)
   149  	case OpARM64FSUBD:
   150  		return rewriteValueARM64_OpARM64FSUBD(v)
   151  	case OpARM64FSUBS:
   152  		return rewriteValueARM64_OpARM64FSUBS(v)
   153  	case OpARM64GreaterEqual:
   154  		return rewriteValueARM64_OpARM64GreaterEqual(v)
   155  	case OpARM64GreaterEqualF:
   156  		return rewriteValueARM64_OpARM64GreaterEqualF(v)
   157  	case OpARM64GreaterEqualNoov:
   158  		return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
   159  	case OpARM64GreaterEqualU:
   160  		return rewriteValueARM64_OpARM64GreaterEqualU(v)
   161  	case OpARM64GreaterThan:
   162  		return rewriteValueARM64_OpARM64GreaterThan(v)
   163  	case OpARM64GreaterThanF:
   164  		return rewriteValueARM64_OpARM64GreaterThanF(v)
   165  	case OpARM64GreaterThanU:
   166  		return rewriteValueARM64_OpARM64GreaterThanU(v)
   167  	case OpARM64LDP:
   168  		return rewriteValueARM64_OpARM64LDP(v)
   169  	case OpARM64LessEqual:
   170  		return rewriteValueARM64_OpARM64LessEqual(v)
   171  	case OpARM64LessEqualF:
   172  		return rewriteValueARM64_OpARM64LessEqualF(v)
   173  	case OpARM64LessEqualU:
   174  		return rewriteValueARM64_OpARM64LessEqualU(v)
   175  	case OpARM64LessThan:
   176  		return rewriteValueARM64_OpARM64LessThan(v)
   177  	case OpARM64LessThanF:
   178  		return rewriteValueARM64_OpARM64LessThanF(v)
   179  	case OpARM64LessThanNoov:
   180  		return rewriteValueARM64_OpARM64LessThanNoov(v)
   181  	case OpARM64LessThanU:
   182  		return rewriteValueARM64_OpARM64LessThanU(v)
   183  	case OpARM64LoweredPanicBoundsCR:
   184  		return rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v)
   185  	case OpARM64LoweredPanicBoundsRC:
   186  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v)
   187  	case OpARM64LoweredPanicBoundsRR:
   188  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v)
   189  	case OpARM64MADD:
   190  		return rewriteValueARM64_OpARM64MADD(v)
   191  	case OpARM64MADDW:
   192  		return rewriteValueARM64_OpARM64MADDW(v)
   193  	case OpARM64MNEG:
   194  		return rewriteValueARM64_OpARM64MNEG(v)
   195  	case OpARM64MNEGW:
   196  		return rewriteValueARM64_OpARM64MNEGW(v)
   197  	case OpARM64MOD:
   198  		return rewriteValueARM64_OpARM64MOD(v)
   199  	case OpARM64MODW:
   200  		return rewriteValueARM64_OpARM64MODW(v)
   201  	case OpARM64MOVBUload:
   202  		return rewriteValueARM64_OpARM64MOVBUload(v)
   203  	case OpARM64MOVBUloadidx:
   204  		return rewriteValueARM64_OpARM64MOVBUloadidx(v)
   205  	case OpARM64MOVBUreg:
   206  		return rewriteValueARM64_OpARM64MOVBUreg(v)
   207  	case OpARM64MOVBload:
   208  		return rewriteValueARM64_OpARM64MOVBload(v)
   209  	case OpARM64MOVBloadidx:
   210  		return rewriteValueARM64_OpARM64MOVBloadidx(v)
   211  	case OpARM64MOVBreg:
   212  		return rewriteValueARM64_OpARM64MOVBreg(v)
   213  	case OpARM64MOVBstore:
   214  		return rewriteValueARM64_OpARM64MOVBstore(v)
   215  	case OpARM64MOVBstoreidx:
   216  		return rewriteValueARM64_OpARM64MOVBstoreidx(v)
   217  	case OpARM64MOVDload:
   218  		return rewriteValueARM64_OpARM64MOVDload(v)
   219  	case OpARM64MOVDloadidx:
   220  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   221  	case OpARM64MOVDloadidx8:
   222  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   223  	case OpARM64MOVDnop:
   224  		return rewriteValueARM64_OpARM64MOVDnop(v)
   225  	case OpARM64MOVDreg:
   226  		return rewriteValueARM64_OpARM64MOVDreg(v)
   227  	case OpARM64MOVDstore:
   228  		return rewriteValueARM64_OpARM64MOVDstore(v)
   229  	case OpARM64MOVDstoreidx:
   230  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   231  	case OpARM64MOVDstoreidx8:
   232  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   233  	case OpARM64MOVHUload:
   234  		return rewriteValueARM64_OpARM64MOVHUload(v)
   235  	case OpARM64MOVHUloadidx:
   236  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   237  	case OpARM64MOVHUloadidx2:
   238  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   239  	case OpARM64MOVHUreg:
   240  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   241  	case OpARM64MOVHload:
   242  		return rewriteValueARM64_OpARM64MOVHload(v)
   243  	case OpARM64MOVHloadidx:
   244  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   245  	case OpARM64MOVHloadidx2:
   246  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   247  	case OpARM64MOVHreg:
   248  		return rewriteValueARM64_OpARM64MOVHreg(v)
   249  	case OpARM64MOVHstore:
   250  		return rewriteValueARM64_OpARM64MOVHstore(v)
   251  	case OpARM64MOVHstoreidx:
   252  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   253  	case OpARM64MOVHstoreidx2:
   254  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   255  	case OpARM64MOVWUload:
   256  		return rewriteValueARM64_OpARM64MOVWUload(v)
   257  	case OpARM64MOVWUloadidx:
   258  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   259  	case OpARM64MOVWUloadidx4:
   260  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   261  	case OpARM64MOVWUreg:
   262  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   263  	case OpARM64MOVWload:
   264  		return rewriteValueARM64_OpARM64MOVWload(v)
   265  	case OpARM64MOVWloadidx:
   266  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   267  	case OpARM64MOVWloadidx4:
   268  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   269  	case OpARM64MOVWreg:
   270  		return rewriteValueARM64_OpARM64MOVWreg(v)
   271  	case OpARM64MOVWstore:
   272  		return rewriteValueARM64_OpARM64MOVWstore(v)
   273  	case OpARM64MOVWstoreidx:
   274  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   275  	case OpARM64MOVWstoreidx4:
   276  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   277  	case OpARM64MSUB:
   278  		return rewriteValueARM64_OpARM64MSUB(v)
   279  	case OpARM64MSUBW:
   280  		return rewriteValueARM64_OpARM64MSUBW(v)
   281  	case OpARM64MUL:
   282  		return rewriteValueARM64_OpARM64MUL(v)
   283  	case OpARM64MULW:
   284  		return rewriteValueARM64_OpARM64MULW(v)
   285  	case OpARM64MVN:
   286  		return rewriteValueARM64_OpARM64MVN(v)
   287  	case OpARM64MVNshiftLL:
   288  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   289  	case OpARM64MVNshiftRA:
   290  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   291  	case OpARM64MVNshiftRL:
   292  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   293  	case OpARM64MVNshiftRO:
   294  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   295  	case OpARM64NEG:
   296  		return rewriteValueARM64_OpARM64NEG(v)
   297  	case OpARM64NEGshiftLL:
   298  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   299  	case OpARM64NEGshiftRA:
   300  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   301  	case OpARM64NEGshiftRL:
   302  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   303  	case OpARM64NotEqual:
   304  		return rewriteValueARM64_OpARM64NotEqual(v)
   305  	case OpARM64OR:
   306  		return rewriteValueARM64_OpARM64OR(v)
   307  	case OpARM64ORN:
   308  		return rewriteValueARM64_OpARM64ORN(v)
   309  	case OpARM64ORNshiftLL:
   310  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   311  	case OpARM64ORNshiftRA:
   312  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   313  	case OpARM64ORNshiftRL:
   314  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   315  	case OpARM64ORNshiftRO:
   316  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   317  	case OpARM64ORconst:
   318  		return rewriteValueARM64_OpARM64ORconst(v)
   319  	case OpARM64ORshiftLL:
   320  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   321  	case OpARM64ORshiftRA:
   322  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   323  	case OpARM64ORshiftRL:
   324  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   325  	case OpARM64ORshiftRO:
   326  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   327  	case OpARM64REV:
   328  		return rewriteValueARM64_OpARM64REV(v)
   329  	case OpARM64REVW:
   330  		return rewriteValueARM64_OpARM64REVW(v)
   331  	case OpARM64ROR:
   332  		return rewriteValueARM64_OpARM64ROR(v)
   333  	case OpARM64RORW:
   334  		return rewriteValueARM64_OpARM64RORW(v)
   335  	case OpARM64SBCSflags:
   336  		return rewriteValueARM64_OpARM64SBCSflags(v)
   337  	case OpARM64SBFX:
   338  		return rewriteValueARM64_OpARM64SBFX(v)
   339  	case OpARM64SLL:
   340  		return rewriteValueARM64_OpARM64SLL(v)
   341  	case OpARM64SLLconst:
   342  		return rewriteValueARM64_OpARM64SLLconst(v)
   343  	case OpARM64SRA:
   344  		return rewriteValueARM64_OpARM64SRA(v)
   345  	case OpARM64SRAconst:
   346  		return rewriteValueARM64_OpARM64SRAconst(v)
   347  	case OpARM64SRL:
   348  		return rewriteValueARM64_OpARM64SRL(v)
   349  	case OpARM64SRLconst:
   350  		return rewriteValueARM64_OpARM64SRLconst(v)
   351  	case OpARM64STP:
   352  		return rewriteValueARM64_OpARM64STP(v)
   353  	case OpARM64SUB:
   354  		return rewriteValueARM64_OpARM64SUB(v)
   355  	case OpARM64SUBconst:
   356  		return rewriteValueARM64_OpARM64SUBconst(v)
   357  	case OpARM64SUBshiftLL:
   358  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   359  	case OpARM64SUBshiftRA:
   360  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   361  	case OpARM64SUBshiftRL:
   362  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   363  	case OpARM64TST:
   364  		return rewriteValueARM64_OpARM64TST(v)
   365  	case OpARM64TSTW:
   366  		return rewriteValueARM64_OpARM64TSTW(v)
   367  	case OpARM64TSTWconst:
   368  		return rewriteValueARM64_OpARM64TSTWconst(v)
   369  	case OpARM64TSTconst:
   370  		return rewriteValueARM64_OpARM64TSTconst(v)
   371  	case OpARM64TSTshiftLL:
   372  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   373  	case OpARM64TSTshiftRA:
   374  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   375  	case OpARM64TSTshiftRL:
   376  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   377  	case OpARM64TSTshiftRO:
   378  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   379  	case OpARM64UBFIZ:
   380  		return rewriteValueARM64_OpARM64UBFIZ(v)
   381  	case OpARM64UBFX:
   382  		return rewriteValueARM64_OpARM64UBFX(v)
   383  	case OpARM64UDIV:
   384  		return rewriteValueARM64_OpARM64UDIV(v)
   385  	case OpARM64UDIVW:
   386  		return rewriteValueARM64_OpARM64UDIVW(v)
   387  	case OpARM64UMOD:
   388  		return rewriteValueARM64_OpARM64UMOD(v)
   389  	case OpARM64UMODW:
   390  		return rewriteValueARM64_OpARM64UMODW(v)
   391  	case OpARM64XOR:
   392  		return rewriteValueARM64_OpARM64XOR(v)
   393  	case OpARM64XORconst:
   394  		return rewriteValueARM64_OpARM64XORconst(v)
   395  	case OpARM64XORshiftLL:
   396  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   397  	case OpARM64XORshiftRA:
   398  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   399  	case OpARM64XORshiftRL:
   400  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   401  	case OpARM64XORshiftRO:
   402  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   403  	case OpAbs:
   404  		v.Op = OpARM64FABSD
   405  		return true
   406  	case OpAdd16:
   407  		v.Op = OpARM64ADD
   408  		return true
   409  	case OpAdd32:
   410  		v.Op = OpARM64ADD
   411  		return true
   412  	case OpAdd32F:
   413  		v.Op = OpARM64FADDS
   414  		return true
   415  	case OpAdd64:
   416  		v.Op = OpARM64ADD
   417  		return true
   418  	case OpAdd64F:
   419  		v.Op = OpARM64FADDD
   420  		return true
   421  	case OpAdd8:
   422  		v.Op = OpARM64ADD
   423  		return true
   424  	case OpAddPtr:
   425  		v.Op = OpARM64ADD
   426  		return true
   427  	case OpAddr:
   428  		return rewriteValueARM64_OpAddr(v)
   429  	case OpAnd16:
   430  		v.Op = OpARM64AND
   431  		return true
   432  	case OpAnd32:
   433  		v.Op = OpARM64AND
   434  		return true
   435  	case OpAnd64:
   436  		v.Op = OpARM64AND
   437  		return true
   438  	case OpAnd8:
   439  		v.Op = OpARM64AND
   440  		return true
   441  	case OpAndB:
   442  		v.Op = OpARM64AND
   443  		return true
   444  	case OpAtomicAdd32:
   445  		v.Op = OpARM64LoweredAtomicAdd32
   446  		return true
   447  	case OpAtomicAdd32Variant:
   448  		v.Op = OpARM64LoweredAtomicAdd32Variant
   449  		return true
   450  	case OpAtomicAdd64:
   451  		v.Op = OpARM64LoweredAtomicAdd64
   452  		return true
   453  	case OpAtomicAdd64Variant:
   454  		v.Op = OpARM64LoweredAtomicAdd64Variant
   455  		return true
   456  	case OpAtomicAnd32value:
   457  		v.Op = OpARM64LoweredAtomicAnd32
   458  		return true
   459  	case OpAtomicAnd32valueVariant:
   460  		v.Op = OpARM64LoweredAtomicAnd32Variant
   461  		return true
   462  	case OpAtomicAnd64value:
   463  		v.Op = OpARM64LoweredAtomicAnd64
   464  		return true
   465  	case OpAtomicAnd64valueVariant:
   466  		v.Op = OpARM64LoweredAtomicAnd64Variant
   467  		return true
   468  	case OpAtomicAnd8value:
   469  		v.Op = OpARM64LoweredAtomicAnd8
   470  		return true
   471  	case OpAtomicAnd8valueVariant:
   472  		v.Op = OpARM64LoweredAtomicAnd8Variant
   473  		return true
   474  	case OpAtomicCompareAndSwap32:
   475  		v.Op = OpARM64LoweredAtomicCas32
   476  		return true
   477  	case OpAtomicCompareAndSwap32Variant:
   478  		v.Op = OpARM64LoweredAtomicCas32Variant
   479  		return true
   480  	case OpAtomicCompareAndSwap64:
   481  		v.Op = OpARM64LoweredAtomicCas64
   482  		return true
   483  	case OpAtomicCompareAndSwap64Variant:
   484  		v.Op = OpARM64LoweredAtomicCas64Variant
   485  		return true
   486  	case OpAtomicExchange32:
   487  		v.Op = OpARM64LoweredAtomicExchange32
   488  		return true
   489  	case OpAtomicExchange32Variant:
   490  		v.Op = OpARM64LoweredAtomicExchange32Variant
   491  		return true
   492  	case OpAtomicExchange64:
   493  		v.Op = OpARM64LoweredAtomicExchange64
   494  		return true
   495  	case OpAtomicExchange64Variant:
   496  		v.Op = OpARM64LoweredAtomicExchange64Variant
   497  		return true
   498  	case OpAtomicExchange8:
   499  		v.Op = OpARM64LoweredAtomicExchange8
   500  		return true
   501  	case OpAtomicExchange8Variant:
   502  		v.Op = OpARM64LoweredAtomicExchange8Variant
   503  		return true
   504  	case OpAtomicLoad32:
   505  		v.Op = OpARM64LDARW
   506  		return true
   507  	case OpAtomicLoad64:
   508  		v.Op = OpARM64LDAR
   509  		return true
   510  	case OpAtomicLoad8:
   511  		v.Op = OpARM64LDARB
   512  		return true
   513  	case OpAtomicLoadPtr:
   514  		v.Op = OpARM64LDAR
   515  		return true
   516  	case OpAtomicOr32value:
   517  		v.Op = OpARM64LoweredAtomicOr32
   518  		return true
   519  	case OpAtomicOr32valueVariant:
   520  		v.Op = OpARM64LoweredAtomicOr32Variant
   521  		return true
   522  	case OpAtomicOr64value:
   523  		v.Op = OpARM64LoweredAtomicOr64
   524  		return true
   525  	case OpAtomicOr64valueVariant:
   526  		v.Op = OpARM64LoweredAtomicOr64Variant
   527  		return true
   528  	case OpAtomicOr8value:
   529  		v.Op = OpARM64LoweredAtomicOr8
   530  		return true
   531  	case OpAtomicOr8valueVariant:
   532  		v.Op = OpARM64LoweredAtomicOr8Variant
   533  		return true
   534  	case OpAtomicStore32:
   535  		v.Op = OpARM64STLRW
   536  		return true
   537  	case OpAtomicStore64:
   538  		v.Op = OpARM64STLR
   539  		return true
   540  	case OpAtomicStore8:
   541  		v.Op = OpARM64STLRB
   542  		return true
   543  	case OpAtomicStorePtrNoWB:
   544  		v.Op = OpARM64STLR
   545  		return true
   546  	case OpAvg64u:
   547  		return rewriteValueARM64_OpAvg64u(v)
   548  	case OpBitLen16:
   549  		return rewriteValueARM64_OpBitLen16(v)
   550  	case OpBitLen32:
   551  		return rewriteValueARM64_OpBitLen32(v)
   552  	case OpBitLen64:
   553  		return rewriteValueARM64_OpBitLen64(v)
   554  	case OpBitLen8:
   555  		return rewriteValueARM64_OpBitLen8(v)
   556  	case OpBitRev16:
   557  		return rewriteValueARM64_OpBitRev16(v)
   558  	case OpBitRev32:
   559  		v.Op = OpARM64RBITW
   560  		return true
   561  	case OpBitRev64:
   562  		v.Op = OpARM64RBIT
   563  		return true
   564  	case OpBitRev8:
   565  		return rewriteValueARM64_OpBitRev8(v)
   566  	case OpBswap16:
   567  		v.Op = OpARM64REV16W
   568  		return true
   569  	case OpBswap32:
   570  		v.Op = OpARM64REVW
   571  		return true
   572  	case OpBswap64:
   573  		v.Op = OpARM64REV
   574  		return true
   575  	case OpCeil:
   576  		v.Op = OpARM64FRINTPD
   577  		return true
   578  	case OpClosureCall:
   579  		v.Op = OpARM64CALLclosure
   580  		return true
   581  	case OpCom16:
   582  		v.Op = OpARM64MVN
   583  		return true
   584  	case OpCom32:
   585  		v.Op = OpARM64MVN
   586  		return true
   587  	case OpCom64:
   588  		v.Op = OpARM64MVN
   589  		return true
   590  	case OpCom8:
   591  		v.Op = OpARM64MVN
   592  		return true
   593  	case OpCondSelect:
   594  		return rewriteValueARM64_OpCondSelect(v)
   595  	case OpConst16:
   596  		return rewriteValueARM64_OpConst16(v)
   597  	case OpConst32:
   598  		return rewriteValueARM64_OpConst32(v)
   599  	case OpConst32F:
   600  		return rewriteValueARM64_OpConst32F(v)
   601  	case OpConst64:
   602  		return rewriteValueARM64_OpConst64(v)
   603  	case OpConst64F:
   604  		return rewriteValueARM64_OpConst64F(v)
   605  	case OpConst8:
   606  		return rewriteValueARM64_OpConst8(v)
   607  	case OpConstBool:
   608  		return rewriteValueARM64_OpConstBool(v)
   609  	case OpConstNil:
   610  		return rewriteValueARM64_OpConstNil(v)
   611  	case OpCtz16:
   612  		return rewriteValueARM64_OpCtz16(v)
   613  	case OpCtz16NonZero:
   614  		v.Op = OpCtz32
   615  		return true
   616  	case OpCtz32:
   617  		return rewriteValueARM64_OpCtz32(v)
   618  	case OpCtz32NonZero:
   619  		v.Op = OpCtz32
   620  		return true
   621  	case OpCtz64:
   622  		return rewriteValueARM64_OpCtz64(v)
   623  	case OpCtz64NonZero:
   624  		v.Op = OpCtz64
   625  		return true
   626  	case OpCtz8:
   627  		return rewriteValueARM64_OpCtz8(v)
   628  	case OpCtz8NonZero:
   629  		v.Op = OpCtz32
   630  		return true
   631  	case OpCvt32Fto32:
   632  		v.Op = OpARM64FCVTZSSW
   633  		return true
   634  	case OpCvt32Fto32U:
   635  		v.Op = OpARM64FCVTZUSW
   636  		return true
   637  	case OpCvt32Fto64:
   638  		v.Op = OpARM64FCVTZSS
   639  		return true
   640  	case OpCvt32Fto64F:
   641  		v.Op = OpARM64FCVTSD
   642  		return true
   643  	case OpCvt32Fto64U:
   644  		v.Op = OpARM64FCVTZUS
   645  		return true
   646  	case OpCvt32Uto32F:
   647  		v.Op = OpARM64UCVTFWS
   648  		return true
   649  	case OpCvt32Uto64F:
   650  		v.Op = OpARM64UCVTFWD
   651  		return true
   652  	case OpCvt32to32F:
   653  		v.Op = OpARM64SCVTFWS
   654  		return true
   655  	case OpCvt32to64F:
   656  		v.Op = OpARM64SCVTFWD
   657  		return true
   658  	case OpCvt64Fto32:
   659  		v.Op = OpARM64FCVTZSDW
   660  		return true
   661  	case OpCvt64Fto32F:
   662  		v.Op = OpARM64FCVTDS
   663  		return true
   664  	case OpCvt64Fto32U:
   665  		v.Op = OpARM64FCVTZUDW
   666  		return true
   667  	case OpCvt64Fto64:
   668  		v.Op = OpARM64FCVTZSD
   669  		return true
   670  	case OpCvt64Fto64U:
   671  		v.Op = OpARM64FCVTZUD
   672  		return true
   673  	case OpCvt64Uto32F:
   674  		v.Op = OpARM64UCVTFS
   675  		return true
   676  	case OpCvt64Uto64F:
   677  		v.Op = OpARM64UCVTFD
   678  		return true
   679  	case OpCvt64to32F:
   680  		v.Op = OpARM64SCVTFS
   681  		return true
   682  	case OpCvt64to64F:
   683  		v.Op = OpARM64SCVTFD
   684  		return true
   685  	case OpCvtBoolToUint8:
   686  		v.Op = OpCopy
   687  		return true
   688  	case OpDiv16:
   689  		return rewriteValueARM64_OpDiv16(v)
   690  	case OpDiv16u:
   691  		return rewriteValueARM64_OpDiv16u(v)
   692  	case OpDiv32:
   693  		return rewriteValueARM64_OpDiv32(v)
   694  	case OpDiv32F:
   695  		v.Op = OpARM64FDIVS
   696  		return true
   697  	case OpDiv32u:
   698  		v.Op = OpARM64UDIVW
   699  		return true
   700  	case OpDiv64:
   701  		return rewriteValueARM64_OpDiv64(v)
   702  	case OpDiv64F:
   703  		v.Op = OpARM64FDIVD
   704  		return true
   705  	case OpDiv64u:
   706  		v.Op = OpARM64UDIV
   707  		return true
   708  	case OpDiv8:
   709  		return rewriteValueARM64_OpDiv8(v)
   710  	case OpDiv8u:
   711  		return rewriteValueARM64_OpDiv8u(v)
   712  	case OpEq16:
   713  		return rewriteValueARM64_OpEq16(v)
   714  	case OpEq32:
   715  		return rewriteValueARM64_OpEq32(v)
   716  	case OpEq32F:
   717  		return rewriteValueARM64_OpEq32F(v)
   718  	case OpEq64:
   719  		return rewriteValueARM64_OpEq64(v)
   720  	case OpEq64F:
   721  		return rewriteValueARM64_OpEq64F(v)
   722  	case OpEq8:
   723  		return rewriteValueARM64_OpEq8(v)
   724  	case OpEqB:
   725  		return rewriteValueARM64_OpEqB(v)
   726  	case OpEqPtr:
   727  		return rewriteValueARM64_OpEqPtr(v)
   728  	case OpFMA:
   729  		return rewriteValueARM64_OpFMA(v)
   730  	case OpFloor:
   731  		v.Op = OpARM64FRINTMD
   732  		return true
   733  	case OpGetCallerPC:
   734  		v.Op = OpARM64LoweredGetCallerPC
   735  		return true
   736  	case OpGetCallerSP:
   737  		v.Op = OpARM64LoweredGetCallerSP
   738  		return true
   739  	case OpGetClosurePtr:
   740  		v.Op = OpARM64LoweredGetClosurePtr
   741  		return true
   742  	case OpHmul32:
   743  		return rewriteValueARM64_OpHmul32(v)
   744  	case OpHmul32u:
   745  		return rewriteValueARM64_OpHmul32u(v)
   746  	case OpHmul64:
   747  		v.Op = OpARM64MULH
   748  		return true
   749  	case OpHmul64u:
   750  		v.Op = OpARM64UMULH
   751  		return true
   752  	case OpInterCall:
   753  		v.Op = OpARM64CALLinter
   754  		return true
   755  	case OpIsInBounds:
   756  		return rewriteValueARM64_OpIsInBounds(v)
   757  	case OpIsNonNil:
   758  		return rewriteValueARM64_OpIsNonNil(v)
   759  	case OpIsSliceInBounds:
   760  		return rewriteValueARM64_OpIsSliceInBounds(v)
   761  	case OpLeq16:
   762  		return rewriteValueARM64_OpLeq16(v)
   763  	case OpLeq16U:
   764  		return rewriteValueARM64_OpLeq16U(v)
   765  	case OpLeq32:
   766  		return rewriteValueARM64_OpLeq32(v)
   767  	case OpLeq32F:
   768  		return rewriteValueARM64_OpLeq32F(v)
   769  	case OpLeq32U:
   770  		return rewriteValueARM64_OpLeq32U(v)
   771  	case OpLeq64:
   772  		return rewriteValueARM64_OpLeq64(v)
   773  	case OpLeq64F:
   774  		return rewriteValueARM64_OpLeq64F(v)
   775  	case OpLeq64U:
   776  		return rewriteValueARM64_OpLeq64U(v)
   777  	case OpLeq8:
   778  		return rewriteValueARM64_OpLeq8(v)
   779  	case OpLeq8U:
   780  		return rewriteValueARM64_OpLeq8U(v)
   781  	case OpLess16:
   782  		return rewriteValueARM64_OpLess16(v)
   783  	case OpLess16U:
   784  		return rewriteValueARM64_OpLess16U(v)
   785  	case OpLess32:
   786  		return rewriteValueARM64_OpLess32(v)
   787  	case OpLess32F:
   788  		return rewriteValueARM64_OpLess32F(v)
   789  	case OpLess32U:
   790  		return rewriteValueARM64_OpLess32U(v)
   791  	case OpLess64:
   792  		return rewriteValueARM64_OpLess64(v)
   793  	case OpLess64F:
   794  		return rewriteValueARM64_OpLess64F(v)
   795  	case OpLess64U:
   796  		return rewriteValueARM64_OpLess64U(v)
   797  	case OpLess8:
   798  		return rewriteValueARM64_OpLess8(v)
   799  	case OpLess8U:
   800  		return rewriteValueARM64_OpLess8U(v)
   801  	case OpLoad:
   802  		return rewriteValueARM64_OpLoad(v)
   803  	case OpLocalAddr:
   804  		return rewriteValueARM64_OpLocalAddr(v)
   805  	case OpLsh16x16:
   806  		return rewriteValueARM64_OpLsh16x16(v)
   807  	case OpLsh16x32:
   808  		return rewriteValueARM64_OpLsh16x32(v)
   809  	case OpLsh16x64:
   810  		return rewriteValueARM64_OpLsh16x64(v)
   811  	case OpLsh16x8:
   812  		return rewriteValueARM64_OpLsh16x8(v)
   813  	case OpLsh32x16:
   814  		return rewriteValueARM64_OpLsh32x16(v)
   815  	case OpLsh32x32:
   816  		return rewriteValueARM64_OpLsh32x32(v)
   817  	case OpLsh32x64:
   818  		return rewriteValueARM64_OpLsh32x64(v)
   819  	case OpLsh32x8:
   820  		return rewriteValueARM64_OpLsh32x8(v)
   821  	case OpLsh64x16:
   822  		return rewriteValueARM64_OpLsh64x16(v)
   823  	case OpLsh64x32:
   824  		return rewriteValueARM64_OpLsh64x32(v)
   825  	case OpLsh64x64:
   826  		return rewriteValueARM64_OpLsh64x64(v)
   827  	case OpLsh64x8:
   828  		return rewriteValueARM64_OpLsh64x8(v)
   829  	case OpLsh8x16:
   830  		return rewriteValueARM64_OpLsh8x16(v)
   831  	case OpLsh8x32:
   832  		return rewriteValueARM64_OpLsh8x32(v)
   833  	case OpLsh8x64:
   834  		return rewriteValueARM64_OpLsh8x64(v)
   835  	case OpLsh8x8:
   836  		return rewriteValueARM64_OpLsh8x8(v)
   837  	case OpMax32F:
   838  		v.Op = OpARM64FMAXS
   839  		return true
   840  	case OpMax64F:
   841  		v.Op = OpARM64FMAXD
   842  		return true
   843  	case OpMin32F:
   844  		v.Op = OpARM64FMINS
   845  		return true
   846  	case OpMin64F:
   847  		v.Op = OpARM64FMIND
   848  		return true
   849  	case OpMod16:
   850  		return rewriteValueARM64_OpMod16(v)
   851  	case OpMod16u:
   852  		return rewriteValueARM64_OpMod16u(v)
   853  	case OpMod32:
   854  		return rewriteValueARM64_OpMod32(v)
   855  	case OpMod32u:
   856  		v.Op = OpARM64UMODW
   857  		return true
   858  	case OpMod64:
   859  		return rewriteValueARM64_OpMod64(v)
   860  	case OpMod64u:
   861  		v.Op = OpARM64UMOD
   862  		return true
   863  	case OpMod8:
   864  		return rewriteValueARM64_OpMod8(v)
   865  	case OpMod8u:
   866  		return rewriteValueARM64_OpMod8u(v)
   867  	case OpMove:
   868  		return rewriteValueARM64_OpMove(v)
   869  	case OpMul16:
   870  		v.Op = OpARM64MULW
   871  		return true
   872  	case OpMul32:
   873  		v.Op = OpARM64MULW
   874  		return true
   875  	case OpMul32F:
   876  		v.Op = OpARM64FMULS
   877  		return true
   878  	case OpMul64:
   879  		v.Op = OpARM64MUL
   880  		return true
   881  	case OpMul64F:
   882  		v.Op = OpARM64FMULD
   883  		return true
   884  	case OpMul8:
   885  		v.Op = OpARM64MULW
   886  		return true
   887  	case OpNeg16:
   888  		v.Op = OpARM64NEG
   889  		return true
   890  	case OpNeg32:
   891  		v.Op = OpARM64NEG
   892  		return true
   893  	case OpNeg32F:
   894  		v.Op = OpARM64FNEGS
   895  		return true
   896  	case OpNeg64:
   897  		v.Op = OpARM64NEG
   898  		return true
   899  	case OpNeg64F:
   900  		v.Op = OpARM64FNEGD
   901  		return true
   902  	case OpNeg8:
   903  		v.Op = OpARM64NEG
   904  		return true
   905  	case OpNeq16:
   906  		return rewriteValueARM64_OpNeq16(v)
   907  	case OpNeq32:
   908  		return rewriteValueARM64_OpNeq32(v)
   909  	case OpNeq32F:
   910  		return rewriteValueARM64_OpNeq32F(v)
   911  	case OpNeq64:
   912  		return rewriteValueARM64_OpNeq64(v)
   913  	case OpNeq64F:
   914  		return rewriteValueARM64_OpNeq64F(v)
   915  	case OpNeq8:
   916  		return rewriteValueARM64_OpNeq8(v)
   917  	case OpNeqB:
   918  		v.Op = OpARM64XOR
   919  		return true
   920  	case OpNeqPtr:
   921  		return rewriteValueARM64_OpNeqPtr(v)
   922  	case OpNilCheck:
   923  		v.Op = OpARM64LoweredNilCheck
   924  		return true
   925  	case OpNot:
   926  		return rewriteValueARM64_OpNot(v)
   927  	case OpOffPtr:
   928  		return rewriteValueARM64_OpOffPtr(v)
   929  	case OpOr16:
   930  		v.Op = OpARM64OR
   931  		return true
   932  	case OpOr32:
   933  		v.Op = OpARM64OR
   934  		return true
   935  	case OpOr64:
   936  		v.Op = OpARM64OR
   937  		return true
   938  	case OpOr8:
   939  		v.Op = OpARM64OR
   940  		return true
   941  	case OpOrB:
   942  		v.Op = OpARM64OR
   943  		return true
   944  	case OpPanicBounds:
   945  		v.Op = OpARM64LoweredPanicBoundsRR
   946  		return true
   947  	case OpPopCount16:
   948  		return rewriteValueARM64_OpPopCount16(v)
   949  	case OpPopCount32:
   950  		return rewriteValueARM64_OpPopCount32(v)
   951  	case OpPopCount64:
   952  		return rewriteValueARM64_OpPopCount64(v)
   953  	case OpPrefetchCache:
   954  		return rewriteValueARM64_OpPrefetchCache(v)
   955  	case OpPrefetchCacheStreamed:
   956  		return rewriteValueARM64_OpPrefetchCacheStreamed(v)
   957  	case OpPubBarrier:
   958  		return rewriteValueARM64_OpPubBarrier(v)
   959  	case OpRotateLeft16:
   960  		return rewriteValueARM64_OpRotateLeft16(v)
   961  	case OpRotateLeft32:
   962  		return rewriteValueARM64_OpRotateLeft32(v)
   963  	case OpRotateLeft64:
   964  		return rewriteValueARM64_OpRotateLeft64(v)
   965  	case OpRotateLeft8:
   966  		return rewriteValueARM64_OpRotateLeft8(v)
   967  	case OpRound:
   968  		v.Op = OpARM64FRINTAD
   969  		return true
   970  	case OpRound32F:
   971  		v.Op = OpARM64LoweredRound32F
   972  		return true
   973  	case OpRound64F:
   974  		v.Op = OpARM64LoweredRound64F
   975  		return true
   976  	case OpRoundToEven:
   977  		v.Op = OpARM64FRINTND
   978  		return true
   979  	case OpRsh16Ux16:
   980  		return rewriteValueARM64_OpRsh16Ux16(v)
   981  	case OpRsh16Ux32:
   982  		return rewriteValueARM64_OpRsh16Ux32(v)
   983  	case OpRsh16Ux64:
   984  		return rewriteValueARM64_OpRsh16Ux64(v)
   985  	case OpRsh16Ux8:
   986  		return rewriteValueARM64_OpRsh16Ux8(v)
   987  	case OpRsh16x16:
   988  		return rewriteValueARM64_OpRsh16x16(v)
   989  	case OpRsh16x32:
   990  		return rewriteValueARM64_OpRsh16x32(v)
   991  	case OpRsh16x64:
   992  		return rewriteValueARM64_OpRsh16x64(v)
   993  	case OpRsh16x8:
   994  		return rewriteValueARM64_OpRsh16x8(v)
   995  	case OpRsh32Ux16:
   996  		return rewriteValueARM64_OpRsh32Ux16(v)
   997  	case OpRsh32Ux32:
   998  		return rewriteValueARM64_OpRsh32Ux32(v)
   999  	case OpRsh32Ux64:
  1000  		return rewriteValueARM64_OpRsh32Ux64(v)
  1001  	case OpRsh32Ux8:
  1002  		return rewriteValueARM64_OpRsh32Ux8(v)
  1003  	case OpRsh32x16:
  1004  		return rewriteValueARM64_OpRsh32x16(v)
  1005  	case OpRsh32x32:
  1006  		return rewriteValueARM64_OpRsh32x32(v)
  1007  	case OpRsh32x64:
  1008  		return rewriteValueARM64_OpRsh32x64(v)
  1009  	case OpRsh32x8:
  1010  		return rewriteValueARM64_OpRsh32x8(v)
  1011  	case OpRsh64Ux16:
  1012  		return rewriteValueARM64_OpRsh64Ux16(v)
  1013  	case OpRsh64Ux32:
  1014  		return rewriteValueARM64_OpRsh64Ux32(v)
  1015  	case OpRsh64Ux64:
  1016  		return rewriteValueARM64_OpRsh64Ux64(v)
  1017  	case OpRsh64Ux8:
  1018  		return rewriteValueARM64_OpRsh64Ux8(v)
  1019  	case OpRsh64x16:
  1020  		return rewriteValueARM64_OpRsh64x16(v)
  1021  	case OpRsh64x32:
  1022  		return rewriteValueARM64_OpRsh64x32(v)
  1023  	case OpRsh64x64:
  1024  		return rewriteValueARM64_OpRsh64x64(v)
  1025  	case OpRsh64x8:
  1026  		return rewriteValueARM64_OpRsh64x8(v)
  1027  	case OpRsh8Ux16:
  1028  		return rewriteValueARM64_OpRsh8Ux16(v)
  1029  	case OpRsh8Ux32:
  1030  		return rewriteValueARM64_OpRsh8Ux32(v)
  1031  	case OpRsh8Ux64:
  1032  		return rewriteValueARM64_OpRsh8Ux64(v)
  1033  	case OpRsh8Ux8:
  1034  		return rewriteValueARM64_OpRsh8Ux8(v)
  1035  	case OpRsh8x16:
  1036  		return rewriteValueARM64_OpRsh8x16(v)
  1037  	case OpRsh8x32:
  1038  		return rewriteValueARM64_OpRsh8x32(v)
  1039  	case OpRsh8x64:
  1040  		return rewriteValueARM64_OpRsh8x64(v)
  1041  	case OpRsh8x8:
  1042  		return rewriteValueARM64_OpRsh8x8(v)
  1043  	case OpSelect0:
  1044  		return rewriteValueARM64_OpSelect0(v)
  1045  	case OpSelect1:
  1046  		return rewriteValueARM64_OpSelect1(v)
  1047  	case OpSelectN:
  1048  		return rewriteValueARM64_OpSelectN(v)
  1049  	case OpSignExt16to32:
  1050  		v.Op = OpARM64MOVHreg
  1051  		return true
  1052  	case OpSignExt16to64:
  1053  		v.Op = OpARM64MOVHreg
  1054  		return true
  1055  	case OpSignExt32to64:
  1056  		v.Op = OpARM64MOVWreg
  1057  		return true
  1058  	case OpSignExt8to16:
  1059  		v.Op = OpARM64MOVBreg
  1060  		return true
  1061  	case OpSignExt8to32:
  1062  		v.Op = OpARM64MOVBreg
  1063  		return true
  1064  	case OpSignExt8to64:
  1065  		v.Op = OpARM64MOVBreg
  1066  		return true
  1067  	case OpSlicemask:
  1068  		return rewriteValueARM64_OpSlicemask(v)
  1069  	case OpSqrt:
  1070  		v.Op = OpARM64FSQRTD
  1071  		return true
  1072  	case OpSqrt32:
  1073  		v.Op = OpARM64FSQRTS
  1074  		return true
  1075  	case OpStaticCall:
  1076  		v.Op = OpARM64CALLstatic
  1077  		return true
  1078  	case OpStore:
  1079  		return rewriteValueARM64_OpStore(v)
  1080  	case OpSub16:
  1081  		v.Op = OpARM64SUB
  1082  		return true
  1083  	case OpSub32:
  1084  		v.Op = OpARM64SUB
  1085  		return true
  1086  	case OpSub32F:
  1087  		v.Op = OpARM64FSUBS
  1088  		return true
  1089  	case OpSub64:
  1090  		v.Op = OpARM64SUB
  1091  		return true
  1092  	case OpSub64F:
  1093  		v.Op = OpARM64FSUBD
  1094  		return true
  1095  	case OpSub8:
  1096  		v.Op = OpARM64SUB
  1097  		return true
  1098  	case OpSubPtr:
  1099  		v.Op = OpARM64SUB
  1100  		return true
  1101  	case OpTailCall:
  1102  		v.Op = OpARM64CALLtail
  1103  		return true
  1104  	case OpTrunc:
  1105  		v.Op = OpARM64FRINTZD
  1106  		return true
  1107  	case OpTrunc16to8:
  1108  		v.Op = OpCopy
  1109  		return true
  1110  	case OpTrunc32to16:
  1111  		v.Op = OpCopy
  1112  		return true
  1113  	case OpTrunc32to8:
  1114  		v.Op = OpCopy
  1115  		return true
  1116  	case OpTrunc64to16:
  1117  		v.Op = OpCopy
  1118  		return true
  1119  	case OpTrunc64to32:
  1120  		v.Op = OpCopy
  1121  		return true
  1122  	case OpTrunc64to8:
  1123  		v.Op = OpCopy
  1124  		return true
  1125  	case OpWB:
  1126  		v.Op = OpARM64LoweredWB
  1127  		return true
  1128  	case OpXor16:
  1129  		v.Op = OpARM64XOR
  1130  		return true
  1131  	case OpXor32:
  1132  		v.Op = OpARM64XOR
  1133  		return true
  1134  	case OpXor64:
  1135  		v.Op = OpARM64XOR
  1136  		return true
  1137  	case OpXor8:
  1138  		v.Op = OpARM64XOR
  1139  		return true
  1140  	case OpZero:
  1141  		return rewriteValueARM64_OpZero(v)
  1142  	case OpZeroExt16to32:
  1143  		v.Op = OpARM64MOVHUreg
  1144  		return true
  1145  	case OpZeroExt16to64:
  1146  		v.Op = OpARM64MOVHUreg
  1147  		return true
  1148  	case OpZeroExt32to64:
  1149  		v.Op = OpARM64MOVWUreg
  1150  		return true
  1151  	case OpZeroExt8to16:
  1152  		v.Op = OpARM64MOVBUreg
  1153  		return true
  1154  	case OpZeroExt8to32:
  1155  		v.Op = OpARM64MOVBUreg
  1156  		return true
  1157  	case OpZeroExt8to64:
  1158  		v.Op = OpARM64MOVBUreg
  1159  		return true
  1160  	}
  1161  	return false
  1162  }
  1163  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  1164  	v_2 := v.Args[2]
  1165  	v_1 := v.Args[1]
  1166  	v_0 := v.Args[0]
  1167  	b := v.Block
  1168  	typ := &b.Func.Config.Types
  1169  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  1170  	// result: (ADCSflags x y c)
  1171  	for {
  1172  		x := v_0
  1173  		y := v_1
  1174  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1175  			break
  1176  		}
  1177  		v_2_0 := v_2.Args[0]
  1178  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1179  			break
  1180  		}
  1181  		v_2_0_0 := v_2_0.Args[0]
  1182  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  1183  			break
  1184  		}
  1185  		c := v_2_0_0.Args[0]
  1186  		v.reset(OpARM64ADCSflags)
  1187  		v.AddArg3(x, y, c)
  1188  		return true
  1189  	}
  1190  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  1191  	// result: (ADDSflags x y)
  1192  	for {
  1193  		x := v_0
  1194  		y := v_1
  1195  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1196  			break
  1197  		}
  1198  		v_2_0 := v_2.Args[0]
  1199  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1200  			break
  1201  		}
  1202  		v_2_0_0 := v_2_0.Args[0]
  1203  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  1204  			break
  1205  		}
  1206  		v.reset(OpARM64ADDSflags)
  1207  		v.AddArg2(x, y)
  1208  		return true
  1209  	}
  1210  	return false
  1211  }
  1212  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  1213  	v_1 := v.Args[1]
  1214  	v_0 := v.Args[0]
  1215  	b := v.Block
  1216  	// match: (ADD x (MOVDconst <t> [c]))
  1217  	// cond: !t.IsPtr()
  1218  	// result: (ADDconst [c] x)
  1219  	for {
  1220  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1221  			x := v_0
  1222  			if v_1.Op != OpARM64MOVDconst {
  1223  				continue
  1224  			}
  1225  			t := v_1.Type
  1226  			c := auxIntToInt64(v_1.AuxInt)
  1227  			if !(!t.IsPtr()) {
  1228  				continue
  1229  			}
  1230  			v.reset(OpARM64ADDconst)
  1231  			v.AuxInt = int64ToAuxInt(c)
  1232  			v.AddArg(x)
  1233  			return true
  1234  		}
  1235  		break
  1236  	}
  1237  	// match: (ADD a l:(MUL x y))
  1238  	// cond: l.Uses==1 && clobber(l)
  1239  	// result: (MADD a x y)
  1240  	for {
  1241  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1242  			a := v_0
  1243  			l := v_1
  1244  			if l.Op != OpARM64MUL {
  1245  				continue
  1246  			}
  1247  			y := l.Args[1]
  1248  			x := l.Args[0]
  1249  			if !(l.Uses == 1 && clobber(l)) {
  1250  				continue
  1251  			}
  1252  			v.reset(OpARM64MADD)
  1253  			v.AddArg3(a, x, y)
  1254  			return true
  1255  		}
  1256  		break
  1257  	}
  1258  	// match: (ADD a l:(MNEG x y))
  1259  	// cond: l.Uses==1 && clobber(l)
  1260  	// result: (MSUB a x y)
  1261  	for {
  1262  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1263  			a := v_0
  1264  			l := v_1
  1265  			if l.Op != OpARM64MNEG {
  1266  				continue
  1267  			}
  1268  			y := l.Args[1]
  1269  			x := l.Args[0]
  1270  			if !(l.Uses == 1 && clobber(l)) {
  1271  				continue
  1272  			}
  1273  			v.reset(OpARM64MSUB)
  1274  			v.AddArg3(a, x, y)
  1275  			return true
  1276  		}
  1277  		break
  1278  	}
  1279  	// match: (ADD a l:(MULW x y))
  1280  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1281  	// result: (MADDW a x y)
  1282  	for {
  1283  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1284  			a := v_0
  1285  			l := v_1
  1286  			if l.Op != OpARM64MULW {
  1287  				continue
  1288  			}
  1289  			y := l.Args[1]
  1290  			x := l.Args[0]
  1291  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1292  				continue
  1293  			}
  1294  			v.reset(OpARM64MADDW)
  1295  			v.AddArg3(a, x, y)
  1296  			return true
  1297  		}
  1298  		break
  1299  	}
  1300  	// match: (ADD a l:(MNEGW x y))
  1301  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1302  	// result: (MSUBW a x y)
  1303  	for {
  1304  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1305  			a := v_0
  1306  			l := v_1
  1307  			if l.Op != OpARM64MNEGW {
  1308  				continue
  1309  			}
  1310  			y := l.Args[1]
  1311  			x := l.Args[0]
  1312  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1313  				continue
  1314  			}
  1315  			v.reset(OpARM64MSUBW)
  1316  			v.AddArg3(a, x, y)
  1317  			return true
  1318  		}
  1319  		break
  1320  	}
  1321  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  1322  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1323  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1324  	for {
  1325  		t := v.Type
  1326  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1327  			a := v_0
  1328  			p := v_1
  1329  			if p.Op != OpARM64ADDconst {
  1330  				continue
  1331  			}
  1332  			c := auxIntToInt64(p.AuxInt)
  1333  			m := p.Args[0]
  1334  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1335  				continue
  1336  			}
  1337  			v.reset(OpARM64ADDconst)
  1338  			v.AuxInt = int64ToAuxInt(c)
  1339  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1340  			v0.AddArg2(a, m)
  1341  			v.AddArg(v0)
  1342  			return true
  1343  		}
  1344  		break
  1345  	}
  1346  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  1347  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1348  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1349  	for {
  1350  		t := v.Type
  1351  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1352  			a := v_0
  1353  			p := v_1
  1354  			if p.Op != OpARM64ADDconst {
  1355  				continue
  1356  			}
  1357  			c := auxIntToInt64(p.AuxInt)
  1358  			m := p.Args[0]
  1359  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1360  				continue
  1361  			}
  1362  			v.reset(OpARM64ADDconst)
  1363  			v.AuxInt = int64ToAuxInt(c)
  1364  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1365  			v0.AddArg2(a, m)
  1366  			v.AddArg(v0)
  1367  			return true
  1368  		}
  1369  		break
  1370  	}
  1371  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  1372  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1373  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1374  	for {
  1375  		t := v.Type
  1376  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1377  			a := v_0
  1378  			p := v_1
  1379  			if p.Op != OpARM64ADDconst {
  1380  				continue
  1381  			}
  1382  			c := auxIntToInt64(p.AuxInt)
  1383  			m := p.Args[0]
  1384  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1385  				continue
  1386  			}
  1387  			v.reset(OpARM64ADDconst)
  1388  			v.AuxInt = int64ToAuxInt(c)
  1389  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1390  			v0.AddArg2(a, m)
  1391  			v.AddArg(v0)
  1392  			return true
  1393  		}
  1394  		break
  1395  	}
  1396  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  1397  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1398  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1399  	for {
  1400  		t := v.Type
  1401  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1402  			a := v_0
  1403  			p := v_1
  1404  			if p.Op != OpARM64ADDconst {
  1405  				continue
  1406  			}
  1407  			c := auxIntToInt64(p.AuxInt)
  1408  			m := p.Args[0]
  1409  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1410  				continue
  1411  			}
  1412  			v.reset(OpARM64ADDconst)
  1413  			v.AuxInt = int64ToAuxInt(c)
  1414  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1415  			v0.AddArg2(a, m)
  1416  			v.AddArg(v0)
  1417  			return true
  1418  		}
  1419  		break
  1420  	}
  1421  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  1422  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1423  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1424  	for {
  1425  		t := v.Type
  1426  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1427  			a := v_0
  1428  			p := v_1
  1429  			if p.Op != OpARM64SUBconst {
  1430  				continue
  1431  			}
  1432  			c := auxIntToInt64(p.AuxInt)
  1433  			m := p.Args[0]
  1434  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1435  				continue
  1436  			}
  1437  			v.reset(OpARM64SUBconst)
  1438  			v.AuxInt = int64ToAuxInt(c)
  1439  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1440  			v0.AddArg2(a, m)
  1441  			v.AddArg(v0)
  1442  			return true
  1443  		}
  1444  		break
  1445  	}
  1446  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  1447  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1448  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1449  	for {
  1450  		t := v.Type
  1451  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1452  			a := v_0
  1453  			p := v_1
  1454  			if p.Op != OpARM64SUBconst {
  1455  				continue
  1456  			}
  1457  			c := auxIntToInt64(p.AuxInt)
  1458  			m := p.Args[0]
  1459  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1460  				continue
  1461  			}
  1462  			v.reset(OpARM64SUBconst)
  1463  			v.AuxInt = int64ToAuxInt(c)
  1464  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1465  			v0.AddArg2(a, m)
  1466  			v.AddArg(v0)
  1467  			return true
  1468  		}
  1469  		break
  1470  	}
  1471  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  1472  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1473  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1474  	for {
  1475  		t := v.Type
  1476  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1477  			a := v_0
  1478  			p := v_1
  1479  			if p.Op != OpARM64SUBconst {
  1480  				continue
  1481  			}
  1482  			c := auxIntToInt64(p.AuxInt)
  1483  			m := p.Args[0]
  1484  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1485  				continue
  1486  			}
  1487  			v.reset(OpARM64SUBconst)
  1488  			v.AuxInt = int64ToAuxInt(c)
  1489  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1490  			v0.AddArg2(a, m)
  1491  			v.AddArg(v0)
  1492  			return true
  1493  		}
  1494  		break
  1495  	}
  1496  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  1497  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1498  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1499  	for {
  1500  		t := v.Type
  1501  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1502  			a := v_0
  1503  			p := v_1
  1504  			if p.Op != OpARM64SUBconst {
  1505  				continue
  1506  			}
  1507  			c := auxIntToInt64(p.AuxInt)
  1508  			m := p.Args[0]
  1509  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1510  				continue
  1511  			}
  1512  			v.reset(OpARM64SUBconst)
  1513  			v.AuxInt = int64ToAuxInt(c)
  1514  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1515  			v0.AddArg2(a, m)
  1516  			v.AddArg(v0)
  1517  			return true
  1518  		}
  1519  		break
  1520  	}
  1521  	// match: (ADD x (NEG y))
  1522  	// result: (SUB x y)
  1523  	for {
  1524  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1525  			x := v_0
  1526  			if v_1.Op != OpARM64NEG {
  1527  				continue
  1528  			}
  1529  			y := v_1.Args[0]
  1530  			v.reset(OpARM64SUB)
  1531  			v.AddArg2(x, y)
  1532  			return true
  1533  		}
  1534  		break
  1535  	}
  1536  	// match: (ADD x0 x1:(SLLconst [c] y))
  1537  	// cond: clobberIfDead(x1)
  1538  	// result: (ADDshiftLL x0 y [c])
  1539  	for {
  1540  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1541  			x0 := v_0
  1542  			x1 := v_1
  1543  			if x1.Op != OpARM64SLLconst {
  1544  				continue
  1545  			}
  1546  			c := auxIntToInt64(x1.AuxInt)
  1547  			y := x1.Args[0]
  1548  			if !(clobberIfDead(x1)) {
  1549  				continue
  1550  			}
  1551  			v.reset(OpARM64ADDshiftLL)
  1552  			v.AuxInt = int64ToAuxInt(c)
  1553  			v.AddArg2(x0, y)
  1554  			return true
  1555  		}
  1556  		break
  1557  	}
  1558  	// match: (ADD x0 x1:(SRLconst [c] y))
  1559  	// cond: clobberIfDead(x1)
  1560  	// result: (ADDshiftRL x0 y [c])
  1561  	for {
  1562  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1563  			x0 := v_0
  1564  			x1 := v_1
  1565  			if x1.Op != OpARM64SRLconst {
  1566  				continue
  1567  			}
  1568  			c := auxIntToInt64(x1.AuxInt)
  1569  			y := x1.Args[0]
  1570  			if !(clobberIfDead(x1)) {
  1571  				continue
  1572  			}
  1573  			v.reset(OpARM64ADDshiftRL)
  1574  			v.AuxInt = int64ToAuxInt(c)
  1575  			v.AddArg2(x0, y)
  1576  			return true
  1577  		}
  1578  		break
  1579  	}
  1580  	// match: (ADD x0 x1:(SRAconst [c] y))
  1581  	// cond: clobberIfDead(x1)
  1582  	// result: (ADDshiftRA x0 y [c])
  1583  	for {
  1584  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1585  			x0 := v_0
  1586  			x1 := v_1
  1587  			if x1.Op != OpARM64SRAconst {
  1588  				continue
  1589  			}
  1590  			c := auxIntToInt64(x1.AuxInt)
  1591  			y := x1.Args[0]
  1592  			if !(clobberIfDead(x1)) {
  1593  				continue
  1594  			}
  1595  			v.reset(OpARM64ADDshiftRA)
  1596  			v.AuxInt = int64ToAuxInt(c)
  1597  			v.AddArg2(x0, y)
  1598  			return true
  1599  		}
  1600  		break
  1601  	}
  1602  	// match: (ADD x0 x1:(ANDshiftRA x2:(SLLconst [sl] y) z [63]))
  1603  	// cond: x1.Uses == 1 && x2.Uses == 1
  1604  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  1605  	for {
  1606  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1607  			x0 := v_0
  1608  			x1 := v_1
  1609  			if x1.Op != OpARM64ANDshiftRA || auxIntToInt64(x1.AuxInt) != 63 {
  1610  				continue
  1611  			}
  1612  			z := x1.Args[1]
  1613  			x2 := x1.Args[0]
  1614  			if x2.Op != OpARM64SLLconst {
  1615  				continue
  1616  			}
  1617  			sl := auxIntToInt64(x2.AuxInt)
  1618  			y := x2.Args[0]
  1619  			if !(x1.Uses == 1 && x2.Uses == 1) {
  1620  				continue
  1621  			}
  1622  			v.reset(OpARM64ADDshiftLL)
  1623  			v.AuxInt = int64ToAuxInt(sl)
  1624  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  1625  			v0.AuxInt = int64ToAuxInt(63)
  1626  			v0.AddArg2(y, z)
  1627  			v.AddArg2(x0, v0)
  1628  			return true
  1629  		}
  1630  		break
  1631  	}
  1632  	// match: (ADD x0 x1:(ANDshiftLL x2:(SRAconst [63] z) y [sl]))
  1633  	// cond: x1.Uses == 1 && x2.Uses == 1
  1634  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  1635  	for {
  1636  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1637  			x0 := v_0
  1638  			x1 := v_1
  1639  			if x1.Op != OpARM64ANDshiftLL {
  1640  				continue
  1641  			}
  1642  			sl := auxIntToInt64(x1.AuxInt)
  1643  			y := x1.Args[1]
  1644  			x2 := x1.Args[0]
  1645  			if x2.Op != OpARM64SRAconst || auxIntToInt64(x2.AuxInt) != 63 {
  1646  				continue
  1647  			}
  1648  			z := x2.Args[0]
  1649  			if !(x1.Uses == 1 && x2.Uses == 1) {
  1650  				continue
  1651  			}
  1652  			v.reset(OpARM64ADDshiftLL)
  1653  			v.AuxInt = int64ToAuxInt(sl)
  1654  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  1655  			v0.AuxInt = int64ToAuxInt(63)
  1656  			v0.AddArg2(y, z)
  1657  			v.AddArg2(x0, v0)
  1658  			return true
  1659  		}
  1660  		break
  1661  	}
  1662  	return false
  1663  }
  1664  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  1665  	v_1 := v.Args[1]
  1666  	v_0 := v.Args[0]
  1667  	// match: (ADDSflags x (MOVDconst [c]))
  1668  	// result: (ADDSconstflags [c] x)
  1669  	for {
  1670  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1671  			x := v_0
  1672  			if v_1.Op != OpARM64MOVDconst {
  1673  				continue
  1674  			}
  1675  			c := auxIntToInt64(v_1.AuxInt)
  1676  			v.reset(OpARM64ADDSconstflags)
  1677  			v.AuxInt = int64ToAuxInt(c)
  1678  			v.AddArg(x)
  1679  			return true
  1680  		}
  1681  		break
  1682  	}
  1683  	return false
  1684  }
  1685  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  1686  	v_0 := v.Args[0]
  1687  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  1688  	// cond: is32Bit(off1+int64(off2))
  1689  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  1690  	for {
  1691  		off1 := auxIntToInt64(v.AuxInt)
  1692  		if v_0.Op != OpARM64MOVDaddr {
  1693  			break
  1694  		}
  1695  		off2 := auxIntToInt32(v_0.AuxInt)
  1696  		sym := auxToSym(v_0.Aux)
  1697  		ptr := v_0.Args[0]
  1698  		if !(is32Bit(off1 + int64(off2))) {
  1699  			break
  1700  		}
  1701  		v.reset(OpARM64MOVDaddr)
  1702  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  1703  		v.Aux = symToAux(sym)
  1704  		v.AddArg(ptr)
  1705  		return true
  1706  	}
  1707  	// match: (ADDconst [c] y)
  1708  	// cond: c < 0
  1709  	// result: (SUBconst [-c] y)
  1710  	for {
  1711  		c := auxIntToInt64(v.AuxInt)
  1712  		y := v_0
  1713  		if !(c < 0) {
  1714  			break
  1715  		}
  1716  		v.reset(OpARM64SUBconst)
  1717  		v.AuxInt = int64ToAuxInt(-c)
  1718  		v.AddArg(y)
  1719  		return true
  1720  	}
  1721  	// match: (ADDconst [0] x)
  1722  	// result: x
  1723  	for {
  1724  		if auxIntToInt64(v.AuxInt) != 0 {
  1725  			break
  1726  		}
  1727  		x := v_0
  1728  		v.copyOf(x)
  1729  		return true
  1730  	}
  1731  	// match: (ADDconst [c] (MOVDconst [d]))
  1732  	// result: (MOVDconst [c+d])
  1733  	for {
  1734  		c := auxIntToInt64(v.AuxInt)
  1735  		if v_0.Op != OpARM64MOVDconst {
  1736  			break
  1737  		}
  1738  		d := auxIntToInt64(v_0.AuxInt)
  1739  		v.reset(OpARM64MOVDconst)
  1740  		v.AuxInt = int64ToAuxInt(c + d)
  1741  		return true
  1742  	}
  1743  	// match: (ADDconst [c] (ADDconst [d] x))
  1744  	// result: (ADDconst [c+d] x)
  1745  	for {
  1746  		c := auxIntToInt64(v.AuxInt)
  1747  		if v_0.Op != OpARM64ADDconst {
  1748  			break
  1749  		}
  1750  		d := auxIntToInt64(v_0.AuxInt)
  1751  		x := v_0.Args[0]
  1752  		v.reset(OpARM64ADDconst)
  1753  		v.AuxInt = int64ToAuxInt(c + d)
  1754  		v.AddArg(x)
  1755  		return true
  1756  	}
  1757  	// match: (ADDconst [c] (SUBconst [d] x))
  1758  	// result: (ADDconst [c-d] x)
  1759  	for {
  1760  		c := auxIntToInt64(v.AuxInt)
  1761  		if v_0.Op != OpARM64SUBconst {
  1762  			break
  1763  		}
  1764  		d := auxIntToInt64(v_0.AuxInt)
  1765  		x := v_0.Args[0]
  1766  		v.reset(OpARM64ADDconst)
  1767  		v.AuxInt = int64ToAuxInt(c - d)
  1768  		v.AddArg(x)
  1769  		return true
  1770  	}
  1771  	return false
  1772  }
  1773  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  1774  	v_1 := v.Args[1]
  1775  	v_0 := v.Args[0]
  1776  	b := v.Block
  1777  	typ := &b.Func.Config.Types
  1778  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  1779  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  1780  	for {
  1781  		d := auxIntToInt64(v.AuxInt)
  1782  		if v_0.Op != OpARM64MOVDconst {
  1783  			break
  1784  		}
  1785  		c := auxIntToInt64(v_0.AuxInt)
  1786  		x := v_1
  1787  		v.reset(OpARM64ADDconst)
  1788  		v.AuxInt = int64ToAuxInt(c)
  1789  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  1790  		v0.AuxInt = int64ToAuxInt(d)
  1791  		v0.AddArg(x)
  1792  		v.AddArg(v0)
  1793  		return true
  1794  	}
  1795  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  1796  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  1797  	for {
  1798  		d := auxIntToInt64(v.AuxInt)
  1799  		x := v_0
  1800  		if v_1.Op != OpARM64MOVDconst {
  1801  			break
  1802  		}
  1803  		c := auxIntToInt64(v_1.AuxInt)
  1804  		v.reset(OpARM64ADDconst)
  1805  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  1806  		v.AddArg(x)
  1807  		return true
  1808  	}
  1809  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  1810  	// result: (REV16W x)
  1811  	for {
  1812  		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) {
  1813  			break
  1814  		}
  1815  		x := v_0.Args[0]
  1816  		if x != v_1 {
  1817  			break
  1818  		}
  1819  		v.reset(OpARM64REV16W)
  1820  		v.AddArg(x)
  1821  		return true
  1822  	}
  1823  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  1824  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1825  	// result: (REV16W x)
  1826  	for {
  1827  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  1828  			break
  1829  		}
  1830  		v_0_0 := v_0.Args[0]
  1831  		if v_0_0.Op != OpARM64ANDconst {
  1832  			break
  1833  		}
  1834  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1835  		x := v_0_0.Args[0]
  1836  		if v_1.Op != OpARM64ANDconst {
  1837  			break
  1838  		}
  1839  		c2 := auxIntToInt64(v_1.AuxInt)
  1840  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1841  			break
  1842  		}
  1843  		v.reset(OpARM64REV16W)
  1844  		v.AddArg(x)
  1845  		return true
  1846  	}
  1847  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1848  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  1849  	// result: (REV16 x)
  1850  	for {
  1851  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1852  			break
  1853  		}
  1854  		v_0_0 := v_0.Args[0]
  1855  		if v_0_0.Op != OpARM64ANDconst {
  1856  			break
  1857  		}
  1858  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1859  		x := v_0_0.Args[0]
  1860  		if v_1.Op != OpARM64ANDconst {
  1861  			break
  1862  		}
  1863  		c2 := auxIntToInt64(v_1.AuxInt)
  1864  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1865  			break
  1866  		}
  1867  		v.reset(OpARM64REV16)
  1868  		v.AddArg(x)
  1869  		return true
  1870  	}
  1871  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1872  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  1873  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  1874  	for {
  1875  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1876  			break
  1877  		}
  1878  		v_0_0 := v_0.Args[0]
  1879  		if v_0_0.Op != OpARM64ANDconst {
  1880  			break
  1881  		}
  1882  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1883  		x := v_0_0.Args[0]
  1884  		if v_1.Op != OpARM64ANDconst {
  1885  			break
  1886  		}
  1887  		c2 := auxIntToInt64(v_1.AuxInt)
  1888  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1889  			break
  1890  		}
  1891  		v.reset(OpARM64REV16)
  1892  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  1893  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  1894  		v0.AddArg(x)
  1895  		v.AddArg(v0)
  1896  		return true
  1897  	}
  1898  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  1899  	// result: (EXTRconst [64-c] x2 x)
  1900  	for {
  1901  		c := auxIntToInt64(v.AuxInt)
  1902  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  1903  			break
  1904  		}
  1905  		x := v_0.Args[0]
  1906  		x2 := v_1
  1907  		v.reset(OpARM64EXTRconst)
  1908  		v.AuxInt = int64ToAuxInt(64 - c)
  1909  		v.AddArg2(x2, x)
  1910  		return true
  1911  	}
  1912  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  1913  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  1914  	// result: (EXTRWconst [32-c] x2 x)
  1915  	for {
  1916  		t := v.Type
  1917  		c := auxIntToInt64(v.AuxInt)
  1918  		if v_0.Op != OpARM64UBFX {
  1919  			break
  1920  		}
  1921  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  1922  		x := v_0.Args[0]
  1923  		x2 := v_1
  1924  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  1925  			break
  1926  		}
  1927  		v.reset(OpARM64EXTRWconst)
  1928  		v.AuxInt = int64ToAuxInt(32 - c)
  1929  		v.AddArg2(x2, x)
  1930  		return true
  1931  	}
  1932  	return false
  1933  }
  1934  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  1935  	v_1 := v.Args[1]
  1936  	v_0 := v.Args[0]
  1937  	b := v.Block
  1938  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  1939  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  1940  	for {
  1941  		d := auxIntToInt64(v.AuxInt)
  1942  		if v_0.Op != OpARM64MOVDconst {
  1943  			break
  1944  		}
  1945  		c := auxIntToInt64(v_0.AuxInt)
  1946  		x := v_1
  1947  		v.reset(OpARM64ADDconst)
  1948  		v.AuxInt = int64ToAuxInt(c)
  1949  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  1950  		v0.AuxInt = int64ToAuxInt(d)
  1951  		v0.AddArg(x)
  1952  		v.AddArg(v0)
  1953  		return true
  1954  	}
  1955  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  1956  	// result: (ADDconst x [c>>uint64(d)])
  1957  	for {
  1958  		d := auxIntToInt64(v.AuxInt)
  1959  		x := v_0
  1960  		if v_1.Op != OpARM64MOVDconst {
  1961  			break
  1962  		}
  1963  		c := auxIntToInt64(v_1.AuxInt)
  1964  		v.reset(OpARM64ADDconst)
  1965  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  1966  		v.AddArg(x)
  1967  		return true
  1968  	}
  1969  	return false
  1970  }
  1971  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  1972  	v_1 := v.Args[1]
  1973  	v_0 := v.Args[0]
  1974  	b := v.Block
  1975  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  1976  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  1977  	for {
  1978  		d := auxIntToInt64(v.AuxInt)
  1979  		if v_0.Op != OpARM64MOVDconst {
  1980  			break
  1981  		}
  1982  		c := auxIntToInt64(v_0.AuxInt)
  1983  		x := v_1
  1984  		v.reset(OpARM64ADDconst)
  1985  		v.AuxInt = int64ToAuxInt(c)
  1986  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  1987  		v0.AuxInt = int64ToAuxInt(d)
  1988  		v0.AddArg(x)
  1989  		v.AddArg(v0)
  1990  		return true
  1991  	}
  1992  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  1993  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  1994  	for {
  1995  		d := auxIntToInt64(v.AuxInt)
  1996  		x := v_0
  1997  		if v_1.Op != OpARM64MOVDconst {
  1998  			break
  1999  		}
  2000  		c := auxIntToInt64(v_1.AuxInt)
  2001  		v.reset(OpARM64ADDconst)
  2002  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2003  		v.AddArg(x)
  2004  		return true
  2005  	}
  2006  	return false
  2007  }
  2008  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  2009  	v_1 := v.Args[1]
  2010  	v_0 := v.Args[0]
  2011  	// match: (AND x (MOVDconst [c]))
  2012  	// result: (ANDconst [c] x)
  2013  	for {
  2014  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2015  			x := v_0
  2016  			if v_1.Op != OpARM64MOVDconst {
  2017  				continue
  2018  			}
  2019  			c := auxIntToInt64(v_1.AuxInt)
  2020  			v.reset(OpARM64ANDconst)
  2021  			v.AuxInt = int64ToAuxInt(c)
  2022  			v.AddArg(x)
  2023  			return true
  2024  		}
  2025  		break
  2026  	}
  2027  	// match: (AND x x)
  2028  	// result: x
  2029  	for {
  2030  		x := v_0
  2031  		if x != v_1 {
  2032  			break
  2033  		}
  2034  		v.copyOf(x)
  2035  		return true
  2036  	}
  2037  	// match: (AND x (MVN y))
  2038  	// result: (BIC x y)
  2039  	for {
  2040  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2041  			x := v_0
  2042  			if v_1.Op != OpARM64MVN {
  2043  				continue
  2044  			}
  2045  			y := v_1.Args[0]
  2046  			v.reset(OpARM64BIC)
  2047  			v.AddArg2(x, y)
  2048  			return true
  2049  		}
  2050  		break
  2051  	}
  2052  	// match: (AND x0 x1:(SLLconst [c] y))
  2053  	// cond: clobberIfDead(x1)
  2054  	// result: (ANDshiftLL x0 y [c])
  2055  	for {
  2056  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2057  			x0 := v_0
  2058  			x1 := v_1
  2059  			if x1.Op != OpARM64SLLconst {
  2060  				continue
  2061  			}
  2062  			c := auxIntToInt64(x1.AuxInt)
  2063  			y := x1.Args[0]
  2064  			if !(clobberIfDead(x1)) {
  2065  				continue
  2066  			}
  2067  			v.reset(OpARM64ANDshiftLL)
  2068  			v.AuxInt = int64ToAuxInt(c)
  2069  			v.AddArg2(x0, y)
  2070  			return true
  2071  		}
  2072  		break
  2073  	}
  2074  	// match: (AND x0 x1:(SRLconst [c] y))
  2075  	// cond: clobberIfDead(x1)
  2076  	// result: (ANDshiftRL x0 y [c])
  2077  	for {
  2078  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2079  			x0 := v_0
  2080  			x1 := v_1
  2081  			if x1.Op != OpARM64SRLconst {
  2082  				continue
  2083  			}
  2084  			c := auxIntToInt64(x1.AuxInt)
  2085  			y := x1.Args[0]
  2086  			if !(clobberIfDead(x1)) {
  2087  				continue
  2088  			}
  2089  			v.reset(OpARM64ANDshiftRL)
  2090  			v.AuxInt = int64ToAuxInt(c)
  2091  			v.AddArg2(x0, y)
  2092  			return true
  2093  		}
  2094  		break
  2095  	}
  2096  	// match: (AND x0 x1:(SRAconst [c] y))
  2097  	// cond: clobberIfDead(x1)
  2098  	// result: (ANDshiftRA x0 y [c])
  2099  	for {
  2100  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2101  			x0 := v_0
  2102  			x1 := v_1
  2103  			if x1.Op != OpARM64SRAconst {
  2104  				continue
  2105  			}
  2106  			c := auxIntToInt64(x1.AuxInt)
  2107  			y := x1.Args[0]
  2108  			if !(clobberIfDead(x1)) {
  2109  				continue
  2110  			}
  2111  			v.reset(OpARM64ANDshiftRA)
  2112  			v.AuxInt = int64ToAuxInt(c)
  2113  			v.AddArg2(x0, y)
  2114  			return true
  2115  		}
  2116  		break
  2117  	}
  2118  	// match: (AND x0 x1:(RORconst [c] y))
  2119  	// cond: clobberIfDead(x1)
  2120  	// result: (ANDshiftRO x0 y [c])
  2121  	for {
  2122  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2123  			x0 := v_0
  2124  			x1 := v_1
  2125  			if x1.Op != OpARM64RORconst {
  2126  				continue
  2127  			}
  2128  			c := auxIntToInt64(x1.AuxInt)
  2129  			y := x1.Args[0]
  2130  			if !(clobberIfDead(x1)) {
  2131  				continue
  2132  			}
  2133  			v.reset(OpARM64ANDshiftRO)
  2134  			v.AuxInt = int64ToAuxInt(c)
  2135  			v.AddArg2(x0, y)
  2136  			return true
  2137  		}
  2138  		break
  2139  	}
  2140  	return false
  2141  }
  2142  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  2143  	v_0 := v.Args[0]
  2144  	// match: (ANDconst [0] _)
  2145  	// result: (MOVDconst [0])
  2146  	for {
  2147  		if auxIntToInt64(v.AuxInt) != 0 {
  2148  			break
  2149  		}
  2150  		v.reset(OpARM64MOVDconst)
  2151  		v.AuxInt = int64ToAuxInt(0)
  2152  		return true
  2153  	}
  2154  	// match: (ANDconst [-1] x)
  2155  	// result: x
  2156  	for {
  2157  		if auxIntToInt64(v.AuxInt) != -1 {
  2158  			break
  2159  		}
  2160  		x := v_0
  2161  		v.copyOf(x)
  2162  		return true
  2163  	}
  2164  	// match: (ANDconst [c] (MOVDconst [d]))
  2165  	// result: (MOVDconst [c&d])
  2166  	for {
  2167  		c := auxIntToInt64(v.AuxInt)
  2168  		if v_0.Op != OpARM64MOVDconst {
  2169  			break
  2170  		}
  2171  		d := auxIntToInt64(v_0.AuxInt)
  2172  		v.reset(OpARM64MOVDconst)
  2173  		v.AuxInt = int64ToAuxInt(c & d)
  2174  		return true
  2175  	}
  2176  	// match: (ANDconst [c] (ANDconst [d] x))
  2177  	// result: (ANDconst [c&d] x)
  2178  	for {
  2179  		c := auxIntToInt64(v.AuxInt)
  2180  		if v_0.Op != OpARM64ANDconst {
  2181  			break
  2182  		}
  2183  		d := auxIntToInt64(v_0.AuxInt)
  2184  		x := v_0.Args[0]
  2185  		v.reset(OpARM64ANDconst)
  2186  		v.AuxInt = int64ToAuxInt(c & d)
  2187  		v.AddArg(x)
  2188  		return true
  2189  	}
  2190  	// match: (ANDconst [c] (MOVWUreg x))
  2191  	// result: (ANDconst [c&(1<<32-1)] x)
  2192  	for {
  2193  		c := auxIntToInt64(v.AuxInt)
  2194  		if v_0.Op != OpARM64MOVWUreg {
  2195  			break
  2196  		}
  2197  		x := v_0.Args[0]
  2198  		v.reset(OpARM64ANDconst)
  2199  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  2200  		v.AddArg(x)
  2201  		return true
  2202  	}
  2203  	// match: (ANDconst [c] (MOVHUreg x))
  2204  	// result: (ANDconst [c&(1<<16-1)] x)
  2205  	for {
  2206  		c := auxIntToInt64(v.AuxInt)
  2207  		if v_0.Op != OpARM64MOVHUreg {
  2208  			break
  2209  		}
  2210  		x := v_0.Args[0]
  2211  		v.reset(OpARM64ANDconst)
  2212  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  2213  		v.AddArg(x)
  2214  		return true
  2215  	}
  2216  	// match: (ANDconst [c] (MOVBUreg x))
  2217  	// result: (ANDconst [c&(1<<8-1)] x)
  2218  	for {
  2219  		c := auxIntToInt64(v.AuxInt)
  2220  		if v_0.Op != OpARM64MOVBUreg {
  2221  			break
  2222  		}
  2223  		x := v_0.Args[0]
  2224  		v.reset(OpARM64ANDconst)
  2225  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  2226  		v.AddArg(x)
  2227  		return true
  2228  	}
  2229  	// match: (ANDconst [ac] (SLLconst [sc] x))
  2230  	// cond: isARM64BFMask(sc, ac, sc)
  2231  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  2232  	for {
  2233  		ac := auxIntToInt64(v.AuxInt)
  2234  		if v_0.Op != OpARM64SLLconst {
  2235  			break
  2236  		}
  2237  		sc := auxIntToInt64(v_0.AuxInt)
  2238  		x := v_0.Args[0]
  2239  		if !(isARM64BFMask(sc, ac, sc)) {
  2240  			break
  2241  		}
  2242  		v.reset(OpARM64UBFIZ)
  2243  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  2244  		v.AddArg(x)
  2245  		return true
  2246  	}
  2247  	// match: (ANDconst [ac] (SRLconst [sc] x))
  2248  	// cond: isARM64BFMask(sc, ac, 0)
  2249  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  2250  	for {
  2251  		ac := auxIntToInt64(v.AuxInt)
  2252  		if v_0.Op != OpARM64SRLconst {
  2253  			break
  2254  		}
  2255  		sc := auxIntToInt64(v_0.AuxInt)
  2256  		x := v_0.Args[0]
  2257  		if !(isARM64BFMask(sc, ac, 0)) {
  2258  			break
  2259  		}
  2260  		v.reset(OpARM64UBFX)
  2261  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  2262  		v.AddArg(x)
  2263  		return true
  2264  	}
  2265  	// match: (ANDconst [c] (UBFX [bfc] x))
  2266  	// cond: isARM64BFMask(0, c, 0)
  2267  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  2268  	for {
  2269  		c := auxIntToInt64(v.AuxInt)
  2270  		if v_0.Op != OpARM64UBFX {
  2271  			break
  2272  		}
  2273  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  2274  		x := v_0.Args[0]
  2275  		if !(isARM64BFMask(0, c, 0)) {
  2276  			break
  2277  		}
  2278  		v.reset(OpARM64UBFX)
  2279  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  2280  		v.AddArg(x)
  2281  		return true
  2282  	}
  2283  	return false
  2284  }
  2285  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  2286  	v_1 := v.Args[1]
  2287  	v_0 := v.Args[0]
  2288  	b := v.Block
  2289  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  2290  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  2291  	for {
  2292  		d := auxIntToInt64(v.AuxInt)
  2293  		if v_0.Op != OpARM64MOVDconst {
  2294  			break
  2295  		}
  2296  		c := auxIntToInt64(v_0.AuxInt)
  2297  		x := v_1
  2298  		v.reset(OpARM64ANDconst)
  2299  		v.AuxInt = int64ToAuxInt(c)
  2300  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2301  		v0.AuxInt = int64ToAuxInt(d)
  2302  		v0.AddArg(x)
  2303  		v.AddArg(v0)
  2304  		return true
  2305  	}
  2306  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  2307  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  2308  	for {
  2309  		d := auxIntToInt64(v.AuxInt)
  2310  		x := v_0
  2311  		if v_1.Op != OpARM64MOVDconst {
  2312  			break
  2313  		}
  2314  		c := auxIntToInt64(v_1.AuxInt)
  2315  		v.reset(OpARM64ANDconst)
  2316  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2317  		v.AddArg(x)
  2318  		return true
  2319  	}
  2320  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  2321  	// result: y
  2322  	for {
  2323  		c := auxIntToInt64(v.AuxInt)
  2324  		y := v_0
  2325  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  2326  			break
  2327  		}
  2328  		x := y.Args[0]
  2329  		if x != v_1 {
  2330  			break
  2331  		}
  2332  		v.copyOf(y)
  2333  		return true
  2334  	}
  2335  	return false
  2336  }
  2337  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  2338  	v_1 := v.Args[1]
  2339  	v_0 := v.Args[0]
  2340  	b := v.Block
  2341  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  2342  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  2343  	for {
  2344  		d := auxIntToInt64(v.AuxInt)
  2345  		if v_0.Op != OpARM64MOVDconst {
  2346  			break
  2347  		}
  2348  		c := auxIntToInt64(v_0.AuxInt)
  2349  		x := v_1
  2350  		v.reset(OpARM64ANDconst)
  2351  		v.AuxInt = int64ToAuxInt(c)
  2352  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2353  		v0.AuxInt = int64ToAuxInt(d)
  2354  		v0.AddArg(x)
  2355  		v.AddArg(v0)
  2356  		return true
  2357  	}
  2358  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  2359  	// result: (ANDconst x [c>>uint64(d)])
  2360  	for {
  2361  		d := auxIntToInt64(v.AuxInt)
  2362  		x := v_0
  2363  		if v_1.Op != OpARM64MOVDconst {
  2364  			break
  2365  		}
  2366  		c := auxIntToInt64(v_1.AuxInt)
  2367  		v.reset(OpARM64ANDconst)
  2368  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2369  		v.AddArg(x)
  2370  		return true
  2371  	}
  2372  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  2373  	// result: y
  2374  	for {
  2375  		c := auxIntToInt64(v.AuxInt)
  2376  		y := v_0
  2377  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  2378  			break
  2379  		}
  2380  		x := y.Args[0]
  2381  		if x != v_1 {
  2382  			break
  2383  		}
  2384  		v.copyOf(y)
  2385  		return true
  2386  	}
  2387  	return false
  2388  }
  2389  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  2390  	v_1 := v.Args[1]
  2391  	v_0 := v.Args[0]
  2392  	b := v.Block
  2393  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  2394  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  2395  	for {
  2396  		d := auxIntToInt64(v.AuxInt)
  2397  		if v_0.Op != OpARM64MOVDconst {
  2398  			break
  2399  		}
  2400  		c := auxIntToInt64(v_0.AuxInt)
  2401  		x := v_1
  2402  		v.reset(OpARM64ANDconst)
  2403  		v.AuxInt = int64ToAuxInt(c)
  2404  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2405  		v0.AuxInt = int64ToAuxInt(d)
  2406  		v0.AddArg(x)
  2407  		v.AddArg(v0)
  2408  		return true
  2409  	}
  2410  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  2411  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  2412  	for {
  2413  		d := auxIntToInt64(v.AuxInt)
  2414  		x := v_0
  2415  		if v_1.Op != OpARM64MOVDconst {
  2416  			break
  2417  		}
  2418  		c := auxIntToInt64(v_1.AuxInt)
  2419  		v.reset(OpARM64ANDconst)
  2420  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2421  		v.AddArg(x)
  2422  		return true
  2423  	}
  2424  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  2425  	// result: y
  2426  	for {
  2427  		c := auxIntToInt64(v.AuxInt)
  2428  		y := v_0
  2429  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  2430  			break
  2431  		}
  2432  		x := y.Args[0]
  2433  		if x != v_1 {
  2434  			break
  2435  		}
  2436  		v.copyOf(y)
  2437  		return true
  2438  	}
  2439  	return false
  2440  }
  2441  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  2442  	v_1 := v.Args[1]
  2443  	v_0 := v.Args[0]
  2444  	b := v.Block
  2445  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  2446  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  2447  	for {
  2448  		d := auxIntToInt64(v.AuxInt)
  2449  		if v_0.Op != OpARM64MOVDconst {
  2450  			break
  2451  		}
  2452  		c := auxIntToInt64(v_0.AuxInt)
  2453  		x := v_1
  2454  		v.reset(OpARM64ANDconst)
  2455  		v.AuxInt = int64ToAuxInt(c)
  2456  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  2457  		v0.AuxInt = int64ToAuxInt(d)
  2458  		v0.AddArg(x)
  2459  		v.AddArg(v0)
  2460  		return true
  2461  	}
  2462  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  2463  	// result: (ANDconst x [rotateRight64(c, d)])
  2464  	for {
  2465  		d := auxIntToInt64(v.AuxInt)
  2466  		x := v_0
  2467  		if v_1.Op != OpARM64MOVDconst {
  2468  			break
  2469  		}
  2470  		c := auxIntToInt64(v_1.AuxInt)
  2471  		v.reset(OpARM64ANDconst)
  2472  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  2473  		v.AddArg(x)
  2474  		return true
  2475  	}
  2476  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  2477  	// result: y
  2478  	for {
  2479  		c := auxIntToInt64(v.AuxInt)
  2480  		y := v_0
  2481  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  2482  			break
  2483  		}
  2484  		x := y.Args[0]
  2485  		if x != v_1 {
  2486  			break
  2487  		}
  2488  		v.copyOf(y)
  2489  		return true
  2490  	}
  2491  	return false
  2492  }
  2493  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  2494  	v_1 := v.Args[1]
  2495  	v_0 := v.Args[0]
  2496  	// match: (BIC x (MOVDconst [c]))
  2497  	// result: (ANDconst [^c] x)
  2498  	for {
  2499  		x := v_0
  2500  		if v_1.Op != OpARM64MOVDconst {
  2501  			break
  2502  		}
  2503  		c := auxIntToInt64(v_1.AuxInt)
  2504  		v.reset(OpARM64ANDconst)
  2505  		v.AuxInt = int64ToAuxInt(^c)
  2506  		v.AddArg(x)
  2507  		return true
  2508  	}
  2509  	// match: (BIC x x)
  2510  	// result: (MOVDconst [0])
  2511  	for {
  2512  		x := v_0
  2513  		if x != v_1 {
  2514  			break
  2515  		}
  2516  		v.reset(OpARM64MOVDconst)
  2517  		v.AuxInt = int64ToAuxInt(0)
  2518  		return true
  2519  	}
  2520  	// match: (BIC x0 x1:(SLLconst [c] y))
  2521  	// cond: clobberIfDead(x1)
  2522  	// result: (BICshiftLL x0 y [c])
  2523  	for {
  2524  		x0 := v_0
  2525  		x1 := v_1
  2526  		if x1.Op != OpARM64SLLconst {
  2527  			break
  2528  		}
  2529  		c := auxIntToInt64(x1.AuxInt)
  2530  		y := x1.Args[0]
  2531  		if !(clobberIfDead(x1)) {
  2532  			break
  2533  		}
  2534  		v.reset(OpARM64BICshiftLL)
  2535  		v.AuxInt = int64ToAuxInt(c)
  2536  		v.AddArg2(x0, y)
  2537  		return true
  2538  	}
  2539  	// match: (BIC x0 x1:(SRLconst [c] y))
  2540  	// cond: clobberIfDead(x1)
  2541  	// result: (BICshiftRL x0 y [c])
  2542  	for {
  2543  		x0 := v_0
  2544  		x1 := v_1
  2545  		if x1.Op != OpARM64SRLconst {
  2546  			break
  2547  		}
  2548  		c := auxIntToInt64(x1.AuxInt)
  2549  		y := x1.Args[0]
  2550  		if !(clobberIfDead(x1)) {
  2551  			break
  2552  		}
  2553  		v.reset(OpARM64BICshiftRL)
  2554  		v.AuxInt = int64ToAuxInt(c)
  2555  		v.AddArg2(x0, y)
  2556  		return true
  2557  	}
  2558  	// match: (BIC x0 x1:(SRAconst [c] y))
  2559  	// cond: clobberIfDead(x1)
  2560  	// result: (BICshiftRA x0 y [c])
  2561  	for {
  2562  		x0 := v_0
  2563  		x1 := v_1
  2564  		if x1.Op != OpARM64SRAconst {
  2565  			break
  2566  		}
  2567  		c := auxIntToInt64(x1.AuxInt)
  2568  		y := x1.Args[0]
  2569  		if !(clobberIfDead(x1)) {
  2570  			break
  2571  		}
  2572  		v.reset(OpARM64BICshiftRA)
  2573  		v.AuxInt = int64ToAuxInt(c)
  2574  		v.AddArg2(x0, y)
  2575  		return true
  2576  	}
  2577  	// match: (BIC x0 x1:(RORconst [c] y))
  2578  	// cond: clobberIfDead(x1)
  2579  	// result: (BICshiftRO x0 y [c])
  2580  	for {
  2581  		x0 := v_0
  2582  		x1 := v_1
  2583  		if x1.Op != OpARM64RORconst {
  2584  			break
  2585  		}
  2586  		c := auxIntToInt64(x1.AuxInt)
  2587  		y := x1.Args[0]
  2588  		if !(clobberIfDead(x1)) {
  2589  			break
  2590  		}
  2591  		v.reset(OpARM64BICshiftRO)
  2592  		v.AuxInt = int64ToAuxInt(c)
  2593  		v.AddArg2(x0, y)
  2594  		return true
  2595  	}
  2596  	return false
  2597  }
  2598  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  2599  	v_1 := v.Args[1]
  2600  	v_0 := v.Args[0]
  2601  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  2602  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  2603  	for {
  2604  		d := auxIntToInt64(v.AuxInt)
  2605  		x := v_0
  2606  		if v_1.Op != OpARM64MOVDconst {
  2607  			break
  2608  		}
  2609  		c := auxIntToInt64(v_1.AuxInt)
  2610  		v.reset(OpARM64ANDconst)
  2611  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  2612  		v.AddArg(x)
  2613  		return true
  2614  	}
  2615  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  2616  	// result: (MOVDconst [0])
  2617  	for {
  2618  		c := auxIntToInt64(v.AuxInt)
  2619  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  2620  			break
  2621  		}
  2622  		x := v_0.Args[0]
  2623  		if x != v_1 {
  2624  			break
  2625  		}
  2626  		v.reset(OpARM64MOVDconst)
  2627  		v.AuxInt = int64ToAuxInt(0)
  2628  		return true
  2629  	}
  2630  	return false
  2631  }
  2632  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  2633  	v_1 := v.Args[1]
  2634  	v_0 := v.Args[0]
  2635  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  2636  	// result: (ANDconst x [^(c>>uint64(d))])
  2637  	for {
  2638  		d := auxIntToInt64(v.AuxInt)
  2639  		x := v_0
  2640  		if v_1.Op != OpARM64MOVDconst {
  2641  			break
  2642  		}
  2643  		c := auxIntToInt64(v_1.AuxInt)
  2644  		v.reset(OpARM64ANDconst)
  2645  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  2646  		v.AddArg(x)
  2647  		return true
  2648  	}
  2649  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  2650  	// result: (MOVDconst [0])
  2651  	for {
  2652  		c := auxIntToInt64(v.AuxInt)
  2653  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  2654  			break
  2655  		}
  2656  		x := v_0.Args[0]
  2657  		if x != v_1 {
  2658  			break
  2659  		}
  2660  		v.reset(OpARM64MOVDconst)
  2661  		v.AuxInt = int64ToAuxInt(0)
  2662  		return true
  2663  	}
  2664  	return false
  2665  }
  2666  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  2667  	v_1 := v.Args[1]
  2668  	v_0 := v.Args[0]
  2669  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  2670  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  2671  	for {
  2672  		d := auxIntToInt64(v.AuxInt)
  2673  		x := v_0
  2674  		if v_1.Op != OpARM64MOVDconst {
  2675  			break
  2676  		}
  2677  		c := auxIntToInt64(v_1.AuxInt)
  2678  		v.reset(OpARM64ANDconst)
  2679  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  2680  		v.AddArg(x)
  2681  		return true
  2682  	}
  2683  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  2684  	// result: (MOVDconst [0])
  2685  	for {
  2686  		c := auxIntToInt64(v.AuxInt)
  2687  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  2688  			break
  2689  		}
  2690  		x := v_0.Args[0]
  2691  		if x != v_1 {
  2692  			break
  2693  		}
  2694  		v.reset(OpARM64MOVDconst)
  2695  		v.AuxInt = int64ToAuxInt(0)
  2696  		return true
  2697  	}
  2698  	return false
  2699  }
  2700  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  2701  	v_1 := v.Args[1]
  2702  	v_0 := v.Args[0]
  2703  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  2704  	// result: (ANDconst x [^rotateRight64(c, d)])
  2705  	for {
  2706  		d := auxIntToInt64(v.AuxInt)
  2707  		x := v_0
  2708  		if v_1.Op != OpARM64MOVDconst {
  2709  			break
  2710  		}
  2711  		c := auxIntToInt64(v_1.AuxInt)
  2712  		v.reset(OpARM64ANDconst)
  2713  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  2714  		v.AddArg(x)
  2715  		return true
  2716  	}
  2717  	// match: (BICshiftRO (RORconst x [c]) x [c])
  2718  	// result: (MOVDconst [0])
  2719  	for {
  2720  		c := auxIntToInt64(v.AuxInt)
  2721  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  2722  			break
  2723  		}
  2724  		x := v_0.Args[0]
  2725  		if x != v_1 {
  2726  			break
  2727  		}
  2728  		v.reset(OpARM64MOVDconst)
  2729  		v.AuxInt = int64ToAuxInt(0)
  2730  		return true
  2731  	}
  2732  	return false
  2733  }
  2734  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  2735  	v_1 := v.Args[1]
  2736  	v_0 := v.Args[0]
  2737  	// match: (CMN x (MOVDconst [c]))
  2738  	// result: (CMNconst [c] x)
  2739  	for {
  2740  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2741  			x := v_0
  2742  			if v_1.Op != OpARM64MOVDconst {
  2743  				continue
  2744  			}
  2745  			c := auxIntToInt64(v_1.AuxInt)
  2746  			v.reset(OpARM64CMNconst)
  2747  			v.AuxInt = int64ToAuxInt(c)
  2748  			v.AddArg(x)
  2749  			return true
  2750  		}
  2751  		break
  2752  	}
  2753  	// match: (CMN x0 x1:(SLLconst [c] y))
  2754  	// cond: clobberIfDead(x1)
  2755  	// result: (CMNshiftLL x0 y [c])
  2756  	for {
  2757  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2758  			x0 := v_0
  2759  			x1 := v_1
  2760  			if x1.Op != OpARM64SLLconst {
  2761  				continue
  2762  			}
  2763  			c := auxIntToInt64(x1.AuxInt)
  2764  			y := x1.Args[0]
  2765  			if !(clobberIfDead(x1)) {
  2766  				continue
  2767  			}
  2768  			v.reset(OpARM64CMNshiftLL)
  2769  			v.AuxInt = int64ToAuxInt(c)
  2770  			v.AddArg2(x0, y)
  2771  			return true
  2772  		}
  2773  		break
  2774  	}
  2775  	// match: (CMN x0 x1:(SRLconst [c] y))
  2776  	// cond: clobberIfDead(x1)
  2777  	// result: (CMNshiftRL x0 y [c])
  2778  	for {
  2779  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2780  			x0 := v_0
  2781  			x1 := v_1
  2782  			if x1.Op != OpARM64SRLconst {
  2783  				continue
  2784  			}
  2785  			c := auxIntToInt64(x1.AuxInt)
  2786  			y := x1.Args[0]
  2787  			if !(clobberIfDead(x1)) {
  2788  				continue
  2789  			}
  2790  			v.reset(OpARM64CMNshiftRL)
  2791  			v.AuxInt = int64ToAuxInt(c)
  2792  			v.AddArg2(x0, y)
  2793  			return true
  2794  		}
  2795  		break
  2796  	}
  2797  	// match: (CMN x0 x1:(SRAconst [c] y))
  2798  	// cond: clobberIfDead(x1)
  2799  	// result: (CMNshiftRA x0 y [c])
  2800  	for {
  2801  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2802  			x0 := v_0
  2803  			x1 := v_1
  2804  			if x1.Op != OpARM64SRAconst {
  2805  				continue
  2806  			}
  2807  			c := auxIntToInt64(x1.AuxInt)
  2808  			y := x1.Args[0]
  2809  			if !(clobberIfDead(x1)) {
  2810  				continue
  2811  			}
  2812  			v.reset(OpARM64CMNshiftRA)
  2813  			v.AuxInt = int64ToAuxInt(c)
  2814  			v.AddArg2(x0, y)
  2815  			return true
  2816  		}
  2817  		break
  2818  	}
  2819  	return false
  2820  }
  2821  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  2822  	v_1 := v.Args[1]
  2823  	v_0 := v.Args[0]
  2824  	// match: (CMNW x (MOVDconst [c]))
  2825  	// result: (CMNWconst [int32(c)] x)
  2826  	for {
  2827  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2828  			x := v_0
  2829  			if v_1.Op != OpARM64MOVDconst {
  2830  				continue
  2831  			}
  2832  			c := auxIntToInt64(v_1.AuxInt)
  2833  			v.reset(OpARM64CMNWconst)
  2834  			v.AuxInt = int32ToAuxInt(int32(c))
  2835  			v.AddArg(x)
  2836  			return true
  2837  		}
  2838  		break
  2839  	}
  2840  	return false
  2841  }
  2842  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  2843  	v_0 := v.Args[0]
  2844  	// match: (CMNWconst [c] y)
  2845  	// cond: c < 0 && c != -1<<31
  2846  	// result: (CMPWconst [-c] y)
  2847  	for {
  2848  		c := auxIntToInt32(v.AuxInt)
  2849  		y := v_0
  2850  		if !(c < 0 && c != -1<<31) {
  2851  			break
  2852  		}
  2853  		v.reset(OpARM64CMPWconst)
  2854  		v.AuxInt = int32ToAuxInt(-c)
  2855  		v.AddArg(y)
  2856  		return true
  2857  	}
  2858  	// match: (CMNWconst (MOVDconst [x]) [y])
  2859  	// result: (FlagConstant [addFlags32(int32(x),y)])
  2860  	for {
  2861  		y := auxIntToInt32(v.AuxInt)
  2862  		if v_0.Op != OpARM64MOVDconst {
  2863  			break
  2864  		}
  2865  		x := auxIntToInt64(v_0.AuxInt)
  2866  		v.reset(OpARM64FlagConstant)
  2867  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  2868  		return true
  2869  	}
  2870  	return false
  2871  }
  2872  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  2873  	v_0 := v.Args[0]
  2874  	// match: (CMNconst [c] y)
  2875  	// cond: c < 0 && c != -1<<63
  2876  	// result: (CMPconst [-c] y)
  2877  	for {
  2878  		c := auxIntToInt64(v.AuxInt)
  2879  		y := v_0
  2880  		if !(c < 0 && c != -1<<63) {
  2881  			break
  2882  		}
  2883  		v.reset(OpARM64CMPconst)
  2884  		v.AuxInt = int64ToAuxInt(-c)
  2885  		v.AddArg(y)
  2886  		return true
  2887  	}
  2888  	// match: (CMNconst (MOVDconst [x]) [y])
  2889  	// result: (FlagConstant [addFlags64(x,y)])
  2890  	for {
  2891  		y := auxIntToInt64(v.AuxInt)
  2892  		if v_0.Op != OpARM64MOVDconst {
  2893  			break
  2894  		}
  2895  		x := auxIntToInt64(v_0.AuxInt)
  2896  		v.reset(OpARM64FlagConstant)
  2897  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  2898  		return true
  2899  	}
  2900  	return false
  2901  }
  2902  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  2903  	v_1 := v.Args[1]
  2904  	v_0 := v.Args[0]
  2905  	b := v.Block
  2906  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  2907  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  2908  	for {
  2909  		d := auxIntToInt64(v.AuxInt)
  2910  		if v_0.Op != OpARM64MOVDconst {
  2911  			break
  2912  		}
  2913  		c := auxIntToInt64(v_0.AuxInt)
  2914  		x := v_1
  2915  		v.reset(OpARM64CMNconst)
  2916  		v.AuxInt = int64ToAuxInt(c)
  2917  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2918  		v0.AuxInt = int64ToAuxInt(d)
  2919  		v0.AddArg(x)
  2920  		v.AddArg(v0)
  2921  		return true
  2922  	}
  2923  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  2924  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  2925  	for {
  2926  		d := auxIntToInt64(v.AuxInt)
  2927  		x := v_0
  2928  		if v_1.Op != OpARM64MOVDconst {
  2929  			break
  2930  		}
  2931  		c := auxIntToInt64(v_1.AuxInt)
  2932  		v.reset(OpARM64CMNconst)
  2933  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2934  		v.AddArg(x)
  2935  		return true
  2936  	}
  2937  	return false
  2938  }
  2939  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  2940  	v_1 := v.Args[1]
  2941  	v_0 := v.Args[0]
  2942  	b := v.Block
  2943  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  2944  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  2945  	for {
  2946  		d := auxIntToInt64(v.AuxInt)
  2947  		if v_0.Op != OpARM64MOVDconst {
  2948  			break
  2949  		}
  2950  		c := auxIntToInt64(v_0.AuxInt)
  2951  		x := v_1
  2952  		v.reset(OpARM64CMNconst)
  2953  		v.AuxInt = int64ToAuxInt(c)
  2954  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2955  		v0.AuxInt = int64ToAuxInt(d)
  2956  		v0.AddArg(x)
  2957  		v.AddArg(v0)
  2958  		return true
  2959  	}
  2960  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  2961  	// result: (CMNconst x [c>>uint64(d)])
  2962  	for {
  2963  		d := auxIntToInt64(v.AuxInt)
  2964  		x := v_0
  2965  		if v_1.Op != OpARM64MOVDconst {
  2966  			break
  2967  		}
  2968  		c := auxIntToInt64(v_1.AuxInt)
  2969  		v.reset(OpARM64CMNconst)
  2970  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2971  		v.AddArg(x)
  2972  		return true
  2973  	}
  2974  	return false
  2975  }
  2976  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  2977  	v_1 := v.Args[1]
  2978  	v_0 := v.Args[0]
  2979  	b := v.Block
  2980  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  2981  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  2982  	for {
  2983  		d := auxIntToInt64(v.AuxInt)
  2984  		if v_0.Op != OpARM64MOVDconst {
  2985  			break
  2986  		}
  2987  		c := auxIntToInt64(v_0.AuxInt)
  2988  		x := v_1
  2989  		v.reset(OpARM64CMNconst)
  2990  		v.AuxInt = int64ToAuxInt(c)
  2991  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2992  		v0.AuxInt = int64ToAuxInt(d)
  2993  		v0.AddArg(x)
  2994  		v.AddArg(v0)
  2995  		return true
  2996  	}
  2997  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  2998  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  2999  	for {
  3000  		d := auxIntToInt64(v.AuxInt)
  3001  		x := v_0
  3002  		if v_1.Op != OpARM64MOVDconst {
  3003  			break
  3004  		}
  3005  		c := auxIntToInt64(v_1.AuxInt)
  3006  		v.reset(OpARM64CMNconst)
  3007  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3008  		v.AddArg(x)
  3009  		return true
  3010  	}
  3011  	return false
  3012  }
  3013  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  3014  	v_1 := v.Args[1]
  3015  	v_0 := v.Args[0]
  3016  	b := v.Block
  3017  	// match: (CMP x (MOVDconst [c]))
  3018  	// result: (CMPconst [c] x)
  3019  	for {
  3020  		x := v_0
  3021  		if v_1.Op != OpARM64MOVDconst {
  3022  			break
  3023  		}
  3024  		c := auxIntToInt64(v_1.AuxInt)
  3025  		v.reset(OpARM64CMPconst)
  3026  		v.AuxInt = int64ToAuxInt(c)
  3027  		v.AddArg(x)
  3028  		return true
  3029  	}
  3030  	// match: (CMP (MOVDconst [c]) x)
  3031  	// result: (InvertFlags (CMPconst [c] x))
  3032  	for {
  3033  		if v_0.Op != OpARM64MOVDconst {
  3034  			break
  3035  		}
  3036  		c := auxIntToInt64(v_0.AuxInt)
  3037  		x := v_1
  3038  		v.reset(OpARM64InvertFlags)
  3039  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3040  		v0.AuxInt = int64ToAuxInt(c)
  3041  		v0.AddArg(x)
  3042  		v.AddArg(v0)
  3043  		return true
  3044  	}
  3045  	// match: (CMP x y)
  3046  	// cond: canonLessThan(x,y)
  3047  	// result: (InvertFlags (CMP y x))
  3048  	for {
  3049  		x := v_0
  3050  		y := v_1
  3051  		if !(canonLessThan(x, y)) {
  3052  			break
  3053  		}
  3054  		v.reset(OpARM64InvertFlags)
  3055  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  3056  		v0.AddArg2(y, x)
  3057  		v.AddArg(v0)
  3058  		return true
  3059  	}
  3060  	// match: (CMP x0 x1:(SLLconst [c] y))
  3061  	// cond: clobberIfDead(x1)
  3062  	// result: (CMPshiftLL x0 y [c])
  3063  	for {
  3064  		x0 := v_0
  3065  		x1 := v_1
  3066  		if x1.Op != OpARM64SLLconst {
  3067  			break
  3068  		}
  3069  		c := auxIntToInt64(x1.AuxInt)
  3070  		y := x1.Args[0]
  3071  		if !(clobberIfDead(x1)) {
  3072  			break
  3073  		}
  3074  		v.reset(OpARM64CMPshiftLL)
  3075  		v.AuxInt = int64ToAuxInt(c)
  3076  		v.AddArg2(x0, y)
  3077  		return true
  3078  	}
  3079  	// match: (CMP x0:(SLLconst [c] y) x1)
  3080  	// cond: clobberIfDead(x0)
  3081  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  3082  	for {
  3083  		x0 := v_0
  3084  		if x0.Op != OpARM64SLLconst {
  3085  			break
  3086  		}
  3087  		c := auxIntToInt64(x0.AuxInt)
  3088  		y := x0.Args[0]
  3089  		x1 := v_1
  3090  		if !(clobberIfDead(x0)) {
  3091  			break
  3092  		}
  3093  		v.reset(OpARM64InvertFlags)
  3094  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  3095  		v0.AuxInt = int64ToAuxInt(c)
  3096  		v0.AddArg2(x1, y)
  3097  		v.AddArg(v0)
  3098  		return true
  3099  	}
  3100  	// match: (CMP x0 x1:(SRLconst [c] y))
  3101  	// cond: clobberIfDead(x1)
  3102  	// result: (CMPshiftRL x0 y [c])
  3103  	for {
  3104  		x0 := v_0
  3105  		x1 := v_1
  3106  		if x1.Op != OpARM64SRLconst {
  3107  			break
  3108  		}
  3109  		c := auxIntToInt64(x1.AuxInt)
  3110  		y := x1.Args[0]
  3111  		if !(clobberIfDead(x1)) {
  3112  			break
  3113  		}
  3114  		v.reset(OpARM64CMPshiftRL)
  3115  		v.AuxInt = int64ToAuxInt(c)
  3116  		v.AddArg2(x0, y)
  3117  		return true
  3118  	}
  3119  	// match: (CMP x0:(SRLconst [c] y) x1)
  3120  	// cond: clobberIfDead(x0)
  3121  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  3122  	for {
  3123  		x0 := v_0
  3124  		if x0.Op != OpARM64SRLconst {
  3125  			break
  3126  		}
  3127  		c := auxIntToInt64(x0.AuxInt)
  3128  		y := x0.Args[0]
  3129  		x1 := v_1
  3130  		if !(clobberIfDead(x0)) {
  3131  			break
  3132  		}
  3133  		v.reset(OpARM64InvertFlags)
  3134  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  3135  		v0.AuxInt = int64ToAuxInt(c)
  3136  		v0.AddArg2(x1, y)
  3137  		v.AddArg(v0)
  3138  		return true
  3139  	}
  3140  	// match: (CMP x0 x1:(SRAconst [c] y))
  3141  	// cond: clobberIfDead(x1)
  3142  	// result: (CMPshiftRA x0 y [c])
  3143  	for {
  3144  		x0 := v_0
  3145  		x1 := v_1
  3146  		if x1.Op != OpARM64SRAconst {
  3147  			break
  3148  		}
  3149  		c := auxIntToInt64(x1.AuxInt)
  3150  		y := x1.Args[0]
  3151  		if !(clobberIfDead(x1)) {
  3152  			break
  3153  		}
  3154  		v.reset(OpARM64CMPshiftRA)
  3155  		v.AuxInt = int64ToAuxInt(c)
  3156  		v.AddArg2(x0, y)
  3157  		return true
  3158  	}
  3159  	// match: (CMP x0:(SRAconst [c] y) x1)
  3160  	// cond: clobberIfDead(x0)
  3161  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  3162  	for {
  3163  		x0 := v_0
  3164  		if x0.Op != OpARM64SRAconst {
  3165  			break
  3166  		}
  3167  		c := auxIntToInt64(x0.AuxInt)
  3168  		y := x0.Args[0]
  3169  		x1 := v_1
  3170  		if !(clobberIfDead(x0)) {
  3171  			break
  3172  		}
  3173  		v.reset(OpARM64InvertFlags)
  3174  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  3175  		v0.AuxInt = int64ToAuxInt(c)
  3176  		v0.AddArg2(x1, y)
  3177  		v.AddArg(v0)
  3178  		return true
  3179  	}
  3180  	return false
  3181  }
  3182  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  3183  	v_1 := v.Args[1]
  3184  	v_0 := v.Args[0]
  3185  	b := v.Block
  3186  	// match: (CMPW x (MOVDconst [c]))
  3187  	// result: (CMPWconst [int32(c)] x)
  3188  	for {
  3189  		x := v_0
  3190  		if v_1.Op != OpARM64MOVDconst {
  3191  			break
  3192  		}
  3193  		c := auxIntToInt64(v_1.AuxInt)
  3194  		v.reset(OpARM64CMPWconst)
  3195  		v.AuxInt = int32ToAuxInt(int32(c))
  3196  		v.AddArg(x)
  3197  		return true
  3198  	}
  3199  	// match: (CMPW (MOVDconst [c]) x)
  3200  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  3201  	for {
  3202  		if v_0.Op != OpARM64MOVDconst {
  3203  			break
  3204  		}
  3205  		c := auxIntToInt64(v_0.AuxInt)
  3206  		x := v_1
  3207  		v.reset(OpARM64InvertFlags)
  3208  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  3209  		v0.AuxInt = int32ToAuxInt(int32(c))
  3210  		v0.AddArg(x)
  3211  		v.AddArg(v0)
  3212  		return true
  3213  	}
  3214  	// match: (CMPW x y)
  3215  	// cond: canonLessThan(x,y)
  3216  	// result: (InvertFlags (CMPW y x))
  3217  	for {
  3218  		x := v_0
  3219  		y := v_1
  3220  		if !(canonLessThan(x, y)) {
  3221  			break
  3222  		}
  3223  		v.reset(OpARM64InvertFlags)
  3224  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  3225  		v0.AddArg2(y, x)
  3226  		v.AddArg(v0)
  3227  		return true
  3228  	}
  3229  	return false
  3230  }
  3231  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  3232  	v_0 := v.Args[0]
  3233  	// match: (CMPWconst [c] y)
  3234  	// cond: c < 0 && c != -1<<31
  3235  	// result: (CMNWconst [-c] y)
  3236  	for {
  3237  		c := auxIntToInt32(v.AuxInt)
  3238  		y := v_0
  3239  		if !(c < 0 && c != -1<<31) {
  3240  			break
  3241  		}
  3242  		v.reset(OpARM64CMNWconst)
  3243  		v.AuxInt = int32ToAuxInt(-c)
  3244  		v.AddArg(y)
  3245  		return true
  3246  	}
  3247  	// match: (CMPWconst (MOVDconst [x]) [y])
  3248  	// result: (FlagConstant [subFlags32(int32(x),y)])
  3249  	for {
  3250  		y := auxIntToInt32(v.AuxInt)
  3251  		if v_0.Op != OpARM64MOVDconst {
  3252  			break
  3253  		}
  3254  		x := auxIntToInt64(v_0.AuxInt)
  3255  		v.reset(OpARM64FlagConstant)
  3256  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  3257  		return true
  3258  	}
  3259  	// match: (CMPWconst (MOVBUreg _) [c])
  3260  	// cond: 0xff < c
  3261  	// result: (FlagConstant [subFlags64(0,1)])
  3262  	for {
  3263  		c := auxIntToInt32(v.AuxInt)
  3264  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3265  			break
  3266  		}
  3267  		v.reset(OpARM64FlagConstant)
  3268  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3269  		return true
  3270  	}
  3271  	// match: (CMPWconst (MOVHUreg _) [c])
  3272  	// cond: 0xffff < c
  3273  	// result: (FlagConstant [subFlags64(0,1)])
  3274  	for {
  3275  		c := auxIntToInt32(v.AuxInt)
  3276  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3277  			break
  3278  		}
  3279  		v.reset(OpARM64FlagConstant)
  3280  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3281  		return true
  3282  	}
  3283  	return false
  3284  }
  3285  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  3286  	v_0 := v.Args[0]
  3287  	// match: (CMPconst [c] y)
  3288  	// cond: c < 0 && c != -1<<63
  3289  	// result: (CMNconst [-c] y)
  3290  	for {
  3291  		c := auxIntToInt64(v.AuxInt)
  3292  		y := v_0
  3293  		if !(c < 0 && c != -1<<63) {
  3294  			break
  3295  		}
  3296  		v.reset(OpARM64CMNconst)
  3297  		v.AuxInt = int64ToAuxInt(-c)
  3298  		v.AddArg(y)
  3299  		return true
  3300  	}
  3301  	// match: (CMPconst (MOVDconst [x]) [y])
  3302  	// result: (FlagConstant [subFlags64(x,y)])
  3303  	for {
  3304  		y := auxIntToInt64(v.AuxInt)
  3305  		if v_0.Op != OpARM64MOVDconst {
  3306  			break
  3307  		}
  3308  		x := auxIntToInt64(v_0.AuxInt)
  3309  		v.reset(OpARM64FlagConstant)
  3310  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  3311  		return true
  3312  	}
  3313  	// match: (CMPconst (MOVBUreg _) [c])
  3314  	// cond: 0xff < c
  3315  	// result: (FlagConstant [subFlags64(0,1)])
  3316  	for {
  3317  		c := auxIntToInt64(v.AuxInt)
  3318  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3319  			break
  3320  		}
  3321  		v.reset(OpARM64FlagConstant)
  3322  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3323  		return true
  3324  	}
  3325  	// match: (CMPconst (MOVHUreg _) [c])
  3326  	// cond: 0xffff < c
  3327  	// result: (FlagConstant [subFlags64(0,1)])
  3328  	for {
  3329  		c := auxIntToInt64(v.AuxInt)
  3330  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3331  			break
  3332  		}
  3333  		v.reset(OpARM64FlagConstant)
  3334  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3335  		return true
  3336  	}
  3337  	// match: (CMPconst (MOVWUreg _) [c])
  3338  	// cond: 0xffffffff < c
  3339  	// result: (FlagConstant [subFlags64(0,1)])
  3340  	for {
  3341  		c := auxIntToInt64(v.AuxInt)
  3342  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  3343  			break
  3344  		}
  3345  		v.reset(OpARM64FlagConstant)
  3346  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3347  		return true
  3348  	}
  3349  	// match: (CMPconst (ANDconst _ [m]) [n])
  3350  	// cond: 0 <= m && m < n
  3351  	// result: (FlagConstant [subFlags64(0,1)])
  3352  	for {
  3353  		n := auxIntToInt64(v.AuxInt)
  3354  		if v_0.Op != OpARM64ANDconst {
  3355  			break
  3356  		}
  3357  		m := auxIntToInt64(v_0.AuxInt)
  3358  		if !(0 <= m && m < n) {
  3359  			break
  3360  		}
  3361  		v.reset(OpARM64FlagConstant)
  3362  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3363  		return true
  3364  	}
  3365  	// match: (CMPconst (SRLconst _ [c]) [n])
  3366  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  3367  	// result: (FlagConstant [subFlags64(0,1)])
  3368  	for {
  3369  		n := auxIntToInt64(v.AuxInt)
  3370  		if v_0.Op != OpARM64SRLconst {
  3371  			break
  3372  		}
  3373  		c := auxIntToInt64(v_0.AuxInt)
  3374  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  3375  			break
  3376  		}
  3377  		v.reset(OpARM64FlagConstant)
  3378  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3379  		return true
  3380  	}
  3381  	return false
  3382  }
  3383  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  3384  	v_1 := v.Args[1]
  3385  	v_0 := v.Args[0]
  3386  	b := v.Block
  3387  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  3388  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  3389  	for {
  3390  		d := auxIntToInt64(v.AuxInt)
  3391  		if v_0.Op != OpARM64MOVDconst {
  3392  			break
  3393  		}
  3394  		c := auxIntToInt64(v_0.AuxInt)
  3395  		x := v_1
  3396  		v.reset(OpARM64InvertFlags)
  3397  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3398  		v0.AuxInt = int64ToAuxInt(c)
  3399  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3400  		v1.AuxInt = int64ToAuxInt(d)
  3401  		v1.AddArg(x)
  3402  		v0.AddArg(v1)
  3403  		v.AddArg(v0)
  3404  		return true
  3405  	}
  3406  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  3407  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  3408  	for {
  3409  		d := auxIntToInt64(v.AuxInt)
  3410  		x := v_0
  3411  		if v_1.Op != OpARM64MOVDconst {
  3412  			break
  3413  		}
  3414  		c := auxIntToInt64(v_1.AuxInt)
  3415  		v.reset(OpARM64CMPconst)
  3416  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3417  		v.AddArg(x)
  3418  		return true
  3419  	}
  3420  	return false
  3421  }
  3422  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  3423  	v_1 := v.Args[1]
  3424  	v_0 := v.Args[0]
  3425  	b := v.Block
  3426  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  3427  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  3428  	for {
  3429  		d := auxIntToInt64(v.AuxInt)
  3430  		if v_0.Op != OpARM64MOVDconst {
  3431  			break
  3432  		}
  3433  		c := auxIntToInt64(v_0.AuxInt)
  3434  		x := v_1
  3435  		v.reset(OpARM64InvertFlags)
  3436  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3437  		v0.AuxInt = int64ToAuxInt(c)
  3438  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3439  		v1.AuxInt = int64ToAuxInt(d)
  3440  		v1.AddArg(x)
  3441  		v0.AddArg(v1)
  3442  		v.AddArg(v0)
  3443  		return true
  3444  	}
  3445  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  3446  	// result: (CMPconst x [c>>uint64(d)])
  3447  	for {
  3448  		d := auxIntToInt64(v.AuxInt)
  3449  		x := v_0
  3450  		if v_1.Op != OpARM64MOVDconst {
  3451  			break
  3452  		}
  3453  		c := auxIntToInt64(v_1.AuxInt)
  3454  		v.reset(OpARM64CMPconst)
  3455  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3456  		v.AddArg(x)
  3457  		return true
  3458  	}
  3459  	return false
  3460  }
  3461  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  3462  	v_1 := v.Args[1]
  3463  	v_0 := v.Args[0]
  3464  	b := v.Block
  3465  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  3466  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  3467  	for {
  3468  		d := auxIntToInt64(v.AuxInt)
  3469  		if v_0.Op != OpARM64MOVDconst {
  3470  			break
  3471  		}
  3472  		c := auxIntToInt64(v_0.AuxInt)
  3473  		x := v_1
  3474  		v.reset(OpARM64InvertFlags)
  3475  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3476  		v0.AuxInt = int64ToAuxInt(c)
  3477  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3478  		v1.AuxInt = int64ToAuxInt(d)
  3479  		v1.AddArg(x)
  3480  		v0.AddArg(v1)
  3481  		v.AddArg(v0)
  3482  		return true
  3483  	}
  3484  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  3485  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  3486  	for {
  3487  		d := auxIntToInt64(v.AuxInt)
  3488  		x := v_0
  3489  		if v_1.Op != OpARM64MOVDconst {
  3490  			break
  3491  		}
  3492  		c := auxIntToInt64(v_1.AuxInt)
  3493  		v.reset(OpARM64CMPconst)
  3494  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3495  		v.AddArg(x)
  3496  		return true
  3497  	}
  3498  	return false
  3499  }
  3500  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  3501  	v_2 := v.Args[2]
  3502  	v_1 := v.Args[1]
  3503  	v_0 := v.Args[0]
  3504  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  3505  	// result: (CSETM [cc] flag)
  3506  	for {
  3507  		cc := auxIntToOp(v.AuxInt)
  3508  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3509  			break
  3510  		}
  3511  		flag := v_2
  3512  		v.reset(OpARM64CSETM)
  3513  		v.AuxInt = opToAuxInt(cc)
  3514  		v.AddArg(flag)
  3515  		return true
  3516  	}
  3517  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  3518  	// result: (CSETM [arm64Negate(cc)] flag)
  3519  	for {
  3520  		cc := auxIntToOp(v.AuxInt)
  3521  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  3522  			break
  3523  		}
  3524  		flag := v_2
  3525  		v.reset(OpARM64CSETM)
  3526  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3527  		v.AddArg(flag)
  3528  		return true
  3529  	}
  3530  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  3531  	// result: (CSEL0 [cc] x flag)
  3532  	for {
  3533  		cc := auxIntToOp(v.AuxInt)
  3534  		x := v_0
  3535  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3536  			break
  3537  		}
  3538  		flag := v_2
  3539  		v.reset(OpARM64CSEL0)
  3540  		v.AuxInt = opToAuxInt(cc)
  3541  		v.AddArg2(x, flag)
  3542  		return true
  3543  	}
  3544  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  3545  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  3546  	for {
  3547  		cc := auxIntToOp(v.AuxInt)
  3548  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  3549  			break
  3550  		}
  3551  		y := v_1
  3552  		flag := v_2
  3553  		v.reset(OpARM64CSEL0)
  3554  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3555  		v.AddArg2(y, flag)
  3556  		return true
  3557  	}
  3558  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  3559  	// result: (CSINC [cc] x a flag)
  3560  	for {
  3561  		cc := auxIntToOp(v.AuxInt)
  3562  		x := v_0
  3563  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  3564  			break
  3565  		}
  3566  		a := v_1.Args[0]
  3567  		flag := v_2
  3568  		v.reset(OpARM64CSINC)
  3569  		v.AuxInt = opToAuxInt(cc)
  3570  		v.AddArg3(x, a, flag)
  3571  		return true
  3572  	}
  3573  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  3574  	// result: (CSINC [arm64Negate(cc)] x a flag)
  3575  	for {
  3576  		cc := auxIntToOp(v.AuxInt)
  3577  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  3578  			break
  3579  		}
  3580  		a := v_0.Args[0]
  3581  		x := v_1
  3582  		flag := v_2
  3583  		v.reset(OpARM64CSINC)
  3584  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3585  		v.AddArg3(x, a, flag)
  3586  		return true
  3587  	}
  3588  	// match: (CSEL [cc] x (MVN a) flag)
  3589  	// result: (CSINV [cc] x a flag)
  3590  	for {
  3591  		cc := auxIntToOp(v.AuxInt)
  3592  		x := v_0
  3593  		if v_1.Op != OpARM64MVN {
  3594  			break
  3595  		}
  3596  		a := v_1.Args[0]
  3597  		flag := v_2
  3598  		v.reset(OpARM64CSINV)
  3599  		v.AuxInt = opToAuxInt(cc)
  3600  		v.AddArg3(x, a, flag)
  3601  		return true
  3602  	}
  3603  	// match: (CSEL [cc] (MVN a) x flag)
  3604  	// result: (CSINV [arm64Negate(cc)] x a flag)
  3605  	for {
  3606  		cc := auxIntToOp(v.AuxInt)
  3607  		if v_0.Op != OpARM64MVN {
  3608  			break
  3609  		}
  3610  		a := v_0.Args[0]
  3611  		x := v_1
  3612  		flag := v_2
  3613  		v.reset(OpARM64CSINV)
  3614  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3615  		v.AddArg3(x, a, flag)
  3616  		return true
  3617  	}
  3618  	// match: (CSEL [cc] x (NEG a) flag)
  3619  	// result: (CSNEG [cc] x a flag)
  3620  	for {
  3621  		cc := auxIntToOp(v.AuxInt)
  3622  		x := v_0
  3623  		if v_1.Op != OpARM64NEG {
  3624  			break
  3625  		}
  3626  		a := v_1.Args[0]
  3627  		flag := v_2
  3628  		v.reset(OpARM64CSNEG)
  3629  		v.AuxInt = opToAuxInt(cc)
  3630  		v.AddArg3(x, a, flag)
  3631  		return true
  3632  	}
  3633  	// match: (CSEL [cc] (NEG a) x flag)
  3634  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  3635  	for {
  3636  		cc := auxIntToOp(v.AuxInt)
  3637  		if v_0.Op != OpARM64NEG {
  3638  			break
  3639  		}
  3640  		a := v_0.Args[0]
  3641  		x := v_1
  3642  		flag := v_2
  3643  		v.reset(OpARM64CSNEG)
  3644  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3645  		v.AddArg3(x, a, flag)
  3646  		return true
  3647  	}
  3648  	// match: (CSEL [cc] x y (InvertFlags cmp))
  3649  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  3650  	for {
  3651  		cc := auxIntToOp(v.AuxInt)
  3652  		x := v_0
  3653  		y := v_1
  3654  		if v_2.Op != OpARM64InvertFlags {
  3655  			break
  3656  		}
  3657  		cmp := v_2.Args[0]
  3658  		v.reset(OpARM64CSEL)
  3659  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3660  		v.AddArg3(x, y, cmp)
  3661  		return true
  3662  	}
  3663  	// match: (CSEL [cc] x _ flag)
  3664  	// cond: ccARM64Eval(cc, flag) > 0
  3665  	// result: x
  3666  	for {
  3667  		cc := auxIntToOp(v.AuxInt)
  3668  		x := v_0
  3669  		flag := v_2
  3670  		if !(ccARM64Eval(cc, flag) > 0) {
  3671  			break
  3672  		}
  3673  		v.copyOf(x)
  3674  		return true
  3675  	}
  3676  	// match: (CSEL [cc] _ y flag)
  3677  	// cond: ccARM64Eval(cc, flag) < 0
  3678  	// result: y
  3679  	for {
  3680  		cc := auxIntToOp(v.AuxInt)
  3681  		y := v_1
  3682  		flag := v_2
  3683  		if !(ccARM64Eval(cc, flag) < 0) {
  3684  			break
  3685  		}
  3686  		v.copyOf(y)
  3687  		return true
  3688  	}
  3689  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3690  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3691  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  3692  	for {
  3693  		cc := auxIntToOp(v.AuxInt)
  3694  		x := v_0
  3695  		y := v_1
  3696  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3697  			break
  3698  		}
  3699  		boolval := v_2.Args[0]
  3700  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3701  			break
  3702  		}
  3703  		v.reset(OpARM64CSEL)
  3704  		v.AuxInt = opToAuxInt(boolval.Op)
  3705  		v.AddArg3(x, y, flagArg(boolval))
  3706  		return true
  3707  	}
  3708  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3709  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3710  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  3711  	for {
  3712  		cc := auxIntToOp(v.AuxInt)
  3713  		x := v_0
  3714  		y := v_1
  3715  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3716  			break
  3717  		}
  3718  		boolval := v_2.Args[0]
  3719  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3720  			break
  3721  		}
  3722  		v.reset(OpARM64CSEL)
  3723  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3724  		v.AddArg3(x, y, flagArg(boolval))
  3725  		return true
  3726  	}
  3727  	return false
  3728  }
  3729  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  3730  	v_1 := v.Args[1]
  3731  	v_0 := v.Args[0]
  3732  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  3733  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  3734  	for {
  3735  		cc := auxIntToOp(v.AuxInt)
  3736  		x := v_0
  3737  		if v_1.Op != OpARM64InvertFlags {
  3738  			break
  3739  		}
  3740  		cmp := v_1.Args[0]
  3741  		v.reset(OpARM64CSEL0)
  3742  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3743  		v.AddArg2(x, cmp)
  3744  		return true
  3745  	}
  3746  	// match: (CSEL0 [cc] x flag)
  3747  	// cond: ccARM64Eval(cc, flag) > 0
  3748  	// result: x
  3749  	for {
  3750  		cc := auxIntToOp(v.AuxInt)
  3751  		x := v_0
  3752  		flag := v_1
  3753  		if !(ccARM64Eval(cc, flag) > 0) {
  3754  			break
  3755  		}
  3756  		v.copyOf(x)
  3757  		return true
  3758  	}
  3759  	// match: (CSEL0 [cc] _ flag)
  3760  	// cond: ccARM64Eval(cc, flag) < 0
  3761  	// result: (MOVDconst [0])
  3762  	for {
  3763  		cc := auxIntToOp(v.AuxInt)
  3764  		flag := v_1
  3765  		if !(ccARM64Eval(cc, flag) < 0) {
  3766  			break
  3767  		}
  3768  		v.reset(OpARM64MOVDconst)
  3769  		v.AuxInt = int64ToAuxInt(0)
  3770  		return true
  3771  	}
  3772  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3773  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3774  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  3775  	for {
  3776  		cc := auxIntToOp(v.AuxInt)
  3777  		x := v_0
  3778  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3779  			break
  3780  		}
  3781  		boolval := v_1.Args[0]
  3782  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3783  			break
  3784  		}
  3785  		v.reset(OpARM64CSEL0)
  3786  		v.AuxInt = opToAuxInt(boolval.Op)
  3787  		v.AddArg2(x, flagArg(boolval))
  3788  		return true
  3789  	}
  3790  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3791  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3792  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  3793  	for {
  3794  		cc := auxIntToOp(v.AuxInt)
  3795  		x := v_0
  3796  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3797  			break
  3798  		}
  3799  		boolval := v_1.Args[0]
  3800  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3801  			break
  3802  		}
  3803  		v.reset(OpARM64CSEL0)
  3804  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3805  		v.AddArg2(x, flagArg(boolval))
  3806  		return true
  3807  	}
  3808  	return false
  3809  }
  3810  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  3811  	v_0 := v.Args[0]
  3812  	// match: (CSETM [cc] (InvertFlags cmp))
  3813  	// result: (CSETM [arm64Invert(cc)] cmp)
  3814  	for {
  3815  		cc := auxIntToOp(v.AuxInt)
  3816  		if v_0.Op != OpARM64InvertFlags {
  3817  			break
  3818  		}
  3819  		cmp := v_0.Args[0]
  3820  		v.reset(OpARM64CSETM)
  3821  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3822  		v.AddArg(cmp)
  3823  		return true
  3824  	}
  3825  	// match: (CSETM [cc] flag)
  3826  	// cond: ccARM64Eval(cc, flag) > 0
  3827  	// result: (MOVDconst [-1])
  3828  	for {
  3829  		cc := auxIntToOp(v.AuxInt)
  3830  		flag := v_0
  3831  		if !(ccARM64Eval(cc, flag) > 0) {
  3832  			break
  3833  		}
  3834  		v.reset(OpARM64MOVDconst)
  3835  		v.AuxInt = int64ToAuxInt(-1)
  3836  		return true
  3837  	}
  3838  	// match: (CSETM [cc] flag)
  3839  	// cond: ccARM64Eval(cc, flag) < 0
  3840  	// result: (MOVDconst [0])
  3841  	for {
  3842  		cc := auxIntToOp(v.AuxInt)
  3843  		flag := v_0
  3844  		if !(ccARM64Eval(cc, flag) < 0) {
  3845  			break
  3846  		}
  3847  		v.reset(OpARM64MOVDconst)
  3848  		v.AuxInt = int64ToAuxInt(0)
  3849  		return true
  3850  	}
  3851  	return false
  3852  }
  3853  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  3854  	v_2 := v.Args[2]
  3855  	v_1 := v.Args[1]
  3856  	v_0 := v.Args[0]
  3857  	// match: (CSINC [cc] x y (InvertFlags cmp))
  3858  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  3859  	for {
  3860  		cc := auxIntToOp(v.AuxInt)
  3861  		x := v_0
  3862  		y := v_1
  3863  		if v_2.Op != OpARM64InvertFlags {
  3864  			break
  3865  		}
  3866  		cmp := v_2.Args[0]
  3867  		v.reset(OpARM64CSINC)
  3868  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3869  		v.AddArg3(x, y, cmp)
  3870  		return true
  3871  	}
  3872  	// match: (CSINC [cc] x _ flag)
  3873  	// cond: ccARM64Eval(cc, flag) > 0
  3874  	// result: x
  3875  	for {
  3876  		cc := auxIntToOp(v.AuxInt)
  3877  		x := v_0
  3878  		flag := v_2
  3879  		if !(ccARM64Eval(cc, flag) > 0) {
  3880  			break
  3881  		}
  3882  		v.copyOf(x)
  3883  		return true
  3884  	}
  3885  	// match: (CSINC [cc] _ y flag)
  3886  	// cond: ccARM64Eval(cc, flag) < 0
  3887  	// result: (ADDconst [1] y)
  3888  	for {
  3889  		cc := auxIntToOp(v.AuxInt)
  3890  		y := v_1
  3891  		flag := v_2
  3892  		if !(ccARM64Eval(cc, flag) < 0) {
  3893  			break
  3894  		}
  3895  		v.reset(OpARM64ADDconst)
  3896  		v.AuxInt = int64ToAuxInt(1)
  3897  		v.AddArg(y)
  3898  		return true
  3899  	}
  3900  	return false
  3901  }
  3902  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  3903  	v_2 := v.Args[2]
  3904  	v_1 := v.Args[1]
  3905  	v_0 := v.Args[0]
  3906  	// match: (CSINV [cc] x y (InvertFlags cmp))
  3907  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  3908  	for {
  3909  		cc := auxIntToOp(v.AuxInt)
  3910  		x := v_0
  3911  		y := v_1
  3912  		if v_2.Op != OpARM64InvertFlags {
  3913  			break
  3914  		}
  3915  		cmp := v_2.Args[0]
  3916  		v.reset(OpARM64CSINV)
  3917  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3918  		v.AddArg3(x, y, cmp)
  3919  		return true
  3920  	}
  3921  	// match: (CSINV [cc] x _ flag)
  3922  	// cond: ccARM64Eval(cc, flag) > 0
  3923  	// result: x
  3924  	for {
  3925  		cc := auxIntToOp(v.AuxInt)
  3926  		x := v_0
  3927  		flag := v_2
  3928  		if !(ccARM64Eval(cc, flag) > 0) {
  3929  			break
  3930  		}
  3931  		v.copyOf(x)
  3932  		return true
  3933  	}
  3934  	// match: (CSINV [cc] _ y flag)
  3935  	// cond: ccARM64Eval(cc, flag) < 0
  3936  	// result: (Not y)
  3937  	for {
  3938  		cc := auxIntToOp(v.AuxInt)
  3939  		y := v_1
  3940  		flag := v_2
  3941  		if !(ccARM64Eval(cc, flag) < 0) {
  3942  			break
  3943  		}
  3944  		v.reset(OpNot)
  3945  		v.AddArg(y)
  3946  		return true
  3947  	}
  3948  	return false
  3949  }
  3950  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  3951  	v_2 := v.Args[2]
  3952  	v_1 := v.Args[1]
  3953  	v_0 := v.Args[0]
  3954  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  3955  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  3956  	for {
  3957  		cc := auxIntToOp(v.AuxInt)
  3958  		x := v_0
  3959  		y := v_1
  3960  		if v_2.Op != OpARM64InvertFlags {
  3961  			break
  3962  		}
  3963  		cmp := v_2.Args[0]
  3964  		v.reset(OpARM64CSNEG)
  3965  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3966  		v.AddArg3(x, y, cmp)
  3967  		return true
  3968  	}
  3969  	// match: (CSNEG [cc] x _ flag)
  3970  	// cond: ccARM64Eval(cc, flag) > 0
  3971  	// result: x
  3972  	for {
  3973  		cc := auxIntToOp(v.AuxInt)
  3974  		x := v_0
  3975  		flag := v_2
  3976  		if !(ccARM64Eval(cc, flag) > 0) {
  3977  			break
  3978  		}
  3979  		v.copyOf(x)
  3980  		return true
  3981  	}
  3982  	// match: (CSNEG [cc] _ y flag)
  3983  	// cond: ccARM64Eval(cc, flag) < 0
  3984  	// result: (NEG y)
  3985  	for {
  3986  		cc := auxIntToOp(v.AuxInt)
  3987  		y := v_1
  3988  		flag := v_2
  3989  		if !(ccARM64Eval(cc, flag) < 0) {
  3990  			break
  3991  		}
  3992  		v.reset(OpARM64NEG)
  3993  		v.AddArg(y)
  3994  		return true
  3995  	}
  3996  	return false
  3997  }
  3998  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  3999  	v_1 := v.Args[1]
  4000  	v_0 := v.Args[0]
  4001  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  4002  	// cond: d != 0
  4003  	// result: (MOVDconst [c/d])
  4004  	for {
  4005  		if v_0.Op != OpARM64MOVDconst {
  4006  			break
  4007  		}
  4008  		c := auxIntToInt64(v_0.AuxInt)
  4009  		if v_1.Op != OpARM64MOVDconst {
  4010  			break
  4011  		}
  4012  		d := auxIntToInt64(v_1.AuxInt)
  4013  		if !(d != 0) {
  4014  			break
  4015  		}
  4016  		v.reset(OpARM64MOVDconst)
  4017  		v.AuxInt = int64ToAuxInt(c / d)
  4018  		return true
  4019  	}
  4020  	return false
  4021  }
  4022  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  4023  	v_1 := v.Args[1]
  4024  	v_0 := v.Args[0]
  4025  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  4026  	// cond: d != 0
  4027  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  4028  	for {
  4029  		if v_0.Op != OpARM64MOVDconst {
  4030  			break
  4031  		}
  4032  		c := auxIntToInt64(v_0.AuxInt)
  4033  		if v_1.Op != OpARM64MOVDconst {
  4034  			break
  4035  		}
  4036  		d := auxIntToInt64(v_1.AuxInt)
  4037  		if !(d != 0) {
  4038  			break
  4039  		}
  4040  		v.reset(OpARM64MOVDconst)
  4041  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  4042  		return true
  4043  	}
  4044  	return false
  4045  }
  4046  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  4047  	v_1 := v.Args[1]
  4048  	v_0 := v.Args[0]
  4049  	// match: (EON x (MOVDconst [c]))
  4050  	// result: (XORconst [^c] x)
  4051  	for {
  4052  		x := v_0
  4053  		if v_1.Op != OpARM64MOVDconst {
  4054  			break
  4055  		}
  4056  		c := auxIntToInt64(v_1.AuxInt)
  4057  		v.reset(OpARM64XORconst)
  4058  		v.AuxInt = int64ToAuxInt(^c)
  4059  		v.AddArg(x)
  4060  		return true
  4061  	}
  4062  	// match: (EON x x)
  4063  	// result: (MOVDconst [-1])
  4064  	for {
  4065  		x := v_0
  4066  		if x != v_1 {
  4067  			break
  4068  		}
  4069  		v.reset(OpARM64MOVDconst)
  4070  		v.AuxInt = int64ToAuxInt(-1)
  4071  		return true
  4072  	}
  4073  	// match: (EON x0 x1:(SLLconst [c] y))
  4074  	// cond: clobberIfDead(x1)
  4075  	// result: (EONshiftLL x0 y [c])
  4076  	for {
  4077  		x0 := v_0
  4078  		x1 := v_1
  4079  		if x1.Op != OpARM64SLLconst {
  4080  			break
  4081  		}
  4082  		c := auxIntToInt64(x1.AuxInt)
  4083  		y := x1.Args[0]
  4084  		if !(clobberIfDead(x1)) {
  4085  			break
  4086  		}
  4087  		v.reset(OpARM64EONshiftLL)
  4088  		v.AuxInt = int64ToAuxInt(c)
  4089  		v.AddArg2(x0, y)
  4090  		return true
  4091  	}
  4092  	// match: (EON x0 x1:(SRLconst [c] y))
  4093  	// cond: clobberIfDead(x1)
  4094  	// result: (EONshiftRL x0 y [c])
  4095  	for {
  4096  		x0 := v_0
  4097  		x1 := v_1
  4098  		if x1.Op != OpARM64SRLconst {
  4099  			break
  4100  		}
  4101  		c := auxIntToInt64(x1.AuxInt)
  4102  		y := x1.Args[0]
  4103  		if !(clobberIfDead(x1)) {
  4104  			break
  4105  		}
  4106  		v.reset(OpARM64EONshiftRL)
  4107  		v.AuxInt = int64ToAuxInt(c)
  4108  		v.AddArg2(x0, y)
  4109  		return true
  4110  	}
  4111  	// match: (EON x0 x1:(SRAconst [c] y))
  4112  	// cond: clobberIfDead(x1)
  4113  	// result: (EONshiftRA x0 y [c])
  4114  	for {
  4115  		x0 := v_0
  4116  		x1 := v_1
  4117  		if x1.Op != OpARM64SRAconst {
  4118  			break
  4119  		}
  4120  		c := auxIntToInt64(x1.AuxInt)
  4121  		y := x1.Args[0]
  4122  		if !(clobberIfDead(x1)) {
  4123  			break
  4124  		}
  4125  		v.reset(OpARM64EONshiftRA)
  4126  		v.AuxInt = int64ToAuxInt(c)
  4127  		v.AddArg2(x0, y)
  4128  		return true
  4129  	}
  4130  	// match: (EON x0 x1:(RORconst [c] y))
  4131  	// cond: clobberIfDead(x1)
  4132  	// result: (EONshiftRO x0 y [c])
  4133  	for {
  4134  		x0 := v_0
  4135  		x1 := v_1
  4136  		if x1.Op != OpARM64RORconst {
  4137  			break
  4138  		}
  4139  		c := auxIntToInt64(x1.AuxInt)
  4140  		y := x1.Args[0]
  4141  		if !(clobberIfDead(x1)) {
  4142  			break
  4143  		}
  4144  		v.reset(OpARM64EONshiftRO)
  4145  		v.AuxInt = int64ToAuxInt(c)
  4146  		v.AddArg2(x0, y)
  4147  		return true
  4148  	}
  4149  	return false
  4150  }
  4151  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  4152  	v_1 := v.Args[1]
  4153  	v_0 := v.Args[0]
  4154  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  4155  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  4156  	for {
  4157  		d := auxIntToInt64(v.AuxInt)
  4158  		x := v_0
  4159  		if v_1.Op != OpARM64MOVDconst {
  4160  			break
  4161  		}
  4162  		c := auxIntToInt64(v_1.AuxInt)
  4163  		v.reset(OpARM64XORconst)
  4164  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  4165  		v.AddArg(x)
  4166  		return true
  4167  	}
  4168  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  4169  	// result: (MOVDconst [-1])
  4170  	for {
  4171  		c := auxIntToInt64(v.AuxInt)
  4172  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  4173  			break
  4174  		}
  4175  		x := v_0.Args[0]
  4176  		if x != v_1 {
  4177  			break
  4178  		}
  4179  		v.reset(OpARM64MOVDconst)
  4180  		v.AuxInt = int64ToAuxInt(-1)
  4181  		return true
  4182  	}
  4183  	return false
  4184  }
  4185  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  4186  	v_1 := v.Args[1]
  4187  	v_0 := v.Args[0]
  4188  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  4189  	// result: (XORconst x [^(c>>uint64(d))])
  4190  	for {
  4191  		d := auxIntToInt64(v.AuxInt)
  4192  		x := v_0
  4193  		if v_1.Op != OpARM64MOVDconst {
  4194  			break
  4195  		}
  4196  		c := auxIntToInt64(v_1.AuxInt)
  4197  		v.reset(OpARM64XORconst)
  4198  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  4199  		v.AddArg(x)
  4200  		return true
  4201  	}
  4202  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  4203  	// result: (MOVDconst [-1])
  4204  	for {
  4205  		c := auxIntToInt64(v.AuxInt)
  4206  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  4207  			break
  4208  		}
  4209  		x := v_0.Args[0]
  4210  		if x != v_1 {
  4211  			break
  4212  		}
  4213  		v.reset(OpARM64MOVDconst)
  4214  		v.AuxInt = int64ToAuxInt(-1)
  4215  		return true
  4216  	}
  4217  	return false
  4218  }
  4219  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  4220  	v_1 := v.Args[1]
  4221  	v_0 := v.Args[0]
  4222  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  4223  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  4224  	for {
  4225  		d := auxIntToInt64(v.AuxInt)
  4226  		x := v_0
  4227  		if v_1.Op != OpARM64MOVDconst {
  4228  			break
  4229  		}
  4230  		c := auxIntToInt64(v_1.AuxInt)
  4231  		v.reset(OpARM64XORconst)
  4232  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  4233  		v.AddArg(x)
  4234  		return true
  4235  	}
  4236  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  4237  	// result: (MOVDconst [-1])
  4238  	for {
  4239  		c := auxIntToInt64(v.AuxInt)
  4240  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  4241  			break
  4242  		}
  4243  		x := v_0.Args[0]
  4244  		if x != v_1 {
  4245  			break
  4246  		}
  4247  		v.reset(OpARM64MOVDconst)
  4248  		v.AuxInt = int64ToAuxInt(-1)
  4249  		return true
  4250  	}
  4251  	return false
  4252  }
  4253  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  4254  	v_1 := v.Args[1]
  4255  	v_0 := v.Args[0]
  4256  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  4257  	// result: (XORconst x [^rotateRight64(c, d)])
  4258  	for {
  4259  		d := auxIntToInt64(v.AuxInt)
  4260  		x := v_0
  4261  		if v_1.Op != OpARM64MOVDconst {
  4262  			break
  4263  		}
  4264  		c := auxIntToInt64(v_1.AuxInt)
  4265  		v.reset(OpARM64XORconst)
  4266  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  4267  		v.AddArg(x)
  4268  		return true
  4269  	}
  4270  	// match: (EONshiftRO (RORconst x [c]) x [c])
  4271  	// result: (MOVDconst [-1])
  4272  	for {
  4273  		c := auxIntToInt64(v.AuxInt)
  4274  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  4275  			break
  4276  		}
  4277  		x := v_0.Args[0]
  4278  		if x != v_1 {
  4279  			break
  4280  		}
  4281  		v.reset(OpARM64MOVDconst)
  4282  		v.AuxInt = int64ToAuxInt(-1)
  4283  		return true
  4284  	}
  4285  	return false
  4286  }
  4287  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  4288  	v_0 := v.Args[0]
  4289  	b := v.Block
  4290  	// match: (Equal (CMPconst [0] z:(AND x y)))
  4291  	// cond: z.Uses == 1
  4292  	// result: (Equal (TST x y))
  4293  	for {
  4294  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4295  			break
  4296  		}
  4297  		z := v_0.Args[0]
  4298  		if z.Op != OpARM64AND {
  4299  			break
  4300  		}
  4301  		y := z.Args[1]
  4302  		x := z.Args[0]
  4303  		if !(z.Uses == 1) {
  4304  			break
  4305  		}
  4306  		v.reset(OpARM64Equal)
  4307  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  4308  		v0.AddArg2(x, y)
  4309  		v.AddArg(v0)
  4310  		return true
  4311  	}
  4312  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  4313  	// cond: x.Uses == 1
  4314  	// result: (Equal (TSTWconst [int32(c)] y))
  4315  	for {
  4316  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4317  			break
  4318  		}
  4319  		x := v_0.Args[0]
  4320  		if x.Op != OpARM64ANDconst {
  4321  			break
  4322  		}
  4323  		c := auxIntToInt64(x.AuxInt)
  4324  		y := x.Args[0]
  4325  		if !(x.Uses == 1) {
  4326  			break
  4327  		}
  4328  		v.reset(OpARM64Equal)
  4329  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  4330  		v0.AuxInt = int32ToAuxInt(int32(c))
  4331  		v0.AddArg(y)
  4332  		v.AddArg(v0)
  4333  		return true
  4334  	}
  4335  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  4336  	// cond: z.Uses == 1
  4337  	// result: (Equal (TSTW x y))
  4338  	for {
  4339  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4340  			break
  4341  		}
  4342  		z := v_0.Args[0]
  4343  		if z.Op != OpARM64AND {
  4344  			break
  4345  		}
  4346  		y := z.Args[1]
  4347  		x := z.Args[0]
  4348  		if !(z.Uses == 1) {
  4349  			break
  4350  		}
  4351  		v.reset(OpARM64Equal)
  4352  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  4353  		v0.AddArg2(x, y)
  4354  		v.AddArg(v0)
  4355  		return true
  4356  	}
  4357  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  4358  	// cond: x.Uses == 1
  4359  	// result: (Equal (TSTconst [c] y))
  4360  	for {
  4361  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4362  			break
  4363  		}
  4364  		x := v_0.Args[0]
  4365  		if x.Op != OpARM64ANDconst {
  4366  			break
  4367  		}
  4368  		c := auxIntToInt64(x.AuxInt)
  4369  		y := x.Args[0]
  4370  		if !(x.Uses == 1) {
  4371  			break
  4372  		}
  4373  		v.reset(OpARM64Equal)
  4374  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  4375  		v0.AuxInt = int64ToAuxInt(c)
  4376  		v0.AddArg(y)
  4377  		v.AddArg(v0)
  4378  		return true
  4379  	}
  4380  	// match: (Equal (CMP x z:(NEG y)))
  4381  	// cond: z.Uses == 1
  4382  	// result: (Equal (CMN x y))
  4383  	for {
  4384  		if v_0.Op != OpARM64CMP {
  4385  			break
  4386  		}
  4387  		_ = v_0.Args[1]
  4388  		x := v_0.Args[0]
  4389  		z := v_0.Args[1]
  4390  		if z.Op != OpARM64NEG {
  4391  			break
  4392  		}
  4393  		y := z.Args[0]
  4394  		if !(z.Uses == 1) {
  4395  			break
  4396  		}
  4397  		v.reset(OpARM64Equal)
  4398  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4399  		v0.AddArg2(x, y)
  4400  		v.AddArg(v0)
  4401  		return true
  4402  	}
  4403  	// match: (Equal (CMPW x z:(NEG y)))
  4404  	// cond: z.Uses == 1
  4405  	// result: (Equal (CMNW x y))
  4406  	for {
  4407  		if v_0.Op != OpARM64CMPW {
  4408  			break
  4409  		}
  4410  		_ = v_0.Args[1]
  4411  		x := v_0.Args[0]
  4412  		z := v_0.Args[1]
  4413  		if z.Op != OpARM64NEG {
  4414  			break
  4415  		}
  4416  		y := z.Args[0]
  4417  		if !(z.Uses == 1) {
  4418  			break
  4419  		}
  4420  		v.reset(OpARM64Equal)
  4421  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4422  		v0.AddArg2(x, y)
  4423  		v.AddArg(v0)
  4424  		return true
  4425  	}
  4426  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  4427  	// cond: x.Uses == 1
  4428  	// result: (Equal (CMNconst [c] y))
  4429  	for {
  4430  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4431  			break
  4432  		}
  4433  		x := v_0.Args[0]
  4434  		if x.Op != OpARM64ADDconst {
  4435  			break
  4436  		}
  4437  		c := auxIntToInt64(x.AuxInt)
  4438  		y := x.Args[0]
  4439  		if !(x.Uses == 1) {
  4440  			break
  4441  		}
  4442  		v.reset(OpARM64Equal)
  4443  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  4444  		v0.AuxInt = int64ToAuxInt(c)
  4445  		v0.AddArg(y)
  4446  		v.AddArg(v0)
  4447  		return true
  4448  	}
  4449  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  4450  	// cond: x.Uses == 1
  4451  	// result: (Equal (CMNWconst [int32(c)] y))
  4452  	for {
  4453  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4454  			break
  4455  		}
  4456  		x := v_0.Args[0]
  4457  		if x.Op != OpARM64ADDconst {
  4458  			break
  4459  		}
  4460  		c := auxIntToInt64(x.AuxInt)
  4461  		y := x.Args[0]
  4462  		if !(x.Uses == 1) {
  4463  			break
  4464  		}
  4465  		v.reset(OpARM64Equal)
  4466  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  4467  		v0.AuxInt = int32ToAuxInt(int32(c))
  4468  		v0.AddArg(y)
  4469  		v.AddArg(v0)
  4470  		return true
  4471  	}
  4472  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  4473  	// cond: z.Uses == 1
  4474  	// result: (Equal (CMN x y))
  4475  	for {
  4476  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4477  			break
  4478  		}
  4479  		z := v_0.Args[0]
  4480  		if z.Op != OpARM64ADD {
  4481  			break
  4482  		}
  4483  		y := z.Args[1]
  4484  		x := z.Args[0]
  4485  		if !(z.Uses == 1) {
  4486  			break
  4487  		}
  4488  		v.reset(OpARM64Equal)
  4489  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4490  		v0.AddArg2(x, y)
  4491  		v.AddArg(v0)
  4492  		return true
  4493  	}
  4494  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  4495  	// cond: z.Uses == 1
  4496  	// result: (Equal (CMNW x y))
  4497  	for {
  4498  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4499  			break
  4500  		}
  4501  		z := v_0.Args[0]
  4502  		if z.Op != OpARM64ADD {
  4503  			break
  4504  		}
  4505  		y := z.Args[1]
  4506  		x := z.Args[0]
  4507  		if !(z.Uses == 1) {
  4508  			break
  4509  		}
  4510  		v.reset(OpARM64Equal)
  4511  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4512  		v0.AddArg2(x, y)
  4513  		v.AddArg(v0)
  4514  		return true
  4515  	}
  4516  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  4517  	// cond: z.Uses == 1
  4518  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  4519  	for {
  4520  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4521  			break
  4522  		}
  4523  		z := v_0.Args[0]
  4524  		if z.Op != OpARM64MADD {
  4525  			break
  4526  		}
  4527  		y := z.Args[2]
  4528  		a := z.Args[0]
  4529  		x := z.Args[1]
  4530  		if !(z.Uses == 1) {
  4531  			break
  4532  		}
  4533  		v.reset(OpARM64Equal)
  4534  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4535  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4536  		v1.AddArg2(x, y)
  4537  		v0.AddArg2(a, v1)
  4538  		v.AddArg(v0)
  4539  		return true
  4540  	}
  4541  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  4542  	// cond: z.Uses == 1
  4543  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  4544  	for {
  4545  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4546  			break
  4547  		}
  4548  		z := v_0.Args[0]
  4549  		if z.Op != OpARM64MSUB {
  4550  			break
  4551  		}
  4552  		y := z.Args[2]
  4553  		a := z.Args[0]
  4554  		x := z.Args[1]
  4555  		if !(z.Uses == 1) {
  4556  			break
  4557  		}
  4558  		v.reset(OpARM64Equal)
  4559  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4560  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4561  		v1.AddArg2(x, y)
  4562  		v0.AddArg2(a, v1)
  4563  		v.AddArg(v0)
  4564  		return true
  4565  	}
  4566  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  4567  	// cond: z.Uses == 1
  4568  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  4569  	for {
  4570  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4571  			break
  4572  		}
  4573  		z := v_0.Args[0]
  4574  		if z.Op != OpARM64MADDW {
  4575  			break
  4576  		}
  4577  		y := z.Args[2]
  4578  		a := z.Args[0]
  4579  		x := z.Args[1]
  4580  		if !(z.Uses == 1) {
  4581  			break
  4582  		}
  4583  		v.reset(OpARM64Equal)
  4584  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4585  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4586  		v1.AddArg2(x, y)
  4587  		v0.AddArg2(a, v1)
  4588  		v.AddArg(v0)
  4589  		return true
  4590  	}
  4591  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  4592  	// cond: z.Uses == 1
  4593  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  4594  	for {
  4595  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4596  			break
  4597  		}
  4598  		z := v_0.Args[0]
  4599  		if z.Op != OpARM64MSUBW {
  4600  			break
  4601  		}
  4602  		y := z.Args[2]
  4603  		a := z.Args[0]
  4604  		x := z.Args[1]
  4605  		if !(z.Uses == 1) {
  4606  			break
  4607  		}
  4608  		v.reset(OpARM64Equal)
  4609  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4610  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4611  		v1.AddArg2(x, y)
  4612  		v0.AddArg2(a, v1)
  4613  		v.AddArg(v0)
  4614  		return true
  4615  	}
  4616  	// match: (Equal (FlagConstant [fc]))
  4617  	// result: (MOVDconst [b2i(fc.eq())])
  4618  	for {
  4619  		if v_0.Op != OpARM64FlagConstant {
  4620  			break
  4621  		}
  4622  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4623  		v.reset(OpARM64MOVDconst)
  4624  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  4625  		return true
  4626  	}
  4627  	// match: (Equal (InvertFlags x))
  4628  	// result: (Equal x)
  4629  	for {
  4630  		if v_0.Op != OpARM64InvertFlags {
  4631  			break
  4632  		}
  4633  		x := v_0.Args[0]
  4634  		v.reset(OpARM64Equal)
  4635  		v.AddArg(x)
  4636  		return true
  4637  	}
  4638  	return false
  4639  }
  4640  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  4641  	v_1 := v.Args[1]
  4642  	v_0 := v.Args[0]
  4643  	// match: (FADDD a (FMULD x y))
  4644  	// cond: a.Block.Func.useFMA(v)
  4645  	// result: (FMADDD a x y)
  4646  	for {
  4647  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4648  			a := v_0
  4649  			if v_1.Op != OpARM64FMULD {
  4650  				continue
  4651  			}
  4652  			y := v_1.Args[1]
  4653  			x := v_1.Args[0]
  4654  			if !(a.Block.Func.useFMA(v)) {
  4655  				continue
  4656  			}
  4657  			v.reset(OpARM64FMADDD)
  4658  			v.AddArg3(a, x, y)
  4659  			return true
  4660  		}
  4661  		break
  4662  	}
  4663  	// match: (FADDD a (FNMULD x y))
  4664  	// cond: a.Block.Func.useFMA(v)
  4665  	// result: (FMSUBD a x y)
  4666  	for {
  4667  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4668  			a := v_0
  4669  			if v_1.Op != OpARM64FNMULD {
  4670  				continue
  4671  			}
  4672  			y := v_1.Args[1]
  4673  			x := v_1.Args[0]
  4674  			if !(a.Block.Func.useFMA(v)) {
  4675  				continue
  4676  			}
  4677  			v.reset(OpARM64FMSUBD)
  4678  			v.AddArg3(a, x, y)
  4679  			return true
  4680  		}
  4681  		break
  4682  	}
  4683  	return false
  4684  }
  4685  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  4686  	v_1 := v.Args[1]
  4687  	v_0 := v.Args[0]
  4688  	// match: (FADDS a (FMULS x y))
  4689  	// cond: a.Block.Func.useFMA(v)
  4690  	// result: (FMADDS a x y)
  4691  	for {
  4692  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4693  			a := v_0
  4694  			if v_1.Op != OpARM64FMULS {
  4695  				continue
  4696  			}
  4697  			y := v_1.Args[1]
  4698  			x := v_1.Args[0]
  4699  			if !(a.Block.Func.useFMA(v)) {
  4700  				continue
  4701  			}
  4702  			v.reset(OpARM64FMADDS)
  4703  			v.AddArg3(a, x, y)
  4704  			return true
  4705  		}
  4706  		break
  4707  	}
  4708  	// match: (FADDS a (FNMULS x y))
  4709  	// cond: a.Block.Func.useFMA(v)
  4710  	// result: (FMSUBS a x y)
  4711  	for {
  4712  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4713  			a := v_0
  4714  			if v_1.Op != OpARM64FNMULS {
  4715  				continue
  4716  			}
  4717  			y := v_1.Args[1]
  4718  			x := v_1.Args[0]
  4719  			if !(a.Block.Func.useFMA(v)) {
  4720  				continue
  4721  			}
  4722  			v.reset(OpARM64FMSUBS)
  4723  			v.AddArg3(a, x, y)
  4724  			return true
  4725  		}
  4726  		break
  4727  	}
  4728  	return false
  4729  }
  4730  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  4731  	v_1 := v.Args[1]
  4732  	v_0 := v.Args[0]
  4733  	b := v.Block
  4734  	// match: (FCMPD x (FMOVDconst [0]))
  4735  	// result: (FCMPD0 x)
  4736  	for {
  4737  		x := v_0
  4738  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4739  			break
  4740  		}
  4741  		v.reset(OpARM64FCMPD0)
  4742  		v.AddArg(x)
  4743  		return true
  4744  	}
  4745  	// match: (FCMPD (FMOVDconst [0]) x)
  4746  	// result: (InvertFlags (FCMPD0 x))
  4747  	for {
  4748  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4749  			break
  4750  		}
  4751  		x := v_1
  4752  		v.reset(OpARM64InvertFlags)
  4753  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  4754  		v0.AddArg(x)
  4755  		v.AddArg(v0)
  4756  		return true
  4757  	}
  4758  	return false
  4759  }
  4760  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  4761  	v_1 := v.Args[1]
  4762  	v_0 := v.Args[0]
  4763  	b := v.Block
  4764  	// match: (FCMPS x (FMOVSconst [0]))
  4765  	// result: (FCMPS0 x)
  4766  	for {
  4767  		x := v_0
  4768  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4769  			break
  4770  		}
  4771  		v.reset(OpARM64FCMPS0)
  4772  		v.AddArg(x)
  4773  		return true
  4774  	}
  4775  	// match: (FCMPS (FMOVSconst [0]) x)
  4776  	// result: (InvertFlags (FCMPS0 x))
  4777  	for {
  4778  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4779  			break
  4780  		}
  4781  		x := v_1
  4782  		v.reset(OpARM64InvertFlags)
  4783  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  4784  		v0.AddArg(x)
  4785  		v.AddArg(v0)
  4786  		return true
  4787  	}
  4788  	return false
  4789  }
  4790  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  4791  	v_0 := v.Args[0]
  4792  	b := v.Block
  4793  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  4794  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4795  	for {
  4796  		t := v.Type
  4797  		if v_0.Op != OpArg {
  4798  			break
  4799  		}
  4800  		off := auxIntToInt32(v_0.AuxInt)
  4801  		sym := auxToSym(v_0.Aux)
  4802  		b = b.Func.Entry
  4803  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4804  		v.copyOf(v0)
  4805  		v0.AuxInt = int32ToAuxInt(off)
  4806  		v0.Aux = symToAux(sym)
  4807  		return true
  4808  	}
  4809  	return false
  4810  }
  4811  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  4812  	v_0 := v.Args[0]
  4813  	b := v.Block
  4814  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  4815  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4816  	for {
  4817  		t := v.Type
  4818  		if v_0.Op != OpArg {
  4819  			break
  4820  		}
  4821  		off := auxIntToInt32(v_0.AuxInt)
  4822  		sym := auxToSym(v_0.Aux)
  4823  		b = b.Func.Entry
  4824  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4825  		v.copyOf(v0)
  4826  		v0.AuxInt = int32ToAuxInt(off)
  4827  		v0.Aux = symToAux(sym)
  4828  		return true
  4829  	}
  4830  	return false
  4831  }
  4832  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  4833  	v_1 := v.Args[1]
  4834  	v_0 := v.Args[0]
  4835  	b := v.Block
  4836  	config := b.Func.Config
  4837  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4838  	// result: (FMOVDgpfp val)
  4839  	for {
  4840  		off := auxIntToInt32(v.AuxInt)
  4841  		sym := auxToSym(v.Aux)
  4842  		ptr := v_0
  4843  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4844  			break
  4845  		}
  4846  		val := v_1.Args[1]
  4847  		if ptr != v_1.Args[0] {
  4848  			break
  4849  		}
  4850  		v.reset(OpARM64FMOVDgpfp)
  4851  		v.AddArg(val)
  4852  		return true
  4853  	}
  4854  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  4855  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4856  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  4857  	for {
  4858  		off1 := auxIntToInt32(v.AuxInt)
  4859  		sym := auxToSym(v.Aux)
  4860  		if v_0.Op != OpARM64ADDconst {
  4861  			break
  4862  		}
  4863  		off2 := auxIntToInt64(v_0.AuxInt)
  4864  		ptr := v_0.Args[0]
  4865  		mem := v_1
  4866  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4867  			break
  4868  		}
  4869  		v.reset(OpARM64FMOVDload)
  4870  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4871  		v.Aux = symToAux(sym)
  4872  		v.AddArg2(ptr, mem)
  4873  		return true
  4874  	}
  4875  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  4876  	// cond: off == 0 && sym == nil
  4877  	// result: (FMOVDloadidx ptr idx mem)
  4878  	for {
  4879  		off := auxIntToInt32(v.AuxInt)
  4880  		sym := auxToSym(v.Aux)
  4881  		if v_0.Op != OpARM64ADD {
  4882  			break
  4883  		}
  4884  		idx := v_0.Args[1]
  4885  		ptr := v_0.Args[0]
  4886  		mem := v_1
  4887  		if !(off == 0 && sym == nil) {
  4888  			break
  4889  		}
  4890  		v.reset(OpARM64FMOVDloadidx)
  4891  		v.AddArg3(ptr, idx, mem)
  4892  		return true
  4893  	}
  4894  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  4895  	// cond: off == 0 && sym == nil
  4896  	// result: (FMOVDloadidx8 ptr idx mem)
  4897  	for {
  4898  		off := auxIntToInt32(v.AuxInt)
  4899  		sym := auxToSym(v.Aux)
  4900  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  4901  			break
  4902  		}
  4903  		idx := v_0.Args[1]
  4904  		ptr := v_0.Args[0]
  4905  		mem := v_1
  4906  		if !(off == 0 && sym == nil) {
  4907  			break
  4908  		}
  4909  		v.reset(OpARM64FMOVDloadidx8)
  4910  		v.AddArg3(ptr, idx, mem)
  4911  		return true
  4912  	}
  4913  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  4914  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4915  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  4916  	for {
  4917  		off1 := auxIntToInt32(v.AuxInt)
  4918  		sym1 := auxToSym(v.Aux)
  4919  		if v_0.Op != OpARM64MOVDaddr {
  4920  			break
  4921  		}
  4922  		off2 := auxIntToInt32(v_0.AuxInt)
  4923  		sym2 := auxToSym(v_0.Aux)
  4924  		ptr := v_0.Args[0]
  4925  		mem := v_1
  4926  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4927  			break
  4928  		}
  4929  		v.reset(OpARM64FMOVDload)
  4930  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4931  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4932  		v.AddArg2(ptr, mem)
  4933  		return true
  4934  	}
  4935  	return false
  4936  }
  4937  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  4938  	v_2 := v.Args[2]
  4939  	v_1 := v.Args[1]
  4940  	v_0 := v.Args[0]
  4941  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  4942  	// cond: is32Bit(c)
  4943  	// result: (FMOVDload [int32(c)] ptr mem)
  4944  	for {
  4945  		ptr := v_0
  4946  		if v_1.Op != OpARM64MOVDconst {
  4947  			break
  4948  		}
  4949  		c := auxIntToInt64(v_1.AuxInt)
  4950  		mem := v_2
  4951  		if !(is32Bit(c)) {
  4952  			break
  4953  		}
  4954  		v.reset(OpARM64FMOVDload)
  4955  		v.AuxInt = int32ToAuxInt(int32(c))
  4956  		v.AddArg2(ptr, mem)
  4957  		return true
  4958  	}
  4959  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  4960  	// cond: is32Bit(c)
  4961  	// result: (FMOVDload [int32(c)] ptr mem)
  4962  	for {
  4963  		if v_0.Op != OpARM64MOVDconst {
  4964  			break
  4965  		}
  4966  		c := auxIntToInt64(v_0.AuxInt)
  4967  		ptr := v_1
  4968  		mem := v_2
  4969  		if !(is32Bit(c)) {
  4970  			break
  4971  		}
  4972  		v.reset(OpARM64FMOVDload)
  4973  		v.AuxInt = int32ToAuxInt(int32(c))
  4974  		v.AddArg2(ptr, mem)
  4975  		return true
  4976  	}
  4977  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  4978  	// result: (FMOVDloadidx8 ptr idx mem)
  4979  	for {
  4980  		ptr := v_0
  4981  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  4982  			break
  4983  		}
  4984  		idx := v_1.Args[0]
  4985  		mem := v_2
  4986  		v.reset(OpARM64FMOVDloadidx8)
  4987  		v.AddArg3(ptr, idx, mem)
  4988  		return true
  4989  	}
  4990  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  4991  	// result: (FMOVDloadidx8 ptr idx mem)
  4992  	for {
  4993  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  4994  			break
  4995  		}
  4996  		idx := v_0.Args[0]
  4997  		ptr := v_1
  4998  		mem := v_2
  4999  		v.reset(OpARM64FMOVDloadidx8)
  5000  		v.AddArg3(ptr, idx, mem)
  5001  		return true
  5002  	}
  5003  	return false
  5004  }
  5005  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  5006  	v_2 := v.Args[2]
  5007  	v_1 := v.Args[1]
  5008  	v_0 := v.Args[0]
  5009  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  5010  	// cond: is32Bit(c<<3)
  5011  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  5012  	for {
  5013  		ptr := v_0
  5014  		if v_1.Op != OpARM64MOVDconst {
  5015  			break
  5016  		}
  5017  		c := auxIntToInt64(v_1.AuxInt)
  5018  		mem := v_2
  5019  		if !(is32Bit(c << 3)) {
  5020  			break
  5021  		}
  5022  		v.reset(OpARM64FMOVDload)
  5023  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  5024  		v.AddArg2(ptr, mem)
  5025  		return true
  5026  	}
  5027  	return false
  5028  }
  5029  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  5030  	v_2 := v.Args[2]
  5031  	v_1 := v.Args[1]
  5032  	v_0 := v.Args[0]
  5033  	b := v.Block
  5034  	config := b.Func.Config
  5035  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  5036  	// result: (MOVDstore [off] {sym} ptr val mem)
  5037  	for {
  5038  		off := auxIntToInt32(v.AuxInt)
  5039  		sym := auxToSym(v.Aux)
  5040  		ptr := v_0
  5041  		if v_1.Op != OpARM64FMOVDgpfp {
  5042  			break
  5043  		}
  5044  		val := v_1.Args[0]
  5045  		mem := v_2
  5046  		v.reset(OpARM64MOVDstore)
  5047  		v.AuxInt = int32ToAuxInt(off)
  5048  		v.Aux = symToAux(sym)
  5049  		v.AddArg3(ptr, val, mem)
  5050  		return true
  5051  	}
  5052  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5053  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5054  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  5055  	for {
  5056  		off1 := auxIntToInt32(v.AuxInt)
  5057  		sym := auxToSym(v.Aux)
  5058  		if v_0.Op != OpARM64ADDconst {
  5059  			break
  5060  		}
  5061  		off2 := auxIntToInt64(v_0.AuxInt)
  5062  		ptr := v_0.Args[0]
  5063  		val := v_1
  5064  		mem := v_2
  5065  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5066  			break
  5067  		}
  5068  		v.reset(OpARM64FMOVDstore)
  5069  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5070  		v.Aux = symToAux(sym)
  5071  		v.AddArg3(ptr, val, mem)
  5072  		return true
  5073  	}
  5074  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  5075  	// cond: off == 0 && sym == nil
  5076  	// result: (FMOVDstoreidx ptr idx val mem)
  5077  	for {
  5078  		off := auxIntToInt32(v.AuxInt)
  5079  		sym := auxToSym(v.Aux)
  5080  		if v_0.Op != OpARM64ADD {
  5081  			break
  5082  		}
  5083  		idx := v_0.Args[1]
  5084  		ptr := v_0.Args[0]
  5085  		val := v_1
  5086  		mem := v_2
  5087  		if !(off == 0 && sym == nil) {
  5088  			break
  5089  		}
  5090  		v.reset(OpARM64FMOVDstoreidx)
  5091  		v.AddArg4(ptr, idx, val, mem)
  5092  		return true
  5093  	}
  5094  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  5095  	// cond: off == 0 && sym == nil
  5096  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5097  	for {
  5098  		off := auxIntToInt32(v.AuxInt)
  5099  		sym := auxToSym(v.Aux)
  5100  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  5101  			break
  5102  		}
  5103  		idx := v_0.Args[1]
  5104  		ptr := v_0.Args[0]
  5105  		val := v_1
  5106  		mem := v_2
  5107  		if !(off == 0 && sym == nil) {
  5108  			break
  5109  		}
  5110  		v.reset(OpARM64FMOVDstoreidx8)
  5111  		v.AddArg4(ptr, idx, val, mem)
  5112  		return true
  5113  	}
  5114  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5115  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5116  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5117  	for {
  5118  		off1 := auxIntToInt32(v.AuxInt)
  5119  		sym1 := auxToSym(v.Aux)
  5120  		if v_0.Op != OpARM64MOVDaddr {
  5121  			break
  5122  		}
  5123  		off2 := auxIntToInt32(v_0.AuxInt)
  5124  		sym2 := auxToSym(v_0.Aux)
  5125  		ptr := v_0.Args[0]
  5126  		val := v_1
  5127  		mem := v_2
  5128  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5129  			break
  5130  		}
  5131  		v.reset(OpARM64FMOVDstore)
  5132  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5133  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5134  		v.AddArg3(ptr, val, mem)
  5135  		return true
  5136  	}
  5137  	return false
  5138  }
  5139  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  5140  	v_3 := v.Args[3]
  5141  	v_2 := v.Args[2]
  5142  	v_1 := v.Args[1]
  5143  	v_0 := v.Args[0]
  5144  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  5145  	// cond: is32Bit(c)
  5146  	// result: (FMOVDstore [int32(c)] ptr val mem)
  5147  	for {
  5148  		ptr := v_0
  5149  		if v_1.Op != OpARM64MOVDconst {
  5150  			break
  5151  		}
  5152  		c := auxIntToInt64(v_1.AuxInt)
  5153  		val := v_2
  5154  		mem := v_3
  5155  		if !(is32Bit(c)) {
  5156  			break
  5157  		}
  5158  		v.reset(OpARM64FMOVDstore)
  5159  		v.AuxInt = int32ToAuxInt(int32(c))
  5160  		v.AddArg3(ptr, val, mem)
  5161  		return true
  5162  	}
  5163  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  5164  	// cond: is32Bit(c)
  5165  	// result: (FMOVDstore [int32(c)] idx val mem)
  5166  	for {
  5167  		if v_0.Op != OpARM64MOVDconst {
  5168  			break
  5169  		}
  5170  		c := auxIntToInt64(v_0.AuxInt)
  5171  		idx := v_1
  5172  		val := v_2
  5173  		mem := v_3
  5174  		if !(is32Bit(c)) {
  5175  			break
  5176  		}
  5177  		v.reset(OpARM64FMOVDstore)
  5178  		v.AuxInt = int32ToAuxInt(int32(c))
  5179  		v.AddArg3(idx, val, mem)
  5180  		return true
  5181  	}
  5182  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  5183  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5184  	for {
  5185  		ptr := v_0
  5186  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  5187  			break
  5188  		}
  5189  		idx := v_1.Args[0]
  5190  		val := v_2
  5191  		mem := v_3
  5192  		v.reset(OpARM64FMOVDstoreidx8)
  5193  		v.AddArg4(ptr, idx, val, mem)
  5194  		return true
  5195  	}
  5196  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  5197  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5198  	for {
  5199  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  5200  			break
  5201  		}
  5202  		idx := v_0.Args[0]
  5203  		ptr := v_1
  5204  		val := v_2
  5205  		mem := v_3
  5206  		v.reset(OpARM64FMOVDstoreidx8)
  5207  		v.AddArg4(ptr, idx, val, mem)
  5208  		return true
  5209  	}
  5210  	return false
  5211  }
  5212  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  5213  	v_3 := v.Args[3]
  5214  	v_2 := v.Args[2]
  5215  	v_1 := v.Args[1]
  5216  	v_0 := v.Args[0]
  5217  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  5218  	// cond: is32Bit(c<<3)
  5219  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  5220  	for {
  5221  		ptr := v_0
  5222  		if v_1.Op != OpARM64MOVDconst {
  5223  			break
  5224  		}
  5225  		c := auxIntToInt64(v_1.AuxInt)
  5226  		val := v_2
  5227  		mem := v_3
  5228  		if !(is32Bit(c << 3)) {
  5229  			break
  5230  		}
  5231  		v.reset(OpARM64FMOVDstore)
  5232  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  5233  		v.AddArg3(ptr, val, mem)
  5234  		return true
  5235  	}
  5236  	return false
  5237  }
  5238  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  5239  	v_1 := v.Args[1]
  5240  	v_0 := v.Args[0]
  5241  	b := v.Block
  5242  	config := b.Func.Config
  5243  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  5244  	// result: (FMOVSgpfp val)
  5245  	for {
  5246  		off := auxIntToInt32(v.AuxInt)
  5247  		sym := auxToSym(v.Aux)
  5248  		ptr := v_0
  5249  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5250  			break
  5251  		}
  5252  		val := v_1.Args[1]
  5253  		if ptr != v_1.Args[0] {
  5254  			break
  5255  		}
  5256  		v.reset(OpARM64FMOVSgpfp)
  5257  		v.AddArg(val)
  5258  		return true
  5259  	}
  5260  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  5261  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5262  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  5263  	for {
  5264  		off1 := auxIntToInt32(v.AuxInt)
  5265  		sym := auxToSym(v.Aux)
  5266  		if v_0.Op != OpARM64ADDconst {
  5267  			break
  5268  		}
  5269  		off2 := auxIntToInt64(v_0.AuxInt)
  5270  		ptr := v_0.Args[0]
  5271  		mem := v_1
  5272  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5273  			break
  5274  		}
  5275  		v.reset(OpARM64FMOVSload)
  5276  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5277  		v.Aux = symToAux(sym)
  5278  		v.AddArg2(ptr, mem)
  5279  		return true
  5280  	}
  5281  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  5282  	// cond: off == 0 && sym == nil
  5283  	// result: (FMOVSloadidx ptr idx mem)
  5284  	for {
  5285  		off := auxIntToInt32(v.AuxInt)
  5286  		sym := auxToSym(v.Aux)
  5287  		if v_0.Op != OpARM64ADD {
  5288  			break
  5289  		}
  5290  		idx := v_0.Args[1]
  5291  		ptr := v_0.Args[0]
  5292  		mem := v_1
  5293  		if !(off == 0 && sym == nil) {
  5294  			break
  5295  		}
  5296  		v.reset(OpARM64FMOVSloadidx)
  5297  		v.AddArg3(ptr, idx, mem)
  5298  		return true
  5299  	}
  5300  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  5301  	// cond: off == 0 && sym == nil
  5302  	// result: (FMOVSloadidx4 ptr idx mem)
  5303  	for {
  5304  		off := auxIntToInt32(v.AuxInt)
  5305  		sym := auxToSym(v.Aux)
  5306  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5307  			break
  5308  		}
  5309  		idx := v_0.Args[1]
  5310  		ptr := v_0.Args[0]
  5311  		mem := v_1
  5312  		if !(off == 0 && sym == nil) {
  5313  			break
  5314  		}
  5315  		v.reset(OpARM64FMOVSloadidx4)
  5316  		v.AddArg3(ptr, idx, mem)
  5317  		return true
  5318  	}
  5319  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  5320  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5321  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5322  	for {
  5323  		off1 := auxIntToInt32(v.AuxInt)
  5324  		sym1 := auxToSym(v.Aux)
  5325  		if v_0.Op != OpARM64MOVDaddr {
  5326  			break
  5327  		}
  5328  		off2 := auxIntToInt32(v_0.AuxInt)
  5329  		sym2 := auxToSym(v_0.Aux)
  5330  		ptr := v_0.Args[0]
  5331  		mem := v_1
  5332  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5333  			break
  5334  		}
  5335  		v.reset(OpARM64FMOVSload)
  5336  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5337  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5338  		v.AddArg2(ptr, mem)
  5339  		return true
  5340  	}
  5341  	return false
  5342  }
  5343  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  5344  	v_2 := v.Args[2]
  5345  	v_1 := v.Args[1]
  5346  	v_0 := v.Args[0]
  5347  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  5348  	// cond: is32Bit(c)
  5349  	// result: (FMOVSload [int32(c)] ptr mem)
  5350  	for {
  5351  		ptr := v_0
  5352  		if v_1.Op != OpARM64MOVDconst {
  5353  			break
  5354  		}
  5355  		c := auxIntToInt64(v_1.AuxInt)
  5356  		mem := v_2
  5357  		if !(is32Bit(c)) {
  5358  			break
  5359  		}
  5360  		v.reset(OpARM64FMOVSload)
  5361  		v.AuxInt = int32ToAuxInt(int32(c))
  5362  		v.AddArg2(ptr, mem)
  5363  		return true
  5364  	}
  5365  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  5366  	// cond: is32Bit(c)
  5367  	// result: (FMOVSload [int32(c)] ptr mem)
  5368  	for {
  5369  		if v_0.Op != OpARM64MOVDconst {
  5370  			break
  5371  		}
  5372  		c := auxIntToInt64(v_0.AuxInt)
  5373  		ptr := v_1
  5374  		mem := v_2
  5375  		if !(is32Bit(c)) {
  5376  			break
  5377  		}
  5378  		v.reset(OpARM64FMOVSload)
  5379  		v.AuxInt = int32ToAuxInt(int32(c))
  5380  		v.AddArg2(ptr, mem)
  5381  		return true
  5382  	}
  5383  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  5384  	// result: (FMOVSloadidx4 ptr idx mem)
  5385  	for {
  5386  		ptr := v_0
  5387  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5388  			break
  5389  		}
  5390  		idx := v_1.Args[0]
  5391  		mem := v_2
  5392  		v.reset(OpARM64FMOVSloadidx4)
  5393  		v.AddArg3(ptr, idx, mem)
  5394  		return true
  5395  	}
  5396  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  5397  	// result: (FMOVSloadidx4 ptr idx mem)
  5398  	for {
  5399  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5400  			break
  5401  		}
  5402  		idx := v_0.Args[0]
  5403  		ptr := v_1
  5404  		mem := v_2
  5405  		v.reset(OpARM64FMOVSloadidx4)
  5406  		v.AddArg3(ptr, idx, mem)
  5407  		return true
  5408  	}
  5409  	return false
  5410  }
  5411  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  5412  	v_2 := v.Args[2]
  5413  	v_1 := v.Args[1]
  5414  	v_0 := v.Args[0]
  5415  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  5416  	// cond: is32Bit(c<<2)
  5417  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  5418  	for {
  5419  		ptr := v_0
  5420  		if v_1.Op != OpARM64MOVDconst {
  5421  			break
  5422  		}
  5423  		c := auxIntToInt64(v_1.AuxInt)
  5424  		mem := v_2
  5425  		if !(is32Bit(c << 2)) {
  5426  			break
  5427  		}
  5428  		v.reset(OpARM64FMOVSload)
  5429  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5430  		v.AddArg2(ptr, mem)
  5431  		return true
  5432  	}
  5433  	return false
  5434  }
  5435  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  5436  	v_2 := v.Args[2]
  5437  	v_1 := v.Args[1]
  5438  	v_0 := v.Args[0]
  5439  	b := v.Block
  5440  	config := b.Func.Config
  5441  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  5442  	// result: (MOVWstore [off] {sym} ptr val mem)
  5443  	for {
  5444  		off := auxIntToInt32(v.AuxInt)
  5445  		sym := auxToSym(v.Aux)
  5446  		ptr := v_0
  5447  		if v_1.Op != OpARM64FMOVSgpfp {
  5448  			break
  5449  		}
  5450  		val := v_1.Args[0]
  5451  		mem := v_2
  5452  		v.reset(OpARM64MOVWstore)
  5453  		v.AuxInt = int32ToAuxInt(off)
  5454  		v.Aux = symToAux(sym)
  5455  		v.AddArg3(ptr, val, mem)
  5456  		return true
  5457  	}
  5458  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5459  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5460  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  5461  	for {
  5462  		off1 := auxIntToInt32(v.AuxInt)
  5463  		sym := auxToSym(v.Aux)
  5464  		if v_0.Op != OpARM64ADDconst {
  5465  			break
  5466  		}
  5467  		off2 := auxIntToInt64(v_0.AuxInt)
  5468  		ptr := v_0.Args[0]
  5469  		val := v_1
  5470  		mem := v_2
  5471  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5472  			break
  5473  		}
  5474  		v.reset(OpARM64FMOVSstore)
  5475  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5476  		v.Aux = symToAux(sym)
  5477  		v.AddArg3(ptr, val, mem)
  5478  		return true
  5479  	}
  5480  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  5481  	// cond: off == 0 && sym == nil
  5482  	// result: (FMOVSstoreidx ptr idx val mem)
  5483  	for {
  5484  		off := auxIntToInt32(v.AuxInt)
  5485  		sym := auxToSym(v.Aux)
  5486  		if v_0.Op != OpARM64ADD {
  5487  			break
  5488  		}
  5489  		idx := v_0.Args[1]
  5490  		ptr := v_0.Args[0]
  5491  		val := v_1
  5492  		mem := v_2
  5493  		if !(off == 0 && sym == nil) {
  5494  			break
  5495  		}
  5496  		v.reset(OpARM64FMOVSstoreidx)
  5497  		v.AddArg4(ptr, idx, val, mem)
  5498  		return true
  5499  	}
  5500  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  5501  	// cond: off == 0 && sym == nil
  5502  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5503  	for {
  5504  		off := auxIntToInt32(v.AuxInt)
  5505  		sym := auxToSym(v.Aux)
  5506  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5507  			break
  5508  		}
  5509  		idx := v_0.Args[1]
  5510  		ptr := v_0.Args[0]
  5511  		val := v_1
  5512  		mem := v_2
  5513  		if !(off == 0 && sym == nil) {
  5514  			break
  5515  		}
  5516  		v.reset(OpARM64FMOVSstoreidx4)
  5517  		v.AddArg4(ptr, idx, val, mem)
  5518  		return true
  5519  	}
  5520  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5521  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5522  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5523  	for {
  5524  		off1 := auxIntToInt32(v.AuxInt)
  5525  		sym1 := auxToSym(v.Aux)
  5526  		if v_0.Op != OpARM64MOVDaddr {
  5527  			break
  5528  		}
  5529  		off2 := auxIntToInt32(v_0.AuxInt)
  5530  		sym2 := auxToSym(v_0.Aux)
  5531  		ptr := v_0.Args[0]
  5532  		val := v_1
  5533  		mem := v_2
  5534  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5535  			break
  5536  		}
  5537  		v.reset(OpARM64FMOVSstore)
  5538  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5539  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5540  		v.AddArg3(ptr, val, mem)
  5541  		return true
  5542  	}
  5543  	return false
  5544  }
  5545  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  5546  	v_3 := v.Args[3]
  5547  	v_2 := v.Args[2]
  5548  	v_1 := v.Args[1]
  5549  	v_0 := v.Args[0]
  5550  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  5551  	// cond: is32Bit(c)
  5552  	// result: (FMOVSstore [int32(c)] ptr val mem)
  5553  	for {
  5554  		ptr := v_0
  5555  		if v_1.Op != OpARM64MOVDconst {
  5556  			break
  5557  		}
  5558  		c := auxIntToInt64(v_1.AuxInt)
  5559  		val := v_2
  5560  		mem := v_3
  5561  		if !(is32Bit(c)) {
  5562  			break
  5563  		}
  5564  		v.reset(OpARM64FMOVSstore)
  5565  		v.AuxInt = int32ToAuxInt(int32(c))
  5566  		v.AddArg3(ptr, val, mem)
  5567  		return true
  5568  	}
  5569  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  5570  	// cond: is32Bit(c)
  5571  	// result: (FMOVSstore [int32(c)] idx val mem)
  5572  	for {
  5573  		if v_0.Op != OpARM64MOVDconst {
  5574  			break
  5575  		}
  5576  		c := auxIntToInt64(v_0.AuxInt)
  5577  		idx := v_1
  5578  		val := v_2
  5579  		mem := v_3
  5580  		if !(is32Bit(c)) {
  5581  			break
  5582  		}
  5583  		v.reset(OpARM64FMOVSstore)
  5584  		v.AuxInt = int32ToAuxInt(int32(c))
  5585  		v.AddArg3(idx, val, mem)
  5586  		return true
  5587  	}
  5588  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  5589  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5590  	for {
  5591  		ptr := v_0
  5592  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5593  			break
  5594  		}
  5595  		idx := v_1.Args[0]
  5596  		val := v_2
  5597  		mem := v_3
  5598  		v.reset(OpARM64FMOVSstoreidx4)
  5599  		v.AddArg4(ptr, idx, val, mem)
  5600  		return true
  5601  	}
  5602  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  5603  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5604  	for {
  5605  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5606  			break
  5607  		}
  5608  		idx := v_0.Args[0]
  5609  		ptr := v_1
  5610  		val := v_2
  5611  		mem := v_3
  5612  		v.reset(OpARM64FMOVSstoreidx4)
  5613  		v.AddArg4(ptr, idx, val, mem)
  5614  		return true
  5615  	}
  5616  	return false
  5617  }
  5618  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  5619  	v_3 := v.Args[3]
  5620  	v_2 := v.Args[2]
  5621  	v_1 := v.Args[1]
  5622  	v_0 := v.Args[0]
  5623  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  5624  	// cond: is32Bit(c<<2)
  5625  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  5626  	for {
  5627  		ptr := v_0
  5628  		if v_1.Op != OpARM64MOVDconst {
  5629  			break
  5630  		}
  5631  		c := auxIntToInt64(v_1.AuxInt)
  5632  		val := v_2
  5633  		mem := v_3
  5634  		if !(is32Bit(c << 2)) {
  5635  			break
  5636  		}
  5637  		v.reset(OpARM64FMOVSstore)
  5638  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5639  		v.AddArg3(ptr, val, mem)
  5640  		return true
  5641  	}
  5642  	return false
  5643  }
  5644  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  5645  	v_1 := v.Args[1]
  5646  	v_0 := v.Args[0]
  5647  	// match: (FMULD (FNEGD x) y)
  5648  	// result: (FNMULD x y)
  5649  	for {
  5650  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5651  			if v_0.Op != OpARM64FNEGD {
  5652  				continue
  5653  			}
  5654  			x := v_0.Args[0]
  5655  			y := v_1
  5656  			v.reset(OpARM64FNMULD)
  5657  			v.AddArg2(x, y)
  5658  			return true
  5659  		}
  5660  		break
  5661  	}
  5662  	return false
  5663  }
  5664  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  5665  	v_1 := v.Args[1]
  5666  	v_0 := v.Args[0]
  5667  	// match: (FMULS (FNEGS x) y)
  5668  	// result: (FNMULS x y)
  5669  	for {
  5670  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5671  			if v_0.Op != OpARM64FNEGS {
  5672  				continue
  5673  			}
  5674  			x := v_0.Args[0]
  5675  			y := v_1
  5676  			v.reset(OpARM64FNMULS)
  5677  			v.AddArg2(x, y)
  5678  			return true
  5679  		}
  5680  		break
  5681  	}
  5682  	return false
  5683  }
  5684  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  5685  	v_0 := v.Args[0]
  5686  	// match: (FNEGD (FMULD x y))
  5687  	// result: (FNMULD x y)
  5688  	for {
  5689  		if v_0.Op != OpARM64FMULD {
  5690  			break
  5691  		}
  5692  		y := v_0.Args[1]
  5693  		x := v_0.Args[0]
  5694  		v.reset(OpARM64FNMULD)
  5695  		v.AddArg2(x, y)
  5696  		return true
  5697  	}
  5698  	// match: (FNEGD (FNMULD x y))
  5699  	// result: (FMULD x y)
  5700  	for {
  5701  		if v_0.Op != OpARM64FNMULD {
  5702  			break
  5703  		}
  5704  		y := v_0.Args[1]
  5705  		x := v_0.Args[0]
  5706  		v.reset(OpARM64FMULD)
  5707  		v.AddArg2(x, y)
  5708  		return true
  5709  	}
  5710  	return false
  5711  }
  5712  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  5713  	v_0 := v.Args[0]
  5714  	// match: (FNEGS (FMULS x y))
  5715  	// result: (FNMULS x y)
  5716  	for {
  5717  		if v_0.Op != OpARM64FMULS {
  5718  			break
  5719  		}
  5720  		y := v_0.Args[1]
  5721  		x := v_0.Args[0]
  5722  		v.reset(OpARM64FNMULS)
  5723  		v.AddArg2(x, y)
  5724  		return true
  5725  	}
  5726  	// match: (FNEGS (FNMULS x y))
  5727  	// result: (FMULS x y)
  5728  	for {
  5729  		if v_0.Op != OpARM64FNMULS {
  5730  			break
  5731  		}
  5732  		y := v_0.Args[1]
  5733  		x := v_0.Args[0]
  5734  		v.reset(OpARM64FMULS)
  5735  		v.AddArg2(x, y)
  5736  		return true
  5737  	}
  5738  	return false
  5739  }
  5740  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  5741  	v_1 := v.Args[1]
  5742  	v_0 := v.Args[0]
  5743  	// match: (FNMULD (FNEGD x) y)
  5744  	// result: (FMULD x y)
  5745  	for {
  5746  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5747  			if v_0.Op != OpARM64FNEGD {
  5748  				continue
  5749  			}
  5750  			x := v_0.Args[0]
  5751  			y := v_1
  5752  			v.reset(OpARM64FMULD)
  5753  			v.AddArg2(x, y)
  5754  			return true
  5755  		}
  5756  		break
  5757  	}
  5758  	return false
  5759  }
  5760  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  5761  	v_1 := v.Args[1]
  5762  	v_0 := v.Args[0]
  5763  	// match: (FNMULS (FNEGS x) y)
  5764  	// result: (FMULS x y)
  5765  	for {
  5766  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5767  			if v_0.Op != OpARM64FNEGS {
  5768  				continue
  5769  			}
  5770  			x := v_0.Args[0]
  5771  			y := v_1
  5772  			v.reset(OpARM64FMULS)
  5773  			v.AddArg2(x, y)
  5774  			return true
  5775  		}
  5776  		break
  5777  	}
  5778  	return false
  5779  }
  5780  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  5781  	v_1 := v.Args[1]
  5782  	v_0 := v.Args[0]
  5783  	// match: (FSUBD a (FMULD x y))
  5784  	// cond: a.Block.Func.useFMA(v)
  5785  	// result: (FMSUBD a x y)
  5786  	for {
  5787  		a := v_0
  5788  		if v_1.Op != OpARM64FMULD {
  5789  			break
  5790  		}
  5791  		y := v_1.Args[1]
  5792  		x := v_1.Args[0]
  5793  		if !(a.Block.Func.useFMA(v)) {
  5794  			break
  5795  		}
  5796  		v.reset(OpARM64FMSUBD)
  5797  		v.AddArg3(a, x, y)
  5798  		return true
  5799  	}
  5800  	// match: (FSUBD (FMULD x y) a)
  5801  	// cond: a.Block.Func.useFMA(v)
  5802  	// result: (FNMSUBD a x y)
  5803  	for {
  5804  		if v_0.Op != OpARM64FMULD {
  5805  			break
  5806  		}
  5807  		y := v_0.Args[1]
  5808  		x := v_0.Args[0]
  5809  		a := v_1
  5810  		if !(a.Block.Func.useFMA(v)) {
  5811  			break
  5812  		}
  5813  		v.reset(OpARM64FNMSUBD)
  5814  		v.AddArg3(a, x, y)
  5815  		return true
  5816  	}
  5817  	// match: (FSUBD a (FNMULD x y))
  5818  	// cond: a.Block.Func.useFMA(v)
  5819  	// result: (FMADDD a x y)
  5820  	for {
  5821  		a := v_0
  5822  		if v_1.Op != OpARM64FNMULD {
  5823  			break
  5824  		}
  5825  		y := v_1.Args[1]
  5826  		x := v_1.Args[0]
  5827  		if !(a.Block.Func.useFMA(v)) {
  5828  			break
  5829  		}
  5830  		v.reset(OpARM64FMADDD)
  5831  		v.AddArg3(a, x, y)
  5832  		return true
  5833  	}
  5834  	// match: (FSUBD (FNMULD x y) a)
  5835  	// cond: a.Block.Func.useFMA(v)
  5836  	// result: (FNMADDD a x y)
  5837  	for {
  5838  		if v_0.Op != OpARM64FNMULD {
  5839  			break
  5840  		}
  5841  		y := v_0.Args[1]
  5842  		x := v_0.Args[0]
  5843  		a := v_1
  5844  		if !(a.Block.Func.useFMA(v)) {
  5845  			break
  5846  		}
  5847  		v.reset(OpARM64FNMADDD)
  5848  		v.AddArg3(a, x, y)
  5849  		return true
  5850  	}
  5851  	return false
  5852  }
  5853  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  5854  	v_1 := v.Args[1]
  5855  	v_0 := v.Args[0]
  5856  	// match: (FSUBS a (FMULS x y))
  5857  	// cond: a.Block.Func.useFMA(v)
  5858  	// result: (FMSUBS a x y)
  5859  	for {
  5860  		a := v_0
  5861  		if v_1.Op != OpARM64FMULS {
  5862  			break
  5863  		}
  5864  		y := v_1.Args[1]
  5865  		x := v_1.Args[0]
  5866  		if !(a.Block.Func.useFMA(v)) {
  5867  			break
  5868  		}
  5869  		v.reset(OpARM64FMSUBS)
  5870  		v.AddArg3(a, x, y)
  5871  		return true
  5872  	}
  5873  	// match: (FSUBS (FMULS x y) a)
  5874  	// cond: a.Block.Func.useFMA(v)
  5875  	// result: (FNMSUBS a x y)
  5876  	for {
  5877  		if v_0.Op != OpARM64FMULS {
  5878  			break
  5879  		}
  5880  		y := v_0.Args[1]
  5881  		x := v_0.Args[0]
  5882  		a := v_1
  5883  		if !(a.Block.Func.useFMA(v)) {
  5884  			break
  5885  		}
  5886  		v.reset(OpARM64FNMSUBS)
  5887  		v.AddArg3(a, x, y)
  5888  		return true
  5889  	}
  5890  	// match: (FSUBS a (FNMULS x y))
  5891  	// cond: a.Block.Func.useFMA(v)
  5892  	// result: (FMADDS a x y)
  5893  	for {
  5894  		a := v_0
  5895  		if v_1.Op != OpARM64FNMULS {
  5896  			break
  5897  		}
  5898  		y := v_1.Args[1]
  5899  		x := v_1.Args[0]
  5900  		if !(a.Block.Func.useFMA(v)) {
  5901  			break
  5902  		}
  5903  		v.reset(OpARM64FMADDS)
  5904  		v.AddArg3(a, x, y)
  5905  		return true
  5906  	}
  5907  	// match: (FSUBS (FNMULS x y) a)
  5908  	// cond: a.Block.Func.useFMA(v)
  5909  	// result: (FNMADDS a x y)
  5910  	for {
  5911  		if v_0.Op != OpARM64FNMULS {
  5912  			break
  5913  		}
  5914  		y := v_0.Args[1]
  5915  		x := v_0.Args[0]
  5916  		a := v_1
  5917  		if !(a.Block.Func.useFMA(v)) {
  5918  			break
  5919  		}
  5920  		v.reset(OpARM64FNMADDS)
  5921  		v.AddArg3(a, x, y)
  5922  		return true
  5923  	}
  5924  	return false
  5925  }
  5926  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  5927  	v_0 := v.Args[0]
  5928  	b := v.Block
  5929  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  5930  	// cond: z.Uses == 1
  5931  	// result: (GreaterEqual (TST x y))
  5932  	for {
  5933  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5934  			break
  5935  		}
  5936  		z := v_0.Args[0]
  5937  		if z.Op != OpARM64AND {
  5938  			break
  5939  		}
  5940  		y := z.Args[1]
  5941  		x := z.Args[0]
  5942  		if !(z.Uses == 1) {
  5943  			break
  5944  		}
  5945  		v.reset(OpARM64GreaterEqual)
  5946  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  5947  		v0.AddArg2(x, y)
  5948  		v.AddArg(v0)
  5949  		return true
  5950  	}
  5951  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  5952  	// cond: x.Uses == 1
  5953  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  5954  	for {
  5955  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5956  			break
  5957  		}
  5958  		x := v_0.Args[0]
  5959  		if x.Op != OpARM64ANDconst {
  5960  			break
  5961  		}
  5962  		c := auxIntToInt64(x.AuxInt)
  5963  		y := x.Args[0]
  5964  		if !(x.Uses == 1) {
  5965  			break
  5966  		}
  5967  		v.reset(OpARM64GreaterEqual)
  5968  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  5969  		v0.AuxInt = int32ToAuxInt(int32(c))
  5970  		v0.AddArg(y)
  5971  		v.AddArg(v0)
  5972  		return true
  5973  	}
  5974  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  5975  	// cond: z.Uses == 1
  5976  	// result: (GreaterEqual (TSTW x y))
  5977  	for {
  5978  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5979  			break
  5980  		}
  5981  		z := v_0.Args[0]
  5982  		if z.Op != OpARM64AND {
  5983  			break
  5984  		}
  5985  		y := z.Args[1]
  5986  		x := z.Args[0]
  5987  		if !(z.Uses == 1) {
  5988  			break
  5989  		}
  5990  		v.reset(OpARM64GreaterEqual)
  5991  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  5992  		v0.AddArg2(x, y)
  5993  		v.AddArg(v0)
  5994  		return true
  5995  	}
  5996  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  5997  	// cond: x.Uses == 1
  5998  	// result: (GreaterEqual (TSTconst [c] y))
  5999  	for {
  6000  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6001  			break
  6002  		}
  6003  		x := v_0.Args[0]
  6004  		if x.Op != OpARM64ANDconst {
  6005  			break
  6006  		}
  6007  		c := auxIntToInt64(x.AuxInt)
  6008  		y := x.Args[0]
  6009  		if !(x.Uses == 1) {
  6010  			break
  6011  		}
  6012  		v.reset(OpARM64GreaterEqual)
  6013  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6014  		v0.AuxInt = int64ToAuxInt(c)
  6015  		v0.AddArg(y)
  6016  		v.AddArg(v0)
  6017  		return true
  6018  	}
  6019  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  6020  	// cond: x.Uses == 1
  6021  	// result: (GreaterEqualNoov (CMNconst [c] y))
  6022  	for {
  6023  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6024  			break
  6025  		}
  6026  		x := v_0.Args[0]
  6027  		if x.Op != OpARM64ADDconst {
  6028  			break
  6029  		}
  6030  		c := auxIntToInt64(x.AuxInt)
  6031  		y := x.Args[0]
  6032  		if !(x.Uses == 1) {
  6033  			break
  6034  		}
  6035  		v.reset(OpARM64GreaterEqualNoov)
  6036  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  6037  		v0.AuxInt = int64ToAuxInt(c)
  6038  		v0.AddArg(y)
  6039  		v.AddArg(v0)
  6040  		return true
  6041  	}
  6042  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  6043  	// cond: x.Uses == 1
  6044  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  6045  	for {
  6046  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6047  			break
  6048  		}
  6049  		x := v_0.Args[0]
  6050  		if x.Op != OpARM64ADDconst {
  6051  			break
  6052  		}
  6053  		c := auxIntToInt64(x.AuxInt)
  6054  		y := x.Args[0]
  6055  		if !(x.Uses == 1) {
  6056  			break
  6057  		}
  6058  		v.reset(OpARM64GreaterEqualNoov)
  6059  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  6060  		v0.AuxInt = int32ToAuxInt(int32(c))
  6061  		v0.AddArg(y)
  6062  		v.AddArg(v0)
  6063  		return true
  6064  	}
  6065  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  6066  	// cond: z.Uses == 1
  6067  	// result: (GreaterEqualNoov (CMN x y))
  6068  	for {
  6069  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6070  			break
  6071  		}
  6072  		z := v_0.Args[0]
  6073  		if z.Op != OpARM64ADD {
  6074  			break
  6075  		}
  6076  		y := z.Args[1]
  6077  		x := z.Args[0]
  6078  		if !(z.Uses == 1) {
  6079  			break
  6080  		}
  6081  		v.reset(OpARM64GreaterEqualNoov)
  6082  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6083  		v0.AddArg2(x, y)
  6084  		v.AddArg(v0)
  6085  		return true
  6086  	}
  6087  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  6088  	// cond: z.Uses == 1
  6089  	// result: (GreaterEqualNoov (CMNW x y))
  6090  	for {
  6091  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6092  			break
  6093  		}
  6094  		z := v_0.Args[0]
  6095  		if z.Op != OpARM64ADD {
  6096  			break
  6097  		}
  6098  		y := z.Args[1]
  6099  		x := z.Args[0]
  6100  		if !(z.Uses == 1) {
  6101  			break
  6102  		}
  6103  		v.reset(OpARM64GreaterEqualNoov)
  6104  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6105  		v0.AddArg2(x, y)
  6106  		v.AddArg(v0)
  6107  		return true
  6108  	}
  6109  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  6110  	// cond: z.Uses == 1
  6111  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  6112  	for {
  6113  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6114  			break
  6115  		}
  6116  		z := v_0.Args[0]
  6117  		if z.Op != OpARM64MADD {
  6118  			break
  6119  		}
  6120  		y := z.Args[2]
  6121  		a := z.Args[0]
  6122  		x := z.Args[1]
  6123  		if !(z.Uses == 1) {
  6124  			break
  6125  		}
  6126  		v.reset(OpARM64GreaterEqualNoov)
  6127  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6128  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6129  		v1.AddArg2(x, y)
  6130  		v0.AddArg2(a, v1)
  6131  		v.AddArg(v0)
  6132  		return true
  6133  	}
  6134  	// match: (GreaterEqual (CMPconst [0] z:(MSUB a x y)))
  6135  	// cond: z.Uses == 1
  6136  	// result: (GreaterEqualNoov (CMP a (MUL <x.Type> x y)))
  6137  	for {
  6138  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6139  			break
  6140  		}
  6141  		z := v_0.Args[0]
  6142  		if z.Op != OpARM64MSUB {
  6143  			break
  6144  		}
  6145  		y := z.Args[2]
  6146  		a := z.Args[0]
  6147  		x := z.Args[1]
  6148  		if !(z.Uses == 1) {
  6149  			break
  6150  		}
  6151  		v.reset(OpARM64GreaterEqualNoov)
  6152  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6153  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6154  		v1.AddArg2(x, y)
  6155  		v0.AddArg2(a, v1)
  6156  		v.AddArg(v0)
  6157  		return true
  6158  	}
  6159  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  6160  	// cond: z.Uses == 1
  6161  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  6162  	for {
  6163  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6164  			break
  6165  		}
  6166  		z := v_0.Args[0]
  6167  		if z.Op != OpARM64MADDW {
  6168  			break
  6169  		}
  6170  		y := z.Args[2]
  6171  		a := z.Args[0]
  6172  		x := z.Args[1]
  6173  		if !(z.Uses == 1) {
  6174  			break
  6175  		}
  6176  		v.reset(OpARM64GreaterEqualNoov)
  6177  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6178  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6179  		v1.AddArg2(x, y)
  6180  		v0.AddArg2(a, v1)
  6181  		v.AddArg(v0)
  6182  		return true
  6183  	}
  6184  	// match: (GreaterEqual (CMPWconst [0] z:(MSUBW a x y)))
  6185  	// cond: z.Uses == 1
  6186  	// result: (GreaterEqualNoov (CMPW a (MULW <x.Type> x y)))
  6187  	for {
  6188  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6189  			break
  6190  		}
  6191  		z := v_0.Args[0]
  6192  		if z.Op != OpARM64MSUBW {
  6193  			break
  6194  		}
  6195  		y := z.Args[2]
  6196  		a := z.Args[0]
  6197  		x := z.Args[1]
  6198  		if !(z.Uses == 1) {
  6199  			break
  6200  		}
  6201  		v.reset(OpARM64GreaterEqualNoov)
  6202  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6203  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6204  		v1.AddArg2(x, y)
  6205  		v0.AddArg2(a, v1)
  6206  		v.AddArg(v0)
  6207  		return true
  6208  	}
  6209  	// match: (GreaterEqual (FlagConstant [fc]))
  6210  	// result: (MOVDconst [b2i(fc.ge())])
  6211  	for {
  6212  		if v_0.Op != OpARM64FlagConstant {
  6213  			break
  6214  		}
  6215  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6216  		v.reset(OpARM64MOVDconst)
  6217  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  6218  		return true
  6219  	}
  6220  	// match: (GreaterEqual (InvertFlags x))
  6221  	// result: (LessEqual x)
  6222  	for {
  6223  		if v_0.Op != OpARM64InvertFlags {
  6224  			break
  6225  		}
  6226  		x := v_0.Args[0]
  6227  		v.reset(OpARM64LessEqual)
  6228  		v.AddArg(x)
  6229  		return true
  6230  	}
  6231  	return false
  6232  }
  6233  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  6234  	v_0 := v.Args[0]
  6235  	// match: (GreaterEqualF (InvertFlags x))
  6236  	// result: (LessEqualF x)
  6237  	for {
  6238  		if v_0.Op != OpARM64InvertFlags {
  6239  			break
  6240  		}
  6241  		x := v_0.Args[0]
  6242  		v.reset(OpARM64LessEqualF)
  6243  		v.AddArg(x)
  6244  		return true
  6245  	}
  6246  	return false
  6247  }
  6248  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  6249  	v_0 := v.Args[0]
  6250  	b := v.Block
  6251  	typ := &b.Func.Config.Types
  6252  	// match: (GreaterEqualNoov (FlagConstant [fc]))
  6253  	// result: (MOVDconst [b2i(fc.geNoov())])
  6254  	for {
  6255  		if v_0.Op != OpARM64FlagConstant {
  6256  			break
  6257  		}
  6258  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6259  		v.reset(OpARM64MOVDconst)
  6260  		v.AuxInt = int64ToAuxInt(b2i(fc.geNoov()))
  6261  		return true
  6262  	}
  6263  	// match: (GreaterEqualNoov (InvertFlags x))
  6264  	// result: (CSINC [OpARM64NotEqual] (LessThanNoov <typ.Bool> x) (MOVDconst [0]) x)
  6265  	for {
  6266  		if v_0.Op != OpARM64InvertFlags {
  6267  			break
  6268  		}
  6269  		x := v_0.Args[0]
  6270  		v.reset(OpARM64CSINC)
  6271  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6272  		v0 := b.NewValue0(v.Pos, OpARM64LessThanNoov, typ.Bool)
  6273  		v0.AddArg(x)
  6274  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
  6275  		v1.AuxInt = int64ToAuxInt(0)
  6276  		v.AddArg3(v0, v1, x)
  6277  		return true
  6278  	}
  6279  	return false
  6280  }
  6281  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  6282  	v_0 := v.Args[0]
  6283  	// match: (GreaterEqualU (FlagConstant [fc]))
  6284  	// result: (MOVDconst [b2i(fc.uge())])
  6285  	for {
  6286  		if v_0.Op != OpARM64FlagConstant {
  6287  			break
  6288  		}
  6289  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6290  		v.reset(OpARM64MOVDconst)
  6291  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  6292  		return true
  6293  	}
  6294  	// match: (GreaterEqualU (InvertFlags x))
  6295  	// result: (LessEqualU x)
  6296  	for {
  6297  		if v_0.Op != OpARM64InvertFlags {
  6298  			break
  6299  		}
  6300  		x := v_0.Args[0]
  6301  		v.reset(OpARM64LessEqualU)
  6302  		v.AddArg(x)
  6303  		return true
  6304  	}
  6305  	return false
  6306  }
  6307  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  6308  	v_0 := v.Args[0]
  6309  	b := v.Block
  6310  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  6311  	// cond: z.Uses == 1
  6312  	// result: (GreaterThan (TST x y))
  6313  	for {
  6314  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6315  			break
  6316  		}
  6317  		z := v_0.Args[0]
  6318  		if z.Op != OpARM64AND {
  6319  			break
  6320  		}
  6321  		y := z.Args[1]
  6322  		x := z.Args[0]
  6323  		if !(z.Uses == 1) {
  6324  			break
  6325  		}
  6326  		v.reset(OpARM64GreaterThan)
  6327  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6328  		v0.AddArg2(x, y)
  6329  		v.AddArg(v0)
  6330  		return true
  6331  	}
  6332  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  6333  	// cond: x.Uses == 1
  6334  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  6335  	for {
  6336  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6337  			break
  6338  		}
  6339  		x := v_0.Args[0]
  6340  		if x.Op != OpARM64ANDconst {
  6341  			break
  6342  		}
  6343  		c := auxIntToInt64(x.AuxInt)
  6344  		y := x.Args[0]
  6345  		if !(x.Uses == 1) {
  6346  			break
  6347  		}
  6348  		v.reset(OpARM64GreaterThan)
  6349  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6350  		v0.AuxInt = int32ToAuxInt(int32(c))
  6351  		v0.AddArg(y)
  6352  		v.AddArg(v0)
  6353  		return true
  6354  	}
  6355  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  6356  	// cond: z.Uses == 1
  6357  	// result: (GreaterThan (TSTW x y))
  6358  	for {
  6359  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6360  			break
  6361  		}
  6362  		z := v_0.Args[0]
  6363  		if z.Op != OpARM64AND {
  6364  			break
  6365  		}
  6366  		y := z.Args[1]
  6367  		x := z.Args[0]
  6368  		if !(z.Uses == 1) {
  6369  			break
  6370  		}
  6371  		v.reset(OpARM64GreaterThan)
  6372  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6373  		v0.AddArg2(x, y)
  6374  		v.AddArg(v0)
  6375  		return true
  6376  	}
  6377  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  6378  	// cond: x.Uses == 1
  6379  	// result: (GreaterThan (TSTconst [c] y))
  6380  	for {
  6381  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6382  			break
  6383  		}
  6384  		x := v_0.Args[0]
  6385  		if x.Op != OpARM64ANDconst {
  6386  			break
  6387  		}
  6388  		c := auxIntToInt64(x.AuxInt)
  6389  		y := x.Args[0]
  6390  		if !(x.Uses == 1) {
  6391  			break
  6392  		}
  6393  		v.reset(OpARM64GreaterThan)
  6394  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6395  		v0.AuxInt = int64ToAuxInt(c)
  6396  		v0.AddArg(y)
  6397  		v.AddArg(v0)
  6398  		return true
  6399  	}
  6400  	// match: (GreaterThan (FlagConstant [fc]))
  6401  	// result: (MOVDconst [b2i(fc.gt())])
  6402  	for {
  6403  		if v_0.Op != OpARM64FlagConstant {
  6404  			break
  6405  		}
  6406  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6407  		v.reset(OpARM64MOVDconst)
  6408  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  6409  		return true
  6410  	}
  6411  	// match: (GreaterThan (InvertFlags x))
  6412  	// result: (LessThan x)
  6413  	for {
  6414  		if v_0.Op != OpARM64InvertFlags {
  6415  			break
  6416  		}
  6417  		x := v_0.Args[0]
  6418  		v.reset(OpARM64LessThan)
  6419  		v.AddArg(x)
  6420  		return true
  6421  	}
  6422  	return false
  6423  }
  6424  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  6425  	v_0 := v.Args[0]
  6426  	// match: (GreaterThanF (InvertFlags x))
  6427  	// result: (LessThanF x)
  6428  	for {
  6429  		if v_0.Op != OpARM64InvertFlags {
  6430  			break
  6431  		}
  6432  		x := v_0.Args[0]
  6433  		v.reset(OpARM64LessThanF)
  6434  		v.AddArg(x)
  6435  		return true
  6436  	}
  6437  	return false
  6438  }
  6439  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  6440  	v_0 := v.Args[0]
  6441  	// match: (GreaterThanU (FlagConstant [fc]))
  6442  	// result: (MOVDconst [b2i(fc.ugt())])
  6443  	for {
  6444  		if v_0.Op != OpARM64FlagConstant {
  6445  			break
  6446  		}
  6447  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6448  		v.reset(OpARM64MOVDconst)
  6449  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  6450  		return true
  6451  	}
  6452  	// match: (GreaterThanU (InvertFlags x))
  6453  	// result: (LessThanU x)
  6454  	for {
  6455  		if v_0.Op != OpARM64InvertFlags {
  6456  			break
  6457  		}
  6458  		x := v_0.Args[0]
  6459  		v.reset(OpARM64LessThanU)
  6460  		v.AddArg(x)
  6461  		return true
  6462  	}
  6463  	return false
  6464  }
  6465  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  6466  	v_1 := v.Args[1]
  6467  	v_0 := v.Args[0]
  6468  	b := v.Block
  6469  	config := b.Func.Config
  6470  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  6471  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6472  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  6473  	for {
  6474  		off1 := auxIntToInt32(v.AuxInt)
  6475  		sym := auxToSym(v.Aux)
  6476  		if v_0.Op != OpARM64ADDconst {
  6477  			break
  6478  		}
  6479  		off2 := auxIntToInt64(v_0.AuxInt)
  6480  		ptr := v_0.Args[0]
  6481  		mem := v_1
  6482  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6483  			break
  6484  		}
  6485  		v.reset(OpARM64LDP)
  6486  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6487  		v.Aux = symToAux(sym)
  6488  		v.AddArg2(ptr, mem)
  6489  		return true
  6490  	}
  6491  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6492  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6493  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6494  	for {
  6495  		off1 := auxIntToInt32(v.AuxInt)
  6496  		sym1 := auxToSym(v.Aux)
  6497  		if v_0.Op != OpARM64MOVDaddr {
  6498  			break
  6499  		}
  6500  		off2 := auxIntToInt32(v_0.AuxInt)
  6501  		sym2 := auxToSym(v_0.Aux)
  6502  		ptr := v_0.Args[0]
  6503  		mem := v_1
  6504  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6505  			break
  6506  		}
  6507  		v.reset(OpARM64LDP)
  6508  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6509  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6510  		v.AddArg2(ptr, mem)
  6511  		return true
  6512  	}
  6513  	return false
  6514  }
  6515  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  6516  	v_0 := v.Args[0]
  6517  	b := v.Block
  6518  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  6519  	// cond: z.Uses == 1
  6520  	// result: (LessEqual (TST x y))
  6521  	for {
  6522  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6523  			break
  6524  		}
  6525  		z := v_0.Args[0]
  6526  		if z.Op != OpARM64AND {
  6527  			break
  6528  		}
  6529  		y := z.Args[1]
  6530  		x := z.Args[0]
  6531  		if !(z.Uses == 1) {
  6532  			break
  6533  		}
  6534  		v.reset(OpARM64LessEqual)
  6535  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6536  		v0.AddArg2(x, y)
  6537  		v.AddArg(v0)
  6538  		return true
  6539  	}
  6540  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  6541  	// cond: x.Uses == 1
  6542  	// result: (LessEqual (TSTWconst [int32(c)] y))
  6543  	for {
  6544  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6545  			break
  6546  		}
  6547  		x := v_0.Args[0]
  6548  		if x.Op != OpARM64ANDconst {
  6549  			break
  6550  		}
  6551  		c := auxIntToInt64(x.AuxInt)
  6552  		y := x.Args[0]
  6553  		if !(x.Uses == 1) {
  6554  			break
  6555  		}
  6556  		v.reset(OpARM64LessEqual)
  6557  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6558  		v0.AuxInt = int32ToAuxInt(int32(c))
  6559  		v0.AddArg(y)
  6560  		v.AddArg(v0)
  6561  		return true
  6562  	}
  6563  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  6564  	// cond: z.Uses == 1
  6565  	// result: (LessEqual (TSTW x y))
  6566  	for {
  6567  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6568  			break
  6569  		}
  6570  		z := v_0.Args[0]
  6571  		if z.Op != OpARM64AND {
  6572  			break
  6573  		}
  6574  		y := z.Args[1]
  6575  		x := z.Args[0]
  6576  		if !(z.Uses == 1) {
  6577  			break
  6578  		}
  6579  		v.reset(OpARM64LessEqual)
  6580  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6581  		v0.AddArg2(x, y)
  6582  		v.AddArg(v0)
  6583  		return true
  6584  	}
  6585  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  6586  	// cond: x.Uses == 1
  6587  	// result: (LessEqual (TSTconst [c] y))
  6588  	for {
  6589  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6590  			break
  6591  		}
  6592  		x := v_0.Args[0]
  6593  		if x.Op != OpARM64ANDconst {
  6594  			break
  6595  		}
  6596  		c := auxIntToInt64(x.AuxInt)
  6597  		y := x.Args[0]
  6598  		if !(x.Uses == 1) {
  6599  			break
  6600  		}
  6601  		v.reset(OpARM64LessEqual)
  6602  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6603  		v0.AuxInt = int64ToAuxInt(c)
  6604  		v0.AddArg(y)
  6605  		v.AddArg(v0)
  6606  		return true
  6607  	}
  6608  	// match: (LessEqual (FlagConstant [fc]))
  6609  	// result: (MOVDconst [b2i(fc.le())])
  6610  	for {
  6611  		if v_0.Op != OpARM64FlagConstant {
  6612  			break
  6613  		}
  6614  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6615  		v.reset(OpARM64MOVDconst)
  6616  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  6617  		return true
  6618  	}
  6619  	// match: (LessEqual (InvertFlags x))
  6620  	// result: (GreaterEqual x)
  6621  	for {
  6622  		if v_0.Op != OpARM64InvertFlags {
  6623  			break
  6624  		}
  6625  		x := v_0.Args[0]
  6626  		v.reset(OpARM64GreaterEqual)
  6627  		v.AddArg(x)
  6628  		return true
  6629  	}
  6630  	return false
  6631  }
  6632  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  6633  	v_0 := v.Args[0]
  6634  	// match: (LessEqualF (InvertFlags x))
  6635  	// result: (GreaterEqualF x)
  6636  	for {
  6637  		if v_0.Op != OpARM64InvertFlags {
  6638  			break
  6639  		}
  6640  		x := v_0.Args[0]
  6641  		v.reset(OpARM64GreaterEqualF)
  6642  		v.AddArg(x)
  6643  		return true
  6644  	}
  6645  	return false
  6646  }
  6647  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  6648  	v_0 := v.Args[0]
  6649  	// match: (LessEqualU (FlagConstant [fc]))
  6650  	// result: (MOVDconst [b2i(fc.ule())])
  6651  	for {
  6652  		if v_0.Op != OpARM64FlagConstant {
  6653  			break
  6654  		}
  6655  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6656  		v.reset(OpARM64MOVDconst)
  6657  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  6658  		return true
  6659  	}
  6660  	// match: (LessEqualU (InvertFlags x))
  6661  	// result: (GreaterEqualU x)
  6662  	for {
  6663  		if v_0.Op != OpARM64InvertFlags {
  6664  			break
  6665  		}
  6666  		x := v_0.Args[0]
  6667  		v.reset(OpARM64GreaterEqualU)
  6668  		v.AddArg(x)
  6669  		return true
  6670  	}
  6671  	return false
  6672  }
  6673  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  6674  	v_0 := v.Args[0]
  6675  	b := v.Block
  6676  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  6677  	// cond: z.Uses == 1
  6678  	// result: (LessThan (TST x y))
  6679  	for {
  6680  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6681  			break
  6682  		}
  6683  		z := v_0.Args[0]
  6684  		if z.Op != OpARM64AND {
  6685  			break
  6686  		}
  6687  		y := z.Args[1]
  6688  		x := z.Args[0]
  6689  		if !(z.Uses == 1) {
  6690  			break
  6691  		}
  6692  		v.reset(OpARM64LessThan)
  6693  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6694  		v0.AddArg2(x, y)
  6695  		v.AddArg(v0)
  6696  		return true
  6697  	}
  6698  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  6699  	// cond: x.Uses == 1
  6700  	// result: (LessThan (TSTWconst [int32(c)] y))
  6701  	for {
  6702  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6703  			break
  6704  		}
  6705  		x := v_0.Args[0]
  6706  		if x.Op != OpARM64ANDconst {
  6707  			break
  6708  		}
  6709  		c := auxIntToInt64(x.AuxInt)
  6710  		y := x.Args[0]
  6711  		if !(x.Uses == 1) {
  6712  			break
  6713  		}
  6714  		v.reset(OpARM64LessThan)
  6715  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6716  		v0.AuxInt = int32ToAuxInt(int32(c))
  6717  		v0.AddArg(y)
  6718  		v.AddArg(v0)
  6719  		return true
  6720  	}
  6721  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  6722  	// cond: z.Uses == 1
  6723  	// result: (LessThan (TSTW x y))
  6724  	for {
  6725  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6726  			break
  6727  		}
  6728  		z := v_0.Args[0]
  6729  		if z.Op != OpARM64AND {
  6730  			break
  6731  		}
  6732  		y := z.Args[1]
  6733  		x := z.Args[0]
  6734  		if !(z.Uses == 1) {
  6735  			break
  6736  		}
  6737  		v.reset(OpARM64LessThan)
  6738  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6739  		v0.AddArg2(x, y)
  6740  		v.AddArg(v0)
  6741  		return true
  6742  	}
  6743  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  6744  	// cond: x.Uses == 1
  6745  	// result: (LessThan (TSTconst [c] y))
  6746  	for {
  6747  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6748  			break
  6749  		}
  6750  		x := v_0.Args[0]
  6751  		if x.Op != OpARM64ANDconst {
  6752  			break
  6753  		}
  6754  		c := auxIntToInt64(x.AuxInt)
  6755  		y := x.Args[0]
  6756  		if !(x.Uses == 1) {
  6757  			break
  6758  		}
  6759  		v.reset(OpARM64LessThan)
  6760  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6761  		v0.AuxInt = int64ToAuxInt(c)
  6762  		v0.AddArg(y)
  6763  		v.AddArg(v0)
  6764  		return true
  6765  	}
  6766  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  6767  	// cond: x.Uses == 1
  6768  	// result: (LessThanNoov (CMNconst [c] y))
  6769  	for {
  6770  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6771  			break
  6772  		}
  6773  		x := v_0.Args[0]
  6774  		if x.Op != OpARM64ADDconst {
  6775  			break
  6776  		}
  6777  		c := auxIntToInt64(x.AuxInt)
  6778  		y := x.Args[0]
  6779  		if !(x.Uses == 1) {
  6780  			break
  6781  		}
  6782  		v.reset(OpARM64LessThanNoov)
  6783  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  6784  		v0.AuxInt = int64ToAuxInt(c)
  6785  		v0.AddArg(y)
  6786  		v.AddArg(v0)
  6787  		return true
  6788  	}
  6789  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  6790  	// cond: x.Uses == 1
  6791  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  6792  	for {
  6793  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6794  			break
  6795  		}
  6796  		x := v_0.Args[0]
  6797  		if x.Op != OpARM64ADDconst {
  6798  			break
  6799  		}
  6800  		c := auxIntToInt64(x.AuxInt)
  6801  		y := x.Args[0]
  6802  		if !(x.Uses == 1) {
  6803  			break
  6804  		}
  6805  		v.reset(OpARM64LessThanNoov)
  6806  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  6807  		v0.AuxInt = int32ToAuxInt(int32(c))
  6808  		v0.AddArg(y)
  6809  		v.AddArg(v0)
  6810  		return true
  6811  	}
  6812  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  6813  	// cond: z.Uses == 1
  6814  	// result: (LessThanNoov (CMN x y))
  6815  	for {
  6816  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6817  			break
  6818  		}
  6819  		z := v_0.Args[0]
  6820  		if z.Op != OpARM64ADD {
  6821  			break
  6822  		}
  6823  		y := z.Args[1]
  6824  		x := z.Args[0]
  6825  		if !(z.Uses == 1) {
  6826  			break
  6827  		}
  6828  		v.reset(OpARM64LessThanNoov)
  6829  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6830  		v0.AddArg2(x, y)
  6831  		v.AddArg(v0)
  6832  		return true
  6833  	}
  6834  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  6835  	// cond: z.Uses == 1
  6836  	// result: (LessThanNoov (CMNW x y))
  6837  	for {
  6838  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6839  			break
  6840  		}
  6841  		z := v_0.Args[0]
  6842  		if z.Op != OpARM64ADD {
  6843  			break
  6844  		}
  6845  		y := z.Args[1]
  6846  		x := z.Args[0]
  6847  		if !(z.Uses == 1) {
  6848  			break
  6849  		}
  6850  		v.reset(OpARM64LessThanNoov)
  6851  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6852  		v0.AddArg2(x, y)
  6853  		v.AddArg(v0)
  6854  		return true
  6855  	}
  6856  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  6857  	// cond: z.Uses == 1
  6858  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  6859  	for {
  6860  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6861  			break
  6862  		}
  6863  		z := v_0.Args[0]
  6864  		if z.Op != OpARM64MADD {
  6865  			break
  6866  		}
  6867  		y := z.Args[2]
  6868  		a := z.Args[0]
  6869  		x := z.Args[1]
  6870  		if !(z.Uses == 1) {
  6871  			break
  6872  		}
  6873  		v.reset(OpARM64LessThanNoov)
  6874  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6875  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6876  		v1.AddArg2(x, y)
  6877  		v0.AddArg2(a, v1)
  6878  		v.AddArg(v0)
  6879  		return true
  6880  	}
  6881  	// match: (LessThan (CMPconst [0] z:(MSUB a x y)))
  6882  	// cond: z.Uses == 1
  6883  	// result: (LessThanNoov (CMP a (MUL <x.Type> x y)))
  6884  	for {
  6885  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6886  			break
  6887  		}
  6888  		z := v_0.Args[0]
  6889  		if z.Op != OpARM64MSUB {
  6890  			break
  6891  		}
  6892  		y := z.Args[2]
  6893  		a := z.Args[0]
  6894  		x := z.Args[1]
  6895  		if !(z.Uses == 1) {
  6896  			break
  6897  		}
  6898  		v.reset(OpARM64LessThanNoov)
  6899  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6900  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6901  		v1.AddArg2(x, y)
  6902  		v0.AddArg2(a, v1)
  6903  		v.AddArg(v0)
  6904  		return true
  6905  	}
  6906  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  6907  	// cond: z.Uses == 1
  6908  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  6909  	for {
  6910  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6911  			break
  6912  		}
  6913  		z := v_0.Args[0]
  6914  		if z.Op != OpARM64MADDW {
  6915  			break
  6916  		}
  6917  		y := z.Args[2]
  6918  		a := z.Args[0]
  6919  		x := z.Args[1]
  6920  		if !(z.Uses == 1) {
  6921  			break
  6922  		}
  6923  		v.reset(OpARM64LessThanNoov)
  6924  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6925  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6926  		v1.AddArg2(x, y)
  6927  		v0.AddArg2(a, v1)
  6928  		v.AddArg(v0)
  6929  		return true
  6930  	}
  6931  	// match: (LessThan (CMPWconst [0] z:(MSUBW a x y)))
  6932  	// cond: z.Uses == 1
  6933  	// result: (LessThanNoov (CMPW a (MULW <x.Type> x y)))
  6934  	for {
  6935  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6936  			break
  6937  		}
  6938  		z := v_0.Args[0]
  6939  		if z.Op != OpARM64MSUBW {
  6940  			break
  6941  		}
  6942  		y := z.Args[2]
  6943  		a := z.Args[0]
  6944  		x := z.Args[1]
  6945  		if !(z.Uses == 1) {
  6946  			break
  6947  		}
  6948  		v.reset(OpARM64LessThanNoov)
  6949  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6950  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6951  		v1.AddArg2(x, y)
  6952  		v0.AddArg2(a, v1)
  6953  		v.AddArg(v0)
  6954  		return true
  6955  	}
  6956  	// match: (LessThan (FlagConstant [fc]))
  6957  	// result: (MOVDconst [b2i(fc.lt())])
  6958  	for {
  6959  		if v_0.Op != OpARM64FlagConstant {
  6960  			break
  6961  		}
  6962  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6963  		v.reset(OpARM64MOVDconst)
  6964  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  6965  		return true
  6966  	}
  6967  	// match: (LessThan (InvertFlags x))
  6968  	// result: (GreaterThan x)
  6969  	for {
  6970  		if v_0.Op != OpARM64InvertFlags {
  6971  			break
  6972  		}
  6973  		x := v_0.Args[0]
  6974  		v.reset(OpARM64GreaterThan)
  6975  		v.AddArg(x)
  6976  		return true
  6977  	}
  6978  	return false
  6979  }
  6980  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  6981  	v_0 := v.Args[0]
  6982  	// match: (LessThanF (InvertFlags x))
  6983  	// result: (GreaterThanF x)
  6984  	for {
  6985  		if v_0.Op != OpARM64InvertFlags {
  6986  			break
  6987  		}
  6988  		x := v_0.Args[0]
  6989  		v.reset(OpARM64GreaterThanF)
  6990  		v.AddArg(x)
  6991  		return true
  6992  	}
  6993  	return false
  6994  }
  6995  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  6996  	v_0 := v.Args[0]
  6997  	b := v.Block
  6998  	typ := &b.Func.Config.Types
  6999  	// match: (LessThanNoov (FlagConstant [fc]))
  7000  	// result: (MOVDconst [b2i(fc.ltNoov())])
  7001  	for {
  7002  		if v_0.Op != OpARM64FlagConstant {
  7003  			break
  7004  		}
  7005  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7006  		v.reset(OpARM64MOVDconst)
  7007  		v.AuxInt = int64ToAuxInt(b2i(fc.ltNoov()))
  7008  		return true
  7009  	}
  7010  	// match: (LessThanNoov (InvertFlags x))
  7011  	// result: (CSEL0 [OpARM64NotEqual] (GreaterEqualNoov <typ.Bool> x) x)
  7012  	for {
  7013  		if v_0.Op != OpARM64InvertFlags {
  7014  			break
  7015  		}
  7016  		x := v_0.Args[0]
  7017  		v.reset(OpARM64CSEL0)
  7018  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  7019  		v0 := b.NewValue0(v.Pos, OpARM64GreaterEqualNoov, typ.Bool)
  7020  		v0.AddArg(x)
  7021  		v.AddArg2(v0, x)
  7022  		return true
  7023  	}
  7024  	return false
  7025  }
  7026  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  7027  	v_0 := v.Args[0]
  7028  	// match: (LessThanU (FlagConstant [fc]))
  7029  	// result: (MOVDconst [b2i(fc.ult())])
  7030  	for {
  7031  		if v_0.Op != OpARM64FlagConstant {
  7032  			break
  7033  		}
  7034  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7035  		v.reset(OpARM64MOVDconst)
  7036  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  7037  		return true
  7038  	}
  7039  	// match: (LessThanU (InvertFlags x))
  7040  	// result: (GreaterThanU x)
  7041  	for {
  7042  		if v_0.Op != OpARM64InvertFlags {
  7043  			break
  7044  		}
  7045  		x := v_0.Args[0]
  7046  		v.reset(OpARM64GreaterThanU)
  7047  		v.AddArg(x)
  7048  		return true
  7049  	}
  7050  	return false
  7051  }
  7052  func rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v *Value) bool {
  7053  	v_1 := v.Args[1]
  7054  	v_0 := v.Args[0]
  7055  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  7056  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  7057  	for {
  7058  		kind := auxIntToInt64(v.AuxInt)
  7059  		p := auxToPanicBoundsC(v.Aux)
  7060  		if v_0.Op != OpARM64MOVDconst {
  7061  			break
  7062  		}
  7063  		c := auxIntToInt64(v_0.AuxInt)
  7064  		mem := v_1
  7065  		v.reset(OpARM64LoweredPanicBoundsCC)
  7066  		v.AuxInt = int64ToAuxInt(kind)
  7067  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
  7068  		v.AddArg(mem)
  7069  		return true
  7070  	}
  7071  	return false
  7072  }
  7073  func rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v *Value) bool {
  7074  	v_1 := v.Args[1]
  7075  	v_0 := v.Args[0]
  7076  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  7077  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  7078  	for {
  7079  		kind := auxIntToInt64(v.AuxInt)
  7080  		p := auxToPanicBoundsC(v.Aux)
  7081  		if v_0.Op != OpARM64MOVDconst {
  7082  			break
  7083  		}
  7084  		c := auxIntToInt64(v_0.AuxInt)
  7085  		mem := v_1
  7086  		v.reset(OpARM64LoweredPanicBoundsCC)
  7087  		v.AuxInt = int64ToAuxInt(kind)
  7088  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
  7089  		v.AddArg(mem)
  7090  		return true
  7091  	}
  7092  	return false
  7093  }
  7094  func rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v *Value) bool {
  7095  	v_2 := v.Args[2]
  7096  	v_1 := v.Args[1]
  7097  	v_0 := v.Args[0]
  7098  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  7099  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:c}} mem)
  7100  	for {
  7101  		kind := auxIntToInt64(v.AuxInt)
  7102  		x := v_0
  7103  		if v_1.Op != OpARM64MOVDconst {
  7104  			break
  7105  		}
  7106  		c := auxIntToInt64(v_1.AuxInt)
  7107  		mem := v_2
  7108  		v.reset(OpARM64LoweredPanicBoundsRC)
  7109  		v.AuxInt = int64ToAuxInt(kind)
  7110  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  7111  		v.AddArg2(x, mem)
  7112  		return true
  7113  	}
  7114  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  7115  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:c}} y mem)
  7116  	for {
  7117  		kind := auxIntToInt64(v.AuxInt)
  7118  		if v_0.Op != OpARM64MOVDconst {
  7119  			break
  7120  		}
  7121  		c := auxIntToInt64(v_0.AuxInt)
  7122  		y := v_1
  7123  		mem := v_2
  7124  		v.reset(OpARM64LoweredPanicBoundsCR)
  7125  		v.AuxInt = int64ToAuxInt(kind)
  7126  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  7127  		v.AddArg2(y, mem)
  7128  		return true
  7129  	}
  7130  	return false
  7131  }
  7132  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  7133  	v_2 := v.Args[2]
  7134  	v_1 := v.Args[1]
  7135  	v_0 := v.Args[0]
  7136  	b := v.Block
  7137  	// match: (MADD a x (MOVDconst [-1]))
  7138  	// result: (SUB a x)
  7139  	for {
  7140  		a := v_0
  7141  		x := v_1
  7142  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  7143  			break
  7144  		}
  7145  		v.reset(OpARM64SUB)
  7146  		v.AddArg2(a, x)
  7147  		return true
  7148  	}
  7149  	// match: (MADD a _ (MOVDconst [0]))
  7150  	// result: a
  7151  	for {
  7152  		a := v_0
  7153  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  7154  			break
  7155  		}
  7156  		v.copyOf(a)
  7157  		return true
  7158  	}
  7159  	// match: (MADD a x (MOVDconst [1]))
  7160  	// result: (ADD a x)
  7161  	for {
  7162  		a := v_0
  7163  		x := v_1
  7164  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  7165  			break
  7166  		}
  7167  		v.reset(OpARM64ADD)
  7168  		v.AddArg2(a, x)
  7169  		return true
  7170  	}
  7171  	// match: (MADD a x (MOVDconst [c]))
  7172  	// cond: isPowerOfTwo(c)
  7173  	// result: (ADDshiftLL a x [log64(c)])
  7174  	for {
  7175  		a := v_0
  7176  		x := v_1
  7177  		if v_2.Op != OpARM64MOVDconst {
  7178  			break
  7179  		}
  7180  		c := auxIntToInt64(v_2.AuxInt)
  7181  		if !(isPowerOfTwo(c)) {
  7182  			break
  7183  		}
  7184  		v.reset(OpARM64ADDshiftLL)
  7185  		v.AuxInt = int64ToAuxInt(log64(c))
  7186  		v.AddArg2(a, x)
  7187  		return true
  7188  	}
  7189  	// match: (MADD a x (MOVDconst [c]))
  7190  	// cond: isPowerOfTwo(c-1) && c>=3
  7191  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7192  	for {
  7193  		a := v_0
  7194  		x := v_1
  7195  		if v_2.Op != OpARM64MOVDconst {
  7196  			break
  7197  		}
  7198  		c := auxIntToInt64(v_2.AuxInt)
  7199  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7200  			break
  7201  		}
  7202  		v.reset(OpARM64ADD)
  7203  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7204  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7205  		v0.AddArg2(x, x)
  7206  		v.AddArg2(a, v0)
  7207  		return true
  7208  	}
  7209  	// match: (MADD a x (MOVDconst [c]))
  7210  	// cond: isPowerOfTwo(c+1) && c>=7
  7211  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7212  	for {
  7213  		a := v_0
  7214  		x := v_1
  7215  		if v_2.Op != OpARM64MOVDconst {
  7216  			break
  7217  		}
  7218  		c := auxIntToInt64(v_2.AuxInt)
  7219  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7220  			break
  7221  		}
  7222  		v.reset(OpARM64SUB)
  7223  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7224  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7225  		v0.AddArg2(x, x)
  7226  		v.AddArg2(a, v0)
  7227  		return true
  7228  	}
  7229  	// match: (MADD a x (MOVDconst [c]))
  7230  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7231  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7232  	for {
  7233  		a := v_0
  7234  		x := v_1
  7235  		if v_2.Op != OpARM64MOVDconst {
  7236  			break
  7237  		}
  7238  		c := auxIntToInt64(v_2.AuxInt)
  7239  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7240  			break
  7241  		}
  7242  		v.reset(OpARM64SUBshiftLL)
  7243  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7244  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7245  		v0.AuxInt = int64ToAuxInt(2)
  7246  		v0.AddArg2(x, x)
  7247  		v.AddArg2(a, v0)
  7248  		return true
  7249  	}
  7250  	// match: (MADD a x (MOVDconst [c]))
  7251  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7252  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7253  	for {
  7254  		a := v_0
  7255  		x := v_1
  7256  		if v_2.Op != OpARM64MOVDconst {
  7257  			break
  7258  		}
  7259  		c := auxIntToInt64(v_2.AuxInt)
  7260  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7261  			break
  7262  		}
  7263  		v.reset(OpARM64ADDshiftLL)
  7264  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7265  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7266  		v0.AuxInt = int64ToAuxInt(2)
  7267  		v0.AddArg2(x, x)
  7268  		v.AddArg2(a, v0)
  7269  		return true
  7270  	}
  7271  	// match: (MADD a x (MOVDconst [c]))
  7272  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7273  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7274  	for {
  7275  		a := v_0
  7276  		x := v_1
  7277  		if v_2.Op != OpARM64MOVDconst {
  7278  			break
  7279  		}
  7280  		c := auxIntToInt64(v_2.AuxInt)
  7281  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7282  			break
  7283  		}
  7284  		v.reset(OpARM64SUBshiftLL)
  7285  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7286  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7287  		v0.AuxInt = int64ToAuxInt(3)
  7288  		v0.AddArg2(x, x)
  7289  		v.AddArg2(a, v0)
  7290  		return true
  7291  	}
  7292  	// match: (MADD a x (MOVDconst [c]))
  7293  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7294  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7295  	for {
  7296  		a := v_0
  7297  		x := v_1
  7298  		if v_2.Op != OpARM64MOVDconst {
  7299  			break
  7300  		}
  7301  		c := auxIntToInt64(v_2.AuxInt)
  7302  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7303  			break
  7304  		}
  7305  		v.reset(OpARM64ADDshiftLL)
  7306  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7307  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7308  		v0.AuxInt = int64ToAuxInt(3)
  7309  		v0.AddArg2(x, x)
  7310  		v.AddArg2(a, v0)
  7311  		return true
  7312  	}
  7313  	// match: (MADD a (MOVDconst [-1]) x)
  7314  	// result: (SUB a x)
  7315  	for {
  7316  		a := v_0
  7317  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7318  			break
  7319  		}
  7320  		x := v_2
  7321  		v.reset(OpARM64SUB)
  7322  		v.AddArg2(a, x)
  7323  		return true
  7324  	}
  7325  	// match: (MADD a (MOVDconst [0]) _)
  7326  	// result: a
  7327  	for {
  7328  		a := v_0
  7329  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7330  			break
  7331  		}
  7332  		v.copyOf(a)
  7333  		return true
  7334  	}
  7335  	// match: (MADD a (MOVDconst [1]) x)
  7336  	// result: (ADD a x)
  7337  	for {
  7338  		a := v_0
  7339  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7340  			break
  7341  		}
  7342  		x := v_2
  7343  		v.reset(OpARM64ADD)
  7344  		v.AddArg2(a, x)
  7345  		return true
  7346  	}
  7347  	// match: (MADD a (MOVDconst [c]) x)
  7348  	// cond: isPowerOfTwo(c)
  7349  	// result: (ADDshiftLL a x [log64(c)])
  7350  	for {
  7351  		a := v_0
  7352  		if v_1.Op != OpARM64MOVDconst {
  7353  			break
  7354  		}
  7355  		c := auxIntToInt64(v_1.AuxInt)
  7356  		x := v_2
  7357  		if !(isPowerOfTwo(c)) {
  7358  			break
  7359  		}
  7360  		v.reset(OpARM64ADDshiftLL)
  7361  		v.AuxInt = int64ToAuxInt(log64(c))
  7362  		v.AddArg2(a, x)
  7363  		return true
  7364  	}
  7365  	// match: (MADD a (MOVDconst [c]) x)
  7366  	// cond: isPowerOfTwo(c-1) && c>=3
  7367  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7368  	for {
  7369  		a := v_0
  7370  		if v_1.Op != OpARM64MOVDconst {
  7371  			break
  7372  		}
  7373  		c := auxIntToInt64(v_1.AuxInt)
  7374  		x := v_2
  7375  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7376  			break
  7377  		}
  7378  		v.reset(OpARM64ADD)
  7379  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7380  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7381  		v0.AddArg2(x, x)
  7382  		v.AddArg2(a, v0)
  7383  		return true
  7384  	}
  7385  	// match: (MADD a (MOVDconst [c]) x)
  7386  	// cond: isPowerOfTwo(c+1) && c>=7
  7387  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7388  	for {
  7389  		a := v_0
  7390  		if v_1.Op != OpARM64MOVDconst {
  7391  			break
  7392  		}
  7393  		c := auxIntToInt64(v_1.AuxInt)
  7394  		x := v_2
  7395  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7396  			break
  7397  		}
  7398  		v.reset(OpARM64SUB)
  7399  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7400  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7401  		v0.AddArg2(x, x)
  7402  		v.AddArg2(a, v0)
  7403  		return true
  7404  	}
  7405  	// match: (MADD a (MOVDconst [c]) x)
  7406  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7407  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7408  	for {
  7409  		a := v_0
  7410  		if v_1.Op != OpARM64MOVDconst {
  7411  			break
  7412  		}
  7413  		c := auxIntToInt64(v_1.AuxInt)
  7414  		x := v_2
  7415  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7416  			break
  7417  		}
  7418  		v.reset(OpARM64SUBshiftLL)
  7419  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7420  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7421  		v0.AuxInt = int64ToAuxInt(2)
  7422  		v0.AddArg2(x, x)
  7423  		v.AddArg2(a, v0)
  7424  		return true
  7425  	}
  7426  	// match: (MADD a (MOVDconst [c]) x)
  7427  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7428  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7429  	for {
  7430  		a := v_0
  7431  		if v_1.Op != OpARM64MOVDconst {
  7432  			break
  7433  		}
  7434  		c := auxIntToInt64(v_1.AuxInt)
  7435  		x := v_2
  7436  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7437  			break
  7438  		}
  7439  		v.reset(OpARM64ADDshiftLL)
  7440  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7441  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7442  		v0.AuxInt = int64ToAuxInt(2)
  7443  		v0.AddArg2(x, x)
  7444  		v.AddArg2(a, v0)
  7445  		return true
  7446  	}
  7447  	// match: (MADD a (MOVDconst [c]) x)
  7448  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7449  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7450  	for {
  7451  		a := v_0
  7452  		if v_1.Op != OpARM64MOVDconst {
  7453  			break
  7454  		}
  7455  		c := auxIntToInt64(v_1.AuxInt)
  7456  		x := v_2
  7457  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7458  			break
  7459  		}
  7460  		v.reset(OpARM64SUBshiftLL)
  7461  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7462  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7463  		v0.AuxInt = int64ToAuxInt(3)
  7464  		v0.AddArg2(x, x)
  7465  		v.AddArg2(a, v0)
  7466  		return true
  7467  	}
  7468  	// match: (MADD a (MOVDconst [c]) x)
  7469  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7470  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7471  	for {
  7472  		a := v_0
  7473  		if v_1.Op != OpARM64MOVDconst {
  7474  			break
  7475  		}
  7476  		c := auxIntToInt64(v_1.AuxInt)
  7477  		x := v_2
  7478  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7479  			break
  7480  		}
  7481  		v.reset(OpARM64ADDshiftLL)
  7482  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7483  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7484  		v0.AuxInt = int64ToAuxInt(3)
  7485  		v0.AddArg2(x, x)
  7486  		v.AddArg2(a, v0)
  7487  		return true
  7488  	}
  7489  	// match: (MADD (MOVDconst [c]) x y)
  7490  	// result: (ADDconst [c] (MUL <x.Type> x y))
  7491  	for {
  7492  		if v_0.Op != OpARM64MOVDconst {
  7493  			break
  7494  		}
  7495  		c := auxIntToInt64(v_0.AuxInt)
  7496  		x := v_1
  7497  		y := v_2
  7498  		v.reset(OpARM64ADDconst)
  7499  		v.AuxInt = int64ToAuxInt(c)
  7500  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7501  		v0.AddArg2(x, y)
  7502  		v.AddArg(v0)
  7503  		return true
  7504  	}
  7505  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  7506  	// result: (ADDconst [c*d] a)
  7507  	for {
  7508  		a := v_0
  7509  		if v_1.Op != OpARM64MOVDconst {
  7510  			break
  7511  		}
  7512  		c := auxIntToInt64(v_1.AuxInt)
  7513  		if v_2.Op != OpARM64MOVDconst {
  7514  			break
  7515  		}
  7516  		d := auxIntToInt64(v_2.AuxInt)
  7517  		v.reset(OpARM64ADDconst)
  7518  		v.AuxInt = int64ToAuxInt(c * d)
  7519  		v.AddArg(a)
  7520  		return true
  7521  	}
  7522  	return false
  7523  }
  7524  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  7525  	v_2 := v.Args[2]
  7526  	v_1 := v.Args[1]
  7527  	v_0 := v.Args[0]
  7528  	b := v.Block
  7529  	// match: (MADDW a x (MOVDconst [c]))
  7530  	// cond: int32(c)==-1
  7531  	// result: (MOVWUreg (SUB <a.Type> a x))
  7532  	for {
  7533  		a := v_0
  7534  		x := v_1
  7535  		if v_2.Op != OpARM64MOVDconst {
  7536  			break
  7537  		}
  7538  		c := auxIntToInt64(v_2.AuxInt)
  7539  		if !(int32(c) == -1) {
  7540  			break
  7541  		}
  7542  		v.reset(OpARM64MOVWUreg)
  7543  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7544  		v0.AddArg2(a, x)
  7545  		v.AddArg(v0)
  7546  		return true
  7547  	}
  7548  	// match: (MADDW a _ (MOVDconst [c]))
  7549  	// cond: int32(c)==0
  7550  	// result: (MOVWUreg a)
  7551  	for {
  7552  		a := v_0
  7553  		if v_2.Op != OpARM64MOVDconst {
  7554  			break
  7555  		}
  7556  		c := auxIntToInt64(v_2.AuxInt)
  7557  		if !(int32(c) == 0) {
  7558  			break
  7559  		}
  7560  		v.reset(OpARM64MOVWUreg)
  7561  		v.AddArg(a)
  7562  		return true
  7563  	}
  7564  	// match: (MADDW a x (MOVDconst [c]))
  7565  	// cond: int32(c)==1
  7566  	// result: (MOVWUreg (ADD <a.Type> a x))
  7567  	for {
  7568  		a := v_0
  7569  		x := v_1
  7570  		if v_2.Op != OpARM64MOVDconst {
  7571  			break
  7572  		}
  7573  		c := auxIntToInt64(v_2.AuxInt)
  7574  		if !(int32(c) == 1) {
  7575  			break
  7576  		}
  7577  		v.reset(OpARM64MOVWUreg)
  7578  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7579  		v0.AddArg2(a, x)
  7580  		v.AddArg(v0)
  7581  		return true
  7582  	}
  7583  	// match: (MADDW a x (MOVDconst [c]))
  7584  	// cond: isPowerOfTwo(c)
  7585  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7586  	for {
  7587  		a := v_0
  7588  		x := v_1
  7589  		if v_2.Op != OpARM64MOVDconst {
  7590  			break
  7591  		}
  7592  		c := auxIntToInt64(v_2.AuxInt)
  7593  		if !(isPowerOfTwo(c)) {
  7594  			break
  7595  		}
  7596  		v.reset(OpARM64MOVWUreg)
  7597  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7598  		v0.AuxInt = int64ToAuxInt(log64(c))
  7599  		v0.AddArg2(a, x)
  7600  		v.AddArg(v0)
  7601  		return true
  7602  	}
  7603  	// match: (MADDW a x (MOVDconst [c]))
  7604  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7605  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7606  	for {
  7607  		a := v_0
  7608  		x := v_1
  7609  		if v_2.Op != OpARM64MOVDconst {
  7610  			break
  7611  		}
  7612  		c := auxIntToInt64(v_2.AuxInt)
  7613  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7614  			break
  7615  		}
  7616  		v.reset(OpARM64MOVWUreg)
  7617  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7618  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7619  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7620  		v1.AddArg2(x, x)
  7621  		v0.AddArg2(a, v1)
  7622  		v.AddArg(v0)
  7623  		return true
  7624  	}
  7625  	// match: (MADDW a x (MOVDconst [c]))
  7626  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7627  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7628  	for {
  7629  		a := v_0
  7630  		x := v_1
  7631  		if v_2.Op != OpARM64MOVDconst {
  7632  			break
  7633  		}
  7634  		c := auxIntToInt64(v_2.AuxInt)
  7635  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7636  			break
  7637  		}
  7638  		v.reset(OpARM64MOVWUreg)
  7639  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7640  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7641  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7642  		v1.AddArg2(x, x)
  7643  		v0.AddArg2(a, v1)
  7644  		v.AddArg(v0)
  7645  		return true
  7646  	}
  7647  	// match: (MADDW a x (MOVDconst [c]))
  7648  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7649  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7650  	for {
  7651  		a := v_0
  7652  		x := v_1
  7653  		if v_2.Op != OpARM64MOVDconst {
  7654  			break
  7655  		}
  7656  		c := auxIntToInt64(v_2.AuxInt)
  7657  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7658  			break
  7659  		}
  7660  		v.reset(OpARM64MOVWUreg)
  7661  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7662  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7663  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7664  		v1.AuxInt = int64ToAuxInt(2)
  7665  		v1.AddArg2(x, x)
  7666  		v0.AddArg2(a, v1)
  7667  		v.AddArg(v0)
  7668  		return true
  7669  	}
  7670  	// match: (MADDW a x (MOVDconst [c]))
  7671  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7672  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7673  	for {
  7674  		a := v_0
  7675  		x := v_1
  7676  		if v_2.Op != OpARM64MOVDconst {
  7677  			break
  7678  		}
  7679  		c := auxIntToInt64(v_2.AuxInt)
  7680  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7681  			break
  7682  		}
  7683  		v.reset(OpARM64MOVWUreg)
  7684  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7685  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7686  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7687  		v1.AuxInt = int64ToAuxInt(2)
  7688  		v1.AddArg2(x, x)
  7689  		v0.AddArg2(a, v1)
  7690  		v.AddArg(v0)
  7691  		return true
  7692  	}
  7693  	// match: (MADDW a x (MOVDconst [c]))
  7694  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7695  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7696  	for {
  7697  		a := v_0
  7698  		x := v_1
  7699  		if v_2.Op != OpARM64MOVDconst {
  7700  			break
  7701  		}
  7702  		c := auxIntToInt64(v_2.AuxInt)
  7703  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7704  			break
  7705  		}
  7706  		v.reset(OpARM64MOVWUreg)
  7707  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7708  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7709  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7710  		v1.AuxInt = int64ToAuxInt(3)
  7711  		v1.AddArg2(x, x)
  7712  		v0.AddArg2(a, v1)
  7713  		v.AddArg(v0)
  7714  		return true
  7715  	}
  7716  	// match: (MADDW a x (MOVDconst [c]))
  7717  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7718  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7719  	for {
  7720  		a := v_0
  7721  		x := v_1
  7722  		if v_2.Op != OpARM64MOVDconst {
  7723  			break
  7724  		}
  7725  		c := auxIntToInt64(v_2.AuxInt)
  7726  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7727  			break
  7728  		}
  7729  		v.reset(OpARM64MOVWUreg)
  7730  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7731  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7732  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7733  		v1.AuxInt = int64ToAuxInt(3)
  7734  		v1.AddArg2(x, x)
  7735  		v0.AddArg2(a, v1)
  7736  		v.AddArg(v0)
  7737  		return true
  7738  	}
  7739  	// match: (MADDW a (MOVDconst [c]) x)
  7740  	// cond: int32(c)==-1
  7741  	// result: (MOVWUreg (SUB <a.Type> a x))
  7742  	for {
  7743  		a := v_0
  7744  		if v_1.Op != OpARM64MOVDconst {
  7745  			break
  7746  		}
  7747  		c := auxIntToInt64(v_1.AuxInt)
  7748  		x := v_2
  7749  		if !(int32(c) == -1) {
  7750  			break
  7751  		}
  7752  		v.reset(OpARM64MOVWUreg)
  7753  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7754  		v0.AddArg2(a, x)
  7755  		v.AddArg(v0)
  7756  		return true
  7757  	}
  7758  	// match: (MADDW a (MOVDconst [c]) _)
  7759  	// cond: int32(c)==0
  7760  	// result: (MOVWUreg a)
  7761  	for {
  7762  		a := v_0
  7763  		if v_1.Op != OpARM64MOVDconst {
  7764  			break
  7765  		}
  7766  		c := auxIntToInt64(v_1.AuxInt)
  7767  		if !(int32(c) == 0) {
  7768  			break
  7769  		}
  7770  		v.reset(OpARM64MOVWUreg)
  7771  		v.AddArg(a)
  7772  		return true
  7773  	}
  7774  	// match: (MADDW a (MOVDconst [c]) x)
  7775  	// cond: int32(c)==1
  7776  	// result: (MOVWUreg (ADD <a.Type> a x))
  7777  	for {
  7778  		a := v_0
  7779  		if v_1.Op != OpARM64MOVDconst {
  7780  			break
  7781  		}
  7782  		c := auxIntToInt64(v_1.AuxInt)
  7783  		x := v_2
  7784  		if !(int32(c) == 1) {
  7785  			break
  7786  		}
  7787  		v.reset(OpARM64MOVWUreg)
  7788  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7789  		v0.AddArg2(a, x)
  7790  		v.AddArg(v0)
  7791  		return true
  7792  	}
  7793  	// match: (MADDW a (MOVDconst [c]) x)
  7794  	// cond: isPowerOfTwo(c)
  7795  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7796  	for {
  7797  		a := v_0
  7798  		if v_1.Op != OpARM64MOVDconst {
  7799  			break
  7800  		}
  7801  		c := auxIntToInt64(v_1.AuxInt)
  7802  		x := v_2
  7803  		if !(isPowerOfTwo(c)) {
  7804  			break
  7805  		}
  7806  		v.reset(OpARM64MOVWUreg)
  7807  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7808  		v0.AuxInt = int64ToAuxInt(log64(c))
  7809  		v0.AddArg2(a, x)
  7810  		v.AddArg(v0)
  7811  		return true
  7812  	}
  7813  	// match: (MADDW a (MOVDconst [c]) x)
  7814  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7815  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7816  	for {
  7817  		a := v_0
  7818  		if v_1.Op != OpARM64MOVDconst {
  7819  			break
  7820  		}
  7821  		c := auxIntToInt64(v_1.AuxInt)
  7822  		x := v_2
  7823  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7824  			break
  7825  		}
  7826  		v.reset(OpARM64MOVWUreg)
  7827  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7828  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7829  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7830  		v1.AddArg2(x, x)
  7831  		v0.AddArg2(a, v1)
  7832  		v.AddArg(v0)
  7833  		return true
  7834  	}
  7835  	// match: (MADDW a (MOVDconst [c]) x)
  7836  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7837  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7838  	for {
  7839  		a := v_0
  7840  		if v_1.Op != OpARM64MOVDconst {
  7841  			break
  7842  		}
  7843  		c := auxIntToInt64(v_1.AuxInt)
  7844  		x := v_2
  7845  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7846  			break
  7847  		}
  7848  		v.reset(OpARM64MOVWUreg)
  7849  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7850  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7851  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7852  		v1.AddArg2(x, x)
  7853  		v0.AddArg2(a, v1)
  7854  		v.AddArg(v0)
  7855  		return true
  7856  	}
  7857  	// match: (MADDW a (MOVDconst [c]) x)
  7858  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7859  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7860  	for {
  7861  		a := v_0
  7862  		if v_1.Op != OpARM64MOVDconst {
  7863  			break
  7864  		}
  7865  		c := auxIntToInt64(v_1.AuxInt)
  7866  		x := v_2
  7867  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7868  			break
  7869  		}
  7870  		v.reset(OpARM64MOVWUreg)
  7871  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7872  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7873  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7874  		v1.AuxInt = int64ToAuxInt(2)
  7875  		v1.AddArg2(x, x)
  7876  		v0.AddArg2(a, v1)
  7877  		v.AddArg(v0)
  7878  		return true
  7879  	}
  7880  	// match: (MADDW a (MOVDconst [c]) x)
  7881  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7882  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7883  	for {
  7884  		a := v_0
  7885  		if v_1.Op != OpARM64MOVDconst {
  7886  			break
  7887  		}
  7888  		c := auxIntToInt64(v_1.AuxInt)
  7889  		x := v_2
  7890  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7891  			break
  7892  		}
  7893  		v.reset(OpARM64MOVWUreg)
  7894  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7895  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7896  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7897  		v1.AuxInt = int64ToAuxInt(2)
  7898  		v1.AddArg2(x, x)
  7899  		v0.AddArg2(a, v1)
  7900  		v.AddArg(v0)
  7901  		return true
  7902  	}
  7903  	// match: (MADDW a (MOVDconst [c]) x)
  7904  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7905  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7906  	for {
  7907  		a := v_0
  7908  		if v_1.Op != OpARM64MOVDconst {
  7909  			break
  7910  		}
  7911  		c := auxIntToInt64(v_1.AuxInt)
  7912  		x := v_2
  7913  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7914  			break
  7915  		}
  7916  		v.reset(OpARM64MOVWUreg)
  7917  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7918  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7919  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7920  		v1.AuxInt = int64ToAuxInt(3)
  7921  		v1.AddArg2(x, x)
  7922  		v0.AddArg2(a, v1)
  7923  		v.AddArg(v0)
  7924  		return true
  7925  	}
  7926  	// match: (MADDW a (MOVDconst [c]) x)
  7927  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7928  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7929  	for {
  7930  		a := v_0
  7931  		if v_1.Op != OpARM64MOVDconst {
  7932  			break
  7933  		}
  7934  		c := auxIntToInt64(v_1.AuxInt)
  7935  		x := v_2
  7936  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7937  			break
  7938  		}
  7939  		v.reset(OpARM64MOVWUreg)
  7940  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7941  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7942  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7943  		v1.AuxInt = int64ToAuxInt(3)
  7944  		v1.AddArg2(x, x)
  7945  		v0.AddArg2(a, v1)
  7946  		v.AddArg(v0)
  7947  		return true
  7948  	}
  7949  	// match: (MADDW (MOVDconst [c]) x y)
  7950  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  7951  	for {
  7952  		if v_0.Op != OpARM64MOVDconst {
  7953  			break
  7954  		}
  7955  		c := auxIntToInt64(v_0.AuxInt)
  7956  		x := v_1
  7957  		y := v_2
  7958  		v.reset(OpARM64MOVWUreg)
  7959  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  7960  		v0.AuxInt = int64ToAuxInt(c)
  7961  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7962  		v1.AddArg2(x, y)
  7963  		v0.AddArg(v1)
  7964  		v.AddArg(v0)
  7965  		return true
  7966  	}
  7967  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  7968  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  7969  	for {
  7970  		a := v_0
  7971  		if v_1.Op != OpARM64MOVDconst {
  7972  			break
  7973  		}
  7974  		c := auxIntToInt64(v_1.AuxInt)
  7975  		if v_2.Op != OpARM64MOVDconst {
  7976  			break
  7977  		}
  7978  		d := auxIntToInt64(v_2.AuxInt)
  7979  		v.reset(OpARM64MOVWUreg)
  7980  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  7981  		v0.AuxInt = int64ToAuxInt(c * d)
  7982  		v0.AddArg(a)
  7983  		v.AddArg(v0)
  7984  		return true
  7985  	}
  7986  	return false
  7987  }
  7988  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  7989  	v_1 := v.Args[1]
  7990  	v_0 := v.Args[0]
  7991  	b := v.Block
  7992  	// match: (MNEG x (MOVDconst [-1]))
  7993  	// result: x
  7994  	for {
  7995  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7996  			x := v_0
  7997  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7998  				continue
  7999  			}
  8000  			v.copyOf(x)
  8001  			return true
  8002  		}
  8003  		break
  8004  	}
  8005  	// match: (MNEG _ (MOVDconst [0]))
  8006  	// result: (MOVDconst [0])
  8007  	for {
  8008  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8009  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  8010  				continue
  8011  			}
  8012  			v.reset(OpARM64MOVDconst)
  8013  			v.AuxInt = int64ToAuxInt(0)
  8014  			return true
  8015  		}
  8016  		break
  8017  	}
  8018  	// match: (MNEG x (MOVDconst [1]))
  8019  	// result: (NEG x)
  8020  	for {
  8021  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8022  			x := v_0
  8023  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  8024  				continue
  8025  			}
  8026  			v.reset(OpARM64NEG)
  8027  			v.AddArg(x)
  8028  			return true
  8029  		}
  8030  		break
  8031  	}
  8032  	// match: (MNEG x (MOVDconst [c]))
  8033  	// cond: isPowerOfTwo(c)
  8034  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  8035  	for {
  8036  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8037  			x := v_0
  8038  			if v_1.Op != OpARM64MOVDconst {
  8039  				continue
  8040  			}
  8041  			c := auxIntToInt64(v_1.AuxInt)
  8042  			if !(isPowerOfTwo(c)) {
  8043  				continue
  8044  			}
  8045  			v.reset(OpARM64NEG)
  8046  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8047  			v0.AuxInt = int64ToAuxInt(log64(c))
  8048  			v0.AddArg(x)
  8049  			v.AddArg(v0)
  8050  			return true
  8051  		}
  8052  		break
  8053  	}
  8054  	// match: (MNEG x (MOVDconst [c]))
  8055  	// cond: isPowerOfTwo(c-1) && c >= 3
  8056  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8057  	for {
  8058  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8059  			x := v_0
  8060  			if v_1.Op != OpARM64MOVDconst {
  8061  				continue
  8062  			}
  8063  			c := auxIntToInt64(v_1.AuxInt)
  8064  			if !(isPowerOfTwo(c-1) && c >= 3) {
  8065  				continue
  8066  			}
  8067  			v.reset(OpARM64NEG)
  8068  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8069  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8070  			v0.AddArg2(x, x)
  8071  			v.AddArg(v0)
  8072  			return true
  8073  		}
  8074  		break
  8075  	}
  8076  	// match: (MNEG x (MOVDconst [c]))
  8077  	// cond: isPowerOfTwo(c+1) && c >= 7
  8078  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  8079  	for {
  8080  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8081  			x := v_0
  8082  			if v_1.Op != OpARM64MOVDconst {
  8083  				continue
  8084  			}
  8085  			c := auxIntToInt64(v_1.AuxInt)
  8086  			if !(isPowerOfTwo(c+1) && c >= 7) {
  8087  				continue
  8088  			}
  8089  			v.reset(OpARM64NEG)
  8090  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8091  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8092  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8093  			v1.AddArg(x)
  8094  			v0.AddArg2(v1, x)
  8095  			v.AddArg(v0)
  8096  			return true
  8097  		}
  8098  		break
  8099  	}
  8100  	// match: (MNEG x (MOVDconst [c]))
  8101  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8102  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  8103  	for {
  8104  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8105  			x := v_0
  8106  			if v_1.Op != OpARM64MOVDconst {
  8107  				continue
  8108  			}
  8109  			c := auxIntToInt64(v_1.AuxInt)
  8110  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8111  				continue
  8112  			}
  8113  			v.reset(OpARM64SLLconst)
  8114  			v.Type = x.Type
  8115  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  8116  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8117  			v0.AuxInt = int64ToAuxInt(2)
  8118  			v0.AddArg2(x, x)
  8119  			v.AddArg(v0)
  8120  			return true
  8121  		}
  8122  		break
  8123  	}
  8124  	// match: (MNEG x (MOVDconst [c]))
  8125  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8126  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  8127  	for {
  8128  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8129  			x := v_0
  8130  			if v_1.Op != OpARM64MOVDconst {
  8131  				continue
  8132  			}
  8133  			c := auxIntToInt64(v_1.AuxInt)
  8134  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8135  				continue
  8136  			}
  8137  			v.reset(OpARM64NEG)
  8138  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8139  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  8140  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8141  			v1.AuxInt = int64ToAuxInt(2)
  8142  			v1.AddArg2(x, x)
  8143  			v0.AddArg(v1)
  8144  			v.AddArg(v0)
  8145  			return true
  8146  		}
  8147  		break
  8148  	}
  8149  	// match: (MNEG x (MOVDconst [c]))
  8150  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8151  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  8152  	for {
  8153  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8154  			x := v_0
  8155  			if v_1.Op != OpARM64MOVDconst {
  8156  				continue
  8157  			}
  8158  			c := auxIntToInt64(v_1.AuxInt)
  8159  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8160  				continue
  8161  			}
  8162  			v.reset(OpARM64SLLconst)
  8163  			v.Type = x.Type
  8164  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  8165  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8166  			v0.AuxInt = int64ToAuxInt(3)
  8167  			v0.AddArg2(x, x)
  8168  			v.AddArg(v0)
  8169  			return true
  8170  		}
  8171  		break
  8172  	}
  8173  	// match: (MNEG x (MOVDconst [c]))
  8174  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8175  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  8176  	for {
  8177  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8178  			x := v_0
  8179  			if v_1.Op != OpARM64MOVDconst {
  8180  				continue
  8181  			}
  8182  			c := auxIntToInt64(v_1.AuxInt)
  8183  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8184  				continue
  8185  			}
  8186  			v.reset(OpARM64NEG)
  8187  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8188  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  8189  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8190  			v1.AuxInt = int64ToAuxInt(3)
  8191  			v1.AddArg2(x, x)
  8192  			v0.AddArg(v1)
  8193  			v.AddArg(v0)
  8194  			return true
  8195  		}
  8196  		break
  8197  	}
  8198  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  8199  	// result: (MOVDconst [-c*d])
  8200  	for {
  8201  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8202  			if v_0.Op != OpARM64MOVDconst {
  8203  				continue
  8204  			}
  8205  			c := auxIntToInt64(v_0.AuxInt)
  8206  			if v_1.Op != OpARM64MOVDconst {
  8207  				continue
  8208  			}
  8209  			d := auxIntToInt64(v_1.AuxInt)
  8210  			v.reset(OpARM64MOVDconst)
  8211  			v.AuxInt = int64ToAuxInt(-c * d)
  8212  			return true
  8213  		}
  8214  		break
  8215  	}
  8216  	return false
  8217  }
  8218  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  8219  	v_1 := v.Args[1]
  8220  	v_0 := v.Args[0]
  8221  	b := v.Block
  8222  	// match: (MNEGW x (MOVDconst [c]))
  8223  	// cond: int32(c)==-1
  8224  	// result: (MOVWUreg x)
  8225  	for {
  8226  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8227  			x := v_0
  8228  			if v_1.Op != OpARM64MOVDconst {
  8229  				continue
  8230  			}
  8231  			c := auxIntToInt64(v_1.AuxInt)
  8232  			if !(int32(c) == -1) {
  8233  				continue
  8234  			}
  8235  			v.reset(OpARM64MOVWUreg)
  8236  			v.AddArg(x)
  8237  			return true
  8238  		}
  8239  		break
  8240  	}
  8241  	// match: (MNEGW _ (MOVDconst [c]))
  8242  	// cond: int32(c)==0
  8243  	// result: (MOVDconst [0])
  8244  	for {
  8245  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8246  			if v_1.Op != OpARM64MOVDconst {
  8247  				continue
  8248  			}
  8249  			c := auxIntToInt64(v_1.AuxInt)
  8250  			if !(int32(c) == 0) {
  8251  				continue
  8252  			}
  8253  			v.reset(OpARM64MOVDconst)
  8254  			v.AuxInt = int64ToAuxInt(0)
  8255  			return true
  8256  		}
  8257  		break
  8258  	}
  8259  	// match: (MNEGW x (MOVDconst [c]))
  8260  	// cond: int32(c)==1
  8261  	// result: (MOVWUreg (NEG <x.Type> x))
  8262  	for {
  8263  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8264  			x := v_0
  8265  			if v_1.Op != OpARM64MOVDconst {
  8266  				continue
  8267  			}
  8268  			c := auxIntToInt64(v_1.AuxInt)
  8269  			if !(int32(c) == 1) {
  8270  				continue
  8271  			}
  8272  			v.reset(OpARM64MOVWUreg)
  8273  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8274  			v0.AddArg(x)
  8275  			v.AddArg(v0)
  8276  			return true
  8277  		}
  8278  		break
  8279  	}
  8280  	// match: (MNEGW x (MOVDconst [c]))
  8281  	// cond: isPowerOfTwo(c)
  8282  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  8283  	for {
  8284  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8285  			x := v_0
  8286  			if v_1.Op != OpARM64MOVDconst {
  8287  				continue
  8288  			}
  8289  			c := auxIntToInt64(v_1.AuxInt)
  8290  			if !(isPowerOfTwo(c)) {
  8291  				continue
  8292  			}
  8293  			v.reset(OpARM64NEG)
  8294  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8295  			v0.AuxInt = int64ToAuxInt(log64(c))
  8296  			v0.AddArg(x)
  8297  			v.AddArg(v0)
  8298  			return true
  8299  		}
  8300  		break
  8301  	}
  8302  	// match: (MNEGW x (MOVDconst [c]))
  8303  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  8304  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  8305  	for {
  8306  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8307  			x := v_0
  8308  			if v_1.Op != OpARM64MOVDconst {
  8309  				continue
  8310  			}
  8311  			c := auxIntToInt64(v_1.AuxInt)
  8312  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  8313  				continue
  8314  			}
  8315  			v.reset(OpARM64MOVWUreg)
  8316  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8317  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8318  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  8319  			v1.AddArg2(x, x)
  8320  			v0.AddArg(v1)
  8321  			v.AddArg(v0)
  8322  			return true
  8323  		}
  8324  		break
  8325  	}
  8326  	// match: (MNEGW x (MOVDconst [c]))
  8327  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  8328  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  8329  	for {
  8330  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8331  			x := v_0
  8332  			if v_1.Op != OpARM64MOVDconst {
  8333  				continue
  8334  			}
  8335  			c := auxIntToInt64(v_1.AuxInt)
  8336  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  8337  				continue
  8338  			}
  8339  			v.reset(OpARM64MOVWUreg)
  8340  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8341  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8342  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  8343  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8344  			v2.AddArg(x)
  8345  			v1.AddArg2(v2, x)
  8346  			v0.AddArg(v1)
  8347  			v.AddArg(v0)
  8348  			return true
  8349  		}
  8350  		break
  8351  	}
  8352  	// match: (MNEGW x (MOVDconst [c]))
  8353  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  8354  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  8355  	for {
  8356  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8357  			x := v_0
  8358  			if v_1.Op != OpARM64MOVDconst {
  8359  				continue
  8360  			}
  8361  			c := auxIntToInt64(v_1.AuxInt)
  8362  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  8363  				continue
  8364  			}
  8365  			v.reset(OpARM64MOVWUreg)
  8366  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8367  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  8368  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8369  			v1.AuxInt = int64ToAuxInt(2)
  8370  			v1.AddArg2(x, x)
  8371  			v0.AddArg(v1)
  8372  			v.AddArg(v0)
  8373  			return true
  8374  		}
  8375  		break
  8376  	}
  8377  	// match: (MNEGW x (MOVDconst [c]))
  8378  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  8379  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  8380  	for {
  8381  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8382  			x := v_0
  8383  			if v_1.Op != OpARM64MOVDconst {
  8384  				continue
  8385  			}
  8386  			c := auxIntToInt64(v_1.AuxInt)
  8387  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  8388  				continue
  8389  			}
  8390  			v.reset(OpARM64MOVWUreg)
  8391  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8392  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8393  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  8394  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8395  			v2.AuxInt = int64ToAuxInt(2)
  8396  			v2.AddArg2(x, x)
  8397  			v1.AddArg(v2)
  8398  			v0.AddArg(v1)
  8399  			v.AddArg(v0)
  8400  			return true
  8401  		}
  8402  		break
  8403  	}
  8404  	// match: (MNEGW x (MOVDconst [c]))
  8405  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  8406  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  8407  	for {
  8408  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8409  			x := v_0
  8410  			if v_1.Op != OpARM64MOVDconst {
  8411  				continue
  8412  			}
  8413  			c := auxIntToInt64(v_1.AuxInt)
  8414  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  8415  				continue
  8416  			}
  8417  			v.reset(OpARM64MOVWUreg)
  8418  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8419  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  8420  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8421  			v1.AuxInt = int64ToAuxInt(3)
  8422  			v1.AddArg2(x, x)
  8423  			v0.AddArg(v1)
  8424  			v.AddArg(v0)
  8425  			return true
  8426  		}
  8427  		break
  8428  	}
  8429  	// match: (MNEGW x (MOVDconst [c]))
  8430  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  8431  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  8432  	for {
  8433  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8434  			x := v_0
  8435  			if v_1.Op != OpARM64MOVDconst {
  8436  				continue
  8437  			}
  8438  			c := auxIntToInt64(v_1.AuxInt)
  8439  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  8440  				continue
  8441  			}
  8442  			v.reset(OpARM64MOVWUreg)
  8443  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8444  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8445  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
  8446  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8447  			v2.AuxInt = int64ToAuxInt(3)
  8448  			v2.AddArg2(x, x)
  8449  			v1.AddArg(v2)
  8450  			v0.AddArg(v1)
  8451  			v.AddArg(v0)
  8452  			return true
  8453  		}
  8454  		break
  8455  	}
  8456  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
  8457  	// result: (MOVDconst [int64(uint32(-c*d))])
  8458  	for {
  8459  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8460  			if v_0.Op != OpARM64MOVDconst {
  8461  				continue
  8462  			}
  8463  			c := auxIntToInt64(v_0.AuxInt)
  8464  			if v_1.Op != OpARM64MOVDconst {
  8465  				continue
  8466  			}
  8467  			d := auxIntToInt64(v_1.AuxInt)
  8468  			v.reset(OpARM64MOVDconst)
  8469  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
  8470  			return true
  8471  		}
  8472  		break
  8473  	}
  8474  	return false
  8475  }
  8476  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
  8477  	v_1 := v.Args[1]
  8478  	v_0 := v.Args[0]
  8479  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
  8480  	// cond: d != 0
  8481  	// result: (MOVDconst [c%d])
  8482  	for {
  8483  		if v_0.Op != OpARM64MOVDconst {
  8484  			break
  8485  		}
  8486  		c := auxIntToInt64(v_0.AuxInt)
  8487  		if v_1.Op != OpARM64MOVDconst {
  8488  			break
  8489  		}
  8490  		d := auxIntToInt64(v_1.AuxInt)
  8491  		if !(d != 0) {
  8492  			break
  8493  		}
  8494  		v.reset(OpARM64MOVDconst)
  8495  		v.AuxInt = int64ToAuxInt(c % d)
  8496  		return true
  8497  	}
  8498  	return false
  8499  }
  8500  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
  8501  	v_1 := v.Args[1]
  8502  	v_0 := v.Args[0]
  8503  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
  8504  	// cond: d != 0
  8505  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
  8506  	for {
  8507  		if v_0.Op != OpARM64MOVDconst {
  8508  			break
  8509  		}
  8510  		c := auxIntToInt64(v_0.AuxInt)
  8511  		if v_1.Op != OpARM64MOVDconst {
  8512  			break
  8513  		}
  8514  		d := auxIntToInt64(v_1.AuxInt)
  8515  		if !(d != 0) {
  8516  			break
  8517  		}
  8518  		v.reset(OpARM64MOVDconst)
  8519  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
  8520  		return true
  8521  	}
  8522  	return false
  8523  }
  8524  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
  8525  	v_1 := v.Args[1]
  8526  	v_0 := v.Args[0]
  8527  	b := v.Block
  8528  	config := b.Func.Config
  8529  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  8530  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8531  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  8532  	for {
  8533  		off1 := auxIntToInt32(v.AuxInt)
  8534  		sym := auxToSym(v.Aux)
  8535  		if v_0.Op != OpARM64ADDconst {
  8536  			break
  8537  		}
  8538  		off2 := auxIntToInt64(v_0.AuxInt)
  8539  		ptr := v_0.Args[0]
  8540  		mem := v_1
  8541  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8542  			break
  8543  		}
  8544  		v.reset(OpARM64MOVBUload)
  8545  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8546  		v.Aux = symToAux(sym)
  8547  		v.AddArg2(ptr, mem)
  8548  		return true
  8549  	}
  8550  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
  8551  	// cond: off == 0 && sym == nil
  8552  	// result: (MOVBUloadidx ptr idx mem)
  8553  	for {
  8554  		off := auxIntToInt32(v.AuxInt)
  8555  		sym := auxToSym(v.Aux)
  8556  		if v_0.Op != OpARM64ADD {
  8557  			break
  8558  		}
  8559  		idx := v_0.Args[1]
  8560  		ptr := v_0.Args[0]
  8561  		mem := v_1
  8562  		if !(off == 0 && sym == nil) {
  8563  			break
  8564  		}
  8565  		v.reset(OpARM64MOVBUloadidx)
  8566  		v.AddArg3(ptr, idx, mem)
  8567  		return true
  8568  	}
  8569  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8570  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8571  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8572  	for {
  8573  		off1 := auxIntToInt32(v.AuxInt)
  8574  		sym1 := auxToSym(v.Aux)
  8575  		if v_0.Op != OpARM64MOVDaddr {
  8576  			break
  8577  		}
  8578  		off2 := auxIntToInt32(v_0.AuxInt)
  8579  		sym2 := auxToSym(v_0.Aux)
  8580  		ptr := v_0.Args[0]
  8581  		mem := v_1
  8582  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8583  			break
  8584  		}
  8585  		v.reset(OpARM64MOVBUload)
  8586  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8587  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8588  		v.AddArg2(ptr, mem)
  8589  		return true
  8590  	}
  8591  	// match: (MOVBUload [off] {sym} (SB) _)
  8592  	// cond: symIsRO(sym)
  8593  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
  8594  	for {
  8595  		off := auxIntToInt32(v.AuxInt)
  8596  		sym := auxToSym(v.Aux)
  8597  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8598  			break
  8599  		}
  8600  		v.reset(OpARM64MOVDconst)
  8601  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
  8602  		return true
  8603  	}
  8604  	return false
  8605  }
  8606  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
  8607  	v_2 := v.Args[2]
  8608  	v_1 := v.Args[1]
  8609  	v_0 := v.Args[0]
  8610  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
  8611  	// cond: is32Bit(c)
  8612  	// result: (MOVBUload [int32(c)] ptr mem)
  8613  	for {
  8614  		ptr := v_0
  8615  		if v_1.Op != OpARM64MOVDconst {
  8616  			break
  8617  		}
  8618  		c := auxIntToInt64(v_1.AuxInt)
  8619  		mem := v_2
  8620  		if !(is32Bit(c)) {
  8621  			break
  8622  		}
  8623  		v.reset(OpARM64MOVBUload)
  8624  		v.AuxInt = int32ToAuxInt(int32(c))
  8625  		v.AddArg2(ptr, mem)
  8626  		return true
  8627  	}
  8628  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
  8629  	// cond: is32Bit(c)
  8630  	// result: (MOVBUload [int32(c)] ptr mem)
  8631  	for {
  8632  		if v_0.Op != OpARM64MOVDconst {
  8633  			break
  8634  		}
  8635  		c := auxIntToInt64(v_0.AuxInt)
  8636  		ptr := v_1
  8637  		mem := v_2
  8638  		if !(is32Bit(c)) {
  8639  			break
  8640  		}
  8641  		v.reset(OpARM64MOVBUload)
  8642  		v.AuxInt = int32ToAuxInt(int32(c))
  8643  		v.AddArg2(ptr, mem)
  8644  		return true
  8645  	}
  8646  	return false
  8647  }
  8648  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
  8649  	v_0 := v.Args[0]
  8650  	// match: (MOVBUreg (ANDconst [c] x))
  8651  	// result: (ANDconst [c&(1<<8-1)] x)
  8652  	for {
  8653  		if v_0.Op != OpARM64ANDconst {
  8654  			break
  8655  		}
  8656  		c := auxIntToInt64(v_0.AuxInt)
  8657  		x := v_0.Args[0]
  8658  		v.reset(OpARM64ANDconst)
  8659  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  8660  		v.AddArg(x)
  8661  		return true
  8662  	}
  8663  	// match: (MOVBUreg (MOVDconst [c]))
  8664  	// result: (MOVDconst [int64(uint8(c))])
  8665  	for {
  8666  		if v_0.Op != OpARM64MOVDconst {
  8667  			break
  8668  		}
  8669  		c := auxIntToInt64(v_0.AuxInt)
  8670  		v.reset(OpARM64MOVDconst)
  8671  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8672  		return true
  8673  	}
  8674  	// match: (MOVBUreg x)
  8675  	// cond: v.Type.Size() <= 1
  8676  	// result: x
  8677  	for {
  8678  		x := v_0
  8679  		if !(v.Type.Size() <= 1) {
  8680  			break
  8681  		}
  8682  		v.copyOf(x)
  8683  		return true
  8684  	}
  8685  	// match: (MOVBUreg (SLLconst [lc] x))
  8686  	// cond: lc >= 8
  8687  	// result: (MOVDconst [0])
  8688  	for {
  8689  		if v_0.Op != OpARM64SLLconst {
  8690  			break
  8691  		}
  8692  		lc := auxIntToInt64(v_0.AuxInt)
  8693  		if !(lc >= 8) {
  8694  			break
  8695  		}
  8696  		v.reset(OpARM64MOVDconst)
  8697  		v.AuxInt = int64ToAuxInt(0)
  8698  		return true
  8699  	}
  8700  	// match: (MOVBUreg (SLLconst [lc] x))
  8701  	// cond: lc < 8
  8702  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8703  	for {
  8704  		if v_0.Op != OpARM64SLLconst {
  8705  			break
  8706  		}
  8707  		lc := auxIntToInt64(v_0.AuxInt)
  8708  		x := v_0.Args[0]
  8709  		if !(lc < 8) {
  8710  			break
  8711  		}
  8712  		v.reset(OpARM64UBFIZ)
  8713  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8714  		v.AddArg(x)
  8715  		return true
  8716  	}
  8717  	// match: (MOVBUreg (SRLconst [rc] x))
  8718  	// cond: rc < 8
  8719  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
  8720  	for {
  8721  		if v_0.Op != OpARM64SRLconst {
  8722  			break
  8723  		}
  8724  		rc := auxIntToInt64(v_0.AuxInt)
  8725  		x := v_0.Args[0]
  8726  		if !(rc < 8) {
  8727  			break
  8728  		}
  8729  		v.reset(OpARM64UBFX)
  8730  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
  8731  		v.AddArg(x)
  8732  		return true
  8733  	}
  8734  	// match: (MOVBUreg (UBFX [bfc] x))
  8735  	// cond: bfc.width() <= 8
  8736  	// result: (UBFX [bfc] x)
  8737  	for {
  8738  		if v_0.Op != OpARM64UBFX {
  8739  			break
  8740  		}
  8741  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8742  		x := v_0.Args[0]
  8743  		if !(bfc.width() <= 8) {
  8744  			break
  8745  		}
  8746  		v.reset(OpARM64UBFX)
  8747  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8748  		v.AddArg(x)
  8749  		return true
  8750  	}
  8751  	return false
  8752  }
  8753  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
  8754  	v_1 := v.Args[1]
  8755  	v_0 := v.Args[0]
  8756  	b := v.Block
  8757  	config := b.Func.Config
  8758  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8759  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8760  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  8761  	for {
  8762  		off1 := auxIntToInt32(v.AuxInt)
  8763  		sym := auxToSym(v.Aux)
  8764  		if v_0.Op != OpARM64ADDconst {
  8765  			break
  8766  		}
  8767  		off2 := auxIntToInt64(v_0.AuxInt)
  8768  		ptr := v_0.Args[0]
  8769  		mem := v_1
  8770  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8771  			break
  8772  		}
  8773  		v.reset(OpARM64MOVBload)
  8774  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8775  		v.Aux = symToAux(sym)
  8776  		v.AddArg2(ptr, mem)
  8777  		return true
  8778  	}
  8779  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
  8780  	// cond: off == 0 && sym == nil
  8781  	// result: (MOVBloadidx ptr idx mem)
  8782  	for {
  8783  		off := auxIntToInt32(v.AuxInt)
  8784  		sym := auxToSym(v.Aux)
  8785  		if v_0.Op != OpARM64ADD {
  8786  			break
  8787  		}
  8788  		idx := v_0.Args[1]
  8789  		ptr := v_0.Args[0]
  8790  		mem := v_1
  8791  		if !(off == 0 && sym == nil) {
  8792  			break
  8793  		}
  8794  		v.reset(OpARM64MOVBloadidx)
  8795  		v.AddArg3(ptr, idx, mem)
  8796  		return true
  8797  	}
  8798  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8799  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8800  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8801  	for {
  8802  		off1 := auxIntToInt32(v.AuxInt)
  8803  		sym1 := auxToSym(v.Aux)
  8804  		if v_0.Op != OpARM64MOVDaddr {
  8805  			break
  8806  		}
  8807  		off2 := auxIntToInt32(v_0.AuxInt)
  8808  		sym2 := auxToSym(v_0.Aux)
  8809  		ptr := v_0.Args[0]
  8810  		mem := v_1
  8811  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8812  			break
  8813  		}
  8814  		v.reset(OpARM64MOVBload)
  8815  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8816  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8817  		v.AddArg2(ptr, mem)
  8818  		return true
  8819  	}
  8820  	// match: (MOVBload [off] {sym} (SB) _)
  8821  	// cond: symIsRO(sym)
  8822  	// result: (MOVDconst [int64(int8(read8(sym, int64(off))))])
  8823  	for {
  8824  		off := auxIntToInt32(v.AuxInt)
  8825  		sym := auxToSym(v.Aux)
  8826  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8827  			break
  8828  		}
  8829  		v.reset(OpARM64MOVDconst)
  8830  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
  8831  		return true
  8832  	}
  8833  	return false
  8834  }
  8835  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
  8836  	v_2 := v.Args[2]
  8837  	v_1 := v.Args[1]
  8838  	v_0 := v.Args[0]
  8839  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
  8840  	// cond: is32Bit(c)
  8841  	// result: (MOVBload [int32(c)] ptr mem)
  8842  	for {
  8843  		ptr := v_0
  8844  		if v_1.Op != OpARM64MOVDconst {
  8845  			break
  8846  		}
  8847  		c := auxIntToInt64(v_1.AuxInt)
  8848  		mem := v_2
  8849  		if !(is32Bit(c)) {
  8850  			break
  8851  		}
  8852  		v.reset(OpARM64MOVBload)
  8853  		v.AuxInt = int32ToAuxInt(int32(c))
  8854  		v.AddArg2(ptr, mem)
  8855  		return true
  8856  	}
  8857  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
  8858  	// cond: is32Bit(c)
  8859  	// result: (MOVBload [int32(c)] ptr mem)
  8860  	for {
  8861  		if v_0.Op != OpARM64MOVDconst {
  8862  			break
  8863  		}
  8864  		c := auxIntToInt64(v_0.AuxInt)
  8865  		ptr := v_1
  8866  		mem := v_2
  8867  		if !(is32Bit(c)) {
  8868  			break
  8869  		}
  8870  		v.reset(OpARM64MOVBload)
  8871  		v.AuxInt = int32ToAuxInt(int32(c))
  8872  		v.AddArg2(ptr, mem)
  8873  		return true
  8874  	}
  8875  	return false
  8876  }
  8877  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
  8878  	v_0 := v.Args[0]
  8879  	// match: (MOVBreg (MOVDconst [c]))
  8880  	// result: (MOVDconst [int64(int8(c))])
  8881  	for {
  8882  		if v_0.Op != OpARM64MOVDconst {
  8883  			break
  8884  		}
  8885  		c := auxIntToInt64(v_0.AuxInt)
  8886  		v.reset(OpARM64MOVDconst)
  8887  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8888  		return true
  8889  	}
  8890  	// match: (MOVBreg x)
  8891  	// cond: v.Type.Size() <= 1
  8892  	// result: x
  8893  	for {
  8894  		x := v_0
  8895  		if !(v.Type.Size() <= 1) {
  8896  			break
  8897  		}
  8898  		v.copyOf(x)
  8899  		return true
  8900  	}
  8901  	// match: (MOVBreg <t> (ANDconst x [c]))
  8902  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
  8903  	// result: (ANDconst <t> x [c])
  8904  	for {
  8905  		t := v.Type
  8906  		if v_0.Op != OpARM64ANDconst {
  8907  			break
  8908  		}
  8909  		c := auxIntToInt64(v_0.AuxInt)
  8910  		x := v_0.Args[0]
  8911  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
  8912  			break
  8913  		}
  8914  		v.reset(OpARM64ANDconst)
  8915  		v.Type = t
  8916  		v.AuxInt = int64ToAuxInt(c)
  8917  		v.AddArg(x)
  8918  		return true
  8919  	}
  8920  	// match: (MOVBreg (SLLconst [lc] x))
  8921  	// cond: lc < 8
  8922  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8923  	for {
  8924  		if v_0.Op != OpARM64SLLconst {
  8925  			break
  8926  		}
  8927  		lc := auxIntToInt64(v_0.AuxInt)
  8928  		x := v_0.Args[0]
  8929  		if !(lc < 8) {
  8930  			break
  8931  		}
  8932  		v.reset(OpARM64SBFIZ)
  8933  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8934  		v.AddArg(x)
  8935  		return true
  8936  	}
  8937  	// match: (MOVBreg (SBFX [bfc] x))
  8938  	// cond: bfc.width() <= 8
  8939  	// result: (SBFX [bfc] x)
  8940  	for {
  8941  		if v_0.Op != OpARM64SBFX {
  8942  			break
  8943  		}
  8944  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8945  		x := v_0.Args[0]
  8946  		if !(bfc.width() <= 8) {
  8947  			break
  8948  		}
  8949  		v.reset(OpARM64SBFX)
  8950  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8951  		v.AddArg(x)
  8952  		return true
  8953  	}
  8954  	return false
  8955  }
  8956  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
  8957  	v_2 := v.Args[2]
  8958  	v_1 := v.Args[1]
  8959  	v_0 := v.Args[0]
  8960  	b := v.Block
  8961  	config := b.Func.Config
  8962  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8963  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8964  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  8965  	for {
  8966  		off1 := auxIntToInt32(v.AuxInt)
  8967  		sym := auxToSym(v.Aux)
  8968  		if v_0.Op != OpARM64ADDconst {
  8969  			break
  8970  		}
  8971  		off2 := auxIntToInt64(v_0.AuxInt)
  8972  		ptr := v_0.Args[0]
  8973  		val := v_1
  8974  		mem := v_2
  8975  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8976  			break
  8977  		}
  8978  		v.reset(OpARM64MOVBstore)
  8979  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8980  		v.Aux = symToAux(sym)
  8981  		v.AddArg3(ptr, val, mem)
  8982  		return true
  8983  	}
  8984  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
  8985  	// cond: off == 0 && sym == nil
  8986  	// result: (MOVBstoreidx ptr idx val mem)
  8987  	for {
  8988  		off := auxIntToInt32(v.AuxInt)
  8989  		sym := auxToSym(v.Aux)
  8990  		if v_0.Op != OpARM64ADD {
  8991  			break
  8992  		}
  8993  		idx := v_0.Args[1]
  8994  		ptr := v_0.Args[0]
  8995  		val := v_1
  8996  		mem := v_2
  8997  		if !(off == 0 && sym == nil) {
  8998  			break
  8999  		}
  9000  		v.reset(OpARM64MOVBstoreidx)
  9001  		v.AddArg4(ptr, idx, val, mem)
  9002  		return true
  9003  	}
  9004  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  9005  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9006  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9007  	for {
  9008  		off1 := auxIntToInt32(v.AuxInt)
  9009  		sym1 := auxToSym(v.Aux)
  9010  		if v_0.Op != OpARM64MOVDaddr {
  9011  			break
  9012  		}
  9013  		off2 := auxIntToInt32(v_0.AuxInt)
  9014  		sym2 := auxToSym(v_0.Aux)
  9015  		ptr := v_0.Args[0]
  9016  		val := v_1
  9017  		mem := v_2
  9018  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9019  			break
  9020  		}
  9021  		v.reset(OpARM64MOVBstore)
  9022  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9023  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9024  		v.AddArg3(ptr, val, mem)
  9025  		return true
  9026  	}
  9027  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  9028  	// result: (MOVBstore [off] {sym} ptr x mem)
  9029  	for {
  9030  		off := auxIntToInt32(v.AuxInt)
  9031  		sym := auxToSym(v.Aux)
  9032  		ptr := v_0
  9033  		if v_1.Op != OpARM64MOVBreg {
  9034  			break
  9035  		}
  9036  		x := v_1.Args[0]
  9037  		mem := v_2
  9038  		v.reset(OpARM64MOVBstore)
  9039  		v.AuxInt = int32ToAuxInt(off)
  9040  		v.Aux = symToAux(sym)
  9041  		v.AddArg3(ptr, x, mem)
  9042  		return true
  9043  	}
  9044  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  9045  	// result: (MOVBstore [off] {sym} ptr x mem)
  9046  	for {
  9047  		off := auxIntToInt32(v.AuxInt)
  9048  		sym := auxToSym(v.Aux)
  9049  		ptr := v_0
  9050  		if v_1.Op != OpARM64MOVBUreg {
  9051  			break
  9052  		}
  9053  		x := v_1.Args[0]
  9054  		mem := v_2
  9055  		v.reset(OpARM64MOVBstore)
  9056  		v.AuxInt = int32ToAuxInt(off)
  9057  		v.Aux = symToAux(sym)
  9058  		v.AddArg3(ptr, x, mem)
  9059  		return true
  9060  	}
  9061  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  9062  	// result: (MOVBstore [off] {sym} ptr x mem)
  9063  	for {
  9064  		off := auxIntToInt32(v.AuxInt)
  9065  		sym := auxToSym(v.Aux)
  9066  		ptr := v_0
  9067  		if v_1.Op != OpARM64MOVHreg {
  9068  			break
  9069  		}
  9070  		x := v_1.Args[0]
  9071  		mem := v_2
  9072  		v.reset(OpARM64MOVBstore)
  9073  		v.AuxInt = int32ToAuxInt(off)
  9074  		v.Aux = symToAux(sym)
  9075  		v.AddArg3(ptr, x, mem)
  9076  		return true
  9077  	}
  9078  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  9079  	// result: (MOVBstore [off] {sym} ptr x mem)
  9080  	for {
  9081  		off := auxIntToInt32(v.AuxInt)
  9082  		sym := auxToSym(v.Aux)
  9083  		ptr := v_0
  9084  		if v_1.Op != OpARM64MOVHUreg {
  9085  			break
  9086  		}
  9087  		x := v_1.Args[0]
  9088  		mem := v_2
  9089  		v.reset(OpARM64MOVBstore)
  9090  		v.AuxInt = int32ToAuxInt(off)
  9091  		v.Aux = symToAux(sym)
  9092  		v.AddArg3(ptr, x, mem)
  9093  		return true
  9094  	}
  9095  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  9096  	// result: (MOVBstore [off] {sym} ptr x mem)
  9097  	for {
  9098  		off := auxIntToInt32(v.AuxInt)
  9099  		sym := auxToSym(v.Aux)
  9100  		ptr := v_0
  9101  		if v_1.Op != OpARM64MOVWreg {
  9102  			break
  9103  		}
  9104  		x := v_1.Args[0]
  9105  		mem := v_2
  9106  		v.reset(OpARM64MOVBstore)
  9107  		v.AuxInt = int32ToAuxInt(off)
  9108  		v.Aux = symToAux(sym)
  9109  		v.AddArg3(ptr, x, mem)
  9110  		return true
  9111  	}
  9112  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  9113  	// result: (MOVBstore [off] {sym} ptr x mem)
  9114  	for {
  9115  		off := auxIntToInt32(v.AuxInt)
  9116  		sym := auxToSym(v.Aux)
  9117  		ptr := v_0
  9118  		if v_1.Op != OpARM64MOVWUreg {
  9119  			break
  9120  		}
  9121  		x := v_1.Args[0]
  9122  		mem := v_2
  9123  		v.reset(OpARM64MOVBstore)
  9124  		v.AuxInt = int32ToAuxInt(off)
  9125  		v.Aux = symToAux(sym)
  9126  		v.AddArg3(ptr, x, mem)
  9127  		return true
  9128  	}
  9129  	return false
  9130  }
  9131  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
  9132  	v_3 := v.Args[3]
  9133  	v_2 := v.Args[2]
  9134  	v_1 := v.Args[1]
  9135  	v_0 := v.Args[0]
  9136  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  9137  	// cond: is32Bit(c)
  9138  	// result: (MOVBstore [int32(c)] ptr val mem)
  9139  	for {
  9140  		ptr := v_0
  9141  		if v_1.Op != OpARM64MOVDconst {
  9142  			break
  9143  		}
  9144  		c := auxIntToInt64(v_1.AuxInt)
  9145  		val := v_2
  9146  		mem := v_3
  9147  		if !(is32Bit(c)) {
  9148  			break
  9149  		}
  9150  		v.reset(OpARM64MOVBstore)
  9151  		v.AuxInt = int32ToAuxInt(int32(c))
  9152  		v.AddArg3(ptr, val, mem)
  9153  		return true
  9154  	}
  9155  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
  9156  	// cond: is32Bit(c)
  9157  	// result: (MOVBstore [int32(c)] idx val mem)
  9158  	for {
  9159  		if v_0.Op != OpARM64MOVDconst {
  9160  			break
  9161  		}
  9162  		c := auxIntToInt64(v_0.AuxInt)
  9163  		idx := v_1
  9164  		val := v_2
  9165  		mem := v_3
  9166  		if !(is32Bit(c)) {
  9167  			break
  9168  		}
  9169  		v.reset(OpARM64MOVBstore)
  9170  		v.AuxInt = int32ToAuxInt(int32(c))
  9171  		v.AddArg3(idx, val, mem)
  9172  		return true
  9173  	}
  9174  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
  9175  	// result: (MOVBstoreidx ptr idx x mem)
  9176  	for {
  9177  		ptr := v_0
  9178  		idx := v_1
  9179  		if v_2.Op != OpARM64MOVBreg {
  9180  			break
  9181  		}
  9182  		x := v_2.Args[0]
  9183  		mem := v_3
  9184  		v.reset(OpARM64MOVBstoreidx)
  9185  		v.AddArg4(ptr, idx, x, mem)
  9186  		return true
  9187  	}
  9188  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
  9189  	// result: (MOVBstoreidx ptr idx x mem)
  9190  	for {
  9191  		ptr := v_0
  9192  		idx := v_1
  9193  		if v_2.Op != OpARM64MOVBUreg {
  9194  			break
  9195  		}
  9196  		x := v_2.Args[0]
  9197  		mem := v_3
  9198  		v.reset(OpARM64MOVBstoreidx)
  9199  		v.AddArg4(ptr, idx, x, mem)
  9200  		return true
  9201  	}
  9202  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
  9203  	// result: (MOVBstoreidx ptr idx x mem)
  9204  	for {
  9205  		ptr := v_0
  9206  		idx := v_1
  9207  		if v_2.Op != OpARM64MOVHreg {
  9208  			break
  9209  		}
  9210  		x := v_2.Args[0]
  9211  		mem := v_3
  9212  		v.reset(OpARM64MOVBstoreidx)
  9213  		v.AddArg4(ptr, idx, x, mem)
  9214  		return true
  9215  	}
  9216  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
  9217  	// result: (MOVBstoreidx ptr idx x mem)
  9218  	for {
  9219  		ptr := v_0
  9220  		idx := v_1
  9221  		if v_2.Op != OpARM64MOVHUreg {
  9222  			break
  9223  		}
  9224  		x := v_2.Args[0]
  9225  		mem := v_3
  9226  		v.reset(OpARM64MOVBstoreidx)
  9227  		v.AddArg4(ptr, idx, x, mem)
  9228  		return true
  9229  	}
  9230  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
  9231  	// result: (MOVBstoreidx ptr idx x mem)
  9232  	for {
  9233  		ptr := v_0
  9234  		idx := v_1
  9235  		if v_2.Op != OpARM64MOVWreg {
  9236  			break
  9237  		}
  9238  		x := v_2.Args[0]
  9239  		mem := v_3
  9240  		v.reset(OpARM64MOVBstoreidx)
  9241  		v.AddArg4(ptr, idx, x, mem)
  9242  		return true
  9243  	}
  9244  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
  9245  	// result: (MOVBstoreidx ptr idx x mem)
  9246  	for {
  9247  		ptr := v_0
  9248  		idx := v_1
  9249  		if v_2.Op != OpARM64MOVWUreg {
  9250  			break
  9251  		}
  9252  		x := v_2.Args[0]
  9253  		mem := v_3
  9254  		v.reset(OpARM64MOVBstoreidx)
  9255  		v.AddArg4(ptr, idx, x, mem)
  9256  		return true
  9257  	}
  9258  	return false
  9259  }
  9260  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
  9261  	v_1 := v.Args[1]
  9262  	v_0 := v.Args[0]
  9263  	b := v.Block
  9264  	config := b.Func.Config
  9265  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
  9266  	// result: (FMOVDfpgp val)
  9267  	for {
  9268  		off := auxIntToInt32(v.AuxInt)
  9269  		sym := auxToSym(v.Aux)
  9270  		ptr := v_0
  9271  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9272  			break
  9273  		}
  9274  		val := v_1.Args[1]
  9275  		if ptr != v_1.Args[0] {
  9276  			break
  9277  		}
  9278  		v.reset(OpARM64FMOVDfpgp)
  9279  		v.AddArg(val)
  9280  		return true
  9281  	}
  9282  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9283  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9284  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  9285  	for {
  9286  		off1 := auxIntToInt32(v.AuxInt)
  9287  		sym := auxToSym(v.Aux)
  9288  		if v_0.Op != OpARM64ADDconst {
  9289  			break
  9290  		}
  9291  		off2 := auxIntToInt64(v_0.AuxInt)
  9292  		ptr := v_0.Args[0]
  9293  		mem := v_1
  9294  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9295  			break
  9296  		}
  9297  		v.reset(OpARM64MOVDload)
  9298  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9299  		v.Aux = symToAux(sym)
  9300  		v.AddArg2(ptr, mem)
  9301  		return true
  9302  	}
  9303  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
  9304  	// cond: off == 0 && sym == nil
  9305  	// result: (MOVDloadidx ptr idx mem)
  9306  	for {
  9307  		off := auxIntToInt32(v.AuxInt)
  9308  		sym := auxToSym(v.Aux)
  9309  		if v_0.Op != OpARM64ADD {
  9310  			break
  9311  		}
  9312  		idx := v_0.Args[1]
  9313  		ptr := v_0.Args[0]
  9314  		mem := v_1
  9315  		if !(off == 0 && sym == nil) {
  9316  			break
  9317  		}
  9318  		v.reset(OpARM64MOVDloadidx)
  9319  		v.AddArg3(ptr, idx, mem)
  9320  		return true
  9321  	}
  9322  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  9323  	// cond: off == 0 && sym == nil
  9324  	// result: (MOVDloadidx8 ptr idx mem)
  9325  	for {
  9326  		off := auxIntToInt32(v.AuxInt)
  9327  		sym := auxToSym(v.Aux)
  9328  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9329  			break
  9330  		}
  9331  		idx := v_0.Args[1]
  9332  		ptr := v_0.Args[0]
  9333  		mem := v_1
  9334  		if !(off == 0 && sym == nil) {
  9335  			break
  9336  		}
  9337  		v.reset(OpARM64MOVDloadidx8)
  9338  		v.AddArg3(ptr, idx, mem)
  9339  		return true
  9340  	}
  9341  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9342  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9343  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9344  	for {
  9345  		off1 := auxIntToInt32(v.AuxInt)
  9346  		sym1 := auxToSym(v.Aux)
  9347  		if v_0.Op != OpARM64MOVDaddr {
  9348  			break
  9349  		}
  9350  		off2 := auxIntToInt32(v_0.AuxInt)
  9351  		sym2 := auxToSym(v_0.Aux)
  9352  		ptr := v_0.Args[0]
  9353  		mem := v_1
  9354  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9355  			break
  9356  		}
  9357  		v.reset(OpARM64MOVDload)
  9358  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9359  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9360  		v.AddArg2(ptr, mem)
  9361  		return true
  9362  	}
  9363  	// match: (MOVDload [off] {sym} (SB) _)
  9364  	// cond: symIsRO(sym)
  9365  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9366  	for {
  9367  		off := auxIntToInt32(v.AuxInt)
  9368  		sym := auxToSym(v.Aux)
  9369  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9370  			break
  9371  		}
  9372  		v.reset(OpARM64MOVDconst)
  9373  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9374  		return true
  9375  	}
  9376  	return false
  9377  }
  9378  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
  9379  	v_2 := v.Args[2]
  9380  	v_1 := v.Args[1]
  9381  	v_0 := v.Args[0]
  9382  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  9383  	// cond: is32Bit(c)
  9384  	// result: (MOVDload [int32(c)] ptr mem)
  9385  	for {
  9386  		ptr := v_0
  9387  		if v_1.Op != OpARM64MOVDconst {
  9388  			break
  9389  		}
  9390  		c := auxIntToInt64(v_1.AuxInt)
  9391  		mem := v_2
  9392  		if !(is32Bit(c)) {
  9393  			break
  9394  		}
  9395  		v.reset(OpARM64MOVDload)
  9396  		v.AuxInt = int32ToAuxInt(int32(c))
  9397  		v.AddArg2(ptr, mem)
  9398  		return true
  9399  	}
  9400  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  9401  	// cond: is32Bit(c)
  9402  	// result: (MOVDload [int32(c)] ptr mem)
  9403  	for {
  9404  		if v_0.Op != OpARM64MOVDconst {
  9405  			break
  9406  		}
  9407  		c := auxIntToInt64(v_0.AuxInt)
  9408  		ptr := v_1
  9409  		mem := v_2
  9410  		if !(is32Bit(c)) {
  9411  			break
  9412  		}
  9413  		v.reset(OpARM64MOVDload)
  9414  		v.AuxInt = int32ToAuxInt(int32(c))
  9415  		v.AddArg2(ptr, mem)
  9416  		return true
  9417  	}
  9418  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
  9419  	// result: (MOVDloadidx8 ptr idx mem)
  9420  	for {
  9421  		ptr := v_0
  9422  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9423  			break
  9424  		}
  9425  		idx := v_1.Args[0]
  9426  		mem := v_2
  9427  		v.reset(OpARM64MOVDloadidx8)
  9428  		v.AddArg3(ptr, idx, mem)
  9429  		return true
  9430  	}
  9431  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
  9432  	// result: (MOVDloadidx8 ptr idx mem)
  9433  	for {
  9434  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9435  			break
  9436  		}
  9437  		idx := v_0.Args[0]
  9438  		ptr := v_1
  9439  		mem := v_2
  9440  		v.reset(OpARM64MOVDloadidx8)
  9441  		v.AddArg3(ptr, idx, mem)
  9442  		return true
  9443  	}
  9444  	return false
  9445  }
  9446  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
  9447  	v_2 := v.Args[2]
  9448  	v_1 := v.Args[1]
  9449  	v_0 := v.Args[0]
  9450  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
  9451  	// cond: is32Bit(c<<3)
  9452  	// result: (MOVDload [int32(c)<<3] ptr mem)
  9453  	for {
  9454  		ptr := v_0
  9455  		if v_1.Op != OpARM64MOVDconst {
  9456  			break
  9457  		}
  9458  		c := auxIntToInt64(v_1.AuxInt)
  9459  		mem := v_2
  9460  		if !(is32Bit(c << 3)) {
  9461  			break
  9462  		}
  9463  		v.reset(OpARM64MOVDload)
  9464  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9465  		v.AddArg2(ptr, mem)
  9466  		return true
  9467  	}
  9468  	return false
  9469  }
  9470  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
  9471  	v_0 := v.Args[0]
  9472  	// match: (MOVDnop (MOVDconst [c]))
  9473  	// result: (MOVDconst [c])
  9474  	for {
  9475  		if v_0.Op != OpARM64MOVDconst {
  9476  			break
  9477  		}
  9478  		c := auxIntToInt64(v_0.AuxInt)
  9479  		v.reset(OpARM64MOVDconst)
  9480  		v.AuxInt = int64ToAuxInt(c)
  9481  		return true
  9482  	}
  9483  	return false
  9484  }
  9485  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
  9486  	v_0 := v.Args[0]
  9487  	// match: (MOVDreg x)
  9488  	// cond: x.Uses == 1
  9489  	// result: (MOVDnop x)
  9490  	for {
  9491  		x := v_0
  9492  		if !(x.Uses == 1) {
  9493  			break
  9494  		}
  9495  		v.reset(OpARM64MOVDnop)
  9496  		v.AddArg(x)
  9497  		return true
  9498  	}
  9499  	// match: (MOVDreg (MOVDconst [c]))
  9500  	// result: (MOVDconst [c])
  9501  	for {
  9502  		if v_0.Op != OpARM64MOVDconst {
  9503  			break
  9504  		}
  9505  		c := auxIntToInt64(v_0.AuxInt)
  9506  		v.reset(OpARM64MOVDconst)
  9507  		v.AuxInt = int64ToAuxInt(c)
  9508  		return true
  9509  	}
  9510  	return false
  9511  }
  9512  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
  9513  	v_2 := v.Args[2]
  9514  	v_1 := v.Args[1]
  9515  	v_0 := v.Args[0]
  9516  	b := v.Block
  9517  	config := b.Func.Config
  9518  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
  9519  	// result: (FMOVDstore [off] {sym} ptr val mem)
  9520  	for {
  9521  		off := auxIntToInt32(v.AuxInt)
  9522  		sym := auxToSym(v.Aux)
  9523  		ptr := v_0
  9524  		if v_1.Op != OpARM64FMOVDfpgp {
  9525  			break
  9526  		}
  9527  		val := v_1.Args[0]
  9528  		mem := v_2
  9529  		v.reset(OpARM64FMOVDstore)
  9530  		v.AuxInt = int32ToAuxInt(off)
  9531  		v.Aux = symToAux(sym)
  9532  		v.AddArg3(ptr, val, mem)
  9533  		return true
  9534  	}
  9535  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9536  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9537  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  9538  	for {
  9539  		off1 := auxIntToInt32(v.AuxInt)
  9540  		sym := auxToSym(v.Aux)
  9541  		if v_0.Op != OpARM64ADDconst {
  9542  			break
  9543  		}
  9544  		off2 := auxIntToInt64(v_0.AuxInt)
  9545  		ptr := v_0.Args[0]
  9546  		val := v_1
  9547  		mem := v_2
  9548  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9549  			break
  9550  		}
  9551  		v.reset(OpARM64MOVDstore)
  9552  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9553  		v.Aux = symToAux(sym)
  9554  		v.AddArg3(ptr, val, mem)
  9555  		return true
  9556  	}
  9557  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
  9558  	// cond: off == 0 && sym == nil
  9559  	// result: (MOVDstoreidx ptr idx val mem)
  9560  	for {
  9561  		off := auxIntToInt32(v.AuxInt)
  9562  		sym := auxToSym(v.Aux)
  9563  		if v_0.Op != OpARM64ADD {
  9564  			break
  9565  		}
  9566  		idx := v_0.Args[1]
  9567  		ptr := v_0.Args[0]
  9568  		val := v_1
  9569  		mem := v_2
  9570  		if !(off == 0 && sym == nil) {
  9571  			break
  9572  		}
  9573  		v.reset(OpARM64MOVDstoreidx)
  9574  		v.AddArg4(ptr, idx, val, mem)
  9575  		return true
  9576  	}
  9577  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  9578  	// cond: off == 0 && sym == nil
  9579  	// result: (MOVDstoreidx8 ptr idx val mem)
  9580  	for {
  9581  		off := auxIntToInt32(v.AuxInt)
  9582  		sym := auxToSym(v.Aux)
  9583  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9584  			break
  9585  		}
  9586  		idx := v_0.Args[1]
  9587  		ptr := v_0.Args[0]
  9588  		val := v_1
  9589  		mem := v_2
  9590  		if !(off == 0 && sym == nil) {
  9591  			break
  9592  		}
  9593  		v.reset(OpARM64MOVDstoreidx8)
  9594  		v.AddArg4(ptr, idx, val, mem)
  9595  		return true
  9596  	}
  9597  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  9598  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9599  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9600  	for {
  9601  		off1 := auxIntToInt32(v.AuxInt)
  9602  		sym1 := auxToSym(v.Aux)
  9603  		if v_0.Op != OpARM64MOVDaddr {
  9604  			break
  9605  		}
  9606  		off2 := auxIntToInt32(v_0.AuxInt)
  9607  		sym2 := auxToSym(v_0.Aux)
  9608  		ptr := v_0.Args[0]
  9609  		val := v_1
  9610  		mem := v_2
  9611  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9612  			break
  9613  		}
  9614  		v.reset(OpARM64MOVDstore)
  9615  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9616  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9617  		v.AddArg3(ptr, val, mem)
  9618  		return true
  9619  	}
  9620  	return false
  9621  }
  9622  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
  9623  	v_3 := v.Args[3]
  9624  	v_2 := v.Args[2]
  9625  	v_1 := v.Args[1]
  9626  	v_0 := v.Args[0]
  9627  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  9628  	// cond: is32Bit(c)
  9629  	// result: (MOVDstore [int32(c)] ptr val mem)
  9630  	for {
  9631  		ptr := v_0
  9632  		if v_1.Op != OpARM64MOVDconst {
  9633  			break
  9634  		}
  9635  		c := auxIntToInt64(v_1.AuxInt)
  9636  		val := v_2
  9637  		mem := v_3
  9638  		if !(is32Bit(c)) {
  9639  			break
  9640  		}
  9641  		v.reset(OpARM64MOVDstore)
  9642  		v.AuxInt = int32ToAuxInt(int32(c))
  9643  		v.AddArg3(ptr, val, mem)
  9644  		return true
  9645  	}
  9646  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
  9647  	// cond: is32Bit(c)
  9648  	// result: (MOVDstore [int32(c)] idx val mem)
  9649  	for {
  9650  		if v_0.Op != OpARM64MOVDconst {
  9651  			break
  9652  		}
  9653  		c := auxIntToInt64(v_0.AuxInt)
  9654  		idx := v_1
  9655  		val := v_2
  9656  		mem := v_3
  9657  		if !(is32Bit(c)) {
  9658  			break
  9659  		}
  9660  		v.reset(OpARM64MOVDstore)
  9661  		v.AuxInt = int32ToAuxInt(int32(c))
  9662  		v.AddArg3(idx, val, mem)
  9663  		return true
  9664  	}
  9665  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
  9666  	// result: (MOVDstoreidx8 ptr idx val mem)
  9667  	for {
  9668  		ptr := v_0
  9669  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9670  			break
  9671  		}
  9672  		idx := v_1.Args[0]
  9673  		val := v_2
  9674  		mem := v_3
  9675  		v.reset(OpARM64MOVDstoreidx8)
  9676  		v.AddArg4(ptr, idx, val, mem)
  9677  		return true
  9678  	}
  9679  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
  9680  	// result: (MOVDstoreidx8 ptr idx val mem)
  9681  	for {
  9682  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9683  			break
  9684  		}
  9685  		idx := v_0.Args[0]
  9686  		ptr := v_1
  9687  		val := v_2
  9688  		mem := v_3
  9689  		v.reset(OpARM64MOVDstoreidx8)
  9690  		v.AddArg4(ptr, idx, val, mem)
  9691  		return true
  9692  	}
  9693  	return false
  9694  }
  9695  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
  9696  	v_3 := v.Args[3]
  9697  	v_2 := v.Args[2]
  9698  	v_1 := v.Args[1]
  9699  	v_0 := v.Args[0]
  9700  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  9701  	// cond: is32Bit(c<<3)
  9702  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
  9703  	for {
  9704  		ptr := v_0
  9705  		if v_1.Op != OpARM64MOVDconst {
  9706  			break
  9707  		}
  9708  		c := auxIntToInt64(v_1.AuxInt)
  9709  		val := v_2
  9710  		mem := v_3
  9711  		if !(is32Bit(c << 3)) {
  9712  			break
  9713  		}
  9714  		v.reset(OpARM64MOVDstore)
  9715  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9716  		v.AddArg3(ptr, val, mem)
  9717  		return true
  9718  	}
  9719  	return false
  9720  }
  9721  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
  9722  	v_1 := v.Args[1]
  9723  	v_0 := v.Args[0]
  9724  	b := v.Block
  9725  	config := b.Func.Config
  9726  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
  9727  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9728  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  9729  	for {
  9730  		off1 := auxIntToInt32(v.AuxInt)
  9731  		sym := auxToSym(v.Aux)
  9732  		if v_0.Op != OpARM64ADDconst {
  9733  			break
  9734  		}
  9735  		off2 := auxIntToInt64(v_0.AuxInt)
  9736  		ptr := v_0.Args[0]
  9737  		mem := v_1
  9738  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9739  			break
  9740  		}
  9741  		v.reset(OpARM64MOVHUload)
  9742  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9743  		v.Aux = symToAux(sym)
  9744  		v.AddArg2(ptr, mem)
  9745  		return true
  9746  	}
  9747  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
  9748  	// cond: off == 0 && sym == nil
  9749  	// result: (MOVHUloadidx ptr idx mem)
  9750  	for {
  9751  		off := auxIntToInt32(v.AuxInt)
  9752  		sym := auxToSym(v.Aux)
  9753  		if v_0.Op != OpARM64ADD {
  9754  			break
  9755  		}
  9756  		idx := v_0.Args[1]
  9757  		ptr := v_0.Args[0]
  9758  		mem := v_1
  9759  		if !(off == 0 && sym == nil) {
  9760  			break
  9761  		}
  9762  		v.reset(OpARM64MOVHUloadidx)
  9763  		v.AddArg3(ptr, idx, mem)
  9764  		return true
  9765  	}
  9766  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
  9767  	// cond: off == 0 && sym == nil
  9768  	// result: (MOVHUloadidx2 ptr idx mem)
  9769  	for {
  9770  		off := auxIntToInt32(v.AuxInt)
  9771  		sym := auxToSym(v.Aux)
  9772  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
  9773  			break
  9774  		}
  9775  		idx := v_0.Args[1]
  9776  		ptr := v_0.Args[0]
  9777  		mem := v_1
  9778  		if !(off == 0 && sym == nil) {
  9779  			break
  9780  		}
  9781  		v.reset(OpARM64MOVHUloadidx2)
  9782  		v.AddArg3(ptr, idx, mem)
  9783  		return true
  9784  	}
  9785  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9786  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9787  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9788  	for {
  9789  		off1 := auxIntToInt32(v.AuxInt)
  9790  		sym1 := auxToSym(v.Aux)
  9791  		if v_0.Op != OpARM64MOVDaddr {
  9792  			break
  9793  		}
  9794  		off2 := auxIntToInt32(v_0.AuxInt)
  9795  		sym2 := auxToSym(v_0.Aux)
  9796  		ptr := v_0.Args[0]
  9797  		mem := v_1
  9798  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9799  			break
  9800  		}
  9801  		v.reset(OpARM64MOVHUload)
  9802  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9803  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9804  		v.AddArg2(ptr, mem)
  9805  		return true
  9806  	}
  9807  	// match: (MOVHUload [off] {sym} (SB) _)
  9808  	// cond: symIsRO(sym)
  9809  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9810  	for {
  9811  		off := auxIntToInt32(v.AuxInt)
  9812  		sym := auxToSym(v.Aux)
  9813  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9814  			break
  9815  		}
  9816  		v.reset(OpARM64MOVDconst)
  9817  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9818  		return true
  9819  	}
  9820  	return false
  9821  }
  9822  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
  9823  	v_2 := v.Args[2]
  9824  	v_1 := v.Args[1]
  9825  	v_0 := v.Args[0]
  9826  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
  9827  	// cond: is32Bit(c)
  9828  	// result: (MOVHUload [int32(c)] ptr mem)
  9829  	for {
  9830  		ptr := v_0
  9831  		if v_1.Op != OpARM64MOVDconst {
  9832  			break
  9833  		}
  9834  		c := auxIntToInt64(v_1.AuxInt)
  9835  		mem := v_2
  9836  		if !(is32Bit(c)) {
  9837  			break
  9838  		}
  9839  		v.reset(OpARM64MOVHUload)
  9840  		v.AuxInt = int32ToAuxInt(int32(c))
  9841  		v.AddArg2(ptr, mem)
  9842  		return true
  9843  	}
  9844  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
  9845  	// cond: is32Bit(c)
  9846  	// result: (MOVHUload [int32(c)] ptr mem)
  9847  	for {
  9848  		if v_0.Op != OpARM64MOVDconst {
  9849  			break
  9850  		}
  9851  		c := auxIntToInt64(v_0.AuxInt)
  9852  		ptr := v_1
  9853  		mem := v_2
  9854  		if !(is32Bit(c)) {
  9855  			break
  9856  		}
  9857  		v.reset(OpARM64MOVHUload)
  9858  		v.AuxInt = int32ToAuxInt(int32(c))
  9859  		v.AddArg2(ptr, mem)
  9860  		return true
  9861  	}
  9862  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
  9863  	// result: (MOVHUloadidx2 ptr idx mem)
  9864  	for {
  9865  		ptr := v_0
  9866  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
  9867  			break
  9868  		}
  9869  		idx := v_1.Args[0]
  9870  		mem := v_2
  9871  		v.reset(OpARM64MOVHUloadidx2)
  9872  		v.AddArg3(ptr, idx, mem)
  9873  		return true
  9874  	}
  9875  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
  9876  	// result: (MOVHUloadidx2 ptr idx mem)
  9877  	for {
  9878  		ptr := v_0
  9879  		if v_1.Op != OpARM64ADD {
  9880  			break
  9881  		}
  9882  		idx := v_1.Args[1]
  9883  		if idx != v_1.Args[0] {
  9884  			break
  9885  		}
  9886  		mem := v_2
  9887  		v.reset(OpARM64MOVHUloadidx2)
  9888  		v.AddArg3(ptr, idx, mem)
  9889  		return true
  9890  	}
  9891  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
  9892  	// result: (MOVHUloadidx2 ptr idx mem)
  9893  	for {
  9894  		if v_0.Op != OpARM64ADD {
  9895  			break
  9896  		}
  9897  		idx := v_0.Args[1]
  9898  		if idx != v_0.Args[0] {
  9899  			break
  9900  		}
  9901  		ptr := v_1
  9902  		mem := v_2
  9903  		v.reset(OpARM64MOVHUloadidx2)
  9904  		v.AddArg3(ptr, idx, mem)
  9905  		return true
  9906  	}
  9907  	return false
  9908  }
  9909  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
  9910  	v_2 := v.Args[2]
  9911  	v_1 := v.Args[1]
  9912  	v_0 := v.Args[0]
  9913  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
  9914  	// cond: is32Bit(c<<1)
  9915  	// result: (MOVHUload [int32(c)<<1] ptr mem)
  9916  	for {
  9917  		ptr := v_0
  9918  		if v_1.Op != OpARM64MOVDconst {
  9919  			break
  9920  		}
  9921  		c := auxIntToInt64(v_1.AuxInt)
  9922  		mem := v_2
  9923  		if !(is32Bit(c << 1)) {
  9924  			break
  9925  		}
  9926  		v.reset(OpARM64MOVHUload)
  9927  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
  9928  		v.AddArg2(ptr, mem)
  9929  		return true
  9930  	}
  9931  	return false
  9932  }
  9933  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
  9934  	v_0 := v.Args[0]
  9935  	// match: (MOVHUreg (ANDconst [c] x))
  9936  	// result: (ANDconst [c&(1<<16-1)] x)
  9937  	for {
  9938  		if v_0.Op != OpARM64ANDconst {
  9939  			break
  9940  		}
  9941  		c := auxIntToInt64(v_0.AuxInt)
  9942  		x := v_0.Args[0]
  9943  		v.reset(OpARM64ANDconst)
  9944  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  9945  		v.AddArg(x)
  9946  		return true
  9947  	}
  9948  	// match: (MOVHUreg (MOVDconst [c]))
  9949  	// result: (MOVDconst [int64(uint16(c))])
  9950  	for {
  9951  		if v_0.Op != OpARM64MOVDconst {
  9952  			break
  9953  		}
  9954  		c := auxIntToInt64(v_0.AuxInt)
  9955  		v.reset(OpARM64MOVDconst)
  9956  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9957  		return true
  9958  	}
  9959  	// match: (MOVHUreg x)
  9960  	// cond: v.Type.Size() <= 2
  9961  	// result: x
  9962  	for {
  9963  		x := v_0
  9964  		if !(v.Type.Size() <= 2) {
  9965  			break
  9966  		}
  9967  		v.copyOf(x)
  9968  		return true
  9969  	}
  9970  	// match: (MOVHUreg (SLLconst [lc] x))
  9971  	// cond: lc >= 16
  9972  	// result: (MOVDconst [0])
  9973  	for {
  9974  		if v_0.Op != OpARM64SLLconst {
  9975  			break
  9976  		}
  9977  		lc := auxIntToInt64(v_0.AuxInt)
  9978  		if !(lc >= 16) {
  9979  			break
  9980  		}
  9981  		v.reset(OpARM64MOVDconst)
  9982  		v.AuxInt = int64ToAuxInt(0)
  9983  		return true
  9984  	}
  9985  	// match: (MOVHUreg (SLLconst [lc] x))
  9986  	// cond: lc < 16
  9987  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
  9988  	for {
  9989  		if v_0.Op != OpARM64SLLconst {
  9990  			break
  9991  		}
  9992  		lc := auxIntToInt64(v_0.AuxInt)
  9993  		x := v_0.Args[0]
  9994  		if !(lc < 16) {
  9995  			break
  9996  		}
  9997  		v.reset(OpARM64UBFIZ)
  9998  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
  9999  		v.AddArg(x)
 10000  		return true
 10001  	}
 10002  	// match: (MOVHUreg (SRLconst [rc] x))
 10003  	// cond: rc < 16
 10004  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
 10005  	for {
 10006  		if v_0.Op != OpARM64SRLconst {
 10007  			break
 10008  		}
 10009  		rc := auxIntToInt64(v_0.AuxInt)
 10010  		x := v_0.Args[0]
 10011  		if !(rc < 16) {
 10012  			break
 10013  		}
 10014  		v.reset(OpARM64UBFX)
 10015  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
 10016  		v.AddArg(x)
 10017  		return true
 10018  	}
 10019  	// match: (MOVHUreg (UBFX [bfc] x))
 10020  	// cond: bfc.width() <= 16
 10021  	// result: (UBFX [bfc] x)
 10022  	for {
 10023  		if v_0.Op != OpARM64UBFX {
 10024  			break
 10025  		}
 10026  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10027  		x := v_0.Args[0]
 10028  		if !(bfc.width() <= 16) {
 10029  			break
 10030  		}
 10031  		v.reset(OpARM64UBFX)
 10032  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10033  		v.AddArg(x)
 10034  		return true
 10035  	}
 10036  	return false
 10037  }
 10038  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
 10039  	v_1 := v.Args[1]
 10040  	v_0 := v.Args[0]
 10041  	b := v.Block
 10042  	config := b.Func.Config
 10043  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
 10044  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10045  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
 10046  	for {
 10047  		off1 := auxIntToInt32(v.AuxInt)
 10048  		sym := auxToSym(v.Aux)
 10049  		if v_0.Op != OpARM64ADDconst {
 10050  			break
 10051  		}
 10052  		off2 := auxIntToInt64(v_0.AuxInt)
 10053  		ptr := v_0.Args[0]
 10054  		mem := v_1
 10055  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10056  			break
 10057  		}
 10058  		v.reset(OpARM64MOVHload)
 10059  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10060  		v.Aux = symToAux(sym)
 10061  		v.AddArg2(ptr, mem)
 10062  		return true
 10063  	}
 10064  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
 10065  	// cond: off == 0 && sym == nil
 10066  	// result: (MOVHloadidx ptr idx mem)
 10067  	for {
 10068  		off := auxIntToInt32(v.AuxInt)
 10069  		sym := auxToSym(v.Aux)
 10070  		if v_0.Op != OpARM64ADD {
 10071  			break
 10072  		}
 10073  		idx := v_0.Args[1]
 10074  		ptr := v_0.Args[0]
 10075  		mem := v_1
 10076  		if !(off == 0 && sym == nil) {
 10077  			break
 10078  		}
 10079  		v.reset(OpARM64MOVHloadidx)
 10080  		v.AddArg3(ptr, idx, mem)
 10081  		return true
 10082  	}
 10083  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 10084  	// cond: off == 0 && sym == nil
 10085  	// result: (MOVHloadidx2 ptr idx mem)
 10086  	for {
 10087  		off := auxIntToInt32(v.AuxInt)
 10088  		sym := auxToSym(v.Aux)
 10089  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10090  			break
 10091  		}
 10092  		idx := v_0.Args[1]
 10093  		ptr := v_0.Args[0]
 10094  		mem := v_1
 10095  		if !(off == 0 && sym == nil) {
 10096  			break
 10097  		}
 10098  		v.reset(OpARM64MOVHloadidx2)
 10099  		v.AddArg3(ptr, idx, mem)
 10100  		return true
 10101  	}
 10102  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10103  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10104  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10105  	for {
 10106  		off1 := auxIntToInt32(v.AuxInt)
 10107  		sym1 := auxToSym(v.Aux)
 10108  		if v_0.Op != OpARM64MOVDaddr {
 10109  			break
 10110  		}
 10111  		off2 := auxIntToInt32(v_0.AuxInt)
 10112  		sym2 := auxToSym(v_0.Aux)
 10113  		ptr := v_0.Args[0]
 10114  		mem := v_1
 10115  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10116  			break
 10117  		}
 10118  		v.reset(OpARM64MOVHload)
 10119  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10120  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10121  		v.AddArg2(ptr, mem)
 10122  		return true
 10123  	}
 10124  	// match: (MOVHload [off] {sym} (SB) _)
 10125  	// cond: symIsRO(sym)
 10126  	// result: (MOVDconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 10127  	for {
 10128  		off := auxIntToInt32(v.AuxInt)
 10129  		sym := auxToSym(v.Aux)
 10130  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10131  			break
 10132  		}
 10133  		v.reset(OpARM64MOVDconst)
 10134  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 10135  		return true
 10136  	}
 10137  	return false
 10138  }
 10139  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
 10140  	v_2 := v.Args[2]
 10141  	v_1 := v.Args[1]
 10142  	v_0 := v.Args[0]
 10143  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 10144  	// cond: is32Bit(c)
 10145  	// result: (MOVHload [int32(c)] ptr mem)
 10146  	for {
 10147  		ptr := v_0
 10148  		if v_1.Op != OpARM64MOVDconst {
 10149  			break
 10150  		}
 10151  		c := auxIntToInt64(v_1.AuxInt)
 10152  		mem := v_2
 10153  		if !(is32Bit(c)) {
 10154  			break
 10155  		}
 10156  		v.reset(OpARM64MOVHload)
 10157  		v.AuxInt = int32ToAuxInt(int32(c))
 10158  		v.AddArg2(ptr, mem)
 10159  		return true
 10160  	}
 10161  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 10162  	// cond: is32Bit(c)
 10163  	// result: (MOVHload [int32(c)] ptr mem)
 10164  	for {
 10165  		if v_0.Op != OpARM64MOVDconst {
 10166  			break
 10167  		}
 10168  		c := auxIntToInt64(v_0.AuxInt)
 10169  		ptr := v_1
 10170  		mem := v_2
 10171  		if !(is32Bit(c)) {
 10172  			break
 10173  		}
 10174  		v.reset(OpARM64MOVHload)
 10175  		v.AuxInt = int32ToAuxInt(int32(c))
 10176  		v.AddArg2(ptr, mem)
 10177  		return true
 10178  	}
 10179  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 10180  	// result: (MOVHloadidx2 ptr idx mem)
 10181  	for {
 10182  		ptr := v_0
 10183  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10184  			break
 10185  		}
 10186  		idx := v_1.Args[0]
 10187  		mem := v_2
 10188  		v.reset(OpARM64MOVHloadidx2)
 10189  		v.AddArg3(ptr, idx, mem)
 10190  		return true
 10191  	}
 10192  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 10193  	// result: (MOVHloadidx2 ptr idx mem)
 10194  	for {
 10195  		ptr := v_0
 10196  		if v_1.Op != OpARM64ADD {
 10197  			break
 10198  		}
 10199  		idx := v_1.Args[1]
 10200  		if idx != v_1.Args[0] {
 10201  			break
 10202  		}
 10203  		mem := v_2
 10204  		v.reset(OpARM64MOVHloadidx2)
 10205  		v.AddArg3(ptr, idx, mem)
 10206  		return true
 10207  	}
 10208  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 10209  	// result: (MOVHloadidx2 ptr idx mem)
 10210  	for {
 10211  		if v_0.Op != OpARM64ADD {
 10212  			break
 10213  		}
 10214  		idx := v_0.Args[1]
 10215  		if idx != v_0.Args[0] {
 10216  			break
 10217  		}
 10218  		ptr := v_1
 10219  		mem := v_2
 10220  		v.reset(OpARM64MOVHloadidx2)
 10221  		v.AddArg3(ptr, idx, mem)
 10222  		return true
 10223  	}
 10224  	return false
 10225  }
 10226  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 10227  	v_2 := v.Args[2]
 10228  	v_1 := v.Args[1]
 10229  	v_0 := v.Args[0]
 10230  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 10231  	// cond: is32Bit(c<<1)
 10232  	// result: (MOVHload [int32(c)<<1] ptr mem)
 10233  	for {
 10234  		ptr := v_0
 10235  		if v_1.Op != OpARM64MOVDconst {
 10236  			break
 10237  		}
 10238  		c := auxIntToInt64(v_1.AuxInt)
 10239  		mem := v_2
 10240  		if !(is32Bit(c << 1)) {
 10241  			break
 10242  		}
 10243  		v.reset(OpARM64MOVHload)
 10244  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10245  		v.AddArg2(ptr, mem)
 10246  		return true
 10247  	}
 10248  	return false
 10249  }
 10250  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 10251  	v_0 := v.Args[0]
 10252  	// match: (MOVHreg (MOVDconst [c]))
 10253  	// result: (MOVDconst [int64(int16(c))])
 10254  	for {
 10255  		if v_0.Op != OpARM64MOVDconst {
 10256  			break
 10257  		}
 10258  		c := auxIntToInt64(v_0.AuxInt)
 10259  		v.reset(OpARM64MOVDconst)
 10260  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 10261  		return true
 10262  	}
 10263  	// match: (MOVHreg x)
 10264  	// cond: v.Type.Size() <= 2
 10265  	// result: x
 10266  	for {
 10267  		x := v_0
 10268  		if !(v.Type.Size() <= 2) {
 10269  			break
 10270  		}
 10271  		v.copyOf(x)
 10272  		return true
 10273  	}
 10274  	// match: (MOVHreg <t> (ANDconst x [c]))
 10275  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 10276  	// result: (ANDconst <t> x [c])
 10277  	for {
 10278  		t := v.Type
 10279  		if v_0.Op != OpARM64ANDconst {
 10280  			break
 10281  		}
 10282  		c := auxIntToInt64(v_0.AuxInt)
 10283  		x := v_0.Args[0]
 10284  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 10285  			break
 10286  		}
 10287  		v.reset(OpARM64ANDconst)
 10288  		v.Type = t
 10289  		v.AuxInt = int64ToAuxInt(c)
 10290  		v.AddArg(x)
 10291  		return true
 10292  	}
 10293  	// match: (MOVHreg (SLLconst [lc] x))
 10294  	// cond: lc < 16
 10295  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 10296  	for {
 10297  		if v_0.Op != OpARM64SLLconst {
 10298  			break
 10299  		}
 10300  		lc := auxIntToInt64(v_0.AuxInt)
 10301  		x := v_0.Args[0]
 10302  		if !(lc < 16) {
 10303  			break
 10304  		}
 10305  		v.reset(OpARM64SBFIZ)
 10306  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 10307  		v.AddArg(x)
 10308  		return true
 10309  	}
 10310  	// match: (MOVHreg (SBFX [bfc] x))
 10311  	// cond: bfc.width() <= 16
 10312  	// result: (SBFX [bfc] x)
 10313  	for {
 10314  		if v_0.Op != OpARM64SBFX {
 10315  			break
 10316  		}
 10317  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10318  		x := v_0.Args[0]
 10319  		if !(bfc.width() <= 16) {
 10320  			break
 10321  		}
 10322  		v.reset(OpARM64SBFX)
 10323  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10324  		v.AddArg(x)
 10325  		return true
 10326  	}
 10327  	return false
 10328  }
 10329  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 10330  	v_2 := v.Args[2]
 10331  	v_1 := v.Args[1]
 10332  	v_0 := v.Args[0]
 10333  	b := v.Block
 10334  	config := b.Func.Config
 10335  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10336  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10337  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 10338  	for {
 10339  		off1 := auxIntToInt32(v.AuxInt)
 10340  		sym := auxToSym(v.Aux)
 10341  		if v_0.Op != OpARM64ADDconst {
 10342  			break
 10343  		}
 10344  		off2 := auxIntToInt64(v_0.AuxInt)
 10345  		ptr := v_0.Args[0]
 10346  		val := v_1
 10347  		mem := v_2
 10348  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10349  			break
 10350  		}
 10351  		v.reset(OpARM64MOVHstore)
 10352  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10353  		v.Aux = symToAux(sym)
 10354  		v.AddArg3(ptr, val, mem)
 10355  		return true
 10356  	}
 10357  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 10358  	// cond: off == 0 && sym == nil
 10359  	// result: (MOVHstoreidx ptr idx val mem)
 10360  	for {
 10361  		off := auxIntToInt32(v.AuxInt)
 10362  		sym := auxToSym(v.Aux)
 10363  		if v_0.Op != OpARM64ADD {
 10364  			break
 10365  		}
 10366  		idx := v_0.Args[1]
 10367  		ptr := v_0.Args[0]
 10368  		val := v_1
 10369  		mem := v_2
 10370  		if !(off == 0 && sym == nil) {
 10371  			break
 10372  		}
 10373  		v.reset(OpARM64MOVHstoreidx)
 10374  		v.AddArg4(ptr, idx, val, mem)
 10375  		return true
 10376  	}
 10377  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 10378  	// cond: off == 0 && sym == nil
 10379  	// result: (MOVHstoreidx2 ptr idx val mem)
 10380  	for {
 10381  		off := auxIntToInt32(v.AuxInt)
 10382  		sym := auxToSym(v.Aux)
 10383  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10384  			break
 10385  		}
 10386  		idx := v_0.Args[1]
 10387  		ptr := v_0.Args[0]
 10388  		val := v_1
 10389  		mem := v_2
 10390  		if !(off == 0 && sym == nil) {
 10391  			break
 10392  		}
 10393  		v.reset(OpARM64MOVHstoreidx2)
 10394  		v.AddArg4(ptr, idx, val, mem)
 10395  		return true
 10396  	}
 10397  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10398  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10399  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10400  	for {
 10401  		off1 := auxIntToInt32(v.AuxInt)
 10402  		sym1 := auxToSym(v.Aux)
 10403  		if v_0.Op != OpARM64MOVDaddr {
 10404  			break
 10405  		}
 10406  		off2 := auxIntToInt32(v_0.AuxInt)
 10407  		sym2 := auxToSym(v_0.Aux)
 10408  		ptr := v_0.Args[0]
 10409  		val := v_1
 10410  		mem := v_2
 10411  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10412  			break
 10413  		}
 10414  		v.reset(OpARM64MOVHstore)
 10415  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10416  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10417  		v.AddArg3(ptr, val, mem)
 10418  		return true
 10419  	}
 10420  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10421  	// result: (MOVHstore [off] {sym} ptr x mem)
 10422  	for {
 10423  		off := auxIntToInt32(v.AuxInt)
 10424  		sym := auxToSym(v.Aux)
 10425  		ptr := v_0
 10426  		if v_1.Op != OpARM64MOVHreg {
 10427  			break
 10428  		}
 10429  		x := v_1.Args[0]
 10430  		mem := v_2
 10431  		v.reset(OpARM64MOVHstore)
 10432  		v.AuxInt = int32ToAuxInt(off)
 10433  		v.Aux = symToAux(sym)
 10434  		v.AddArg3(ptr, x, mem)
 10435  		return true
 10436  	}
 10437  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 10438  	// result: (MOVHstore [off] {sym} ptr x mem)
 10439  	for {
 10440  		off := auxIntToInt32(v.AuxInt)
 10441  		sym := auxToSym(v.Aux)
 10442  		ptr := v_0
 10443  		if v_1.Op != OpARM64MOVHUreg {
 10444  			break
 10445  		}
 10446  		x := v_1.Args[0]
 10447  		mem := v_2
 10448  		v.reset(OpARM64MOVHstore)
 10449  		v.AuxInt = int32ToAuxInt(off)
 10450  		v.Aux = symToAux(sym)
 10451  		v.AddArg3(ptr, x, mem)
 10452  		return true
 10453  	}
 10454  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 10455  	// result: (MOVHstore [off] {sym} ptr x mem)
 10456  	for {
 10457  		off := auxIntToInt32(v.AuxInt)
 10458  		sym := auxToSym(v.Aux)
 10459  		ptr := v_0
 10460  		if v_1.Op != OpARM64MOVWreg {
 10461  			break
 10462  		}
 10463  		x := v_1.Args[0]
 10464  		mem := v_2
 10465  		v.reset(OpARM64MOVHstore)
 10466  		v.AuxInt = int32ToAuxInt(off)
 10467  		v.Aux = symToAux(sym)
 10468  		v.AddArg3(ptr, x, mem)
 10469  		return true
 10470  	}
 10471  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 10472  	// result: (MOVHstore [off] {sym} ptr x mem)
 10473  	for {
 10474  		off := auxIntToInt32(v.AuxInt)
 10475  		sym := auxToSym(v.Aux)
 10476  		ptr := v_0
 10477  		if v_1.Op != OpARM64MOVWUreg {
 10478  			break
 10479  		}
 10480  		x := v_1.Args[0]
 10481  		mem := v_2
 10482  		v.reset(OpARM64MOVHstore)
 10483  		v.AuxInt = int32ToAuxInt(off)
 10484  		v.Aux = symToAux(sym)
 10485  		v.AddArg3(ptr, x, mem)
 10486  		return true
 10487  	}
 10488  	return false
 10489  }
 10490  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 10491  	v_3 := v.Args[3]
 10492  	v_2 := v.Args[2]
 10493  	v_1 := v.Args[1]
 10494  	v_0 := v.Args[0]
 10495  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10496  	// cond: is32Bit(c)
 10497  	// result: (MOVHstore [int32(c)] ptr val mem)
 10498  	for {
 10499  		ptr := v_0
 10500  		if v_1.Op != OpARM64MOVDconst {
 10501  			break
 10502  		}
 10503  		c := auxIntToInt64(v_1.AuxInt)
 10504  		val := v_2
 10505  		mem := v_3
 10506  		if !(is32Bit(c)) {
 10507  			break
 10508  		}
 10509  		v.reset(OpARM64MOVHstore)
 10510  		v.AuxInt = int32ToAuxInt(int32(c))
 10511  		v.AddArg3(ptr, val, mem)
 10512  		return true
 10513  	}
 10514  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 10515  	// cond: is32Bit(c)
 10516  	// result: (MOVHstore [int32(c)] idx val mem)
 10517  	for {
 10518  		if v_0.Op != OpARM64MOVDconst {
 10519  			break
 10520  		}
 10521  		c := auxIntToInt64(v_0.AuxInt)
 10522  		idx := v_1
 10523  		val := v_2
 10524  		mem := v_3
 10525  		if !(is32Bit(c)) {
 10526  			break
 10527  		}
 10528  		v.reset(OpARM64MOVHstore)
 10529  		v.AuxInt = int32ToAuxInt(int32(c))
 10530  		v.AddArg3(idx, val, mem)
 10531  		return true
 10532  	}
 10533  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 10534  	// result: (MOVHstoreidx2 ptr idx val mem)
 10535  	for {
 10536  		ptr := v_0
 10537  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10538  			break
 10539  		}
 10540  		idx := v_1.Args[0]
 10541  		val := v_2
 10542  		mem := v_3
 10543  		v.reset(OpARM64MOVHstoreidx2)
 10544  		v.AddArg4(ptr, idx, val, mem)
 10545  		return true
 10546  	}
 10547  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 10548  	// result: (MOVHstoreidx2 ptr idx val mem)
 10549  	for {
 10550  		ptr := v_0
 10551  		if v_1.Op != OpARM64ADD {
 10552  			break
 10553  		}
 10554  		idx := v_1.Args[1]
 10555  		if idx != v_1.Args[0] {
 10556  			break
 10557  		}
 10558  		val := v_2
 10559  		mem := v_3
 10560  		v.reset(OpARM64MOVHstoreidx2)
 10561  		v.AddArg4(ptr, idx, val, mem)
 10562  		return true
 10563  	}
 10564  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 10565  	// result: (MOVHstoreidx2 ptr idx val mem)
 10566  	for {
 10567  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 10568  			break
 10569  		}
 10570  		idx := v_0.Args[0]
 10571  		ptr := v_1
 10572  		val := v_2
 10573  		mem := v_3
 10574  		v.reset(OpARM64MOVHstoreidx2)
 10575  		v.AddArg4(ptr, idx, val, mem)
 10576  		return true
 10577  	}
 10578  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 10579  	// result: (MOVHstoreidx2 ptr idx val mem)
 10580  	for {
 10581  		if v_0.Op != OpARM64ADD {
 10582  			break
 10583  		}
 10584  		idx := v_0.Args[1]
 10585  		if idx != v_0.Args[0] {
 10586  			break
 10587  		}
 10588  		ptr := v_1
 10589  		val := v_2
 10590  		mem := v_3
 10591  		v.reset(OpARM64MOVHstoreidx2)
 10592  		v.AddArg4(ptr, idx, val, mem)
 10593  		return true
 10594  	}
 10595  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 10596  	// result: (MOVHstoreidx ptr idx x mem)
 10597  	for {
 10598  		ptr := v_0
 10599  		idx := v_1
 10600  		if v_2.Op != OpARM64MOVHreg {
 10601  			break
 10602  		}
 10603  		x := v_2.Args[0]
 10604  		mem := v_3
 10605  		v.reset(OpARM64MOVHstoreidx)
 10606  		v.AddArg4(ptr, idx, x, mem)
 10607  		return true
 10608  	}
 10609  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 10610  	// result: (MOVHstoreidx ptr idx x mem)
 10611  	for {
 10612  		ptr := v_0
 10613  		idx := v_1
 10614  		if v_2.Op != OpARM64MOVHUreg {
 10615  			break
 10616  		}
 10617  		x := v_2.Args[0]
 10618  		mem := v_3
 10619  		v.reset(OpARM64MOVHstoreidx)
 10620  		v.AddArg4(ptr, idx, x, mem)
 10621  		return true
 10622  	}
 10623  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 10624  	// result: (MOVHstoreidx ptr idx x mem)
 10625  	for {
 10626  		ptr := v_0
 10627  		idx := v_1
 10628  		if v_2.Op != OpARM64MOVWreg {
 10629  			break
 10630  		}
 10631  		x := v_2.Args[0]
 10632  		mem := v_3
 10633  		v.reset(OpARM64MOVHstoreidx)
 10634  		v.AddArg4(ptr, idx, x, mem)
 10635  		return true
 10636  	}
 10637  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 10638  	// result: (MOVHstoreidx ptr idx x mem)
 10639  	for {
 10640  		ptr := v_0
 10641  		idx := v_1
 10642  		if v_2.Op != OpARM64MOVWUreg {
 10643  			break
 10644  		}
 10645  		x := v_2.Args[0]
 10646  		mem := v_3
 10647  		v.reset(OpARM64MOVHstoreidx)
 10648  		v.AddArg4(ptr, idx, x, mem)
 10649  		return true
 10650  	}
 10651  	return false
 10652  }
 10653  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 10654  	v_3 := v.Args[3]
 10655  	v_2 := v.Args[2]
 10656  	v_1 := v.Args[1]
 10657  	v_0 := v.Args[0]
 10658  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 10659  	// cond: is32Bit(c<<1)
 10660  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 10661  	for {
 10662  		ptr := v_0
 10663  		if v_1.Op != OpARM64MOVDconst {
 10664  			break
 10665  		}
 10666  		c := auxIntToInt64(v_1.AuxInt)
 10667  		val := v_2
 10668  		mem := v_3
 10669  		if !(is32Bit(c << 1)) {
 10670  			break
 10671  		}
 10672  		v.reset(OpARM64MOVHstore)
 10673  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10674  		v.AddArg3(ptr, val, mem)
 10675  		return true
 10676  	}
 10677  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 10678  	// result: (MOVHstoreidx2 ptr idx x mem)
 10679  	for {
 10680  		ptr := v_0
 10681  		idx := v_1
 10682  		if v_2.Op != OpARM64MOVHreg {
 10683  			break
 10684  		}
 10685  		x := v_2.Args[0]
 10686  		mem := v_3
 10687  		v.reset(OpARM64MOVHstoreidx2)
 10688  		v.AddArg4(ptr, idx, x, mem)
 10689  		return true
 10690  	}
 10691  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 10692  	// result: (MOVHstoreidx2 ptr idx x mem)
 10693  	for {
 10694  		ptr := v_0
 10695  		idx := v_1
 10696  		if v_2.Op != OpARM64MOVHUreg {
 10697  			break
 10698  		}
 10699  		x := v_2.Args[0]
 10700  		mem := v_3
 10701  		v.reset(OpARM64MOVHstoreidx2)
 10702  		v.AddArg4(ptr, idx, x, mem)
 10703  		return true
 10704  	}
 10705  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 10706  	// result: (MOVHstoreidx2 ptr idx x mem)
 10707  	for {
 10708  		ptr := v_0
 10709  		idx := v_1
 10710  		if v_2.Op != OpARM64MOVWreg {
 10711  			break
 10712  		}
 10713  		x := v_2.Args[0]
 10714  		mem := v_3
 10715  		v.reset(OpARM64MOVHstoreidx2)
 10716  		v.AddArg4(ptr, idx, x, mem)
 10717  		return true
 10718  	}
 10719  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 10720  	// result: (MOVHstoreidx2 ptr idx x mem)
 10721  	for {
 10722  		ptr := v_0
 10723  		idx := v_1
 10724  		if v_2.Op != OpARM64MOVWUreg {
 10725  			break
 10726  		}
 10727  		x := v_2.Args[0]
 10728  		mem := v_3
 10729  		v.reset(OpARM64MOVHstoreidx2)
 10730  		v.AddArg4(ptr, idx, x, mem)
 10731  		return true
 10732  	}
 10733  	return false
 10734  }
 10735  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 10736  	v_1 := v.Args[1]
 10737  	v_0 := v.Args[0]
 10738  	b := v.Block
 10739  	config := b.Func.Config
 10740  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 10741  	// result: (FMOVSfpgp val)
 10742  	for {
 10743  		off := auxIntToInt32(v.AuxInt)
 10744  		sym := auxToSym(v.Aux)
 10745  		ptr := v_0
 10746  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10747  			break
 10748  		}
 10749  		val := v_1.Args[1]
 10750  		if ptr != v_1.Args[0] {
 10751  			break
 10752  		}
 10753  		v.reset(OpARM64FMOVSfpgp)
 10754  		v.AddArg(val)
 10755  		return true
 10756  	}
 10757  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10758  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10759  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 10760  	for {
 10761  		off1 := auxIntToInt32(v.AuxInt)
 10762  		sym := auxToSym(v.Aux)
 10763  		if v_0.Op != OpARM64ADDconst {
 10764  			break
 10765  		}
 10766  		off2 := auxIntToInt64(v_0.AuxInt)
 10767  		ptr := v_0.Args[0]
 10768  		mem := v_1
 10769  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10770  			break
 10771  		}
 10772  		v.reset(OpARM64MOVWUload)
 10773  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10774  		v.Aux = symToAux(sym)
 10775  		v.AddArg2(ptr, mem)
 10776  		return true
 10777  	}
 10778  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 10779  	// cond: off == 0 && sym == nil
 10780  	// result: (MOVWUloadidx ptr idx mem)
 10781  	for {
 10782  		off := auxIntToInt32(v.AuxInt)
 10783  		sym := auxToSym(v.Aux)
 10784  		if v_0.Op != OpARM64ADD {
 10785  			break
 10786  		}
 10787  		idx := v_0.Args[1]
 10788  		ptr := v_0.Args[0]
 10789  		mem := v_1
 10790  		if !(off == 0 && sym == nil) {
 10791  			break
 10792  		}
 10793  		v.reset(OpARM64MOVWUloadidx)
 10794  		v.AddArg3(ptr, idx, mem)
 10795  		return true
 10796  	}
 10797  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 10798  	// cond: off == 0 && sym == nil
 10799  	// result: (MOVWUloadidx4 ptr idx mem)
 10800  	for {
 10801  		off := auxIntToInt32(v.AuxInt)
 10802  		sym := auxToSym(v.Aux)
 10803  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 10804  			break
 10805  		}
 10806  		idx := v_0.Args[1]
 10807  		ptr := v_0.Args[0]
 10808  		mem := v_1
 10809  		if !(off == 0 && sym == nil) {
 10810  			break
 10811  		}
 10812  		v.reset(OpARM64MOVWUloadidx4)
 10813  		v.AddArg3(ptr, idx, mem)
 10814  		return true
 10815  	}
 10816  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10817  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10818  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10819  	for {
 10820  		off1 := auxIntToInt32(v.AuxInt)
 10821  		sym1 := auxToSym(v.Aux)
 10822  		if v_0.Op != OpARM64MOVDaddr {
 10823  			break
 10824  		}
 10825  		off2 := auxIntToInt32(v_0.AuxInt)
 10826  		sym2 := auxToSym(v_0.Aux)
 10827  		ptr := v_0.Args[0]
 10828  		mem := v_1
 10829  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10830  			break
 10831  		}
 10832  		v.reset(OpARM64MOVWUload)
 10833  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10834  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10835  		v.AddArg2(ptr, mem)
 10836  		return true
 10837  	}
 10838  	// match: (MOVWUload [off] {sym} (SB) _)
 10839  	// cond: symIsRO(sym)
 10840  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10841  	for {
 10842  		off := auxIntToInt32(v.AuxInt)
 10843  		sym := auxToSym(v.Aux)
 10844  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10845  			break
 10846  		}
 10847  		v.reset(OpARM64MOVDconst)
 10848  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10849  		return true
 10850  	}
 10851  	return false
 10852  }
 10853  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 10854  	v_2 := v.Args[2]
 10855  	v_1 := v.Args[1]
 10856  	v_0 := v.Args[0]
 10857  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 10858  	// cond: is32Bit(c)
 10859  	// result: (MOVWUload [int32(c)] ptr mem)
 10860  	for {
 10861  		ptr := v_0
 10862  		if v_1.Op != OpARM64MOVDconst {
 10863  			break
 10864  		}
 10865  		c := auxIntToInt64(v_1.AuxInt)
 10866  		mem := v_2
 10867  		if !(is32Bit(c)) {
 10868  			break
 10869  		}
 10870  		v.reset(OpARM64MOVWUload)
 10871  		v.AuxInt = int32ToAuxInt(int32(c))
 10872  		v.AddArg2(ptr, mem)
 10873  		return true
 10874  	}
 10875  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 10876  	// cond: is32Bit(c)
 10877  	// result: (MOVWUload [int32(c)] ptr mem)
 10878  	for {
 10879  		if v_0.Op != OpARM64MOVDconst {
 10880  			break
 10881  		}
 10882  		c := auxIntToInt64(v_0.AuxInt)
 10883  		ptr := v_1
 10884  		mem := v_2
 10885  		if !(is32Bit(c)) {
 10886  			break
 10887  		}
 10888  		v.reset(OpARM64MOVWUload)
 10889  		v.AuxInt = int32ToAuxInt(int32(c))
 10890  		v.AddArg2(ptr, mem)
 10891  		return true
 10892  	}
 10893  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 10894  	// result: (MOVWUloadidx4 ptr idx mem)
 10895  	for {
 10896  		ptr := v_0
 10897  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 10898  			break
 10899  		}
 10900  		idx := v_1.Args[0]
 10901  		mem := v_2
 10902  		v.reset(OpARM64MOVWUloadidx4)
 10903  		v.AddArg3(ptr, idx, mem)
 10904  		return true
 10905  	}
 10906  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 10907  	// result: (MOVWUloadidx4 ptr idx mem)
 10908  	for {
 10909  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 10910  			break
 10911  		}
 10912  		idx := v_0.Args[0]
 10913  		ptr := v_1
 10914  		mem := v_2
 10915  		v.reset(OpARM64MOVWUloadidx4)
 10916  		v.AddArg3(ptr, idx, mem)
 10917  		return true
 10918  	}
 10919  	return false
 10920  }
 10921  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 10922  	v_2 := v.Args[2]
 10923  	v_1 := v.Args[1]
 10924  	v_0 := v.Args[0]
 10925  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 10926  	// cond: is32Bit(c<<2)
 10927  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 10928  	for {
 10929  		ptr := v_0
 10930  		if v_1.Op != OpARM64MOVDconst {
 10931  			break
 10932  		}
 10933  		c := auxIntToInt64(v_1.AuxInt)
 10934  		mem := v_2
 10935  		if !(is32Bit(c << 2)) {
 10936  			break
 10937  		}
 10938  		v.reset(OpARM64MOVWUload)
 10939  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 10940  		v.AddArg2(ptr, mem)
 10941  		return true
 10942  	}
 10943  	return false
 10944  }
 10945  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 10946  	v_0 := v.Args[0]
 10947  	// match: (MOVWUreg (ANDconst [c] x))
 10948  	// result: (ANDconst [c&(1<<32-1)] x)
 10949  	for {
 10950  		if v_0.Op != OpARM64ANDconst {
 10951  			break
 10952  		}
 10953  		c := auxIntToInt64(v_0.AuxInt)
 10954  		x := v_0.Args[0]
 10955  		v.reset(OpARM64ANDconst)
 10956  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 10957  		v.AddArg(x)
 10958  		return true
 10959  	}
 10960  	// match: (MOVWUreg (MOVDconst [c]))
 10961  	// result: (MOVDconst [int64(uint32(c))])
 10962  	for {
 10963  		if v_0.Op != OpARM64MOVDconst {
 10964  			break
 10965  		}
 10966  		c := auxIntToInt64(v_0.AuxInt)
 10967  		v.reset(OpARM64MOVDconst)
 10968  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10969  		return true
 10970  	}
 10971  	// match: (MOVWUreg x)
 10972  	// cond: v.Type.Size() <= 4
 10973  	// result: x
 10974  	for {
 10975  		x := v_0
 10976  		if !(v.Type.Size() <= 4) {
 10977  			break
 10978  		}
 10979  		v.copyOf(x)
 10980  		return true
 10981  	}
 10982  	// match: (MOVWUreg (SLLconst [lc] x))
 10983  	// cond: lc >= 32
 10984  	// result: (MOVDconst [0])
 10985  	for {
 10986  		if v_0.Op != OpARM64SLLconst {
 10987  			break
 10988  		}
 10989  		lc := auxIntToInt64(v_0.AuxInt)
 10990  		if !(lc >= 32) {
 10991  			break
 10992  		}
 10993  		v.reset(OpARM64MOVDconst)
 10994  		v.AuxInt = int64ToAuxInt(0)
 10995  		return true
 10996  	}
 10997  	// match: (MOVWUreg (SLLconst [lc] x))
 10998  	// cond: lc < 32
 10999  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 11000  	for {
 11001  		if v_0.Op != OpARM64SLLconst {
 11002  			break
 11003  		}
 11004  		lc := auxIntToInt64(v_0.AuxInt)
 11005  		x := v_0.Args[0]
 11006  		if !(lc < 32) {
 11007  			break
 11008  		}
 11009  		v.reset(OpARM64UBFIZ)
 11010  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 11011  		v.AddArg(x)
 11012  		return true
 11013  	}
 11014  	// match: (MOVWUreg (SRLconst [rc] x))
 11015  	// cond: rc < 32
 11016  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 11017  	for {
 11018  		if v_0.Op != OpARM64SRLconst {
 11019  			break
 11020  		}
 11021  		rc := auxIntToInt64(v_0.AuxInt)
 11022  		x := v_0.Args[0]
 11023  		if !(rc < 32) {
 11024  			break
 11025  		}
 11026  		v.reset(OpARM64UBFX)
 11027  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 11028  		v.AddArg(x)
 11029  		return true
 11030  	}
 11031  	// match: (MOVWUreg (UBFX [bfc] x))
 11032  	// cond: bfc.width() <= 32
 11033  	// result: (UBFX [bfc] x)
 11034  	for {
 11035  		if v_0.Op != OpARM64UBFX {
 11036  			break
 11037  		}
 11038  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11039  		x := v_0.Args[0]
 11040  		if !(bfc.width() <= 32) {
 11041  			break
 11042  		}
 11043  		v.reset(OpARM64UBFX)
 11044  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11045  		v.AddArg(x)
 11046  		return true
 11047  	}
 11048  	return false
 11049  }
 11050  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 11051  	v_1 := v.Args[1]
 11052  	v_0 := v.Args[0]
 11053  	b := v.Block
 11054  	config := b.Func.Config
 11055  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 11056  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11057  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 11058  	for {
 11059  		off1 := auxIntToInt32(v.AuxInt)
 11060  		sym := auxToSym(v.Aux)
 11061  		if v_0.Op != OpARM64ADDconst {
 11062  			break
 11063  		}
 11064  		off2 := auxIntToInt64(v_0.AuxInt)
 11065  		ptr := v_0.Args[0]
 11066  		mem := v_1
 11067  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11068  			break
 11069  		}
 11070  		v.reset(OpARM64MOVWload)
 11071  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11072  		v.Aux = symToAux(sym)
 11073  		v.AddArg2(ptr, mem)
 11074  		return true
 11075  	}
 11076  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 11077  	// cond: off == 0 && sym == nil
 11078  	// result: (MOVWloadidx ptr idx mem)
 11079  	for {
 11080  		off := auxIntToInt32(v.AuxInt)
 11081  		sym := auxToSym(v.Aux)
 11082  		if v_0.Op != OpARM64ADD {
 11083  			break
 11084  		}
 11085  		idx := v_0.Args[1]
 11086  		ptr := v_0.Args[0]
 11087  		mem := v_1
 11088  		if !(off == 0 && sym == nil) {
 11089  			break
 11090  		}
 11091  		v.reset(OpARM64MOVWloadidx)
 11092  		v.AddArg3(ptr, idx, mem)
 11093  		return true
 11094  	}
 11095  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 11096  	// cond: off == 0 && sym == nil
 11097  	// result: (MOVWloadidx4 ptr idx mem)
 11098  	for {
 11099  		off := auxIntToInt32(v.AuxInt)
 11100  		sym := auxToSym(v.Aux)
 11101  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11102  			break
 11103  		}
 11104  		idx := v_0.Args[1]
 11105  		ptr := v_0.Args[0]
 11106  		mem := v_1
 11107  		if !(off == 0 && sym == nil) {
 11108  			break
 11109  		}
 11110  		v.reset(OpARM64MOVWloadidx4)
 11111  		v.AddArg3(ptr, idx, mem)
 11112  		return true
 11113  	}
 11114  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11115  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11116  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11117  	for {
 11118  		off1 := auxIntToInt32(v.AuxInt)
 11119  		sym1 := auxToSym(v.Aux)
 11120  		if v_0.Op != OpARM64MOVDaddr {
 11121  			break
 11122  		}
 11123  		off2 := auxIntToInt32(v_0.AuxInt)
 11124  		sym2 := auxToSym(v_0.Aux)
 11125  		ptr := v_0.Args[0]
 11126  		mem := v_1
 11127  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11128  			break
 11129  		}
 11130  		v.reset(OpARM64MOVWload)
 11131  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11132  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11133  		v.AddArg2(ptr, mem)
 11134  		return true
 11135  	}
 11136  	// match: (MOVWload [off] {sym} (SB) _)
 11137  	// cond: symIsRO(sym)
 11138  	// result: (MOVDconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 11139  	for {
 11140  		off := auxIntToInt32(v.AuxInt)
 11141  		sym := auxToSym(v.Aux)
 11142  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11143  			break
 11144  		}
 11145  		v.reset(OpARM64MOVDconst)
 11146  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 11147  		return true
 11148  	}
 11149  	return false
 11150  }
 11151  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 11152  	v_2 := v.Args[2]
 11153  	v_1 := v.Args[1]
 11154  	v_0 := v.Args[0]
 11155  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 11156  	// cond: is32Bit(c)
 11157  	// result: (MOVWload [int32(c)] ptr mem)
 11158  	for {
 11159  		ptr := v_0
 11160  		if v_1.Op != OpARM64MOVDconst {
 11161  			break
 11162  		}
 11163  		c := auxIntToInt64(v_1.AuxInt)
 11164  		mem := v_2
 11165  		if !(is32Bit(c)) {
 11166  			break
 11167  		}
 11168  		v.reset(OpARM64MOVWload)
 11169  		v.AuxInt = int32ToAuxInt(int32(c))
 11170  		v.AddArg2(ptr, mem)
 11171  		return true
 11172  	}
 11173  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 11174  	// cond: is32Bit(c)
 11175  	// result: (MOVWload [int32(c)] ptr mem)
 11176  	for {
 11177  		if v_0.Op != OpARM64MOVDconst {
 11178  			break
 11179  		}
 11180  		c := auxIntToInt64(v_0.AuxInt)
 11181  		ptr := v_1
 11182  		mem := v_2
 11183  		if !(is32Bit(c)) {
 11184  			break
 11185  		}
 11186  		v.reset(OpARM64MOVWload)
 11187  		v.AuxInt = int32ToAuxInt(int32(c))
 11188  		v.AddArg2(ptr, mem)
 11189  		return true
 11190  	}
 11191  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 11192  	// result: (MOVWloadidx4 ptr idx mem)
 11193  	for {
 11194  		ptr := v_0
 11195  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11196  			break
 11197  		}
 11198  		idx := v_1.Args[0]
 11199  		mem := v_2
 11200  		v.reset(OpARM64MOVWloadidx4)
 11201  		v.AddArg3(ptr, idx, mem)
 11202  		return true
 11203  	}
 11204  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 11205  	// result: (MOVWloadidx4 ptr idx mem)
 11206  	for {
 11207  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11208  			break
 11209  		}
 11210  		idx := v_0.Args[0]
 11211  		ptr := v_1
 11212  		mem := v_2
 11213  		v.reset(OpARM64MOVWloadidx4)
 11214  		v.AddArg3(ptr, idx, mem)
 11215  		return true
 11216  	}
 11217  	return false
 11218  }
 11219  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 11220  	v_2 := v.Args[2]
 11221  	v_1 := v.Args[1]
 11222  	v_0 := v.Args[0]
 11223  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 11224  	// cond: is32Bit(c<<2)
 11225  	// result: (MOVWload [int32(c)<<2] ptr mem)
 11226  	for {
 11227  		ptr := v_0
 11228  		if v_1.Op != OpARM64MOVDconst {
 11229  			break
 11230  		}
 11231  		c := auxIntToInt64(v_1.AuxInt)
 11232  		mem := v_2
 11233  		if !(is32Bit(c << 2)) {
 11234  			break
 11235  		}
 11236  		v.reset(OpARM64MOVWload)
 11237  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11238  		v.AddArg2(ptr, mem)
 11239  		return true
 11240  	}
 11241  	return false
 11242  }
 11243  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 11244  	v_0 := v.Args[0]
 11245  	// match: (MOVWreg (MOVDconst [c]))
 11246  	// result: (MOVDconst [int64(int32(c))])
 11247  	for {
 11248  		if v_0.Op != OpARM64MOVDconst {
 11249  			break
 11250  		}
 11251  		c := auxIntToInt64(v_0.AuxInt)
 11252  		v.reset(OpARM64MOVDconst)
 11253  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 11254  		return true
 11255  	}
 11256  	// match: (MOVWreg x)
 11257  	// cond: v.Type.Size() <= 4
 11258  	// result: x
 11259  	for {
 11260  		x := v_0
 11261  		if !(v.Type.Size() <= 4) {
 11262  			break
 11263  		}
 11264  		v.copyOf(x)
 11265  		return true
 11266  	}
 11267  	// match: (MOVWreg <t> (ANDconst x [c]))
 11268  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 11269  	// result: (ANDconst <t> x [c])
 11270  	for {
 11271  		t := v.Type
 11272  		if v_0.Op != OpARM64ANDconst {
 11273  			break
 11274  		}
 11275  		c := auxIntToInt64(v_0.AuxInt)
 11276  		x := v_0.Args[0]
 11277  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 11278  			break
 11279  		}
 11280  		v.reset(OpARM64ANDconst)
 11281  		v.Type = t
 11282  		v.AuxInt = int64ToAuxInt(c)
 11283  		v.AddArg(x)
 11284  		return true
 11285  	}
 11286  	// match: (MOVWreg (SLLconst [lc] x))
 11287  	// cond: lc < 32
 11288  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 11289  	for {
 11290  		if v_0.Op != OpARM64SLLconst {
 11291  			break
 11292  		}
 11293  		lc := auxIntToInt64(v_0.AuxInt)
 11294  		x := v_0.Args[0]
 11295  		if !(lc < 32) {
 11296  			break
 11297  		}
 11298  		v.reset(OpARM64SBFIZ)
 11299  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 11300  		v.AddArg(x)
 11301  		return true
 11302  	}
 11303  	// match: (MOVWreg (SBFX [bfc] x))
 11304  	// cond: bfc.width() <= 32
 11305  	// result: (SBFX [bfc] x)
 11306  	for {
 11307  		if v_0.Op != OpARM64SBFX {
 11308  			break
 11309  		}
 11310  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11311  		x := v_0.Args[0]
 11312  		if !(bfc.width() <= 32) {
 11313  			break
 11314  		}
 11315  		v.reset(OpARM64SBFX)
 11316  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11317  		v.AddArg(x)
 11318  		return true
 11319  	}
 11320  	return false
 11321  }
 11322  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 11323  	v_2 := v.Args[2]
 11324  	v_1 := v.Args[1]
 11325  	v_0 := v.Args[0]
 11326  	b := v.Block
 11327  	config := b.Func.Config
 11328  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 11329  	// result: (FMOVSstore [off] {sym} ptr val mem)
 11330  	for {
 11331  		off := auxIntToInt32(v.AuxInt)
 11332  		sym := auxToSym(v.Aux)
 11333  		ptr := v_0
 11334  		if v_1.Op != OpARM64FMOVSfpgp {
 11335  			break
 11336  		}
 11337  		val := v_1.Args[0]
 11338  		mem := v_2
 11339  		v.reset(OpARM64FMOVSstore)
 11340  		v.AuxInt = int32ToAuxInt(off)
 11341  		v.Aux = symToAux(sym)
 11342  		v.AddArg3(ptr, val, mem)
 11343  		return true
 11344  	}
 11345  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11346  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11347  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 11348  	for {
 11349  		off1 := auxIntToInt32(v.AuxInt)
 11350  		sym := auxToSym(v.Aux)
 11351  		if v_0.Op != OpARM64ADDconst {
 11352  			break
 11353  		}
 11354  		off2 := auxIntToInt64(v_0.AuxInt)
 11355  		ptr := v_0.Args[0]
 11356  		val := v_1
 11357  		mem := v_2
 11358  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11359  			break
 11360  		}
 11361  		v.reset(OpARM64MOVWstore)
 11362  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11363  		v.Aux = symToAux(sym)
 11364  		v.AddArg3(ptr, val, mem)
 11365  		return true
 11366  	}
 11367  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 11368  	// cond: off == 0 && sym == nil
 11369  	// result: (MOVWstoreidx ptr idx val mem)
 11370  	for {
 11371  		off := auxIntToInt32(v.AuxInt)
 11372  		sym := auxToSym(v.Aux)
 11373  		if v_0.Op != OpARM64ADD {
 11374  			break
 11375  		}
 11376  		idx := v_0.Args[1]
 11377  		ptr := v_0.Args[0]
 11378  		val := v_1
 11379  		mem := v_2
 11380  		if !(off == 0 && sym == nil) {
 11381  			break
 11382  		}
 11383  		v.reset(OpARM64MOVWstoreidx)
 11384  		v.AddArg4(ptr, idx, val, mem)
 11385  		return true
 11386  	}
 11387  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 11388  	// cond: off == 0 && sym == nil
 11389  	// result: (MOVWstoreidx4 ptr idx val mem)
 11390  	for {
 11391  		off := auxIntToInt32(v.AuxInt)
 11392  		sym := auxToSym(v.Aux)
 11393  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11394  			break
 11395  		}
 11396  		idx := v_0.Args[1]
 11397  		ptr := v_0.Args[0]
 11398  		val := v_1
 11399  		mem := v_2
 11400  		if !(off == 0 && sym == nil) {
 11401  			break
 11402  		}
 11403  		v.reset(OpARM64MOVWstoreidx4)
 11404  		v.AddArg4(ptr, idx, val, mem)
 11405  		return true
 11406  	}
 11407  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11408  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11409  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11410  	for {
 11411  		off1 := auxIntToInt32(v.AuxInt)
 11412  		sym1 := auxToSym(v.Aux)
 11413  		if v_0.Op != OpARM64MOVDaddr {
 11414  			break
 11415  		}
 11416  		off2 := auxIntToInt32(v_0.AuxInt)
 11417  		sym2 := auxToSym(v_0.Aux)
 11418  		ptr := v_0.Args[0]
 11419  		val := v_1
 11420  		mem := v_2
 11421  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11422  			break
 11423  		}
 11424  		v.reset(OpARM64MOVWstore)
 11425  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11426  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11427  		v.AddArg3(ptr, val, mem)
 11428  		return true
 11429  	}
 11430  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 11431  	// result: (MOVWstore [off] {sym} ptr x mem)
 11432  	for {
 11433  		off := auxIntToInt32(v.AuxInt)
 11434  		sym := auxToSym(v.Aux)
 11435  		ptr := v_0
 11436  		if v_1.Op != OpARM64MOVWreg {
 11437  			break
 11438  		}
 11439  		x := v_1.Args[0]
 11440  		mem := v_2
 11441  		v.reset(OpARM64MOVWstore)
 11442  		v.AuxInt = int32ToAuxInt(off)
 11443  		v.Aux = symToAux(sym)
 11444  		v.AddArg3(ptr, x, mem)
 11445  		return true
 11446  	}
 11447  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 11448  	// result: (MOVWstore [off] {sym} ptr x mem)
 11449  	for {
 11450  		off := auxIntToInt32(v.AuxInt)
 11451  		sym := auxToSym(v.Aux)
 11452  		ptr := v_0
 11453  		if v_1.Op != OpARM64MOVWUreg {
 11454  			break
 11455  		}
 11456  		x := v_1.Args[0]
 11457  		mem := v_2
 11458  		v.reset(OpARM64MOVWstore)
 11459  		v.AuxInt = int32ToAuxInt(off)
 11460  		v.Aux = symToAux(sym)
 11461  		v.AddArg3(ptr, x, mem)
 11462  		return true
 11463  	}
 11464  	return false
 11465  }
 11466  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 11467  	v_3 := v.Args[3]
 11468  	v_2 := v.Args[2]
 11469  	v_1 := v.Args[1]
 11470  	v_0 := v.Args[0]
 11471  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 11472  	// cond: is32Bit(c)
 11473  	// result: (MOVWstore [int32(c)] ptr val mem)
 11474  	for {
 11475  		ptr := v_0
 11476  		if v_1.Op != OpARM64MOVDconst {
 11477  			break
 11478  		}
 11479  		c := auxIntToInt64(v_1.AuxInt)
 11480  		val := v_2
 11481  		mem := v_3
 11482  		if !(is32Bit(c)) {
 11483  			break
 11484  		}
 11485  		v.reset(OpARM64MOVWstore)
 11486  		v.AuxInt = int32ToAuxInt(int32(c))
 11487  		v.AddArg3(ptr, val, mem)
 11488  		return true
 11489  	}
 11490  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 11491  	// cond: is32Bit(c)
 11492  	// result: (MOVWstore [int32(c)] idx val mem)
 11493  	for {
 11494  		if v_0.Op != OpARM64MOVDconst {
 11495  			break
 11496  		}
 11497  		c := auxIntToInt64(v_0.AuxInt)
 11498  		idx := v_1
 11499  		val := v_2
 11500  		mem := v_3
 11501  		if !(is32Bit(c)) {
 11502  			break
 11503  		}
 11504  		v.reset(OpARM64MOVWstore)
 11505  		v.AuxInt = int32ToAuxInt(int32(c))
 11506  		v.AddArg3(idx, val, mem)
 11507  		return true
 11508  	}
 11509  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 11510  	// result: (MOVWstoreidx4 ptr idx val mem)
 11511  	for {
 11512  		ptr := v_0
 11513  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11514  			break
 11515  		}
 11516  		idx := v_1.Args[0]
 11517  		val := v_2
 11518  		mem := v_3
 11519  		v.reset(OpARM64MOVWstoreidx4)
 11520  		v.AddArg4(ptr, idx, val, mem)
 11521  		return true
 11522  	}
 11523  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 11524  	// result: (MOVWstoreidx4 ptr idx val mem)
 11525  	for {
 11526  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11527  			break
 11528  		}
 11529  		idx := v_0.Args[0]
 11530  		ptr := v_1
 11531  		val := v_2
 11532  		mem := v_3
 11533  		v.reset(OpARM64MOVWstoreidx4)
 11534  		v.AddArg4(ptr, idx, val, mem)
 11535  		return true
 11536  	}
 11537  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 11538  	// result: (MOVWstoreidx ptr idx x mem)
 11539  	for {
 11540  		ptr := v_0
 11541  		idx := v_1
 11542  		if v_2.Op != OpARM64MOVWreg {
 11543  			break
 11544  		}
 11545  		x := v_2.Args[0]
 11546  		mem := v_3
 11547  		v.reset(OpARM64MOVWstoreidx)
 11548  		v.AddArg4(ptr, idx, x, mem)
 11549  		return true
 11550  	}
 11551  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 11552  	// result: (MOVWstoreidx ptr idx x mem)
 11553  	for {
 11554  		ptr := v_0
 11555  		idx := v_1
 11556  		if v_2.Op != OpARM64MOVWUreg {
 11557  			break
 11558  		}
 11559  		x := v_2.Args[0]
 11560  		mem := v_3
 11561  		v.reset(OpARM64MOVWstoreidx)
 11562  		v.AddArg4(ptr, idx, x, mem)
 11563  		return true
 11564  	}
 11565  	return false
 11566  }
 11567  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 11568  	v_3 := v.Args[3]
 11569  	v_2 := v.Args[2]
 11570  	v_1 := v.Args[1]
 11571  	v_0 := v.Args[0]
 11572  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 11573  	// cond: is32Bit(c<<2)
 11574  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 11575  	for {
 11576  		ptr := v_0
 11577  		if v_1.Op != OpARM64MOVDconst {
 11578  			break
 11579  		}
 11580  		c := auxIntToInt64(v_1.AuxInt)
 11581  		val := v_2
 11582  		mem := v_3
 11583  		if !(is32Bit(c << 2)) {
 11584  			break
 11585  		}
 11586  		v.reset(OpARM64MOVWstore)
 11587  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11588  		v.AddArg3(ptr, val, mem)
 11589  		return true
 11590  	}
 11591  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 11592  	// result: (MOVWstoreidx4 ptr idx x mem)
 11593  	for {
 11594  		ptr := v_0
 11595  		idx := v_1
 11596  		if v_2.Op != OpARM64MOVWreg {
 11597  			break
 11598  		}
 11599  		x := v_2.Args[0]
 11600  		mem := v_3
 11601  		v.reset(OpARM64MOVWstoreidx4)
 11602  		v.AddArg4(ptr, idx, x, mem)
 11603  		return true
 11604  	}
 11605  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 11606  	// result: (MOVWstoreidx4 ptr idx x mem)
 11607  	for {
 11608  		ptr := v_0
 11609  		idx := v_1
 11610  		if v_2.Op != OpARM64MOVWUreg {
 11611  			break
 11612  		}
 11613  		x := v_2.Args[0]
 11614  		mem := v_3
 11615  		v.reset(OpARM64MOVWstoreidx4)
 11616  		v.AddArg4(ptr, idx, x, mem)
 11617  		return true
 11618  	}
 11619  	return false
 11620  }
 11621  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 11622  	v_2 := v.Args[2]
 11623  	v_1 := v.Args[1]
 11624  	v_0 := v.Args[0]
 11625  	b := v.Block
 11626  	// match: (MSUB a x (MOVDconst [-1]))
 11627  	// result: (ADD a x)
 11628  	for {
 11629  		a := v_0
 11630  		x := v_1
 11631  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 11632  			break
 11633  		}
 11634  		v.reset(OpARM64ADD)
 11635  		v.AddArg2(a, x)
 11636  		return true
 11637  	}
 11638  	// match: (MSUB a _ (MOVDconst [0]))
 11639  	// result: a
 11640  	for {
 11641  		a := v_0
 11642  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 11643  			break
 11644  		}
 11645  		v.copyOf(a)
 11646  		return true
 11647  	}
 11648  	// match: (MSUB a x (MOVDconst [1]))
 11649  	// result: (SUB a x)
 11650  	for {
 11651  		a := v_0
 11652  		x := v_1
 11653  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 11654  			break
 11655  		}
 11656  		v.reset(OpARM64SUB)
 11657  		v.AddArg2(a, x)
 11658  		return true
 11659  	}
 11660  	// match: (MSUB a x (MOVDconst [c]))
 11661  	// cond: isPowerOfTwo(c)
 11662  	// result: (SUBshiftLL a x [log64(c)])
 11663  	for {
 11664  		a := v_0
 11665  		x := v_1
 11666  		if v_2.Op != OpARM64MOVDconst {
 11667  			break
 11668  		}
 11669  		c := auxIntToInt64(v_2.AuxInt)
 11670  		if !(isPowerOfTwo(c)) {
 11671  			break
 11672  		}
 11673  		v.reset(OpARM64SUBshiftLL)
 11674  		v.AuxInt = int64ToAuxInt(log64(c))
 11675  		v.AddArg2(a, x)
 11676  		return true
 11677  	}
 11678  	// match: (MSUB a x (MOVDconst [c]))
 11679  	// cond: isPowerOfTwo(c-1) && c>=3
 11680  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 11681  	for {
 11682  		a := v_0
 11683  		x := v_1
 11684  		if v_2.Op != OpARM64MOVDconst {
 11685  			break
 11686  		}
 11687  		c := auxIntToInt64(v_2.AuxInt)
 11688  		if !(isPowerOfTwo(c-1) && c >= 3) {
 11689  			break
 11690  		}
 11691  		v.reset(OpARM64SUB)
 11692  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11693  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 11694  		v0.AddArg2(x, x)
 11695  		v.AddArg2(a, v0)
 11696  		return true
 11697  	}
 11698  	// match: (MSUB a x (MOVDconst [c]))
 11699  	// cond: isPowerOfTwo(c+1) && c>=7
 11700  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 11701  	for {
 11702  		a := v_0
 11703  		x := v_1
 11704  		if v_2.Op != OpARM64MOVDconst {
 11705  			break
 11706  		}
 11707  		c := auxIntToInt64(v_2.AuxInt)
 11708  		if !(isPowerOfTwo(c+1) && c >= 7) {
 11709  			break
 11710  		}
 11711  		v.reset(OpARM64ADD)
 11712  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11713  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 11714  		v0.AddArg2(x, x)
 11715  		v.AddArg2(a, v0)
 11716  		return true
 11717  	}
 11718  	// match: (MSUB a x (MOVDconst [c]))
 11719  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 11720  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 11721  	for {
 11722  		a := v_0
 11723  		x := v_1
 11724  		if v_2.Op != OpARM64MOVDconst {
 11725  			break
 11726  		}
 11727  		c := auxIntToInt64(v_2.AuxInt)
 11728  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 11729  			break
 11730  		}
 11731  		v.reset(OpARM64ADDshiftLL)
 11732  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 11733  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11734  		v0.AuxInt = int64ToAuxInt(2)
 11735  		v0.AddArg2(x, x)
 11736  		v.AddArg2(a, v0)
 11737  		return true
 11738  	}
 11739  	// match: (MSUB a x (MOVDconst [c]))
 11740  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 11741  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 11742  	for {
 11743  		a := v_0
 11744  		x := v_1
 11745  		if v_2.Op != OpARM64MOVDconst {
 11746  			break
 11747  		}
 11748  		c := auxIntToInt64(v_2.AuxInt)
 11749  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 11750  			break
 11751  		}
 11752  		v.reset(OpARM64SUBshiftLL)
 11753  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 11754  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11755  		v0.AuxInt = int64ToAuxInt(2)
 11756  		v0.AddArg2(x, x)
 11757  		v.AddArg2(a, v0)
 11758  		return true
 11759  	}
 11760  	// match: (MSUB a x (MOVDconst [c]))
 11761  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 11762  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 11763  	for {
 11764  		a := v_0
 11765  		x := v_1
 11766  		if v_2.Op != OpARM64MOVDconst {
 11767  			break
 11768  		}
 11769  		c := auxIntToInt64(v_2.AuxInt)
 11770  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 11771  			break
 11772  		}
 11773  		v.reset(OpARM64ADDshiftLL)
 11774  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 11775  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11776  		v0.AuxInt = int64ToAuxInt(3)
 11777  		v0.AddArg2(x, x)
 11778  		v.AddArg2(a, v0)
 11779  		return true
 11780  	}
 11781  	// match: (MSUB a x (MOVDconst [c]))
 11782  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 11783  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 11784  	for {
 11785  		a := v_0
 11786  		x := v_1
 11787  		if v_2.Op != OpARM64MOVDconst {
 11788  			break
 11789  		}
 11790  		c := auxIntToInt64(v_2.AuxInt)
 11791  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 11792  			break
 11793  		}
 11794  		v.reset(OpARM64SUBshiftLL)
 11795  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 11796  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11797  		v0.AuxInt = int64ToAuxInt(3)
 11798  		v0.AddArg2(x, x)
 11799  		v.AddArg2(a, v0)
 11800  		return true
 11801  	}
 11802  	// match: (MSUB a (MOVDconst [-1]) x)
 11803  	// result: (ADD a x)
 11804  	for {
 11805  		a := v_0
 11806  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 11807  			break
 11808  		}
 11809  		x := v_2
 11810  		v.reset(OpARM64ADD)
 11811  		v.AddArg2(a, x)
 11812  		return true
 11813  	}
 11814  	// match: (MSUB a (MOVDconst [0]) _)
 11815  	// result: a
 11816  	for {
 11817  		a := v_0
 11818  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 11819  			break
 11820  		}
 11821  		v.copyOf(a)
 11822  		return true
 11823  	}
 11824  	// match: (MSUB a (MOVDconst [1]) x)
 11825  	// result: (SUB a x)
 11826  	for {
 11827  		a := v_0
 11828  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11829  			break
 11830  		}
 11831  		x := v_2
 11832  		v.reset(OpARM64SUB)
 11833  		v.AddArg2(a, x)
 11834  		return true
 11835  	}
 11836  	// match: (MSUB a (MOVDconst [c]) x)
 11837  	// cond: isPowerOfTwo(c)
 11838  	// result: (SUBshiftLL a x [log64(c)])
 11839  	for {
 11840  		a := v_0
 11841  		if v_1.Op != OpARM64MOVDconst {
 11842  			break
 11843  		}
 11844  		c := auxIntToInt64(v_1.AuxInt)
 11845  		x := v_2
 11846  		if !(isPowerOfTwo(c)) {
 11847  			break
 11848  		}
 11849  		v.reset(OpARM64SUBshiftLL)
 11850  		v.AuxInt = int64ToAuxInt(log64(c))
 11851  		v.AddArg2(a, x)
 11852  		return true
 11853  	}
 11854  	// match: (MSUB a (MOVDconst [c]) x)
 11855  	// cond: isPowerOfTwo(c-1) && c>=3
 11856  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 11857  	for {
 11858  		a := v_0
 11859  		if v_1.Op != OpARM64MOVDconst {
 11860  			break
 11861  		}
 11862  		c := auxIntToInt64(v_1.AuxInt)
 11863  		x := v_2
 11864  		if !(isPowerOfTwo(c-1) && c >= 3) {
 11865  			break
 11866  		}
 11867  		v.reset(OpARM64SUB)
 11868  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11869  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 11870  		v0.AddArg2(x, x)
 11871  		v.AddArg2(a, v0)
 11872  		return true
 11873  	}
 11874  	// match: (MSUB a (MOVDconst [c]) x)
 11875  	// cond: isPowerOfTwo(c+1) && c>=7
 11876  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 11877  	for {
 11878  		a := v_0
 11879  		if v_1.Op != OpARM64MOVDconst {
 11880  			break
 11881  		}
 11882  		c := auxIntToInt64(v_1.AuxInt)
 11883  		x := v_2
 11884  		if !(isPowerOfTwo(c+1) && c >= 7) {
 11885  			break
 11886  		}
 11887  		v.reset(OpARM64ADD)
 11888  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11889  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 11890  		v0.AddArg2(x, x)
 11891  		v.AddArg2(a, v0)
 11892  		return true
 11893  	}
 11894  	// match: (MSUB a (MOVDconst [c]) x)
 11895  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 11896  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 11897  	for {
 11898  		a := v_0
 11899  		if v_1.Op != OpARM64MOVDconst {
 11900  			break
 11901  		}
 11902  		c := auxIntToInt64(v_1.AuxInt)
 11903  		x := v_2
 11904  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 11905  			break
 11906  		}
 11907  		v.reset(OpARM64ADDshiftLL)
 11908  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 11909  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11910  		v0.AuxInt = int64ToAuxInt(2)
 11911  		v0.AddArg2(x, x)
 11912  		v.AddArg2(a, v0)
 11913  		return true
 11914  	}
 11915  	// match: (MSUB a (MOVDconst [c]) x)
 11916  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 11917  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 11918  	for {
 11919  		a := v_0
 11920  		if v_1.Op != OpARM64MOVDconst {
 11921  			break
 11922  		}
 11923  		c := auxIntToInt64(v_1.AuxInt)
 11924  		x := v_2
 11925  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 11926  			break
 11927  		}
 11928  		v.reset(OpARM64SUBshiftLL)
 11929  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 11930  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11931  		v0.AuxInt = int64ToAuxInt(2)
 11932  		v0.AddArg2(x, x)
 11933  		v.AddArg2(a, v0)
 11934  		return true
 11935  	}
 11936  	// match: (MSUB a (MOVDconst [c]) x)
 11937  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 11938  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 11939  	for {
 11940  		a := v_0
 11941  		if v_1.Op != OpARM64MOVDconst {
 11942  			break
 11943  		}
 11944  		c := auxIntToInt64(v_1.AuxInt)
 11945  		x := v_2
 11946  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 11947  			break
 11948  		}
 11949  		v.reset(OpARM64ADDshiftLL)
 11950  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 11951  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11952  		v0.AuxInt = int64ToAuxInt(3)
 11953  		v0.AddArg2(x, x)
 11954  		v.AddArg2(a, v0)
 11955  		return true
 11956  	}
 11957  	// match: (MSUB a (MOVDconst [c]) x)
 11958  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 11959  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 11960  	for {
 11961  		a := v_0
 11962  		if v_1.Op != OpARM64MOVDconst {
 11963  			break
 11964  		}
 11965  		c := auxIntToInt64(v_1.AuxInt)
 11966  		x := v_2
 11967  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 11968  			break
 11969  		}
 11970  		v.reset(OpARM64SUBshiftLL)
 11971  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 11972  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11973  		v0.AuxInt = int64ToAuxInt(3)
 11974  		v0.AddArg2(x, x)
 11975  		v.AddArg2(a, v0)
 11976  		return true
 11977  	}
 11978  	// match: (MSUB (MOVDconst [c]) x y)
 11979  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 11980  	for {
 11981  		if v_0.Op != OpARM64MOVDconst {
 11982  			break
 11983  		}
 11984  		c := auxIntToInt64(v_0.AuxInt)
 11985  		x := v_1
 11986  		y := v_2
 11987  		v.reset(OpARM64ADDconst)
 11988  		v.AuxInt = int64ToAuxInt(c)
 11989  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 11990  		v0.AddArg2(x, y)
 11991  		v.AddArg(v0)
 11992  		return true
 11993  	}
 11994  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 11995  	// result: (SUBconst [c*d] a)
 11996  	for {
 11997  		a := v_0
 11998  		if v_1.Op != OpARM64MOVDconst {
 11999  			break
 12000  		}
 12001  		c := auxIntToInt64(v_1.AuxInt)
 12002  		if v_2.Op != OpARM64MOVDconst {
 12003  			break
 12004  		}
 12005  		d := auxIntToInt64(v_2.AuxInt)
 12006  		v.reset(OpARM64SUBconst)
 12007  		v.AuxInt = int64ToAuxInt(c * d)
 12008  		v.AddArg(a)
 12009  		return true
 12010  	}
 12011  	return false
 12012  }
 12013  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 12014  	v_2 := v.Args[2]
 12015  	v_1 := v.Args[1]
 12016  	v_0 := v.Args[0]
 12017  	b := v.Block
 12018  	// match: (MSUBW a x (MOVDconst [c]))
 12019  	// cond: int32(c)==-1
 12020  	// result: (MOVWUreg (ADD <a.Type> a x))
 12021  	for {
 12022  		a := v_0
 12023  		x := v_1
 12024  		if v_2.Op != OpARM64MOVDconst {
 12025  			break
 12026  		}
 12027  		c := auxIntToInt64(v_2.AuxInt)
 12028  		if !(int32(c) == -1) {
 12029  			break
 12030  		}
 12031  		v.reset(OpARM64MOVWUreg)
 12032  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12033  		v0.AddArg2(a, x)
 12034  		v.AddArg(v0)
 12035  		return true
 12036  	}
 12037  	// match: (MSUBW a _ (MOVDconst [c]))
 12038  	// cond: int32(c)==0
 12039  	// result: (MOVWUreg a)
 12040  	for {
 12041  		a := v_0
 12042  		if v_2.Op != OpARM64MOVDconst {
 12043  			break
 12044  		}
 12045  		c := auxIntToInt64(v_2.AuxInt)
 12046  		if !(int32(c) == 0) {
 12047  			break
 12048  		}
 12049  		v.reset(OpARM64MOVWUreg)
 12050  		v.AddArg(a)
 12051  		return true
 12052  	}
 12053  	// match: (MSUBW a x (MOVDconst [c]))
 12054  	// cond: int32(c)==1
 12055  	// result: (MOVWUreg (SUB <a.Type> a x))
 12056  	for {
 12057  		a := v_0
 12058  		x := v_1
 12059  		if v_2.Op != OpARM64MOVDconst {
 12060  			break
 12061  		}
 12062  		c := auxIntToInt64(v_2.AuxInt)
 12063  		if !(int32(c) == 1) {
 12064  			break
 12065  		}
 12066  		v.reset(OpARM64MOVWUreg)
 12067  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12068  		v0.AddArg2(a, x)
 12069  		v.AddArg(v0)
 12070  		return true
 12071  	}
 12072  	// match: (MSUBW a x (MOVDconst [c]))
 12073  	// cond: isPowerOfTwo(c)
 12074  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 12075  	for {
 12076  		a := v_0
 12077  		x := v_1
 12078  		if v_2.Op != OpARM64MOVDconst {
 12079  			break
 12080  		}
 12081  		c := auxIntToInt64(v_2.AuxInt)
 12082  		if !(isPowerOfTwo(c)) {
 12083  			break
 12084  		}
 12085  		v.reset(OpARM64MOVWUreg)
 12086  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12087  		v0.AuxInt = int64ToAuxInt(log64(c))
 12088  		v0.AddArg2(a, x)
 12089  		v.AddArg(v0)
 12090  		return true
 12091  	}
 12092  	// match: (MSUBW a x (MOVDconst [c]))
 12093  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 12094  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 12095  	for {
 12096  		a := v_0
 12097  		x := v_1
 12098  		if v_2.Op != OpARM64MOVDconst {
 12099  			break
 12100  		}
 12101  		c := auxIntToInt64(v_2.AuxInt)
 12102  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 12103  			break
 12104  		}
 12105  		v.reset(OpARM64MOVWUreg)
 12106  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12107  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12108  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 12109  		v1.AddArg2(x, x)
 12110  		v0.AddArg2(a, v1)
 12111  		v.AddArg(v0)
 12112  		return true
 12113  	}
 12114  	// match: (MSUBW a x (MOVDconst [c]))
 12115  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 12116  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 12117  	for {
 12118  		a := v_0
 12119  		x := v_1
 12120  		if v_2.Op != OpARM64MOVDconst {
 12121  			break
 12122  		}
 12123  		c := auxIntToInt64(v_2.AuxInt)
 12124  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 12125  			break
 12126  		}
 12127  		v.reset(OpARM64MOVWUreg)
 12128  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12129  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12130  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 12131  		v1.AddArg2(x, x)
 12132  		v0.AddArg2(a, v1)
 12133  		v.AddArg(v0)
 12134  		return true
 12135  	}
 12136  	// match: (MSUBW a x (MOVDconst [c]))
 12137  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 12138  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 12139  	for {
 12140  		a := v_0
 12141  		x := v_1
 12142  		if v_2.Op != OpARM64MOVDconst {
 12143  			break
 12144  		}
 12145  		c := auxIntToInt64(v_2.AuxInt)
 12146  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12147  			break
 12148  		}
 12149  		v.reset(OpARM64MOVWUreg)
 12150  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12151  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12152  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12153  		v1.AuxInt = int64ToAuxInt(2)
 12154  		v1.AddArg2(x, x)
 12155  		v0.AddArg2(a, v1)
 12156  		v.AddArg(v0)
 12157  		return true
 12158  	}
 12159  	// match: (MSUBW a x (MOVDconst [c]))
 12160  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12161  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12162  	for {
 12163  		a := v_0
 12164  		x := v_1
 12165  		if v_2.Op != OpARM64MOVDconst {
 12166  			break
 12167  		}
 12168  		c := auxIntToInt64(v_2.AuxInt)
 12169  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12170  			break
 12171  		}
 12172  		v.reset(OpARM64MOVWUreg)
 12173  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12174  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12175  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12176  		v1.AuxInt = int64ToAuxInt(2)
 12177  		v1.AddArg2(x, x)
 12178  		v0.AddArg2(a, v1)
 12179  		v.AddArg(v0)
 12180  		return true
 12181  	}
 12182  	// match: (MSUBW a x (MOVDconst [c]))
 12183  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12184  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12185  	for {
 12186  		a := v_0
 12187  		x := v_1
 12188  		if v_2.Op != OpARM64MOVDconst {
 12189  			break
 12190  		}
 12191  		c := auxIntToInt64(v_2.AuxInt)
 12192  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12193  			break
 12194  		}
 12195  		v.reset(OpARM64MOVWUreg)
 12196  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12197  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12198  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12199  		v1.AuxInt = int64ToAuxInt(3)
 12200  		v1.AddArg2(x, x)
 12201  		v0.AddArg2(a, v1)
 12202  		v.AddArg(v0)
 12203  		return true
 12204  	}
 12205  	// match: (MSUBW a x (MOVDconst [c]))
 12206  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12207  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12208  	for {
 12209  		a := v_0
 12210  		x := v_1
 12211  		if v_2.Op != OpARM64MOVDconst {
 12212  			break
 12213  		}
 12214  		c := auxIntToInt64(v_2.AuxInt)
 12215  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12216  			break
 12217  		}
 12218  		v.reset(OpARM64MOVWUreg)
 12219  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12220  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12221  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12222  		v1.AuxInt = int64ToAuxInt(3)
 12223  		v1.AddArg2(x, x)
 12224  		v0.AddArg2(a, v1)
 12225  		v.AddArg(v0)
 12226  		return true
 12227  	}
 12228  	// match: (MSUBW a (MOVDconst [c]) x)
 12229  	// cond: int32(c)==-1
 12230  	// result: (MOVWUreg (ADD <a.Type> a x))
 12231  	for {
 12232  		a := v_0
 12233  		if v_1.Op != OpARM64MOVDconst {
 12234  			break
 12235  		}
 12236  		c := auxIntToInt64(v_1.AuxInt)
 12237  		x := v_2
 12238  		if !(int32(c) == -1) {
 12239  			break
 12240  		}
 12241  		v.reset(OpARM64MOVWUreg)
 12242  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12243  		v0.AddArg2(a, x)
 12244  		v.AddArg(v0)
 12245  		return true
 12246  	}
 12247  	// match: (MSUBW a (MOVDconst [c]) _)
 12248  	// cond: int32(c)==0
 12249  	// result: (MOVWUreg a)
 12250  	for {
 12251  		a := v_0
 12252  		if v_1.Op != OpARM64MOVDconst {
 12253  			break
 12254  		}
 12255  		c := auxIntToInt64(v_1.AuxInt)
 12256  		if !(int32(c) == 0) {
 12257  			break
 12258  		}
 12259  		v.reset(OpARM64MOVWUreg)
 12260  		v.AddArg(a)
 12261  		return true
 12262  	}
 12263  	// match: (MSUBW a (MOVDconst [c]) x)
 12264  	// cond: int32(c)==1
 12265  	// result: (MOVWUreg (SUB <a.Type> a x))
 12266  	for {
 12267  		a := v_0
 12268  		if v_1.Op != OpARM64MOVDconst {
 12269  			break
 12270  		}
 12271  		c := auxIntToInt64(v_1.AuxInt)
 12272  		x := v_2
 12273  		if !(int32(c) == 1) {
 12274  			break
 12275  		}
 12276  		v.reset(OpARM64MOVWUreg)
 12277  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12278  		v0.AddArg2(a, x)
 12279  		v.AddArg(v0)
 12280  		return true
 12281  	}
 12282  	// match: (MSUBW a (MOVDconst [c]) x)
 12283  	// cond: isPowerOfTwo(c)
 12284  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 12285  	for {
 12286  		a := v_0
 12287  		if v_1.Op != OpARM64MOVDconst {
 12288  			break
 12289  		}
 12290  		c := auxIntToInt64(v_1.AuxInt)
 12291  		x := v_2
 12292  		if !(isPowerOfTwo(c)) {
 12293  			break
 12294  		}
 12295  		v.reset(OpARM64MOVWUreg)
 12296  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12297  		v0.AuxInt = int64ToAuxInt(log64(c))
 12298  		v0.AddArg2(a, x)
 12299  		v.AddArg(v0)
 12300  		return true
 12301  	}
 12302  	// match: (MSUBW a (MOVDconst [c]) x)
 12303  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 12304  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 12305  	for {
 12306  		a := v_0
 12307  		if v_1.Op != OpARM64MOVDconst {
 12308  			break
 12309  		}
 12310  		c := auxIntToInt64(v_1.AuxInt)
 12311  		x := v_2
 12312  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 12313  			break
 12314  		}
 12315  		v.reset(OpARM64MOVWUreg)
 12316  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12317  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12318  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 12319  		v1.AddArg2(x, x)
 12320  		v0.AddArg2(a, v1)
 12321  		v.AddArg(v0)
 12322  		return true
 12323  	}
 12324  	// match: (MSUBW a (MOVDconst [c]) x)
 12325  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 12326  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 12327  	for {
 12328  		a := v_0
 12329  		if v_1.Op != OpARM64MOVDconst {
 12330  			break
 12331  		}
 12332  		c := auxIntToInt64(v_1.AuxInt)
 12333  		x := v_2
 12334  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 12335  			break
 12336  		}
 12337  		v.reset(OpARM64MOVWUreg)
 12338  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12339  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12340  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 12341  		v1.AddArg2(x, x)
 12342  		v0.AddArg2(a, v1)
 12343  		v.AddArg(v0)
 12344  		return true
 12345  	}
 12346  	// match: (MSUBW a (MOVDconst [c]) x)
 12347  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 12348  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 12349  	for {
 12350  		a := v_0
 12351  		if v_1.Op != OpARM64MOVDconst {
 12352  			break
 12353  		}
 12354  		c := auxIntToInt64(v_1.AuxInt)
 12355  		x := v_2
 12356  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12357  			break
 12358  		}
 12359  		v.reset(OpARM64MOVWUreg)
 12360  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12361  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12362  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12363  		v1.AuxInt = int64ToAuxInt(2)
 12364  		v1.AddArg2(x, x)
 12365  		v0.AddArg2(a, v1)
 12366  		v.AddArg(v0)
 12367  		return true
 12368  	}
 12369  	// match: (MSUBW a (MOVDconst [c]) x)
 12370  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12371  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12372  	for {
 12373  		a := v_0
 12374  		if v_1.Op != OpARM64MOVDconst {
 12375  			break
 12376  		}
 12377  		c := auxIntToInt64(v_1.AuxInt)
 12378  		x := v_2
 12379  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12380  			break
 12381  		}
 12382  		v.reset(OpARM64MOVWUreg)
 12383  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12384  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12385  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12386  		v1.AuxInt = int64ToAuxInt(2)
 12387  		v1.AddArg2(x, x)
 12388  		v0.AddArg2(a, v1)
 12389  		v.AddArg(v0)
 12390  		return true
 12391  	}
 12392  	// match: (MSUBW a (MOVDconst [c]) x)
 12393  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12394  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12395  	for {
 12396  		a := v_0
 12397  		if v_1.Op != OpARM64MOVDconst {
 12398  			break
 12399  		}
 12400  		c := auxIntToInt64(v_1.AuxInt)
 12401  		x := v_2
 12402  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12403  			break
 12404  		}
 12405  		v.reset(OpARM64MOVWUreg)
 12406  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12407  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12408  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12409  		v1.AuxInt = int64ToAuxInt(3)
 12410  		v1.AddArg2(x, x)
 12411  		v0.AddArg2(a, v1)
 12412  		v.AddArg(v0)
 12413  		return true
 12414  	}
 12415  	// match: (MSUBW a (MOVDconst [c]) x)
 12416  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12417  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12418  	for {
 12419  		a := v_0
 12420  		if v_1.Op != OpARM64MOVDconst {
 12421  			break
 12422  		}
 12423  		c := auxIntToInt64(v_1.AuxInt)
 12424  		x := v_2
 12425  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12426  			break
 12427  		}
 12428  		v.reset(OpARM64MOVWUreg)
 12429  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12430  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12431  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12432  		v1.AuxInt = int64ToAuxInt(3)
 12433  		v1.AddArg2(x, x)
 12434  		v0.AddArg2(a, v1)
 12435  		v.AddArg(v0)
 12436  		return true
 12437  	}
 12438  	// match: (MSUBW (MOVDconst [c]) x y)
 12439  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 12440  	for {
 12441  		if v_0.Op != OpARM64MOVDconst {
 12442  			break
 12443  		}
 12444  		c := auxIntToInt64(v_0.AuxInt)
 12445  		x := v_1
 12446  		y := v_2
 12447  		v.reset(OpARM64MOVWUreg)
 12448  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 12449  		v0.AuxInt = int64ToAuxInt(c)
 12450  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 12451  		v1.AddArg2(x, y)
 12452  		v0.AddArg(v1)
 12453  		v.AddArg(v0)
 12454  		return true
 12455  	}
 12456  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 12457  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 12458  	for {
 12459  		a := v_0
 12460  		if v_1.Op != OpARM64MOVDconst {
 12461  			break
 12462  		}
 12463  		c := auxIntToInt64(v_1.AuxInt)
 12464  		if v_2.Op != OpARM64MOVDconst {
 12465  			break
 12466  		}
 12467  		d := auxIntToInt64(v_2.AuxInt)
 12468  		v.reset(OpARM64MOVWUreg)
 12469  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 12470  		v0.AuxInt = int64ToAuxInt(c * d)
 12471  		v0.AddArg(a)
 12472  		v.AddArg(v0)
 12473  		return true
 12474  	}
 12475  	return false
 12476  }
 12477  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 12478  	v_1 := v.Args[1]
 12479  	v_0 := v.Args[0]
 12480  	b := v.Block
 12481  	config := b.Func.Config
 12482  	// match: (MUL (NEG x) y)
 12483  	// result: (MNEG x y)
 12484  	for {
 12485  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12486  			if v_0.Op != OpARM64NEG {
 12487  				continue
 12488  			}
 12489  			x := v_0.Args[0]
 12490  			y := v_1
 12491  			v.reset(OpARM64MNEG)
 12492  			v.AddArg2(x, y)
 12493  			return true
 12494  		}
 12495  		break
 12496  	}
 12497  	// match: (MUL _ (MOVDconst [0]))
 12498  	// result: (MOVDconst [0])
 12499  	for {
 12500  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12501  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 12502  				continue
 12503  			}
 12504  			v.reset(OpARM64MOVDconst)
 12505  			v.AuxInt = int64ToAuxInt(0)
 12506  			return true
 12507  		}
 12508  		break
 12509  	}
 12510  	// match: (MUL x (MOVDconst [1]))
 12511  	// result: x
 12512  	for {
 12513  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12514  			x := v_0
 12515  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12516  				continue
 12517  			}
 12518  			v.copyOf(x)
 12519  			return true
 12520  		}
 12521  		break
 12522  	}
 12523  	// match: (MUL x (MOVDconst [c]))
 12524  	// cond: canMulStrengthReduce(config, c)
 12525  	// result: {mulStrengthReduce(v, x, c)}
 12526  	for {
 12527  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12528  			x := v_0
 12529  			if v_1.Op != OpARM64MOVDconst {
 12530  				continue
 12531  			}
 12532  			c := auxIntToInt64(v_1.AuxInt)
 12533  			if !(canMulStrengthReduce(config, c)) {
 12534  				continue
 12535  			}
 12536  			v.copyOf(mulStrengthReduce(v, x, c))
 12537  			return true
 12538  		}
 12539  		break
 12540  	}
 12541  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 12542  	// result: (MOVDconst [c*d])
 12543  	for {
 12544  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12545  			if v_0.Op != OpARM64MOVDconst {
 12546  				continue
 12547  			}
 12548  			c := auxIntToInt64(v_0.AuxInt)
 12549  			if v_1.Op != OpARM64MOVDconst {
 12550  				continue
 12551  			}
 12552  			d := auxIntToInt64(v_1.AuxInt)
 12553  			v.reset(OpARM64MOVDconst)
 12554  			v.AuxInt = int64ToAuxInt(c * d)
 12555  			return true
 12556  		}
 12557  		break
 12558  	}
 12559  	return false
 12560  }
 12561  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 12562  	v_1 := v.Args[1]
 12563  	v_0 := v.Args[0]
 12564  	b := v.Block
 12565  	config := b.Func.Config
 12566  	// match: (MULW (NEG x) y)
 12567  	// result: (MNEGW x y)
 12568  	for {
 12569  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12570  			if v_0.Op != OpARM64NEG {
 12571  				continue
 12572  			}
 12573  			x := v_0.Args[0]
 12574  			y := v_1
 12575  			v.reset(OpARM64MNEGW)
 12576  			v.AddArg2(x, y)
 12577  			return true
 12578  		}
 12579  		break
 12580  	}
 12581  	// match: (MULW _ (MOVDconst [c]))
 12582  	// cond: int32(c)==0
 12583  	// result: (MOVDconst [0])
 12584  	for {
 12585  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12586  			if v_1.Op != OpARM64MOVDconst {
 12587  				continue
 12588  			}
 12589  			c := auxIntToInt64(v_1.AuxInt)
 12590  			if !(int32(c) == 0) {
 12591  				continue
 12592  			}
 12593  			v.reset(OpARM64MOVDconst)
 12594  			v.AuxInt = int64ToAuxInt(0)
 12595  			return true
 12596  		}
 12597  		break
 12598  	}
 12599  	// match: (MULW x (MOVDconst [c]))
 12600  	// cond: int32(c)==1
 12601  	// result: (MOVWUreg x)
 12602  	for {
 12603  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12604  			x := v_0
 12605  			if v_1.Op != OpARM64MOVDconst {
 12606  				continue
 12607  			}
 12608  			c := auxIntToInt64(v_1.AuxInt)
 12609  			if !(int32(c) == 1) {
 12610  				continue
 12611  			}
 12612  			v.reset(OpARM64MOVWUreg)
 12613  			v.AddArg(x)
 12614  			return true
 12615  		}
 12616  		break
 12617  	}
 12618  	// match: (MULW x (MOVDconst [c]))
 12619  	// cond: v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))
 12620  	// result: {mulStrengthReduce32(v, x, int32(c))}
 12621  	for {
 12622  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12623  			x := v_0
 12624  			if v_1.Op != OpARM64MOVDconst {
 12625  				continue
 12626  			}
 12627  			c := auxIntToInt64(v_1.AuxInt)
 12628  			if !(v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))) {
 12629  				continue
 12630  			}
 12631  			v.copyOf(mulStrengthReduce32(v, x, int32(c)))
 12632  			return true
 12633  		}
 12634  		break
 12635  	}
 12636  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 12637  	// result: (MOVDconst [int64(uint32(c*d))])
 12638  	for {
 12639  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12640  			if v_0.Op != OpARM64MOVDconst {
 12641  				continue
 12642  			}
 12643  			c := auxIntToInt64(v_0.AuxInt)
 12644  			if v_1.Op != OpARM64MOVDconst {
 12645  				continue
 12646  			}
 12647  			d := auxIntToInt64(v_1.AuxInt)
 12648  			v.reset(OpARM64MOVDconst)
 12649  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 12650  			return true
 12651  		}
 12652  		break
 12653  	}
 12654  	return false
 12655  }
 12656  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 12657  	v_0 := v.Args[0]
 12658  	// match: (MVN (XOR x y))
 12659  	// result: (EON x y)
 12660  	for {
 12661  		if v_0.Op != OpARM64XOR {
 12662  			break
 12663  		}
 12664  		y := v_0.Args[1]
 12665  		x := v_0.Args[0]
 12666  		v.reset(OpARM64EON)
 12667  		v.AddArg2(x, y)
 12668  		return true
 12669  	}
 12670  	// match: (MVN (MOVDconst [c]))
 12671  	// result: (MOVDconst [^c])
 12672  	for {
 12673  		if v_0.Op != OpARM64MOVDconst {
 12674  			break
 12675  		}
 12676  		c := auxIntToInt64(v_0.AuxInt)
 12677  		v.reset(OpARM64MOVDconst)
 12678  		v.AuxInt = int64ToAuxInt(^c)
 12679  		return true
 12680  	}
 12681  	// match: (MVN x:(SLLconst [c] y))
 12682  	// cond: clobberIfDead(x)
 12683  	// result: (MVNshiftLL [c] y)
 12684  	for {
 12685  		x := v_0
 12686  		if x.Op != OpARM64SLLconst {
 12687  			break
 12688  		}
 12689  		c := auxIntToInt64(x.AuxInt)
 12690  		y := x.Args[0]
 12691  		if !(clobberIfDead(x)) {
 12692  			break
 12693  		}
 12694  		v.reset(OpARM64MVNshiftLL)
 12695  		v.AuxInt = int64ToAuxInt(c)
 12696  		v.AddArg(y)
 12697  		return true
 12698  	}
 12699  	// match: (MVN x:(SRLconst [c] y))
 12700  	// cond: clobberIfDead(x)
 12701  	// result: (MVNshiftRL [c] y)
 12702  	for {
 12703  		x := v_0
 12704  		if x.Op != OpARM64SRLconst {
 12705  			break
 12706  		}
 12707  		c := auxIntToInt64(x.AuxInt)
 12708  		y := x.Args[0]
 12709  		if !(clobberIfDead(x)) {
 12710  			break
 12711  		}
 12712  		v.reset(OpARM64MVNshiftRL)
 12713  		v.AuxInt = int64ToAuxInt(c)
 12714  		v.AddArg(y)
 12715  		return true
 12716  	}
 12717  	// match: (MVN x:(SRAconst [c] y))
 12718  	// cond: clobberIfDead(x)
 12719  	// result: (MVNshiftRA [c] y)
 12720  	for {
 12721  		x := v_0
 12722  		if x.Op != OpARM64SRAconst {
 12723  			break
 12724  		}
 12725  		c := auxIntToInt64(x.AuxInt)
 12726  		y := x.Args[0]
 12727  		if !(clobberIfDead(x)) {
 12728  			break
 12729  		}
 12730  		v.reset(OpARM64MVNshiftRA)
 12731  		v.AuxInt = int64ToAuxInt(c)
 12732  		v.AddArg(y)
 12733  		return true
 12734  	}
 12735  	// match: (MVN x:(RORconst [c] y))
 12736  	// cond: clobberIfDead(x)
 12737  	// result: (MVNshiftRO [c] y)
 12738  	for {
 12739  		x := v_0
 12740  		if x.Op != OpARM64RORconst {
 12741  			break
 12742  		}
 12743  		c := auxIntToInt64(x.AuxInt)
 12744  		y := x.Args[0]
 12745  		if !(clobberIfDead(x)) {
 12746  			break
 12747  		}
 12748  		v.reset(OpARM64MVNshiftRO)
 12749  		v.AuxInt = int64ToAuxInt(c)
 12750  		v.AddArg(y)
 12751  		return true
 12752  	}
 12753  	return false
 12754  }
 12755  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 12756  	v_0 := v.Args[0]
 12757  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 12758  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 12759  	for {
 12760  		d := auxIntToInt64(v.AuxInt)
 12761  		if v_0.Op != OpARM64MOVDconst {
 12762  			break
 12763  		}
 12764  		c := auxIntToInt64(v_0.AuxInt)
 12765  		v.reset(OpARM64MOVDconst)
 12766  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 12767  		return true
 12768  	}
 12769  	return false
 12770  }
 12771  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 12772  	v_0 := v.Args[0]
 12773  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 12774  	// result: (MOVDconst [^(c>>uint64(d))])
 12775  	for {
 12776  		d := auxIntToInt64(v.AuxInt)
 12777  		if v_0.Op != OpARM64MOVDconst {
 12778  			break
 12779  		}
 12780  		c := auxIntToInt64(v_0.AuxInt)
 12781  		v.reset(OpARM64MOVDconst)
 12782  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 12783  		return true
 12784  	}
 12785  	return false
 12786  }
 12787  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 12788  	v_0 := v.Args[0]
 12789  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 12790  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 12791  	for {
 12792  		d := auxIntToInt64(v.AuxInt)
 12793  		if v_0.Op != OpARM64MOVDconst {
 12794  			break
 12795  		}
 12796  		c := auxIntToInt64(v_0.AuxInt)
 12797  		v.reset(OpARM64MOVDconst)
 12798  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 12799  		return true
 12800  	}
 12801  	return false
 12802  }
 12803  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 12804  	v_0 := v.Args[0]
 12805  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 12806  	// result: (MOVDconst [^rotateRight64(c, d)])
 12807  	for {
 12808  		d := auxIntToInt64(v.AuxInt)
 12809  		if v_0.Op != OpARM64MOVDconst {
 12810  			break
 12811  		}
 12812  		c := auxIntToInt64(v_0.AuxInt)
 12813  		v.reset(OpARM64MOVDconst)
 12814  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 12815  		return true
 12816  	}
 12817  	return false
 12818  }
 12819  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 12820  	v_0 := v.Args[0]
 12821  	// match: (NEG (MUL x y))
 12822  	// result: (MNEG x y)
 12823  	for {
 12824  		if v_0.Op != OpARM64MUL {
 12825  			break
 12826  		}
 12827  		y := v_0.Args[1]
 12828  		x := v_0.Args[0]
 12829  		v.reset(OpARM64MNEG)
 12830  		v.AddArg2(x, y)
 12831  		return true
 12832  	}
 12833  	// match: (NEG (MULW x y))
 12834  	// cond: v.Type.Size() <= 4
 12835  	// result: (MNEGW x y)
 12836  	for {
 12837  		if v_0.Op != OpARM64MULW {
 12838  			break
 12839  		}
 12840  		y := v_0.Args[1]
 12841  		x := v_0.Args[0]
 12842  		if !(v.Type.Size() <= 4) {
 12843  			break
 12844  		}
 12845  		v.reset(OpARM64MNEGW)
 12846  		v.AddArg2(x, y)
 12847  		return true
 12848  	}
 12849  	// match: (NEG (SUB x y))
 12850  	// result: (SUB y x)
 12851  	for {
 12852  		if v_0.Op != OpARM64SUB {
 12853  			break
 12854  		}
 12855  		y := v_0.Args[1]
 12856  		x := v_0.Args[0]
 12857  		v.reset(OpARM64SUB)
 12858  		v.AddArg2(y, x)
 12859  		return true
 12860  	}
 12861  	// match: (NEG (NEG x))
 12862  	// result: x
 12863  	for {
 12864  		if v_0.Op != OpARM64NEG {
 12865  			break
 12866  		}
 12867  		x := v_0.Args[0]
 12868  		v.copyOf(x)
 12869  		return true
 12870  	}
 12871  	// match: (NEG (MOVDconst [c]))
 12872  	// result: (MOVDconst [-c])
 12873  	for {
 12874  		if v_0.Op != OpARM64MOVDconst {
 12875  			break
 12876  		}
 12877  		c := auxIntToInt64(v_0.AuxInt)
 12878  		v.reset(OpARM64MOVDconst)
 12879  		v.AuxInt = int64ToAuxInt(-c)
 12880  		return true
 12881  	}
 12882  	// match: (NEG x:(SLLconst [c] y))
 12883  	// cond: clobberIfDead(x)
 12884  	// result: (NEGshiftLL [c] y)
 12885  	for {
 12886  		x := v_0
 12887  		if x.Op != OpARM64SLLconst {
 12888  			break
 12889  		}
 12890  		c := auxIntToInt64(x.AuxInt)
 12891  		y := x.Args[0]
 12892  		if !(clobberIfDead(x)) {
 12893  			break
 12894  		}
 12895  		v.reset(OpARM64NEGshiftLL)
 12896  		v.AuxInt = int64ToAuxInt(c)
 12897  		v.AddArg(y)
 12898  		return true
 12899  	}
 12900  	// match: (NEG x:(SRLconst [c] y))
 12901  	// cond: clobberIfDead(x)
 12902  	// result: (NEGshiftRL [c] y)
 12903  	for {
 12904  		x := v_0
 12905  		if x.Op != OpARM64SRLconst {
 12906  			break
 12907  		}
 12908  		c := auxIntToInt64(x.AuxInt)
 12909  		y := x.Args[0]
 12910  		if !(clobberIfDead(x)) {
 12911  			break
 12912  		}
 12913  		v.reset(OpARM64NEGshiftRL)
 12914  		v.AuxInt = int64ToAuxInt(c)
 12915  		v.AddArg(y)
 12916  		return true
 12917  	}
 12918  	// match: (NEG x:(SRAconst [c] y))
 12919  	// cond: clobberIfDead(x)
 12920  	// result: (NEGshiftRA [c] y)
 12921  	for {
 12922  		x := v_0
 12923  		if x.Op != OpARM64SRAconst {
 12924  			break
 12925  		}
 12926  		c := auxIntToInt64(x.AuxInt)
 12927  		y := x.Args[0]
 12928  		if !(clobberIfDead(x)) {
 12929  			break
 12930  		}
 12931  		v.reset(OpARM64NEGshiftRA)
 12932  		v.AuxInt = int64ToAuxInt(c)
 12933  		v.AddArg(y)
 12934  		return true
 12935  	}
 12936  	return false
 12937  }
 12938  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 12939  	v_0 := v.Args[0]
 12940  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 12941  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 12942  	for {
 12943  		d := auxIntToInt64(v.AuxInt)
 12944  		if v_0.Op != OpARM64MOVDconst {
 12945  			break
 12946  		}
 12947  		c := auxIntToInt64(v_0.AuxInt)
 12948  		v.reset(OpARM64MOVDconst)
 12949  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 12950  		return true
 12951  	}
 12952  	return false
 12953  }
 12954  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 12955  	v_0 := v.Args[0]
 12956  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 12957  	// result: (MOVDconst [-(c>>uint64(d))])
 12958  	for {
 12959  		d := auxIntToInt64(v.AuxInt)
 12960  		if v_0.Op != OpARM64MOVDconst {
 12961  			break
 12962  		}
 12963  		c := auxIntToInt64(v_0.AuxInt)
 12964  		v.reset(OpARM64MOVDconst)
 12965  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 12966  		return true
 12967  	}
 12968  	return false
 12969  }
 12970  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 12971  	v_0 := v.Args[0]
 12972  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 12973  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 12974  	for {
 12975  		d := auxIntToInt64(v.AuxInt)
 12976  		if v_0.Op != OpARM64MOVDconst {
 12977  			break
 12978  		}
 12979  		c := auxIntToInt64(v_0.AuxInt)
 12980  		v.reset(OpARM64MOVDconst)
 12981  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 12982  		return true
 12983  	}
 12984  	return false
 12985  }
 12986  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 12987  	v_0 := v.Args[0]
 12988  	b := v.Block
 12989  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 12990  	// cond: z.Uses == 1
 12991  	// result: (NotEqual (TST x y))
 12992  	for {
 12993  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 12994  			break
 12995  		}
 12996  		z := v_0.Args[0]
 12997  		if z.Op != OpARM64AND {
 12998  			break
 12999  		}
 13000  		y := z.Args[1]
 13001  		x := z.Args[0]
 13002  		if !(z.Uses == 1) {
 13003  			break
 13004  		}
 13005  		v.reset(OpARM64NotEqual)
 13006  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 13007  		v0.AddArg2(x, y)
 13008  		v.AddArg(v0)
 13009  		return true
 13010  	}
 13011  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 13012  	// cond: x.Uses == 1
 13013  	// result: (NotEqual (TSTWconst [int32(c)] y))
 13014  	for {
 13015  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13016  			break
 13017  		}
 13018  		x := v_0.Args[0]
 13019  		if x.Op != OpARM64ANDconst {
 13020  			break
 13021  		}
 13022  		c := auxIntToInt64(x.AuxInt)
 13023  		y := x.Args[0]
 13024  		if !(x.Uses == 1) {
 13025  			break
 13026  		}
 13027  		v.reset(OpARM64NotEqual)
 13028  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 13029  		v0.AuxInt = int32ToAuxInt(int32(c))
 13030  		v0.AddArg(y)
 13031  		v.AddArg(v0)
 13032  		return true
 13033  	}
 13034  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 13035  	// cond: z.Uses == 1
 13036  	// result: (NotEqual (TSTW x y))
 13037  	for {
 13038  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13039  			break
 13040  		}
 13041  		z := v_0.Args[0]
 13042  		if z.Op != OpARM64AND {
 13043  			break
 13044  		}
 13045  		y := z.Args[1]
 13046  		x := z.Args[0]
 13047  		if !(z.Uses == 1) {
 13048  			break
 13049  		}
 13050  		v.reset(OpARM64NotEqual)
 13051  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 13052  		v0.AddArg2(x, y)
 13053  		v.AddArg(v0)
 13054  		return true
 13055  	}
 13056  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 13057  	// cond: x.Uses == 1
 13058  	// result: (NotEqual (TSTconst [c] y))
 13059  	for {
 13060  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13061  			break
 13062  		}
 13063  		x := v_0.Args[0]
 13064  		if x.Op != OpARM64ANDconst {
 13065  			break
 13066  		}
 13067  		c := auxIntToInt64(x.AuxInt)
 13068  		y := x.Args[0]
 13069  		if !(x.Uses == 1) {
 13070  			break
 13071  		}
 13072  		v.reset(OpARM64NotEqual)
 13073  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 13074  		v0.AuxInt = int64ToAuxInt(c)
 13075  		v0.AddArg(y)
 13076  		v.AddArg(v0)
 13077  		return true
 13078  	}
 13079  	// match: (NotEqual (CMP x z:(NEG y)))
 13080  	// cond: z.Uses == 1
 13081  	// result: (NotEqual (CMN x y))
 13082  	for {
 13083  		if v_0.Op != OpARM64CMP {
 13084  			break
 13085  		}
 13086  		_ = v_0.Args[1]
 13087  		x := v_0.Args[0]
 13088  		z := v_0.Args[1]
 13089  		if z.Op != OpARM64NEG {
 13090  			break
 13091  		}
 13092  		y := z.Args[0]
 13093  		if !(z.Uses == 1) {
 13094  			break
 13095  		}
 13096  		v.reset(OpARM64NotEqual)
 13097  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13098  		v0.AddArg2(x, y)
 13099  		v.AddArg(v0)
 13100  		return true
 13101  	}
 13102  	// match: (NotEqual (CMPW x z:(NEG y)))
 13103  	// cond: z.Uses == 1
 13104  	// result: (NotEqual (CMNW x y))
 13105  	for {
 13106  		if v_0.Op != OpARM64CMPW {
 13107  			break
 13108  		}
 13109  		_ = v_0.Args[1]
 13110  		x := v_0.Args[0]
 13111  		z := v_0.Args[1]
 13112  		if z.Op != OpARM64NEG {
 13113  			break
 13114  		}
 13115  		y := z.Args[0]
 13116  		if !(z.Uses == 1) {
 13117  			break
 13118  		}
 13119  		v.reset(OpARM64NotEqual)
 13120  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13121  		v0.AddArg2(x, y)
 13122  		v.AddArg(v0)
 13123  		return true
 13124  	}
 13125  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 13126  	// cond: x.Uses == 1
 13127  	// result: (NotEqual (CMNconst [c] y))
 13128  	for {
 13129  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13130  			break
 13131  		}
 13132  		x := v_0.Args[0]
 13133  		if x.Op != OpARM64ADDconst {
 13134  			break
 13135  		}
 13136  		c := auxIntToInt64(x.AuxInt)
 13137  		y := x.Args[0]
 13138  		if !(x.Uses == 1) {
 13139  			break
 13140  		}
 13141  		v.reset(OpARM64NotEqual)
 13142  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 13143  		v0.AuxInt = int64ToAuxInt(c)
 13144  		v0.AddArg(y)
 13145  		v.AddArg(v0)
 13146  		return true
 13147  	}
 13148  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 13149  	// cond: x.Uses == 1
 13150  	// result: (NotEqual (CMNWconst [int32(c)] y))
 13151  	for {
 13152  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13153  			break
 13154  		}
 13155  		x := v_0.Args[0]
 13156  		if x.Op != OpARM64ADDconst {
 13157  			break
 13158  		}
 13159  		c := auxIntToInt64(x.AuxInt)
 13160  		y := x.Args[0]
 13161  		if !(x.Uses == 1) {
 13162  			break
 13163  		}
 13164  		v.reset(OpARM64NotEqual)
 13165  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 13166  		v0.AuxInt = int32ToAuxInt(int32(c))
 13167  		v0.AddArg(y)
 13168  		v.AddArg(v0)
 13169  		return true
 13170  	}
 13171  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 13172  	// cond: z.Uses == 1
 13173  	// result: (NotEqual (CMN x y))
 13174  	for {
 13175  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13176  			break
 13177  		}
 13178  		z := v_0.Args[0]
 13179  		if z.Op != OpARM64ADD {
 13180  			break
 13181  		}
 13182  		y := z.Args[1]
 13183  		x := z.Args[0]
 13184  		if !(z.Uses == 1) {
 13185  			break
 13186  		}
 13187  		v.reset(OpARM64NotEqual)
 13188  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13189  		v0.AddArg2(x, y)
 13190  		v.AddArg(v0)
 13191  		return true
 13192  	}
 13193  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 13194  	// cond: z.Uses == 1
 13195  	// result: (NotEqual (CMNW x y))
 13196  	for {
 13197  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13198  			break
 13199  		}
 13200  		z := v_0.Args[0]
 13201  		if z.Op != OpARM64ADD {
 13202  			break
 13203  		}
 13204  		y := z.Args[1]
 13205  		x := z.Args[0]
 13206  		if !(z.Uses == 1) {
 13207  			break
 13208  		}
 13209  		v.reset(OpARM64NotEqual)
 13210  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13211  		v0.AddArg2(x, y)
 13212  		v.AddArg(v0)
 13213  		return true
 13214  	}
 13215  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 13216  	// cond: z.Uses == 1
 13217  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 13218  	for {
 13219  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13220  			break
 13221  		}
 13222  		z := v_0.Args[0]
 13223  		if z.Op != OpARM64MADD {
 13224  			break
 13225  		}
 13226  		y := z.Args[2]
 13227  		a := z.Args[0]
 13228  		x := z.Args[1]
 13229  		if !(z.Uses == 1) {
 13230  			break
 13231  		}
 13232  		v.reset(OpARM64NotEqual)
 13233  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13234  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13235  		v1.AddArg2(x, y)
 13236  		v0.AddArg2(a, v1)
 13237  		v.AddArg(v0)
 13238  		return true
 13239  	}
 13240  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 13241  	// cond: z.Uses == 1
 13242  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 13243  	for {
 13244  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13245  			break
 13246  		}
 13247  		z := v_0.Args[0]
 13248  		if z.Op != OpARM64MSUB {
 13249  			break
 13250  		}
 13251  		y := z.Args[2]
 13252  		a := z.Args[0]
 13253  		x := z.Args[1]
 13254  		if !(z.Uses == 1) {
 13255  			break
 13256  		}
 13257  		v.reset(OpARM64NotEqual)
 13258  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 13259  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13260  		v1.AddArg2(x, y)
 13261  		v0.AddArg2(a, v1)
 13262  		v.AddArg(v0)
 13263  		return true
 13264  	}
 13265  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 13266  	// cond: z.Uses == 1
 13267  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 13268  	for {
 13269  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13270  			break
 13271  		}
 13272  		z := v_0.Args[0]
 13273  		if z.Op != OpARM64MADDW {
 13274  			break
 13275  		}
 13276  		y := z.Args[2]
 13277  		a := z.Args[0]
 13278  		x := z.Args[1]
 13279  		if !(z.Uses == 1) {
 13280  			break
 13281  		}
 13282  		v.reset(OpARM64NotEqual)
 13283  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13284  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13285  		v1.AddArg2(x, y)
 13286  		v0.AddArg2(a, v1)
 13287  		v.AddArg(v0)
 13288  		return true
 13289  	}
 13290  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 13291  	// cond: z.Uses == 1
 13292  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 13293  	for {
 13294  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13295  			break
 13296  		}
 13297  		z := v_0.Args[0]
 13298  		if z.Op != OpARM64MSUBW {
 13299  			break
 13300  		}
 13301  		y := z.Args[2]
 13302  		a := z.Args[0]
 13303  		x := z.Args[1]
 13304  		if !(z.Uses == 1) {
 13305  			break
 13306  		}
 13307  		v.reset(OpARM64NotEqual)
 13308  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 13309  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13310  		v1.AddArg2(x, y)
 13311  		v0.AddArg2(a, v1)
 13312  		v.AddArg(v0)
 13313  		return true
 13314  	}
 13315  	// match: (NotEqual (FlagConstant [fc]))
 13316  	// result: (MOVDconst [b2i(fc.ne())])
 13317  	for {
 13318  		if v_0.Op != OpARM64FlagConstant {
 13319  			break
 13320  		}
 13321  		fc := auxIntToFlagConstant(v_0.AuxInt)
 13322  		v.reset(OpARM64MOVDconst)
 13323  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 13324  		return true
 13325  	}
 13326  	// match: (NotEqual (InvertFlags x))
 13327  	// result: (NotEqual x)
 13328  	for {
 13329  		if v_0.Op != OpARM64InvertFlags {
 13330  			break
 13331  		}
 13332  		x := v_0.Args[0]
 13333  		v.reset(OpARM64NotEqual)
 13334  		v.AddArg(x)
 13335  		return true
 13336  	}
 13337  	return false
 13338  }
 13339  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 13340  	v_1 := v.Args[1]
 13341  	v_0 := v.Args[0]
 13342  	// match: (OR x (MOVDconst [c]))
 13343  	// result: (ORconst [c] x)
 13344  	for {
 13345  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13346  			x := v_0
 13347  			if v_1.Op != OpARM64MOVDconst {
 13348  				continue
 13349  			}
 13350  			c := auxIntToInt64(v_1.AuxInt)
 13351  			v.reset(OpARM64ORconst)
 13352  			v.AuxInt = int64ToAuxInt(c)
 13353  			v.AddArg(x)
 13354  			return true
 13355  		}
 13356  		break
 13357  	}
 13358  	// match: (OR x x)
 13359  	// result: x
 13360  	for {
 13361  		x := v_0
 13362  		if x != v_1 {
 13363  			break
 13364  		}
 13365  		v.copyOf(x)
 13366  		return true
 13367  	}
 13368  	// match: (OR x (MVN y))
 13369  	// result: (ORN x y)
 13370  	for {
 13371  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13372  			x := v_0
 13373  			if v_1.Op != OpARM64MVN {
 13374  				continue
 13375  			}
 13376  			y := v_1.Args[0]
 13377  			v.reset(OpARM64ORN)
 13378  			v.AddArg2(x, y)
 13379  			return true
 13380  		}
 13381  		break
 13382  	}
 13383  	// match: (OR x0 x1:(SLLconst [c] y))
 13384  	// cond: clobberIfDead(x1)
 13385  	// result: (ORshiftLL x0 y [c])
 13386  	for {
 13387  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13388  			x0 := v_0
 13389  			x1 := v_1
 13390  			if x1.Op != OpARM64SLLconst {
 13391  				continue
 13392  			}
 13393  			c := auxIntToInt64(x1.AuxInt)
 13394  			y := x1.Args[0]
 13395  			if !(clobberIfDead(x1)) {
 13396  				continue
 13397  			}
 13398  			v.reset(OpARM64ORshiftLL)
 13399  			v.AuxInt = int64ToAuxInt(c)
 13400  			v.AddArg2(x0, y)
 13401  			return true
 13402  		}
 13403  		break
 13404  	}
 13405  	// match: (OR x0 x1:(SRLconst [c] y))
 13406  	// cond: clobberIfDead(x1)
 13407  	// result: (ORshiftRL x0 y [c])
 13408  	for {
 13409  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13410  			x0 := v_0
 13411  			x1 := v_1
 13412  			if x1.Op != OpARM64SRLconst {
 13413  				continue
 13414  			}
 13415  			c := auxIntToInt64(x1.AuxInt)
 13416  			y := x1.Args[0]
 13417  			if !(clobberIfDead(x1)) {
 13418  				continue
 13419  			}
 13420  			v.reset(OpARM64ORshiftRL)
 13421  			v.AuxInt = int64ToAuxInt(c)
 13422  			v.AddArg2(x0, y)
 13423  			return true
 13424  		}
 13425  		break
 13426  	}
 13427  	// match: (OR x0 x1:(SRAconst [c] y))
 13428  	// cond: clobberIfDead(x1)
 13429  	// result: (ORshiftRA x0 y [c])
 13430  	for {
 13431  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13432  			x0 := v_0
 13433  			x1 := v_1
 13434  			if x1.Op != OpARM64SRAconst {
 13435  				continue
 13436  			}
 13437  			c := auxIntToInt64(x1.AuxInt)
 13438  			y := x1.Args[0]
 13439  			if !(clobberIfDead(x1)) {
 13440  				continue
 13441  			}
 13442  			v.reset(OpARM64ORshiftRA)
 13443  			v.AuxInt = int64ToAuxInt(c)
 13444  			v.AddArg2(x0, y)
 13445  			return true
 13446  		}
 13447  		break
 13448  	}
 13449  	// match: (OR x0 x1:(RORconst [c] y))
 13450  	// cond: clobberIfDead(x1)
 13451  	// result: (ORshiftRO x0 y [c])
 13452  	for {
 13453  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13454  			x0 := v_0
 13455  			x1 := v_1
 13456  			if x1.Op != OpARM64RORconst {
 13457  				continue
 13458  			}
 13459  			c := auxIntToInt64(x1.AuxInt)
 13460  			y := x1.Args[0]
 13461  			if !(clobberIfDead(x1)) {
 13462  				continue
 13463  			}
 13464  			v.reset(OpARM64ORshiftRO)
 13465  			v.AuxInt = int64ToAuxInt(c)
 13466  			v.AddArg2(x0, y)
 13467  			return true
 13468  		}
 13469  		break
 13470  	}
 13471  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 13472  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 13473  	// result: (BFI [bfc] y x)
 13474  	for {
 13475  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13476  			if v_0.Op != OpARM64UBFIZ {
 13477  				continue
 13478  			}
 13479  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13480  			x := v_0.Args[0]
 13481  			if v_1.Op != OpARM64ANDconst {
 13482  				continue
 13483  			}
 13484  			ac := auxIntToInt64(v_1.AuxInt)
 13485  			y := v_1.Args[0]
 13486  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 13487  				continue
 13488  			}
 13489  			v.reset(OpARM64BFI)
 13490  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13491  			v.AddArg2(y, x)
 13492  			return true
 13493  		}
 13494  		break
 13495  	}
 13496  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 13497  	// cond: ac == ^(1<<uint(bfc.width())-1)
 13498  	// result: (BFXIL [bfc] y x)
 13499  	for {
 13500  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13501  			if v_0.Op != OpARM64UBFX {
 13502  				continue
 13503  			}
 13504  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13505  			x := v_0.Args[0]
 13506  			if v_1.Op != OpARM64ANDconst {
 13507  				continue
 13508  			}
 13509  			ac := auxIntToInt64(v_1.AuxInt)
 13510  			y := v_1.Args[0]
 13511  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 13512  				continue
 13513  			}
 13514  			v.reset(OpARM64BFXIL)
 13515  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13516  			v.AddArg2(y, x)
 13517  			return true
 13518  		}
 13519  		break
 13520  	}
 13521  	return false
 13522  }
 13523  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 13524  	v_1 := v.Args[1]
 13525  	v_0 := v.Args[0]
 13526  	// match: (ORN x (MOVDconst [c]))
 13527  	// result: (ORconst [^c] x)
 13528  	for {
 13529  		x := v_0
 13530  		if v_1.Op != OpARM64MOVDconst {
 13531  			break
 13532  		}
 13533  		c := auxIntToInt64(v_1.AuxInt)
 13534  		v.reset(OpARM64ORconst)
 13535  		v.AuxInt = int64ToAuxInt(^c)
 13536  		v.AddArg(x)
 13537  		return true
 13538  	}
 13539  	// match: (ORN x x)
 13540  	// result: (MOVDconst [-1])
 13541  	for {
 13542  		x := v_0
 13543  		if x != v_1 {
 13544  			break
 13545  		}
 13546  		v.reset(OpARM64MOVDconst)
 13547  		v.AuxInt = int64ToAuxInt(-1)
 13548  		return true
 13549  	}
 13550  	// match: (ORN x0 x1:(SLLconst [c] y))
 13551  	// cond: clobberIfDead(x1)
 13552  	// result: (ORNshiftLL x0 y [c])
 13553  	for {
 13554  		x0 := v_0
 13555  		x1 := v_1
 13556  		if x1.Op != OpARM64SLLconst {
 13557  			break
 13558  		}
 13559  		c := auxIntToInt64(x1.AuxInt)
 13560  		y := x1.Args[0]
 13561  		if !(clobberIfDead(x1)) {
 13562  			break
 13563  		}
 13564  		v.reset(OpARM64ORNshiftLL)
 13565  		v.AuxInt = int64ToAuxInt(c)
 13566  		v.AddArg2(x0, y)
 13567  		return true
 13568  	}
 13569  	// match: (ORN x0 x1:(SRLconst [c] y))
 13570  	// cond: clobberIfDead(x1)
 13571  	// result: (ORNshiftRL x0 y [c])
 13572  	for {
 13573  		x0 := v_0
 13574  		x1 := v_1
 13575  		if x1.Op != OpARM64SRLconst {
 13576  			break
 13577  		}
 13578  		c := auxIntToInt64(x1.AuxInt)
 13579  		y := x1.Args[0]
 13580  		if !(clobberIfDead(x1)) {
 13581  			break
 13582  		}
 13583  		v.reset(OpARM64ORNshiftRL)
 13584  		v.AuxInt = int64ToAuxInt(c)
 13585  		v.AddArg2(x0, y)
 13586  		return true
 13587  	}
 13588  	// match: (ORN x0 x1:(SRAconst [c] y))
 13589  	// cond: clobberIfDead(x1)
 13590  	// result: (ORNshiftRA x0 y [c])
 13591  	for {
 13592  		x0 := v_0
 13593  		x1 := v_1
 13594  		if x1.Op != OpARM64SRAconst {
 13595  			break
 13596  		}
 13597  		c := auxIntToInt64(x1.AuxInt)
 13598  		y := x1.Args[0]
 13599  		if !(clobberIfDead(x1)) {
 13600  			break
 13601  		}
 13602  		v.reset(OpARM64ORNshiftRA)
 13603  		v.AuxInt = int64ToAuxInt(c)
 13604  		v.AddArg2(x0, y)
 13605  		return true
 13606  	}
 13607  	// match: (ORN x0 x1:(RORconst [c] y))
 13608  	// cond: clobberIfDead(x1)
 13609  	// result: (ORNshiftRO x0 y [c])
 13610  	for {
 13611  		x0 := v_0
 13612  		x1 := v_1
 13613  		if x1.Op != OpARM64RORconst {
 13614  			break
 13615  		}
 13616  		c := auxIntToInt64(x1.AuxInt)
 13617  		y := x1.Args[0]
 13618  		if !(clobberIfDead(x1)) {
 13619  			break
 13620  		}
 13621  		v.reset(OpARM64ORNshiftRO)
 13622  		v.AuxInt = int64ToAuxInt(c)
 13623  		v.AddArg2(x0, y)
 13624  		return true
 13625  	}
 13626  	return false
 13627  }
 13628  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 13629  	v_1 := v.Args[1]
 13630  	v_0 := v.Args[0]
 13631  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 13632  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 13633  	for {
 13634  		d := auxIntToInt64(v.AuxInt)
 13635  		x := v_0
 13636  		if v_1.Op != OpARM64MOVDconst {
 13637  			break
 13638  		}
 13639  		c := auxIntToInt64(v_1.AuxInt)
 13640  		v.reset(OpARM64ORconst)
 13641  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 13642  		v.AddArg(x)
 13643  		return true
 13644  	}
 13645  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 13646  	// result: (MOVDconst [-1])
 13647  	for {
 13648  		c := auxIntToInt64(v.AuxInt)
 13649  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 13650  			break
 13651  		}
 13652  		x := v_0.Args[0]
 13653  		if x != v_1 {
 13654  			break
 13655  		}
 13656  		v.reset(OpARM64MOVDconst)
 13657  		v.AuxInt = int64ToAuxInt(-1)
 13658  		return true
 13659  	}
 13660  	return false
 13661  }
 13662  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 13663  	v_1 := v.Args[1]
 13664  	v_0 := v.Args[0]
 13665  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 13666  	// result: (ORconst x [^(c>>uint64(d))])
 13667  	for {
 13668  		d := auxIntToInt64(v.AuxInt)
 13669  		x := v_0
 13670  		if v_1.Op != OpARM64MOVDconst {
 13671  			break
 13672  		}
 13673  		c := auxIntToInt64(v_1.AuxInt)
 13674  		v.reset(OpARM64ORconst)
 13675  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 13676  		v.AddArg(x)
 13677  		return true
 13678  	}
 13679  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 13680  	// result: (MOVDconst [-1])
 13681  	for {
 13682  		c := auxIntToInt64(v.AuxInt)
 13683  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 13684  			break
 13685  		}
 13686  		x := v_0.Args[0]
 13687  		if x != v_1 {
 13688  			break
 13689  		}
 13690  		v.reset(OpARM64MOVDconst)
 13691  		v.AuxInt = int64ToAuxInt(-1)
 13692  		return true
 13693  	}
 13694  	return false
 13695  }
 13696  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 13697  	v_1 := v.Args[1]
 13698  	v_0 := v.Args[0]
 13699  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 13700  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 13701  	for {
 13702  		d := auxIntToInt64(v.AuxInt)
 13703  		x := v_0
 13704  		if v_1.Op != OpARM64MOVDconst {
 13705  			break
 13706  		}
 13707  		c := auxIntToInt64(v_1.AuxInt)
 13708  		v.reset(OpARM64ORconst)
 13709  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 13710  		v.AddArg(x)
 13711  		return true
 13712  	}
 13713  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 13714  	// result: (MOVDconst [-1])
 13715  	for {
 13716  		c := auxIntToInt64(v.AuxInt)
 13717  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 13718  			break
 13719  		}
 13720  		x := v_0.Args[0]
 13721  		if x != v_1 {
 13722  			break
 13723  		}
 13724  		v.reset(OpARM64MOVDconst)
 13725  		v.AuxInt = int64ToAuxInt(-1)
 13726  		return true
 13727  	}
 13728  	return false
 13729  }
 13730  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 13731  	v_1 := v.Args[1]
 13732  	v_0 := v.Args[0]
 13733  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 13734  	// result: (ORconst x [^rotateRight64(c, d)])
 13735  	for {
 13736  		d := auxIntToInt64(v.AuxInt)
 13737  		x := v_0
 13738  		if v_1.Op != OpARM64MOVDconst {
 13739  			break
 13740  		}
 13741  		c := auxIntToInt64(v_1.AuxInt)
 13742  		v.reset(OpARM64ORconst)
 13743  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 13744  		v.AddArg(x)
 13745  		return true
 13746  	}
 13747  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 13748  	// result: (MOVDconst [-1])
 13749  	for {
 13750  		c := auxIntToInt64(v.AuxInt)
 13751  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 13752  			break
 13753  		}
 13754  		x := v_0.Args[0]
 13755  		if x != v_1 {
 13756  			break
 13757  		}
 13758  		v.reset(OpARM64MOVDconst)
 13759  		v.AuxInt = int64ToAuxInt(-1)
 13760  		return true
 13761  	}
 13762  	return false
 13763  }
 13764  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 13765  	v_0 := v.Args[0]
 13766  	// match: (ORconst [0] x)
 13767  	// result: x
 13768  	for {
 13769  		if auxIntToInt64(v.AuxInt) != 0 {
 13770  			break
 13771  		}
 13772  		x := v_0
 13773  		v.copyOf(x)
 13774  		return true
 13775  	}
 13776  	// match: (ORconst [-1] _)
 13777  	// result: (MOVDconst [-1])
 13778  	for {
 13779  		if auxIntToInt64(v.AuxInt) != -1 {
 13780  			break
 13781  		}
 13782  		v.reset(OpARM64MOVDconst)
 13783  		v.AuxInt = int64ToAuxInt(-1)
 13784  		return true
 13785  	}
 13786  	// match: (ORconst [c] (MOVDconst [d]))
 13787  	// result: (MOVDconst [c|d])
 13788  	for {
 13789  		c := auxIntToInt64(v.AuxInt)
 13790  		if v_0.Op != OpARM64MOVDconst {
 13791  			break
 13792  		}
 13793  		d := auxIntToInt64(v_0.AuxInt)
 13794  		v.reset(OpARM64MOVDconst)
 13795  		v.AuxInt = int64ToAuxInt(c | d)
 13796  		return true
 13797  	}
 13798  	// match: (ORconst [c] (ORconst [d] x))
 13799  	// result: (ORconst [c|d] x)
 13800  	for {
 13801  		c := auxIntToInt64(v.AuxInt)
 13802  		if v_0.Op != OpARM64ORconst {
 13803  			break
 13804  		}
 13805  		d := auxIntToInt64(v_0.AuxInt)
 13806  		x := v_0.Args[0]
 13807  		v.reset(OpARM64ORconst)
 13808  		v.AuxInt = int64ToAuxInt(c | d)
 13809  		v.AddArg(x)
 13810  		return true
 13811  	}
 13812  	// match: (ORconst [c1] (ANDconst [c2] x))
 13813  	// cond: c2|c1 == ^0
 13814  	// result: (ORconst [c1] x)
 13815  	for {
 13816  		c1 := auxIntToInt64(v.AuxInt)
 13817  		if v_0.Op != OpARM64ANDconst {
 13818  			break
 13819  		}
 13820  		c2 := auxIntToInt64(v_0.AuxInt)
 13821  		x := v_0.Args[0]
 13822  		if !(c2|c1 == ^0) {
 13823  			break
 13824  		}
 13825  		v.reset(OpARM64ORconst)
 13826  		v.AuxInt = int64ToAuxInt(c1)
 13827  		v.AddArg(x)
 13828  		return true
 13829  	}
 13830  	return false
 13831  }
 13832  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 13833  	v_1 := v.Args[1]
 13834  	v_0 := v.Args[0]
 13835  	b := v.Block
 13836  	typ := &b.Func.Config.Types
 13837  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 13838  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 13839  	for {
 13840  		d := auxIntToInt64(v.AuxInt)
 13841  		if v_0.Op != OpARM64MOVDconst {
 13842  			break
 13843  		}
 13844  		c := auxIntToInt64(v_0.AuxInt)
 13845  		x := v_1
 13846  		v.reset(OpARM64ORconst)
 13847  		v.AuxInt = int64ToAuxInt(c)
 13848  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 13849  		v0.AuxInt = int64ToAuxInt(d)
 13850  		v0.AddArg(x)
 13851  		v.AddArg(v0)
 13852  		return true
 13853  	}
 13854  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 13855  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 13856  	for {
 13857  		d := auxIntToInt64(v.AuxInt)
 13858  		x := v_0
 13859  		if v_1.Op != OpARM64MOVDconst {
 13860  			break
 13861  		}
 13862  		c := auxIntToInt64(v_1.AuxInt)
 13863  		v.reset(OpARM64ORconst)
 13864  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 13865  		v.AddArg(x)
 13866  		return true
 13867  	}
 13868  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 13869  	// result: y
 13870  	for {
 13871  		c := auxIntToInt64(v.AuxInt)
 13872  		y := v_0
 13873  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 13874  			break
 13875  		}
 13876  		x := y.Args[0]
 13877  		if x != v_1 {
 13878  			break
 13879  		}
 13880  		v.copyOf(y)
 13881  		return true
 13882  	}
 13883  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 13884  	// result: (REV16W x)
 13885  	for {
 13886  		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) {
 13887  			break
 13888  		}
 13889  		x := v_0.Args[0]
 13890  		if x != v_1 {
 13891  			break
 13892  		}
 13893  		v.reset(OpARM64REV16W)
 13894  		v.AddArg(x)
 13895  		return true
 13896  	}
 13897  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 13898  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 13899  	// result: (REV16W x)
 13900  	for {
 13901  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 13902  			break
 13903  		}
 13904  		v_0_0 := v_0.Args[0]
 13905  		if v_0_0.Op != OpARM64ANDconst {
 13906  			break
 13907  		}
 13908  		c1 := auxIntToInt64(v_0_0.AuxInt)
 13909  		x := v_0_0.Args[0]
 13910  		if v_1.Op != OpARM64ANDconst {
 13911  			break
 13912  		}
 13913  		c2 := auxIntToInt64(v_1.AuxInt)
 13914  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 13915  			break
 13916  		}
 13917  		v.reset(OpARM64REV16W)
 13918  		v.AddArg(x)
 13919  		return true
 13920  	}
 13921  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 13922  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 13923  	// result: (REV16 x)
 13924  	for {
 13925  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 13926  			break
 13927  		}
 13928  		v_0_0 := v_0.Args[0]
 13929  		if v_0_0.Op != OpARM64ANDconst {
 13930  			break
 13931  		}
 13932  		c1 := auxIntToInt64(v_0_0.AuxInt)
 13933  		x := v_0_0.Args[0]
 13934  		if v_1.Op != OpARM64ANDconst {
 13935  			break
 13936  		}
 13937  		c2 := auxIntToInt64(v_1.AuxInt)
 13938  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 13939  			break
 13940  		}
 13941  		v.reset(OpARM64REV16)
 13942  		v.AddArg(x)
 13943  		return true
 13944  	}
 13945  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 13946  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 13947  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 13948  	for {
 13949  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 13950  			break
 13951  		}
 13952  		v_0_0 := v_0.Args[0]
 13953  		if v_0_0.Op != OpARM64ANDconst {
 13954  			break
 13955  		}
 13956  		c1 := auxIntToInt64(v_0_0.AuxInt)
 13957  		x := v_0_0.Args[0]
 13958  		if v_1.Op != OpARM64ANDconst {
 13959  			break
 13960  		}
 13961  		c2 := auxIntToInt64(v_1.AuxInt)
 13962  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 13963  			break
 13964  		}
 13965  		v.reset(OpARM64REV16)
 13966  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 13967  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 13968  		v0.AddArg(x)
 13969  		v.AddArg(v0)
 13970  		return true
 13971  	}
 13972  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 13973  	// result: (EXTRconst [64-c] x2 x)
 13974  	for {
 13975  		c := auxIntToInt64(v.AuxInt)
 13976  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 13977  			break
 13978  		}
 13979  		x := v_0.Args[0]
 13980  		x2 := v_1
 13981  		v.reset(OpARM64EXTRconst)
 13982  		v.AuxInt = int64ToAuxInt(64 - c)
 13983  		v.AddArg2(x2, x)
 13984  		return true
 13985  	}
 13986  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 13987  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 13988  	// result: (EXTRWconst [32-c] x2 x)
 13989  	for {
 13990  		t := v.Type
 13991  		c := auxIntToInt64(v.AuxInt)
 13992  		if v_0.Op != OpARM64UBFX {
 13993  			break
 13994  		}
 13995  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 13996  		x := v_0.Args[0]
 13997  		x2 := v_1
 13998  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 13999  			break
 14000  		}
 14001  		v.reset(OpARM64EXTRWconst)
 14002  		v.AuxInt = int64ToAuxInt(32 - c)
 14003  		v.AddArg2(x2, x)
 14004  		return true
 14005  	}
 14006  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 14007  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 14008  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 14009  	for {
 14010  		s := auxIntToInt64(v.AuxInt)
 14011  		if v_0.Op != OpARM64ANDconst {
 14012  			break
 14013  		}
 14014  		xc := auxIntToInt64(v_0.AuxInt)
 14015  		x := v_0.Args[0]
 14016  		if v_1.Op != OpARM64ANDconst {
 14017  			break
 14018  		}
 14019  		yc := auxIntToInt64(v_1.AuxInt)
 14020  		y := v_1.Args[0]
 14021  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 14022  			break
 14023  		}
 14024  		v.reset(OpARM64BFI)
 14025  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 14026  		v.AddArg2(x, y)
 14027  		return true
 14028  	}
 14029  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 14030  	// cond: sc == bfc.width()
 14031  	// result: (BFXIL [bfc] y x)
 14032  	for {
 14033  		sc := auxIntToInt64(v.AuxInt)
 14034  		if v_0.Op != OpARM64UBFX {
 14035  			break
 14036  		}
 14037  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14038  		x := v_0.Args[0]
 14039  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 14040  			break
 14041  		}
 14042  		y := v_1.Args[0]
 14043  		if !(sc == bfc.width()) {
 14044  			break
 14045  		}
 14046  		v.reset(OpARM64BFXIL)
 14047  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 14048  		v.AddArg2(y, x)
 14049  		return true
 14050  	}
 14051  	return false
 14052  }
 14053  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 14054  	v_1 := v.Args[1]
 14055  	v_0 := v.Args[0]
 14056  	b := v.Block
 14057  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 14058  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 14059  	for {
 14060  		d := auxIntToInt64(v.AuxInt)
 14061  		if v_0.Op != OpARM64MOVDconst {
 14062  			break
 14063  		}
 14064  		c := auxIntToInt64(v_0.AuxInt)
 14065  		x := v_1
 14066  		v.reset(OpARM64ORconst)
 14067  		v.AuxInt = int64ToAuxInt(c)
 14068  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 14069  		v0.AuxInt = int64ToAuxInt(d)
 14070  		v0.AddArg(x)
 14071  		v.AddArg(v0)
 14072  		return true
 14073  	}
 14074  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 14075  	// result: (ORconst x [c>>uint64(d)])
 14076  	for {
 14077  		d := auxIntToInt64(v.AuxInt)
 14078  		x := v_0
 14079  		if v_1.Op != OpARM64MOVDconst {
 14080  			break
 14081  		}
 14082  		c := auxIntToInt64(v_1.AuxInt)
 14083  		v.reset(OpARM64ORconst)
 14084  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 14085  		v.AddArg(x)
 14086  		return true
 14087  	}
 14088  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 14089  	// result: y
 14090  	for {
 14091  		c := auxIntToInt64(v.AuxInt)
 14092  		y := v_0
 14093  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 14094  			break
 14095  		}
 14096  		x := y.Args[0]
 14097  		if x != v_1 {
 14098  			break
 14099  		}
 14100  		v.copyOf(y)
 14101  		return true
 14102  	}
 14103  	return false
 14104  }
 14105  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 14106  	v_1 := v.Args[1]
 14107  	v_0 := v.Args[0]
 14108  	b := v.Block
 14109  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 14110  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 14111  	for {
 14112  		d := auxIntToInt64(v.AuxInt)
 14113  		if v_0.Op != OpARM64MOVDconst {
 14114  			break
 14115  		}
 14116  		c := auxIntToInt64(v_0.AuxInt)
 14117  		x := v_1
 14118  		v.reset(OpARM64ORconst)
 14119  		v.AuxInt = int64ToAuxInt(c)
 14120  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 14121  		v0.AuxInt = int64ToAuxInt(d)
 14122  		v0.AddArg(x)
 14123  		v.AddArg(v0)
 14124  		return true
 14125  	}
 14126  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 14127  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 14128  	for {
 14129  		d := auxIntToInt64(v.AuxInt)
 14130  		x := v_0
 14131  		if v_1.Op != OpARM64MOVDconst {
 14132  			break
 14133  		}
 14134  		c := auxIntToInt64(v_1.AuxInt)
 14135  		v.reset(OpARM64ORconst)
 14136  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 14137  		v.AddArg(x)
 14138  		return true
 14139  	}
 14140  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 14141  	// result: y
 14142  	for {
 14143  		c := auxIntToInt64(v.AuxInt)
 14144  		y := v_0
 14145  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 14146  			break
 14147  		}
 14148  		x := y.Args[0]
 14149  		if x != v_1 {
 14150  			break
 14151  		}
 14152  		v.copyOf(y)
 14153  		return true
 14154  	}
 14155  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 14156  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 14157  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 14158  	for {
 14159  		rc := auxIntToInt64(v.AuxInt)
 14160  		if v_0.Op != OpARM64ANDconst {
 14161  			break
 14162  		}
 14163  		ac := auxIntToInt64(v_0.AuxInt)
 14164  		x := v_0.Args[0]
 14165  		if v_1.Op != OpARM64SLLconst {
 14166  			break
 14167  		}
 14168  		lc := auxIntToInt64(v_1.AuxInt)
 14169  		y := v_1.Args[0]
 14170  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 14171  			break
 14172  		}
 14173  		v.reset(OpARM64BFI)
 14174  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14175  		v.AddArg2(x, y)
 14176  		return true
 14177  	}
 14178  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 14179  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 14180  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 14181  	for {
 14182  		rc := auxIntToInt64(v.AuxInt)
 14183  		if v_0.Op != OpARM64ANDconst {
 14184  			break
 14185  		}
 14186  		ac := auxIntToInt64(v_0.AuxInt)
 14187  		y := v_0.Args[0]
 14188  		if v_1.Op != OpARM64SLLconst {
 14189  			break
 14190  		}
 14191  		lc := auxIntToInt64(v_1.AuxInt)
 14192  		x := v_1.Args[0]
 14193  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 14194  			break
 14195  		}
 14196  		v.reset(OpARM64BFXIL)
 14197  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14198  		v.AddArg2(y, x)
 14199  		return true
 14200  	}
 14201  	return false
 14202  }
 14203  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 14204  	v_1 := v.Args[1]
 14205  	v_0 := v.Args[0]
 14206  	b := v.Block
 14207  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 14208  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 14209  	for {
 14210  		d := auxIntToInt64(v.AuxInt)
 14211  		if v_0.Op != OpARM64MOVDconst {
 14212  			break
 14213  		}
 14214  		c := auxIntToInt64(v_0.AuxInt)
 14215  		x := v_1
 14216  		v.reset(OpARM64ORconst)
 14217  		v.AuxInt = int64ToAuxInt(c)
 14218  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 14219  		v0.AuxInt = int64ToAuxInt(d)
 14220  		v0.AddArg(x)
 14221  		v.AddArg(v0)
 14222  		return true
 14223  	}
 14224  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 14225  	// result: (ORconst x [rotateRight64(c, d)])
 14226  	for {
 14227  		d := auxIntToInt64(v.AuxInt)
 14228  		x := v_0
 14229  		if v_1.Op != OpARM64MOVDconst {
 14230  			break
 14231  		}
 14232  		c := auxIntToInt64(v_1.AuxInt)
 14233  		v.reset(OpARM64ORconst)
 14234  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 14235  		v.AddArg(x)
 14236  		return true
 14237  	}
 14238  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 14239  	// result: y
 14240  	for {
 14241  		c := auxIntToInt64(v.AuxInt)
 14242  		y := v_0
 14243  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 14244  			break
 14245  		}
 14246  		x := y.Args[0]
 14247  		if x != v_1 {
 14248  			break
 14249  		}
 14250  		v.copyOf(y)
 14251  		return true
 14252  	}
 14253  	return false
 14254  }
 14255  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 14256  	v_0 := v.Args[0]
 14257  	// match: (REV (REV p))
 14258  	// result: p
 14259  	for {
 14260  		if v_0.Op != OpARM64REV {
 14261  			break
 14262  		}
 14263  		p := v_0.Args[0]
 14264  		v.copyOf(p)
 14265  		return true
 14266  	}
 14267  	return false
 14268  }
 14269  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 14270  	v_0 := v.Args[0]
 14271  	// match: (REVW (REVW p))
 14272  	// result: p
 14273  	for {
 14274  		if v_0.Op != OpARM64REVW {
 14275  			break
 14276  		}
 14277  		p := v_0.Args[0]
 14278  		v.copyOf(p)
 14279  		return true
 14280  	}
 14281  	return false
 14282  }
 14283  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 14284  	v_1 := v.Args[1]
 14285  	v_0 := v.Args[0]
 14286  	// match: (ROR x (MOVDconst [c]))
 14287  	// result: (RORconst x [c&63])
 14288  	for {
 14289  		x := v_0
 14290  		if v_1.Op != OpARM64MOVDconst {
 14291  			break
 14292  		}
 14293  		c := auxIntToInt64(v_1.AuxInt)
 14294  		v.reset(OpARM64RORconst)
 14295  		v.AuxInt = int64ToAuxInt(c & 63)
 14296  		v.AddArg(x)
 14297  		return true
 14298  	}
 14299  	return false
 14300  }
 14301  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 14302  	v_1 := v.Args[1]
 14303  	v_0 := v.Args[0]
 14304  	// match: (RORW x (MOVDconst [c]))
 14305  	// result: (RORWconst x [c&31])
 14306  	for {
 14307  		x := v_0
 14308  		if v_1.Op != OpARM64MOVDconst {
 14309  			break
 14310  		}
 14311  		c := auxIntToInt64(v_1.AuxInt)
 14312  		v.reset(OpARM64RORWconst)
 14313  		v.AuxInt = int64ToAuxInt(c & 31)
 14314  		v.AddArg(x)
 14315  		return true
 14316  	}
 14317  	return false
 14318  }
 14319  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 14320  	v_2 := v.Args[2]
 14321  	v_1 := v.Args[1]
 14322  	v_0 := v.Args[0]
 14323  	b := v.Block
 14324  	typ := &b.Func.Config.Types
 14325  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 14326  	// result: (SBCSflags x y bo)
 14327  	for {
 14328  		x := v_0
 14329  		y := v_1
 14330  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14331  			break
 14332  		}
 14333  		v_2_0 := v_2.Args[0]
 14334  		if v_2_0.Op != OpARM64NEGSflags {
 14335  			break
 14336  		}
 14337  		v_2_0_0 := v_2_0.Args[0]
 14338  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 14339  			break
 14340  		}
 14341  		v_2_0_0_0 := v_2_0_0.Args[0]
 14342  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 14343  			break
 14344  		}
 14345  		bo := v_2_0_0_0.Args[0]
 14346  		v.reset(OpARM64SBCSflags)
 14347  		v.AddArg3(x, y, bo)
 14348  		return true
 14349  	}
 14350  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 14351  	// result: (SUBSflags x y)
 14352  	for {
 14353  		x := v_0
 14354  		y := v_1
 14355  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14356  			break
 14357  		}
 14358  		v_2_0 := v_2.Args[0]
 14359  		if v_2_0.Op != OpARM64NEGSflags {
 14360  			break
 14361  		}
 14362  		v_2_0_0 := v_2_0.Args[0]
 14363  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 14364  			break
 14365  		}
 14366  		v.reset(OpARM64SUBSflags)
 14367  		v.AddArg2(x, y)
 14368  		return true
 14369  	}
 14370  	return false
 14371  }
 14372  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 14373  	v_0 := v.Args[0]
 14374  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14375  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 14376  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 14377  	for {
 14378  		bfc := auxIntToArm64BitField(v.AuxInt)
 14379  		s := v_0
 14380  		if s.Op != OpARM64SLLconst {
 14381  			break
 14382  		}
 14383  		sc := auxIntToInt64(s.AuxInt)
 14384  		x := s.Args[0]
 14385  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 14386  			break
 14387  		}
 14388  		v.reset(OpARM64SBFX)
 14389  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14390  		v.AddArg(x)
 14391  		return true
 14392  	}
 14393  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14394  	// cond: s.Uses == 1 && sc > bfc.lsb()
 14395  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 14396  	for {
 14397  		bfc := auxIntToArm64BitField(v.AuxInt)
 14398  		s := v_0
 14399  		if s.Op != OpARM64SLLconst {
 14400  			break
 14401  		}
 14402  		sc := auxIntToInt64(s.AuxInt)
 14403  		x := s.Args[0]
 14404  		if !(s.Uses == 1 && sc > bfc.lsb()) {
 14405  			break
 14406  		}
 14407  		v.reset(OpARM64SBFIZ)
 14408  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 14409  		v.AddArg(x)
 14410  		return true
 14411  	}
 14412  	return false
 14413  }
 14414  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 14415  	v_1 := v.Args[1]
 14416  	v_0 := v.Args[0]
 14417  	// match: (SLL x (MOVDconst [c]))
 14418  	// result: (SLLconst x [c&63])
 14419  	for {
 14420  		x := v_0
 14421  		if v_1.Op != OpARM64MOVDconst {
 14422  			break
 14423  		}
 14424  		c := auxIntToInt64(v_1.AuxInt)
 14425  		v.reset(OpARM64SLLconst)
 14426  		v.AuxInt = int64ToAuxInt(c & 63)
 14427  		v.AddArg(x)
 14428  		return true
 14429  	}
 14430  	// match: (SLL x (ANDconst [63] y))
 14431  	// result: (SLL x y)
 14432  	for {
 14433  		x := v_0
 14434  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14435  			break
 14436  		}
 14437  		y := v_1.Args[0]
 14438  		v.reset(OpARM64SLL)
 14439  		v.AddArg2(x, y)
 14440  		return true
 14441  	}
 14442  	return false
 14443  }
 14444  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 14445  	v_0 := v.Args[0]
 14446  	// match: (SLLconst [c] (MOVDconst [d]))
 14447  	// result: (MOVDconst [d<<uint64(c)])
 14448  	for {
 14449  		c := auxIntToInt64(v.AuxInt)
 14450  		if v_0.Op != OpARM64MOVDconst {
 14451  			break
 14452  		}
 14453  		d := auxIntToInt64(v_0.AuxInt)
 14454  		v.reset(OpARM64MOVDconst)
 14455  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 14456  		return true
 14457  	}
 14458  	// match: (SLLconst [c] (SRLconst [c] x))
 14459  	// cond: 0 < c && c < 64
 14460  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 14461  	for {
 14462  		c := auxIntToInt64(v.AuxInt)
 14463  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 14464  			break
 14465  		}
 14466  		x := v_0.Args[0]
 14467  		if !(0 < c && c < 64) {
 14468  			break
 14469  		}
 14470  		v.reset(OpARM64ANDconst)
 14471  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 14472  		v.AddArg(x)
 14473  		return true
 14474  	}
 14475  	// match: (SLLconst [lc] (MOVWreg x))
 14476  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14477  	for {
 14478  		lc := auxIntToInt64(v.AuxInt)
 14479  		if v_0.Op != OpARM64MOVWreg {
 14480  			break
 14481  		}
 14482  		x := v_0.Args[0]
 14483  		v.reset(OpARM64SBFIZ)
 14484  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14485  		v.AddArg(x)
 14486  		return true
 14487  	}
 14488  	// match: (SLLconst [lc] (MOVHreg x))
 14489  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14490  	for {
 14491  		lc := auxIntToInt64(v.AuxInt)
 14492  		if v_0.Op != OpARM64MOVHreg {
 14493  			break
 14494  		}
 14495  		x := v_0.Args[0]
 14496  		v.reset(OpARM64SBFIZ)
 14497  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14498  		v.AddArg(x)
 14499  		return true
 14500  	}
 14501  	// match: (SLLconst [lc] (MOVBreg x))
 14502  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14503  	for {
 14504  		lc := auxIntToInt64(v.AuxInt)
 14505  		if v_0.Op != OpARM64MOVBreg {
 14506  			break
 14507  		}
 14508  		x := v_0.Args[0]
 14509  		v.reset(OpARM64SBFIZ)
 14510  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14511  		v.AddArg(x)
 14512  		return true
 14513  	}
 14514  	// match: (SLLconst [lc] (MOVWUreg x))
 14515  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14516  	for {
 14517  		lc := auxIntToInt64(v.AuxInt)
 14518  		if v_0.Op != OpARM64MOVWUreg {
 14519  			break
 14520  		}
 14521  		x := v_0.Args[0]
 14522  		v.reset(OpARM64UBFIZ)
 14523  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14524  		v.AddArg(x)
 14525  		return true
 14526  	}
 14527  	// match: (SLLconst [lc] (MOVHUreg x))
 14528  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14529  	for {
 14530  		lc := auxIntToInt64(v.AuxInt)
 14531  		if v_0.Op != OpARM64MOVHUreg {
 14532  			break
 14533  		}
 14534  		x := v_0.Args[0]
 14535  		v.reset(OpARM64UBFIZ)
 14536  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14537  		v.AddArg(x)
 14538  		return true
 14539  	}
 14540  	// match: (SLLconst [lc] (MOVBUreg x))
 14541  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14542  	for {
 14543  		lc := auxIntToInt64(v.AuxInt)
 14544  		if v_0.Op != OpARM64MOVBUreg {
 14545  			break
 14546  		}
 14547  		x := v_0.Args[0]
 14548  		v.reset(OpARM64UBFIZ)
 14549  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14550  		v.AddArg(x)
 14551  		return true
 14552  	}
 14553  	// match: (SLLconst [sc] (ANDconst [ac] x))
 14554  	// cond: isARM64BFMask(sc, ac, 0)
 14555  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 14556  	for {
 14557  		sc := auxIntToInt64(v.AuxInt)
 14558  		if v_0.Op != OpARM64ANDconst {
 14559  			break
 14560  		}
 14561  		ac := auxIntToInt64(v_0.AuxInt)
 14562  		x := v_0.Args[0]
 14563  		if !(isARM64BFMask(sc, ac, 0)) {
 14564  			break
 14565  		}
 14566  		v.reset(OpARM64UBFIZ)
 14567  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 14568  		v.AddArg(x)
 14569  		return true
 14570  	}
 14571  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 14572  	// cond: sc+bfc.width()+bfc.lsb() < 64
 14573  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 14574  	for {
 14575  		sc := auxIntToInt64(v.AuxInt)
 14576  		if v_0.Op != OpARM64UBFIZ {
 14577  			break
 14578  		}
 14579  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14580  		x := v_0.Args[0]
 14581  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 14582  			break
 14583  		}
 14584  		v.reset(OpARM64UBFIZ)
 14585  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 14586  		v.AddArg(x)
 14587  		return true
 14588  	}
 14589  	return false
 14590  }
 14591  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 14592  	v_1 := v.Args[1]
 14593  	v_0 := v.Args[0]
 14594  	// match: (SRA x (MOVDconst [c]))
 14595  	// result: (SRAconst x [c&63])
 14596  	for {
 14597  		x := v_0
 14598  		if v_1.Op != OpARM64MOVDconst {
 14599  			break
 14600  		}
 14601  		c := auxIntToInt64(v_1.AuxInt)
 14602  		v.reset(OpARM64SRAconst)
 14603  		v.AuxInt = int64ToAuxInt(c & 63)
 14604  		v.AddArg(x)
 14605  		return true
 14606  	}
 14607  	// match: (SRA x (ANDconst [63] y))
 14608  	// result: (SRA x y)
 14609  	for {
 14610  		x := v_0
 14611  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14612  			break
 14613  		}
 14614  		y := v_1.Args[0]
 14615  		v.reset(OpARM64SRA)
 14616  		v.AddArg2(x, y)
 14617  		return true
 14618  	}
 14619  	return false
 14620  }
 14621  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 14622  	v_0 := v.Args[0]
 14623  	// match: (SRAconst [c] (MOVDconst [d]))
 14624  	// result: (MOVDconst [d>>uint64(c)])
 14625  	for {
 14626  		c := auxIntToInt64(v.AuxInt)
 14627  		if v_0.Op != OpARM64MOVDconst {
 14628  			break
 14629  		}
 14630  		d := auxIntToInt64(v_0.AuxInt)
 14631  		v.reset(OpARM64MOVDconst)
 14632  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 14633  		return true
 14634  	}
 14635  	// match: (SRAconst [rc] (SLLconst [lc] x))
 14636  	// cond: lc > rc
 14637  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 14638  	for {
 14639  		rc := auxIntToInt64(v.AuxInt)
 14640  		if v_0.Op != OpARM64SLLconst {
 14641  			break
 14642  		}
 14643  		lc := auxIntToInt64(v_0.AuxInt)
 14644  		x := v_0.Args[0]
 14645  		if !(lc > rc) {
 14646  			break
 14647  		}
 14648  		v.reset(OpARM64SBFIZ)
 14649  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14650  		v.AddArg(x)
 14651  		return true
 14652  	}
 14653  	// match: (SRAconst [rc] (SLLconst [lc] x))
 14654  	// cond: lc <= rc
 14655  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 14656  	for {
 14657  		rc := auxIntToInt64(v.AuxInt)
 14658  		if v_0.Op != OpARM64SLLconst {
 14659  			break
 14660  		}
 14661  		lc := auxIntToInt64(v_0.AuxInt)
 14662  		x := v_0.Args[0]
 14663  		if !(lc <= rc) {
 14664  			break
 14665  		}
 14666  		v.reset(OpARM64SBFX)
 14667  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14668  		v.AddArg(x)
 14669  		return true
 14670  	}
 14671  	// match: (SRAconst [rc] (MOVWreg x))
 14672  	// cond: rc < 32
 14673  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 14674  	for {
 14675  		rc := auxIntToInt64(v.AuxInt)
 14676  		if v_0.Op != OpARM64MOVWreg {
 14677  			break
 14678  		}
 14679  		x := v_0.Args[0]
 14680  		if !(rc < 32) {
 14681  			break
 14682  		}
 14683  		v.reset(OpARM64SBFX)
 14684  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 14685  		v.AddArg(x)
 14686  		return true
 14687  	}
 14688  	// match: (SRAconst [rc] (MOVHreg x))
 14689  	// cond: rc < 16
 14690  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 14691  	for {
 14692  		rc := auxIntToInt64(v.AuxInt)
 14693  		if v_0.Op != OpARM64MOVHreg {
 14694  			break
 14695  		}
 14696  		x := v_0.Args[0]
 14697  		if !(rc < 16) {
 14698  			break
 14699  		}
 14700  		v.reset(OpARM64SBFX)
 14701  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 14702  		v.AddArg(x)
 14703  		return true
 14704  	}
 14705  	// match: (SRAconst [rc] (MOVBreg x))
 14706  	// cond: rc < 8
 14707  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 14708  	for {
 14709  		rc := auxIntToInt64(v.AuxInt)
 14710  		if v_0.Op != OpARM64MOVBreg {
 14711  			break
 14712  		}
 14713  		x := v_0.Args[0]
 14714  		if !(rc < 8) {
 14715  			break
 14716  		}
 14717  		v.reset(OpARM64SBFX)
 14718  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 14719  		v.AddArg(x)
 14720  		return true
 14721  	}
 14722  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 14723  	// cond: sc < bfc.lsb()
 14724  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 14725  	for {
 14726  		sc := auxIntToInt64(v.AuxInt)
 14727  		if v_0.Op != OpARM64SBFIZ {
 14728  			break
 14729  		}
 14730  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14731  		x := v_0.Args[0]
 14732  		if !(sc < bfc.lsb()) {
 14733  			break
 14734  		}
 14735  		v.reset(OpARM64SBFIZ)
 14736  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14737  		v.AddArg(x)
 14738  		return true
 14739  	}
 14740  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 14741  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 14742  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 14743  	for {
 14744  		sc := auxIntToInt64(v.AuxInt)
 14745  		if v_0.Op != OpARM64SBFIZ {
 14746  			break
 14747  		}
 14748  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14749  		x := v_0.Args[0]
 14750  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 14751  			break
 14752  		}
 14753  		v.reset(OpARM64SBFX)
 14754  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 14755  		v.AddArg(x)
 14756  		return true
 14757  	}
 14758  	return false
 14759  }
 14760  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 14761  	v_1 := v.Args[1]
 14762  	v_0 := v.Args[0]
 14763  	// match: (SRL x (MOVDconst [c]))
 14764  	// result: (SRLconst x [c&63])
 14765  	for {
 14766  		x := v_0
 14767  		if v_1.Op != OpARM64MOVDconst {
 14768  			break
 14769  		}
 14770  		c := auxIntToInt64(v_1.AuxInt)
 14771  		v.reset(OpARM64SRLconst)
 14772  		v.AuxInt = int64ToAuxInt(c & 63)
 14773  		v.AddArg(x)
 14774  		return true
 14775  	}
 14776  	// match: (SRL x (ANDconst [63] y))
 14777  	// result: (SRL x y)
 14778  	for {
 14779  		x := v_0
 14780  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14781  			break
 14782  		}
 14783  		y := v_1.Args[0]
 14784  		v.reset(OpARM64SRL)
 14785  		v.AddArg2(x, y)
 14786  		return true
 14787  	}
 14788  	return false
 14789  }
 14790  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 14791  	v_0 := v.Args[0]
 14792  	// match: (SRLconst [c] (MOVDconst [d]))
 14793  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 14794  	for {
 14795  		c := auxIntToInt64(v.AuxInt)
 14796  		if v_0.Op != OpARM64MOVDconst {
 14797  			break
 14798  		}
 14799  		d := auxIntToInt64(v_0.AuxInt)
 14800  		v.reset(OpARM64MOVDconst)
 14801  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 14802  		return true
 14803  	}
 14804  	// match: (SRLconst [c] (SLLconst [c] x))
 14805  	// cond: 0 < c && c < 64
 14806  	// result: (ANDconst [1<<uint(64-c)-1] x)
 14807  	for {
 14808  		c := auxIntToInt64(v.AuxInt)
 14809  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 14810  			break
 14811  		}
 14812  		x := v_0.Args[0]
 14813  		if !(0 < c && c < 64) {
 14814  			break
 14815  		}
 14816  		v.reset(OpARM64ANDconst)
 14817  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 14818  		v.AddArg(x)
 14819  		return true
 14820  	}
 14821  	// match: (SRLconst [rc] (MOVWUreg x))
 14822  	// cond: rc >= 32
 14823  	// result: (MOVDconst [0])
 14824  	for {
 14825  		rc := auxIntToInt64(v.AuxInt)
 14826  		if v_0.Op != OpARM64MOVWUreg {
 14827  			break
 14828  		}
 14829  		if !(rc >= 32) {
 14830  			break
 14831  		}
 14832  		v.reset(OpARM64MOVDconst)
 14833  		v.AuxInt = int64ToAuxInt(0)
 14834  		return true
 14835  	}
 14836  	// match: (SRLconst [rc] (MOVHUreg x))
 14837  	// cond: rc >= 16
 14838  	// result: (MOVDconst [0])
 14839  	for {
 14840  		rc := auxIntToInt64(v.AuxInt)
 14841  		if v_0.Op != OpARM64MOVHUreg {
 14842  			break
 14843  		}
 14844  		if !(rc >= 16) {
 14845  			break
 14846  		}
 14847  		v.reset(OpARM64MOVDconst)
 14848  		v.AuxInt = int64ToAuxInt(0)
 14849  		return true
 14850  	}
 14851  	// match: (SRLconst [rc] (MOVBUreg x))
 14852  	// cond: rc >= 8
 14853  	// result: (MOVDconst [0])
 14854  	for {
 14855  		rc := auxIntToInt64(v.AuxInt)
 14856  		if v_0.Op != OpARM64MOVBUreg {
 14857  			break
 14858  		}
 14859  		if !(rc >= 8) {
 14860  			break
 14861  		}
 14862  		v.reset(OpARM64MOVDconst)
 14863  		v.AuxInt = int64ToAuxInt(0)
 14864  		return true
 14865  	}
 14866  	// match: (SRLconst [rc] (SLLconst [lc] x))
 14867  	// cond: lc > rc
 14868  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 14869  	for {
 14870  		rc := auxIntToInt64(v.AuxInt)
 14871  		if v_0.Op != OpARM64SLLconst {
 14872  			break
 14873  		}
 14874  		lc := auxIntToInt64(v_0.AuxInt)
 14875  		x := v_0.Args[0]
 14876  		if !(lc > rc) {
 14877  			break
 14878  		}
 14879  		v.reset(OpARM64UBFIZ)
 14880  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14881  		v.AddArg(x)
 14882  		return true
 14883  	}
 14884  	// match: (SRLconst [rc] (SLLconst [lc] x))
 14885  	// cond: lc < rc
 14886  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 14887  	for {
 14888  		rc := auxIntToInt64(v.AuxInt)
 14889  		if v_0.Op != OpARM64SLLconst {
 14890  			break
 14891  		}
 14892  		lc := auxIntToInt64(v_0.AuxInt)
 14893  		x := v_0.Args[0]
 14894  		if !(lc < rc) {
 14895  			break
 14896  		}
 14897  		v.reset(OpARM64UBFX)
 14898  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14899  		v.AddArg(x)
 14900  		return true
 14901  	}
 14902  	// match: (SRLconst [rc] (MOVWUreg x))
 14903  	// cond: rc < 32
 14904  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 14905  	for {
 14906  		rc := auxIntToInt64(v.AuxInt)
 14907  		if v_0.Op != OpARM64MOVWUreg {
 14908  			break
 14909  		}
 14910  		x := v_0.Args[0]
 14911  		if !(rc < 32) {
 14912  			break
 14913  		}
 14914  		v.reset(OpARM64UBFX)
 14915  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 14916  		v.AddArg(x)
 14917  		return true
 14918  	}
 14919  	// match: (SRLconst [rc] (MOVHUreg x))
 14920  	// cond: rc < 16
 14921  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 14922  	for {
 14923  		rc := auxIntToInt64(v.AuxInt)
 14924  		if v_0.Op != OpARM64MOVHUreg {
 14925  			break
 14926  		}
 14927  		x := v_0.Args[0]
 14928  		if !(rc < 16) {
 14929  			break
 14930  		}
 14931  		v.reset(OpARM64UBFX)
 14932  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 14933  		v.AddArg(x)
 14934  		return true
 14935  	}
 14936  	// match: (SRLconst [rc] (MOVBUreg x))
 14937  	// cond: rc < 8
 14938  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 14939  	for {
 14940  		rc := auxIntToInt64(v.AuxInt)
 14941  		if v_0.Op != OpARM64MOVBUreg {
 14942  			break
 14943  		}
 14944  		x := v_0.Args[0]
 14945  		if !(rc < 8) {
 14946  			break
 14947  		}
 14948  		v.reset(OpARM64UBFX)
 14949  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 14950  		v.AddArg(x)
 14951  		return true
 14952  	}
 14953  	// match: (SRLconst [sc] (ANDconst [ac] x))
 14954  	// cond: isARM64BFMask(sc, ac, sc)
 14955  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 14956  	for {
 14957  		sc := auxIntToInt64(v.AuxInt)
 14958  		if v_0.Op != OpARM64ANDconst {
 14959  			break
 14960  		}
 14961  		ac := auxIntToInt64(v_0.AuxInt)
 14962  		x := v_0.Args[0]
 14963  		if !(isARM64BFMask(sc, ac, sc)) {
 14964  			break
 14965  		}
 14966  		v.reset(OpARM64UBFX)
 14967  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 14968  		v.AddArg(x)
 14969  		return true
 14970  	}
 14971  	// match: (SRLconst [sc] (UBFX [bfc] x))
 14972  	// cond: sc < bfc.width()
 14973  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 14974  	for {
 14975  		sc := auxIntToInt64(v.AuxInt)
 14976  		if v_0.Op != OpARM64UBFX {
 14977  			break
 14978  		}
 14979  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14980  		x := v_0.Args[0]
 14981  		if !(sc < bfc.width()) {
 14982  			break
 14983  		}
 14984  		v.reset(OpARM64UBFX)
 14985  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 14986  		v.AddArg(x)
 14987  		return true
 14988  	}
 14989  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 14990  	// cond: sc == bfc.lsb()
 14991  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 14992  	for {
 14993  		sc := auxIntToInt64(v.AuxInt)
 14994  		if v_0.Op != OpARM64UBFIZ {
 14995  			break
 14996  		}
 14997  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14998  		x := v_0.Args[0]
 14999  		if !(sc == bfc.lsb()) {
 15000  			break
 15001  		}
 15002  		v.reset(OpARM64ANDconst)
 15003  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 15004  		v.AddArg(x)
 15005  		return true
 15006  	}
 15007  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15008  	// cond: sc < bfc.lsb()
 15009  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 15010  	for {
 15011  		sc := auxIntToInt64(v.AuxInt)
 15012  		if v_0.Op != OpARM64UBFIZ {
 15013  			break
 15014  		}
 15015  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15016  		x := v_0.Args[0]
 15017  		if !(sc < bfc.lsb()) {
 15018  			break
 15019  		}
 15020  		v.reset(OpARM64UBFIZ)
 15021  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15022  		v.AddArg(x)
 15023  		return true
 15024  	}
 15025  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15026  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 15027  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 15028  	for {
 15029  		sc := auxIntToInt64(v.AuxInt)
 15030  		if v_0.Op != OpARM64UBFIZ {
 15031  			break
 15032  		}
 15033  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15034  		x := v_0.Args[0]
 15035  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 15036  			break
 15037  		}
 15038  		v.reset(OpARM64UBFX)
 15039  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 15040  		v.AddArg(x)
 15041  		return true
 15042  	}
 15043  	return false
 15044  }
 15045  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 15046  	v_3 := v.Args[3]
 15047  	v_2 := v.Args[2]
 15048  	v_1 := v.Args[1]
 15049  	v_0 := v.Args[0]
 15050  	b := v.Block
 15051  	config := b.Func.Config
 15052  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 15053  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 15054  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 15055  	for {
 15056  		off1 := auxIntToInt32(v.AuxInt)
 15057  		sym := auxToSym(v.Aux)
 15058  		if v_0.Op != OpARM64ADDconst {
 15059  			break
 15060  		}
 15061  		off2 := auxIntToInt64(v_0.AuxInt)
 15062  		ptr := v_0.Args[0]
 15063  		val1 := v_1
 15064  		val2 := v_2
 15065  		mem := v_3
 15066  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 15067  			break
 15068  		}
 15069  		v.reset(OpARM64STP)
 15070  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 15071  		v.Aux = symToAux(sym)
 15072  		v.AddArg4(ptr, val1, val2, mem)
 15073  		return true
 15074  	}
 15075  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 15076  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 15077  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 15078  	for {
 15079  		off1 := auxIntToInt32(v.AuxInt)
 15080  		sym1 := auxToSym(v.Aux)
 15081  		if v_0.Op != OpARM64MOVDaddr {
 15082  			break
 15083  		}
 15084  		off2 := auxIntToInt32(v_0.AuxInt)
 15085  		sym2 := auxToSym(v_0.Aux)
 15086  		ptr := v_0.Args[0]
 15087  		val1 := v_1
 15088  		val2 := v_2
 15089  		mem := v_3
 15090  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 15091  			break
 15092  		}
 15093  		v.reset(OpARM64STP)
 15094  		v.AuxInt = int32ToAuxInt(off1 + off2)
 15095  		v.Aux = symToAux(mergeSym(sym1, sym2))
 15096  		v.AddArg4(ptr, val1, val2, mem)
 15097  		return true
 15098  	}
 15099  	return false
 15100  }
 15101  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 15102  	v_1 := v.Args[1]
 15103  	v_0 := v.Args[0]
 15104  	b := v.Block
 15105  	// match: (SUB x (MOVDconst [c]))
 15106  	// result: (SUBconst [c] x)
 15107  	for {
 15108  		x := v_0
 15109  		if v_1.Op != OpARM64MOVDconst {
 15110  			break
 15111  		}
 15112  		c := auxIntToInt64(v_1.AuxInt)
 15113  		v.reset(OpARM64SUBconst)
 15114  		v.AuxInt = int64ToAuxInt(c)
 15115  		v.AddArg(x)
 15116  		return true
 15117  	}
 15118  	// match: (SUB a l:(MUL x y))
 15119  	// cond: l.Uses==1 && clobber(l)
 15120  	// result: (MSUB a x y)
 15121  	for {
 15122  		a := v_0
 15123  		l := v_1
 15124  		if l.Op != OpARM64MUL {
 15125  			break
 15126  		}
 15127  		y := l.Args[1]
 15128  		x := l.Args[0]
 15129  		if !(l.Uses == 1 && clobber(l)) {
 15130  			break
 15131  		}
 15132  		v.reset(OpARM64MSUB)
 15133  		v.AddArg3(a, x, y)
 15134  		return true
 15135  	}
 15136  	// match: (SUB a l:(MNEG x y))
 15137  	// cond: l.Uses==1 && clobber(l)
 15138  	// result: (MADD a x y)
 15139  	for {
 15140  		a := v_0
 15141  		l := v_1
 15142  		if l.Op != OpARM64MNEG {
 15143  			break
 15144  		}
 15145  		y := l.Args[1]
 15146  		x := l.Args[0]
 15147  		if !(l.Uses == 1 && clobber(l)) {
 15148  			break
 15149  		}
 15150  		v.reset(OpARM64MADD)
 15151  		v.AddArg3(a, x, y)
 15152  		return true
 15153  	}
 15154  	// match: (SUB a l:(MULW x y))
 15155  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 15156  	// result: (MSUBW a x y)
 15157  	for {
 15158  		a := v_0
 15159  		l := v_1
 15160  		if l.Op != OpARM64MULW {
 15161  			break
 15162  		}
 15163  		y := l.Args[1]
 15164  		x := l.Args[0]
 15165  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15166  			break
 15167  		}
 15168  		v.reset(OpARM64MSUBW)
 15169  		v.AddArg3(a, x, y)
 15170  		return true
 15171  	}
 15172  	// match: (SUB a l:(MNEGW x y))
 15173  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 15174  	// result: (MADDW a x y)
 15175  	for {
 15176  		a := v_0
 15177  		l := v_1
 15178  		if l.Op != OpARM64MNEGW {
 15179  			break
 15180  		}
 15181  		y := l.Args[1]
 15182  		x := l.Args[0]
 15183  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15184  			break
 15185  		}
 15186  		v.reset(OpARM64MADDW)
 15187  		v.AddArg3(a, x, y)
 15188  		return true
 15189  	}
 15190  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 15191  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15192  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15193  	for {
 15194  		t := v.Type
 15195  		a := v_0
 15196  		p := v_1
 15197  		if p.Op != OpARM64ADDconst {
 15198  			break
 15199  		}
 15200  		c := auxIntToInt64(p.AuxInt)
 15201  		m := p.Args[0]
 15202  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15203  			break
 15204  		}
 15205  		v.reset(OpARM64SUBconst)
 15206  		v.AuxInt = int64ToAuxInt(c)
 15207  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15208  		v0.AddArg2(a, m)
 15209  		v.AddArg(v0)
 15210  		return true
 15211  	}
 15212  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 15213  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15214  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15215  	for {
 15216  		t := v.Type
 15217  		a := v_0
 15218  		p := v_1
 15219  		if p.Op != OpARM64ADDconst {
 15220  			break
 15221  		}
 15222  		c := auxIntToInt64(p.AuxInt)
 15223  		m := p.Args[0]
 15224  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15225  			break
 15226  		}
 15227  		v.reset(OpARM64SUBconst)
 15228  		v.AuxInt = int64ToAuxInt(c)
 15229  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15230  		v0.AddArg2(a, m)
 15231  		v.AddArg(v0)
 15232  		return true
 15233  	}
 15234  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 15235  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15236  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15237  	for {
 15238  		t := v.Type
 15239  		a := v_0
 15240  		p := v_1
 15241  		if p.Op != OpARM64ADDconst {
 15242  			break
 15243  		}
 15244  		c := auxIntToInt64(p.AuxInt)
 15245  		m := p.Args[0]
 15246  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15247  			break
 15248  		}
 15249  		v.reset(OpARM64SUBconst)
 15250  		v.AuxInt = int64ToAuxInt(c)
 15251  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15252  		v0.AddArg2(a, m)
 15253  		v.AddArg(v0)
 15254  		return true
 15255  	}
 15256  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 15257  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15258  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15259  	for {
 15260  		t := v.Type
 15261  		a := v_0
 15262  		p := v_1
 15263  		if p.Op != OpARM64ADDconst {
 15264  			break
 15265  		}
 15266  		c := auxIntToInt64(p.AuxInt)
 15267  		m := p.Args[0]
 15268  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15269  			break
 15270  		}
 15271  		v.reset(OpARM64SUBconst)
 15272  		v.AuxInt = int64ToAuxInt(c)
 15273  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15274  		v0.AddArg2(a, m)
 15275  		v.AddArg(v0)
 15276  		return true
 15277  	}
 15278  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 15279  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15280  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15281  	for {
 15282  		t := v.Type
 15283  		a := v_0
 15284  		p := v_1
 15285  		if p.Op != OpARM64SUBconst {
 15286  			break
 15287  		}
 15288  		c := auxIntToInt64(p.AuxInt)
 15289  		m := p.Args[0]
 15290  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15291  			break
 15292  		}
 15293  		v.reset(OpARM64ADDconst)
 15294  		v.AuxInt = int64ToAuxInt(c)
 15295  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15296  		v0.AddArg2(a, m)
 15297  		v.AddArg(v0)
 15298  		return true
 15299  	}
 15300  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 15301  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15302  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15303  	for {
 15304  		t := v.Type
 15305  		a := v_0
 15306  		p := v_1
 15307  		if p.Op != OpARM64SUBconst {
 15308  			break
 15309  		}
 15310  		c := auxIntToInt64(p.AuxInt)
 15311  		m := p.Args[0]
 15312  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15313  			break
 15314  		}
 15315  		v.reset(OpARM64ADDconst)
 15316  		v.AuxInt = int64ToAuxInt(c)
 15317  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15318  		v0.AddArg2(a, m)
 15319  		v.AddArg(v0)
 15320  		return true
 15321  	}
 15322  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 15323  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15324  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15325  	for {
 15326  		t := v.Type
 15327  		a := v_0
 15328  		p := v_1
 15329  		if p.Op != OpARM64SUBconst {
 15330  			break
 15331  		}
 15332  		c := auxIntToInt64(p.AuxInt)
 15333  		m := p.Args[0]
 15334  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15335  			break
 15336  		}
 15337  		v.reset(OpARM64ADDconst)
 15338  		v.AuxInt = int64ToAuxInt(c)
 15339  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15340  		v0.AddArg2(a, m)
 15341  		v.AddArg(v0)
 15342  		return true
 15343  	}
 15344  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 15345  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15346  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15347  	for {
 15348  		t := v.Type
 15349  		a := v_0
 15350  		p := v_1
 15351  		if p.Op != OpARM64SUBconst {
 15352  			break
 15353  		}
 15354  		c := auxIntToInt64(p.AuxInt)
 15355  		m := p.Args[0]
 15356  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15357  			break
 15358  		}
 15359  		v.reset(OpARM64ADDconst)
 15360  		v.AuxInt = int64ToAuxInt(c)
 15361  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15362  		v0.AddArg2(a, m)
 15363  		v.AddArg(v0)
 15364  		return true
 15365  	}
 15366  	// match: (SUB x (NEG y))
 15367  	// result: (ADD x y)
 15368  	for {
 15369  		x := v_0
 15370  		if v_1.Op != OpARM64NEG {
 15371  			break
 15372  		}
 15373  		y := v_1.Args[0]
 15374  		v.reset(OpARM64ADD)
 15375  		v.AddArg2(x, y)
 15376  		return true
 15377  	}
 15378  	// match: (SUB x x)
 15379  	// result: (MOVDconst [0])
 15380  	for {
 15381  		x := v_0
 15382  		if x != v_1 {
 15383  			break
 15384  		}
 15385  		v.reset(OpARM64MOVDconst)
 15386  		v.AuxInt = int64ToAuxInt(0)
 15387  		return true
 15388  	}
 15389  	// match: (SUB x (SUB y z))
 15390  	// result: (SUB (ADD <v.Type> x z) y)
 15391  	for {
 15392  		x := v_0
 15393  		if v_1.Op != OpARM64SUB {
 15394  			break
 15395  		}
 15396  		z := v_1.Args[1]
 15397  		y := v_1.Args[0]
 15398  		v.reset(OpARM64SUB)
 15399  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 15400  		v0.AddArg2(x, z)
 15401  		v.AddArg2(v0, y)
 15402  		return true
 15403  	}
 15404  	// match: (SUB (SUB x y) z)
 15405  	// result: (SUB x (ADD <y.Type> y z))
 15406  	for {
 15407  		if v_0.Op != OpARM64SUB {
 15408  			break
 15409  		}
 15410  		y := v_0.Args[1]
 15411  		x := v_0.Args[0]
 15412  		z := v_1
 15413  		v.reset(OpARM64SUB)
 15414  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 15415  		v0.AddArg2(y, z)
 15416  		v.AddArg2(x, v0)
 15417  		return true
 15418  	}
 15419  	// match: (SUB x0 x1:(SLLconst [c] y))
 15420  	// cond: clobberIfDead(x1)
 15421  	// result: (SUBshiftLL x0 y [c])
 15422  	for {
 15423  		x0 := v_0
 15424  		x1 := v_1
 15425  		if x1.Op != OpARM64SLLconst {
 15426  			break
 15427  		}
 15428  		c := auxIntToInt64(x1.AuxInt)
 15429  		y := x1.Args[0]
 15430  		if !(clobberIfDead(x1)) {
 15431  			break
 15432  		}
 15433  		v.reset(OpARM64SUBshiftLL)
 15434  		v.AuxInt = int64ToAuxInt(c)
 15435  		v.AddArg2(x0, y)
 15436  		return true
 15437  	}
 15438  	// match: (SUB x0 x1:(SRLconst [c] y))
 15439  	// cond: clobberIfDead(x1)
 15440  	// result: (SUBshiftRL x0 y [c])
 15441  	for {
 15442  		x0 := v_0
 15443  		x1 := v_1
 15444  		if x1.Op != OpARM64SRLconst {
 15445  			break
 15446  		}
 15447  		c := auxIntToInt64(x1.AuxInt)
 15448  		y := x1.Args[0]
 15449  		if !(clobberIfDead(x1)) {
 15450  			break
 15451  		}
 15452  		v.reset(OpARM64SUBshiftRL)
 15453  		v.AuxInt = int64ToAuxInt(c)
 15454  		v.AddArg2(x0, y)
 15455  		return true
 15456  	}
 15457  	// match: (SUB x0 x1:(SRAconst [c] y))
 15458  	// cond: clobberIfDead(x1)
 15459  	// result: (SUBshiftRA x0 y [c])
 15460  	for {
 15461  		x0 := v_0
 15462  		x1 := v_1
 15463  		if x1.Op != OpARM64SRAconst {
 15464  			break
 15465  		}
 15466  		c := auxIntToInt64(x1.AuxInt)
 15467  		y := x1.Args[0]
 15468  		if !(clobberIfDead(x1)) {
 15469  			break
 15470  		}
 15471  		v.reset(OpARM64SUBshiftRA)
 15472  		v.AuxInt = int64ToAuxInt(c)
 15473  		v.AddArg2(x0, y)
 15474  		return true
 15475  	}
 15476  	return false
 15477  }
 15478  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 15479  	v_0 := v.Args[0]
 15480  	// match: (SUBconst [0] x)
 15481  	// result: x
 15482  	for {
 15483  		if auxIntToInt64(v.AuxInt) != 0 {
 15484  			break
 15485  		}
 15486  		x := v_0
 15487  		v.copyOf(x)
 15488  		return true
 15489  	}
 15490  	// match: (SUBconst [c] (MOVDconst [d]))
 15491  	// result: (MOVDconst [d-c])
 15492  	for {
 15493  		c := auxIntToInt64(v.AuxInt)
 15494  		if v_0.Op != OpARM64MOVDconst {
 15495  			break
 15496  		}
 15497  		d := auxIntToInt64(v_0.AuxInt)
 15498  		v.reset(OpARM64MOVDconst)
 15499  		v.AuxInt = int64ToAuxInt(d - c)
 15500  		return true
 15501  	}
 15502  	// match: (SUBconst [c] (SUBconst [d] x))
 15503  	// result: (ADDconst [-c-d] x)
 15504  	for {
 15505  		c := auxIntToInt64(v.AuxInt)
 15506  		if v_0.Op != OpARM64SUBconst {
 15507  			break
 15508  		}
 15509  		d := auxIntToInt64(v_0.AuxInt)
 15510  		x := v_0.Args[0]
 15511  		v.reset(OpARM64ADDconst)
 15512  		v.AuxInt = int64ToAuxInt(-c - d)
 15513  		v.AddArg(x)
 15514  		return true
 15515  	}
 15516  	// match: (SUBconst [c] (ADDconst [d] x))
 15517  	// result: (ADDconst [-c+d] x)
 15518  	for {
 15519  		c := auxIntToInt64(v.AuxInt)
 15520  		if v_0.Op != OpARM64ADDconst {
 15521  			break
 15522  		}
 15523  		d := auxIntToInt64(v_0.AuxInt)
 15524  		x := v_0.Args[0]
 15525  		v.reset(OpARM64ADDconst)
 15526  		v.AuxInt = int64ToAuxInt(-c + d)
 15527  		v.AddArg(x)
 15528  		return true
 15529  	}
 15530  	return false
 15531  }
 15532  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 15533  	v_1 := v.Args[1]
 15534  	v_0 := v.Args[0]
 15535  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 15536  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 15537  	for {
 15538  		d := auxIntToInt64(v.AuxInt)
 15539  		x := v_0
 15540  		if v_1.Op != OpARM64MOVDconst {
 15541  			break
 15542  		}
 15543  		c := auxIntToInt64(v_1.AuxInt)
 15544  		v.reset(OpARM64SUBconst)
 15545  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15546  		v.AddArg(x)
 15547  		return true
 15548  	}
 15549  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 15550  	// result: (MOVDconst [0])
 15551  	for {
 15552  		c := auxIntToInt64(v.AuxInt)
 15553  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15554  			break
 15555  		}
 15556  		x := v_0.Args[0]
 15557  		if x != v_1 {
 15558  			break
 15559  		}
 15560  		v.reset(OpARM64MOVDconst)
 15561  		v.AuxInt = int64ToAuxInt(0)
 15562  		return true
 15563  	}
 15564  	return false
 15565  }
 15566  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 15567  	v_1 := v.Args[1]
 15568  	v_0 := v.Args[0]
 15569  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 15570  	// result: (SUBconst x [c>>uint64(d)])
 15571  	for {
 15572  		d := auxIntToInt64(v.AuxInt)
 15573  		x := v_0
 15574  		if v_1.Op != OpARM64MOVDconst {
 15575  			break
 15576  		}
 15577  		c := auxIntToInt64(v_1.AuxInt)
 15578  		v.reset(OpARM64SUBconst)
 15579  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15580  		v.AddArg(x)
 15581  		return true
 15582  	}
 15583  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 15584  	// result: (MOVDconst [0])
 15585  	for {
 15586  		c := auxIntToInt64(v.AuxInt)
 15587  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15588  			break
 15589  		}
 15590  		x := v_0.Args[0]
 15591  		if x != v_1 {
 15592  			break
 15593  		}
 15594  		v.reset(OpARM64MOVDconst)
 15595  		v.AuxInt = int64ToAuxInt(0)
 15596  		return true
 15597  	}
 15598  	return false
 15599  }
 15600  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 15601  	v_1 := v.Args[1]
 15602  	v_0 := v.Args[0]
 15603  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 15604  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 15605  	for {
 15606  		d := auxIntToInt64(v.AuxInt)
 15607  		x := v_0
 15608  		if v_1.Op != OpARM64MOVDconst {
 15609  			break
 15610  		}
 15611  		c := auxIntToInt64(v_1.AuxInt)
 15612  		v.reset(OpARM64SUBconst)
 15613  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15614  		v.AddArg(x)
 15615  		return true
 15616  	}
 15617  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 15618  	// result: (MOVDconst [0])
 15619  	for {
 15620  		c := auxIntToInt64(v.AuxInt)
 15621  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15622  			break
 15623  		}
 15624  		x := v_0.Args[0]
 15625  		if x != v_1 {
 15626  			break
 15627  		}
 15628  		v.reset(OpARM64MOVDconst)
 15629  		v.AuxInt = int64ToAuxInt(0)
 15630  		return true
 15631  	}
 15632  	return false
 15633  }
 15634  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 15635  	v_1 := v.Args[1]
 15636  	v_0 := v.Args[0]
 15637  	// match: (TST x (MOVDconst [c]))
 15638  	// result: (TSTconst [c] x)
 15639  	for {
 15640  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15641  			x := v_0
 15642  			if v_1.Op != OpARM64MOVDconst {
 15643  				continue
 15644  			}
 15645  			c := auxIntToInt64(v_1.AuxInt)
 15646  			v.reset(OpARM64TSTconst)
 15647  			v.AuxInt = int64ToAuxInt(c)
 15648  			v.AddArg(x)
 15649  			return true
 15650  		}
 15651  		break
 15652  	}
 15653  	// match: (TST x0 x1:(SLLconst [c] y))
 15654  	// cond: clobberIfDead(x1)
 15655  	// result: (TSTshiftLL x0 y [c])
 15656  	for {
 15657  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15658  			x0 := v_0
 15659  			x1 := v_1
 15660  			if x1.Op != OpARM64SLLconst {
 15661  				continue
 15662  			}
 15663  			c := auxIntToInt64(x1.AuxInt)
 15664  			y := x1.Args[0]
 15665  			if !(clobberIfDead(x1)) {
 15666  				continue
 15667  			}
 15668  			v.reset(OpARM64TSTshiftLL)
 15669  			v.AuxInt = int64ToAuxInt(c)
 15670  			v.AddArg2(x0, y)
 15671  			return true
 15672  		}
 15673  		break
 15674  	}
 15675  	// match: (TST x0 x1:(SRLconst [c] y))
 15676  	// cond: clobberIfDead(x1)
 15677  	// result: (TSTshiftRL x0 y [c])
 15678  	for {
 15679  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15680  			x0 := v_0
 15681  			x1 := v_1
 15682  			if x1.Op != OpARM64SRLconst {
 15683  				continue
 15684  			}
 15685  			c := auxIntToInt64(x1.AuxInt)
 15686  			y := x1.Args[0]
 15687  			if !(clobberIfDead(x1)) {
 15688  				continue
 15689  			}
 15690  			v.reset(OpARM64TSTshiftRL)
 15691  			v.AuxInt = int64ToAuxInt(c)
 15692  			v.AddArg2(x0, y)
 15693  			return true
 15694  		}
 15695  		break
 15696  	}
 15697  	// match: (TST x0 x1:(SRAconst [c] y))
 15698  	// cond: clobberIfDead(x1)
 15699  	// result: (TSTshiftRA x0 y [c])
 15700  	for {
 15701  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15702  			x0 := v_0
 15703  			x1 := v_1
 15704  			if x1.Op != OpARM64SRAconst {
 15705  				continue
 15706  			}
 15707  			c := auxIntToInt64(x1.AuxInt)
 15708  			y := x1.Args[0]
 15709  			if !(clobberIfDead(x1)) {
 15710  				continue
 15711  			}
 15712  			v.reset(OpARM64TSTshiftRA)
 15713  			v.AuxInt = int64ToAuxInt(c)
 15714  			v.AddArg2(x0, y)
 15715  			return true
 15716  		}
 15717  		break
 15718  	}
 15719  	// match: (TST x0 x1:(RORconst [c] y))
 15720  	// cond: clobberIfDead(x1)
 15721  	// result: (TSTshiftRO x0 y [c])
 15722  	for {
 15723  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15724  			x0 := v_0
 15725  			x1 := v_1
 15726  			if x1.Op != OpARM64RORconst {
 15727  				continue
 15728  			}
 15729  			c := auxIntToInt64(x1.AuxInt)
 15730  			y := x1.Args[0]
 15731  			if !(clobberIfDead(x1)) {
 15732  				continue
 15733  			}
 15734  			v.reset(OpARM64TSTshiftRO)
 15735  			v.AuxInt = int64ToAuxInt(c)
 15736  			v.AddArg2(x0, y)
 15737  			return true
 15738  		}
 15739  		break
 15740  	}
 15741  	return false
 15742  }
 15743  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 15744  	v_1 := v.Args[1]
 15745  	v_0 := v.Args[0]
 15746  	// match: (TSTW x (MOVDconst [c]))
 15747  	// result: (TSTWconst [int32(c)] x)
 15748  	for {
 15749  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15750  			x := v_0
 15751  			if v_1.Op != OpARM64MOVDconst {
 15752  				continue
 15753  			}
 15754  			c := auxIntToInt64(v_1.AuxInt)
 15755  			v.reset(OpARM64TSTWconst)
 15756  			v.AuxInt = int32ToAuxInt(int32(c))
 15757  			v.AddArg(x)
 15758  			return true
 15759  		}
 15760  		break
 15761  	}
 15762  	return false
 15763  }
 15764  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 15765  	v_0 := v.Args[0]
 15766  	// match: (TSTWconst (MOVDconst [x]) [y])
 15767  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 15768  	for {
 15769  		y := auxIntToInt32(v.AuxInt)
 15770  		if v_0.Op != OpARM64MOVDconst {
 15771  			break
 15772  		}
 15773  		x := auxIntToInt64(v_0.AuxInt)
 15774  		v.reset(OpARM64FlagConstant)
 15775  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 15776  		return true
 15777  	}
 15778  	return false
 15779  }
 15780  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 15781  	v_0 := v.Args[0]
 15782  	// match: (TSTconst (MOVDconst [x]) [y])
 15783  	// result: (FlagConstant [logicFlags64(x&y)])
 15784  	for {
 15785  		y := auxIntToInt64(v.AuxInt)
 15786  		if v_0.Op != OpARM64MOVDconst {
 15787  			break
 15788  		}
 15789  		x := auxIntToInt64(v_0.AuxInt)
 15790  		v.reset(OpARM64FlagConstant)
 15791  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 15792  		return true
 15793  	}
 15794  	return false
 15795  }
 15796  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 15797  	v_1 := v.Args[1]
 15798  	v_0 := v.Args[0]
 15799  	b := v.Block
 15800  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 15801  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 15802  	for {
 15803  		d := auxIntToInt64(v.AuxInt)
 15804  		if v_0.Op != OpARM64MOVDconst {
 15805  			break
 15806  		}
 15807  		c := auxIntToInt64(v_0.AuxInt)
 15808  		x := v_1
 15809  		v.reset(OpARM64TSTconst)
 15810  		v.AuxInt = int64ToAuxInt(c)
 15811  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 15812  		v0.AuxInt = int64ToAuxInt(d)
 15813  		v0.AddArg(x)
 15814  		v.AddArg(v0)
 15815  		return true
 15816  	}
 15817  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 15818  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 15819  	for {
 15820  		d := auxIntToInt64(v.AuxInt)
 15821  		x := v_0
 15822  		if v_1.Op != OpARM64MOVDconst {
 15823  			break
 15824  		}
 15825  		c := auxIntToInt64(v_1.AuxInt)
 15826  		v.reset(OpARM64TSTconst)
 15827  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15828  		v.AddArg(x)
 15829  		return true
 15830  	}
 15831  	return false
 15832  }
 15833  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 15834  	v_1 := v.Args[1]
 15835  	v_0 := v.Args[0]
 15836  	b := v.Block
 15837  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 15838  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 15839  	for {
 15840  		d := auxIntToInt64(v.AuxInt)
 15841  		if v_0.Op != OpARM64MOVDconst {
 15842  			break
 15843  		}
 15844  		c := auxIntToInt64(v_0.AuxInt)
 15845  		x := v_1
 15846  		v.reset(OpARM64TSTconst)
 15847  		v.AuxInt = int64ToAuxInt(c)
 15848  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 15849  		v0.AuxInt = int64ToAuxInt(d)
 15850  		v0.AddArg(x)
 15851  		v.AddArg(v0)
 15852  		return true
 15853  	}
 15854  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 15855  	// result: (TSTconst x [c>>uint64(d)])
 15856  	for {
 15857  		d := auxIntToInt64(v.AuxInt)
 15858  		x := v_0
 15859  		if v_1.Op != OpARM64MOVDconst {
 15860  			break
 15861  		}
 15862  		c := auxIntToInt64(v_1.AuxInt)
 15863  		v.reset(OpARM64TSTconst)
 15864  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15865  		v.AddArg(x)
 15866  		return true
 15867  	}
 15868  	return false
 15869  }
 15870  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 15871  	v_1 := v.Args[1]
 15872  	v_0 := v.Args[0]
 15873  	b := v.Block
 15874  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 15875  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 15876  	for {
 15877  		d := auxIntToInt64(v.AuxInt)
 15878  		if v_0.Op != OpARM64MOVDconst {
 15879  			break
 15880  		}
 15881  		c := auxIntToInt64(v_0.AuxInt)
 15882  		x := v_1
 15883  		v.reset(OpARM64TSTconst)
 15884  		v.AuxInt = int64ToAuxInt(c)
 15885  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 15886  		v0.AuxInt = int64ToAuxInt(d)
 15887  		v0.AddArg(x)
 15888  		v.AddArg(v0)
 15889  		return true
 15890  	}
 15891  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 15892  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 15893  	for {
 15894  		d := auxIntToInt64(v.AuxInt)
 15895  		x := v_0
 15896  		if v_1.Op != OpARM64MOVDconst {
 15897  			break
 15898  		}
 15899  		c := auxIntToInt64(v_1.AuxInt)
 15900  		v.reset(OpARM64TSTconst)
 15901  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15902  		v.AddArg(x)
 15903  		return true
 15904  	}
 15905  	return false
 15906  }
 15907  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 15908  	v_1 := v.Args[1]
 15909  	v_0 := v.Args[0]
 15910  	b := v.Block
 15911  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 15912  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 15913  	for {
 15914  		d := auxIntToInt64(v.AuxInt)
 15915  		if v_0.Op != OpARM64MOVDconst {
 15916  			break
 15917  		}
 15918  		c := auxIntToInt64(v_0.AuxInt)
 15919  		x := v_1
 15920  		v.reset(OpARM64TSTconst)
 15921  		v.AuxInt = int64ToAuxInt(c)
 15922  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 15923  		v0.AuxInt = int64ToAuxInt(d)
 15924  		v0.AddArg(x)
 15925  		v.AddArg(v0)
 15926  		return true
 15927  	}
 15928  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 15929  	// result: (TSTconst x [rotateRight64(c, d)])
 15930  	for {
 15931  		d := auxIntToInt64(v.AuxInt)
 15932  		x := v_0
 15933  		if v_1.Op != OpARM64MOVDconst {
 15934  			break
 15935  		}
 15936  		c := auxIntToInt64(v_1.AuxInt)
 15937  		v.reset(OpARM64TSTconst)
 15938  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 15939  		v.AddArg(x)
 15940  		return true
 15941  	}
 15942  	return false
 15943  }
 15944  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 15945  	v_0 := v.Args[0]
 15946  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 15947  	// cond: sc < bfc.width()
 15948  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 15949  	for {
 15950  		bfc := auxIntToArm64BitField(v.AuxInt)
 15951  		if v_0.Op != OpARM64SLLconst {
 15952  			break
 15953  		}
 15954  		sc := auxIntToInt64(v_0.AuxInt)
 15955  		x := v_0.Args[0]
 15956  		if !(sc < bfc.width()) {
 15957  			break
 15958  		}
 15959  		v.reset(OpARM64UBFIZ)
 15960  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 15961  		v.AddArg(x)
 15962  		return true
 15963  	}
 15964  	return false
 15965  }
 15966  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 15967  	v_0 := v.Args[0]
 15968  	// match: (UBFX [bfc] (ANDconst [c] x))
 15969  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 15970  	// result: (UBFX [bfc] x)
 15971  	for {
 15972  		bfc := auxIntToArm64BitField(v.AuxInt)
 15973  		if v_0.Op != OpARM64ANDconst {
 15974  			break
 15975  		}
 15976  		c := auxIntToInt64(v_0.AuxInt)
 15977  		x := v_0.Args[0]
 15978  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 15979  			break
 15980  		}
 15981  		v.reset(OpARM64UBFX)
 15982  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15983  		v.AddArg(x)
 15984  		return true
 15985  	}
 15986  	// match: (UBFX [bfc] e:(MOVWUreg x))
 15987  	// cond: e.Uses == 1 && bfc.lsb() < 32
 15988  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 15989  	for {
 15990  		bfc := auxIntToArm64BitField(v.AuxInt)
 15991  		e := v_0
 15992  		if e.Op != OpARM64MOVWUreg {
 15993  			break
 15994  		}
 15995  		x := e.Args[0]
 15996  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 15997  			break
 15998  		}
 15999  		v.reset(OpARM64UBFX)
 16000  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 16001  		v.AddArg(x)
 16002  		return true
 16003  	}
 16004  	// match: (UBFX [bfc] e:(MOVHUreg x))
 16005  	// cond: e.Uses == 1 && bfc.lsb() < 16
 16006  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 16007  	for {
 16008  		bfc := auxIntToArm64BitField(v.AuxInt)
 16009  		e := v_0
 16010  		if e.Op != OpARM64MOVHUreg {
 16011  			break
 16012  		}
 16013  		x := e.Args[0]
 16014  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 16015  			break
 16016  		}
 16017  		v.reset(OpARM64UBFX)
 16018  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 16019  		v.AddArg(x)
 16020  		return true
 16021  	}
 16022  	// match: (UBFX [bfc] e:(MOVBUreg x))
 16023  	// cond: e.Uses == 1 && bfc.lsb() < 8
 16024  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 16025  	for {
 16026  		bfc := auxIntToArm64BitField(v.AuxInt)
 16027  		e := v_0
 16028  		if e.Op != OpARM64MOVBUreg {
 16029  			break
 16030  		}
 16031  		x := e.Args[0]
 16032  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 16033  			break
 16034  		}
 16035  		v.reset(OpARM64UBFX)
 16036  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 16037  		v.AddArg(x)
 16038  		return true
 16039  	}
 16040  	// match: (UBFX [bfc] (SRLconst [sc] x))
 16041  	// cond: sc+bfc.width()+bfc.lsb() < 64
 16042  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 16043  	for {
 16044  		bfc := auxIntToArm64BitField(v.AuxInt)
 16045  		if v_0.Op != OpARM64SRLconst {
 16046  			break
 16047  		}
 16048  		sc := auxIntToInt64(v_0.AuxInt)
 16049  		x := v_0.Args[0]
 16050  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 16051  			break
 16052  		}
 16053  		v.reset(OpARM64UBFX)
 16054  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 16055  		v.AddArg(x)
 16056  		return true
 16057  	}
 16058  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16059  	// cond: sc == bfc.lsb()
 16060  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 16061  	for {
 16062  		bfc := auxIntToArm64BitField(v.AuxInt)
 16063  		if v_0.Op != OpARM64SLLconst {
 16064  			break
 16065  		}
 16066  		sc := auxIntToInt64(v_0.AuxInt)
 16067  		x := v_0.Args[0]
 16068  		if !(sc == bfc.lsb()) {
 16069  			break
 16070  		}
 16071  		v.reset(OpARM64ANDconst)
 16072  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 16073  		v.AddArg(x)
 16074  		return true
 16075  	}
 16076  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16077  	// cond: sc < bfc.lsb()
 16078  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16079  	for {
 16080  		bfc := auxIntToArm64BitField(v.AuxInt)
 16081  		if v_0.Op != OpARM64SLLconst {
 16082  			break
 16083  		}
 16084  		sc := auxIntToInt64(v_0.AuxInt)
 16085  		x := v_0.Args[0]
 16086  		if !(sc < bfc.lsb()) {
 16087  			break
 16088  		}
 16089  		v.reset(OpARM64UBFX)
 16090  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16091  		v.AddArg(x)
 16092  		return true
 16093  	}
 16094  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16095  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16096  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16097  	for {
 16098  		bfc := auxIntToArm64BitField(v.AuxInt)
 16099  		if v_0.Op != OpARM64SLLconst {
 16100  			break
 16101  		}
 16102  		sc := auxIntToInt64(v_0.AuxInt)
 16103  		x := v_0.Args[0]
 16104  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16105  			break
 16106  		}
 16107  		v.reset(OpARM64UBFIZ)
 16108  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16109  		v.AddArg(x)
 16110  		return true
 16111  	}
 16112  	return false
 16113  }
 16114  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 16115  	v_1 := v.Args[1]
 16116  	v_0 := v.Args[0]
 16117  	// match: (UDIV x (MOVDconst [1]))
 16118  	// result: x
 16119  	for {
 16120  		x := v_0
 16121  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 16122  			break
 16123  		}
 16124  		v.copyOf(x)
 16125  		return true
 16126  	}
 16127  	// match: (UDIV x (MOVDconst [c]))
 16128  	// cond: isPowerOfTwo(c)
 16129  	// result: (SRLconst [log64(c)] x)
 16130  	for {
 16131  		x := v_0
 16132  		if v_1.Op != OpARM64MOVDconst {
 16133  			break
 16134  		}
 16135  		c := auxIntToInt64(v_1.AuxInt)
 16136  		if !(isPowerOfTwo(c)) {
 16137  			break
 16138  		}
 16139  		v.reset(OpARM64SRLconst)
 16140  		v.AuxInt = int64ToAuxInt(log64(c))
 16141  		v.AddArg(x)
 16142  		return true
 16143  	}
 16144  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 16145  	// cond: d != 0
 16146  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 16147  	for {
 16148  		if v_0.Op != OpARM64MOVDconst {
 16149  			break
 16150  		}
 16151  		c := auxIntToInt64(v_0.AuxInt)
 16152  		if v_1.Op != OpARM64MOVDconst {
 16153  			break
 16154  		}
 16155  		d := auxIntToInt64(v_1.AuxInt)
 16156  		if !(d != 0) {
 16157  			break
 16158  		}
 16159  		v.reset(OpARM64MOVDconst)
 16160  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 16161  		return true
 16162  	}
 16163  	return false
 16164  }
 16165  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 16166  	v_1 := v.Args[1]
 16167  	v_0 := v.Args[0]
 16168  	b := v.Block
 16169  	// match: (UDIVW x (MOVDconst [c]))
 16170  	// cond: uint32(c)==1
 16171  	// result: (MOVWUreg x)
 16172  	for {
 16173  		x := v_0
 16174  		if v_1.Op != OpARM64MOVDconst {
 16175  			break
 16176  		}
 16177  		c := auxIntToInt64(v_1.AuxInt)
 16178  		if !(uint32(c) == 1) {
 16179  			break
 16180  		}
 16181  		v.reset(OpARM64MOVWUreg)
 16182  		v.AddArg(x)
 16183  		return true
 16184  	}
 16185  	// match: (UDIVW x (MOVDconst [c]))
 16186  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16187  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 16188  	for {
 16189  		x := v_0
 16190  		if v_1.Op != OpARM64MOVDconst {
 16191  			break
 16192  		}
 16193  		c := auxIntToInt64(v_1.AuxInt)
 16194  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16195  			break
 16196  		}
 16197  		v.reset(OpARM64SRLconst)
 16198  		v.AuxInt = int64ToAuxInt(log64(c))
 16199  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 16200  		v0.AddArg(x)
 16201  		v.AddArg(v0)
 16202  		return true
 16203  	}
 16204  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 16205  	// cond: d != 0
 16206  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 16207  	for {
 16208  		if v_0.Op != OpARM64MOVDconst {
 16209  			break
 16210  		}
 16211  		c := auxIntToInt64(v_0.AuxInt)
 16212  		if v_1.Op != OpARM64MOVDconst {
 16213  			break
 16214  		}
 16215  		d := auxIntToInt64(v_1.AuxInt)
 16216  		if !(d != 0) {
 16217  			break
 16218  		}
 16219  		v.reset(OpARM64MOVDconst)
 16220  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 16221  		return true
 16222  	}
 16223  	return false
 16224  }
 16225  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 16226  	v_1 := v.Args[1]
 16227  	v_0 := v.Args[0]
 16228  	b := v.Block
 16229  	typ := &b.Func.Config.Types
 16230  	// match: (UMOD <typ.UInt64> x y)
 16231  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 16232  	for {
 16233  		if v.Type != typ.UInt64 {
 16234  			break
 16235  		}
 16236  		x := v_0
 16237  		y := v_1
 16238  		v.reset(OpARM64MSUB)
 16239  		v.Type = typ.UInt64
 16240  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 16241  		v0.AddArg2(x, y)
 16242  		v.AddArg3(x, y, v0)
 16243  		return true
 16244  	}
 16245  	// match: (UMOD _ (MOVDconst [1]))
 16246  	// result: (MOVDconst [0])
 16247  	for {
 16248  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 16249  			break
 16250  		}
 16251  		v.reset(OpARM64MOVDconst)
 16252  		v.AuxInt = int64ToAuxInt(0)
 16253  		return true
 16254  	}
 16255  	// match: (UMOD x (MOVDconst [c]))
 16256  	// cond: isPowerOfTwo(c)
 16257  	// result: (ANDconst [c-1] x)
 16258  	for {
 16259  		x := v_0
 16260  		if v_1.Op != OpARM64MOVDconst {
 16261  			break
 16262  		}
 16263  		c := auxIntToInt64(v_1.AuxInt)
 16264  		if !(isPowerOfTwo(c)) {
 16265  			break
 16266  		}
 16267  		v.reset(OpARM64ANDconst)
 16268  		v.AuxInt = int64ToAuxInt(c - 1)
 16269  		v.AddArg(x)
 16270  		return true
 16271  	}
 16272  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 16273  	// cond: d != 0
 16274  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 16275  	for {
 16276  		if v_0.Op != OpARM64MOVDconst {
 16277  			break
 16278  		}
 16279  		c := auxIntToInt64(v_0.AuxInt)
 16280  		if v_1.Op != OpARM64MOVDconst {
 16281  			break
 16282  		}
 16283  		d := auxIntToInt64(v_1.AuxInt)
 16284  		if !(d != 0) {
 16285  			break
 16286  		}
 16287  		v.reset(OpARM64MOVDconst)
 16288  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 16289  		return true
 16290  	}
 16291  	return false
 16292  }
 16293  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 16294  	v_1 := v.Args[1]
 16295  	v_0 := v.Args[0]
 16296  	b := v.Block
 16297  	typ := &b.Func.Config.Types
 16298  	// match: (UMODW <typ.UInt32> x y)
 16299  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 16300  	for {
 16301  		if v.Type != typ.UInt32 {
 16302  			break
 16303  		}
 16304  		x := v_0
 16305  		y := v_1
 16306  		v.reset(OpARM64MSUBW)
 16307  		v.Type = typ.UInt32
 16308  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 16309  		v0.AddArg2(x, y)
 16310  		v.AddArg3(x, y, v0)
 16311  		return true
 16312  	}
 16313  	// match: (UMODW _ (MOVDconst [c]))
 16314  	// cond: uint32(c)==1
 16315  	// result: (MOVDconst [0])
 16316  	for {
 16317  		if v_1.Op != OpARM64MOVDconst {
 16318  			break
 16319  		}
 16320  		c := auxIntToInt64(v_1.AuxInt)
 16321  		if !(uint32(c) == 1) {
 16322  			break
 16323  		}
 16324  		v.reset(OpARM64MOVDconst)
 16325  		v.AuxInt = int64ToAuxInt(0)
 16326  		return true
 16327  	}
 16328  	// match: (UMODW x (MOVDconst [c]))
 16329  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16330  	// result: (ANDconst [c-1] x)
 16331  	for {
 16332  		x := v_0
 16333  		if v_1.Op != OpARM64MOVDconst {
 16334  			break
 16335  		}
 16336  		c := auxIntToInt64(v_1.AuxInt)
 16337  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16338  			break
 16339  		}
 16340  		v.reset(OpARM64ANDconst)
 16341  		v.AuxInt = int64ToAuxInt(c - 1)
 16342  		v.AddArg(x)
 16343  		return true
 16344  	}
 16345  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 16346  	// cond: d != 0
 16347  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 16348  	for {
 16349  		if v_0.Op != OpARM64MOVDconst {
 16350  			break
 16351  		}
 16352  		c := auxIntToInt64(v_0.AuxInt)
 16353  		if v_1.Op != OpARM64MOVDconst {
 16354  			break
 16355  		}
 16356  		d := auxIntToInt64(v_1.AuxInt)
 16357  		if !(d != 0) {
 16358  			break
 16359  		}
 16360  		v.reset(OpARM64MOVDconst)
 16361  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 16362  		return true
 16363  	}
 16364  	return false
 16365  }
 16366  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 16367  	v_1 := v.Args[1]
 16368  	v_0 := v.Args[0]
 16369  	// match: (XOR x (MOVDconst [c]))
 16370  	// result: (XORconst [c] x)
 16371  	for {
 16372  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16373  			x := v_0
 16374  			if v_1.Op != OpARM64MOVDconst {
 16375  				continue
 16376  			}
 16377  			c := auxIntToInt64(v_1.AuxInt)
 16378  			v.reset(OpARM64XORconst)
 16379  			v.AuxInt = int64ToAuxInt(c)
 16380  			v.AddArg(x)
 16381  			return true
 16382  		}
 16383  		break
 16384  	}
 16385  	// match: (XOR x x)
 16386  	// result: (MOVDconst [0])
 16387  	for {
 16388  		x := v_0
 16389  		if x != v_1 {
 16390  			break
 16391  		}
 16392  		v.reset(OpARM64MOVDconst)
 16393  		v.AuxInt = int64ToAuxInt(0)
 16394  		return true
 16395  	}
 16396  	// match: (XOR x (MVN y))
 16397  	// result: (EON x y)
 16398  	for {
 16399  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16400  			x := v_0
 16401  			if v_1.Op != OpARM64MVN {
 16402  				continue
 16403  			}
 16404  			y := v_1.Args[0]
 16405  			v.reset(OpARM64EON)
 16406  			v.AddArg2(x, y)
 16407  			return true
 16408  		}
 16409  		break
 16410  	}
 16411  	// match: (XOR x0 x1:(SLLconst [c] y))
 16412  	// cond: clobberIfDead(x1)
 16413  	// result: (XORshiftLL x0 y [c])
 16414  	for {
 16415  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16416  			x0 := v_0
 16417  			x1 := v_1
 16418  			if x1.Op != OpARM64SLLconst {
 16419  				continue
 16420  			}
 16421  			c := auxIntToInt64(x1.AuxInt)
 16422  			y := x1.Args[0]
 16423  			if !(clobberIfDead(x1)) {
 16424  				continue
 16425  			}
 16426  			v.reset(OpARM64XORshiftLL)
 16427  			v.AuxInt = int64ToAuxInt(c)
 16428  			v.AddArg2(x0, y)
 16429  			return true
 16430  		}
 16431  		break
 16432  	}
 16433  	// match: (XOR x0 x1:(SRLconst [c] y))
 16434  	// cond: clobberIfDead(x1)
 16435  	// result: (XORshiftRL x0 y [c])
 16436  	for {
 16437  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16438  			x0 := v_0
 16439  			x1 := v_1
 16440  			if x1.Op != OpARM64SRLconst {
 16441  				continue
 16442  			}
 16443  			c := auxIntToInt64(x1.AuxInt)
 16444  			y := x1.Args[0]
 16445  			if !(clobberIfDead(x1)) {
 16446  				continue
 16447  			}
 16448  			v.reset(OpARM64XORshiftRL)
 16449  			v.AuxInt = int64ToAuxInt(c)
 16450  			v.AddArg2(x0, y)
 16451  			return true
 16452  		}
 16453  		break
 16454  	}
 16455  	// match: (XOR x0 x1:(SRAconst [c] y))
 16456  	// cond: clobberIfDead(x1)
 16457  	// result: (XORshiftRA x0 y [c])
 16458  	for {
 16459  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16460  			x0 := v_0
 16461  			x1 := v_1
 16462  			if x1.Op != OpARM64SRAconst {
 16463  				continue
 16464  			}
 16465  			c := auxIntToInt64(x1.AuxInt)
 16466  			y := x1.Args[0]
 16467  			if !(clobberIfDead(x1)) {
 16468  				continue
 16469  			}
 16470  			v.reset(OpARM64XORshiftRA)
 16471  			v.AuxInt = int64ToAuxInt(c)
 16472  			v.AddArg2(x0, y)
 16473  			return true
 16474  		}
 16475  		break
 16476  	}
 16477  	// match: (XOR x0 x1:(RORconst [c] y))
 16478  	// cond: clobberIfDead(x1)
 16479  	// result: (XORshiftRO x0 y [c])
 16480  	for {
 16481  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16482  			x0 := v_0
 16483  			x1 := v_1
 16484  			if x1.Op != OpARM64RORconst {
 16485  				continue
 16486  			}
 16487  			c := auxIntToInt64(x1.AuxInt)
 16488  			y := x1.Args[0]
 16489  			if !(clobberIfDead(x1)) {
 16490  				continue
 16491  			}
 16492  			v.reset(OpARM64XORshiftRO)
 16493  			v.AuxInt = int64ToAuxInt(c)
 16494  			v.AddArg2(x0, y)
 16495  			return true
 16496  		}
 16497  		break
 16498  	}
 16499  	return false
 16500  }
 16501  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 16502  	v_0 := v.Args[0]
 16503  	// match: (XORconst [0] x)
 16504  	// result: x
 16505  	for {
 16506  		if auxIntToInt64(v.AuxInt) != 0 {
 16507  			break
 16508  		}
 16509  		x := v_0
 16510  		v.copyOf(x)
 16511  		return true
 16512  	}
 16513  	// match: (XORconst [-1] x)
 16514  	// result: (MVN x)
 16515  	for {
 16516  		if auxIntToInt64(v.AuxInt) != -1 {
 16517  			break
 16518  		}
 16519  		x := v_0
 16520  		v.reset(OpARM64MVN)
 16521  		v.AddArg(x)
 16522  		return true
 16523  	}
 16524  	// match: (XORconst [c] (MOVDconst [d]))
 16525  	// result: (MOVDconst [c^d])
 16526  	for {
 16527  		c := auxIntToInt64(v.AuxInt)
 16528  		if v_0.Op != OpARM64MOVDconst {
 16529  			break
 16530  		}
 16531  		d := auxIntToInt64(v_0.AuxInt)
 16532  		v.reset(OpARM64MOVDconst)
 16533  		v.AuxInt = int64ToAuxInt(c ^ d)
 16534  		return true
 16535  	}
 16536  	// match: (XORconst [c] (XORconst [d] x))
 16537  	// result: (XORconst [c^d] x)
 16538  	for {
 16539  		c := auxIntToInt64(v.AuxInt)
 16540  		if v_0.Op != OpARM64XORconst {
 16541  			break
 16542  		}
 16543  		d := auxIntToInt64(v_0.AuxInt)
 16544  		x := v_0.Args[0]
 16545  		v.reset(OpARM64XORconst)
 16546  		v.AuxInt = int64ToAuxInt(c ^ d)
 16547  		v.AddArg(x)
 16548  		return true
 16549  	}
 16550  	return false
 16551  }
 16552  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 16553  	v_1 := v.Args[1]
 16554  	v_0 := v.Args[0]
 16555  	b := v.Block
 16556  	typ := &b.Func.Config.Types
 16557  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 16558  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 16559  	for {
 16560  		d := auxIntToInt64(v.AuxInt)
 16561  		if v_0.Op != OpARM64MOVDconst {
 16562  			break
 16563  		}
 16564  		c := auxIntToInt64(v_0.AuxInt)
 16565  		x := v_1
 16566  		v.reset(OpARM64XORconst)
 16567  		v.AuxInt = int64ToAuxInt(c)
 16568  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 16569  		v0.AuxInt = int64ToAuxInt(d)
 16570  		v0.AddArg(x)
 16571  		v.AddArg(v0)
 16572  		return true
 16573  	}
 16574  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 16575  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 16576  	for {
 16577  		d := auxIntToInt64(v.AuxInt)
 16578  		x := v_0
 16579  		if v_1.Op != OpARM64MOVDconst {
 16580  			break
 16581  		}
 16582  		c := auxIntToInt64(v_1.AuxInt)
 16583  		v.reset(OpARM64XORconst)
 16584  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 16585  		v.AddArg(x)
 16586  		return true
 16587  	}
 16588  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 16589  	// result: (MOVDconst [0])
 16590  	for {
 16591  		c := auxIntToInt64(v.AuxInt)
 16592  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16593  			break
 16594  		}
 16595  		x := v_0.Args[0]
 16596  		if x != v_1 {
 16597  			break
 16598  		}
 16599  		v.reset(OpARM64MOVDconst)
 16600  		v.AuxInt = int64ToAuxInt(0)
 16601  		return true
 16602  	}
 16603  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 16604  	// result: (REV16W x)
 16605  	for {
 16606  		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) {
 16607  			break
 16608  		}
 16609  		x := v_0.Args[0]
 16610  		if x != v_1 {
 16611  			break
 16612  		}
 16613  		v.reset(OpARM64REV16W)
 16614  		v.AddArg(x)
 16615  		return true
 16616  	}
 16617  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 16618  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 16619  	// result: (REV16W x)
 16620  	for {
 16621  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 16622  			break
 16623  		}
 16624  		v_0_0 := v_0.Args[0]
 16625  		if v_0_0.Op != OpARM64ANDconst {
 16626  			break
 16627  		}
 16628  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16629  		x := v_0_0.Args[0]
 16630  		if v_1.Op != OpARM64ANDconst {
 16631  			break
 16632  		}
 16633  		c2 := auxIntToInt64(v_1.AuxInt)
 16634  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 16635  			break
 16636  		}
 16637  		v.reset(OpARM64REV16W)
 16638  		v.AddArg(x)
 16639  		return true
 16640  	}
 16641  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 16642  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 16643  	// result: (REV16 x)
 16644  	for {
 16645  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 16646  			break
 16647  		}
 16648  		v_0_0 := v_0.Args[0]
 16649  		if v_0_0.Op != OpARM64ANDconst {
 16650  			break
 16651  		}
 16652  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16653  		x := v_0_0.Args[0]
 16654  		if v_1.Op != OpARM64ANDconst {
 16655  			break
 16656  		}
 16657  		c2 := auxIntToInt64(v_1.AuxInt)
 16658  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 16659  			break
 16660  		}
 16661  		v.reset(OpARM64REV16)
 16662  		v.AddArg(x)
 16663  		return true
 16664  	}
 16665  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 16666  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 16667  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 16668  	for {
 16669  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 16670  			break
 16671  		}
 16672  		v_0_0 := v_0.Args[0]
 16673  		if v_0_0.Op != OpARM64ANDconst {
 16674  			break
 16675  		}
 16676  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16677  		x := v_0_0.Args[0]
 16678  		if v_1.Op != OpARM64ANDconst {
 16679  			break
 16680  		}
 16681  		c2 := auxIntToInt64(v_1.AuxInt)
 16682  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 16683  			break
 16684  		}
 16685  		v.reset(OpARM64REV16)
 16686  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 16687  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 16688  		v0.AddArg(x)
 16689  		v.AddArg(v0)
 16690  		return true
 16691  	}
 16692  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 16693  	// result: (EXTRconst [64-c] x2 x)
 16694  	for {
 16695  		c := auxIntToInt64(v.AuxInt)
 16696  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 16697  			break
 16698  		}
 16699  		x := v_0.Args[0]
 16700  		x2 := v_1
 16701  		v.reset(OpARM64EXTRconst)
 16702  		v.AuxInt = int64ToAuxInt(64 - c)
 16703  		v.AddArg2(x2, x)
 16704  		return true
 16705  	}
 16706  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 16707  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 16708  	// result: (EXTRWconst [32-c] x2 x)
 16709  	for {
 16710  		t := v.Type
 16711  		c := auxIntToInt64(v.AuxInt)
 16712  		if v_0.Op != OpARM64UBFX {
 16713  			break
 16714  		}
 16715  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16716  		x := v_0.Args[0]
 16717  		x2 := v_1
 16718  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 16719  			break
 16720  		}
 16721  		v.reset(OpARM64EXTRWconst)
 16722  		v.AuxInt = int64ToAuxInt(32 - c)
 16723  		v.AddArg2(x2, x)
 16724  		return true
 16725  	}
 16726  	return false
 16727  }
 16728  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 16729  	v_1 := v.Args[1]
 16730  	v_0 := v.Args[0]
 16731  	b := v.Block
 16732  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 16733  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 16734  	for {
 16735  		d := auxIntToInt64(v.AuxInt)
 16736  		if v_0.Op != OpARM64MOVDconst {
 16737  			break
 16738  		}
 16739  		c := auxIntToInt64(v_0.AuxInt)
 16740  		x := v_1
 16741  		v.reset(OpARM64XORconst)
 16742  		v.AuxInt = int64ToAuxInt(c)
 16743  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 16744  		v0.AuxInt = int64ToAuxInt(d)
 16745  		v0.AddArg(x)
 16746  		v.AddArg(v0)
 16747  		return true
 16748  	}
 16749  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 16750  	// result: (XORconst x [c>>uint64(d)])
 16751  	for {
 16752  		d := auxIntToInt64(v.AuxInt)
 16753  		x := v_0
 16754  		if v_1.Op != OpARM64MOVDconst {
 16755  			break
 16756  		}
 16757  		c := auxIntToInt64(v_1.AuxInt)
 16758  		v.reset(OpARM64XORconst)
 16759  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 16760  		v.AddArg(x)
 16761  		return true
 16762  	}
 16763  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 16764  	// result: (MOVDconst [0])
 16765  	for {
 16766  		c := auxIntToInt64(v.AuxInt)
 16767  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 16768  			break
 16769  		}
 16770  		x := v_0.Args[0]
 16771  		if x != v_1 {
 16772  			break
 16773  		}
 16774  		v.reset(OpARM64MOVDconst)
 16775  		v.AuxInt = int64ToAuxInt(0)
 16776  		return true
 16777  	}
 16778  	return false
 16779  }
 16780  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 16781  	v_1 := v.Args[1]
 16782  	v_0 := v.Args[0]
 16783  	b := v.Block
 16784  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 16785  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 16786  	for {
 16787  		d := auxIntToInt64(v.AuxInt)
 16788  		if v_0.Op != OpARM64MOVDconst {
 16789  			break
 16790  		}
 16791  		c := auxIntToInt64(v_0.AuxInt)
 16792  		x := v_1
 16793  		v.reset(OpARM64XORconst)
 16794  		v.AuxInt = int64ToAuxInt(c)
 16795  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 16796  		v0.AuxInt = int64ToAuxInt(d)
 16797  		v0.AddArg(x)
 16798  		v.AddArg(v0)
 16799  		return true
 16800  	}
 16801  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 16802  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 16803  	for {
 16804  		d := auxIntToInt64(v.AuxInt)
 16805  		x := v_0
 16806  		if v_1.Op != OpARM64MOVDconst {
 16807  			break
 16808  		}
 16809  		c := auxIntToInt64(v_1.AuxInt)
 16810  		v.reset(OpARM64XORconst)
 16811  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 16812  		v.AddArg(x)
 16813  		return true
 16814  	}
 16815  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 16816  	// result: (MOVDconst [0])
 16817  	for {
 16818  		c := auxIntToInt64(v.AuxInt)
 16819  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 16820  			break
 16821  		}
 16822  		x := v_0.Args[0]
 16823  		if x != v_1 {
 16824  			break
 16825  		}
 16826  		v.reset(OpARM64MOVDconst)
 16827  		v.AuxInt = int64ToAuxInt(0)
 16828  		return true
 16829  	}
 16830  	return false
 16831  }
 16832  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 16833  	v_1 := v.Args[1]
 16834  	v_0 := v.Args[0]
 16835  	b := v.Block
 16836  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 16837  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 16838  	for {
 16839  		d := auxIntToInt64(v.AuxInt)
 16840  		if v_0.Op != OpARM64MOVDconst {
 16841  			break
 16842  		}
 16843  		c := auxIntToInt64(v_0.AuxInt)
 16844  		x := v_1
 16845  		v.reset(OpARM64XORconst)
 16846  		v.AuxInt = int64ToAuxInt(c)
 16847  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 16848  		v0.AuxInt = int64ToAuxInt(d)
 16849  		v0.AddArg(x)
 16850  		v.AddArg(v0)
 16851  		return true
 16852  	}
 16853  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 16854  	// result: (XORconst x [rotateRight64(c, d)])
 16855  	for {
 16856  		d := auxIntToInt64(v.AuxInt)
 16857  		x := v_0
 16858  		if v_1.Op != OpARM64MOVDconst {
 16859  			break
 16860  		}
 16861  		c := auxIntToInt64(v_1.AuxInt)
 16862  		v.reset(OpARM64XORconst)
 16863  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 16864  		v.AddArg(x)
 16865  		return true
 16866  	}
 16867  	// match: (XORshiftRO (RORconst x [c]) x [c])
 16868  	// result: (MOVDconst [0])
 16869  	for {
 16870  		c := auxIntToInt64(v.AuxInt)
 16871  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 16872  			break
 16873  		}
 16874  		x := v_0.Args[0]
 16875  		if x != v_1 {
 16876  			break
 16877  		}
 16878  		v.reset(OpARM64MOVDconst)
 16879  		v.AuxInt = int64ToAuxInt(0)
 16880  		return true
 16881  	}
 16882  	return false
 16883  }
 16884  func rewriteValueARM64_OpAddr(v *Value) bool {
 16885  	v_0 := v.Args[0]
 16886  	// match: (Addr {sym} base)
 16887  	// result: (MOVDaddr {sym} base)
 16888  	for {
 16889  		sym := auxToSym(v.Aux)
 16890  		base := v_0
 16891  		v.reset(OpARM64MOVDaddr)
 16892  		v.Aux = symToAux(sym)
 16893  		v.AddArg(base)
 16894  		return true
 16895  	}
 16896  }
 16897  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 16898  	v_1 := v.Args[1]
 16899  	v_0 := v.Args[0]
 16900  	b := v.Block
 16901  	// match: (Avg64u <t> x y)
 16902  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 16903  	for {
 16904  		t := v.Type
 16905  		x := v_0
 16906  		y := v_1
 16907  		v.reset(OpARM64ADD)
 16908  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 16909  		v0.AuxInt = int64ToAuxInt(1)
 16910  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 16911  		v1.AddArg2(x, y)
 16912  		v0.AddArg(v1)
 16913  		v.AddArg2(v0, y)
 16914  		return true
 16915  	}
 16916  }
 16917  func rewriteValueARM64_OpBitLen16(v *Value) bool {
 16918  	v_0 := v.Args[0]
 16919  	b := v.Block
 16920  	typ := &b.Func.Config.Types
 16921  	// match: (BitLen16 x)
 16922  	// result: (BitLen64 (ZeroExt16to64 x))
 16923  	for {
 16924  		x := v_0
 16925  		v.reset(OpBitLen64)
 16926  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 16927  		v0.AddArg(x)
 16928  		v.AddArg(v0)
 16929  		return true
 16930  	}
 16931  }
 16932  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 16933  	v_0 := v.Args[0]
 16934  	b := v.Block
 16935  	typ := &b.Func.Config.Types
 16936  	// match: (BitLen32 x)
 16937  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 16938  	for {
 16939  		x := v_0
 16940  		v.reset(OpARM64SUB)
 16941  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 16942  		v0.AuxInt = int64ToAuxInt(32)
 16943  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 16944  		v1.AddArg(x)
 16945  		v.AddArg2(v0, v1)
 16946  		return true
 16947  	}
 16948  }
 16949  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 16950  	v_0 := v.Args[0]
 16951  	b := v.Block
 16952  	typ := &b.Func.Config.Types
 16953  	// match: (BitLen64 x)
 16954  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 16955  	for {
 16956  		x := v_0
 16957  		v.reset(OpARM64SUB)
 16958  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 16959  		v0.AuxInt = int64ToAuxInt(64)
 16960  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 16961  		v1.AddArg(x)
 16962  		v.AddArg2(v0, v1)
 16963  		return true
 16964  	}
 16965  }
 16966  func rewriteValueARM64_OpBitLen8(v *Value) bool {
 16967  	v_0 := v.Args[0]
 16968  	b := v.Block
 16969  	typ := &b.Func.Config.Types
 16970  	// match: (BitLen8 x)
 16971  	// result: (BitLen64 (ZeroExt8to64 x))
 16972  	for {
 16973  		x := v_0
 16974  		v.reset(OpBitLen64)
 16975  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 16976  		v0.AddArg(x)
 16977  		v.AddArg(v0)
 16978  		return true
 16979  	}
 16980  }
 16981  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 16982  	v_0 := v.Args[0]
 16983  	b := v.Block
 16984  	typ := &b.Func.Config.Types
 16985  	// match: (BitRev16 x)
 16986  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 16987  	for {
 16988  		x := v_0
 16989  		v.reset(OpARM64SRLconst)
 16990  		v.AuxInt = int64ToAuxInt(48)
 16991  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 16992  		v0.AddArg(x)
 16993  		v.AddArg(v0)
 16994  		return true
 16995  	}
 16996  }
 16997  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 16998  	v_0 := v.Args[0]
 16999  	b := v.Block
 17000  	typ := &b.Func.Config.Types
 17001  	// match: (BitRev8 x)
 17002  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 17003  	for {
 17004  		x := v_0
 17005  		v.reset(OpARM64SRLconst)
 17006  		v.AuxInt = int64ToAuxInt(56)
 17007  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 17008  		v0.AddArg(x)
 17009  		v.AddArg(v0)
 17010  		return true
 17011  	}
 17012  }
 17013  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 17014  	v_2 := v.Args[2]
 17015  	v_1 := v.Args[1]
 17016  	v_0 := v.Args[0]
 17017  	b := v.Block
 17018  	// match: (CondSelect x y boolval)
 17019  	// cond: flagArg(boolval) != nil
 17020  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 17021  	for {
 17022  		x := v_0
 17023  		y := v_1
 17024  		boolval := v_2
 17025  		if !(flagArg(boolval) != nil) {
 17026  			break
 17027  		}
 17028  		v.reset(OpARM64CSEL)
 17029  		v.AuxInt = opToAuxInt(boolval.Op)
 17030  		v.AddArg3(x, y, flagArg(boolval))
 17031  		return true
 17032  	}
 17033  	// match: (CondSelect x y boolval)
 17034  	// cond: flagArg(boolval) == nil
 17035  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 17036  	for {
 17037  		x := v_0
 17038  		y := v_1
 17039  		boolval := v_2
 17040  		if !(flagArg(boolval) == nil) {
 17041  			break
 17042  		}
 17043  		v.reset(OpARM64CSEL)
 17044  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 17045  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 17046  		v0.AuxInt = int32ToAuxInt(1)
 17047  		v0.AddArg(boolval)
 17048  		v.AddArg3(x, y, v0)
 17049  		return true
 17050  	}
 17051  	return false
 17052  }
 17053  func rewriteValueARM64_OpConst16(v *Value) bool {
 17054  	// match: (Const16 [val])
 17055  	// result: (MOVDconst [int64(val)])
 17056  	for {
 17057  		val := auxIntToInt16(v.AuxInt)
 17058  		v.reset(OpARM64MOVDconst)
 17059  		v.AuxInt = int64ToAuxInt(int64(val))
 17060  		return true
 17061  	}
 17062  }
 17063  func rewriteValueARM64_OpConst32(v *Value) bool {
 17064  	// match: (Const32 [val])
 17065  	// result: (MOVDconst [int64(val)])
 17066  	for {
 17067  		val := auxIntToInt32(v.AuxInt)
 17068  		v.reset(OpARM64MOVDconst)
 17069  		v.AuxInt = int64ToAuxInt(int64(val))
 17070  		return true
 17071  	}
 17072  }
 17073  func rewriteValueARM64_OpConst32F(v *Value) bool {
 17074  	// match: (Const32F [val])
 17075  	// result: (FMOVSconst [float64(val)])
 17076  	for {
 17077  		val := auxIntToFloat32(v.AuxInt)
 17078  		v.reset(OpARM64FMOVSconst)
 17079  		v.AuxInt = float64ToAuxInt(float64(val))
 17080  		return true
 17081  	}
 17082  }
 17083  func rewriteValueARM64_OpConst64(v *Value) bool {
 17084  	// match: (Const64 [val])
 17085  	// result: (MOVDconst [int64(val)])
 17086  	for {
 17087  		val := auxIntToInt64(v.AuxInt)
 17088  		v.reset(OpARM64MOVDconst)
 17089  		v.AuxInt = int64ToAuxInt(int64(val))
 17090  		return true
 17091  	}
 17092  }
 17093  func rewriteValueARM64_OpConst64F(v *Value) bool {
 17094  	// match: (Const64F [val])
 17095  	// result: (FMOVDconst [float64(val)])
 17096  	for {
 17097  		val := auxIntToFloat64(v.AuxInt)
 17098  		v.reset(OpARM64FMOVDconst)
 17099  		v.AuxInt = float64ToAuxInt(float64(val))
 17100  		return true
 17101  	}
 17102  }
 17103  func rewriteValueARM64_OpConst8(v *Value) bool {
 17104  	// match: (Const8 [val])
 17105  	// result: (MOVDconst [int64(val)])
 17106  	for {
 17107  		val := auxIntToInt8(v.AuxInt)
 17108  		v.reset(OpARM64MOVDconst)
 17109  		v.AuxInt = int64ToAuxInt(int64(val))
 17110  		return true
 17111  	}
 17112  }
 17113  func rewriteValueARM64_OpConstBool(v *Value) bool {
 17114  	// match: (ConstBool [t])
 17115  	// result: (MOVDconst [b2i(t)])
 17116  	for {
 17117  		t := auxIntToBool(v.AuxInt)
 17118  		v.reset(OpARM64MOVDconst)
 17119  		v.AuxInt = int64ToAuxInt(b2i(t))
 17120  		return true
 17121  	}
 17122  }
 17123  func rewriteValueARM64_OpConstNil(v *Value) bool {
 17124  	// match: (ConstNil)
 17125  	// result: (MOVDconst [0])
 17126  	for {
 17127  		v.reset(OpARM64MOVDconst)
 17128  		v.AuxInt = int64ToAuxInt(0)
 17129  		return true
 17130  	}
 17131  }
 17132  func rewriteValueARM64_OpCtz16(v *Value) bool {
 17133  	v_0 := v.Args[0]
 17134  	b := v.Block
 17135  	typ := &b.Func.Config.Types
 17136  	// match: (Ctz16 <t> x)
 17137  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 17138  	for {
 17139  		t := v.Type
 17140  		x := v_0
 17141  		v.reset(OpARM64CLZW)
 17142  		v.Type = t
 17143  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 17144  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 17145  		v1.AuxInt = int64ToAuxInt(0x10000)
 17146  		v1.AddArg(x)
 17147  		v0.AddArg(v1)
 17148  		v.AddArg(v0)
 17149  		return true
 17150  	}
 17151  }
 17152  func rewriteValueARM64_OpCtz32(v *Value) bool {
 17153  	v_0 := v.Args[0]
 17154  	b := v.Block
 17155  	// match: (Ctz32 <t> x)
 17156  	// result: (CLZW (RBITW <t> x))
 17157  	for {
 17158  		t := v.Type
 17159  		x := v_0
 17160  		v.reset(OpARM64CLZW)
 17161  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 17162  		v0.AddArg(x)
 17163  		v.AddArg(v0)
 17164  		return true
 17165  	}
 17166  }
 17167  func rewriteValueARM64_OpCtz64(v *Value) bool {
 17168  	v_0 := v.Args[0]
 17169  	b := v.Block
 17170  	// match: (Ctz64 <t> x)
 17171  	// result: (CLZ (RBIT <t> x))
 17172  	for {
 17173  		t := v.Type
 17174  		x := v_0
 17175  		v.reset(OpARM64CLZ)
 17176  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 17177  		v0.AddArg(x)
 17178  		v.AddArg(v0)
 17179  		return true
 17180  	}
 17181  }
 17182  func rewriteValueARM64_OpCtz8(v *Value) bool {
 17183  	v_0 := v.Args[0]
 17184  	b := v.Block
 17185  	typ := &b.Func.Config.Types
 17186  	// match: (Ctz8 <t> x)
 17187  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 17188  	for {
 17189  		t := v.Type
 17190  		x := v_0
 17191  		v.reset(OpARM64CLZW)
 17192  		v.Type = t
 17193  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 17194  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 17195  		v1.AuxInt = int64ToAuxInt(0x100)
 17196  		v1.AddArg(x)
 17197  		v0.AddArg(v1)
 17198  		v.AddArg(v0)
 17199  		return true
 17200  	}
 17201  }
 17202  func rewriteValueARM64_OpDiv16(v *Value) bool {
 17203  	v_1 := v.Args[1]
 17204  	v_0 := v.Args[0]
 17205  	b := v.Block
 17206  	typ := &b.Func.Config.Types
 17207  	// match: (Div16 [false] x y)
 17208  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 17209  	for {
 17210  		if auxIntToBool(v.AuxInt) != false {
 17211  			break
 17212  		}
 17213  		x := v_0
 17214  		y := v_1
 17215  		v.reset(OpARM64DIVW)
 17216  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17217  		v0.AddArg(x)
 17218  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17219  		v1.AddArg(y)
 17220  		v.AddArg2(v0, v1)
 17221  		return true
 17222  	}
 17223  	return false
 17224  }
 17225  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 17226  	v_1 := v.Args[1]
 17227  	v_0 := v.Args[0]
 17228  	b := v.Block
 17229  	typ := &b.Func.Config.Types
 17230  	// match: (Div16u x y)
 17231  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 17232  	for {
 17233  		x := v_0
 17234  		y := v_1
 17235  		v.reset(OpARM64UDIVW)
 17236  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17237  		v0.AddArg(x)
 17238  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17239  		v1.AddArg(y)
 17240  		v.AddArg2(v0, v1)
 17241  		return true
 17242  	}
 17243  }
 17244  func rewriteValueARM64_OpDiv32(v *Value) bool {
 17245  	v_1 := v.Args[1]
 17246  	v_0 := v.Args[0]
 17247  	// match: (Div32 [false] x y)
 17248  	// result: (DIVW x y)
 17249  	for {
 17250  		if auxIntToBool(v.AuxInt) != false {
 17251  			break
 17252  		}
 17253  		x := v_0
 17254  		y := v_1
 17255  		v.reset(OpARM64DIVW)
 17256  		v.AddArg2(x, y)
 17257  		return true
 17258  	}
 17259  	return false
 17260  }
 17261  func rewriteValueARM64_OpDiv64(v *Value) bool {
 17262  	v_1 := v.Args[1]
 17263  	v_0 := v.Args[0]
 17264  	// match: (Div64 [false] x y)
 17265  	// result: (DIV x y)
 17266  	for {
 17267  		if auxIntToBool(v.AuxInt) != false {
 17268  			break
 17269  		}
 17270  		x := v_0
 17271  		y := v_1
 17272  		v.reset(OpARM64DIV)
 17273  		v.AddArg2(x, y)
 17274  		return true
 17275  	}
 17276  	return false
 17277  }
 17278  func rewriteValueARM64_OpDiv8(v *Value) bool {
 17279  	v_1 := v.Args[1]
 17280  	v_0 := v.Args[0]
 17281  	b := v.Block
 17282  	typ := &b.Func.Config.Types
 17283  	// match: (Div8 x y)
 17284  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 17285  	for {
 17286  		x := v_0
 17287  		y := v_1
 17288  		v.reset(OpARM64DIVW)
 17289  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17290  		v0.AddArg(x)
 17291  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17292  		v1.AddArg(y)
 17293  		v.AddArg2(v0, v1)
 17294  		return true
 17295  	}
 17296  }
 17297  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 17298  	v_1 := v.Args[1]
 17299  	v_0 := v.Args[0]
 17300  	b := v.Block
 17301  	typ := &b.Func.Config.Types
 17302  	// match: (Div8u x y)
 17303  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 17304  	for {
 17305  		x := v_0
 17306  		y := v_1
 17307  		v.reset(OpARM64UDIVW)
 17308  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17309  		v0.AddArg(x)
 17310  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17311  		v1.AddArg(y)
 17312  		v.AddArg2(v0, v1)
 17313  		return true
 17314  	}
 17315  }
 17316  func rewriteValueARM64_OpEq16(v *Value) bool {
 17317  	v_1 := v.Args[1]
 17318  	v_0 := v.Args[0]
 17319  	b := v.Block
 17320  	typ := &b.Func.Config.Types
 17321  	// match: (Eq16 x y)
 17322  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17323  	for {
 17324  		x := v_0
 17325  		y := v_1
 17326  		v.reset(OpARM64Equal)
 17327  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17328  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17329  		v1.AddArg(x)
 17330  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17331  		v2.AddArg(y)
 17332  		v0.AddArg2(v1, v2)
 17333  		v.AddArg(v0)
 17334  		return true
 17335  	}
 17336  }
 17337  func rewriteValueARM64_OpEq32(v *Value) bool {
 17338  	v_1 := v.Args[1]
 17339  	v_0 := v.Args[0]
 17340  	b := v.Block
 17341  	// match: (Eq32 x y)
 17342  	// result: (Equal (CMPW x y))
 17343  	for {
 17344  		x := v_0
 17345  		y := v_1
 17346  		v.reset(OpARM64Equal)
 17347  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17348  		v0.AddArg2(x, y)
 17349  		v.AddArg(v0)
 17350  		return true
 17351  	}
 17352  }
 17353  func rewriteValueARM64_OpEq32F(v *Value) bool {
 17354  	v_1 := v.Args[1]
 17355  	v_0 := v.Args[0]
 17356  	b := v.Block
 17357  	// match: (Eq32F x y)
 17358  	// result: (Equal (FCMPS x y))
 17359  	for {
 17360  		x := v_0
 17361  		y := v_1
 17362  		v.reset(OpARM64Equal)
 17363  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17364  		v0.AddArg2(x, y)
 17365  		v.AddArg(v0)
 17366  		return true
 17367  	}
 17368  }
 17369  func rewriteValueARM64_OpEq64(v *Value) bool {
 17370  	v_1 := v.Args[1]
 17371  	v_0 := v.Args[0]
 17372  	b := v.Block
 17373  	// match: (Eq64 x y)
 17374  	// result: (Equal (CMP x y))
 17375  	for {
 17376  		x := v_0
 17377  		y := v_1
 17378  		v.reset(OpARM64Equal)
 17379  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17380  		v0.AddArg2(x, y)
 17381  		v.AddArg(v0)
 17382  		return true
 17383  	}
 17384  }
 17385  func rewriteValueARM64_OpEq64F(v *Value) bool {
 17386  	v_1 := v.Args[1]
 17387  	v_0 := v.Args[0]
 17388  	b := v.Block
 17389  	// match: (Eq64F x y)
 17390  	// result: (Equal (FCMPD x y))
 17391  	for {
 17392  		x := v_0
 17393  		y := v_1
 17394  		v.reset(OpARM64Equal)
 17395  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17396  		v0.AddArg2(x, y)
 17397  		v.AddArg(v0)
 17398  		return true
 17399  	}
 17400  }
 17401  func rewriteValueARM64_OpEq8(v *Value) bool {
 17402  	v_1 := v.Args[1]
 17403  	v_0 := v.Args[0]
 17404  	b := v.Block
 17405  	typ := &b.Func.Config.Types
 17406  	// match: (Eq8 x y)
 17407  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17408  	for {
 17409  		x := v_0
 17410  		y := v_1
 17411  		v.reset(OpARM64Equal)
 17412  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17413  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17414  		v1.AddArg(x)
 17415  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17416  		v2.AddArg(y)
 17417  		v0.AddArg2(v1, v2)
 17418  		v.AddArg(v0)
 17419  		return true
 17420  	}
 17421  }
 17422  func rewriteValueARM64_OpEqB(v *Value) bool {
 17423  	v_1 := v.Args[1]
 17424  	v_0 := v.Args[0]
 17425  	b := v.Block
 17426  	typ := &b.Func.Config.Types
 17427  	// match: (EqB x y)
 17428  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 17429  	for {
 17430  		x := v_0
 17431  		y := v_1
 17432  		v.reset(OpARM64XOR)
 17433  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17434  		v0.AuxInt = int64ToAuxInt(1)
 17435  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 17436  		v1.AddArg2(x, y)
 17437  		v.AddArg2(v0, v1)
 17438  		return true
 17439  	}
 17440  }
 17441  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 17442  	v_1 := v.Args[1]
 17443  	v_0 := v.Args[0]
 17444  	b := v.Block
 17445  	// match: (EqPtr x y)
 17446  	// result: (Equal (CMP x y))
 17447  	for {
 17448  		x := v_0
 17449  		y := v_1
 17450  		v.reset(OpARM64Equal)
 17451  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17452  		v0.AddArg2(x, y)
 17453  		v.AddArg(v0)
 17454  		return true
 17455  	}
 17456  }
 17457  func rewriteValueARM64_OpFMA(v *Value) bool {
 17458  	v_2 := v.Args[2]
 17459  	v_1 := v.Args[1]
 17460  	v_0 := v.Args[0]
 17461  	// match: (FMA x y z)
 17462  	// result: (FMADDD z x y)
 17463  	for {
 17464  		x := v_0
 17465  		y := v_1
 17466  		z := v_2
 17467  		v.reset(OpARM64FMADDD)
 17468  		v.AddArg3(z, x, y)
 17469  		return true
 17470  	}
 17471  }
 17472  func rewriteValueARM64_OpHmul32(v *Value) bool {
 17473  	v_1 := v.Args[1]
 17474  	v_0 := v.Args[0]
 17475  	b := v.Block
 17476  	typ := &b.Func.Config.Types
 17477  	// match: (Hmul32 x y)
 17478  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 17479  	for {
 17480  		x := v_0
 17481  		y := v_1
 17482  		v.reset(OpARM64SRAconst)
 17483  		v.AuxInt = int64ToAuxInt(32)
 17484  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 17485  		v0.AddArg2(x, y)
 17486  		v.AddArg(v0)
 17487  		return true
 17488  	}
 17489  }
 17490  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 17491  	v_1 := v.Args[1]
 17492  	v_0 := v.Args[0]
 17493  	b := v.Block
 17494  	typ := &b.Func.Config.Types
 17495  	// match: (Hmul32u x y)
 17496  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 17497  	for {
 17498  		x := v_0
 17499  		y := v_1
 17500  		v.reset(OpARM64SRAconst)
 17501  		v.AuxInt = int64ToAuxInt(32)
 17502  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 17503  		v0.AddArg2(x, y)
 17504  		v.AddArg(v0)
 17505  		return true
 17506  	}
 17507  }
 17508  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 17509  	v_1 := v.Args[1]
 17510  	v_0 := v.Args[0]
 17511  	b := v.Block
 17512  	// match: (IsInBounds idx len)
 17513  	// result: (LessThanU (CMP idx len))
 17514  	for {
 17515  		idx := v_0
 17516  		len := v_1
 17517  		v.reset(OpARM64LessThanU)
 17518  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17519  		v0.AddArg2(idx, len)
 17520  		v.AddArg(v0)
 17521  		return true
 17522  	}
 17523  }
 17524  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 17525  	v_0 := v.Args[0]
 17526  	b := v.Block
 17527  	// match: (IsNonNil ptr)
 17528  	// result: (NotEqual (CMPconst [0] ptr))
 17529  	for {
 17530  		ptr := v_0
 17531  		v.reset(OpARM64NotEqual)
 17532  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 17533  		v0.AuxInt = int64ToAuxInt(0)
 17534  		v0.AddArg(ptr)
 17535  		v.AddArg(v0)
 17536  		return true
 17537  	}
 17538  }
 17539  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 17540  	v_1 := v.Args[1]
 17541  	v_0 := v.Args[0]
 17542  	b := v.Block
 17543  	// match: (IsSliceInBounds idx len)
 17544  	// result: (LessEqualU (CMP idx len))
 17545  	for {
 17546  		idx := v_0
 17547  		len := v_1
 17548  		v.reset(OpARM64LessEqualU)
 17549  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17550  		v0.AddArg2(idx, len)
 17551  		v.AddArg(v0)
 17552  		return true
 17553  	}
 17554  }
 17555  func rewriteValueARM64_OpLeq16(v *Value) bool {
 17556  	v_1 := v.Args[1]
 17557  	v_0 := v.Args[0]
 17558  	b := v.Block
 17559  	typ := &b.Func.Config.Types
 17560  	// match: (Leq16 x y)
 17561  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 17562  	for {
 17563  		x := v_0
 17564  		y := v_1
 17565  		v.reset(OpARM64LessEqual)
 17566  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17567  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17568  		v1.AddArg(x)
 17569  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17570  		v2.AddArg(y)
 17571  		v0.AddArg2(v1, v2)
 17572  		v.AddArg(v0)
 17573  		return true
 17574  	}
 17575  }
 17576  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 17577  	v_1 := v.Args[1]
 17578  	v_0 := v.Args[0]
 17579  	b := v.Block
 17580  	typ := &b.Func.Config.Types
 17581  	// match: (Leq16U x zero:(MOVDconst [0]))
 17582  	// result: (Eq16 x zero)
 17583  	for {
 17584  		x := v_0
 17585  		zero := v_1
 17586  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17587  			break
 17588  		}
 17589  		v.reset(OpEq16)
 17590  		v.AddArg2(x, zero)
 17591  		return true
 17592  	}
 17593  	// match: (Leq16U (MOVDconst [1]) x)
 17594  	// result: (Neq16 (MOVDconst [0]) x)
 17595  	for {
 17596  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17597  			break
 17598  		}
 17599  		x := v_1
 17600  		v.reset(OpNeq16)
 17601  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17602  		v0.AuxInt = int64ToAuxInt(0)
 17603  		v.AddArg2(v0, x)
 17604  		return true
 17605  	}
 17606  	// match: (Leq16U x y)
 17607  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17608  	for {
 17609  		x := v_0
 17610  		y := v_1
 17611  		v.reset(OpARM64LessEqualU)
 17612  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17613  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17614  		v1.AddArg(x)
 17615  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17616  		v2.AddArg(y)
 17617  		v0.AddArg2(v1, v2)
 17618  		v.AddArg(v0)
 17619  		return true
 17620  	}
 17621  }
 17622  func rewriteValueARM64_OpLeq32(v *Value) bool {
 17623  	v_1 := v.Args[1]
 17624  	v_0 := v.Args[0]
 17625  	b := v.Block
 17626  	// match: (Leq32 x y)
 17627  	// result: (LessEqual (CMPW x y))
 17628  	for {
 17629  		x := v_0
 17630  		y := v_1
 17631  		v.reset(OpARM64LessEqual)
 17632  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17633  		v0.AddArg2(x, y)
 17634  		v.AddArg(v0)
 17635  		return true
 17636  	}
 17637  }
 17638  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 17639  	v_1 := v.Args[1]
 17640  	v_0 := v.Args[0]
 17641  	b := v.Block
 17642  	// match: (Leq32F x y)
 17643  	// result: (LessEqualF (FCMPS x y))
 17644  	for {
 17645  		x := v_0
 17646  		y := v_1
 17647  		v.reset(OpARM64LessEqualF)
 17648  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17649  		v0.AddArg2(x, y)
 17650  		v.AddArg(v0)
 17651  		return true
 17652  	}
 17653  }
 17654  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 17655  	v_1 := v.Args[1]
 17656  	v_0 := v.Args[0]
 17657  	b := v.Block
 17658  	typ := &b.Func.Config.Types
 17659  	// match: (Leq32U x zero:(MOVDconst [0]))
 17660  	// result: (Eq32 x zero)
 17661  	for {
 17662  		x := v_0
 17663  		zero := v_1
 17664  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17665  			break
 17666  		}
 17667  		v.reset(OpEq32)
 17668  		v.AddArg2(x, zero)
 17669  		return true
 17670  	}
 17671  	// match: (Leq32U (MOVDconst [1]) x)
 17672  	// result: (Neq32 (MOVDconst [0]) x)
 17673  	for {
 17674  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17675  			break
 17676  		}
 17677  		x := v_1
 17678  		v.reset(OpNeq32)
 17679  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17680  		v0.AuxInt = int64ToAuxInt(0)
 17681  		v.AddArg2(v0, x)
 17682  		return true
 17683  	}
 17684  	// match: (Leq32U x y)
 17685  	// result: (LessEqualU (CMPW x y))
 17686  	for {
 17687  		x := v_0
 17688  		y := v_1
 17689  		v.reset(OpARM64LessEqualU)
 17690  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17691  		v0.AddArg2(x, y)
 17692  		v.AddArg(v0)
 17693  		return true
 17694  	}
 17695  }
 17696  func rewriteValueARM64_OpLeq64(v *Value) bool {
 17697  	v_1 := v.Args[1]
 17698  	v_0 := v.Args[0]
 17699  	b := v.Block
 17700  	// match: (Leq64 x y)
 17701  	// result: (LessEqual (CMP x y))
 17702  	for {
 17703  		x := v_0
 17704  		y := v_1
 17705  		v.reset(OpARM64LessEqual)
 17706  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17707  		v0.AddArg2(x, y)
 17708  		v.AddArg(v0)
 17709  		return true
 17710  	}
 17711  }
 17712  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 17713  	v_1 := v.Args[1]
 17714  	v_0 := v.Args[0]
 17715  	b := v.Block
 17716  	// match: (Leq64F x y)
 17717  	// result: (LessEqualF (FCMPD x y))
 17718  	for {
 17719  		x := v_0
 17720  		y := v_1
 17721  		v.reset(OpARM64LessEqualF)
 17722  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17723  		v0.AddArg2(x, y)
 17724  		v.AddArg(v0)
 17725  		return true
 17726  	}
 17727  }
 17728  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 17729  	v_1 := v.Args[1]
 17730  	v_0 := v.Args[0]
 17731  	b := v.Block
 17732  	typ := &b.Func.Config.Types
 17733  	// match: (Leq64U x zero:(MOVDconst [0]))
 17734  	// result: (Eq64 x zero)
 17735  	for {
 17736  		x := v_0
 17737  		zero := v_1
 17738  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17739  			break
 17740  		}
 17741  		v.reset(OpEq64)
 17742  		v.AddArg2(x, zero)
 17743  		return true
 17744  	}
 17745  	// match: (Leq64U (MOVDconst [1]) x)
 17746  	// result: (Neq64 (MOVDconst [0]) x)
 17747  	for {
 17748  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17749  			break
 17750  		}
 17751  		x := v_1
 17752  		v.reset(OpNeq64)
 17753  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17754  		v0.AuxInt = int64ToAuxInt(0)
 17755  		v.AddArg2(v0, x)
 17756  		return true
 17757  	}
 17758  	// match: (Leq64U x y)
 17759  	// result: (LessEqualU (CMP x y))
 17760  	for {
 17761  		x := v_0
 17762  		y := v_1
 17763  		v.reset(OpARM64LessEqualU)
 17764  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17765  		v0.AddArg2(x, y)
 17766  		v.AddArg(v0)
 17767  		return true
 17768  	}
 17769  }
 17770  func rewriteValueARM64_OpLeq8(v *Value) bool {
 17771  	v_1 := v.Args[1]
 17772  	v_0 := v.Args[0]
 17773  	b := v.Block
 17774  	typ := &b.Func.Config.Types
 17775  	// match: (Leq8 x y)
 17776  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 17777  	for {
 17778  		x := v_0
 17779  		y := v_1
 17780  		v.reset(OpARM64LessEqual)
 17781  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17782  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17783  		v1.AddArg(x)
 17784  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17785  		v2.AddArg(y)
 17786  		v0.AddArg2(v1, v2)
 17787  		v.AddArg(v0)
 17788  		return true
 17789  	}
 17790  }
 17791  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 17792  	v_1 := v.Args[1]
 17793  	v_0 := v.Args[0]
 17794  	b := v.Block
 17795  	typ := &b.Func.Config.Types
 17796  	// match: (Leq8U x zero:(MOVDconst [0]))
 17797  	// result: (Eq8 x zero)
 17798  	for {
 17799  		x := v_0
 17800  		zero := v_1
 17801  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17802  			break
 17803  		}
 17804  		v.reset(OpEq8)
 17805  		v.AddArg2(x, zero)
 17806  		return true
 17807  	}
 17808  	// match: (Leq8U (MOVDconst [1]) x)
 17809  	// result: (Neq8 (MOVDconst [0]) x)
 17810  	for {
 17811  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17812  			break
 17813  		}
 17814  		x := v_1
 17815  		v.reset(OpNeq8)
 17816  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17817  		v0.AuxInt = int64ToAuxInt(0)
 17818  		v.AddArg2(v0, x)
 17819  		return true
 17820  	}
 17821  	// match: (Leq8U x y)
 17822  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17823  	for {
 17824  		x := v_0
 17825  		y := v_1
 17826  		v.reset(OpARM64LessEqualU)
 17827  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17828  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17829  		v1.AddArg(x)
 17830  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17831  		v2.AddArg(y)
 17832  		v0.AddArg2(v1, v2)
 17833  		v.AddArg(v0)
 17834  		return true
 17835  	}
 17836  }
 17837  func rewriteValueARM64_OpLess16(v *Value) bool {
 17838  	v_1 := v.Args[1]
 17839  	v_0 := v.Args[0]
 17840  	b := v.Block
 17841  	typ := &b.Func.Config.Types
 17842  	// match: (Less16 x y)
 17843  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 17844  	for {
 17845  		x := v_0
 17846  		y := v_1
 17847  		v.reset(OpARM64LessThan)
 17848  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17849  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17850  		v1.AddArg(x)
 17851  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17852  		v2.AddArg(y)
 17853  		v0.AddArg2(v1, v2)
 17854  		v.AddArg(v0)
 17855  		return true
 17856  	}
 17857  }
 17858  func rewriteValueARM64_OpLess16U(v *Value) bool {
 17859  	v_1 := v.Args[1]
 17860  	v_0 := v.Args[0]
 17861  	b := v.Block
 17862  	typ := &b.Func.Config.Types
 17863  	// match: (Less16U zero:(MOVDconst [0]) x)
 17864  	// result: (Neq16 zero x)
 17865  	for {
 17866  		zero := v_0
 17867  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17868  			break
 17869  		}
 17870  		x := v_1
 17871  		v.reset(OpNeq16)
 17872  		v.AddArg2(zero, x)
 17873  		return true
 17874  	}
 17875  	// match: (Less16U x (MOVDconst [1]))
 17876  	// result: (Eq16 x (MOVDconst [0]))
 17877  	for {
 17878  		x := v_0
 17879  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17880  			break
 17881  		}
 17882  		v.reset(OpEq16)
 17883  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17884  		v0.AuxInt = int64ToAuxInt(0)
 17885  		v.AddArg2(x, v0)
 17886  		return true
 17887  	}
 17888  	// match: (Less16U x y)
 17889  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17890  	for {
 17891  		x := v_0
 17892  		y := v_1
 17893  		v.reset(OpARM64LessThanU)
 17894  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17895  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17896  		v1.AddArg(x)
 17897  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17898  		v2.AddArg(y)
 17899  		v0.AddArg2(v1, v2)
 17900  		v.AddArg(v0)
 17901  		return true
 17902  	}
 17903  }
 17904  func rewriteValueARM64_OpLess32(v *Value) bool {
 17905  	v_1 := v.Args[1]
 17906  	v_0 := v.Args[0]
 17907  	b := v.Block
 17908  	// match: (Less32 x y)
 17909  	// result: (LessThan (CMPW x y))
 17910  	for {
 17911  		x := v_0
 17912  		y := v_1
 17913  		v.reset(OpARM64LessThan)
 17914  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17915  		v0.AddArg2(x, y)
 17916  		v.AddArg(v0)
 17917  		return true
 17918  	}
 17919  }
 17920  func rewriteValueARM64_OpLess32F(v *Value) bool {
 17921  	v_1 := v.Args[1]
 17922  	v_0 := v.Args[0]
 17923  	b := v.Block
 17924  	// match: (Less32F x y)
 17925  	// result: (LessThanF (FCMPS x y))
 17926  	for {
 17927  		x := v_0
 17928  		y := v_1
 17929  		v.reset(OpARM64LessThanF)
 17930  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17931  		v0.AddArg2(x, y)
 17932  		v.AddArg(v0)
 17933  		return true
 17934  	}
 17935  }
 17936  func rewriteValueARM64_OpLess32U(v *Value) bool {
 17937  	v_1 := v.Args[1]
 17938  	v_0 := v.Args[0]
 17939  	b := v.Block
 17940  	typ := &b.Func.Config.Types
 17941  	// match: (Less32U zero:(MOVDconst [0]) x)
 17942  	// result: (Neq32 zero x)
 17943  	for {
 17944  		zero := v_0
 17945  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17946  			break
 17947  		}
 17948  		x := v_1
 17949  		v.reset(OpNeq32)
 17950  		v.AddArg2(zero, x)
 17951  		return true
 17952  	}
 17953  	// match: (Less32U x (MOVDconst [1]))
 17954  	// result: (Eq32 x (MOVDconst [0]))
 17955  	for {
 17956  		x := v_0
 17957  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17958  			break
 17959  		}
 17960  		v.reset(OpEq32)
 17961  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17962  		v0.AuxInt = int64ToAuxInt(0)
 17963  		v.AddArg2(x, v0)
 17964  		return true
 17965  	}
 17966  	// match: (Less32U x y)
 17967  	// result: (LessThanU (CMPW x y))
 17968  	for {
 17969  		x := v_0
 17970  		y := v_1
 17971  		v.reset(OpARM64LessThanU)
 17972  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17973  		v0.AddArg2(x, y)
 17974  		v.AddArg(v0)
 17975  		return true
 17976  	}
 17977  }
 17978  func rewriteValueARM64_OpLess64(v *Value) bool {
 17979  	v_1 := v.Args[1]
 17980  	v_0 := v.Args[0]
 17981  	b := v.Block
 17982  	// match: (Less64 x y)
 17983  	// result: (LessThan (CMP x y))
 17984  	for {
 17985  		x := v_0
 17986  		y := v_1
 17987  		v.reset(OpARM64LessThan)
 17988  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17989  		v0.AddArg2(x, y)
 17990  		v.AddArg(v0)
 17991  		return true
 17992  	}
 17993  }
 17994  func rewriteValueARM64_OpLess64F(v *Value) bool {
 17995  	v_1 := v.Args[1]
 17996  	v_0 := v.Args[0]
 17997  	b := v.Block
 17998  	// match: (Less64F x y)
 17999  	// result: (LessThanF (FCMPD x y))
 18000  	for {
 18001  		x := v_0
 18002  		y := v_1
 18003  		v.reset(OpARM64LessThanF)
 18004  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 18005  		v0.AddArg2(x, y)
 18006  		v.AddArg(v0)
 18007  		return true
 18008  	}
 18009  }
 18010  func rewriteValueARM64_OpLess64U(v *Value) bool {
 18011  	v_1 := v.Args[1]
 18012  	v_0 := v.Args[0]
 18013  	b := v.Block
 18014  	typ := &b.Func.Config.Types
 18015  	// match: (Less64U zero:(MOVDconst [0]) x)
 18016  	// result: (Neq64 zero x)
 18017  	for {
 18018  		zero := v_0
 18019  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18020  			break
 18021  		}
 18022  		x := v_1
 18023  		v.reset(OpNeq64)
 18024  		v.AddArg2(zero, x)
 18025  		return true
 18026  	}
 18027  	// match: (Less64U x (MOVDconst [1]))
 18028  	// result: (Eq64 x (MOVDconst [0]))
 18029  	for {
 18030  		x := v_0
 18031  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18032  			break
 18033  		}
 18034  		v.reset(OpEq64)
 18035  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18036  		v0.AuxInt = int64ToAuxInt(0)
 18037  		v.AddArg2(x, v0)
 18038  		return true
 18039  	}
 18040  	// match: (Less64U x y)
 18041  	// result: (LessThanU (CMP x y))
 18042  	for {
 18043  		x := v_0
 18044  		y := v_1
 18045  		v.reset(OpARM64LessThanU)
 18046  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18047  		v0.AddArg2(x, y)
 18048  		v.AddArg(v0)
 18049  		return true
 18050  	}
 18051  }
 18052  func rewriteValueARM64_OpLess8(v *Value) bool {
 18053  	v_1 := v.Args[1]
 18054  	v_0 := v.Args[0]
 18055  	b := v.Block
 18056  	typ := &b.Func.Config.Types
 18057  	// match: (Less8 x y)
 18058  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 18059  	for {
 18060  		x := v_0
 18061  		y := v_1
 18062  		v.reset(OpARM64LessThan)
 18063  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18064  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18065  		v1.AddArg(x)
 18066  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18067  		v2.AddArg(y)
 18068  		v0.AddArg2(v1, v2)
 18069  		v.AddArg(v0)
 18070  		return true
 18071  	}
 18072  }
 18073  func rewriteValueARM64_OpLess8U(v *Value) bool {
 18074  	v_1 := v.Args[1]
 18075  	v_0 := v.Args[0]
 18076  	b := v.Block
 18077  	typ := &b.Func.Config.Types
 18078  	// match: (Less8U zero:(MOVDconst [0]) x)
 18079  	// result: (Neq8 zero x)
 18080  	for {
 18081  		zero := v_0
 18082  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18083  			break
 18084  		}
 18085  		x := v_1
 18086  		v.reset(OpNeq8)
 18087  		v.AddArg2(zero, x)
 18088  		return true
 18089  	}
 18090  	// match: (Less8U x (MOVDconst [1]))
 18091  	// result: (Eq8 x (MOVDconst [0]))
 18092  	for {
 18093  		x := v_0
 18094  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18095  			break
 18096  		}
 18097  		v.reset(OpEq8)
 18098  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18099  		v0.AuxInt = int64ToAuxInt(0)
 18100  		v.AddArg2(x, v0)
 18101  		return true
 18102  	}
 18103  	// match: (Less8U x y)
 18104  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 18105  	for {
 18106  		x := v_0
 18107  		y := v_1
 18108  		v.reset(OpARM64LessThanU)
 18109  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18110  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18111  		v1.AddArg(x)
 18112  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18113  		v2.AddArg(y)
 18114  		v0.AddArg2(v1, v2)
 18115  		v.AddArg(v0)
 18116  		return true
 18117  	}
 18118  }
 18119  func rewriteValueARM64_OpLoad(v *Value) bool {
 18120  	v_1 := v.Args[1]
 18121  	v_0 := v.Args[0]
 18122  	// match: (Load <t> ptr mem)
 18123  	// cond: t.IsBoolean()
 18124  	// result: (MOVBUload ptr mem)
 18125  	for {
 18126  		t := v.Type
 18127  		ptr := v_0
 18128  		mem := v_1
 18129  		if !(t.IsBoolean()) {
 18130  			break
 18131  		}
 18132  		v.reset(OpARM64MOVBUload)
 18133  		v.AddArg2(ptr, mem)
 18134  		return true
 18135  	}
 18136  	// match: (Load <t> ptr mem)
 18137  	// cond: (is8BitInt(t) && t.IsSigned())
 18138  	// result: (MOVBload ptr mem)
 18139  	for {
 18140  		t := v.Type
 18141  		ptr := v_0
 18142  		mem := v_1
 18143  		if !(is8BitInt(t) && t.IsSigned()) {
 18144  			break
 18145  		}
 18146  		v.reset(OpARM64MOVBload)
 18147  		v.AddArg2(ptr, mem)
 18148  		return true
 18149  	}
 18150  	// match: (Load <t> ptr mem)
 18151  	// cond: (is8BitInt(t) && !t.IsSigned())
 18152  	// result: (MOVBUload ptr mem)
 18153  	for {
 18154  		t := v.Type
 18155  		ptr := v_0
 18156  		mem := v_1
 18157  		if !(is8BitInt(t) && !t.IsSigned()) {
 18158  			break
 18159  		}
 18160  		v.reset(OpARM64MOVBUload)
 18161  		v.AddArg2(ptr, mem)
 18162  		return true
 18163  	}
 18164  	// match: (Load <t> ptr mem)
 18165  	// cond: (is16BitInt(t) && t.IsSigned())
 18166  	// result: (MOVHload ptr mem)
 18167  	for {
 18168  		t := v.Type
 18169  		ptr := v_0
 18170  		mem := v_1
 18171  		if !(is16BitInt(t) && t.IsSigned()) {
 18172  			break
 18173  		}
 18174  		v.reset(OpARM64MOVHload)
 18175  		v.AddArg2(ptr, mem)
 18176  		return true
 18177  	}
 18178  	// match: (Load <t> ptr mem)
 18179  	// cond: (is16BitInt(t) && !t.IsSigned())
 18180  	// result: (MOVHUload ptr mem)
 18181  	for {
 18182  		t := v.Type
 18183  		ptr := v_0
 18184  		mem := v_1
 18185  		if !(is16BitInt(t) && !t.IsSigned()) {
 18186  			break
 18187  		}
 18188  		v.reset(OpARM64MOVHUload)
 18189  		v.AddArg2(ptr, mem)
 18190  		return true
 18191  	}
 18192  	// match: (Load <t> ptr mem)
 18193  	// cond: (is32BitInt(t) && t.IsSigned())
 18194  	// result: (MOVWload ptr mem)
 18195  	for {
 18196  		t := v.Type
 18197  		ptr := v_0
 18198  		mem := v_1
 18199  		if !(is32BitInt(t) && t.IsSigned()) {
 18200  			break
 18201  		}
 18202  		v.reset(OpARM64MOVWload)
 18203  		v.AddArg2(ptr, mem)
 18204  		return true
 18205  	}
 18206  	// match: (Load <t> ptr mem)
 18207  	// cond: (is32BitInt(t) && !t.IsSigned())
 18208  	// result: (MOVWUload ptr mem)
 18209  	for {
 18210  		t := v.Type
 18211  		ptr := v_0
 18212  		mem := v_1
 18213  		if !(is32BitInt(t) && !t.IsSigned()) {
 18214  			break
 18215  		}
 18216  		v.reset(OpARM64MOVWUload)
 18217  		v.AddArg2(ptr, mem)
 18218  		return true
 18219  	}
 18220  	// match: (Load <t> ptr mem)
 18221  	// cond: (is64BitInt(t) || isPtr(t))
 18222  	// result: (MOVDload ptr mem)
 18223  	for {
 18224  		t := v.Type
 18225  		ptr := v_0
 18226  		mem := v_1
 18227  		if !(is64BitInt(t) || isPtr(t)) {
 18228  			break
 18229  		}
 18230  		v.reset(OpARM64MOVDload)
 18231  		v.AddArg2(ptr, mem)
 18232  		return true
 18233  	}
 18234  	// match: (Load <t> ptr mem)
 18235  	// cond: is32BitFloat(t)
 18236  	// result: (FMOVSload ptr mem)
 18237  	for {
 18238  		t := v.Type
 18239  		ptr := v_0
 18240  		mem := v_1
 18241  		if !(is32BitFloat(t)) {
 18242  			break
 18243  		}
 18244  		v.reset(OpARM64FMOVSload)
 18245  		v.AddArg2(ptr, mem)
 18246  		return true
 18247  	}
 18248  	// match: (Load <t> ptr mem)
 18249  	// cond: is64BitFloat(t)
 18250  	// result: (FMOVDload ptr mem)
 18251  	for {
 18252  		t := v.Type
 18253  		ptr := v_0
 18254  		mem := v_1
 18255  		if !(is64BitFloat(t)) {
 18256  			break
 18257  		}
 18258  		v.reset(OpARM64FMOVDload)
 18259  		v.AddArg2(ptr, mem)
 18260  		return true
 18261  	}
 18262  	return false
 18263  }
 18264  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 18265  	v_1 := v.Args[1]
 18266  	v_0 := v.Args[0]
 18267  	b := v.Block
 18268  	typ := &b.Func.Config.Types
 18269  	// match: (LocalAddr <t> {sym} base mem)
 18270  	// cond: t.Elem().HasPointers()
 18271  	// result: (MOVDaddr {sym} (SPanchored base mem))
 18272  	for {
 18273  		t := v.Type
 18274  		sym := auxToSym(v.Aux)
 18275  		base := v_0
 18276  		mem := v_1
 18277  		if !(t.Elem().HasPointers()) {
 18278  			break
 18279  		}
 18280  		v.reset(OpARM64MOVDaddr)
 18281  		v.Aux = symToAux(sym)
 18282  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 18283  		v0.AddArg2(base, mem)
 18284  		v.AddArg(v0)
 18285  		return true
 18286  	}
 18287  	// match: (LocalAddr <t> {sym} base _)
 18288  	// cond: !t.Elem().HasPointers()
 18289  	// result: (MOVDaddr {sym} base)
 18290  	for {
 18291  		t := v.Type
 18292  		sym := auxToSym(v.Aux)
 18293  		base := v_0
 18294  		if !(!t.Elem().HasPointers()) {
 18295  			break
 18296  		}
 18297  		v.reset(OpARM64MOVDaddr)
 18298  		v.Aux = symToAux(sym)
 18299  		v.AddArg(base)
 18300  		return true
 18301  	}
 18302  	return false
 18303  }
 18304  func rewriteValueARM64_OpLsh16x16(v *Value) bool {
 18305  	v_1 := v.Args[1]
 18306  	v_0 := v.Args[0]
 18307  	b := v.Block
 18308  	typ := &b.Func.Config.Types
 18309  	// match: (Lsh16x16 <t> x y)
 18310  	// cond: shiftIsBounded(v)
 18311  	// result: (SLL <t> x y)
 18312  	for {
 18313  		t := v.Type
 18314  		x := v_0
 18315  		y := v_1
 18316  		if !(shiftIsBounded(v)) {
 18317  			break
 18318  		}
 18319  		v.reset(OpARM64SLL)
 18320  		v.Type = t
 18321  		v.AddArg2(x, y)
 18322  		return true
 18323  	}
 18324  	// match: (Lsh16x16 <t> x y)
 18325  	// cond: !shiftIsBounded(v)
 18326  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18327  	for {
 18328  		t := v.Type
 18329  		x := v_0
 18330  		y := v_1
 18331  		if !(!shiftIsBounded(v)) {
 18332  			break
 18333  		}
 18334  		v.reset(OpARM64CSEL)
 18335  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18336  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18337  		v0.AddArg2(x, y)
 18338  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18339  		v1.AuxInt = int64ToAuxInt(0)
 18340  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18341  		v2.AuxInt = int64ToAuxInt(64)
 18342  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18343  		v3.AddArg(y)
 18344  		v2.AddArg(v3)
 18345  		v.AddArg3(v0, v1, v2)
 18346  		return true
 18347  	}
 18348  	return false
 18349  }
 18350  func rewriteValueARM64_OpLsh16x32(v *Value) bool {
 18351  	v_1 := v.Args[1]
 18352  	v_0 := v.Args[0]
 18353  	b := v.Block
 18354  	typ := &b.Func.Config.Types
 18355  	// match: (Lsh16x32 <t> x y)
 18356  	// cond: shiftIsBounded(v)
 18357  	// result: (SLL <t> x y)
 18358  	for {
 18359  		t := v.Type
 18360  		x := v_0
 18361  		y := v_1
 18362  		if !(shiftIsBounded(v)) {
 18363  			break
 18364  		}
 18365  		v.reset(OpARM64SLL)
 18366  		v.Type = t
 18367  		v.AddArg2(x, y)
 18368  		return true
 18369  	}
 18370  	// match: (Lsh16x32 <t> x y)
 18371  	// cond: !shiftIsBounded(v)
 18372  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18373  	for {
 18374  		t := v.Type
 18375  		x := v_0
 18376  		y := v_1
 18377  		if !(!shiftIsBounded(v)) {
 18378  			break
 18379  		}
 18380  		v.reset(OpARM64CSEL)
 18381  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18382  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18383  		v0.AddArg2(x, y)
 18384  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18385  		v1.AuxInt = int64ToAuxInt(0)
 18386  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18387  		v2.AuxInt = int64ToAuxInt(64)
 18388  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18389  		v3.AddArg(y)
 18390  		v2.AddArg(v3)
 18391  		v.AddArg3(v0, v1, v2)
 18392  		return true
 18393  	}
 18394  	return false
 18395  }
 18396  func rewriteValueARM64_OpLsh16x64(v *Value) bool {
 18397  	v_1 := v.Args[1]
 18398  	v_0 := v.Args[0]
 18399  	b := v.Block
 18400  	// match: (Lsh16x64 <t> x y)
 18401  	// cond: shiftIsBounded(v)
 18402  	// result: (SLL <t> x y)
 18403  	for {
 18404  		t := v.Type
 18405  		x := v_0
 18406  		y := v_1
 18407  		if !(shiftIsBounded(v)) {
 18408  			break
 18409  		}
 18410  		v.reset(OpARM64SLL)
 18411  		v.Type = t
 18412  		v.AddArg2(x, y)
 18413  		return true
 18414  	}
 18415  	// match: (Lsh16x64 <t> x y)
 18416  	// cond: !shiftIsBounded(v)
 18417  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18418  	for {
 18419  		t := v.Type
 18420  		x := v_0
 18421  		y := v_1
 18422  		if !(!shiftIsBounded(v)) {
 18423  			break
 18424  		}
 18425  		v.reset(OpARM64CSEL)
 18426  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18427  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18428  		v0.AddArg2(x, y)
 18429  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18430  		v1.AuxInt = int64ToAuxInt(0)
 18431  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18432  		v2.AuxInt = int64ToAuxInt(64)
 18433  		v2.AddArg(y)
 18434  		v.AddArg3(v0, v1, v2)
 18435  		return true
 18436  	}
 18437  	return false
 18438  }
 18439  func rewriteValueARM64_OpLsh16x8(v *Value) bool {
 18440  	v_1 := v.Args[1]
 18441  	v_0 := v.Args[0]
 18442  	b := v.Block
 18443  	typ := &b.Func.Config.Types
 18444  	// match: (Lsh16x8 <t> x y)
 18445  	// cond: shiftIsBounded(v)
 18446  	// result: (SLL <t> x y)
 18447  	for {
 18448  		t := v.Type
 18449  		x := v_0
 18450  		y := v_1
 18451  		if !(shiftIsBounded(v)) {
 18452  			break
 18453  		}
 18454  		v.reset(OpARM64SLL)
 18455  		v.Type = t
 18456  		v.AddArg2(x, y)
 18457  		return true
 18458  	}
 18459  	// match: (Lsh16x8 <t> x y)
 18460  	// cond: !shiftIsBounded(v)
 18461  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18462  	for {
 18463  		t := v.Type
 18464  		x := v_0
 18465  		y := v_1
 18466  		if !(!shiftIsBounded(v)) {
 18467  			break
 18468  		}
 18469  		v.reset(OpARM64CSEL)
 18470  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18471  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18472  		v0.AddArg2(x, y)
 18473  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18474  		v1.AuxInt = int64ToAuxInt(0)
 18475  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18476  		v2.AuxInt = int64ToAuxInt(64)
 18477  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18478  		v3.AddArg(y)
 18479  		v2.AddArg(v3)
 18480  		v.AddArg3(v0, v1, v2)
 18481  		return true
 18482  	}
 18483  	return false
 18484  }
 18485  func rewriteValueARM64_OpLsh32x16(v *Value) bool {
 18486  	v_1 := v.Args[1]
 18487  	v_0 := v.Args[0]
 18488  	b := v.Block
 18489  	typ := &b.Func.Config.Types
 18490  	// match: (Lsh32x16 <t> x y)
 18491  	// cond: shiftIsBounded(v)
 18492  	// result: (SLL <t> x y)
 18493  	for {
 18494  		t := v.Type
 18495  		x := v_0
 18496  		y := v_1
 18497  		if !(shiftIsBounded(v)) {
 18498  			break
 18499  		}
 18500  		v.reset(OpARM64SLL)
 18501  		v.Type = t
 18502  		v.AddArg2(x, y)
 18503  		return true
 18504  	}
 18505  	// match: (Lsh32x16 <t> x y)
 18506  	// cond: !shiftIsBounded(v)
 18507  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18508  	for {
 18509  		t := v.Type
 18510  		x := v_0
 18511  		y := v_1
 18512  		if !(!shiftIsBounded(v)) {
 18513  			break
 18514  		}
 18515  		v.reset(OpARM64CSEL)
 18516  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18517  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18518  		v0.AddArg2(x, y)
 18519  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18520  		v1.AuxInt = int64ToAuxInt(0)
 18521  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18522  		v2.AuxInt = int64ToAuxInt(64)
 18523  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18524  		v3.AddArg(y)
 18525  		v2.AddArg(v3)
 18526  		v.AddArg3(v0, v1, v2)
 18527  		return true
 18528  	}
 18529  	return false
 18530  }
 18531  func rewriteValueARM64_OpLsh32x32(v *Value) bool {
 18532  	v_1 := v.Args[1]
 18533  	v_0 := v.Args[0]
 18534  	b := v.Block
 18535  	typ := &b.Func.Config.Types
 18536  	// match: (Lsh32x32 <t> x y)
 18537  	// cond: shiftIsBounded(v)
 18538  	// result: (SLL <t> x y)
 18539  	for {
 18540  		t := v.Type
 18541  		x := v_0
 18542  		y := v_1
 18543  		if !(shiftIsBounded(v)) {
 18544  			break
 18545  		}
 18546  		v.reset(OpARM64SLL)
 18547  		v.Type = t
 18548  		v.AddArg2(x, y)
 18549  		return true
 18550  	}
 18551  	// match: (Lsh32x32 <t> x y)
 18552  	// cond: !shiftIsBounded(v)
 18553  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18554  	for {
 18555  		t := v.Type
 18556  		x := v_0
 18557  		y := v_1
 18558  		if !(!shiftIsBounded(v)) {
 18559  			break
 18560  		}
 18561  		v.reset(OpARM64CSEL)
 18562  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18563  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18564  		v0.AddArg2(x, y)
 18565  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18566  		v1.AuxInt = int64ToAuxInt(0)
 18567  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18568  		v2.AuxInt = int64ToAuxInt(64)
 18569  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18570  		v3.AddArg(y)
 18571  		v2.AddArg(v3)
 18572  		v.AddArg3(v0, v1, v2)
 18573  		return true
 18574  	}
 18575  	return false
 18576  }
 18577  func rewriteValueARM64_OpLsh32x64(v *Value) bool {
 18578  	v_1 := v.Args[1]
 18579  	v_0 := v.Args[0]
 18580  	b := v.Block
 18581  	// match: (Lsh32x64 <t> x y)
 18582  	// cond: shiftIsBounded(v)
 18583  	// result: (SLL <t> x y)
 18584  	for {
 18585  		t := v.Type
 18586  		x := v_0
 18587  		y := v_1
 18588  		if !(shiftIsBounded(v)) {
 18589  			break
 18590  		}
 18591  		v.reset(OpARM64SLL)
 18592  		v.Type = t
 18593  		v.AddArg2(x, y)
 18594  		return true
 18595  	}
 18596  	// match: (Lsh32x64 <t> x y)
 18597  	// cond: !shiftIsBounded(v)
 18598  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18599  	for {
 18600  		t := v.Type
 18601  		x := v_0
 18602  		y := v_1
 18603  		if !(!shiftIsBounded(v)) {
 18604  			break
 18605  		}
 18606  		v.reset(OpARM64CSEL)
 18607  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18608  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18609  		v0.AddArg2(x, y)
 18610  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18611  		v1.AuxInt = int64ToAuxInt(0)
 18612  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18613  		v2.AuxInt = int64ToAuxInt(64)
 18614  		v2.AddArg(y)
 18615  		v.AddArg3(v0, v1, v2)
 18616  		return true
 18617  	}
 18618  	return false
 18619  }
 18620  func rewriteValueARM64_OpLsh32x8(v *Value) bool {
 18621  	v_1 := v.Args[1]
 18622  	v_0 := v.Args[0]
 18623  	b := v.Block
 18624  	typ := &b.Func.Config.Types
 18625  	// match: (Lsh32x8 <t> x y)
 18626  	// cond: shiftIsBounded(v)
 18627  	// result: (SLL <t> x y)
 18628  	for {
 18629  		t := v.Type
 18630  		x := v_0
 18631  		y := v_1
 18632  		if !(shiftIsBounded(v)) {
 18633  			break
 18634  		}
 18635  		v.reset(OpARM64SLL)
 18636  		v.Type = t
 18637  		v.AddArg2(x, y)
 18638  		return true
 18639  	}
 18640  	// match: (Lsh32x8 <t> x y)
 18641  	// cond: !shiftIsBounded(v)
 18642  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18643  	for {
 18644  		t := v.Type
 18645  		x := v_0
 18646  		y := v_1
 18647  		if !(!shiftIsBounded(v)) {
 18648  			break
 18649  		}
 18650  		v.reset(OpARM64CSEL)
 18651  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18652  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18653  		v0.AddArg2(x, y)
 18654  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18655  		v1.AuxInt = int64ToAuxInt(0)
 18656  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18657  		v2.AuxInt = int64ToAuxInt(64)
 18658  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18659  		v3.AddArg(y)
 18660  		v2.AddArg(v3)
 18661  		v.AddArg3(v0, v1, v2)
 18662  		return true
 18663  	}
 18664  	return false
 18665  }
 18666  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 18667  	v_1 := v.Args[1]
 18668  	v_0 := v.Args[0]
 18669  	b := v.Block
 18670  	typ := &b.Func.Config.Types
 18671  	// match: (Lsh64x16 <t> x y)
 18672  	// cond: shiftIsBounded(v)
 18673  	// result: (SLL <t> x y)
 18674  	for {
 18675  		t := v.Type
 18676  		x := v_0
 18677  		y := v_1
 18678  		if !(shiftIsBounded(v)) {
 18679  			break
 18680  		}
 18681  		v.reset(OpARM64SLL)
 18682  		v.Type = t
 18683  		v.AddArg2(x, y)
 18684  		return true
 18685  	}
 18686  	// match: (Lsh64x16 <t> x y)
 18687  	// cond: !shiftIsBounded(v)
 18688  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18689  	for {
 18690  		t := v.Type
 18691  		x := v_0
 18692  		y := v_1
 18693  		if !(!shiftIsBounded(v)) {
 18694  			break
 18695  		}
 18696  		v.reset(OpARM64CSEL)
 18697  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18698  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18699  		v0.AddArg2(x, y)
 18700  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18701  		v1.AuxInt = int64ToAuxInt(0)
 18702  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18703  		v2.AuxInt = int64ToAuxInt(64)
 18704  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18705  		v3.AddArg(y)
 18706  		v2.AddArg(v3)
 18707  		v.AddArg3(v0, v1, v2)
 18708  		return true
 18709  	}
 18710  	return false
 18711  }
 18712  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 18713  	v_1 := v.Args[1]
 18714  	v_0 := v.Args[0]
 18715  	b := v.Block
 18716  	typ := &b.Func.Config.Types
 18717  	// match: (Lsh64x32 <t> x y)
 18718  	// cond: shiftIsBounded(v)
 18719  	// result: (SLL <t> x y)
 18720  	for {
 18721  		t := v.Type
 18722  		x := v_0
 18723  		y := v_1
 18724  		if !(shiftIsBounded(v)) {
 18725  			break
 18726  		}
 18727  		v.reset(OpARM64SLL)
 18728  		v.Type = t
 18729  		v.AddArg2(x, y)
 18730  		return true
 18731  	}
 18732  	// match: (Lsh64x32 <t> x y)
 18733  	// cond: !shiftIsBounded(v)
 18734  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18735  	for {
 18736  		t := v.Type
 18737  		x := v_0
 18738  		y := v_1
 18739  		if !(!shiftIsBounded(v)) {
 18740  			break
 18741  		}
 18742  		v.reset(OpARM64CSEL)
 18743  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18744  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18745  		v0.AddArg2(x, y)
 18746  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18747  		v1.AuxInt = int64ToAuxInt(0)
 18748  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18749  		v2.AuxInt = int64ToAuxInt(64)
 18750  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18751  		v3.AddArg(y)
 18752  		v2.AddArg(v3)
 18753  		v.AddArg3(v0, v1, v2)
 18754  		return true
 18755  	}
 18756  	return false
 18757  }
 18758  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 18759  	v_1 := v.Args[1]
 18760  	v_0 := v.Args[0]
 18761  	b := v.Block
 18762  	// match: (Lsh64x64 <t> x y)
 18763  	// cond: shiftIsBounded(v)
 18764  	// result: (SLL <t> x y)
 18765  	for {
 18766  		t := v.Type
 18767  		x := v_0
 18768  		y := v_1
 18769  		if !(shiftIsBounded(v)) {
 18770  			break
 18771  		}
 18772  		v.reset(OpARM64SLL)
 18773  		v.Type = t
 18774  		v.AddArg2(x, y)
 18775  		return true
 18776  	}
 18777  	// match: (Lsh64x64 <t> x y)
 18778  	// cond: !shiftIsBounded(v)
 18779  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18780  	for {
 18781  		t := v.Type
 18782  		x := v_0
 18783  		y := v_1
 18784  		if !(!shiftIsBounded(v)) {
 18785  			break
 18786  		}
 18787  		v.reset(OpARM64CSEL)
 18788  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18789  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18790  		v0.AddArg2(x, y)
 18791  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18792  		v1.AuxInt = int64ToAuxInt(0)
 18793  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18794  		v2.AuxInt = int64ToAuxInt(64)
 18795  		v2.AddArg(y)
 18796  		v.AddArg3(v0, v1, v2)
 18797  		return true
 18798  	}
 18799  	return false
 18800  }
 18801  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 18802  	v_1 := v.Args[1]
 18803  	v_0 := v.Args[0]
 18804  	b := v.Block
 18805  	typ := &b.Func.Config.Types
 18806  	// match: (Lsh64x8 <t> x y)
 18807  	// cond: shiftIsBounded(v)
 18808  	// result: (SLL <t> x y)
 18809  	for {
 18810  		t := v.Type
 18811  		x := v_0
 18812  		y := v_1
 18813  		if !(shiftIsBounded(v)) {
 18814  			break
 18815  		}
 18816  		v.reset(OpARM64SLL)
 18817  		v.Type = t
 18818  		v.AddArg2(x, y)
 18819  		return true
 18820  	}
 18821  	// match: (Lsh64x8 <t> x y)
 18822  	// cond: !shiftIsBounded(v)
 18823  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18824  	for {
 18825  		t := v.Type
 18826  		x := v_0
 18827  		y := v_1
 18828  		if !(!shiftIsBounded(v)) {
 18829  			break
 18830  		}
 18831  		v.reset(OpARM64CSEL)
 18832  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18833  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18834  		v0.AddArg2(x, y)
 18835  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18836  		v1.AuxInt = int64ToAuxInt(0)
 18837  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18838  		v2.AuxInt = int64ToAuxInt(64)
 18839  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18840  		v3.AddArg(y)
 18841  		v2.AddArg(v3)
 18842  		v.AddArg3(v0, v1, v2)
 18843  		return true
 18844  	}
 18845  	return false
 18846  }
 18847  func rewriteValueARM64_OpLsh8x16(v *Value) bool {
 18848  	v_1 := v.Args[1]
 18849  	v_0 := v.Args[0]
 18850  	b := v.Block
 18851  	typ := &b.Func.Config.Types
 18852  	// match: (Lsh8x16 <t> x y)
 18853  	// cond: shiftIsBounded(v)
 18854  	// result: (SLL <t> x y)
 18855  	for {
 18856  		t := v.Type
 18857  		x := v_0
 18858  		y := v_1
 18859  		if !(shiftIsBounded(v)) {
 18860  			break
 18861  		}
 18862  		v.reset(OpARM64SLL)
 18863  		v.Type = t
 18864  		v.AddArg2(x, y)
 18865  		return true
 18866  	}
 18867  	// match: (Lsh8x16 <t> x y)
 18868  	// cond: !shiftIsBounded(v)
 18869  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18870  	for {
 18871  		t := v.Type
 18872  		x := v_0
 18873  		y := v_1
 18874  		if !(!shiftIsBounded(v)) {
 18875  			break
 18876  		}
 18877  		v.reset(OpARM64CSEL)
 18878  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18879  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18880  		v0.AddArg2(x, y)
 18881  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18882  		v1.AuxInt = int64ToAuxInt(0)
 18883  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18884  		v2.AuxInt = int64ToAuxInt(64)
 18885  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18886  		v3.AddArg(y)
 18887  		v2.AddArg(v3)
 18888  		v.AddArg3(v0, v1, v2)
 18889  		return true
 18890  	}
 18891  	return false
 18892  }
 18893  func rewriteValueARM64_OpLsh8x32(v *Value) bool {
 18894  	v_1 := v.Args[1]
 18895  	v_0 := v.Args[0]
 18896  	b := v.Block
 18897  	typ := &b.Func.Config.Types
 18898  	// match: (Lsh8x32 <t> x y)
 18899  	// cond: shiftIsBounded(v)
 18900  	// result: (SLL <t> x y)
 18901  	for {
 18902  		t := v.Type
 18903  		x := v_0
 18904  		y := v_1
 18905  		if !(shiftIsBounded(v)) {
 18906  			break
 18907  		}
 18908  		v.reset(OpARM64SLL)
 18909  		v.Type = t
 18910  		v.AddArg2(x, y)
 18911  		return true
 18912  	}
 18913  	// match: (Lsh8x32 <t> x y)
 18914  	// cond: !shiftIsBounded(v)
 18915  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18916  	for {
 18917  		t := v.Type
 18918  		x := v_0
 18919  		y := v_1
 18920  		if !(!shiftIsBounded(v)) {
 18921  			break
 18922  		}
 18923  		v.reset(OpARM64CSEL)
 18924  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18925  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18926  		v0.AddArg2(x, y)
 18927  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18928  		v1.AuxInt = int64ToAuxInt(0)
 18929  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18930  		v2.AuxInt = int64ToAuxInt(64)
 18931  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18932  		v3.AddArg(y)
 18933  		v2.AddArg(v3)
 18934  		v.AddArg3(v0, v1, v2)
 18935  		return true
 18936  	}
 18937  	return false
 18938  }
 18939  func rewriteValueARM64_OpLsh8x64(v *Value) bool {
 18940  	v_1 := v.Args[1]
 18941  	v_0 := v.Args[0]
 18942  	b := v.Block
 18943  	// match: (Lsh8x64 <t> x y)
 18944  	// cond: shiftIsBounded(v)
 18945  	// result: (SLL <t> x y)
 18946  	for {
 18947  		t := v.Type
 18948  		x := v_0
 18949  		y := v_1
 18950  		if !(shiftIsBounded(v)) {
 18951  			break
 18952  		}
 18953  		v.reset(OpARM64SLL)
 18954  		v.Type = t
 18955  		v.AddArg2(x, y)
 18956  		return true
 18957  	}
 18958  	// match: (Lsh8x64 <t> x y)
 18959  	// cond: !shiftIsBounded(v)
 18960  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18961  	for {
 18962  		t := v.Type
 18963  		x := v_0
 18964  		y := v_1
 18965  		if !(!shiftIsBounded(v)) {
 18966  			break
 18967  		}
 18968  		v.reset(OpARM64CSEL)
 18969  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18970  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18971  		v0.AddArg2(x, y)
 18972  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18973  		v1.AuxInt = int64ToAuxInt(0)
 18974  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18975  		v2.AuxInt = int64ToAuxInt(64)
 18976  		v2.AddArg(y)
 18977  		v.AddArg3(v0, v1, v2)
 18978  		return true
 18979  	}
 18980  	return false
 18981  }
 18982  func rewriteValueARM64_OpLsh8x8(v *Value) bool {
 18983  	v_1 := v.Args[1]
 18984  	v_0 := v.Args[0]
 18985  	b := v.Block
 18986  	typ := &b.Func.Config.Types
 18987  	// match: (Lsh8x8 <t> x y)
 18988  	// cond: shiftIsBounded(v)
 18989  	// result: (SLL <t> x y)
 18990  	for {
 18991  		t := v.Type
 18992  		x := v_0
 18993  		y := v_1
 18994  		if !(shiftIsBounded(v)) {
 18995  			break
 18996  		}
 18997  		v.reset(OpARM64SLL)
 18998  		v.Type = t
 18999  		v.AddArg2(x, y)
 19000  		return true
 19001  	}
 19002  	// match: (Lsh8x8 <t> x y)
 19003  	// cond: !shiftIsBounded(v)
 19004  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 19005  	for {
 19006  		t := v.Type
 19007  		x := v_0
 19008  		y := v_1
 19009  		if !(!shiftIsBounded(v)) {
 19010  			break
 19011  		}
 19012  		v.reset(OpARM64CSEL)
 19013  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19014  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19015  		v0.AddArg2(x, y)
 19016  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19017  		v1.AuxInt = int64ToAuxInt(0)
 19018  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19019  		v2.AuxInt = int64ToAuxInt(64)
 19020  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19021  		v3.AddArg(y)
 19022  		v2.AddArg(v3)
 19023  		v.AddArg3(v0, v1, v2)
 19024  		return true
 19025  	}
 19026  	return false
 19027  }
 19028  func rewriteValueARM64_OpMod16(v *Value) bool {
 19029  	v_1 := v.Args[1]
 19030  	v_0 := v.Args[0]
 19031  	b := v.Block
 19032  	typ := &b.Func.Config.Types
 19033  	// match: (Mod16 x y)
 19034  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 19035  	for {
 19036  		x := v_0
 19037  		y := v_1
 19038  		v.reset(OpARM64MODW)
 19039  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19040  		v0.AddArg(x)
 19041  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19042  		v1.AddArg(y)
 19043  		v.AddArg2(v0, v1)
 19044  		return true
 19045  	}
 19046  }
 19047  func rewriteValueARM64_OpMod16u(v *Value) bool {
 19048  	v_1 := v.Args[1]
 19049  	v_0 := v.Args[0]
 19050  	b := v.Block
 19051  	typ := &b.Func.Config.Types
 19052  	// match: (Mod16u x y)
 19053  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 19054  	for {
 19055  		x := v_0
 19056  		y := v_1
 19057  		v.reset(OpARM64UMODW)
 19058  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19059  		v0.AddArg(x)
 19060  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19061  		v1.AddArg(y)
 19062  		v.AddArg2(v0, v1)
 19063  		return true
 19064  	}
 19065  }
 19066  func rewriteValueARM64_OpMod32(v *Value) bool {
 19067  	v_1 := v.Args[1]
 19068  	v_0 := v.Args[0]
 19069  	// match: (Mod32 x y)
 19070  	// result: (MODW x y)
 19071  	for {
 19072  		x := v_0
 19073  		y := v_1
 19074  		v.reset(OpARM64MODW)
 19075  		v.AddArg2(x, y)
 19076  		return true
 19077  	}
 19078  }
 19079  func rewriteValueARM64_OpMod64(v *Value) bool {
 19080  	v_1 := v.Args[1]
 19081  	v_0 := v.Args[0]
 19082  	// match: (Mod64 x y)
 19083  	// result: (MOD x y)
 19084  	for {
 19085  		x := v_0
 19086  		y := v_1
 19087  		v.reset(OpARM64MOD)
 19088  		v.AddArg2(x, y)
 19089  		return true
 19090  	}
 19091  }
 19092  func rewriteValueARM64_OpMod8(v *Value) bool {
 19093  	v_1 := v.Args[1]
 19094  	v_0 := v.Args[0]
 19095  	b := v.Block
 19096  	typ := &b.Func.Config.Types
 19097  	// match: (Mod8 x y)
 19098  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 19099  	for {
 19100  		x := v_0
 19101  		y := v_1
 19102  		v.reset(OpARM64MODW)
 19103  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19104  		v0.AddArg(x)
 19105  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19106  		v1.AddArg(y)
 19107  		v.AddArg2(v0, v1)
 19108  		return true
 19109  	}
 19110  }
 19111  func rewriteValueARM64_OpMod8u(v *Value) bool {
 19112  	v_1 := v.Args[1]
 19113  	v_0 := v.Args[0]
 19114  	b := v.Block
 19115  	typ := &b.Func.Config.Types
 19116  	// match: (Mod8u x y)
 19117  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 19118  	for {
 19119  		x := v_0
 19120  		y := v_1
 19121  		v.reset(OpARM64UMODW)
 19122  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19123  		v0.AddArg(x)
 19124  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19125  		v1.AddArg(y)
 19126  		v.AddArg2(v0, v1)
 19127  		return true
 19128  	}
 19129  }
 19130  func rewriteValueARM64_OpMove(v *Value) bool {
 19131  	v_2 := v.Args[2]
 19132  	v_1 := v.Args[1]
 19133  	v_0 := v.Args[0]
 19134  	b := v.Block
 19135  	typ := &b.Func.Config.Types
 19136  	// match: (Move [0] _ _ mem)
 19137  	// result: mem
 19138  	for {
 19139  		if auxIntToInt64(v.AuxInt) != 0 {
 19140  			break
 19141  		}
 19142  		mem := v_2
 19143  		v.copyOf(mem)
 19144  		return true
 19145  	}
 19146  	// match: (Move [1] dst src mem)
 19147  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 19148  	for {
 19149  		if auxIntToInt64(v.AuxInt) != 1 {
 19150  			break
 19151  		}
 19152  		dst := v_0
 19153  		src := v_1
 19154  		mem := v_2
 19155  		v.reset(OpARM64MOVBstore)
 19156  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19157  		v0.AddArg2(src, mem)
 19158  		v.AddArg3(dst, v0, mem)
 19159  		return true
 19160  	}
 19161  	// match: (Move [2] dst src mem)
 19162  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 19163  	for {
 19164  		if auxIntToInt64(v.AuxInt) != 2 {
 19165  			break
 19166  		}
 19167  		dst := v_0
 19168  		src := v_1
 19169  		mem := v_2
 19170  		v.reset(OpARM64MOVHstore)
 19171  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19172  		v0.AddArg2(src, mem)
 19173  		v.AddArg3(dst, v0, mem)
 19174  		return true
 19175  	}
 19176  	// match: (Move [3] dst src mem)
 19177  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 19178  	for {
 19179  		if auxIntToInt64(v.AuxInt) != 3 {
 19180  			break
 19181  		}
 19182  		dst := v_0
 19183  		src := v_1
 19184  		mem := v_2
 19185  		v.reset(OpARM64MOVBstore)
 19186  		v.AuxInt = int32ToAuxInt(2)
 19187  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19188  		v0.AuxInt = int32ToAuxInt(2)
 19189  		v0.AddArg2(src, mem)
 19190  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 19191  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19192  		v2.AddArg2(src, mem)
 19193  		v1.AddArg3(dst, v2, mem)
 19194  		v.AddArg3(dst, v0, v1)
 19195  		return true
 19196  	}
 19197  	// match: (Move [4] dst src mem)
 19198  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 19199  	for {
 19200  		if auxIntToInt64(v.AuxInt) != 4 {
 19201  			break
 19202  		}
 19203  		dst := v_0
 19204  		src := v_1
 19205  		mem := v_2
 19206  		v.reset(OpARM64MOVWstore)
 19207  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19208  		v0.AddArg2(src, mem)
 19209  		v.AddArg3(dst, v0, mem)
 19210  		return true
 19211  	}
 19212  	// match: (Move [5] dst src mem)
 19213  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19214  	for {
 19215  		if auxIntToInt64(v.AuxInt) != 5 {
 19216  			break
 19217  		}
 19218  		dst := v_0
 19219  		src := v_1
 19220  		mem := v_2
 19221  		v.reset(OpARM64MOVBstore)
 19222  		v.AuxInt = int32ToAuxInt(4)
 19223  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19224  		v0.AuxInt = int32ToAuxInt(4)
 19225  		v0.AddArg2(src, mem)
 19226  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19227  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19228  		v2.AddArg2(src, mem)
 19229  		v1.AddArg3(dst, v2, mem)
 19230  		v.AddArg3(dst, v0, v1)
 19231  		return true
 19232  	}
 19233  	// match: (Move [6] dst src mem)
 19234  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19235  	for {
 19236  		if auxIntToInt64(v.AuxInt) != 6 {
 19237  			break
 19238  		}
 19239  		dst := v_0
 19240  		src := v_1
 19241  		mem := v_2
 19242  		v.reset(OpARM64MOVHstore)
 19243  		v.AuxInt = int32ToAuxInt(4)
 19244  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19245  		v0.AuxInt = int32ToAuxInt(4)
 19246  		v0.AddArg2(src, mem)
 19247  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19248  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19249  		v2.AddArg2(src, mem)
 19250  		v1.AddArg3(dst, v2, mem)
 19251  		v.AddArg3(dst, v0, v1)
 19252  		return true
 19253  	}
 19254  	// match: (Move [7] dst src mem)
 19255  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19256  	for {
 19257  		if auxIntToInt64(v.AuxInt) != 7 {
 19258  			break
 19259  		}
 19260  		dst := v_0
 19261  		src := v_1
 19262  		mem := v_2
 19263  		v.reset(OpARM64MOVWstore)
 19264  		v.AuxInt = int32ToAuxInt(3)
 19265  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19266  		v0.AuxInt = int32ToAuxInt(3)
 19267  		v0.AddArg2(src, mem)
 19268  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19269  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19270  		v2.AddArg2(src, mem)
 19271  		v1.AddArg3(dst, v2, mem)
 19272  		v.AddArg3(dst, v0, v1)
 19273  		return true
 19274  	}
 19275  	// match: (Move [8] dst src mem)
 19276  	// result: (MOVDstore dst (MOVDload src mem) mem)
 19277  	for {
 19278  		if auxIntToInt64(v.AuxInt) != 8 {
 19279  			break
 19280  		}
 19281  		dst := v_0
 19282  		src := v_1
 19283  		mem := v_2
 19284  		v.reset(OpARM64MOVDstore)
 19285  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19286  		v0.AddArg2(src, mem)
 19287  		v.AddArg3(dst, v0, mem)
 19288  		return true
 19289  	}
 19290  	// match: (Move [9] dst src mem)
 19291  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19292  	for {
 19293  		if auxIntToInt64(v.AuxInt) != 9 {
 19294  			break
 19295  		}
 19296  		dst := v_0
 19297  		src := v_1
 19298  		mem := v_2
 19299  		v.reset(OpARM64MOVBstore)
 19300  		v.AuxInt = int32ToAuxInt(8)
 19301  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19302  		v0.AuxInt = int32ToAuxInt(8)
 19303  		v0.AddArg2(src, mem)
 19304  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19305  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19306  		v2.AddArg2(src, mem)
 19307  		v1.AddArg3(dst, v2, mem)
 19308  		v.AddArg3(dst, v0, v1)
 19309  		return true
 19310  	}
 19311  	// match: (Move [10] dst src mem)
 19312  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19313  	for {
 19314  		if auxIntToInt64(v.AuxInt) != 10 {
 19315  			break
 19316  		}
 19317  		dst := v_0
 19318  		src := v_1
 19319  		mem := v_2
 19320  		v.reset(OpARM64MOVHstore)
 19321  		v.AuxInt = int32ToAuxInt(8)
 19322  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19323  		v0.AuxInt = int32ToAuxInt(8)
 19324  		v0.AddArg2(src, mem)
 19325  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19326  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19327  		v2.AddArg2(src, mem)
 19328  		v1.AddArg3(dst, v2, mem)
 19329  		v.AddArg3(dst, v0, v1)
 19330  		return true
 19331  	}
 19332  	// match: (Move [11] dst src mem)
 19333  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19334  	for {
 19335  		if auxIntToInt64(v.AuxInt) != 11 {
 19336  			break
 19337  		}
 19338  		dst := v_0
 19339  		src := v_1
 19340  		mem := v_2
 19341  		v.reset(OpARM64MOVDstore)
 19342  		v.AuxInt = int32ToAuxInt(3)
 19343  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19344  		v0.AuxInt = int32ToAuxInt(3)
 19345  		v0.AddArg2(src, mem)
 19346  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19347  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19348  		v2.AddArg2(src, mem)
 19349  		v1.AddArg3(dst, v2, mem)
 19350  		v.AddArg3(dst, v0, v1)
 19351  		return true
 19352  	}
 19353  	// match: (Move [12] dst src mem)
 19354  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19355  	for {
 19356  		if auxIntToInt64(v.AuxInt) != 12 {
 19357  			break
 19358  		}
 19359  		dst := v_0
 19360  		src := v_1
 19361  		mem := v_2
 19362  		v.reset(OpARM64MOVWstore)
 19363  		v.AuxInt = int32ToAuxInt(8)
 19364  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19365  		v0.AuxInt = int32ToAuxInt(8)
 19366  		v0.AddArg2(src, mem)
 19367  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19368  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19369  		v2.AddArg2(src, mem)
 19370  		v1.AddArg3(dst, v2, mem)
 19371  		v.AddArg3(dst, v0, v1)
 19372  		return true
 19373  	}
 19374  	// match: (Move [13] dst src mem)
 19375  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19376  	for {
 19377  		if auxIntToInt64(v.AuxInt) != 13 {
 19378  			break
 19379  		}
 19380  		dst := v_0
 19381  		src := v_1
 19382  		mem := v_2
 19383  		v.reset(OpARM64MOVDstore)
 19384  		v.AuxInt = int32ToAuxInt(5)
 19385  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19386  		v0.AuxInt = int32ToAuxInt(5)
 19387  		v0.AddArg2(src, mem)
 19388  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19389  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19390  		v2.AddArg2(src, mem)
 19391  		v1.AddArg3(dst, v2, mem)
 19392  		v.AddArg3(dst, v0, v1)
 19393  		return true
 19394  	}
 19395  	// match: (Move [14] dst src mem)
 19396  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19397  	for {
 19398  		if auxIntToInt64(v.AuxInt) != 14 {
 19399  			break
 19400  		}
 19401  		dst := v_0
 19402  		src := v_1
 19403  		mem := v_2
 19404  		v.reset(OpARM64MOVDstore)
 19405  		v.AuxInt = int32ToAuxInt(6)
 19406  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19407  		v0.AuxInt = int32ToAuxInt(6)
 19408  		v0.AddArg2(src, mem)
 19409  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19410  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19411  		v2.AddArg2(src, mem)
 19412  		v1.AddArg3(dst, v2, mem)
 19413  		v.AddArg3(dst, v0, v1)
 19414  		return true
 19415  	}
 19416  	// match: (Move [15] dst src mem)
 19417  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19418  	for {
 19419  		if auxIntToInt64(v.AuxInt) != 15 {
 19420  			break
 19421  		}
 19422  		dst := v_0
 19423  		src := v_1
 19424  		mem := v_2
 19425  		v.reset(OpARM64MOVDstore)
 19426  		v.AuxInt = int32ToAuxInt(7)
 19427  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19428  		v0.AuxInt = int32ToAuxInt(7)
 19429  		v0.AddArg2(src, mem)
 19430  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19431  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19432  		v2.AddArg2(src, mem)
 19433  		v1.AddArg3(dst, v2, mem)
 19434  		v.AddArg3(dst, v0, v1)
 19435  		return true
 19436  	}
 19437  	// match: (Move [16] dst src mem)
 19438  	// result: (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)
 19439  	for {
 19440  		if auxIntToInt64(v.AuxInt) != 16 {
 19441  			break
 19442  		}
 19443  		dst := v_0
 19444  		src := v_1
 19445  		mem := v_2
 19446  		v.reset(OpARM64STP)
 19447  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19448  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19449  		v1.AddArg2(src, mem)
 19450  		v0.AddArg(v1)
 19451  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19452  		v2.AddArg(v1)
 19453  		v.AddArg4(dst, v0, v2, mem)
 19454  		return true
 19455  	}
 19456  	// match: (Move [s] dst src mem)
 19457  	// cond: s > 16 && s <= 24
 19458  	// result: (MOVDstore [int32(s-8)] dst (MOVDload [int32(s-8)] src mem) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem))
 19459  	for {
 19460  		s := auxIntToInt64(v.AuxInt)
 19461  		dst := v_0
 19462  		src := v_1
 19463  		mem := v_2
 19464  		if !(s > 16 && s <= 24) {
 19465  			break
 19466  		}
 19467  		v.reset(OpARM64MOVDstore)
 19468  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 19469  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19470  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 19471  		v0.AddArg2(src, mem)
 19472  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19473  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19474  		v3 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19475  		v3.AddArg2(src, mem)
 19476  		v2.AddArg(v3)
 19477  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19478  		v4.AddArg(v3)
 19479  		v1.AddArg4(dst, v2, v4, mem)
 19480  		v.AddArg3(dst, v0, v1)
 19481  		return true
 19482  	}
 19483  	// match: (Move [s] dst src mem)
 19484  	// cond: s > 24 && s <= 32
 19485  	// result: (STP [int32(s-16)] dst (Select0 <typ.UInt64> (LDP [int32(s-16)] src mem)) (Select1 <typ.UInt64> (LDP [int32(s-16)] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem))
 19486  	for {
 19487  		s := auxIntToInt64(v.AuxInt)
 19488  		dst := v_0
 19489  		src := v_1
 19490  		mem := v_2
 19491  		if !(s > 24 && s <= 32) {
 19492  			break
 19493  		}
 19494  		v.reset(OpARM64STP)
 19495  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 19496  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19497  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19498  		v1.AuxInt = int32ToAuxInt(int32(s - 16))
 19499  		v1.AddArg2(src, mem)
 19500  		v0.AddArg(v1)
 19501  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19502  		v2.AddArg(v1)
 19503  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19504  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19505  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19506  		v5.AddArg2(src, mem)
 19507  		v4.AddArg(v5)
 19508  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19509  		v6.AddArg(v5)
 19510  		v3.AddArg4(dst, v4, v6, mem)
 19511  		v.AddArg4(dst, v0, v2, v3)
 19512  		return true
 19513  	}
 19514  	// match: (Move [s] dst src mem)
 19515  	// cond: s > 32 && s <= 40
 19516  	// result: (MOVDstore [int32(s-8)] dst (MOVDload [int32(s-8)] src mem) (STP [16] dst (Select0 <typ.UInt64> (LDP [16] src mem)) (Select1 <typ.UInt64> (LDP [16] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)))
 19517  	for {
 19518  		s := auxIntToInt64(v.AuxInt)
 19519  		dst := v_0
 19520  		src := v_1
 19521  		mem := v_2
 19522  		if !(s > 32 && s <= 40) {
 19523  			break
 19524  		}
 19525  		v.reset(OpARM64MOVDstore)
 19526  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 19527  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19528  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 19529  		v0.AddArg2(src, mem)
 19530  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19531  		v1.AuxInt = int32ToAuxInt(16)
 19532  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19533  		v3 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19534  		v3.AuxInt = int32ToAuxInt(16)
 19535  		v3.AddArg2(src, mem)
 19536  		v2.AddArg(v3)
 19537  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19538  		v4.AddArg(v3)
 19539  		v5 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19540  		v6 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19541  		v7 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19542  		v7.AddArg2(src, mem)
 19543  		v6.AddArg(v7)
 19544  		v8 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19545  		v8.AddArg(v7)
 19546  		v5.AddArg4(dst, v6, v8, mem)
 19547  		v1.AddArg4(dst, v2, v4, v5)
 19548  		v.AddArg3(dst, v0, v1)
 19549  		return true
 19550  	}
 19551  	// match: (Move [s] dst src mem)
 19552  	// cond: s > 40 && s <= 48
 19553  	// result: (STP [int32(s-16)] dst (Select0 <typ.UInt64> (LDP [int32(s-16)] src mem)) (Select1 <typ.UInt64> (LDP [int32(s-16)] src mem)) (STP [16] dst (Select0 <typ.UInt64> (LDP [16] src mem)) (Select1 <typ.UInt64> (LDP [16] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)))
 19554  	for {
 19555  		s := auxIntToInt64(v.AuxInt)
 19556  		dst := v_0
 19557  		src := v_1
 19558  		mem := v_2
 19559  		if !(s > 40 && s <= 48) {
 19560  			break
 19561  		}
 19562  		v.reset(OpARM64STP)
 19563  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 19564  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19565  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19566  		v1.AuxInt = int32ToAuxInt(int32(s - 16))
 19567  		v1.AddArg2(src, mem)
 19568  		v0.AddArg(v1)
 19569  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19570  		v2.AddArg(v1)
 19571  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19572  		v3.AuxInt = int32ToAuxInt(16)
 19573  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19574  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19575  		v5.AuxInt = int32ToAuxInt(16)
 19576  		v5.AddArg2(src, mem)
 19577  		v4.AddArg(v5)
 19578  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19579  		v6.AddArg(v5)
 19580  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19581  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19582  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19583  		v9.AddArg2(src, mem)
 19584  		v8.AddArg(v9)
 19585  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19586  		v10.AddArg(v9)
 19587  		v7.AddArg4(dst, v8, v10, mem)
 19588  		v3.AddArg4(dst, v4, v6, v7)
 19589  		v.AddArg4(dst, v0, v2, v3)
 19590  		return true
 19591  	}
 19592  	// match: (Move [s] dst src mem)
 19593  	// cond: s > 48 && s <= 56
 19594  	// result: (MOVDstore [int32(s-8)] dst (MOVDload [int32(s-8)] src mem) (STP [32] dst (Select0 <typ.UInt64> (LDP [32] src mem)) (Select1 <typ.UInt64> (LDP [32] src mem)) (STP [16] dst (Select0 <typ.UInt64> (LDP [16] src mem)) (Select1 <typ.UInt64> (LDP [16] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem))))
 19595  	for {
 19596  		s := auxIntToInt64(v.AuxInt)
 19597  		dst := v_0
 19598  		src := v_1
 19599  		mem := v_2
 19600  		if !(s > 48 && s <= 56) {
 19601  			break
 19602  		}
 19603  		v.reset(OpARM64MOVDstore)
 19604  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 19605  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19606  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 19607  		v0.AddArg2(src, mem)
 19608  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19609  		v1.AuxInt = int32ToAuxInt(32)
 19610  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19611  		v3 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19612  		v3.AuxInt = int32ToAuxInt(32)
 19613  		v3.AddArg2(src, mem)
 19614  		v2.AddArg(v3)
 19615  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19616  		v4.AddArg(v3)
 19617  		v5 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19618  		v5.AuxInt = int32ToAuxInt(16)
 19619  		v6 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19620  		v7 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19621  		v7.AuxInt = int32ToAuxInt(16)
 19622  		v7.AddArg2(src, mem)
 19623  		v6.AddArg(v7)
 19624  		v8 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19625  		v8.AddArg(v7)
 19626  		v9 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19627  		v10 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19628  		v11 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19629  		v11.AddArg2(src, mem)
 19630  		v10.AddArg(v11)
 19631  		v12 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19632  		v12.AddArg(v11)
 19633  		v9.AddArg4(dst, v10, v12, mem)
 19634  		v5.AddArg4(dst, v6, v8, v9)
 19635  		v1.AddArg4(dst, v2, v4, v5)
 19636  		v.AddArg3(dst, v0, v1)
 19637  		return true
 19638  	}
 19639  	// match: (Move [s] dst src mem)
 19640  	// cond: s > 56 && s <= 64
 19641  	// result: (STP [int32(s-16)] dst (Select0 <typ.UInt64> (LDP [int32(s-16)] src mem)) (Select1 <typ.UInt64> (LDP [int32(s-16)] src mem)) (STP [32] dst (Select0 <typ.UInt64> (LDP [32] src mem)) (Select1 <typ.UInt64> (LDP [32] src mem)) (STP [16] dst (Select0 <typ.UInt64> (LDP [16] src mem)) (Select1 <typ.UInt64> (LDP [16] src mem)) (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem))))
 19642  	for {
 19643  		s := auxIntToInt64(v.AuxInt)
 19644  		dst := v_0
 19645  		src := v_1
 19646  		mem := v_2
 19647  		if !(s > 56 && s <= 64) {
 19648  			break
 19649  		}
 19650  		v.reset(OpARM64STP)
 19651  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 19652  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19653  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19654  		v1.AuxInt = int32ToAuxInt(int32(s - 16))
 19655  		v1.AddArg2(src, mem)
 19656  		v0.AddArg(v1)
 19657  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19658  		v2.AddArg(v1)
 19659  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19660  		v3.AuxInt = int32ToAuxInt(32)
 19661  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19662  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19663  		v5.AuxInt = int32ToAuxInt(32)
 19664  		v5.AddArg2(src, mem)
 19665  		v4.AddArg(v5)
 19666  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19667  		v6.AddArg(v5)
 19668  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19669  		v7.AuxInt = int32ToAuxInt(16)
 19670  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19671  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19672  		v9.AuxInt = int32ToAuxInt(16)
 19673  		v9.AddArg2(src, mem)
 19674  		v8.AddArg(v9)
 19675  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19676  		v10.AddArg(v9)
 19677  		v11 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19678  		v12 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19679  		v13 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19680  		v13.AddArg2(src, mem)
 19681  		v12.AddArg(v13)
 19682  		v14 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19683  		v14.AddArg(v13)
 19684  		v11.AddArg4(dst, v12, v14, mem)
 19685  		v7.AddArg4(dst, v8, v10, v11)
 19686  		v3.AddArg4(dst, v4, v6, v7)
 19687  		v.AddArg4(dst, v0, v2, v3)
 19688  		return true
 19689  	}
 19690  	// match: (Move [s] dst src mem)
 19691  	// cond: s%16 != 0 && s%16 <= 8 && s > 64
 19692  	// result: (Move [8] (OffPtr <dst.Type> dst [s-8]) (OffPtr <src.Type> src [s-8]) (Move [s-s%16] dst src mem))
 19693  	for {
 19694  		s := auxIntToInt64(v.AuxInt)
 19695  		dst := v_0
 19696  		src := v_1
 19697  		mem := v_2
 19698  		if !(s%16 != 0 && s%16 <= 8 && s > 64) {
 19699  			break
 19700  		}
 19701  		v.reset(OpMove)
 19702  		v.AuxInt = int64ToAuxInt(8)
 19703  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 19704  		v0.AuxInt = int64ToAuxInt(s - 8)
 19705  		v0.AddArg(dst)
 19706  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 19707  		v1.AuxInt = int64ToAuxInt(s - 8)
 19708  		v1.AddArg(src)
 19709  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 19710  		v2.AuxInt = int64ToAuxInt(s - s%16)
 19711  		v2.AddArg3(dst, src, mem)
 19712  		v.AddArg3(v0, v1, v2)
 19713  		return true
 19714  	}
 19715  	// match: (Move [s] dst src mem)
 19716  	// cond: s%16 != 0 && s%16 > 8 && s > 64
 19717  	// result: (Move [16] (OffPtr <dst.Type> dst [s-16]) (OffPtr <src.Type> src [s-16]) (Move [s-s%16] dst src mem))
 19718  	for {
 19719  		s := auxIntToInt64(v.AuxInt)
 19720  		dst := v_0
 19721  		src := v_1
 19722  		mem := v_2
 19723  		if !(s%16 != 0 && s%16 > 8 && s > 64) {
 19724  			break
 19725  		}
 19726  		v.reset(OpMove)
 19727  		v.AuxInt = int64ToAuxInt(16)
 19728  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 19729  		v0.AuxInt = int64ToAuxInt(s - 16)
 19730  		v0.AddArg(dst)
 19731  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 19732  		v1.AuxInt = int64ToAuxInt(s - 16)
 19733  		v1.AddArg(src)
 19734  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 19735  		v2.AuxInt = int64ToAuxInt(s - s%16)
 19736  		v2.AddArg3(dst, src, mem)
 19737  		v.AddArg3(v0, v1, v2)
 19738  		return true
 19739  	}
 19740  	// match: (Move [s] dst src mem)
 19741  	// cond: s > 64 && s <= 16*64 && s%16 == 0 && logLargeCopy(v, s)
 19742  	// result: (DUFFCOPY [8 * (64 - s/16)] dst src mem)
 19743  	for {
 19744  		s := auxIntToInt64(v.AuxInt)
 19745  		dst := v_0
 19746  		src := v_1
 19747  		mem := v_2
 19748  		if !(s > 64 && s <= 16*64 && s%16 == 0 && logLargeCopy(v, s)) {
 19749  			break
 19750  		}
 19751  		v.reset(OpARM64DUFFCOPY)
 19752  		v.AuxInt = int64ToAuxInt(8 * (64 - s/16))
 19753  		v.AddArg3(dst, src, mem)
 19754  		return true
 19755  	}
 19756  	// match: (Move [s] dst src mem)
 19757  	// cond: s%16 == 0 && s > 16*64 && logLargeCopy(v, s)
 19758  	// result: (LoweredMove dst src (ADDconst <src.Type> src [s-16]) mem)
 19759  	for {
 19760  		s := auxIntToInt64(v.AuxInt)
 19761  		dst := v_0
 19762  		src := v_1
 19763  		mem := v_2
 19764  		if !(s%16 == 0 && s > 16*64 && logLargeCopy(v, s)) {
 19765  			break
 19766  		}
 19767  		v.reset(OpARM64LoweredMove)
 19768  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, src.Type)
 19769  		v0.AuxInt = int64ToAuxInt(s - 16)
 19770  		v0.AddArg(src)
 19771  		v.AddArg4(dst, src, v0, mem)
 19772  		return true
 19773  	}
 19774  	return false
 19775  }
 19776  func rewriteValueARM64_OpNeq16(v *Value) bool {
 19777  	v_1 := v.Args[1]
 19778  	v_0 := v.Args[0]
 19779  	b := v.Block
 19780  	typ := &b.Func.Config.Types
 19781  	// match: (Neq16 x y)
 19782  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 19783  	for {
 19784  		x := v_0
 19785  		y := v_1
 19786  		v.reset(OpARM64NotEqual)
 19787  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19788  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19789  		v1.AddArg(x)
 19790  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19791  		v2.AddArg(y)
 19792  		v0.AddArg2(v1, v2)
 19793  		v.AddArg(v0)
 19794  		return true
 19795  	}
 19796  }
 19797  func rewriteValueARM64_OpNeq32(v *Value) bool {
 19798  	v_1 := v.Args[1]
 19799  	v_0 := v.Args[0]
 19800  	b := v.Block
 19801  	// match: (Neq32 x y)
 19802  	// result: (NotEqual (CMPW x y))
 19803  	for {
 19804  		x := v_0
 19805  		y := v_1
 19806  		v.reset(OpARM64NotEqual)
 19807  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19808  		v0.AddArg2(x, y)
 19809  		v.AddArg(v0)
 19810  		return true
 19811  	}
 19812  }
 19813  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 19814  	v_1 := v.Args[1]
 19815  	v_0 := v.Args[0]
 19816  	b := v.Block
 19817  	// match: (Neq32F x y)
 19818  	// result: (NotEqual (FCMPS x y))
 19819  	for {
 19820  		x := v_0
 19821  		y := v_1
 19822  		v.reset(OpARM64NotEqual)
 19823  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 19824  		v0.AddArg2(x, y)
 19825  		v.AddArg(v0)
 19826  		return true
 19827  	}
 19828  }
 19829  func rewriteValueARM64_OpNeq64(v *Value) bool {
 19830  	v_1 := v.Args[1]
 19831  	v_0 := v.Args[0]
 19832  	b := v.Block
 19833  	// match: (Neq64 x y)
 19834  	// result: (NotEqual (CMP x y))
 19835  	for {
 19836  		x := v_0
 19837  		y := v_1
 19838  		v.reset(OpARM64NotEqual)
 19839  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19840  		v0.AddArg2(x, y)
 19841  		v.AddArg(v0)
 19842  		return true
 19843  	}
 19844  }
 19845  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 19846  	v_1 := v.Args[1]
 19847  	v_0 := v.Args[0]
 19848  	b := v.Block
 19849  	// match: (Neq64F x y)
 19850  	// result: (NotEqual (FCMPD x y))
 19851  	for {
 19852  		x := v_0
 19853  		y := v_1
 19854  		v.reset(OpARM64NotEqual)
 19855  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 19856  		v0.AddArg2(x, y)
 19857  		v.AddArg(v0)
 19858  		return true
 19859  	}
 19860  }
 19861  func rewriteValueARM64_OpNeq8(v *Value) bool {
 19862  	v_1 := v.Args[1]
 19863  	v_0 := v.Args[0]
 19864  	b := v.Block
 19865  	typ := &b.Func.Config.Types
 19866  	// match: (Neq8 x y)
 19867  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 19868  	for {
 19869  		x := v_0
 19870  		y := v_1
 19871  		v.reset(OpARM64NotEqual)
 19872  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19873  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19874  		v1.AddArg(x)
 19875  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19876  		v2.AddArg(y)
 19877  		v0.AddArg2(v1, v2)
 19878  		v.AddArg(v0)
 19879  		return true
 19880  	}
 19881  }
 19882  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 19883  	v_1 := v.Args[1]
 19884  	v_0 := v.Args[0]
 19885  	b := v.Block
 19886  	// match: (NeqPtr x y)
 19887  	// result: (NotEqual (CMP x y))
 19888  	for {
 19889  		x := v_0
 19890  		y := v_1
 19891  		v.reset(OpARM64NotEqual)
 19892  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19893  		v0.AddArg2(x, y)
 19894  		v.AddArg(v0)
 19895  		return true
 19896  	}
 19897  }
 19898  func rewriteValueARM64_OpNot(v *Value) bool {
 19899  	v_0 := v.Args[0]
 19900  	b := v.Block
 19901  	typ := &b.Func.Config.Types
 19902  	// match: (Not x)
 19903  	// result: (XOR (MOVDconst [1]) x)
 19904  	for {
 19905  		x := v_0
 19906  		v.reset(OpARM64XOR)
 19907  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19908  		v0.AuxInt = int64ToAuxInt(1)
 19909  		v.AddArg2(v0, x)
 19910  		return true
 19911  	}
 19912  }
 19913  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 19914  	v_0 := v.Args[0]
 19915  	// match: (OffPtr [off] ptr:(SP))
 19916  	// cond: is32Bit(off)
 19917  	// result: (MOVDaddr [int32(off)] ptr)
 19918  	for {
 19919  		off := auxIntToInt64(v.AuxInt)
 19920  		ptr := v_0
 19921  		if ptr.Op != OpSP || !(is32Bit(off)) {
 19922  			break
 19923  		}
 19924  		v.reset(OpARM64MOVDaddr)
 19925  		v.AuxInt = int32ToAuxInt(int32(off))
 19926  		v.AddArg(ptr)
 19927  		return true
 19928  	}
 19929  	// match: (OffPtr [off] ptr)
 19930  	// result: (ADDconst [off] ptr)
 19931  	for {
 19932  		off := auxIntToInt64(v.AuxInt)
 19933  		ptr := v_0
 19934  		v.reset(OpARM64ADDconst)
 19935  		v.AuxInt = int64ToAuxInt(off)
 19936  		v.AddArg(ptr)
 19937  		return true
 19938  	}
 19939  }
 19940  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 19941  	v_0 := v.Args[0]
 19942  	b := v.Block
 19943  	typ := &b.Func.Config.Types
 19944  	// match: (PopCount16 <t> x)
 19945  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 19946  	for {
 19947  		t := v.Type
 19948  		x := v_0
 19949  		v.reset(OpARM64FMOVDfpgp)
 19950  		v.Type = t
 19951  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 19952  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 19953  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 19954  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19955  		v3.AddArg(x)
 19956  		v2.AddArg(v3)
 19957  		v1.AddArg(v2)
 19958  		v0.AddArg(v1)
 19959  		v.AddArg(v0)
 19960  		return true
 19961  	}
 19962  }
 19963  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 19964  	v_0 := v.Args[0]
 19965  	b := v.Block
 19966  	typ := &b.Func.Config.Types
 19967  	// match: (PopCount32 <t> x)
 19968  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 19969  	for {
 19970  		t := v.Type
 19971  		x := v_0
 19972  		v.reset(OpARM64FMOVDfpgp)
 19973  		v.Type = t
 19974  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 19975  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 19976  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 19977  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 19978  		v3.AddArg(x)
 19979  		v2.AddArg(v3)
 19980  		v1.AddArg(v2)
 19981  		v0.AddArg(v1)
 19982  		v.AddArg(v0)
 19983  		return true
 19984  	}
 19985  }
 19986  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 19987  	v_0 := v.Args[0]
 19988  	b := v.Block
 19989  	typ := &b.Func.Config.Types
 19990  	// match: (PopCount64 <t> x)
 19991  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 19992  	for {
 19993  		t := v.Type
 19994  		x := v_0
 19995  		v.reset(OpARM64FMOVDfpgp)
 19996  		v.Type = t
 19997  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 19998  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 19999  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 20000  		v2.AddArg(x)
 20001  		v1.AddArg(v2)
 20002  		v0.AddArg(v1)
 20003  		v.AddArg(v0)
 20004  		return true
 20005  	}
 20006  }
 20007  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 20008  	v_1 := v.Args[1]
 20009  	v_0 := v.Args[0]
 20010  	// match: (PrefetchCache addr mem)
 20011  	// result: (PRFM [0] addr mem)
 20012  	for {
 20013  		addr := v_0
 20014  		mem := v_1
 20015  		v.reset(OpARM64PRFM)
 20016  		v.AuxInt = int64ToAuxInt(0)
 20017  		v.AddArg2(addr, mem)
 20018  		return true
 20019  	}
 20020  }
 20021  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 20022  	v_1 := v.Args[1]
 20023  	v_0 := v.Args[0]
 20024  	// match: (PrefetchCacheStreamed addr mem)
 20025  	// result: (PRFM [1] addr mem)
 20026  	for {
 20027  		addr := v_0
 20028  		mem := v_1
 20029  		v.reset(OpARM64PRFM)
 20030  		v.AuxInt = int64ToAuxInt(1)
 20031  		v.AddArg2(addr, mem)
 20032  		return true
 20033  	}
 20034  }
 20035  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 20036  	v_0 := v.Args[0]
 20037  	// match: (PubBarrier mem)
 20038  	// result: (DMB [0xe] mem)
 20039  	for {
 20040  		mem := v_0
 20041  		v.reset(OpARM64DMB)
 20042  		v.AuxInt = int64ToAuxInt(0xe)
 20043  		v.AddArg(mem)
 20044  		return true
 20045  	}
 20046  }
 20047  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 20048  	v_1 := v.Args[1]
 20049  	v_0 := v.Args[0]
 20050  	b := v.Block
 20051  	typ := &b.Func.Config.Types
 20052  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 20053  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 20054  	for {
 20055  		t := v.Type
 20056  		x := v_0
 20057  		if v_1.Op != OpARM64MOVDconst {
 20058  			break
 20059  		}
 20060  		c := auxIntToInt64(v_1.AuxInt)
 20061  		v.reset(OpOr16)
 20062  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 20063  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20064  		v1.AuxInt = int64ToAuxInt(c & 15)
 20065  		v0.AddArg2(x, v1)
 20066  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 20067  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20068  		v3.AuxInt = int64ToAuxInt(-c & 15)
 20069  		v2.AddArg2(x, v3)
 20070  		v.AddArg2(v0, v2)
 20071  		return true
 20072  	}
 20073  	// match: (RotateLeft16 <t> x y)
 20074  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 20075  	for {
 20076  		t := v.Type
 20077  		x := v_0
 20078  		y := v_1
 20079  		v.reset(OpARM64RORW)
 20080  		v.Type = t
 20081  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 20082  		v0.AuxInt = int64ToAuxInt(16)
 20083  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20084  		v1.AddArg(x)
 20085  		v0.AddArg2(v1, v1)
 20086  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 20087  		v2.AddArg(y)
 20088  		v.AddArg2(v0, v2)
 20089  		return true
 20090  	}
 20091  }
 20092  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 20093  	v_1 := v.Args[1]
 20094  	v_0 := v.Args[0]
 20095  	b := v.Block
 20096  	// match: (RotateLeft32 x y)
 20097  	// result: (RORW x (NEG <y.Type> y))
 20098  	for {
 20099  		x := v_0
 20100  		y := v_1
 20101  		v.reset(OpARM64RORW)
 20102  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 20103  		v0.AddArg(y)
 20104  		v.AddArg2(x, v0)
 20105  		return true
 20106  	}
 20107  }
 20108  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 20109  	v_1 := v.Args[1]
 20110  	v_0 := v.Args[0]
 20111  	b := v.Block
 20112  	// match: (RotateLeft64 x y)
 20113  	// result: (ROR x (NEG <y.Type> y))
 20114  	for {
 20115  		x := v_0
 20116  		y := v_1
 20117  		v.reset(OpARM64ROR)
 20118  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 20119  		v0.AddArg(y)
 20120  		v.AddArg2(x, v0)
 20121  		return true
 20122  	}
 20123  }
 20124  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 20125  	v_1 := v.Args[1]
 20126  	v_0 := v.Args[0]
 20127  	b := v.Block
 20128  	typ := &b.Func.Config.Types
 20129  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 20130  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 20131  	for {
 20132  		t := v.Type
 20133  		x := v_0
 20134  		if v_1.Op != OpARM64MOVDconst {
 20135  			break
 20136  		}
 20137  		c := auxIntToInt64(v_1.AuxInt)
 20138  		v.reset(OpOr8)
 20139  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 20140  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20141  		v1.AuxInt = int64ToAuxInt(c & 7)
 20142  		v0.AddArg2(x, v1)
 20143  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 20144  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20145  		v3.AuxInt = int64ToAuxInt(-c & 7)
 20146  		v2.AddArg2(x, v3)
 20147  		v.AddArg2(v0, v2)
 20148  		return true
 20149  	}
 20150  	// match: (RotateLeft8 <t> x y)
 20151  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 20152  	for {
 20153  		t := v.Type
 20154  		x := v_0
 20155  		y := v_1
 20156  		v.reset(OpARM64OR)
 20157  		v.Type = t
 20158  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20159  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 20160  		v1.AuxInt = int64ToAuxInt(7)
 20161  		v1.AddArg(y)
 20162  		v0.AddArg2(x, v1)
 20163  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20164  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20165  		v3.AddArg(x)
 20166  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 20167  		v4.AuxInt = int64ToAuxInt(7)
 20168  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 20169  		v5.AddArg(y)
 20170  		v4.AddArg(v5)
 20171  		v2.AddArg2(v3, v4)
 20172  		v.AddArg2(v0, v2)
 20173  		return true
 20174  	}
 20175  }
 20176  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 20177  	v_1 := v.Args[1]
 20178  	v_0 := v.Args[0]
 20179  	b := v.Block
 20180  	typ := &b.Func.Config.Types
 20181  	// match: (Rsh16Ux16 <t> x y)
 20182  	// cond: shiftIsBounded(v)
 20183  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20184  	for {
 20185  		t := v.Type
 20186  		x := v_0
 20187  		y := v_1
 20188  		if !(shiftIsBounded(v)) {
 20189  			break
 20190  		}
 20191  		v.reset(OpARM64SRL)
 20192  		v.Type = t
 20193  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20194  		v0.AddArg(x)
 20195  		v.AddArg2(v0, y)
 20196  		return true
 20197  	}
 20198  	// match: (Rsh16Ux16 <t> x y)
 20199  	// cond: !shiftIsBounded(v)
 20200  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20201  	for {
 20202  		t := v.Type
 20203  		x := v_0
 20204  		y := v_1
 20205  		if !(!shiftIsBounded(v)) {
 20206  			break
 20207  		}
 20208  		v.reset(OpARM64CSEL)
 20209  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20210  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20211  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20212  		v1.AddArg(x)
 20213  		v0.AddArg2(v1, y)
 20214  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20215  		v2.AuxInt = int64ToAuxInt(0)
 20216  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20217  		v3.AuxInt = int64ToAuxInt(64)
 20218  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20219  		v4.AddArg(y)
 20220  		v3.AddArg(v4)
 20221  		v.AddArg3(v0, v2, v3)
 20222  		return true
 20223  	}
 20224  	return false
 20225  }
 20226  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 20227  	v_1 := v.Args[1]
 20228  	v_0 := v.Args[0]
 20229  	b := v.Block
 20230  	typ := &b.Func.Config.Types
 20231  	// match: (Rsh16Ux32 <t> x y)
 20232  	// cond: shiftIsBounded(v)
 20233  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20234  	for {
 20235  		t := v.Type
 20236  		x := v_0
 20237  		y := v_1
 20238  		if !(shiftIsBounded(v)) {
 20239  			break
 20240  		}
 20241  		v.reset(OpARM64SRL)
 20242  		v.Type = t
 20243  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20244  		v0.AddArg(x)
 20245  		v.AddArg2(v0, y)
 20246  		return true
 20247  	}
 20248  	// match: (Rsh16Ux32 <t> x y)
 20249  	// cond: !shiftIsBounded(v)
 20250  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20251  	for {
 20252  		t := v.Type
 20253  		x := v_0
 20254  		y := v_1
 20255  		if !(!shiftIsBounded(v)) {
 20256  			break
 20257  		}
 20258  		v.reset(OpARM64CSEL)
 20259  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20260  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20261  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20262  		v1.AddArg(x)
 20263  		v0.AddArg2(v1, y)
 20264  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20265  		v2.AuxInt = int64ToAuxInt(0)
 20266  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20267  		v3.AuxInt = int64ToAuxInt(64)
 20268  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20269  		v4.AddArg(y)
 20270  		v3.AddArg(v4)
 20271  		v.AddArg3(v0, v2, v3)
 20272  		return true
 20273  	}
 20274  	return false
 20275  }
 20276  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 20277  	v_1 := v.Args[1]
 20278  	v_0 := v.Args[0]
 20279  	b := v.Block
 20280  	typ := &b.Func.Config.Types
 20281  	// match: (Rsh16Ux64 <t> x y)
 20282  	// cond: shiftIsBounded(v)
 20283  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20284  	for {
 20285  		t := v.Type
 20286  		x := v_0
 20287  		y := v_1
 20288  		if !(shiftIsBounded(v)) {
 20289  			break
 20290  		}
 20291  		v.reset(OpARM64SRL)
 20292  		v.Type = t
 20293  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20294  		v0.AddArg(x)
 20295  		v.AddArg2(v0, y)
 20296  		return true
 20297  	}
 20298  	// match: (Rsh16Ux64 <t> x y)
 20299  	// cond: !shiftIsBounded(v)
 20300  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 20301  	for {
 20302  		t := v.Type
 20303  		x := v_0
 20304  		y := v_1
 20305  		if !(!shiftIsBounded(v)) {
 20306  			break
 20307  		}
 20308  		v.reset(OpARM64CSEL)
 20309  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20310  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20311  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20312  		v1.AddArg(x)
 20313  		v0.AddArg2(v1, y)
 20314  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20315  		v2.AuxInt = int64ToAuxInt(0)
 20316  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20317  		v3.AuxInt = int64ToAuxInt(64)
 20318  		v3.AddArg(y)
 20319  		v.AddArg3(v0, v2, v3)
 20320  		return true
 20321  	}
 20322  	return false
 20323  }
 20324  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 20325  	v_1 := v.Args[1]
 20326  	v_0 := v.Args[0]
 20327  	b := v.Block
 20328  	typ := &b.Func.Config.Types
 20329  	// match: (Rsh16Ux8 <t> x y)
 20330  	// cond: shiftIsBounded(v)
 20331  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20332  	for {
 20333  		t := v.Type
 20334  		x := v_0
 20335  		y := v_1
 20336  		if !(shiftIsBounded(v)) {
 20337  			break
 20338  		}
 20339  		v.reset(OpARM64SRL)
 20340  		v.Type = t
 20341  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20342  		v0.AddArg(x)
 20343  		v.AddArg2(v0, y)
 20344  		return true
 20345  	}
 20346  	// match: (Rsh16Ux8 <t> x y)
 20347  	// cond: !shiftIsBounded(v)
 20348  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20349  	for {
 20350  		t := v.Type
 20351  		x := v_0
 20352  		y := v_1
 20353  		if !(!shiftIsBounded(v)) {
 20354  			break
 20355  		}
 20356  		v.reset(OpARM64CSEL)
 20357  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20358  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20359  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20360  		v1.AddArg(x)
 20361  		v0.AddArg2(v1, y)
 20362  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20363  		v2.AuxInt = int64ToAuxInt(0)
 20364  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20365  		v3.AuxInt = int64ToAuxInt(64)
 20366  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20367  		v4.AddArg(y)
 20368  		v3.AddArg(v4)
 20369  		v.AddArg3(v0, v2, v3)
 20370  		return true
 20371  	}
 20372  	return false
 20373  }
 20374  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 20375  	v_1 := v.Args[1]
 20376  	v_0 := v.Args[0]
 20377  	b := v.Block
 20378  	typ := &b.Func.Config.Types
 20379  	// match: (Rsh16x16 <t> x y)
 20380  	// cond: shiftIsBounded(v)
 20381  	// result: (SRA <t> (SignExt16to64 x) y)
 20382  	for {
 20383  		t := v.Type
 20384  		x := v_0
 20385  		y := v_1
 20386  		if !(shiftIsBounded(v)) {
 20387  			break
 20388  		}
 20389  		v.reset(OpARM64SRA)
 20390  		v.Type = t
 20391  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20392  		v0.AddArg(x)
 20393  		v.AddArg2(v0, y)
 20394  		return true
 20395  	}
 20396  	// match: (Rsh16x16 x y)
 20397  	// cond: !shiftIsBounded(v)
 20398  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20399  	for {
 20400  		x := v_0
 20401  		y := v_1
 20402  		if !(!shiftIsBounded(v)) {
 20403  			break
 20404  		}
 20405  		v.reset(OpARM64SRA)
 20406  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20407  		v0.AddArg(x)
 20408  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20409  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20410  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20411  		v2.AuxInt = int64ToAuxInt(63)
 20412  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20413  		v3.AuxInt = int64ToAuxInt(64)
 20414  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20415  		v4.AddArg(y)
 20416  		v3.AddArg(v4)
 20417  		v1.AddArg3(y, v2, v3)
 20418  		v.AddArg2(v0, v1)
 20419  		return true
 20420  	}
 20421  	return false
 20422  }
 20423  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 20424  	v_1 := v.Args[1]
 20425  	v_0 := v.Args[0]
 20426  	b := v.Block
 20427  	typ := &b.Func.Config.Types
 20428  	// match: (Rsh16x32 <t> x y)
 20429  	// cond: shiftIsBounded(v)
 20430  	// result: (SRA <t> (SignExt16to64 x) y)
 20431  	for {
 20432  		t := v.Type
 20433  		x := v_0
 20434  		y := v_1
 20435  		if !(shiftIsBounded(v)) {
 20436  			break
 20437  		}
 20438  		v.reset(OpARM64SRA)
 20439  		v.Type = t
 20440  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20441  		v0.AddArg(x)
 20442  		v.AddArg2(v0, y)
 20443  		return true
 20444  	}
 20445  	// match: (Rsh16x32 x y)
 20446  	// cond: !shiftIsBounded(v)
 20447  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20448  	for {
 20449  		x := v_0
 20450  		y := v_1
 20451  		if !(!shiftIsBounded(v)) {
 20452  			break
 20453  		}
 20454  		v.reset(OpARM64SRA)
 20455  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20456  		v0.AddArg(x)
 20457  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20458  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20459  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20460  		v2.AuxInt = int64ToAuxInt(63)
 20461  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20462  		v3.AuxInt = int64ToAuxInt(64)
 20463  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20464  		v4.AddArg(y)
 20465  		v3.AddArg(v4)
 20466  		v1.AddArg3(y, v2, v3)
 20467  		v.AddArg2(v0, v1)
 20468  		return true
 20469  	}
 20470  	return false
 20471  }
 20472  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 20473  	v_1 := v.Args[1]
 20474  	v_0 := v.Args[0]
 20475  	b := v.Block
 20476  	typ := &b.Func.Config.Types
 20477  	// match: (Rsh16x64 <t> x y)
 20478  	// cond: shiftIsBounded(v)
 20479  	// result: (SRA <t> (SignExt16to64 x) y)
 20480  	for {
 20481  		t := v.Type
 20482  		x := v_0
 20483  		y := v_1
 20484  		if !(shiftIsBounded(v)) {
 20485  			break
 20486  		}
 20487  		v.reset(OpARM64SRA)
 20488  		v.Type = t
 20489  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20490  		v0.AddArg(x)
 20491  		v.AddArg2(v0, y)
 20492  		return true
 20493  	}
 20494  	// match: (Rsh16x64 x y)
 20495  	// cond: !shiftIsBounded(v)
 20496  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 20497  	for {
 20498  		x := v_0
 20499  		y := v_1
 20500  		if !(!shiftIsBounded(v)) {
 20501  			break
 20502  		}
 20503  		v.reset(OpARM64SRA)
 20504  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20505  		v0.AddArg(x)
 20506  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20507  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20508  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20509  		v2.AuxInt = int64ToAuxInt(63)
 20510  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20511  		v3.AuxInt = int64ToAuxInt(64)
 20512  		v3.AddArg(y)
 20513  		v1.AddArg3(y, v2, v3)
 20514  		v.AddArg2(v0, v1)
 20515  		return true
 20516  	}
 20517  	return false
 20518  }
 20519  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 20520  	v_1 := v.Args[1]
 20521  	v_0 := v.Args[0]
 20522  	b := v.Block
 20523  	typ := &b.Func.Config.Types
 20524  	// match: (Rsh16x8 <t> x y)
 20525  	// cond: shiftIsBounded(v)
 20526  	// result: (SRA <t> (SignExt16to64 x) y)
 20527  	for {
 20528  		t := v.Type
 20529  		x := v_0
 20530  		y := v_1
 20531  		if !(shiftIsBounded(v)) {
 20532  			break
 20533  		}
 20534  		v.reset(OpARM64SRA)
 20535  		v.Type = t
 20536  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20537  		v0.AddArg(x)
 20538  		v.AddArg2(v0, y)
 20539  		return true
 20540  	}
 20541  	// match: (Rsh16x8 x y)
 20542  	// cond: !shiftIsBounded(v)
 20543  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 20544  	for {
 20545  		x := v_0
 20546  		y := v_1
 20547  		if !(!shiftIsBounded(v)) {
 20548  			break
 20549  		}
 20550  		v.reset(OpARM64SRA)
 20551  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20552  		v0.AddArg(x)
 20553  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20554  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20555  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20556  		v2.AuxInt = int64ToAuxInt(63)
 20557  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20558  		v3.AuxInt = int64ToAuxInt(64)
 20559  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20560  		v4.AddArg(y)
 20561  		v3.AddArg(v4)
 20562  		v1.AddArg3(y, v2, v3)
 20563  		v.AddArg2(v0, v1)
 20564  		return true
 20565  	}
 20566  	return false
 20567  }
 20568  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 20569  	v_1 := v.Args[1]
 20570  	v_0 := v.Args[0]
 20571  	b := v.Block
 20572  	typ := &b.Func.Config.Types
 20573  	// match: (Rsh32Ux16 <t> x y)
 20574  	// cond: shiftIsBounded(v)
 20575  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20576  	for {
 20577  		t := v.Type
 20578  		x := v_0
 20579  		y := v_1
 20580  		if !(shiftIsBounded(v)) {
 20581  			break
 20582  		}
 20583  		v.reset(OpARM64SRL)
 20584  		v.Type = t
 20585  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20586  		v0.AddArg(x)
 20587  		v.AddArg2(v0, y)
 20588  		return true
 20589  	}
 20590  	// match: (Rsh32Ux16 <t> x y)
 20591  	// cond: !shiftIsBounded(v)
 20592  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20593  	for {
 20594  		t := v.Type
 20595  		x := v_0
 20596  		y := v_1
 20597  		if !(!shiftIsBounded(v)) {
 20598  			break
 20599  		}
 20600  		v.reset(OpARM64CSEL)
 20601  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20602  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20603  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20604  		v1.AddArg(x)
 20605  		v0.AddArg2(v1, y)
 20606  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20607  		v2.AuxInt = int64ToAuxInt(0)
 20608  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20609  		v3.AuxInt = int64ToAuxInt(64)
 20610  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20611  		v4.AddArg(y)
 20612  		v3.AddArg(v4)
 20613  		v.AddArg3(v0, v2, v3)
 20614  		return true
 20615  	}
 20616  	return false
 20617  }
 20618  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 20619  	v_1 := v.Args[1]
 20620  	v_0 := v.Args[0]
 20621  	b := v.Block
 20622  	typ := &b.Func.Config.Types
 20623  	// match: (Rsh32Ux32 <t> x y)
 20624  	// cond: shiftIsBounded(v)
 20625  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20626  	for {
 20627  		t := v.Type
 20628  		x := v_0
 20629  		y := v_1
 20630  		if !(shiftIsBounded(v)) {
 20631  			break
 20632  		}
 20633  		v.reset(OpARM64SRL)
 20634  		v.Type = t
 20635  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20636  		v0.AddArg(x)
 20637  		v.AddArg2(v0, y)
 20638  		return true
 20639  	}
 20640  	// match: (Rsh32Ux32 <t> x y)
 20641  	// cond: !shiftIsBounded(v)
 20642  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20643  	for {
 20644  		t := v.Type
 20645  		x := v_0
 20646  		y := v_1
 20647  		if !(!shiftIsBounded(v)) {
 20648  			break
 20649  		}
 20650  		v.reset(OpARM64CSEL)
 20651  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20652  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20653  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20654  		v1.AddArg(x)
 20655  		v0.AddArg2(v1, y)
 20656  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20657  		v2.AuxInt = int64ToAuxInt(0)
 20658  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20659  		v3.AuxInt = int64ToAuxInt(64)
 20660  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20661  		v4.AddArg(y)
 20662  		v3.AddArg(v4)
 20663  		v.AddArg3(v0, v2, v3)
 20664  		return true
 20665  	}
 20666  	return false
 20667  }
 20668  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 20669  	v_1 := v.Args[1]
 20670  	v_0 := v.Args[0]
 20671  	b := v.Block
 20672  	typ := &b.Func.Config.Types
 20673  	// match: (Rsh32Ux64 <t> x y)
 20674  	// cond: shiftIsBounded(v)
 20675  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20676  	for {
 20677  		t := v.Type
 20678  		x := v_0
 20679  		y := v_1
 20680  		if !(shiftIsBounded(v)) {
 20681  			break
 20682  		}
 20683  		v.reset(OpARM64SRL)
 20684  		v.Type = t
 20685  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20686  		v0.AddArg(x)
 20687  		v.AddArg2(v0, y)
 20688  		return true
 20689  	}
 20690  	// match: (Rsh32Ux64 <t> x y)
 20691  	// cond: !shiftIsBounded(v)
 20692  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 20693  	for {
 20694  		t := v.Type
 20695  		x := v_0
 20696  		y := v_1
 20697  		if !(!shiftIsBounded(v)) {
 20698  			break
 20699  		}
 20700  		v.reset(OpARM64CSEL)
 20701  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20702  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20703  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20704  		v1.AddArg(x)
 20705  		v0.AddArg2(v1, y)
 20706  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20707  		v2.AuxInt = int64ToAuxInt(0)
 20708  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20709  		v3.AuxInt = int64ToAuxInt(64)
 20710  		v3.AddArg(y)
 20711  		v.AddArg3(v0, v2, v3)
 20712  		return true
 20713  	}
 20714  	return false
 20715  }
 20716  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 20717  	v_1 := v.Args[1]
 20718  	v_0 := v.Args[0]
 20719  	b := v.Block
 20720  	typ := &b.Func.Config.Types
 20721  	// match: (Rsh32Ux8 <t> x y)
 20722  	// cond: shiftIsBounded(v)
 20723  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20724  	for {
 20725  		t := v.Type
 20726  		x := v_0
 20727  		y := v_1
 20728  		if !(shiftIsBounded(v)) {
 20729  			break
 20730  		}
 20731  		v.reset(OpARM64SRL)
 20732  		v.Type = t
 20733  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20734  		v0.AddArg(x)
 20735  		v.AddArg2(v0, y)
 20736  		return true
 20737  	}
 20738  	// match: (Rsh32Ux8 <t> x y)
 20739  	// cond: !shiftIsBounded(v)
 20740  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20741  	for {
 20742  		t := v.Type
 20743  		x := v_0
 20744  		y := v_1
 20745  		if !(!shiftIsBounded(v)) {
 20746  			break
 20747  		}
 20748  		v.reset(OpARM64CSEL)
 20749  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20750  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20751  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20752  		v1.AddArg(x)
 20753  		v0.AddArg2(v1, y)
 20754  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20755  		v2.AuxInt = int64ToAuxInt(0)
 20756  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20757  		v3.AuxInt = int64ToAuxInt(64)
 20758  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20759  		v4.AddArg(y)
 20760  		v3.AddArg(v4)
 20761  		v.AddArg3(v0, v2, v3)
 20762  		return true
 20763  	}
 20764  	return false
 20765  }
 20766  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 20767  	v_1 := v.Args[1]
 20768  	v_0 := v.Args[0]
 20769  	b := v.Block
 20770  	typ := &b.Func.Config.Types
 20771  	// match: (Rsh32x16 <t> x y)
 20772  	// cond: shiftIsBounded(v)
 20773  	// result: (SRA <t> (SignExt32to64 x) y)
 20774  	for {
 20775  		t := v.Type
 20776  		x := v_0
 20777  		y := v_1
 20778  		if !(shiftIsBounded(v)) {
 20779  			break
 20780  		}
 20781  		v.reset(OpARM64SRA)
 20782  		v.Type = t
 20783  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20784  		v0.AddArg(x)
 20785  		v.AddArg2(v0, y)
 20786  		return true
 20787  	}
 20788  	// match: (Rsh32x16 x y)
 20789  	// cond: !shiftIsBounded(v)
 20790  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20791  	for {
 20792  		x := v_0
 20793  		y := v_1
 20794  		if !(!shiftIsBounded(v)) {
 20795  			break
 20796  		}
 20797  		v.reset(OpARM64SRA)
 20798  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20799  		v0.AddArg(x)
 20800  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20801  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20802  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20803  		v2.AuxInt = int64ToAuxInt(63)
 20804  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20805  		v3.AuxInt = int64ToAuxInt(64)
 20806  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20807  		v4.AddArg(y)
 20808  		v3.AddArg(v4)
 20809  		v1.AddArg3(y, v2, v3)
 20810  		v.AddArg2(v0, v1)
 20811  		return true
 20812  	}
 20813  	return false
 20814  }
 20815  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 20816  	v_1 := v.Args[1]
 20817  	v_0 := v.Args[0]
 20818  	b := v.Block
 20819  	typ := &b.Func.Config.Types
 20820  	// match: (Rsh32x32 <t> x y)
 20821  	// cond: shiftIsBounded(v)
 20822  	// result: (SRA <t> (SignExt32to64 x) y)
 20823  	for {
 20824  		t := v.Type
 20825  		x := v_0
 20826  		y := v_1
 20827  		if !(shiftIsBounded(v)) {
 20828  			break
 20829  		}
 20830  		v.reset(OpARM64SRA)
 20831  		v.Type = t
 20832  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20833  		v0.AddArg(x)
 20834  		v.AddArg2(v0, y)
 20835  		return true
 20836  	}
 20837  	// match: (Rsh32x32 x y)
 20838  	// cond: !shiftIsBounded(v)
 20839  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20840  	for {
 20841  		x := v_0
 20842  		y := v_1
 20843  		if !(!shiftIsBounded(v)) {
 20844  			break
 20845  		}
 20846  		v.reset(OpARM64SRA)
 20847  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20848  		v0.AddArg(x)
 20849  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20850  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20851  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20852  		v2.AuxInt = int64ToAuxInt(63)
 20853  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20854  		v3.AuxInt = int64ToAuxInt(64)
 20855  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20856  		v4.AddArg(y)
 20857  		v3.AddArg(v4)
 20858  		v1.AddArg3(y, v2, v3)
 20859  		v.AddArg2(v0, v1)
 20860  		return true
 20861  	}
 20862  	return false
 20863  }
 20864  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 20865  	v_1 := v.Args[1]
 20866  	v_0 := v.Args[0]
 20867  	b := v.Block
 20868  	typ := &b.Func.Config.Types
 20869  	// match: (Rsh32x64 <t> x y)
 20870  	// cond: shiftIsBounded(v)
 20871  	// result: (SRA <t> (SignExt32to64 x) y)
 20872  	for {
 20873  		t := v.Type
 20874  		x := v_0
 20875  		y := v_1
 20876  		if !(shiftIsBounded(v)) {
 20877  			break
 20878  		}
 20879  		v.reset(OpARM64SRA)
 20880  		v.Type = t
 20881  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20882  		v0.AddArg(x)
 20883  		v.AddArg2(v0, y)
 20884  		return true
 20885  	}
 20886  	// match: (Rsh32x64 x y)
 20887  	// cond: !shiftIsBounded(v)
 20888  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 20889  	for {
 20890  		x := v_0
 20891  		y := v_1
 20892  		if !(!shiftIsBounded(v)) {
 20893  			break
 20894  		}
 20895  		v.reset(OpARM64SRA)
 20896  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20897  		v0.AddArg(x)
 20898  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20899  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20900  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20901  		v2.AuxInt = int64ToAuxInt(63)
 20902  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20903  		v3.AuxInt = int64ToAuxInt(64)
 20904  		v3.AddArg(y)
 20905  		v1.AddArg3(y, v2, v3)
 20906  		v.AddArg2(v0, v1)
 20907  		return true
 20908  	}
 20909  	return false
 20910  }
 20911  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 20912  	v_1 := v.Args[1]
 20913  	v_0 := v.Args[0]
 20914  	b := v.Block
 20915  	typ := &b.Func.Config.Types
 20916  	// match: (Rsh32x8 <t> x y)
 20917  	// cond: shiftIsBounded(v)
 20918  	// result: (SRA <t> (SignExt32to64 x) y)
 20919  	for {
 20920  		t := v.Type
 20921  		x := v_0
 20922  		y := v_1
 20923  		if !(shiftIsBounded(v)) {
 20924  			break
 20925  		}
 20926  		v.reset(OpARM64SRA)
 20927  		v.Type = t
 20928  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20929  		v0.AddArg(x)
 20930  		v.AddArg2(v0, y)
 20931  		return true
 20932  	}
 20933  	// match: (Rsh32x8 x y)
 20934  	// cond: !shiftIsBounded(v)
 20935  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 20936  	for {
 20937  		x := v_0
 20938  		y := v_1
 20939  		if !(!shiftIsBounded(v)) {
 20940  			break
 20941  		}
 20942  		v.reset(OpARM64SRA)
 20943  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20944  		v0.AddArg(x)
 20945  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20946  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20947  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20948  		v2.AuxInt = int64ToAuxInt(63)
 20949  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20950  		v3.AuxInt = int64ToAuxInt(64)
 20951  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20952  		v4.AddArg(y)
 20953  		v3.AddArg(v4)
 20954  		v1.AddArg3(y, v2, v3)
 20955  		v.AddArg2(v0, v1)
 20956  		return true
 20957  	}
 20958  	return false
 20959  }
 20960  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 20961  	v_1 := v.Args[1]
 20962  	v_0 := v.Args[0]
 20963  	b := v.Block
 20964  	typ := &b.Func.Config.Types
 20965  	// match: (Rsh64Ux16 <t> x y)
 20966  	// cond: shiftIsBounded(v)
 20967  	// result: (SRL <t> x y)
 20968  	for {
 20969  		t := v.Type
 20970  		x := v_0
 20971  		y := v_1
 20972  		if !(shiftIsBounded(v)) {
 20973  			break
 20974  		}
 20975  		v.reset(OpARM64SRL)
 20976  		v.Type = t
 20977  		v.AddArg2(x, y)
 20978  		return true
 20979  	}
 20980  	// match: (Rsh64Ux16 <t> x y)
 20981  	// cond: !shiftIsBounded(v)
 20982  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20983  	for {
 20984  		t := v.Type
 20985  		x := v_0
 20986  		y := v_1
 20987  		if !(!shiftIsBounded(v)) {
 20988  			break
 20989  		}
 20990  		v.reset(OpARM64CSEL)
 20991  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20992  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20993  		v0.AddArg2(x, y)
 20994  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20995  		v1.AuxInt = int64ToAuxInt(0)
 20996  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20997  		v2.AuxInt = int64ToAuxInt(64)
 20998  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20999  		v3.AddArg(y)
 21000  		v2.AddArg(v3)
 21001  		v.AddArg3(v0, v1, v2)
 21002  		return true
 21003  	}
 21004  	return false
 21005  }
 21006  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 21007  	v_1 := v.Args[1]
 21008  	v_0 := v.Args[0]
 21009  	b := v.Block
 21010  	typ := &b.Func.Config.Types
 21011  	// match: (Rsh64Ux32 <t> x y)
 21012  	// cond: shiftIsBounded(v)
 21013  	// result: (SRL <t> x y)
 21014  	for {
 21015  		t := v.Type
 21016  		x := v_0
 21017  		y := v_1
 21018  		if !(shiftIsBounded(v)) {
 21019  			break
 21020  		}
 21021  		v.reset(OpARM64SRL)
 21022  		v.Type = t
 21023  		v.AddArg2(x, y)
 21024  		return true
 21025  	}
 21026  	// match: (Rsh64Ux32 <t> x y)
 21027  	// cond: !shiftIsBounded(v)
 21028  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21029  	for {
 21030  		t := v.Type
 21031  		x := v_0
 21032  		y := v_1
 21033  		if !(!shiftIsBounded(v)) {
 21034  			break
 21035  		}
 21036  		v.reset(OpARM64CSEL)
 21037  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21038  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21039  		v0.AddArg2(x, y)
 21040  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21041  		v1.AuxInt = int64ToAuxInt(0)
 21042  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21043  		v2.AuxInt = int64ToAuxInt(64)
 21044  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21045  		v3.AddArg(y)
 21046  		v2.AddArg(v3)
 21047  		v.AddArg3(v0, v1, v2)
 21048  		return true
 21049  	}
 21050  	return false
 21051  }
 21052  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 21053  	v_1 := v.Args[1]
 21054  	v_0 := v.Args[0]
 21055  	b := v.Block
 21056  	// match: (Rsh64Ux64 <t> x y)
 21057  	// cond: shiftIsBounded(v)
 21058  	// result: (SRL <t> x y)
 21059  	for {
 21060  		t := v.Type
 21061  		x := v_0
 21062  		y := v_1
 21063  		if !(shiftIsBounded(v)) {
 21064  			break
 21065  		}
 21066  		v.reset(OpARM64SRL)
 21067  		v.Type = t
 21068  		v.AddArg2(x, y)
 21069  		return true
 21070  	}
 21071  	// match: (Rsh64Ux64 <t> x y)
 21072  	// cond: !shiftIsBounded(v)
 21073  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 21074  	for {
 21075  		t := v.Type
 21076  		x := v_0
 21077  		y := v_1
 21078  		if !(!shiftIsBounded(v)) {
 21079  			break
 21080  		}
 21081  		v.reset(OpARM64CSEL)
 21082  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21083  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21084  		v0.AddArg2(x, y)
 21085  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21086  		v1.AuxInt = int64ToAuxInt(0)
 21087  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21088  		v2.AuxInt = int64ToAuxInt(64)
 21089  		v2.AddArg(y)
 21090  		v.AddArg3(v0, v1, v2)
 21091  		return true
 21092  	}
 21093  	return false
 21094  }
 21095  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 21096  	v_1 := v.Args[1]
 21097  	v_0 := v.Args[0]
 21098  	b := v.Block
 21099  	typ := &b.Func.Config.Types
 21100  	// match: (Rsh64Ux8 <t> x y)
 21101  	// cond: shiftIsBounded(v)
 21102  	// result: (SRL <t> x y)
 21103  	for {
 21104  		t := v.Type
 21105  		x := v_0
 21106  		y := v_1
 21107  		if !(shiftIsBounded(v)) {
 21108  			break
 21109  		}
 21110  		v.reset(OpARM64SRL)
 21111  		v.Type = t
 21112  		v.AddArg2(x, y)
 21113  		return true
 21114  	}
 21115  	// match: (Rsh64Ux8 <t> x y)
 21116  	// cond: !shiftIsBounded(v)
 21117  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21118  	for {
 21119  		t := v.Type
 21120  		x := v_0
 21121  		y := v_1
 21122  		if !(!shiftIsBounded(v)) {
 21123  			break
 21124  		}
 21125  		v.reset(OpARM64CSEL)
 21126  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21127  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21128  		v0.AddArg2(x, y)
 21129  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21130  		v1.AuxInt = int64ToAuxInt(0)
 21131  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21132  		v2.AuxInt = int64ToAuxInt(64)
 21133  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21134  		v3.AddArg(y)
 21135  		v2.AddArg(v3)
 21136  		v.AddArg3(v0, v1, v2)
 21137  		return true
 21138  	}
 21139  	return false
 21140  }
 21141  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 21142  	v_1 := v.Args[1]
 21143  	v_0 := v.Args[0]
 21144  	b := v.Block
 21145  	typ := &b.Func.Config.Types
 21146  	// match: (Rsh64x16 <t> x y)
 21147  	// cond: shiftIsBounded(v)
 21148  	// result: (SRA <t> x y)
 21149  	for {
 21150  		t := v.Type
 21151  		x := v_0
 21152  		y := v_1
 21153  		if !(shiftIsBounded(v)) {
 21154  			break
 21155  		}
 21156  		v.reset(OpARM64SRA)
 21157  		v.Type = t
 21158  		v.AddArg2(x, y)
 21159  		return true
 21160  	}
 21161  	// match: (Rsh64x16 x y)
 21162  	// cond: !shiftIsBounded(v)
 21163  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21164  	for {
 21165  		x := v_0
 21166  		y := v_1
 21167  		if !(!shiftIsBounded(v)) {
 21168  			break
 21169  		}
 21170  		v.reset(OpARM64SRA)
 21171  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21172  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21173  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21174  		v1.AuxInt = int64ToAuxInt(63)
 21175  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21176  		v2.AuxInt = int64ToAuxInt(64)
 21177  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21178  		v3.AddArg(y)
 21179  		v2.AddArg(v3)
 21180  		v0.AddArg3(y, v1, v2)
 21181  		v.AddArg2(x, v0)
 21182  		return true
 21183  	}
 21184  	return false
 21185  }
 21186  func rewriteValueARM64_OpRsh64x32(v *Value) bool {
 21187  	v_1 := v.Args[1]
 21188  	v_0 := v.Args[0]
 21189  	b := v.Block
 21190  	typ := &b.Func.Config.Types
 21191  	// match: (Rsh64x32 <t> x y)
 21192  	// cond: shiftIsBounded(v)
 21193  	// result: (SRA <t> x y)
 21194  	for {
 21195  		t := v.Type
 21196  		x := v_0
 21197  		y := v_1
 21198  		if !(shiftIsBounded(v)) {
 21199  			break
 21200  		}
 21201  		v.reset(OpARM64SRA)
 21202  		v.Type = t
 21203  		v.AddArg2(x, y)
 21204  		return true
 21205  	}
 21206  	// match: (Rsh64x32 x y)
 21207  	// cond: !shiftIsBounded(v)
 21208  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21209  	for {
 21210  		x := v_0
 21211  		y := v_1
 21212  		if !(!shiftIsBounded(v)) {
 21213  			break
 21214  		}
 21215  		v.reset(OpARM64SRA)
 21216  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21217  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21218  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21219  		v1.AuxInt = int64ToAuxInt(63)
 21220  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21221  		v2.AuxInt = int64ToAuxInt(64)
 21222  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21223  		v3.AddArg(y)
 21224  		v2.AddArg(v3)
 21225  		v0.AddArg3(y, v1, v2)
 21226  		v.AddArg2(x, v0)
 21227  		return true
 21228  	}
 21229  	return false
 21230  }
 21231  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 21232  	v_1 := v.Args[1]
 21233  	v_0 := v.Args[0]
 21234  	b := v.Block
 21235  	// match: (Rsh64x64 <t> x y)
 21236  	// cond: shiftIsBounded(v)
 21237  	// result: (SRA <t> x y)
 21238  	for {
 21239  		t := v.Type
 21240  		x := v_0
 21241  		y := v_1
 21242  		if !(shiftIsBounded(v)) {
 21243  			break
 21244  		}
 21245  		v.reset(OpARM64SRA)
 21246  		v.Type = t
 21247  		v.AddArg2(x, y)
 21248  		return true
 21249  	}
 21250  	// match: (Rsh64x64 x y)
 21251  	// cond: !shiftIsBounded(v)
 21252  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21253  	for {
 21254  		x := v_0
 21255  		y := v_1
 21256  		if !(!shiftIsBounded(v)) {
 21257  			break
 21258  		}
 21259  		v.reset(OpARM64SRA)
 21260  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21261  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21262  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21263  		v1.AuxInt = int64ToAuxInt(63)
 21264  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21265  		v2.AuxInt = int64ToAuxInt(64)
 21266  		v2.AddArg(y)
 21267  		v0.AddArg3(y, v1, v2)
 21268  		v.AddArg2(x, v0)
 21269  		return true
 21270  	}
 21271  	return false
 21272  }
 21273  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 21274  	v_1 := v.Args[1]
 21275  	v_0 := v.Args[0]
 21276  	b := v.Block
 21277  	typ := &b.Func.Config.Types
 21278  	// match: (Rsh64x8 <t> x y)
 21279  	// cond: shiftIsBounded(v)
 21280  	// result: (SRA <t> x y)
 21281  	for {
 21282  		t := v.Type
 21283  		x := v_0
 21284  		y := v_1
 21285  		if !(shiftIsBounded(v)) {
 21286  			break
 21287  		}
 21288  		v.reset(OpARM64SRA)
 21289  		v.Type = t
 21290  		v.AddArg2(x, y)
 21291  		return true
 21292  	}
 21293  	// match: (Rsh64x8 x y)
 21294  	// cond: !shiftIsBounded(v)
 21295  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21296  	for {
 21297  		x := v_0
 21298  		y := v_1
 21299  		if !(!shiftIsBounded(v)) {
 21300  			break
 21301  		}
 21302  		v.reset(OpARM64SRA)
 21303  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21304  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21305  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21306  		v1.AuxInt = int64ToAuxInt(63)
 21307  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21308  		v2.AuxInt = int64ToAuxInt(64)
 21309  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21310  		v3.AddArg(y)
 21311  		v2.AddArg(v3)
 21312  		v0.AddArg3(y, v1, v2)
 21313  		v.AddArg2(x, v0)
 21314  		return true
 21315  	}
 21316  	return false
 21317  }
 21318  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 21319  	v_1 := v.Args[1]
 21320  	v_0 := v.Args[0]
 21321  	b := v.Block
 21322  	typ := &b.Func.Config.Types
 21323  	// match: (Rsh8Ux16 <t> x y)
 21324  	// cond: shiftIsBounded(v)
 21325  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21326  	for {
 21327  		t := v.Type
 21328  		x := v_0
 21329  		y := v_1
 21330  		if !(shiftIsBounded(v)) {
 21331  			break
 21332  		}
 21333  		v.reset(OpARM64SRL)
 21334  		v.Type = t
 21335  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21336  		v0.AddArg(x)
 21337  		v.AddArg2(v0, y)
 21338  		return true
 21339  	}
 21340  	// match: (Rsh8Ux16 <t> x y)
 21341  	// cond: !shiftIsBounded(v)
 21342  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21343  	for {
 21344  		t := v.Type
 21345  		x := v_0
 21346  		y := v_1
 21347  		if !(!shiftIsBounded(v)) {
 21348  			break
 21349  		}
 21350  		v.reset(OpARM64CSEL)
 21351  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21352  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21353  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21354  		v1.AddArg(x)
 21355  		v0.AddArg2(v1, y)
 21356  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21357  		v2.AuxInt = int64ToAuxInt(0)
 21358  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21359  		v3.AuxInt = int64ToAuxInt(64)
 21360  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21361  		v4.AddArg(y)
 21362  		v3.AddArg(v4)
 21363  		v.AddArg3(v0, v2, v3)
 21364  		return true
 21365  	}
 21366  	return false
 21367  }
 21368  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 21369  	v_1 := v.Args[1]
 21370  	v_0 := v.Args[0]
 21371  	b := v.Block
 21372  	typ := &b.Func.Config.Types
 21373  	// match: (Rsh8Ux32 <t> x y)
 21374  	// cond: shiftIsBounded(v)
 21375  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21376  	for {
 21377  		t := v.Type
 21378  		x := v_0
 21379  		y := v_1
 21380  		if !(shiftIsBounded(v)) {
 21381  			break
 21382  		}
 21383  		v.reset(OpARM64SRL)
 21384  		v.Type = t
 21385  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21386  		v0.AddArg(x)
 21387  		v.AddArg2(v0, y)
 21388  		return true
 21389  	}
 21390  	// match: (Rsh8Ux32 <t> x y)
 21391  	// cond: !shiftIsBounded(v)
 21392  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21393  	for {
 21394  		t := v.Type
 21395  		x := v_0
 21396  		y := v_1
 21397  		if !(!shiftIsBounded(v)) {
 21398  			break
 21399  		}
 21400  		v.reset(OpARM64CSEL)
 21401  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21402  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21403  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21404  		v1.AddArg(x)
 21405  		v0.AddArg2(v1, y)
 21406  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21407  		v2.AuxInt = int64ToAuxInt(0)
 21408  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21409  		v3.AuxInt = int64ToAuxInt(64)
 21410  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21411  		v4.AddArg(y)
 21412  		v3.AddArg(v4)
 21413  		v.AddArg3(v0, v2, v3)
 21414  		return true
 21415  	}
 21416  	return false
 21417  }
 21418  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 21419  	v_1 := v.Args[1]
 21420  	v_0 := v.Args[0]
 21421  	b := v.Block
 21422  	typ := &b.Func.Config.Types
 21423  	// match: (Rsh8Ux64 <t> x y)
 21424  	// cond: shiftIsBounded(v)
 21425  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21426  	for {
 21427  		t := v.Type
 21428  		x := v_0
 21429  		y := v_1
 21430  		if !(shiftIsBounded(v)) {
 21431  			break
 21432  		}
 21433  		v.reset(OpARM64SRL)
 21434  		v.Type = t
 21435  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21436  		v0.AddArg(x)
 21437  		v.AddArg2(v0, y)
 21438  		return true
 21439  	}
 21440  	// match: (Rsh8Ux64 <t> x y)
 21441  	// cond: !shiftIsBounded(v)
 21442  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 21443  	for {
 21444  		t := v.Type
 21445  		x := v_0
 21446  		y := v_1
 21447  		if !(!shiftIsBounded(v)) {
 21448  			break
 21449  		}
 21450  		v.reset(OpARM64CSEL)
 21451  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21452  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21453  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21454  		v1.AddArg(x)
 21455  		v0.AddArg2(v1, y)
 21456  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21457  		v2.AuxInt = int64ToAuxInt(0)
 21458  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21459  		v3.AuxInt = int64ToAuxInt(64)
 21460  		v3.AddArg(y)
 21461  		v.AddArg3(v0, v2, v3)
 21462  		return true
 21463  	}
 21464  	return false
 21465  }
 21466  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 21467  	v_1 := v.Args[1]
 21468  	v_0 := v.Args[0]
 21469  	b := v.Block
 21470  	typ := &b.Func.Config.Types
 21471  	// match: (Rsh8Ux8 <t> x y)
 21472  	// cond: shiftIsBounded(v)
 21473  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21474  	for {
 21475  		t := v.Type
 21476  		x := v_0
 21477  		y := v_1
 21478  		if !(shiftIsBounded(v)) {
 21479  			break
 21480  		}
 21481  		v.reset(OpARM64SRL)
 21482  		v.Type = t
 21483  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21484  		v0.AddArg(x)
 21485  		v.AddArg2(v0, y)
 21486  		return true
 21487  	}
 21488  	// match: (Rsh8Ux8 <t> x y)
 21489  	// cond: !shiftIsBounded(v)
 21490  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21491  	for {
 21492  		t := v.Type
 21493  		x := v_0
 21494  		y := v_1
 21495  		if !(!shiftIsBounded(v)) {
 21496  			break
 21497  		}
 21498  		v.reset(OpARM64CSEL)
 21499  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21500  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21501  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21502  		v1.AddArg(x)
 21503  		v0.AddArg2(v1, y)
 21504  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21505  		v2.AuxInt = int64ToAuxInt(0)
 21506  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21507  		v3.AuxInt = int64ToAuxInt(64)
 21508  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21509  		v4.AddArg(y)
 21510  		v3.AddArg(v4)
 21511  		v.AddArg3(v0, v2, v3)
 21512  		return true
 21513  	}
 21514  	return false
 21515  }
 21516  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 21517  	v_1 := v.Args[1]
 21518  	v_0 := v.Args[0]
 21519  	b := v.Block
 21520  	typ := &b.Func.Config.Types
 21521  	// match: (Rsh8x16 <t> x y)
 21522  	// cond: shiftIsBounded(v)
 21523  	// result: (SRA <t> (SignExt8to64 x) y)
 21524  	for {
 21525  		t := v.Type
 21526  		x := v_0
 21527  		y := v_1
 21528  		if !(shiftIsBounded(v)) {
 21529  			break
 21530  		}
 21531  		v.reset(OpARM64SRA)
 21532  		v.Type = t
 21533  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21534  		v0.AddArg(x)
 21535  		v.AddArg2(v0, y)
 21536  		return true
 21537  	}
 21538  	// match: (Rsh8x16 x y)
 21539  	// cond: !shiftIsBounded(v)
 21540  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21541  	for {
 21542  		x := v_0
 21543  		y := v_1
 21544  		if !(!shiftIsBounded(v)) {
 21545  			break
 21546  		}
 21547  		v.reset(OpARM64SRA)
 21548  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21549  		v0.AddArg(x)
 21550  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21551  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21552  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21553  		v2.AuxInt = int64ToAuxInt(63)
 21554  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21555  		v3.AuxInt = int64ToAuxInt(64)
 21556  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21557  		v4.AddArg(y)
 21558  		v3.AddArg(v4)
 21559  		v1.AddArg3(y, v2, v3)
 21560  		v.AddArg2(v0, v1)
 21561  		return true
 21562  	}
 21563  	return false
 21564  }
 21565  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 21566  	v_1 := v.Args[1]
 21567  	v_0 := v.Args[0]
 21568  	b := v.Block
 21569  	typ := &b.Func.Config.Types
 21570  	// match: (Rsh8x32 <t> x y)
 21571  	// cond: shiftIsBounded(v)
 21572  	// result: (SRA <t> (SignExt8to64 x) y)
 21573  	for {
 21574  		t := v.Type
 21575  		x := v_0
 21576  		y := v_1
 21577  		if !(shiftIsBounded(v)) {
 21578  			break
 21579  		}
 21580  		v.reset(OpARM64SRA)
 21581  		v.Type = t
 21582  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21583  		v0.AddArg(x)
 21584  		v.AddArg2(v0, y)
 21585  		return true
 21586  	}
 21587  	// match: (Rsh8x32 x y)
 21588  	// cond: !shiftIsBounded(v)
 21589  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21590  	for {
 21591  		x := v_0
 21592  		y := v_1
 21593  		if !(!shiftIsBounded(v)) {
 21594  			break
 21595  		}
 21596  		v.reset(OpARM64SRA)
 21597  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21598  		v0.AddArg(x)
 21599  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21600  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21601  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21602  		v2.AuxInt = int64ToAuxInt(63)
 21603  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21604  		v3.AuxInt = int64ToAuxInt(64)
 21605  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21606  		v4.AddArg(y)
 21607  		v3.AddArg(v4)
 21608  		v1.AddArg3(y, v2, v3)
 21609  		v.AddArg2(v0, v1)
 21610  		return true
 21611  	}
 21612  	return false
 21613  }
 21614  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 21615  	v_1 := v.Args[1]
 21616  	v_0 := v.Args[0]
 21617  	b := v.Block
 21618  	typ := &b.Func.Config.Types
 21619  	// match: (Rsh8x64 <t> x y)
 21620  	// cond: shiftIsBounded(v)
 21621  	// result: (SRA <t> (SignExt8to64 x) y)
 21622  	for {
 21623  		t := v.Type
 21624  		x := v_0
 21625  		y := v_1
 21626  		if !(shiftIsBounded(v)) {
 21627  			break
 21628  		}
 21629  		v.reset(OpARM64SRA)
 21630  		v.Type = t
 21631  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21632  		v0.AddArg(x)
 21633  		v.AddArg2(v0, y)
 21634  		return true
 21635  	}
 21636  	// match: (Rsh8x64 x y)
 21637  	// cond: !shiftIsBounded(v)
 21638  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21639  	for {
 21640  		x := v_0
 21641  		y := v_1
 21642  		if !(!shiftIsBounded(v)) {
 21643  			break
 21644  		}
 21645  		v.reset(OpARM64SRA)
 21646  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21647  		v0.AddArg(x)
 21648  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21649  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21650  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21651  		v2.AuxInt = int64ToAuxInt(63)
 21652  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21653  		v3.AuxInt = int64ToAuxInt(64)
 21654  		v3.AddArg(y)
 21655  		v1.AddArg3(y, v2, v3)
 21656  		v.AddArg2(v0, v1)
 21657  		return true
 21658  	}
 21659  	return false
 21660  }
 21661  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 21662  	v_1 := v.Args[1]
 21663  	v_0 := v.Args[0]
 21664  	b := v.Block
 21665  	typ := &b.Func.Config.Types
 21666  	// match: (Rsh8x8 <t> x y)
 21667  	// cond: shiftIsBounded(v)
 21668  	// result: (SRA <t> (SignExt8to64 x) y)
 21669  	for {
 21670  		t := v.Type
 21671  		x := v_0
 21672  		y := v_1
 21673  		if !(shiftIsBounded(v)) {
 21674  			break
 21675  		}
 21676  		v.reset(OpARM64SRA)
 21677  		v.Type = t
 21678  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21679  		v0.AddArg(x)
 21680  		v.AddArg2(v0, y)
 21681  		return true
 21682  	}
 21683  	// match: (Rsh8x8 x y)
 21684  	// cond: !shiftIsBounded(v)
 21685  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21686  	for {
 21687  		x := v_0
 21688  		y := v_1
 21689  		if !(!shiftIsBounded(v)) {
 21690  			break
 21691  		}
 21692  		v.reset(OpARM64SRA)
 21693  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21694  		v0.AddArg(x)
 21695  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21696  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21697  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21698  		v2.AuxInt = int64ToAuxInt(63)
 21699  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21700  		v3.AuxInt = int64ToAuxInt(64)
 21701  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21702  		v4.AddArg(y)
 21703  		v3.AddArg(v4)
 21704  		v1.AddArg3(y, v2, v3)
 21705  		v.AddArg2(v0, v1)
 21706  		return true
 21707  	}
 21708  	return false
 21709  }
 21710  func rewriteValueARM64_OpSelect0(v *Value) bool {
 21711  	v_0 := v.Args[0]
 21712  	b := v.Block
 21713  	typ := &b.Func.Config.Types
 21714  	// match: (Select0 (Mul64uhilo x y))
 21715  	// result: (UMULH x y)
 21716  	for {
 21717  		if v_0.Op != OpMul64uhilo {
 21718  			break
 21719  		}
 21720  		y := v_0.Args[1]
 21721  		x := v_0.Args[0]
 21722  		v.reset(OpARM64UMULH)
 21723  		v.AddArg2(x, y)
 21724  		return true
 21725  	}
 21726  	// match: (Select0 (Add64carry x y c))
 21727  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 21728  	for {
 21729  		if v_0.Op != OpAdd64carry {
 21730  			break
 21731  		}
 21732  		c := v_0.Args[2]
 21733  		x := v_0.Args[0]
 21734  		y := v_0.Args[1]
 21735  		v.reset(OpSelect0)
 21736  		v.Type = typ.UInt64
 21737  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21738  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21739  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21740  		v2.AuxInt = int64ToAuxInt(-1)
 21741  		v2.AddArg(c)
 21742  		v1.AddArg(v2)
 21743  		v0.AddArg3(x, y, v1)
 21744  		v.AddArg(v0)
 21745  		return true
 21746  	}
 21747  	// match: (Select0 (Sub64borrow x y bo))
 21748  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 21749  	for {
 21750  		if v_0.Op != OpSub64borrow {
 21751  			break
 21752  		}
 21753  		bo := v_0.Args[2]
 21754  		x := v_0.Args[0]
 21755  		y := v_0.Args[1]
 21756  		v.reset(OpSelect0)
 21757  		v.Type = typ.UInt64
 21758  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21759  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21760  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21761  		v2.AddArg(bo)
 21762  		v1.AddArg(v2)
 21763  		v0.AddArg3(x, y, v1)
 21764  		v.AddArg(v0)
 21765  		return true
 21766  	}
 21767  	// match: (Select0 (Mul64uover x y))
 21768  	// result: (MUL x y)
 21769  	for {
 21770  		if v_0.Op != OpMul64uover {
 21771  			break
 21772  		}
 21773  		y := v_0.Args[1]
 21774  		x := v_0.Args[0]
 21775  		v.reset(OpARM64MUL)
 21776  		v.AddArg2(x, y)
 21777  		return true
 21778  	}
 21779  	return false
 21780  }
 21781  func rewriteValueARM64_OpSelect1(v *Value) bool {
 21782  	v_0 := v.Args[0]
 21783  	b := v.Block
 21784  	typ := &b.Func.Config.Types
 21785  	// match: (Select1 (Mul64uhilo x y))
 21786  	// result: (MUL x y)
 21787  	for {
 21788  		if v_0.Op != OpMul64uhilo {
 21789  			break
 21790  		}
 21791  		y := v_0.Args[1]
 21792  		x := v_0.Args[0]
 21793  		v.reset(OpARM64MUL)
 21794  		v.AddArg2(x, y)
 21795  		return true
 21796  	}
 21797  	// match: (Select1 (Add64carry x y c))
 21798  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 21799  	for {
 21800  		if v_0.Op != OpAdd64carry {
 21801  			break
 21802  		}
 21803  		c := v_0.Args[2]
 21804  		x := v_0.Args[0]
 21805  		y := v_0.Args[1]
 21806  		v.reset(OpARM64ADCzerocarry)
 21807  		v.Type = typ.UInt64
 21808  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21809  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21810  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21811  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21812  		v3.AuxInt = int64ToAuxInt(-1)
 21813  		v3.AddArg(c)
 21814  		v2.AddArg(v3)
 21815  		v1.AddArg3(x, y, v2)
 21816  		v0.AddArg(v1)
 21817  		v.AddArg(v0)
 21818  		return true
 21819  	}
 21820  	// match: (Select1 (Sub64borrow x y bo))
 21821  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 21822  	for {
 21823  		if v_0.Op != OpSub64borrow {
 21824  			break
 21825  		}
 21826  		bo := v_0.Args[2]
 21827  		x := v_0.Args[0]
 21828  		y := v_0.Args[1]
 21829  		v.reset(OpARM64NEG)
 21830  		v.Type = typ.UInt64
 21831  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 21832  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21833  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21834  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21835  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21836  		v4.AddArg(bo)
 21837  		v3.AddArg(v4)
 21838  		v2.AddArg3(x, y, v3)
 21839  		v1.AddArg(v2)
 21840  		v0.AddArg(v1)
 21841  		v.AddArg(v0)
 21842  		return true
 21843  	}
 21844  	// match: (Select1 (Mul64uover x y))
 21845  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 21846  	for {
 21847  		if v_0.Op != OpMul64uover {
 21848  			break
 21849  		}
 21850  		y := v_0.Args[1]
 21851  		x := v_0.Args[0]
 21852  		v.reset(OpARM64NotEqual)
 21853  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21854  		v0.AuxInt = int64ToAuxInt(0)
 21855  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 21856  		v1.AddArg2(x, y)
 21857  		v0.AddArg(v1)
 21858  		v.AddArg(v0)
 21859  		return true
 21860  	}
 21861  	return false
 21862  }
 21863  func rewriteValueARM64_OpSelectN(v *Value) bool {
 21864  	v_0 := v.Args[0]
 21865  	b := v.Block
 21866  	config := b.Func.Config
 21867  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 21868  	// 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)
 21869  	// result: (Move [sz] dst src mem)
 21870  	for {
 21871  		if auxIntToInt64(v.AuxInt) != 0 {
 21872  			break
 21873  		}
 21874  		call := v_0
 21875  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 21876  			break
 21877  		}
 21878  		sym := auxToCall(call.Aux)
 21879  		s1 := call.Args[0]
 21880  		if s1.Op != OpARM64MOVDstore {
 21881  			break
 21882  		}
 21883  		_ = s1.Args[2]
 21884  		s1_1 := s1.Args[1]
 21885  		if s1_1.Op != OpARM64MOVDconst {
 21886  			break
 21887  		}
 21888  		sz := auxIntToInt64(s1_1.AuxInt)
 21889  		s2 := s1.Args[2]
 21890  		if s2.Op != OpARM64MOVDstore {
 21891  			break
 21892  		}
 21893  		_ = s2.Args[2]
 21894  		src := s2.Args[1]
 21895  		s3 := s2.Args[2]
 21896  		if s3.Op != OpARM64MOVDstore {
 21897  			break
 21898  		}
 21899  		mem := s3.Args[2]
 21900  		dst := s3.Args[1]
 21901  		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)) {
 21902  			break
 21903  		}
 21904  		v.reset(OpMove)
 21905  		v.AuxInt = int64ToAuxInt(sz)
 21906  		v.AddArg3(dst, src, mem)
 21907  		return true
 21908  	}
 21909  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 21910  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 21911  	// result: (Move [sz] dst src mem)
 21912  	for {
 21913  		if auxIntToInt64(v.AuxInt) != 0 {
 21914  			break
 21915  		}
 21916  		call := v_0
 21917  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 21918  			break
 21919  		}
 21920  		sym := auxToCall(call.Aux)
 21921  		mem := call.Args[3]
 21922  		dst := call.Args[0]
 21923  		src := call.Args[1]
 21924  		call_2 := call.Args[2]
 21925  		if call_2.Op != OpARM64MOVDconst {
 21926  			break
 21927  		}
 21928  		sz := auxIntToInt64(call_2.AuxInt)
 21929  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 21930  			break
 21931  		}
 21932  		v.reset(OpMove)
 21933  		v.AuxInt = int64ToAuxInt(sz)
 21934  		v.AddArg3(dst, src, mem)
 21935  		return true
 21936  	}
 21937  	return false
 21938  }
 21939  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 21940  	v_0 := v.Args[0]
 21941  	b := v.Block
 21942  	// match: (Slicemask <t> x)
 21943  	// result: (SRAconst (NEG <t> x) [63])
 21944  	for {
 21945  		t := v.Type
 21946  		x := v_0
 21947  		v.reset(OpARM64SRAconst)
 21948  		v.AuxInt = int64ToAuxInt(63)
 21949  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 21950  		v0.AddArg(x)
 21951  		v.AddArg(v0)
 21952  		return true
 21953  	}
 21954  }
 21955  func rewriteValueARM64_OpStore(v *Value) bool {
 21956  	v_2 := v.Args[2]
 21957  	v_1 := v.Args[1]
 21958  	v_0 := v.Args[0]
 21959  	// match: (Store {t} ptr val mem)
 21960  	// cond: t.Size() == 1
 21961  	// result: (MOVBstore ptr val mem)
 21962  	for {
 21963  		t := auxToType(v.Aux)
 21964  		ptr := v_0
 21965  		val := v_1
 21966  		mem := v_2
 21967  		if !(t.Size() == 1) {
 21968  			break
 21969  		}
 21970  		v.reset(OpARM64MOVBstore)
 21971  		v.AddArg3(ptr, val, mem)
 21972  		return true
 21973  	}
 21974  	// match: (Store {t} ptr val mem)
 21975  	// cond: t.Size() == 2
 21976  	// result: (MOVHstore ptr val mem)
 21977  	for {
 21978  		t := auxToType(v.Aux)
 21979  		ptr := v_0
 21980  		val := v_1
 21981  		mem := v_2
 21982  		if !(t.Size() == 2) {
 21983  			break
 21984  		}
 21985  		v.reset(OpARM64MOVHstore)
 21986  		v.AddArg3(ptr, val, mem)
 21987  		return true
 21988  	}
 21989  	// match: (Store {t} ptr val mem)
 21990  	// cond: t.Size() == 4 && !t.IsFloat()
 21991  	// result: (MOVWstore ptr val mem)
 21992  	for {
 21993  		t := auxToType(v.Aux)
 21994  		ptr := v_0
 21995  		val := v_1
 21996  		mem := v_2
 21997  		if !(t.Size() == 4 && !t.IsFloat()) {
 21998  			break
 21999  		}
 22000  		v.reset(OpARM64MOVWstore)
 22001  		v.AddArg3(ptr, val, mem)
 22002  		return true
 22003  	}
 22004  	// match: (Store {t} ptr val mem)
 22005  	// cond: t.Size() == 8 && !t.IsFloat()
 22006  	// result: (MOVDstore ptr val mem)
 22007  	for {
 22008  		t := auxToType(v.Aux)
 22009  		ptr := v_0
 22010  		val := v_1
 22011  		mem := v_2
 22012  		if !(t.Size() == 8 && !t.IsFloat()) {
 22013  			break
 22014  		}
 22015  		v.reset(OpARM64MOVDstore)
 22016  		v.AddArg3(ptr, val, mem)
 22017  		return true
 22018  	}
 22019  	// match: (Store {t} ptr val mem)
 22020  	// cond: t.Size() == 4 && t.IsFloat()
 22021  	// result: (FMOVSstore ptr val mem)
 22022  	for {
 22023  		t := auxToType(v.Aux)
 22024  		ptr := v_0
 22025  		val := v_1
 22026  		mem := v_2
 22027  		if !(t.Size() == 4 && t.IsFloat()) {
 22028  			break
 22029  		}
 22030  		v.reset(OpARM64FMOVSstore)
 22031  		v.AddArg3(ptr, val, mem)
 22032  		return true
 22033  	}
 22034  	// match: (Store {t} ptr val mem)
 22035  	// cond: t.Size() == 8 && t.IsFloat()
 22036  	// result: (FMOVDstore ptr val mem)
 22037  	for {
 22038  		t := auxToType(v.Aux)
 22039  		ptr := v_0
 22040  		val := v_1
 22041  		mem := v_2
 22042  		if !(t.Size() == 8 && t.IsFloat()) {
 22043  			break
 22044  		}
 22045  		v.reset(OpARM64FMOVDstore)
 22046  		v.AddArg3(ptr, val, mem)
 22047  		return true
 22048  	}
 22049  	return false
 22050  }
 22051  func rewriteValueARM64_OpZero(v *Value) bool {
 22052  	v_1 := v.Args[1]
 22053  	v_0 := v.Args[0]
 22054  	b := v.Block
 22055  	typ := &b.Func.Config.Types
 22056  	// match: (Zero [0] _ mem)
 22057  	// result: mem
 22058  	for {
 22059  		if auxIntToInt64(v.AuxInt) != 0 {
 22060  			break
 22061  		}
 22062  		mem := v_1
 22063  		v.copyOf(mem)
 22064  		return true
 22065  	}
 22066  	// match: (Zero [1] ptr mem)
 22067  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 22068  	for {
 22069  		if auxIntToInt64(v.AuxInt) != 1 {
 22070  			break
 22071  		}
 22072  		ptr := v_0
 22073  		mem := v_1
 22074  		v.reset(OpARM64MOVBstore)
 22075  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22076  		v0.AuxInt = int64ToAuxInt(0)
 22077  		v.AddArg3(ptr, v0, mem)
 22078  		return true
 22079  	}
 22080  	// match: (Zero [2] ptr mem)
 22081  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 22082  	for {
 22083  		if auxIntToInt64(v.AuxInt) != 2 {
 22084  			break
 22085  		}
 22086  		ptr := v_0
 22087  		mem := v_1
 22088  		v.reset(OpARM64MOVHstore)
 22089  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22090  		v0.AuxInt = int64ToAuxInt(0)
 22091  		v.AddArg3(ptr, v0, mem)
 22092  		return true
 22093  	}
 22094  	// match: (Zero [4] ptr mem)
 22095  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 22096  	for {
 22097  		if auxIntToInt64(v.AuxInt) != 4 {
 22098  			break
 22099  		}
 22100  		ptr := v_0
 22101  		mem := v_1
 22102  		v.reset(OpARM64MOVWstore)
 22103  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22104  		v0.AuxInt = int64ToAuxInt(0)
 22105  		v.AddArg3(ptr, v0, mem)
 22106  		return true
 22107  	}
 22108  	// match: (Zero [3] ptr mem)
 22109  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 22110  	for {
 22111  		if auxIntToInt64(v.AuxInt) != 3 {
 22112  			break
 22113  		}
 22114  		ptr := v_0
 22115  		mem := v_1
 22116  		v.reset(OpARM64MOVBstore)
 22117  		v.AuxInt = int32ToAuxInt(2)
 22118  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22119  		v0.AuxInt = int64ToAuxInt(0)
 22120  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 22121  		v1.AddArg3(ptr, v0, mem)
 22122  		v.AddArg3(ptr, v0, v1)
 22123  		return true
 22124  	}
 22125  	// match: (Zero [5] ptr mem)
 22126  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22127  	for {
 22128  		if auxIntToInt64(v.AuxInt) != 5 {
 22129  			break
 22130  		}
 22131  		ptr := v_0
 22132  		mem := v_1
 22133  		v.reset(OpARM64MOVBstore)
 22134  		v.AuxInt = int32ToAuxInt(4)
 22135  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22136  		v0.AuxInt = int64ToAuxInt(0)
 22137  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22138  		v1.AddArg3(ptr, v0, mem)
 22139  		v.AddArg3(ptr, v0, v1)
 22140  		return true
 22141  	}
 22142  	// match: (Zero [6] ptr mem)
 22143  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22144  	for {
 22145  		if auxIntToInt64(v.AuxInt) != 6 {
 22146  			break
 22147  		}
 22148  		ptr := v_0
 22149  		mem := v_1
 22150  		v.reset(OpARM64MOVHstore)
 22151  		v.AuxInt = int32ToAuxInt(4)
 22152  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22153  		v0.AuxInt = int64ToAuxInt(0)
 22154  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22155  		v1.AddArg3(ptr, v0, mem)
 22156  		v.AddArg3(ptr, v0, v1)
 22157  		return true
 22158  	}
 22159  	// match: (Zero [7] ptr mem)
 22160  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22161  	for {
 22162  		if auxIntToInt64(v.AuxInt) != 7 {
 22163  			break
 22164  		}
 22165  		ptr := v_0
 22166  		mem := v_1
 22167  		v.reset(OpARM64MOVWstore)
 22168  		v.AuxInt = int32ToAuxInt(3)
 22169  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22170  		v0.AuxInt = int64ToAuxInt(0)
 22171  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22172  		v1.AddArg3(ptr, v0, mem)
 22173  		v.AddArg3(ptr, v0, v1)
 22174  		return true
 22175  	}
 22176  	// match: (Zero [8] ptr mem)
 22177  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 22178  	for {
 22179  		if auxIntToInt64(v.AuxInt) != 8 {
 22180  			break
 22181  		}
 22182  		ptr := v_0
 22183  		mem := v_1
 22184  		v.reset(OpARM64MOVDstore)
 22185  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22186  		v0.AuxInt = int64ToAuxInt(0)
 22187  		v.AddArg3(ptr, v0, mem)
 22188  		return true
 22189  	}
 22190  	// match: (Zero [9] ptr mem)
 22191  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22192  	for {
 22193  		if auxIntToInt64(v.AuxInt) != 9 {
 22194  			break
 22195  		}
 22196  		ptr := v_0
 22197  		mem := v_1
 22198  		v.reset(OpARM64MOVBstore)
 22199  		v.AuxInt = int32ToAuxInt(8)
 22200  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22201  		v0.AuxInt = int64ToAuxInt(0)
 22202  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22203  		v1.AddArg3(ptr, v0, mem)
 22204  		v.AddArg3(ptr, v0, v1)
 22205  		return true
 22206  	}
 22207  	// match: (Zero [10] ptr mem)
 22208  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22209  	for {
 22210  		if auxIntToInt64(v.AuxInt) != 10 {
 22211  			break
 22212  		}
 22213  		ptr := v_0
 22214  		mem := v_1
 22215  		v.reset(OpARM64MOVHstore)
 22216  		v.AuxInt = int32ToAuxInt(8)
 22217  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22218  		v0.AuxInt = int64ToAuxInt(0)
 22219  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22220  		v1.AddArg3(ptr, v0, mem)
 22221  		v.AddArg3(ptr, v0, v1)
 22222  		return true
 22223  	}
 22224  	// match: (Zero [11] ptr mem)
 22225  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22226  	for {
 22227  		if auxIntToInt64(v.AuxInt) != 11 {
 22228  			break
 22229  		}
 22230  		ptr := v_0
 22231  		mem := v_1
 22232  		v.reset(OpARM64MOVDstore)
 22233  		v.AuxInt = int32ToAuxInt(3)
 22234  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22235  		v0.AuxInt = int64ToAuxInt(0)
 22236  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22237  		v1.AddArg3(ptr, v0, mem)
 22238  		v.AddArg3(ptr, v0, v1)
 22239  		return true
 22240  	}
 22241  	// match: (Zero [12] ptr mem)
 22242  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22243  	for {
 22244  		if auxIntToInt64(v.AuxInt) != 12 {
 22245  			break
 22246  		}
 22247  		ptr := v_0
 22248  		mem := v_1
 22249  		v.reset(OpARM64MOVWstore)
 22250  		v.AuxInt = int32ToAuxInt(8)
 22251  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22252  		v0.AuxInt = int64ToAuxInt(0)
 22253  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22254  		v1.AddArg3(ptr, v0, mem)
 22255  		v.AddArg3(ptr, v0, v1)
 22256  		return true
 22257  	}
 22258  	// match: (Zero [13] ptr mem)
 22259  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22260  	for {
 22261  		if auxIntToInt64(v.AuxInt) != 13 {
 22262  			break
 22263  		}
 22264  		ptr := v_0
 22265  		mem := v_1
 22266  		v.reset(OpARM64MOVDstore)
 22267  		v.AuxInt = int32ToAuxInt(5)
 22268  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22269  		v0.AuxInt = int64ToAuxInt(0)
 22270  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22271  		v1.AddArg3(ptr, v0, mem)
 22272  		v.AddArg3(ptr, v0, v1)
 22273  		return true
 22274  	}
 22275  	// match: (Zero [14] ptr mem)
 22276  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22277  	for {
 22278  		if auxIntToInt64(v.AuxInt) != 14 {
 22279  			break
 22280  		}
 22281  		ptr := v_0
 22282  		mem := v_1
 22283  		v.reset(OpARM64MOVDstore)
 22284  		v.AuxInt = int32ToAuxInt(6)
 22285  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22286  		v0.AuxInt = int64ToAuxInt(0)
 22287  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22288  		v1.AddArg3(ptr, v0, mem)
 22289  		v.AddArg3(ptr, v0, v1)
 22290  		return true
 22291  	}
 22292  	// match: (Zero [15] ptr mem)
 22293  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22294  	for {
 22295  		if auxIntToInt64(v.AuxInt) != 15 {
 22296  			break
 22297  		}
 22298  		ptr := v_0
 22299  		mem := v_1
 22300  		v.reset(OpARM64MOVDstore)
 22301  		v.AuxInt = int32ToAuxInt(7)
 22302  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22303  		v0.AuxInt = int64ToAuxInt(0)
 22304  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22305  		v1.AddArg3(ptr, v0, mem)
 22306  		v.AddArg3(ptr, v0, v1)
 22307  		return true
 22308  	}
 22309  	// match: (Zero [16] ptr mem)
 22310  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 22311  	for {
 22312  		if auxIntToInt64(v.AuxInt) != 16 {
 22313  			break
 22314  		}
 22315  		ptr := v_0
 22316  		mem := v_1
 22317  		v.reset(OpARM64STP)
 22318  		v.AuxInt = int32ToAuxInt(0)
 22319  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22320  		v0.AuxInt = int64ToAuxInt(0)
 22321  		v.AddArg4(ptr, v0, v0, mem)
 22322  		return true
 22323  	}
 22324  	// match: (Zero [32] ptr mem)
 22325  	// result: (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem))
 22326  	for {
 22327  		if auxIntToInt64(v.AuxInt) != 32 {
 22328  			break
 22329  		}
 22330  		ptr := v_0
 22331  		mem := v_1
 22332  		v.reset(OpARM64STP)
 22333  		v.AuxInt = int32ToAuxInt(16)
 22334  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22335  		v0.AuxInt = int64ToAuxInt(0)
 22336  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22337  		v1.AuxInt = int32ToAuxInt(0)
 22338  		v1.AddArg4(ptr, v0, v0, mem)
 22339  		v.AddArg4(ptr, v0, v0, v1)
 22340  		return true
 22341  	}
 22342  	// match: (Zero [48] ptr mem)
 22343  	// result: (STP [32] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)))
 22344  	for {
 22345  		if auxIntToInt64(v.AuxInt) != 48 {
 22346  			break
 22347  		}
 22348  		ptr := v_0
 22349  		mem := v_1
 22350  		v.reset(OpARM64STP)
 22351  		v.AuxInt = int32ToAuxInt(32)
 22352  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22353  		v0.AuxInt = int64ToAuxInt(0)
 22354  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22355  		v1.AuxInt = int32ToAuxInt(16)
 22356  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22357  		v2.AuxInt = int32ToAuxInt(0)
 22358  		v2.AddArg4(ptr, v0, v0, mem)
 22359  		v1.AddArg4(ptr, v0, v0, v2)
 22360  		v.AddArg4(ptr, v0, v0, v1)
 22361  		return true
 22362  	}
 22363  	// match: (Zero [64] ptr mem)
 22364  	// result: (STP [48] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [32] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem))))
 22365  	for {
 22366  		if auxIntToInt64(v.AuxInt) != 64 {
 22367  			break
 22368  		}
 22369  		ptr := v_0
 22370  		mem := v_1
 22371  		v.reset(OpARM64STP)
 22372  		v.AuxInt = int32ToAuxInt(48)
 22373  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22374  		v0.AuxInt = int64ToAuxInt(0)
 22375  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22376  		v1.AuxInt = int32ToAuxInt(32)
 22377  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22378  		v2.AuxInt = int32ToAuxInt(16)
 22379  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22380  		v3.AuxInt = int32ToAuxInt(0)
 22381  		v3.AddArg4(ptr, v0, v0, mem)
 22382  		v2.AddArg4(ptr, v0, v0, v3)
 22383  		v1.AddArg4(ptr, v0, v0, v2)
 22384  		v.AddArg4(ptr, v0, v0, v1)
 22385  		return true
 22386  	}
 22387  	// match: (Zero [s] ptr mem)
 22388  	// cond: s%16 != 0 && s%16 <= 8 && s > 16
 22389  	// result: (Zero [8] (OffPtr <ptr.Type> ptr [s-8]) (Zero [s-s%16] ptr mem))
 22390  	for {
 22391  		s := auxIntToInt64(v.AuxInt)
 22392  		ptr := v_0
 22393  		mem := v_1
 22394  		if !(s%16 != 0 && s%16 <= 8 && s > 16) {
 22395  			break
 22396  		}
 22397  		v.reset(OpZero)
 22398  		v.AuxInt = int64ToAuxInt(8)
 22399  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 22400  		v0.AuxInt = int64ToAuxInt(s - 8)
 22401  		v0.AddArg(ptr)
 22402  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 22403  		v1.AuxInt = int64ToAuxInt(s - s%16)
 22404  		v1.AddArg2(ptr, mem)
 22405  		v.AddArg2(v0, v1)
 22406  		return true
 22407  	}
 22408  	// match: (Zero [s] ptr mem)
 22409  	// cond: s%16 != 0 && s%16 > 8 && s > 16
 22410  	// result: (Zero [16] (OffPtr <ptr.Type> ptr [s-16]) (Zero [s-s%16] ptr mem))
 22411  	for {
 22412  		s := auxIntToInt64(v.AuxInt)
 22413  		ptr := v_0
 22414  		mem := v_1
 22415  		if !(s%16 != 0 && s%16 > 8 && s > 16) {
 22416  			break
 22417  		}
 22418  		v.reset(OpZero)
 22419  		v.AuxInt = int64ToAuxInt(16)
 22420  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 22421  		v0.AuxInt = int64ToAuxInt(s - 16)
 22422  		v0.AddArg(ptr)
 22423  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 22424  		v1.AuxInt = int64ToAuxInt(s - s%16)
 22425  		v1.AddArg2(ptr, mem)
 22426  		v.AddArg2(v0, v1)
 22427  		return true
 22428  	}
 22429  	// match: (Zero [s] ptr mem)
 22430  	// cond: s%16 == 0 && s > 64 && s <= 16*64
 22431  	// result: (DUFFZERO [4 * (64 - s/16)] ptr mem)
 22432  	for {
 22433  		s := auxIntToInt64(v.AuxInt)
 22434  		ptr := v_0
 22435  		mem := v_1
 22436  		if !(s%16 == 0 && s > 64 && s <= 16*64) {
 22437  			break
 22438  		}
 22439  		v.reset(OpARM64DUFFZERO)
 22440  		v.AuxInt = int64ToAuxInt(4 * (64 - s/16))
 22441  		v.AddArg2(ptr, mem)
 22442  		return true
 22443  	}
 22444  	// match: (Zero [s] ptr mem)
 22445  	// cond: s%16 == 0 && s > 16*64
 22446  	// result: (LoweredZero ptr (ADDconst <ptr.Type> [s-16] ptr) mem)
 22447  	for {
 22448  		s := auxIntToInt64(v.AuxInt)
 22449  		ptr := v_0
 22450  		mem := v_1
 22451  		if !(s%16 == 0 && s > 16*64) {
 22452  			break
 22453  		}
 22454  		v.reset(OpARM64LoweredZero)
 22455  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, ptr.Type)
 22456  		v0.AuxInt = int64ToAuxInt(s - 16)
 22457  		v0.AddArg(ptr)
 22458  		v.AddArg3(ptr, v0, mem)
 22459  		return true
 22460  	}
 22461  	return false
 22462  }
 22463  func rewriteBlockARM64(b *Block) bool {
 22464  	typ := &b.Func.Config.Types
 22465  	switch b.Kind {
 22466  	case BlockARM64EQ:
 22467  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 22468  		// cond: z.Uses == 1
 22469  		// result: (EQ (TST x y) yes no)
 22470  		for b.Controls[0].Op == OpARM64CMPconst {
 22471  			v_0 := b.Controls[0]
 22472  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22473  				break
 22474  			}
 22475  			z := v_0.Args[0]
 22476  			if z.Op != OpARM64AND {
 22477  				break
 22478  			}
 22479  			_ = z.Args[1]
 22480  			z_0 := z.Args[0]
 22481  			z_1 := z.Args[1]
 22482  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22483  				x := z_0
 22484  				y := z_1
 22485  				if !(z.Uses == 1) {
 22486  					continue
 22487  				}
 22488  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 22489  				v0.AddArg2(x, y)
 22490  				b.resetWithControl(BlockARM64EQ, v0)
 22491  				return true
 22492  			}
 22493  			break
 22494  		}
 22495  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 22496  		// cond: x.Uses == 1
 22497  		// result: (EQ (TSTconst [c] y) yes no)
 22498  		for b.Controls[0].Op == OpARM64CMPconst {
 22499  			v_0 := b.Controls[0]
 22500  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22501  				break
 22502  			}
 22503  			x := v_0.Args[0]
 22504  			if x.Op != OpARM64ANDconst {
 22505  				break
 22506  			}
 22507  			c := auxIntToInt64(x.AuxInt)
 22508  			y := x.Args[0]
 22509  			if !(x.Uses == 1) {
 22510  				break
 22511  			}
 22512  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 22513  			v0.AuxInt = int64ToAuxInt(c)
 22514  			v0.AddArg(y)
 22515  			b.resetWithControl(BlockARM64EQ, v0)
 22516  			return true
 22517  		}
 22518  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 22519  		// cond: z.Uses == 1
 22520  		// result: (EQ (TSTW x y) yes no)
 22521  		for b.Controls[0].Op == OpARM64CMPWconst {
 22522  			v_0 := b.Controls[0]
 22523  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22524  				break
 22525  			}
 22526  			z := v_0.Args[0]
 22527  			if z.Op != OpARM64AND {
 22528  				break
 22529  			}
 22530  			_ = z.Args[1]
 22531  			z_0 := z.Args[0]
 22532  			z_1 := z.Args[1]
 22533  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22534  				x := z_0
 22535  				y := z_1
 22536  				if !(z.Uses == 1) {
 22537  					continue
 22538  				}
 22539  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 22540  				v0.AddArg2(x, y)
 22541  				b.resetWithControl(BlockARM64EQ, v0)
 22542  				return true
 22543  			}
 22544  			break
 22545  		}
 22546  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 22547  		// cond: x.Uses == 1
 22548  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 22549  		for b.Controls[0].Op == OpARM64CMPWconst {
 22550  			v_0 := b.Controls[0]
 22551  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22552  				break
 22553  			}
 22554  			x := v_0.Args[0]
 22555  			if x.Op != OpARM64ANDconst {
 22556  				break
 22557  			}
 22558  			c := auxIntToInt64(x.AuxInt)
 22559  			y := x.Args[0]
 22560  			if !(x.Uses == 1) {
 22561  				break
 22562  			}
 22563  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 22564  			v0.AuxInt = int32ToAuxInt(int32(c))
 22565  			v0.AddArg(y)
 22566  			b.resetWithControl(BlockARM64EQ, v0)
 22567  			return true
 22568  		}
 22569  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 22570  		// cond: x.Uses == 1
 22571  		// result: (EQ (CMNconst [c] y) yes no)
 22572  		for b.Controls[0].Op == OpARM64CMPconst {
 22573  			v_0 := b.Controls[0]
 22574  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22575  				break
 22576  			}
 22577  			x := v_0.Args[0]
 22578  			if x.Op != OpARM64ADDconst {
 22579  				break
 22580  			}
 22581  			c := auxIntToInt64(x.AuxInt)
 22582  			y := x.Args[0]
 22583  			if !(x.Uses == 1) {
 22584  				break
 22585  			}
 22586  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 22587  			v0.AuxInt = int64ToAuxInt(c)
 22588  			v0.AddArg(y)
 22589  			b.resetWithControl(BlockARM64EQ, v0)
 22590  			return true
 22591  		}
 22592  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 22593  		// cond: x.Uses == 1
 22594  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 22595  		for b.Controls[0].Op == OpARM64CMPWconst {
 22596  			v_0 := b.Controls[0]
 22597  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22598  				break
 22599  			}
 22600  			x := v_0.Args[0]
 22601  			if x.Op != OpARM64ADDconst {
 22602  				break
 22603  			}
 22604  			c := auxIntToInt64(x.AuxInt)
 22605  			y := x.Args[0]
 22606  			if !(x.Uses == 1) {
 22607  				break
 22608  			}
 22609  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 22610  			v0.AuxInt = int32ToAuxInt(int32(c))
 22611  			v0.AddArg(y)
 22612  			b.resetWithControl(BlockARM64EQ, v0)
 22613  			return true
 22614  		}
 22615  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 22616  		// cond: z.Uses == 1
 22617  		// result: (EQ (CMN x y) yes no)
 22618  		for b.Controls[0].Op == OpARM64CMPconst {
 22619  			v_0 := b.Controls[0]
 22620  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22621  				break
 22622  			}
 22623  			z := v_0.Args[0]
 22624  			if z.Op != OpARM64ADD {
 22625  				break
 22626  			}
 22627  			_ = z.Args[1]
 22628  			z_0 := z.Args[0]
 22629  			z_1 := z.Args[1]
 22630  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22631  				x := z_0
 22632  				y := z_1
 22633  				if !(z.Uses == 1) {
 22634  					continue
 22635  				}
 22636  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22637  				v0.AddArg2(x, y)
 22638  				b.resetWithControl(BlockARM64EQ, v0)
 22639  				return true
 22640  			}
 22641  			break
 22642  		}
 22643  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 22644  		// cond: z.Uses == 1
 22645  		// result: (EQ (CMNW x y) yes no)
 22646  		for b.Controls[0].Op == OpARM64CMPWconst {
 22647  			v_0 := b.Controls[0]
 22648  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22649  				break
 22650  			}
 22651  			z := v_0.Args[0]
 22652  			if z.Op != OpARM64ADD {
 22653  				break
 22654  			}
 22655  			_ = z.Args[1]
 22656  			z_0 := z.Args[0]
 22657  			z_1 := z.Args[1]
 22658  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22659  				x := z_0
 22660  				y := z_1
 22661  				if !(z.Uses == 1) {
 22662  					continue
 22663  				}
 22664  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22665  				v0.AddArg2(x, y)
 22666  				b.resetWithControl(BlockARM64EQ, v0)
 22667  				return true
 22668  			}
 22669  			break
 22670  		}
 22671  		// match: (EQ (CMP x z:(NEG y)) yes no)
 22672  		// cond: z.Uses == 1
 22673  		// result: (EQ (CMN x y) yes no)
 22674  		for b.Controls[0].Op == OpARM64CMP {
 22675  			v_0 := b.Controls[0]
 22676  			_ = v_0.Args[1]
 22677  			x := v_0.Args[0]
 22678  			z := v_0.Args[1]
 22679  			if z.Op != OpARM64NEG {
 22680  				break
 22681  			}
 22682  			y := z.Args[0]
 22683  			if !(z.Uses == 1) {
 22684  				break
 22685  			}
 22686  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22687  			v0.AddArg2(x, y)
 22688  			b.resetWithControl(BlockARM64EQ, v0)
 22689  			return true
 22690  		}
 22691  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 22692  		// cond: z.Uses == 1
 22693  		// result: (EQ (CMNW x y) yes no)
 22694  		for b.Controls[0].Op == OpARM64CMPW {
 22695  			v_0 := b.Controls[0]
 22696  			_ = v_0.Args[1]
 22697  			x := v_0.Args[0]
 22698  			z := v_0.Args[1]
 22699  			if z.Op != OpARM64NEG {
 22700  				break
 22701  			}
 22702  			y := z.Args[0]
 22703  			if !(z.Uses == 1) {
 22704  				break
 22705  			}
 22706  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22707  			v0.AddArg2(x, y)
 22708  			b.resetWithControl(BlockARM64EQ, v0)
 22709  			return true
 22710  		}
 22711  		// match: (EQ (CMPconst [0] x) yes no)
 22712  		// result: (Z x yes no)
 22713  		for b.Controls[0].Op == OpARM64CMPconst {
 22714  			v_0 := b.Controls[0]
 22715  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22716  				break
 22717  			}
 22718  			x := v_0.Args[0]
 22719  			b.resetWithControl(BlockARM64Z, x)
 22720  			return true
 22721  		}
 22722  		// match: (EQ (CMPWconst [0] x) yes no)
 22723  		// result: (ZW x yes no)
 22724  		for b.Controls[0].Op == OpARM64CMPWconst {
 22725  			v_0 := b.Controls[0]
 22726  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22727  				break
 22728  			}
 22729  			x := v_0.Args[0]
 22730  			b.resetWithControl(BlockARM64ZW, x)
 22731  			return true
 22732  		}
 22733  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 22734  		// cond: z.Uses==1
 22735  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 22736  		for b.Controls[0].Op == OpARM64CMPconst {
 22737  			v_0 := b.Controls[0]
 22738  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22739  				break
 22740  			}
 22741  			z := v_0.Args[0]
 22742  			if z.Op != OpARM64MADD {
 22743  				break
 22744  			}
 22745  			y := z.Args[2]
 22746  			a := z.Args[0]
 22747  			x := z.Args[1]
 22748  			if !(z.Uses == 1) {
 22749  				break
 22750  			}
 22751  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22752  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22753  			v1.AddArg2(x, y)
 22754  			v0.AddArg2(a, v1)
 22755  			b.resetWithControl(BlockARM64EQ, v0)
 22756  			return true
 22757  		}
 22758  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 22759  		// cond: z.Uses==1
 22760  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 22761  		for b.Controls[0].Op == OpARM64CMPconst {
 22762  			v_0 := b.Controls[0]
 22763  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22764  				break
 22765  			}
 22766  			z := v_0.Args[0]
 22767  			if z.Op != OpARM64MSUB {
 22768  				break
 22769  			}
 22770  			y := z.Args[2]
 22771  			a := z.Args[0]
 22772  			x := z.Args[1]
 22773  			if !(z.Uses == 1) {
 22774  				break
 22775  			}
 22776  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 22777  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22778  			v1.AddArg2(x, y)
 22779  			v0.AddArg2(a, v1)
 22780  			b.resetWithControl(BlockARM64EQ, v0)
 22781  			return true
 22782  		}
 22783  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 22784  		// cond: z.Uses==1
 22785  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 22786  		for b.Controls[0].Op == OpARM64CMPWconst {
 22787  			v_0 := b.Controls[0]
 22788  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22789  				break
 22790  			}
 22791  			z := v_0.Args[0]
 22792  			if z.Op != OpARM64MADDW {
 22793  				break
 22794  			}
 22795  			y := z.Args[2]
 22796  			a := z.Args[0]
 22797  			x := z.Args[1]
 22798  			if !(z.Uses == 1) {
 22799  				break
 22800  			}
 22801  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22802  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22803  			v1.AddArg2(x, y)
 22804  			v0.AddArg2(a, v1)
 22805  			b.resetWithControl(BlockARM64EQ, v0)
 22806  			return true
 22807  		}
 22808  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 22809  		// cond: z.Uses==1
 22810  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 22811  		for b.Controls[0].Op == OpARM64CMPWconst {
 22812  			v_0 := b.Controls[0]
 22813  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22814  				break
 22815  			}
 22816  			z := v_0.Args[0]
 22817  			if z.Op != OpARM64MSUBW {
 22818  				break
 22819  			}
 22820  			y := z.Args[2]
 22821  			a := z.Args[0]
 22822  			x := z.Args[1]
 22823  			if !(z.Uses == 1) {
 22824  				break
 22825  			}
 22826  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 22827  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22828  			v1.AddArg2(x, y)
 22829  			v0.AddArg2(a, v1)
 22830  			b.resetWithControl(BlockARM64EQ, v0)
 22831  			return true
 22832  		}
 22833  		// match: (EQ (TSTconst [c] x) yes no)
 22834  		// cond: oneBit(c)
 22835  		// result: (TBZ [int64(ntz64(c))] x yes no)
 22836  		for b.Controls[0].Op == OpARM64TSTconst {
 22837  			v_0 := b.Controls[0]
 22838  			c := auxIntToInt64(v_0.AuxInt)
 22839  			x := v_0.Args[0]
 22840  			if !(oneBit(c)) {
 22841  				break
 22842  			}
 22843  			b.resetWithControl(BlockARM64TBZ, x)
 22844  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 22845  			return true
 22846  		}
 22847  		// match: (EQ (TSTWconst [c] x) yes no)
 22848  		// cond: oneBit(int64(uint32(c)))
 22849  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 22850  		for b.Controls[0].Op == OpARM64TSTWconst {
 22851  			v_0 := b.Controls[0]
 22852  			c := auxIntToInt32(v_0.AuxInt)
 22853  			x := v_0.Args[0]
 22854  			if !(oneBit(int64(uint32(c)))) {
 22855  				break
 22856  			}
 22857  			b.resetWithControl(BlockARM64TBZ, x)
 22858  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 22859  			return true
 22860  		}
 22861  		// match: (EQ (FlagConstant [fc]) yes no)
 22862  		// cond: fc.eq()
 22863  		// result: (First yes no)
 22864  		for b.Controls[0].Op == OpARM64FlagConstant {
 22865  			v_0 := b.Controls[0]
 22866  			fc := auxIntToFlagConstant(v_0.AuxInt)
 22867  			if !(fc.eq()) {
 22868  				break
 22869  			}
 22870  			b.Reset(BlockFirst)
 22871  			return true
 22872  		}
 22873  		// match: (EQ (FlagConstant [fc]) yes no)
 22874  		// cond: !fc.eq()
 22875  		// result: (First no yes)
 22876  		for b.Controls[0].Op == OpARM64FlagConstant {
 22877  			v_0 := b.Controls[0]
 22878  			fc := auxIntToFlagConstant(v_0.AuxInt)
 22879  			if !(!fc.eq()) {
 22880  				break
 22881  			}
 22882  			b.Reset(BlockFirst)
 22883  			b.swapSuccessors()
 22884  			return true
 22885  		}
 22886  		// match: (EQ (InvertFlags cmp) yes no)
 22887  		// result: (EQ cmp yes no)
 22888  		for b.Controls[0].Op == OpARM64InvertFlags {
 22889  			v_0 := b.Controls[0]
 22890  			cmp := v_0.Args[0]
 22891  			b.resetWithControl(BlockARM64EQ, cmp)
 22892  			return true
 22893  		}
 22894  	case BlockARM64FGE:
 22895  		// match: (FGE (InvertFlags cmp) yes no)
 22896  		// result: (FLE cmp yes no)
 22897  		for b.Controls[0].Op == OpARM64InvertFlags {
 22898  			v_0 := b.Controls[0]
 22899  			cmp := v_0.Args[0]
 22900  			b.resetWithControl(BlockARM64FLE, cmp)
 22901  			return true
 22902  		}
 22903  	case BlockARM64FGT:
 22904  		// match: (FGT (InvertFlags cmp) yes no)
 22905  		// result: (FLT cmp yes no)
 22906  		for b.Controls[0].Op == OpARM64InvertFlags {
 22907  			v_0 := b.Controls[0]
 22908  			cmp := v_0.Args[0]
 22909  			b.resetWithControl(BlockARM64FLT, cmp)
 22910  			return true
 22911  		}
 22912  	case BlockARM64FLE:
 22913  		// match: (FLE (InvertFlags cmp) yes no)
 22914  		// result: (FGE cmp yes no)
 22915  		for b.Controls[0].Op == OpARM64InvertFlags {
 22916  			v_0 := b.Controls[0]
 22917  			cmp := v_0.Args[0]
 22918  			b.resetWithControl(BlockARM64FGE, cmp)
 22919  			return true
 22920  		}
 22921  	case BlockARM64FLT:
 22922  		// match: (FLT (InvertFlags cmp) yes no)
 22923  		// result: (FGT cmp yes no)
 22924  		for b.Controls[0].Op == OpARM64InvertFlags {
 22925  			v_0 := b.Controls[0]
 22926  			cmp := v_0.Args[0]
 22927  			b.resetWithControl(BlockARM64FGT, cmp)
 22928  			return true
 22929  		}
 22930  	case BlockARM64GE:
 22931  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 22932  		// cond: z.Uses == 1
 22933  		// result: (GE (TST x y) yes no)
 22934  		for b.Controls[0].Op == OpARM64CMPconst {
 22935  			v_0 := b.Controls[0]
 22936  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22937  				break
 22938  			}
 22939  			z := v_0.Args[0]
 22940  			if z.Op != OpARM64AND {
 22941  				break
 22942  			}
 22943  			_ = z.Args[1]
 22944  			z_0 := z.Args[0]
 22945  			z_1 := z.Args[1]
 22946  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22947  				x := z_0
 22948  				y := z_1
 22949  				if !(z.Uses == 1) {
 22950  					continue
 22951  				}
 22952  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 22953  				v0.AddArg2(x, y)
 22954  				b.resetWithControl(BlockARM64GE, v0)
 22955  				return true
 22956  			}
 22957  			break
 22958  		}
 22959  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 22960  		// cond: x.Uses == 1
 22961  		// result: (GE (TSTconst [c] y) yes no)
 22962  		for b.Controls[0].Op == OpARM64CMPconst {
 22963  			v_0 := b.Controls[0]
 22964  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22965  				break
 22966  			}
 22967  			x := v_0.Args[0]
 22968  			if x.Op != OpARM64ANDconst {
 22969  				break
 22970  			}
 22971  			c := auxIntToInt64(x.AuxInt)
 22972  			y := x.Args[0]
 22973  			if !(x.Uses == 1) {
 22974  				break
 22975  			}
 22976  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 22977  			v0.AuxInt = int64ToAuxInt(c)
 22978  			v0.AddArg(y)
 22979  			b.resetWithControl(BlockARM64GE, v0)
 22980  			return true
 22981  		}
 22982  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 22983  		// cond: z.Uses == 1
 22984  		// result: (GE (TSTW x y) yes no)
 22985  		for b.Controls[0].Op == OpARM64CMPWconst {
 22986  			v_0 := b.Controls[0]
 22987  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22988  				break
 22989  			}
 22990  			z := v_0.Args[0]
 22991  			if z.Op != OpARM64AND {
 22992  				break
 22993  			}
 22994  			_ = z.Args[1]
 22995  			z_0 := z.Args[0]
 22996  			z_1 := z.Args[1]
 22997  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22998  				x := z_0
 22999  				y := z_1
 23000  				if !(z.Uses == 1) {
 23001  					continue
 23002  				}
 23003  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23004  				v0.AddArg2(x, y)
 23005  				b.resetWithControl(BlockARM64GE, v0)
 23006  				return true
 23007  			}
 23008  			break
 23009  		}
 23010  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23011  		// cond: x.Uses == 1
 23012  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 23013  		for b.Controls[0].Op == OpARM64CMPWconst {
 23014  			v_0 := b.Controls[0]
 23015  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23016  				break
 23017  			}
 23018  			x := v_0.Args[0]
 23019  			if x.Op != OpARM64ANDconst {
 23020  				break
 23021  			}
 23022  			c := auxIntToInt64(x.AuxInt)
 23023  			y := x.Args[0]
 23024  			if !(x.Uses == 1) {
 23025  				break
 23026  			}
 23027  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23028  			v0.AuxInt = int32ToAuxInt(int32(c))
 23029  			v0.AddArg(y)
 23030  			b.resetWithControl(BlockARM64GE, v0)
 23031  			return true
 23032  		}
 23033  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23034  		// cond: x.Uses == 1
 23035  		// result: (GEnoov (CMNconst [c] y) yes no)
 23036  		for b.Controls[0].Op == OpARM64CMPconst {
 23037  			v_0 := b.Controls[0]
 23038  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23039  				break
 23040  			}
 23041  			x := v_0.Args[0]
 23042  			if x.Op != OpARM64ADDconst {
 23043  				break
 23044  			}
 23045  			c := auxIntToInt64(x.AuxInt)
 23046  			y := x.Args[0]
 23047  			if !(x.Uses == 1) {
 23048  				break
 23049  			}
 23050  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23051  			v0.AuxInt = int64ToAuxInt(c)
 23052  			v0.AddArg(y)
 23053  			b.resetWithControl(BlockARM64GEnoov, v0)
 23054  			return true
 23055  		}
 23056  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23057  		// cond: x.Uses == 1
 23058  		// result: (GEnoov (CMNWconst [int32(c)] y) yes no)
 23059  		for b.Controls[0].Op == OpARM64CMPWconst {
 23060  			v_0 := b.Controls[0]
 23061  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23062  				break
 23063  			}
 23064  			x := v_0.Args[0]
 23065  			if x.Op != OpARM64ADDconst {
 23066  				break
 23067  			}
 23068  			c := auxIntToInt64(x.AuxInt)
 23069  			y := x.Args[0]
 23070  			if !(x.Uses == 1) {
 23071  				break
 23072  			}
 23073  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23074  			v0.AuxInt = int32ToAuxInt(int32(c))
 23075  			v0.AddArg(y)
 23076  			b.resetWithControl(BlockARM64GEnoov, v0)
 23077  			return true
 23078  		}
 23079  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 23080  		// cond: z.Uses == 1
 23081  		// result: (GEnoov (CMN x y) yes no)
 23082  		for b.Controls[0].Op == OpARM64CMPconst {
 23083  			v_0 := b.Controls[0]
 23084  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23085  				break
 23086  			}
 23087  			z := v_0.Args[0]
 23088  			if z.Op != OpARM64ADD {
 23089  				break
 23090  			}
 23091  			_ = z.Args[1]
 23092  			z_0 := z.Args[0]
 23093  			z_1 := z.Args[1]
 23094  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23095  				x := z_0
 23096  				y := z_1
 23097  				if !(z.Uses == 1) {
 23098  					continue
 23099  				}
 23100  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23101  				v0.AddArg2(x, y)
 23102  				b.resetWithControl(BlockARM64GEnoov, v0)
 23103  				return true
 23104  			}
 23105  			break
 23106  		}
 23107  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 23108  		// cond: z.Uses == 1
 23109  		// result: (GEnoov (CMNW x y) yes no)
 23110  		for b.Controls[0].Op == OpARM64CMPWconst {
 23111  			v_0 := b.Controls[0]
 23112  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23113  				break
 23114  			}
 23115  			z := v_0.Args[0]
 23116  			if z.Op != OpARM64ADD {
 23117  				break
 23118  			}
 23119  			_ = z.Args[1]
 23120  			z_0 := z.Args[0]
 23121  			z_1 := z.Args[1]
 23122  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23123  				x := z_0
 23124  				y := z_1
 23125  				if !(z.Uses == 1) {
 23126  					continue
 23127  				}
 23128  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23129  				v0.AddArg2(x, y)
 23130  				b.resetWithControl(BlockARM64GEnoov, v0)
 23131  				return true
 23132  			}
 23133  			break
 23134  		}
 23135  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 23136  		// cond: z.Uses==1
 23137  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 23138  		for b.Controls[0].Op == OpARM64CMPconst {
 23139  			v_0 := b.Controls[0]
 23140  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23141  				break
 23142  			}
 23143  			z := v_0.Args[0]
 23144  			if z.Op != OpARM64MADD {
 23145  				break
 23146  			}
 23147  			y := z.Args[2]
 23148  			a := z.Args[0]
 23149  			x := z.Args[1]
 23150  			if !(z.Uses == 1) {
 23151  				break
 23152  			}
 23153  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23154  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23155  			v1.AddArg2(x, y)
 23156  			v0.AddArg2(a, v1)
 23157  			b.resetWithControl(BlockARM64GEnoov, v0)
 23158  			return true
 23159  		}
 23160  		// match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
 23161  		// cond: z.Uses==1
 23162  		// result: (GEnoov (CMP a (MUL <x.Type> x y)) yes no)
 23163  		for b.Controls[0].Op == OpARM64CMPconst {
 23164  			v_0 := b.Controls[0]
 23165  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23166  				break
 23167  			}
 23168  			z := v_0.Args[0]
 23169  			if z.Op != OpARM64MSUB {
 23170  				break
 23171  			}
 23172  			y := z.Args[2]
 23173  			a := z.Args[0]
 23174  			x := z.Args[1]
 23175  			if !(z.Uses == 1) {
 23176  				break
 23177  			}
 23178  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23179  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23180  			v1.AddArg2(x, y)
 23181  			v0.AddArg2(a, v1)
 23182  			b.resetWithControl(BlockARM64GEnoov, v0)
 23183  			return true
 23184  		}
 23185  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 23186  		// cond: z.Uses==1
 23187  		// result: (GEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23188  		for b.Controls[0].Op == OpARM64CMPWconst {
 23189  			v_0 := b.Controls[0]
 23190  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23191  				break
 23192  			}
 23193  			z := v_0.Args[0]
 23194  			if z.Op != OpARM64MADDW {
 23195  				break
 23196  			}
 23197  			y := z.Args[2]
 23198  			a := z.Args[0]
 23199  			x := z.Args[1]
 23200  			if !(z.Uses == 1) {
 23201  				break
 23202  			}
 23203  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23204  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23205  			v1.AddArg2(x, y)
 23206  			v0.AddArg2(a, v1)
 23207  			b.resetWithControl(BlockARM64GEnoov, v0)
 23208  			return true
 23209  		}
 23210  		// match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23211  		// cond: z.Uses==1
 23212  		// result: (GEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23213  		for b.Controls[0].Op == OpARM64CMPWconst {
 23214  			v_0 := b.Controls[0]
 23215  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23216  				break
 23217  			}
 23218  			z := v_0.Args[0]
 23219  			if z.Op != OpARM64MSUBW {
 23220  				break
 23221  			}
 23222  			y := z.Args[2]
 23223  			a := z.Args[0]
 23224  			x := z.Args[1]
 23225  			if !(z.Uses == 1) {
 23226  				break
 23227  			}
 23228  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23229  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23230  			v1.AddArg2(x, y)
 23231  			v0.AddArg2(a, v1)
 23232  			b.resetWithControl(BlockARM64GEnoov, v0)
 23233  			return true
 23234  		}
 23235  		// match: (GE (CMPWconst [0] x) yes no)
 23236  		// result: (TBZ [31] x yes no)
 23237  		for b.Controls[0].Op == OpARM64CMPWconst {
 23238  			v_0 := b.Controls[0]
 23239  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23240  				break
 23241  			}
 23242  			x := v_0.Args[0]
 23243  			b.resetWithControl(BlockARM64TBZ, x)
 23244  			b.AuxInt = int64ToAuxInt(31)
 23245  			return true
 23246  		}
 23247  		// match: (GE (CMPconst [0] x) yes no)
 23248  		// result: (TBZ [63] x yes no)
 23249  		for b.Controls[0].Op == OpARM64CMPconst {
 23250  			v_0 := b.Controls[0]
 23251  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23252  				break
 23253  			}
 23254  			x := v_0.Args[0]
 23255  			b.resetWithControl(BlockARM64TBZ, x)
 23256  			b.AuxInt = int64ToAuxInt(63)
 23257  			return true
 23258  		}
 23259  		// match: (GE (FlagConstant [fc]) yes no)
 23260  		// cond: fc.ge()
 23261  		// result: (First yes no)
 23262  		for b.Controls[0].Op == OpARM64FlagConstant {
 23263  			v_0 := b.Controls[0]
 23264  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23265  			if !(fc.ge()) {
 23266  				break
 23267  			}
 23268  			b.Reset(BlockFirst)
 23269  			return true
 23270  		}
 23271  		// match: (GE (FlagConstant [fc]) yes no)
 23272  		// cond: !fc.ge()
 23273  		// result: (First no yes)
 23274  		for b.Controls[0].Op == OpARM64FlagConstant {
 23275  			v_0 := b.Controls[0]
 23276  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23277  			if !(!fc.ge()) {
 23278  				break
 23279  			}
 23280  			b.Reset(BlockFirst)
 23281  			b.swapSuccessors()
 23282  			return true
 23283  		}
 23284  		// match: (GE (InvertFlags cmp) yes no)
 23285  		// result: (LE cmp yes no)
 23286  		for b.Controls[0].Op == OpARM64InvertFlags {
 23287  			v_0 := b.Controls[0]
 23288  			cmp := v_0.Args[0]
 23289  			b.resetWithControl(BlockARM64LE, cmp)
 23290  			return true
 23291  		}
 23292  	case BlockARM64GEnoov:
 23293  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23294  		// cond: fc.geNoov()
 23295  		// result: (First yes no)
 23296  		for b.Controls[0].Op == OpARM64FlagConstant {
 23297  			v_0 := b.Controls[0]
 23298  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23299  			if !(fc.geNoov()) {
 23300  				break
 23301  			}
 23302  			b.Reset(BlockFirst)
 23303  			return true
 23304  		}
 23305  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23306  		// cond: !fc.geNoov()
 23307  		// result: (First no yes)
 23308  		for b.Controls[0].Op == OpARM64FlagConstant {
 23309  			v_0 := b.Controls[0]
 23310  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23311  			if !(!fc.geNoov()) {
 23312  				break
 23313  			}
 23314  			b.Reset(BlockFirst)
 23315  			b.swapSuccessors()
 23316  			return true
 23317  		}
 23318  		// match: (GEnoov (InvertFlags cmp) yes no)
 23319  		// result: (LEnoov cmp yes no)
 23320  		for b.Controls[0].Op == OpARM64InvertFlags {
 23321  			v_0 := b.Controls[0]
 23322  			cmp := v_0.Args[0]
 23323  			b.resetWithControl(BlockARM64LEnoov, cmp)
 23324  			return true
 23325  		}
 23326  	case BlockARM64GT:
 23327  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 23328  		// cond: z.Uses == 1
 23329  		// result: (GT (TST x y) yes no)
 23330  		for b.Controls[0].Op == OpARM64CMPconst {
 23331  			v_0 := b.Controls[0]
 23332  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23333  				break
 23334  			}
 23335  			z := v_0.Args[0]
 23336  			if z.Op != OpARM64AND {
 23337  				break
 23338  			}
 23339  			_ = z.Args[1]
 23340  			z_0 := z.Args[0]
 23341  			z_1 := z.Args[1]
 23342  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23343  				x := z_0
 23344  				y := z_1
 23345  				if !(z.Uses == 1) {
 23346  					continue
 23347  				}
 23348  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23349  				v0.AddArg2(x, y)
 23350  				b.resetWithControl(BlockARM64GT, v0)
 23351  				return true
 23352  			}
 23353  			break
 23354  		}
 23355  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23356  		// cond: x.Uses == 1
 23357  		// result: (GT (TSTconst [c] y) yes no)
 23358  		for b.Controls[0].Op == OpARM64CMPconst {
 23359  			v_0 := b.Controls[0]
 23360  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23361  				break
 23362  			}
 23363  			x := v_0.Args[0]
 23364  			if x.Op != OpARM64ANDconst {
 23365  				break
 23366  			}
 23367  			c := auxIntToInt64(x.AuxInt)
 23368  			y := x.Args[0]
 23369  			if !(x.Uses == 1) {
 23370  				break
 23371  			}
 23372  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23373  			v0.AuxInt = int64ToAuxInt(c)
 23374  			v0.AddArg(y)
 23375  			b.resetWithControl(BlockARM64GT, v0)
 23376  			return true
 23377  		}
 23378  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 23379  		// cond: z.Uses == 1
 23380  		// result: (GT (TSTW x y) yes no)
 23381  		for b.Controls[0].Op == OpARM64CMPWconst {
 23382  			v_0 := b.Controls[0]
 23383  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23384  				break
 23385  			}
 23386  			z := v_0.Args[0]
 23387  			if z.Op != OpARM64AND {
 23388  				break
 23389  			}
 23390  			_ = z.Args[1]
 23391  			z_0 := z.Args[0]
 23392  			z_1 := z.Args[1]
 23393  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23394  				x := z_0
 23395  				y := z_1
 23396  				if !(z.Uses == 1) {
 23397  					continue
 23398  				}
 23399  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23400  				v0.AddArg2(x, y)
 23401  				b.resetWithControl(BlockARM64GT, v0)
 23402  				return true
 23403  			}
 23404  			break
 23405  		}
 23406  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23407  		// cond: x.Uses == 1
 23408  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 23409  		for b.Controls[0].Op == OpARM64CMPWconst {
 23410  			v_0 := b.Controls[0]
 23411  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23412  				break
 23413  			}
 23414  			x := v_0.Args[0]
 23415  			if x.Op != OpARM64ANDconst {
 23416  				break
 23417  			}
 23418  			c := auxIntToInt64(x.AuxInt)
 23419  			y := x.Args[0]
 23420  			if !(x.Uses == 1) {
 23421  				break
 23422  			}
 23423  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23424  			v0.AuxInt = int32ToAuxInt(int32(c))
 23425  			v0.AddArg(y)
 23426  			b.resetWithControl(BlockARM64GT, v0)
 23427  			return true
 23428  		}
 23429  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23430  		// cond: x.Uses == 1
 23431  		// result: (GTnoov (CMNconst [c] y) yes no)
 23432  		for b.Controls[0].Op == OpARM64CMPconst {
 23433  			v_0 := b.Controls[0]
 23434  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23435  				break
 23436  			}
 23437  			x := v_0.Args[0]
 23438  			if x.Op != OpARM64ADDconst {
 23439  				break
 23440  			}
 23441  			c := auxIntToInt64(x.AuxInt)
 23442  			y := x.Args[0]
 23443  			if !(x.Uses == 1) {
 23444  				break
 23445  			}
 23446  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23447  			v0.AuxInt = int64ToAuxInt(c)
 23448  			v0.AddArg(y)
 23449  			b.resetWithControl(BlockARM64GTnoov, v0)
 23450  			return true
 23451  		}
 23452  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23453  		// cond: x.Uses == 1
 23454  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 23455  		for b.Controls[0].Op == OpARM64CMPWconst {
 23456  			v_0 := b.Controls[0]
 23457  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23458  				break
 23459  			}
 23460  			x := v_0.Args[0]
 23461  			if x.Op != OpARM64ADDconst {
 23462  				break
 23463  			}
 23464  			c := auxIntToInt64(x.AuxInt)
 23465  			y := x.Args[0]
 23466  			if !(x.Uses == 1) {
 23467  				break
 23468  			}
 23469  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23470  			v0.AuxInt = int32ToAuxInt(int32(c))
 23471  			v0.AddArg(y)
 23472  			b.resetWithControl(BlockARM64GTnoov, v0)
 23473  			return true
 23474  		}
 23475  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 23476  		// cond: z.Uses == 1
 23477  		// result: (GTnoov (CMN x y) yes no)
 23478  		for b.Controls[0].Op == OpARM64CMPconst {
 23479  			v_0 := b.Controls[0]
 23480  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23481  				break
 23482  			}
 23483  			z := v_0.Args[0]
 23484  			if z.Op != OpARM64ADD {
 23485  				break
 23486  			}
 23487  			_ = z.Args[1]
 23488  			z_0 := z.Args[0]
 23489  			z_1 := z.Args[1]
 23490  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23491  				x := z_0
 23492  				y := z_1
 23493  				if !(z.Uses == 1) {
 23494  					continue
 23495  				}
 23496  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23497  				v0.AddArg2(x, y)
 23498  				b.resetWithControl(BlockARM64GTnoov, v0)
 23499  				return true
 23500  			}
 23501  			break
 23502  		}
 23503  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 23504  		// cond: z.Uses == 1
 23505  		// result: (GTnoov (CMNW x y) yes no)
 23506  		for b.Controls[0].Op == OpARM64CMPWconst {
 23507  			v_0 := b.Controls[0]
 23508  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23509  				break
 23510  			}
 23511  			z := v_0.Args[0]
 23512  			if z.Op != OpARM64ADD {
 23513  				break
 23514  			}
 23515  			_ = z.Args[1]
 23516  			z_0 := z.Args[0]
 23517  			z_1 := z.Args[1]
 23518  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23519  				x := z_0
 23520  				y := z_1
 23521  				if !(z.Uses == 1) {
 23522  					continue
 23523  				}
 23524  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23525  				v0.AddArg2(x, y)
 23526  				b.resetWithControl(BlockARM64GTnoov, v0)
 23527  				return true
 23528  			}
 23529  			break
 23530  		}
 23531  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 23532  		// cond: z.Uses==1
 23533  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 23534  		for b.Controls[0].Op == OpARM64CMPconst {
 23535  			v_0 := b.Controls[0]
 23536  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23537  				break
 23538  			}
 23539  			z := v_0.Args[0]
 23540  			if z.Op != OpARM64MADD {
 23541  				break
 23542  			}
 23543  			y := z.Args[2]
 23544  			a := z.Args[0]
 23545  			x := z.Args[1]
 23546  			if !(z.Uses == 1) {
 23547  				break
 23548  			}
 23549  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23550  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23551  			v1.AddArg2(x, y)
 23552  			v0.AddArg2(a, v1)
 23553  			b.resetWithControl(BlockARM64GTnoov, v0)
 23554  			return true
 23555  		}
 23556  		// match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
 23557  		// cond: z.Uses==1
 23558  		// result: (GTnoov (CMP a (MUL <x.Type> x y)) yes no)
 23559  		for b.Controls[0].Op == OpARM64CMPconst {
 23560  			v_0 := b.Controls[0]
 23561  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23562  				break
 23563  			}
 23564  			z := v_0.Args[0]
 23565  			if z.Op != OpARM64MSUB {
 23566  				break
 23567  			}
 23568  			y := z.Args[2]
 23569  			a := z.Args[0]
 23570  			x := z.Args[1]
 23571  			if !(z.Uses == 1) {
 23572  				break
 23573  			}
 23574  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23575  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23576  			v1.AddArg2(x, y)
 23577  			v0.AddArg2(a, v1)
 23578  			b.resetWithControl(BlockARM64GTnoov, v0)
 23579  			return true
 23580  		}
 23581  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 23582  		// cond: z.Uses==1
 23583  		// result: (GTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23584  		for b.Controls[0].Op == OpARM64CMPWconst {
 23585  			v_0 := b.Controls[0]
 23586  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23587  				break
 23588  			}
 23589  			z := v_0.Args[0]
 23590  			if z.Op != OpARM64MADDW {
 23591  				break
 23592  			}
 23593  			y := z.Args[2]
 23594  			a := z.Args[0]
 23595  			x := z.Args[1]
 23596  			if !(z.Uses == 1) {
 23597  				break
 23598  			}
 23599  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23600  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23601  			v1.AddArg2(x, y)
 23602  			v0.AddArg2(a, v1)
 23603  			b.resetWithControl(BlockARM64GTnoov, v0)
 23604  			return true
 23605  		}
 23606  		// match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23607  		// cond: z.Uses==1
 23608  		// result: (GTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23609  		for b.Controls[0].Op == OpARM64CMPWconst {
 23610  			v_0 := b.Controls[0]
 23611  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23612  				break
 23613  			}
 23614  			z := v_0.Args[0]
 23615  			if z.Op != OpARM64MSUBW {
 23616  				break
 23617  			}
 23618  			y := z.Args[2]
 23619  			a := z.Args[0]
 23620  			x := z.Args[1]
 23621  			if !(z.Uses == 1) {
 23622  				break
 23623  			}
 23624  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23625  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23626  			v1.AddArg2(x, y)
 23627  			v0.AddArg2(a, v1)
 23628  			b.resetWithControl(BlockARM64GTnoov, v0)
 23629  			return true
 23630  		}
 23631  		// match: (GT (FlagConstant [fc]) yes no)
 23632  		// cond: fc.gt()
 23633  		// result: (First yes no)
 23634  		for b.Controls[0].Op == OpARM64FlagConstant {
 23635  			v_0 := b.Controls[0]
 23636  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23637  			if !(fc.gt()) {
 23638  				break
 23639  			}
 23640  			b.Reset(BlockFirst)
 23641  			return true
 23642  		}
 23643  		// match: (GT (FlagConstant [fc]) yes no)
 23644  		// cond: !fc.gt()
 23645  		// result: (First no yes)
 23646  		for b.Controls[0].Op == OpARM64FlagConstant {
 23647  			v_0 := b.Controls[0]
 23648  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23649  			if !(!fc.gt()) {
 23650  				break
 23651  			}
 23652  			b.Reset(BlockFirst)
 23653  			b.swapSuccessors()
 23654  			return true
 23655  		}
 23656  		// match: (GT (InvertFlags cmp) yes no)
 23657  		// result: (LT cmp yes no)
 23658  		for b.Controls[0].Op == OpARM64InvertFlags {
 23659  			v_0 := b.Controls[0]
 23660  			cmp := v_0.Args[0]
 23661  			b.resetWithControl(BlockARM64LT, cmp)
 23662  			return true
 23663  		}
 23664  	case BlockARM64GTnoov:
 23665  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23666  		// cond: fc.gtNoov()
 23667  		// result: (First yes no)
 23668  		for b.Controls[0].Op == OpARM64FlagConstant {
 23669  			v_0 := b.Controls[0]
 23670  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23671  			if !(fc.gtNoov()) {
 23672  				break
 23673  			}
 23674  			b.Reset(BlockFirst)
 23675  			return true
 23676  		}
 23677  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23678  		// cond: !fc.gtNoov()
 23679  		// result: (First no yes)
 23680  		for b.Controls[0].Op == OpARM64FlagConstant {
 23681  			v_0 := b.Controls[0]
 23682  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23683  			if !(!fc.gtNoov()) {
 23684  				break
 23685  			}
 23686  			b.Reset(BlockFirst)
 23687  			b.swapSuccessors()
 23688  			return true
 23689  		}
 23690  		// match: (GTnoov (InvertFlags cmp) yes no)
 23691  		// result: (LTnoov cmp yes no)
 23692  		for b.Controls[0].Op == OpARM64InvertFlags {
 23693  			v_0 := b.Controls[0]
 23694  			cmp := v_0.Args[0]
 23695  			b.resetWithControl(BlockARM64LTnoov, cmp)
 23696  			return true
 23697  		}
 23698  	case BlockIf:
 23699  		// match: (If (Equal cc) yes no)
 23700  		// result: (EQ cc yes no)
 23701  		for b.Controls[0].Op == OpARM64Equal {
 23702  			v_0 := b.Controls[0]
 23703  			cc := v_0.Args[0]
 23704  			b.resetWithControl(BlockARM64EQ, cc)
 23705  			return true
 23706  		}
 23707  		// match: (If (NotEqual cc) yes no)
 23708  		// result: (NE cc yes no)
 23709  		for b.Controls[0].Op == OpARM64NotEqual {
 23710  			v_0 := b.Controls[0]
 23711  			cc := v_0.Args[0]
 23712  			b.resetWithControl(BlockARM64NE, cc)
 23713  			return true
 23714  		}
 23715  		// match: (If (LessThan cc) yes no)
 23716  		// result: (LT cc yes no)
 23717  		for b.Controls[0].Op == OpARM64LessThan {
 23718  			v_0 := b.Controls[0]
 23719  			cc := v_0.Args[0]
 23720  			b.resetWithControl(BlockARM64LT, cc)
 23721  			return true
 23722  		}
 23723  		// match: (If (LessThanU cc) yes no)
 23724  		// result: (ULT cc yes no)
 23725  		for b.Controls[0].Op == OpARM64LessThanU {
 23726  			v_0 := b.Controls[0]
 23727  			cc := v_0.Args[0]
 23728  			b.resetWithControl(BlockARM64ULT, cc)
 23729  			return true
 23730  		}
 23731  		// match: (If (LessEqual cc) yes no)
 23732  		// result: (LE cc yes no)
 23733  		for b.Controls[0].Op == OpARM64LessEqual {
 23734  			v_0 := b.Controls[0]
 23735  			cc := v_0.Args[0]
 23736  			b.resetWithControl(BlockARM64LE, cc)
 23737  			return true
 23738  		}
 23739  		// match: (If (LessEqualU cc) yes no)
 23740  		// result: (ULE cc yes no)
 23741  		for b.Controls[0].Op == OpARM64LessEqualU {
 23742  			v_0 := b.Controls[0]
 23743  			cc := v_0.Args[0]
 23744  			b.resetWithControl(BlockARM64ULE, cc)
 23745  			return true
 23746  		}
 23747  		// match: (If (GreaterThan cc) yes no)
 23748  		// result: (GT cc yes no)
 23749  		for b.Controls[0].Op == OpARM64GreaterThan {
 23750  			v_0 := b.Controls[0]
 23751  			cc := v_0.Args[0]
 23752  			b.resetWithControl(BlockARM64GT, cc)
 23753  			return true
 23754  		}
 23755  		// match: (If (GreaterThanU cc) yes no)
 23756  		// result: (UGT cc yes no)
 23757  		for b.Controls[0].Op == OpARM64GreaterThanU {
 23758  			v_0 := b.Controls[0]
 23759  			cc := v_0.Args[0]
 23760  			b.resetWithControl(BlockARM64UGT, cc)
 23761  			return true
 23762  		}
 23763  		// match: (If (GreaterEqual cc) yes no)
 23764  		// result: (GE cc yes no)
 23765  		for b.Controls[0].Op == OpARM64GreaterEqual {
 23766  			v_0 := b.Controls[0]
 23767  			cc := v_0.Args[0]
 23768  			b.resetWithControl(BlockARM64GE, cc)
 23769  			return true
 23770  		}
 23771  		// match: (If (GreaterEqualU cc) yes no)
 23772  		// result: (UGE cc yes no)
 23773  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 23774  			v_0 := b.Controls[0]
 23775  			cc := v_0.Args[0]
 23776  			b.resetWithControl(BlockARM64UGE, cc)
 23777  			return true
 23778  		}
 23779  		// match: (If (LessThanF cc) yes no)
 23780  		// result: (FLT cc yes no)
 23781  		for b.Controls[0].Op == OpARM64LessThanF {
 23782  			v_0 := b.Controls[0]
 23783  			cc := v_0.Args[0]
 23784  			b.resetWithControl(BlockARM64FLT, cc)
 23785  			return true
 23786  		}
 23787  		// match: (If (LessEqualF cc) yes no)
 23788  		// result: (FLE cc yes no)
 23789  		for b.Controls[0].Op == OpARM64LessEqualF {
 23790  			v_0 := b.Controls[0]
 23791  			cc := v_0.Args[0]
 23792  			b.resetWithControl(BlockARM64FLE, cc)
 23793  			return true
 23794  		}
 23795  		// match: (If (GreaterThanF cc) yes no)
 23796  		// result: (FGT cc yes no)
 23797  		for b.Controls[0].Op == OpARM64GreaterThanF {
 23798  			v_0 := b.Controls[0]
 23799  			cc := v_0.Args[0]
 23800  			b.resetWithControl(BlockARM64FGT, cc)
 23801  			return true
 23802  		}
 23803  		// match: (If (GreaterEqualF cc) yes no)
 23804  		// result: (FGE cc yes no)
 23805  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 23806  			v_0 := b.Controls[0]
 23807  			cc := v_0.Args[0]
 23808  			b.resetWithControl(BlockARM64FGE, cc)
 23809  			return true
 23810  		}
 23811  		// match: (If cond yes no)
 23812  		// result: (TBNZ [0] cond yes no)
 23813  		for {
 23814  			cond := b.Controls[0]
 23815  			b.resetWithControl(BlockARM64TBNZ, cond)
 23816  			b.AuxInt = int64ToAuxInt(0)
 23817  			return true
 23818  		}
 23819  	case BlockJumpTable:
 23820  		// match: (JumpTable idx)
 23821  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 23822  		for {
 23823  			idx := b.Controls[0]
 23824  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 23825  			v0.Aux = symToAux(makeJumpTableSym(b))
 23826  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 23827  			v0.AddArg(v1)
 23828  			b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
 23829  			b.Aux = symToAux(makeJumpTableSym(b))
 23830  			return true
 23831  		}
 23832  	case BlockARM64LE:
 23833  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 23834  		// cond: z.Uses == 1
 23835  		// result: (LE (TST x y) yes no)
 23836  		for b.Controls[0].Op == OpARM64CMPconst {
 23837  			v_0 := b.Controls[0]
 23838  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23839  				break
 23840  			}
 23841  			z := v_0.Args[0]
 23842  			if z.Op != OpARM64AND {
 23843  				break
 23844  			}
 23845  			_ = z.Args[1]
 23846  			z_0 := z.Args[0]
 23847  			z_1 := z.Args[1]
 23848  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23849  				x := z_0
 23850  				y := z_1
 23851  				if !(z.Uses == 1) {
 23852  					continue
 23853  				}
 23854  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23855  				v0.AddArg2(x, y)
 23856  				b.resetWithControl(BlockARM64LE, v0)
 23857  				return true
 23858  			}
 23859  			break
 23860  		}
 23861  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23862  		// cond: x.Uses == 1
 23863  		// result: (LE (TSTconst [c] y) yes no)
 23864  		for b.Controls[0].Op == OpARM64CMPconst {
 23865  			v_0 := b.Controls[0]
 23866  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23867  				break
 23868  			}
 23869  			x := v_0.Args[0]
 23870  			if x.Op != OpARM64ANDconst {
 23871  				break
 23872  			}
 23873  			c := auxIntToInt64(x.AuxInt)
 23874  			y := x.Args[0]
 23875  			if !(x.Uses == 1) {
 23876  				break
 23877  			}
 23878  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23879  			v0.AuxInt = int64ToAuxInt(c)
 23880  			v0.AddArg(y)
 23881  			b.resetWithControl(BlockARM64LE, v0)
 23882  			return true
 23883  		}
 23884  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 23885  		// cond: z.Uses == 1
 23886  		// result: (LE (TSTW x y) yes no)
 23887  		for b.Controls[0].Op == OpARM64CMPWconst {
 23888  			v_0 := b.Controls[0]
 23889  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23890  				break
 23891  			}
 23892  			z := v_0.Args[0]
 23893  			if z.Op != OpARM64AND {
 23894  				break
 23895  			}
 23896  			_ = z.Args[1]
 23897  			z_0 := z.Args[0]
 23898  			z_1 := z.Args[1]
 23899  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23900  				x := z_0
 23901  				y := z_1
 23902  				if !(z.Uses == 1) {
 23903  					continue
 23904  				}
 23905  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23906  				v0.AddArg2(x, y)
 23907  				b.resetWithControl(BlockARM64LE, v0)
 23908  				return true
 23909  			}
 23910  			break
 23911  		}
 23912  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23913  		// cond: x.Uses == 1
 23914  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 23915  		for b.Controls[0].Op == OpARM64CMPWconst {
 23916  			v_0 := b.Controls[0]
 23917  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23918  				break
 23919  			}
 23920  			x := v_0.Args[0]
 23921  			if x.Op != OpARM64ANDconst {
 23922  				break
 23923  			}
 23924  			c := auxIntToInt64(x.AuxInt)
 23925  			y := x.Args[0]
 23926  			if !(x.Uses == 1) {
 23927  				break
 23928  			}
 23929  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23930  			v0.AuxInt = int32ToAuxInt(int32(c))
 23931  			v0.AddArg(y)
 23932  			b.resetWithControl(BlockARM64LE, v0)
 23933  			return true
 23934  		}
 23935  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23936  		// cond: x.Uses == 1
 23937  		// result: (LEnoov (CMNconst [c] y) yes no)
 23938  		for b.Controls[0].Op == OpARM64CMPconst {
 23939  			v_0 := b.Controls[0]
 23940  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23941  				break
 23942  			}
 23943  			x := v_0.Args[0]
 23944  			if x.Op != OpARM64ADDconst {
 23945  				break
 23946  			}
 23947  			c := auxIntToInt64(x.AuxInt)
 23948  			y := x.Args[0]
 23949  			if !(x.Uses == 1) {
 23950  				break
 23951  			}
 23952  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23953  			v0.AuxInt = int64ToAuxInt(c)
 23954  			v0.AddArg(y)
 23955  			b.resetWithControl(BlockARM64LEnoov, v0)
 23956  			return true
 23957  		}
 23958  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23959  		// cond: x.Uses == 1
 23960  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 23961  		for b.Controls[0].Op == OpARM64CMPWconst {
 23962  			v_0 := b.Controls[0]
 23963  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23964  				break
 23965  			}
 23966  			x := v_0.Args[0]
 23967  			if x.Op != OpARM64ADDconst {
 23968  				break
 23969  			}
 23970  			c := auxIntToInt64(x.AuxInt)
 23971  			y := x.Args[0]
 23972  			if !(x.Uses == 1) {
 23973  				break
 23974  			}
 23975  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23976  			v0.AuxInt = int32ToAuxInt(int32(c))
 23977  			v0.AddArg(y)
 23978  			b.resetWithControl(BlockARM64LEnoov, v0)
 23979  			return true
 23980  		}
 23981  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 23982  		// cond: z.Uses == 1
 23983  		// result: (LEnoov (CMN x y) yes no)
 23984  		for b.Controls[0].Op == OpARM64CMPconst {
 23985  			v_0 := b.Controls[0]
 23986  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23987  				break
 23988  			}
 23989  			z := v_0.Args[0]
 23990  			if z.Op != OpARM64ADD {
 23991  				break
 23992  			}
 23993  			_ = z.Args[1]
 23994  			z_0 := z.Args[0]
 23995  			z_1 := z.Args[1]
 23996  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23997  				x := z_0
 23998  				y := z_1
 23999  				if !(z.Uses == 1) {
 24000  					continue
 24001  				}
 24002  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24003  				v0.AddArg2(x, y)
 24004  				b.resetWithControl(BlockARM64LEnoov, v0)
 24005  				return true
 24006  			}
 24007  			break
 24008  		}
 24009  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 24010  		// cond: z.Uses == 1
 24011  		// result: (LEnoov (CMNW x y) yes no)
 24012  		for b.Controls[0].Op == OpARM64CMPWconst {
 24013  			v_0 := b.Controls[0]
 24014  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24015  				break
 24016  			}
 24017  			z := v_0.Args[0]
 24018  			if z.Op != OpARM64ADD {
 24019  				break
 24020  			}
 24021  			_ = z.Args[1]
 24022  			z_0 := z.Args[0]
 24023  			z_1 := z.Args[1]
 24024  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24025  				x := z_0
 24026  				y := z_1
 24027  				if !(z.Uses == 1) {
 24028  					continue
 24029  				}
 24030  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24031  				v0.AddArg2(x, y)
 24032  				b.resetWithControl(BlockARM64LEnoov, v0)
 24033  				return true
 24034  			}
 24035  			break
 24036  		}
 24037  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 24038  		// cond: z.Uses==1
 24039  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 24040  		for b.Controls[0].Op == OpARM64CMPconst {
 24041  			v_0 := b.Controls[0]
 24042  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24043  				break
 24044  			}
 24045  			z := v_0.Args[0]
 24046  			if z.Op != OpARM64MADD {
 24047  				break
 24048  			}
 24049  			y := z.Args[2]
 24050  			a := z.Args[0]
 24051  			x := z.Args[1]
 24052  			if !(z.Uses == 1) {
 24053  				break
 24054  			}
 24055  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24056  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24057  			v1.AddArg2(x, y)
 24058  			v0.AddArg2(a, v1)
 24059  			b.resetWithControl(BlockARM64LEnoov, v0)
 24060  			return true
 24061  		}
 24062  		// match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
 24063  		// cond: z.Uses==1
 24064  		// result: (LEnoov (CMP a (MUL <x.Type> x y)) yes no)
 24065  		for b.Controls[0].Op == OpARM64CMPconst {
 24066  			v_0 := b.Controls[0]
 24067  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24068  				break
 24069  			}
 24070  			z := v_0.Args[0]
 24071  			if z.Op != OpARM64MSUB {
 24072  				break
 24073  			}
 24074  			y := z.Args[2]
 24075  			a := z.Args[0]
 24076  			x := z.Args[1]
 24077  			if !(z.Uses == 1) {
 24078  				break
 24079  			}
 24080  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24081  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24082  			v1.AddArg2(x, y)
 24083  			v0.AddArg2(a, v1)
 24084  			b.resetWithControl(BlockARM64LEnoov, v0)
 24085  			return true
 24086  		}
 24087  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 24088  		// cond: z.Uses==1
 24089  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 24090  		for b.Controls[0].Op == OpARM64CMPWconst {
 24091  			v_0 := b.Controls[0]
 24092  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24093  				break
 24094  			}
 24095  			z := v_0.Args[0]
 24096  			if z.Op != OpARM64MADDW {
 24097  				break
 24098  			}
 24099  			y := z.Args[2]
 24100  			a := z.Args[0]
 24101  			x := z.Args[1]
 24102  			if !(z.Uses == 1) {
 24103  				break
 24104  			}
 24105  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24106  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24107  			v1.AddArg2(x, y)
 24108  			v0.AddArg2(a, v1)
 24109  			b.resetWithControl(BlockARM64LEnoov, v0)
 24110  			return true
 24111  		}
 24112  		// match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24113  		// cond: z.Uses==1
 24114  		// result: (LEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24115  		for b.Controls[0].Op == OpARM64CMPWconst {
 24116  			v_0 := b.Controls[0]
 24117  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24118  				break
 24119  			}
 24120  			z := v_0.Args[0]
 24121  			if z.Op != OpARM64MSUBW {
 24122  				break
 24123  			}
 24124  			y := z.Args[2]
 24125  			a := z.Args[0]
 24126  			x := z.Args[1]
 24127  			if !(z.Uses == 1) {
 24128  				break
 24129  			}
 24130  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24131  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24132  			v1.AddArg2(x, y)
 24133  			v0.AddArg2(a, v1)
 24134  			b.resetWithControl(BlockARM64LEnoov, v0)
 24135  			return true
 24136  		}
 24137  		// match: (LE (FlagConstant [fc]) yes no)
 24138  		// cond: fc.le()
 24139  		// result: (First yes no)
 24140  		for b.Controls[0].Op == OpARM64FlagConstant {
 24141  			v_0 := b.Controls[0]
 24142  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24143  			if !(fc.le()) {
 24144  				break
 24145  			}
 24146  			b.Reset(BlockFirst)
 24147  			return true
 24148  		}
 24149  		// match: (LE (FlagConstant [fc]) yes no)
 24150  		// cond: !fc.le()
 24151  		// result: (First no yes)
 24152  		for b.Controls[0].Op == OpARM64FlagConstant {
 24153  			v_0 := b.Controls[0]
 24154  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24155  			if !(!fc.le()) {
 24156  				break
 24157  			}
 24158  			b.Reset(BlockFirst)
 24159  			b.swapSuccessors()
 24160  			return true
 24161  		}
 24162  		// match: (LE (InvertFlags cmp) yes no)
 24163  		// result: (GE cmp yes no)
 24164  		for b.Controls[0].Op == OpARM64InvertFlags {
 24165  			v_0 := b.Controls[0]
 24166  			cmp := v_0.Args[0]
 24167  			b.resetWithControl(BlockARM64GE, cmp)
 24168  			return true
 24169  		}
 24170  	case BlockARM64LEnoov:
 24171  		// match: (LEnoov (FlagConstant [fc]) yes no)
 24172  		// cond: fc.leNoov()
 24173  		// result: (First yes no)
 24174  		for b.Controls[0].Op == OpARM64FlagConstant {
 24175  			v_0 := b.Controls[0]
 24176  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24177  			if !(fc.leNoov()) {
 24178  				break
 24179  			}
 24180  			b.Reset(BlockFirst)
 24181  			return true
 24182  		}
 24183  		// match: (LEnoov (FlagConstant [fc]) yes no)
 24184  		// cond: !fc.leNoov()
 24185  		// result: (First no yes)
 24186  		for b.Controls[0].Op == OpARM64FlagConstant {
 24187  			v_0 := b.Controls[0]
 24188  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24189  			if !(!fc.leNoov()) {
 24190  				break
 24191  			}
 24192  			b.Reset(BlockFirst)
 24193  			b.swapSuccessors()
 24194  			return true
 24195  		}
 24196  		// match: (LEnoov (InvertFlags cmp) yes no)
 24197  		// result: (GEnoov cmp yes no)
 24198  		for b.Controls[0].Op == OpARM64InvertFlags {
 24199  			v_0 := b.Controls[0]
 24200  			cmp := v_0.Args[0]
 24201  			b.resetWithControl(BlockARM64GEnoov, cmp)
 24202  			return true
 24203  		}
 24204  	case BlockARM64LT:
 24205  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 24206  		// cond: z.Uses == 1
 24207  		// result: (LT (TST x y) yes no)
 24208  		for b.Controls[0].Op == OpARM64CMPconst {
 24209  			v_0 := b.Controls[0]
 24210  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24211  				break
 24212  			}
 24213  			z := v_0.Args[0]
 24214  			if z.Op != OpARM64AND {
 24215  				break
 24216  			}
 24217  			_ = z.Args[1]
 24218  			z_0 := z.Args[0]
 24219  			z_1 := z.Args[1]
 24220  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24221  				x := z_0
 24222  				y := z_1
 24223  				if !(z.Uses == 1) {
 24224  					continue
 24225  				}
 24226  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24227  				v0.AddArg2(x, y)
 24228  				b.resetWithControl(BlockARM64LT, v0)
 24229  				return true
 24230  			}
 24231  			break
 24232  		}
 24233  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24234  		// cond: x.Uses == 1
 24235  		// result: (LT (TSTconst [c] y) yes no)
 24236  		for b.Controls[0].Op == OpARM64CMPconst {
 24237  			v_0 := b.Controls[0]
 24238  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24239  				break
 24240  			}
 24241  			x := v_0.Args[0]
 24242  			if x.Op != OpARM64ANDconst {
 24243  				break
 24244  			}
 24245  			c := auxIntToInt64(x.AuxInt)
 24246  			y := x.Args[0]
 24247  			if !(x.Uses == 1) {
 24248  				break
 24249  			}
 24250  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24251  			v0.AuxInt = int64ToAuxInt(c)
 24252  			v0.AddArg(y)
 24253  			b.resetWithControl(BlockARM64LT, v0)
 24254  			return true
 24255  		}
 24256  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 24257  		// cond: z.Uses == 1
 24258  		// result: (LT (TSTW x y) yes no)
 24259  		for b.Controls[0].Op == OpARM64CMPWconst {
 24260  			v_0 := b.Controls[0]
 24261  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24262  				break
 24263  			}
 24264  			z := v_0.Args[0]
 24265  			if z.Op != OpARM64AND {
 24266  				break
 24267  			}
 24268  			_ = z.Args[1]
 24269  			z_0 := z.Args[0]
 24270  			z_1 := z.Args[1]
 24271  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24272  				x := z_0
 24273  				y := z_1
 24274  				if !(z.Uses == 1) {
 24275  					continue
 24276  				}
 24277  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24278  				v0.AddArg2(x, y)
 24279  				b.resetWithControl(BlockARM64LT, v0)
 24280  				return true
 24281  			}
 24282  			break
 24283  		}
 24284  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24285  		// cond: x.Uses == 1
 24286  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 24287  		for b.Controls[0].Op == OpARM64CMPWconst {
 24288  			v_0 := b.Controls[0]
 24289  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24290  				break
 24291  			}
 24292  			x := v_0.Args[0]
 24293  			if x.Op != OpARM64ANDconst {
 24294  				break
 24295  			}
 24296  			c := auxIntToInt64(x.AuxInt)
 24297  			y := x.Args[0]
 24298  			if !(x.Uses == 1) {
 24299  				break
 24300  			}
 24301  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24302  			v0.AuxInt = int32ToAuxInt(int32(c))
 24303  			v0.AddArg(y)
 24304  			b.resetWithControl(BlockARM64LT, v0)
 24305  			return true
 24306  		}
 24307  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24308  		// cond: x.Uses == 1
 24309  		// result: (LTnoov (CMNconst [c] y) yes no)
 24310  		for b.Controls[0].Op == OpARM64CMPconst {
 24311  			v_0 := b.Controls[0]
 24312  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24313  				break
 24314  			}
 24315  			x := v_0.Args[0]
 24316  			if x.Op != OpARM64ADDconst {
 24317  				break
 24318  			}
 24319  			c := auxIntToInt64(x.AuxInt)
 24320  			y := x.Args[0]
 24321  			if !(x.Uses == 1) {
 24322  				break
 24323  			}
 24324  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24325  			v0.AuxInt = int64ToAuxInt(c)
 24326  			v0.AddArg(y)
 24327  			b.resetWithControl(BlockARM64LTnoov, v0)
 24328  			return true
 24329  		}
 24330  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24331  		// cond: x.Uses == 1
 24332  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 24333  		for b.Controls[0].Op == OpARM64CMPWconst {
 24334  			v_0 := b.Controls[0]
 24335  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24336  				break
 24337  			}
 24338  			x := v_0.Args[0]
 24339  			if x.Op != OpARM64ADDconst {
 24340  				break
 24341  			}
 24342  			c := auxIntToInt64(x.AuxInt)
 24343  			y := x.Args[0]
 24344  			if !(x.Uses == 1) {
 24345  				break
 24346  			}
 24347  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24348  			v0.AuxInt = int32ToAuxInt(int32(c))
 24349  			v0.AddArg(y)
 24350  			b.resetWithControl(BlockARM64LTnoov, v0)
 24351  			return true
 24352  		}
 24353  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 24354  		// cond: z.Uses == 1
 24355  		// result: (LTnoov (CMN x y) yes no)
 24356  		for b.Controls[0].Op == OpARM64CMPconst {
 24357  			v_0 := b.Controls[0]
 24358  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24359  				break
 24360  			}
 24361  			z := v_0.Args[0]
 24362  			if z.Op != OpARM64ADD {
 24363  				break
 24364  			}
 24365  			_ = z.Args[1]
 24366  			z_0 := z.Args[0]
 24367  			z_1 := z.Args[1]
 24368  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24369  				x := z_0
 24370  				y := z_1
 24371  				if !(z.Uses == 1) {
 24372  					continue
 24373  				}
 24374  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24375  				v0.AddArg2(x, y)
 24376  				b.resetWithControl(BlockARM64LTnoov, v0)
 24377  				return true
 24378  			}
 24379  			break
 24380  		}
 24381  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 24382  		// cond: z.Uses == 1
 24383  		// result: (LTnoov (CMNW x y) yes no)
 24384  		for b.Controls[0].Op == OpARM64CMPWconst {
 24385  			v_0 := b.Controls[0]
 24386  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24387  				break
 24388  			}
 24389  			z := v_0.Args[0]
 24390  			if z.Op != OpARM64ADD {
 24391  				break
 24392  			}
 24393  			_ = z.Args[1]
 24394  			z_0 := z.Args[0]
 24395  			z_1 := z.Args[1]
 24396  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24397  				x := z_0
 24398  				y := z_1
 24399  				if !(z.Uses == 1) {
 24400  					continue
 24401  				}
 24402  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24403  				v0.AddArg2(x, y)
 24404  				b.resetWithControl(BlockARM64LTnoov, v0)
 24405  				return true
 24406  			}
 24407  			break
 24408  		}
 24409  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 24410  		// cond: z.Uses==1
 24411  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 24412  		for b.Controls[0].Op == OpARM64CMPconst {
 24413  			v_0 := b.Controls[0]
 24414  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24415  				break
 24416  			}
 24417  			z := v_0.Args[0]
 24418  			if z.Op != OpARM64MADD {
 24419  				break
 24420  			}
 24421  			y := z.Args[2]
 24422  			a := z.Args[0]
 24423  			x := z.Args[1]
 24424  			if !(z.Uses == 1) {
 24425  				break
 24426  			}
 24427  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24428  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24429  			v1.AddArg2(x, y)
 24430  			v0.AddArg2(a, v1)
 24431  			b.resetWithControl(BlockARM64LTnoov, v0)
 24432  			return true
 24433  		}
 24434  		// match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
 24435  		// cond: z.Uses==1
 24436  		// result: (LTnoov (CMP a (MUL <x.Type> x y)) yes no)
 24437  		for b.Controls[0].Op == OpARM64CMPconst {
 24438  			v_0 := b.Controls[0]
 24439  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24440  				break
 24441  			}
 24442  			z := v_0.Args[0]
 24443  			if z.Op != OpARM64MSUB {
 24444  				break
 24445  			}
 24446  			y := z.Args[2]
 24447  			a := z.Args[0]
 24448  			x := z.Args[1]
 24449  			if !(z.Uses == 1) {
 24450  				break
 24451  			}
 24452  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24453  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24454  			v1.AddArg2(x, y)
 24455  			v0.AddArg2(a, v1)
 24456  			b.resetWithControl(BlockARM64LTnoov, v0)
 24457  			return true
 24458  		}
 24459  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 24460  		// cond: z.Uses==1
 24461  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 24462  		for b.Controls[0].Op == OpARM64CMPWconst {
 24463  			v_0 := b.Controls[0]
 24464  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24465  				break
 24466  			}
 24467  			z := v_0.Args[0]
 24468  			if z.Op != OpARM64MADDW {
 24469  				break
 24470  			}
 24471  			y := z.Args[2]
 24472  			a := z.Args[0]
 24473  			x := z.Args[1]
 24474  			if !(z.Uses == 1) {
 24475  				break
 24476  			}
 24477  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24478  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24479  			v1.AddArg2(x, y)
 24480  			v0.AddArg2(a, v1)
 24481  			b.resetWithControl(BlockARM64LTnoov, v0)
 24482  			return true
 24483  		}
 24484  		// match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24485  		// cond: z.Uses==1
 24486  		// result: (LTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24487  		for b.Controls[0].Op == OpARM64CMPWconst {
 24488  			v_0 := b.Controls[0]
 24489  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24490  				break
 24491  			}
 24492  			z := v_0.Args[0]
 24493  			if z.Op != OpARM64MSUBW {
 24494  				break
 24495  			}
 24496  			y := z.Args[2]
 24497  			a := z.Args[0]
 24498  			x := z.Args[1]
 24499  			if !(z.Uses == 1) {
 24500  				break
 24501  			}
 24502  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24503  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24504  			v1.AddArg2(x, y)
 24505  			v0.AddArg2(a, v1)
 24506  			b.resetWithControl(BlockARM64LTnoov, v0)
 24507  			return true
 24508  		}
 24509  		// match: (LT (CMPWconst [0] x) yes no)
 24510  		// result: (TBNZ [31] x yes no)
 24511  		for b.Controls[0].Op == OpARM64CMPWconst {
 24512  			v_0 := b.Controls[0]
 24513  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24514  				break
 24515  			}
 24516  			x := v_0.Args[0]
 24517  			b.resetWithControl(BlockARM64TBNZ, x)
 24518  			b.AuxInt = int64ToAuxInt(31)
 24519  			return true
 24520  		}
 24521  		// match: (LT (CMPconst [0] x) yes no)
 24522  		// result: (TBNZ [63] x yes no)
 24523  		for b.Controls[0].Op == OpARM64CMPconst {
 24524  			v_0 := b.Controls[0]
 24525  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24526  				break
 24527  			}
 24528  			x := v_0.Args[0]
 24529  			b.resetWithControl(BlockARM64TBNZ, x)
 24530  			b.AuxInt = int64ToAuxInt(63)
 24531  			return true
 24532  		}
 24533  		// match: (LT (FlagConstant [fc]) yes no)
 24534  		// cond: fc.lt()
 24535  		// result: (First yes no)
 24536  		for b.Controls[0].Op == OpARM64FlagConstant {
 24537  			v_0 := b.Controls[0]
 24538  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24539  			if !(fc.lt()) {
 24540  				break
 24541  			}
 24542  			b.Reset(BlockFirst)
 24543  			return true
 24544  		}
 24545  		// match: (LT (FlagConstant [fc]) yes no)
 24546  		// cond: !fc.lt()
 24547  		// result: (First no yes)
 24548  		for b.Controls[0].Op == OpARM64FlagConstant {
 24549  			v_0 := b.Controls[0]
 24550  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24551  			if !(!fc.lt()) {
 24552  				break
 24553  			}
 24554  			b.Reset(BlockFirst)
 24555  			b.swapSuccessors()
 24556  			return true
 24557  		}
 24558  		// match: (LT (InvertFlags cmp) yes no)
 24559  		// result: (GT cmp yes no)
 24560  		for b.Controls[0].Op == OpARM64InvertFlags {
 24561  			v_0 := b.Controls[0]
 24562  			cmp := v_0.Args[0]
 24563  			b.resetWithControl(BlockARM64GT, cmp)
 24564  			return true
 24565  		}
 24566  	case BlockARM64LTnoov:
 24567  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24568  		// cond: fc.ltNoov()
 24569  		// result: (First yes no)
 24570  		for b.Controls[0].Op == OpARM64FlagConstant {
 24571  			v_0 := b.Controls[0]
 24572  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24573  			if !(fc.ltNoov()) {
 24574  				break
 24575  			}
 24576  			b.Reset(BlockFirst)
 24577  			return true
 24578  		}
 24579  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24580  		// cond: !fc.ltNoov()
 24581  		// result: (First no yes)
 24582  		for b.Controls[0].Op == OpARM64FlagConstant {
 24583  			v_0 := b.Controls[0]
 24584  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24585  			if !(!fc.ltNoov()) {
 24586  				break
 24587  			}
 24588  			b.Reset(BlockFirst)
 24589  			b.swapSuccessors()
 24590  			return true
 24591  		}
 24592  		// match: (LTnoov (InvertFlags cmp) yes no)
 24593  		// result: (GTnoov cmp yes no)
 24594  		for b.Controls[0].Op == OpARM64InvertFlags {
 24595  			v_0 := b.Controls[0]
 24596  			cmp := v_0.Args[0]
 24597  			b.resetWithControl(BlockARM64GTnoov, cmp)
 24598  			return true
 24599  		}
 24600  	case BlockARM64NE:
 24601  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 24602  		// cond: z.Uses == 1
 24603  		// result: (NE (TST x y) yes no)
 24604  		for b.Controls[0].Op == OpARM64CMPconst {
 24605  			v_0 := b.Controls[0]
 24606  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24607  				break
 24608  			}
 24609  			z := v_0.Args[0]
 24610  			if z.Op != OpARM64AND {
 24611  				break
 24612  			}
 24613  			_ = z.Args[1]
 24614  			z_0 := z.Args[0]
 24615  			z_1 := z.Args[1]
 24616  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24617  				x := z_0
 24618  				y := z_1
 24619  				if !(z.Uses == 1) {
 24620  					continue
 24621  				}
 24622  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24623  				v0.AddArg2(x, y)
 24624  				b.resetWithControl(BlockARM64NE, v0)
 24625  				return true
 24626  			}
 24627  			break
 24628  		}
 24629  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24630  		// cond: x.Uses == 1
 24631  		// result: (NE (TSTconst [c] y) yes no)
 24632  		for b.Controls[0].Op == OpARM64CMPconst {
 24633  			v_0 := b.Controls[0]
 24634  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24635  				break
 24636  			}
 24637  			x := v_0.Args[0]
 24638  			if x.Op != OpARM64ANDconst {
 24639  				break
 24640  			}
 24641  			c := auxIntToInt64(x.AuxInt)
 24642  			y := x.Args[0]
 24643  			if !(x.Uses == 1) {
 24644  				break
 24645  			}
 24646  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24647  			v0.AuxInt = int64ToAuxInt(c)
 24648  			v0.AddArg(y)
 24649  			b.resetWithControl(BlockARM64NE, v0)
 24650  			return true
 24651  		}
 24652  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 24653  		// cond: z.Uses == 1
 24654  		// result: (NE (TSTW x y) yes no)
 24655  		for b.Controls[0].Op == OpARM64CMPWconst {
 24656  			v_0 := b.Controls[0]
 24657  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24658  				break
 24659  			}
 24660  			z := v_0.Args[0]
 24661  			if z.Op != OpARM64AND {
 24662  				break
 24663  			}
 24664  			_ = z.Args[1]
 24665  			z_0 := z.Args[0]
 24666  			z_1 := z.Args[1]
 24667  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24668  				x := z_0
 24669  				y := z_1
 24670  				if !(z.Uses == 1) {
 24671  					continue
 24672  				}
 24673  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24674  				v0.AddArg2(x, y)
 24675  				b.resetWithControl(BlockARM64NE, v0)
 24676  				return true
 24677  			}
 24678  			break
 24679  		}
 24680  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24681  		// cond: x.Uses == 1
 24682  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 24683  		for b.Controls[0].Op == OpARM64CMPWconst {
 24684  			v_0 := b.Controls[0]
 24685  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24686  				break
 24687  			}
 24688  			x := v_0.Args[0]
 24689  			if x.Op != OpARM64ANDconst {
 24690  				break
 24691  			}
 24692  			c := auxIntToInt64(x.AuxInt)
 24693  			y := x.Args[0]
 24694  			if !(x.Uses == 1) {
 24695  				break
 24696  			}
 24697  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24698  			v0.AuxInt = int32ToAuxInt(int32(c))
 24699  			v0.AddArg(y)
 24700  			b.resetWithControl(BlockARM64NE, v0)
 24701  			return true
 24702  		}
 24703  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24704  		// cond: x.Uses == 1
 24705  		// result: (NE (CMNconst [c] y) yes no)
 24706  		for b.Controls[0].Op == OpARM64CMPconst {
 24707  			v_0 := b.Controls[0]
 24708  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24709  				break
 24710  			}
 24711  			x := v_0.Args[0]
 24712  			if x.Op != OpARM64ADDconst {
 24713  				break
 24714  			}
 24715  			c := auxIntToInt64(x.AuxInt)
 24716  			y := x.Args[0]
 24717  			if !(x.Uses == 1) {
 24718  				break
 24719  			}
 24720  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24721  			v0.AuxInt = int64ToAuxInt(c)
 24722  			v0.AddArg(y)
 24723  			b.resetWithControl(BlockARM64NE, v0)
 24724  			return true
 24725  		}
 24726  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24727  		// cond: x.Uses == 1
 24728  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 24729  		for b.Controls[0].Op == OpARM64CMPWconst {
 24730  			v_0 := b.Controls[0]
 24731  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24732  				break
 24733  			}
 24734  			x := v_0.Args[0]
 24735  			if x.Op != OpARM64ADDconst {
 24736  				break
 24737  			}
 24738  			c := auxIntToInt64(x.AuxInt)
 24739  			y := x.Args[0]
 24740  			if !(x.Uses == 1) {
 24741  				break
 24742  			}
 24743  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24744  			v0.AuxInt = int32ToAuxInt(int32(c))
 24745  			v0.AddArg(y)
 24746  			b.resetWithControl(BlockARM64NE, v0)
 24747  			return true
 24748  		}
 24749  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 24750  		// cond: z.Uses == 1
 24751  		// result: (NE (CMN x y) yes no)
 24752  		for b.Controls[0].Op == OpARM64CMPconst {
 24753  			v_0 := b.Controls[0]
 24754  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24755  				break
 24756  			}
 24757  			z := v_0.Args[0]
 24758  			if z.Op != OpARM64ADD {
 24759  				break
 24760  			}
 24761  			_ = z.Args[1]
 24762  			z_0 := z.Args[0]
 24763  			z_1 := z.Args[1]
 24764  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24765  				x := z_0
 24766  				y := z_1
 24767  				if !(z.Uses == 1) {
 24768  					continue
 24769  				}
 24770  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24771  				v0.AddArg2(x, y)
 24772  				b.resetWithControl(BlockARM64NE, v0)
 24773  				return true
 24774  			}
 24775  			break
 24776  		}
 24777  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 24778  		// cond: z.Uses == 1
 24779  		// result: (NE (CMNW x y) yes no)
 24780  		for b.Controls[0].Op == OpARM64CMPWconst {
 24781  			v_0 := b.Controls[0]
 24782  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24783  				break
 24784  			}
 24785  			z := v_0.Args[0]
 24786  			if z.Op != OpARM64ADD {
 24787  				break
 24788  			}
 24789  			_ = z.Args[1]
 24790  			z_0 := z.Args[0]
 24791  			z_1 := z.Args[1]
 24792  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24793  				x := z_0
 24794  				y := z_1
 24795  				if !(z.Uses == 1) {
 24796  					continue
 24797  				}
 24798  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24799  				v0.AddArg2(x, y)
 24800  				b.resetWithControl(BlockARM64NE, v0)
 24801  				return true
 24802  			}
 24803  			break
 24804  		}
 24805  		// match: (NE (CMP x z:(NEG y)) yes no)
 24806  		// cond: z.Uses == 1
 24807  		// result: (NE (CMN x y) yes no)
 24808  		for b.Controls[0].Op == OpARM64CMP {
 24809  			v_0 := b.Controls[0]
 24810  			_ = v_0.Args[1]
 24811  			x := v_0.Args[0]
 24812  			z := v_0.Args[1]
 24813  			if z.Op != OpARM64NEG {
 24814  				break
 24815  			}
 24816  			y := z.Args[0]
 24817  			if !(z.Uses == 1) {
 24818  				break
 24819  			}
 24820  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24821  			v0.AddArg2(x, y)
 24822  			b.resetWithControl(BlockARM64NE, v0)
 24823  			return true
 24824  		}
 24825  		// match: (NE (CMPW x z:(NEG y)) yes no)
 24826  		// cond: z.Uses == 1
 24827  		// result: (NE (CMNW x y) yes no)
 24828  		for b.Controls[0].Op == OpARM64CMPW {
 24829  			v_0 := b.Controls[0]
 24830  			_ = v_0.Args[1]
 24831  			x := v_0.Args[0]
 24832  			z := v_0.Args[1]
 24833  			if z.Op != OpARM64NEG {
 24834  				break
 24835  			}
 24836  			y := z.Args[0]
 24837  			if !(z.Uses == 1) {
 24838  				break
 24839  			}
 24840  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24841  			v0.AddArg2(x, y)
 24842  			b.resetWithControl(BlockARM64NE, v0)
 24843  			return true
 24844  		}
 24845  		// match: (NE (CMPconst [0] x) yes no)
 24846  		// result: (NZ x yes no)
 24847  		for b.Controls[0].Op == OpARM64CMPconst {
 24848  			v_0 := b.Controls[0]
 24849  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24850  				break
 24851  			}
 24852  			x := v_0.Args[0]
 24853  			b.resetWithControl(BlockARM64NZ, x)
 24854  			return true
 24855  		}
 24856  		// match: (NE (CMPWconst [0] x) yes no)
 24857  		// result: (NZW x yes no)
 24858  		for b.Controls[0].Op == OpARM64CMPWconst {
 24859  			v_0 := b.Controls[0]
 24860  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24861  				break
 24862  			}
 24863  			x := v_0.Args[0]
 24864  			b.resetWithControl(BlockARM64NZW, x)
 24865  			return true
 24866  		}
 24867  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 24868  		// cond: z.Uses==1
 24869  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 24870  		for b.Controls[0].Op == OpARM64CMPconst {
 24871  			v_0 := b.Controls[0]
 24872  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24873  				break
 24874  			}
 24875  			z := v_0.Args[0]
 24876  			if z.Op != OpARM64MADD {
 24877  				break
 24878  			}
 24879  			y := z.Args[2]
 24880  			a := z.Args[0]
 24881  			x := z.Args[1]
 24882  			if !(z.Uses == 1) {
 24883  				break
 24884  			}
 24885  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24886  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24887  			v1.AddArg2(x, y)
 24888  			v0.AddArg2(a, v1)
 24889  			b.resetWithControl(BlockARM64NE, v0)
 24890  			return true
 24891  		}
 24892  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 24893  		// cond: z.Uses==1
 24894  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 24895  		for b.Controls[0].Op == OpARM64CMPconst {
 24896  			v_0 := b.Controls[0]
 24897  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24898  				break
 24899  			}
 24900  			z := v_0.Args[0]
 24901  			if z.Op != OpARM64MSUB {
 24902  				break
 24903  			}
 24904  			y := z.Args[2]
 24905  			a := z.Args[0]
 24906  			x := z.Args[1]
 24907  			if !(z.Uses == 1) {
 24908  				break
 24909  			}
 24910  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24911  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24912  			v1.AddArg2(x, y)
 24913  			v0.AddArg2(a, v1)
 24914  			b.resetWithControl(BlockARM64NE, v0)
 24915  			return true
 24916  		}
 24917  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 24918  		// cond: z.Uses==1
 24919  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 24920  		for b.Controls[0].Op == OpARM64CMPWconst {
 24921  			v_0 := b.Controls[0]
 24922  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24923  				break
 24924  			}
 24925  			z := v_0.Args[0]
 24926  			if z.Op != OpARM64MADDW {
 24927  				break
 24928  			}
 24929  			y := z.Args[2]
 24930  			a := z.Args[0]
 24931  			x := z.Args[1]
 24932  			if !(z.Uses == 1) {
 24933  				break
 24934  			}
 24935  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24936  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24937  			v1.AddArg2(x, y)
 24938  			v0.AddArg2(a, v1)
 24939  			b.resetWithControl(BlockARM64NE, v0)
 24940  			return true
 24941  		}
 24942  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24943  		// cond: z.Uses==1
 24944  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 24945  		for b.Controls[0].Op == OpARM64CMPWconst {
 24946  			v_0 := b.Controls[0]
 24947  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24948  				break
 24949  			}
 24950  			z := v_0.Args[0]
 24951  			if z.Op != OpARM64MSUBW {
 24952  				break
 24953  			}
 24954  			y := z.Args[2]
 24955  			a := z.Args[0]
 24956  			x := z.Args[1]
 24957  			if !(z.Uses == 1) {
 24958  				break
 24959  			}
 24960  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24961  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24962  			v1.AddArg2(x, y)
 24963  			v0.AddArg2(a, v1)
 24964  			b.resetWithControl(BlockARM64NE, v0)
 24965  			return true
 24966  		}
 24967  		// match: (NE (TSTconst [c] x) yes no)
 24968  		// cond: oneBit(c)
 24969  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 24970  		for b.Controls[0].Op == OpARM64TSTconst {
 24971  			v_0 := b.Controls[0]
 24972  			c := auxIntToInt64(v_0.AuxInt)
 24973  			x := v_0.Args[0]
 24974  			if !(oneBit(c)) {
 24975  				break
 24976  			}
 24977  			b.resetWithControl(BlockARM64TBNZ, x)
 24978  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 24979  			return true
 24980  		}
 24981  		// match: (NE (TSTWconst [c] x) yes no)
 24982  		// cond: oneBit(int64(uint32(c)))
 24983  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 24984  		for b.Controls[0].Op == OpARM64TSTWconst {
 24985  			v_0 := b.Controls[0]
 24986  			c := auxIntToInt32(v_0.AuxInt)
 24987  			x := v_0.Args[0]
 24988  			if !(oneBit(int64(uint32(c)))) {
 24989  				break
 24990  			}
 24991  			b.resetWithControl(BlockARM64TBNZ, x)
 24992  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 24993  			return true
 24994  		}
 24995  		// match: (NE (FlagConstant [fc]) yes no)
 24996  		// cond: fc.ne()
 24997  		// result: (First yes no)
 24998  		for b.Controls[0].Op == OpARM64FlagConstant {
 24999  			v_0 := b.Controls[0]
 25000  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25001  			if !(fc.ne()) {
 25002  				break
 25003  			}
 25004  			b.Reset(BlockFirst)
 25005  			return true
 25006  		}
 25007  		// match: (NE (FlagConstant [fc]) yes no)
 25008  		// cond: !fc.ne()
 25009  		// result: (First no yes)
 25010  		for b.Controls[0].Op == OpARM64FlagConstant {
 25011  			v_0 := b.Controls[0]
 25012  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25013  			if !(!fc.ne()) {
 25014  				break
 25015  			}
 25016  			b.Reset(BlockFirst)
 25017  			b.swapSuccessors()
 25018  			return true
 25019  		}
 25020  		// match: (NE (InvertFlags cmp) yes no)
 25021  		// result: (NE cmp yes no)
 25022  		for b.Controls[0].Op == OpARM64InvertFlags {
 25023  			v_0 := b.Controls[0]
 25024  			cmp := v_0.Args[0]
 25025  			b.resetWithControl(BlockARM64NE, cmp)
 25026  			return true
 25027  		}
 25028  	case BlockARM64NZ:
 25029  		// match: (NZ (Equal cc) yes no)
 25030  		// result: (EQ cc yes no)
 25031  		for b.Controls[0].Op == OpARM64Equal {
 25032  			v_0 := b.Controls[0]
 25033  			cc := v_0.Args[0]
 25034  			b.resetWithControl(BlockARM64EQ, cc)
 25035  			return true
 25036  		}
 25037  		// match: (NZ (NotEqual cc) yes no)
 25038  		// result: (NE cc yes no)
 25039  		for b.Controls[0].Op == OpARM64NotEqual {
 25040  			v_0 := b.Controls[0]
 25041  			cc := v_0.Args[0]
 25042  			b.resetWithControl(BlockARM64NE, cc)
 25043  			return true
 25044  		}
 25045  		// match: (NZ (LessThan cc) yes no)
 25046  		// result: (LT cc yes no)
 25047  		for b.Controls[0].Op == OpARM64LessThan {
 25048  			v_0 := b.Controls[0]
 25049  			cc := v_0.Args[0]
 25050  			b.resetWithControl(BlockARM64LT, cc)
 25051  			return true
 25052  		}
 25053  		// match: (NZ (LessThanU cc) yes no)
 25054  		// result: (ULT cc yes no)
 25055  		for b.Controls[0].Op == OpARM64LessThanU {
 25056  			v_0 := b.Controls[0]
 25057  			cc := v_0.Args[0]
 25058  			b.resetWithControl(BlockARM64ULT, cc)
 25059  			return true
 25060  		}
 25061  		// match: (NZ (LessEqual cc) yes no)
 25062  		// result: (LE cc yes no)
 25063  		for b.Controls[0].Op == OpARM64LessEqual {
 25064  			v_0 := b.Controls[0]
 25065  			cc := v_0.Args[0]
 25066  			b.resetWithControl(BlockARM64LE, cc)
 25067  			return true
 25068  		}
 25069  		// match: (NZ (LessEqualU cc) yes no)
 25070  		// result: (ULE cc yes no)
 25071  		for b.Controls[0].Op == OpARM64LessEqualU {
 25072  			v_0 := b.Controls[0]
 25073  			cc := v_0.Args[0]
 25074  			b.resetWithControl(BlockARM64ULE, cc)
 25075  			return true
 25076  		}
 25077  		// match: (NZ (GreaterThan cc) yes no)
 25078  		// result: (GT cc yes no)
 25079  		for b.Controls[0].Op == OpARM64GreaterThan {
 25080  			v_0 := b.Controls[0]
 25081  			cc := v_0.Args[0]
 25082  			b.resetWithControl(BlockARM64GT, cc)
 25083  			return true
 25084  		}
 25085  		// match: (NZ (GreaterThanU cc) yes no)
 25086  		// result: (UGT cc yes no)
 25087  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25088  			v_0 := b.Controls[0]
 25089  			cc := v_0.Args[0]
 25090  			b.resetWithControl(BlockARM64UGT, cc)
 25091  			return true
 25092  		}
 25093  		// match: (NZ (GreaterEqual cc) yes no)
 25094  		// result: (GE cc yes no)
 25095  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25096  			v_0 := b.Controls[0]
 25097  			cc := v_0.Args[0]
 25098  			b.resetWithControl(BlockARM64GE, cc)
 25099  			return true
 25100  		}
 25101  		// match: (NZ (GreaterEqualU cc) yes no)
 25102  		// result: (UGE cc yes no)
 25103  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25104  			v_0 := b.Controls[0]
 25105  			cc := v_0.Args[0]
 25106  			b.resetWithControl(BlockARM64UGE, cc)
 25107  			return true
 25108  		}
 25109  		// match: (NZ (LessThanF cc) yes no)
 25110  		// result: (FLT cc yes no)
 25111  		for b.Controls[0].Op == OpARM64LessThanF {
 25112  			v_0 := b.Controls[0]
 25113  			cc := v_0.Args[0]
 25114  			b.resetWithControl(BlockARM64FLT, cc)
 25115  			return true
 25116  		}
 25117  		// match: (NZ (LessEqualF cc) yes no)
 25118  		// result: (FLE cc yes no)
 25119  		for b.Controls[0].Op == OpARM64LessEqualF {
 25120  			v_0 := b.Controls[0]
 25121  			cc := v_0.Args[0]
 25122  			b.resetWithControl(BlockARM64FLE, cc)
 25123  			return true
 25124  		}
 25125  		// match: (NZ (GreaterThanF cc) yes no)
 25126  		// result: (FGT cc yes no)
 25127  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25128  			v_0 := b.Controls[0]
 25129  			cc := v_0.Args[0]
 25130  			b.resetWithControl(BlockARM64FGT, cc)
 25131  			return true
 25132  		}
 25133  		// match: (NZ (GreaterEqualF cc) yes no)
 25134  		// result: (FGE cc yes no)
 25135  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25136  			v_0 := b.Controls[0]
 25137  			cc := v_0.Args[0]
 25138  			b.resetWithControl(BlockARM64FGE, cc)
 25139  			return true
 25140  		}
 25141  		// match: (NZ sub:(SUB x y))
 25142  		// cond: sub.Uses == 1
 25143  		// result: (NE (CMP x y))
 25144  		for b.Controls[0].Op == OpARM64SUB {
 25145  			sub := b.Controls[0]
 25146  			y := sub.Args[1]
 25147  			x := sub.Args[0]
 25148  			if !(sub.Uses == 1) {
 25149  				break
 25150  			}
 25151  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 25152  			v0.AddArg2(x, y)
 25153  			b.resetWithControl(BlockARM64NE, v0)
 25154  			return true
 25155  		}
 25156  		// match: (NZ sub:(SUBconst [c] y))
 25157  		// cond: sub.Uses == 1
 25158  		// result: (NE (CMPconst [c] y))
 25159  		for b.Controls[0].Op == OpARM64SUBconst {
 25160  			sub := b.Controls[0]
 25161  			c := auxIntToInt64(sub.AuxInt)
 25162  			y := sub.Args[0]
 25163  			if !(sub.Uses == 1) {
 25164  				break
 25165  			}
 25166  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 25167  			v0.AuxInt = int64ToAuxInt(c)
 25168  			v0.AddArg(y)
 25169  			b.resetWithControl(BlockARM64NE, v0)
 25170  			return true
 25171  		}
 25172  		// match: (NZ (ANDconst [c] x) yes no)
 25173  		// cond: oneBit(c)
 25174  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 25175  		for b.Controls[0].Op == OpARM64ANDconst {
 25176  			v_0 := b.Controls[0]
 25177  			c := auxIntToInt64(v_0.AuxInt)
 25178  			x := v_0.Args[0]
 25179  			if !(oneBit(c)) {
 25180  				break
 25181  			}
 25182  			b.resetWithControl(BlockARM64TBNZ, x)
 25183  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25184  			return true
 25185  		}
 25186  		// match: (NZ (MOVDconst [0]) yes no)
 25187  		// result: (First no yes)
 25188  		for b.Controls[0].Op == OpARM64MOVDconst {
 25189  			v_0 := b.Controls[0]
 25190  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25191  				break
 25192  			}
 25193  			b.Reset(BlockFirst)
 25194  			b.swapSuccessors()
 25195  			return true
 25196  		}
 25197  		// match: (NZ (MOVDconst [c]) yes no)
 25198  		// cond: c != 0
 25199  		// result: (First yes no)
 25200  		for b.Controls[0].Op == OpARM64MOVDconst {
 25201  			v_0 := b.Controls[0]
 25202  			c := auxIntToInt64(v_0.AuxInt)
 25203  			if !(c != 0) {
 25204  				break
 25205  			}
 25206  			b.Reset(BlockFirst)
 25207  			return true
 25208  		}
 25209  	case BlockARM64NZW:
 25210  		// match: (NZW sub:(SUB x y))
 25211  		// cond: sub.Uses == 1
 25212  		// result: (NE (CMPW x y))
 25213  		for b.Controls[0].Op == OpARM64SUB {
 25214  			sub := b.Controls[0]
 25215  			y := sub.Args[1]
 25216  			x := sub.Args[0]
 25217  			if !(sub.Uses == 1) {
 25218  				break
 25219  			}
 25220  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 25221  			v0.AddArg2(x, y)
 25222  			b.resetWithControl(BlockARM64NE, v0)
 25223  			return true
 25224  		}
 25225  		// match: (NZW sub:(SUBconst [c] y))
 25226  		// cond: sub.Uses == 1
 25227  		// result: (NE (CMPWconst [int32(c)] y))
 25228  		for b.Controls[0].Op == OpARM64SUBconst {
 25229  			sub := b.Controls[0]
 25230  			c := auxIntToInt64(sub.AuxInt)
 25231  			y := sub.Args[0]
 25232  			if !(sub.Uses == 1) {
 25233  				break
 25234  			}
 25235  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 25236  			v0.AuxInt = int32ToAuxInt(int32(c))
 25237  			v0.AddArg(y)
 25238  			b.resetWithControl(BlockARM64NE, v0)
 25239  			return true
 25240  		}
 25241  		// match: (NZW (ANDconst [c] x) yes no)
 25242  		// cond: oneBit(int64(uint32(c)))
 25243  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25244  		for b.Controls[0].Op == OpARM64ANDconst {
 25245  			v_0 := b.Controls[0]
 25246  			c := auxIntToInt64(v_0.AuxInt)
 25247  			x := v_0.Args[0]
 25248  			if !(oneBit(int64(uint32(c)))) {
 25249  				break
 25250  			}
 25251  			b.resetWithControl(BlockARM64TBNZ, x)
 25252  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25253  			return true
 25254  		}
 25255  		// match: (NZW (MOVDconst [c]) yes no)
 25256  		// cond: int32(c) == 0
 25257  		// result: (First no yes)
 25258  		for b.Controls[0].Op == OpARM64MOVDconst {
 25259  			v_0 := b.Controls[0]
 25260  			c := auxIntToInt64(v_0.AuxInt)
 25261  			if !(int32(c) == 0) {
 25262  				break
 25263  			}
 25264  			b.Reset(BlockFirst)
 25265  			b.swapSuccessors()
 25266  			return true
 25267  		}
 25268  		// match: (NZW (MOVDconst [c]) yes no)
 25269  		// cond: int32(c) != 0
 25270  		// result: (First yes no)
 25271  		for b.Controls[0].Op == OpARM64MOVDconst {
 25272  			v_0 := b.Controls[0]
 25273  			c := auxIntToInt64(v_0.AuxInt)
 25274  			if !(int32(c) != 0) {
 25275  				break
 25276  			}
 25277  			b.Reset(BlockFirst)
 25278  			return true
 25279  		}
 25280  	case BlockARM64TBNZ:
 25281  		// match: (TBNZ [0] (Equal cc) yes no)
 25282  		// result: (EQ cc yes no)
 25283  		for b.Controls[0].Op == OpARM64Equal {
 25284  			v_0 := b.Controls[0]
 25285  			cc := v_0.Args[0]
 25286  			if auxIntToInt64(b.AuxInt) != 0 {
 25287  				break
 25288  			}
 25289  			b.resetWithControl(BlockARM64EQ, cc)
 25290  			return true
 25291  		}
 25292  		// match: (TBNZ [0] (NotEqual cc) yes no)
 25293  		// result: (NE cc yes no)
 25294  		for b.Controls[0].Op == OpARM64NotEqual {
 25295  			v_0 := b.Controls[0]
 25296  			cc := v_0.Args[0]
 25297  			if auxIntToInt64(b.AuxInt) != 0 {
 25298  				break
 25299  			}
 25300  			b.resetWithControl(BlockARM64NE, cc)
 25301  			return true
 25302  		}
 25303  		// match: (TBNZ [0] (LessThan cc) yes no)
 25304  		// result: (LT cc yes no)
 25305  		for b.Controls[0].Op == OpARM64LessThan {
 25306  			v_0 := b.Controls[0]
 25307  			cc := v_0.Args[0]
 25308  			if auxIntToInt64(b.AuxInt) != 0 {
 25309  				break
 25310  			}
 25311  			b.resetWithControl(BlockARM64LT, cc)
 25312  			return true
 25313  		}
 25314  		// match: (TBNZ [0] (LessThanU cc) yes no)
 25315  		// result: (ULT cc yes no)
 25316  		for b.Controls[0].Op == OpARM64LessThanU {
 25317  			v_0 := b.Controls[0]
 25318  			cc := v_0.Args[0]
 25319  			if auxIntToInt64(b.AuxInt) != 0 {
 25320  				break
 25321  			}
 25322  			b.resetWithControl(BlockARM64ULT, cc)
 25323  			return true
 25324  		}
 25325  		// match: (TBNZ [0] (LessEqual cc) yes no)
 25326  		// result: (LE cc yes no)
 25327  		for b.Controls[0].Op == OpARM64LessEqual {
 25328  			v_0 := b.Controls[0]
 25329  			cc := v_0.Args[0]
 25330  			if auxIntToInt64(b.AuxInt) != 0 {
 25331  				break
 25332  			}
 25333  			b.resetWithControl(BlockARM64LE, cc)
 25334  			return true
 25335  		}
 25336  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 25337  		// result: (ULE cc yes no)
 25338  		for b.Controls[0].Op == OpARM64LessEqualU {
 25339  			v_0 := b.Controls[0]
 25340  			cc := v_0.Args[0]
 25341  			if auxIntToInt64(b.AuxInt) != 0 {
 25342  				break
 25343  			}
 25344  			b.resetWithControl(BlockARM64ULE, cc)
 25345  			return true
 25346  		}
 25347  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 25348  		// result: (GT cc yes no)
 25349  		for b.Controls[0].Op == OpARM64GreaterThan {
 25350  			v_0 := b.Controls[0]
 25351  			cc := v_0.Args[0]
 25352  			if auxIntToInt64(b.AuxInt) != 0 {
 25353  				break
 25354  			}
 25355  			b.resetWithControl(BlockARM64GT, cc)
 25356  			return true
 25357  		}
 25358  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 25359  		// result: (UGT cc yes no)
 25360  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25361  			v_0 := b.Controls[0]
 25362  			cc := v_0.Args[0]
 25363  			if auxIntToInt64(b.AuxInt) != 0 {
 25364  				break
 25365  			}
 25366  			b.resetWithControl(BlockARM64UGT, cc)
 25367  			return true
 25368  		}
 25369  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 25370  		// result: (GE cc yes no)
 25371  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25372  			v_0 := b.Controls[0]
 25373  			cc := v_0.Args[0]
 25374  			if auxIntToInt64(b.AuxInt) != 0 {
 25375  				break
 25376  			}
 25377  			b.resetWithControl(BlockARM64GE, cc)
 25378  			return true
 25379  		}
 25380  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 25381  		// result: (UGE cc yes no)
 25382  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25383  			v_0 := b.Controls[0]
 25384  			cc := v_0.Args[0]
 25385  			if auxIntToInt64(b.AuxInt) != 0 {
 25386  				break
 25387  			}
 25388  			b.resetWithControl(BlockARM64UGE, cc)
 25389  			return true
 25390  		}
 25391  		// match: (TBNZ [0] (LessThanF cc) yes no)
 25392  		// result: (FLT cc yes no)
 25393  		for b.Controls[0].Op == OpARM64LessThanF {
 25394  			v_0 := b.Controls[0]
 25395  			cc := v_0.Args[0]
 25396  			if auxIntToInt64(b.AuxInt) != 0 {
 25397  				break
 25398  			}
 25399  			b.resetWithControl(BlockARM64FLT, cc)
 25400  			return true
 25401  		}
 25402  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 25403  		// result: (FLE cc yes no)
 25404  		for b.Controls[0].Op == OpARM64LessEqualF {
 25405  			v_0 := b.Controls[0]
 25406  			cc := v_0.Args[0]
 25407  			if auxIntToInt64(b.AuxInt) != 0 {
 25408  				break
 25409  			}
 25410  			b.resetWithControl(BlockARM64FLE, cc)
 25411  			return true
 25412  		}
 25413  		// match: (TBNZ [0] (GreaterThanF cc) yes no)
 25414  		// result: (FGT cc yes no)
 25415  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25416  			v_0 := b.Controls[0]
 25417  			cc := v_0.Args[0]
 25418  			if auxIntToInt64(b.AuxInt) != 0 {
 25419  				break
 25420  			}
 25421  			b.resetWithControl(BlockARM64FGT, cc)
 25422  			return true
 25423  		}
 25424  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 25425  		// result: (FGE cc yes no)
 25426  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25427  			v_0 := b.Controls[0]
 25428  			cc := v_0.Args[0]
 25429  			if auxIntToInt64(b.AuxInt) != 0 {
 25430  				break
 25431  			}
 25432  			b.resetWithControl(BlockARM64FGE, cc)
 25433  			return true
 25434  		}
 25435  	case BlockARM64UGE:
 25436  		// match: (UGE (FlagConstant [fc]) yes no)
 25437  		// cond: fc.uge()
 25438  		// result: (First yes no)
 25439  		for b.Controls[0].Op == OpARM64FlagConstant {
 25440  			v_0 := b.Controls[0]
 25441  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25442  			if !(fc.uge()) {
 25443  				break
 25444  			}
 25445  			b.Reset(BlockFirst)
 25446  			return true
 25447  		}
 25448  		// match: (UGE (FlagConstant [fc]) yes no)
 25449  		// cond: !fc.uge()
 25450  		// result: (First no yes)
 25451  		for b.Controls[0].Op == OpARM64FlagConstant {
 25452  			v_0 := b.Controls[0]
 25453  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25454  			if !(!fc.uge()) {
 25455  				break
 25456  			}
 25457  			b.Reset(BlockFirst)
 25458  			b.swapSuccessors()
 25459  			return true
 25460  		}
 25461  		// match: (UGE (InvertFlags cmp) yes no)
 25462  		// result: (ULE cmp yes no)
 25463  		for b.Controls[0].Op == OpARM64InvertFlags {
 25464  			v_0 := b.Controls[0]
 25465  			cmp := v_0.Args[0]
 25466  			b.resetWithControl(BlockARM64ULE, cmp)
 25467  			return true
 25468  		}
 25469  	case BlockARM64UGT:
 25470  		// match: (UGT (CMPconst [0] x))
 25471  		// result: (NE (CMPconst [0] x))
 25472  		for b.Controls[0].Op == OpARM64CMPconst {
 25473  			v_0 := b.Controls[0]
 25474  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25475  				break
 25476  			}
 25477  			x := v_0.Args[0]
 25478  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 25479  			v0.AuxInt = int64ToAuxInt(0)
 25480  			v0.AddArg(x)
 25481  			b.resetWithControl(BlockARM64NE, v0)
 25482  			return true
 25483  		}
 25484  		// match: (UGT (CMPWconst [0] x))
 25485  		// result: (NE (CMPWconst [0] x))
 25486  		for b.Controls[0].Op == OpARM64CMPWconst {
 25487  			v_0 := b.Controls[0]
 25488  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25489  				break
 25490  			}
 25491  			x := v_0.Args[0]
 25492  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 25493  			v0.AuxInt = int32ToAuxInt(0)
 25494  			v0.AddArg(x)
 25495  			b.resetWithControl(BlockARM64NE, v0)
 25496  			return true
 25497  		}
 25498  		// match: (UGT (FlagConstant [fc]) yes no)
 25499  		// cond: fc.ugt()
 25500  		// result: (First yes no)
 25501  		for b.Controls[0].Op == OpARM64FlagConstant {
 25502  			v_0 := b.Controls[0]
 25503  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25504  			if !(fc.ugt()) {
 25505  				break
 25506  			}
 25507  			b.Reset(BlockFirst)
 25508  			return true
 25509  		}
 25510  		// match: (UGT (FlagConstant [fc]) yes no)
 25511  		// cond: !fc.ugt()
 25512  		// result: (First no yes)
 25513  		for b.Controls[0].Op == OpARM64FlagConstant {
 25514  			v_0 := b.Controls[0]
 25515  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25516  			if !(!fc.ugt()) {
 25517  				break
 25518  			}
 25519  			b.Reset(BlockFirst)
 25520  			b.swapSuccessors()
 25521  			return true
 25522  		}
 25523  		// match: (UGT (InvertFlags cmp) yes no)
 25524  		// result: (ULT cmp yes no)
 25525  		for b.Controls[0].Op == OpARM64InvertFlags {
 25526  			v_0 := b.Controls[0]
 25527  			cmp := v_0.Args[0]
 25528  			b.resetWithControl(BlockARM64ULT, cmp)
 25529  			return true
 25530  		}
 25531  	case BlockARM64ULE:
 25532  		// match: (ULE (CMPconst [0] x))
 25533  		// result: (EQ (CMPconst [0] x))
 25534  		for b.Controls[0].Op == OpARM64CMPconst {
 25535  			v_0 := b.Controls[0]
 25536  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25537  				break
 25538  			}
 25539  			x := v_0.Args[0]
 25540  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 25541  			v0.AuxInt = int64ToAuxInt(0)
 25542  			v0.AddArg(x)
 25543  			b.resetWithControl(BlockARM64EQ, v0)
 25544  			return true
 25545  		}
 25546  		// match: (ULE (CMPWconst [0] x))
 25547  		// result: (EQ (CMPWconst [0] x))
 25548  		for b.Controls[0].Op == OpARM64CMPWconst {
 25549  			v_0 := b.Controls[0]
 25550  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25551  				break
 25552  			}
 25553  			x := v_0.Args[0]
 25554  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 25555  			v0.AuxInt = int32ToAuxInt(0)
 25556  			v0.AddArg(x)
 25557  			b.resetWithControl(BlockARM64EQ, v0)
 25558  			return true
 25559  		}
 25560  		// match: (ULE (FlagConstant [fc]) yes no)
 25561  		// cond: fc.ule()
 25562  		// result: (First yes no)
 25563  		for b.Controls[0].Op == OpARM64FlagConstant {
 25564  			v_0 := b.Controls[0]
 25565  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25566  			if !(fc.ule()) {
 25567  				break
 25568  			}
 25569  			b.Reset(BlockFirst)
 25570  			return true
 25571  		}
 25572  		// match: (ULE (FlagConstant [fc]) yes no)
 25573  		// cond: !fc.ule()
 25574  		// result: (First no yes)
 25575  		for b.Controls[0].Op == OpARM64FlagConstant {
 25576  			v_0 := b.Controls[0]
 25577  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25578  			if !(!fc.ule()) {
 25579  				break
 25580  			}
 25581  			b.Reset(BlockFirst)
 25582  			b.swapSuccessors()
 25583  			return true
 25584  		}
 25585  		// match: (ULE (InvertFlags cmp) yes no)
 25586  		// result: (UGE cmp yes no)
 25587  		for b.Controls[0].Op == OpARM64InvertFlags {
 25588  			v_0 := b.Controls[0]
 25589  			cmp := v_0.Args[0]
 25590  			b.resetWithControl(BlockARM64UGE, cmp)
 25591  			return true
 25592  		}
 25593  	case BlockARM64ULT:
 25594  		// match: (ULT (FlagConstant [fc]) yes no)
 25595  		// cond: fc.ult()
 25596  		// result: (First yes no)
 25597  		for b.Controls[0].Op == OpARM64FlagConstant {
 25598  			v_0 := b.Controls[0]
 25599  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25600  			if !(fc.ult()) {
 25601  				break
 25602  			}
 25603  			b.Reset(BlockFirst)
 25604  			return true
 25605  		}
 25606  		// match: (ULT (FlagConstant [fc]) yes no)
 25607  		// cond: !fc.ult()
 25608  		// result: (First no yes)
 25609  		for b.Controls[0].Op == OpARM64FlagConstant {
 25610  			v_0 := b.Controls[0]
 25611  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25612  			if !(!fc.ult()) {
 25613  				break
 25614  			}
 25615  			b.Reset(BlockFirst)
 25616  			b.swapSuccessors()
 25617  			return true
 25618  		}
 25619  		// match: (ULT (InvertFlags cmp) yes no)
 25620  		// result: (UGT cmp yes no)
 25621  		for b.Controls[0].Op == OpARM64InvertFlags {
 25622  			v_0 := b.Controls[0]
 25623  			cmp := v_0.Args[0]
 25624  			b.resetWithControl(BlockARM64UGT, cmp)
 25625  			return true
 25626  		}
 25627  	case BlockARM64Z:
 25628  		// match: (Z sub:(SUB x y))
 25629  		// cond: sub.Uses == 1
 25630  		// result: (EQ (CMP x y))
 25631  		for b.Controls[0].Op == OpARM64SUB {
 25632  			sub := b.Controls[0]
 25633  			y := sub.Args[1]
 25634  			x := sub.Args[0]
 25635  			if !(sub.Uses == 1) {
 25636  				break
 25637  			}
 25638  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 25639  			v0.AddArg2(x, y)
 25640  			b.resetWithControl(BlockARM64EQ, v0)
 25641  			return true
 25642  		}
 25643  		// match: (Z sub:(SUBconst [c] y))
 25644  		// cond: sub.Uses == 1
 25645  		// result: (EQ (CMPconst [c] y))
 25646  		for b.Controls[0].Op == OpARM64SUBconst {
 25647  			sub := b.Controls[0]
 25648  			c := auxIntToInt64(sub.AuxInt)
 25649  			y := sub.Args[0]
 25650  			if !(sub.Uses == 1) {
 25651  				break
 25652  			}
 25653  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 25654  			v0.AuxInt = int64ToAuxInt(c)
 25655  			v0.AddArg(y)
 25656  			b.resetWithControl(BlockARM64EQ, v0)
 25657  			return true
 25658  		}
 25659  		// match: (Z (ANDconst [c] x) yes no)
 25660  		// cond: oneBit(c)
 25661  		// result: (TBZ [int64(ntz64(c))] x yes no)
 25662  		for b.Controls[0].Op == OpARM64ANDconst {
 25663  			v_0 := b.Controls[0]
 25664  			c := auxIntToInt64(v_0.AuxInt)
 25665  			x := v_0.Args[0]
 25666  			if !(oneBit(c)) {
 25667  				break
 25668  			}
 25669  			b.resetWithControl(BlockARM64TBZ, x)
 25670  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25671  			return true
 25672  		}
 25673  		// match: (Z (MOVDconst [0]) yes no)
 25674  		// result: (First yes no)
 25675  		for b.Controls[0].Op == OpARM64MOVDconst {
 25676  			v_0 := b.Controls[0]
 25677  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25678  				break
 25679  			}
 25680  			b.Reset(BlockFirst)
 25681  			return true
 25682  		}
 25683  		// match: (Z (MOVDconst [c]) yes no)
 25684  		// cond: c != 0
 25685  		// result: (First no yes)
 25686  		for b.Controls[0].Op == OpARM64MOVDconst {
 25687  			v_0 := b.Controls[0]
 25688  			c := auxIntToInt64(v_0.AuxInt)
 25689  			if !(c != 0) {
 25690  				break
 25691  			}
 25692  			b.Reset(BlockFirst)
 25693  			b.swapSuccessors()
 25694  			return true
 25695  		}
 25696  	case BlockARM64ZW:
 25697  		// match: (ZW sub:(SUB x y))
 25698  		// cond: sub.Uses == 1
 25699  		// result: (EQ (CMPW x y))
 25700  		for b.Controls[0].Op == OpARM64SUB {
 25701  			sub := b.Controls[0]
 25702  			y := sub.Args[1]
 25703  			x := sub.Args[0]
 25704  			if !(sub.Uses == 1) {
 25705  				break
 25706  			}
 25707  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 25708  			v0.AddArg2(x, y)
 25709  			b.resetWithControl(BlockARM64EQ, v0)
 25710  			return true
 25711  		}
 25712  		// match: (ZW sub:(SUBconst [c] y))
 25713  		// cond: sub.Uses == 1
 25714  		// result: (EQ (CMPWconst [int32(c)] y))
 25715  		for b.Controls[0].Op == OpARM64SUBconst {
 25716  			sub := b.Controls[0]
 25717  			c := auxIntToInt64(sub.AuxInt)
 25718  			y := sub.Args[0]
 25719  			if !(sub.Uses == 1) {
 25720  				break
 25721  			}
 25722  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 25723  			v0.AuxInt = int32ToAuxInt(int32(c))
 25724  			v0.AddArg(y)
 25725  			b.resetWithControl(BlockARM64EQ, v0)
 25726  			return true
 25727  		}
 25728  		// match: (ZW (ANDconst [c] x) yes no)
 25729  		// cond: oneBit(int64(uint32(c)))
 25730  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25731  		for b.Controls[0].Op == OpARM64ANDconst {
 25732  			v_0 := b.Controls[0]
 25733  			c := auxIntToInt64(v_0.AuxInt)
 25734  			x := v_0.Args[0]
 25735  			if !(oneBit(int64(uint32(c)))) {
 25736  				break
 25737  			}
 25738  			b.resetWithControl(BlockARM64TBZ, x)
 25739  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25740  			return true
 25741  		}
 25742  		// match: (ZW (MOVDconst [c]) yes no)
 25743  		// cond: int32(c) == 0
 25744  		// result: (First yes no)
 25745  		for b.Controls[0].Op == OpARM64MOVDconst {
 25746  			v_0 := b.Controls[0]
 25747  			c := auxIntToInt64(v_0.AuxInt)
 25748  			if !(int32(c) == 0) {
 25749  				break
 25750  			}
 25751  			b.Reset(BlockFirst)
 25752  			return true
 25753  		}
 25754  		// match: (ZW (MOVDconst [c]) yes no)
 25755  		// cond: int32(c) != 0
 25756  		// result: (First no yes)
 25757  		for b.Controls[0].Op == OpARM64MOVDconst {
 25758  			v_0 := b.Controls[0]
 25759  			c := auxIntToInt64(v_0.AuxInt)
 25760  			if !(int32(c) != 0) {
 25761  				break
 25762  			}
 25763  			b.Reset(BlockFirst)
 25764  			b.swapSuccessors()
 25765  			return true
 25766  		}
 25767  	}
 25768  	return false
 25769  }
 25770  

View as plain text