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

     1  // Code generated from _gen/ARM64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "cmd/compile/internal/types"
     6  
     7  func rewriteValueARM64(v *Value) bool {
     8  	switch v.Op {
     9  	case OpARM64ADCSflags:
    10  		return rewriteValueARM64_OpARM64ADCSflags(v)
    11  	case OpARM64ADD:
    12  		return rewriteValueARM64_OpARM64ADD(v)
    13  	case OpARM64ADDSflags:
    14  		return rewriteValueARM64_OpARM64ADDSflags(v)
    15  	case OpARM64ADDconst:
    16  		return rewriteValueARM64_OpARM64ADDconst(v)
    17  	case OpARM64ADDshiftLL:
    18  		return rewriteValueARM64_OpARM64ADDshiftLL(v)
    19  	case OpARM64ADDshiftRA:
    20  		return rewriteValueARM64_OpARM64ADDshiftRA(v)
    21  	case OpARM64ADDshiftRL:
    22  		return rewriteValueARM64_OpARM64ADDshiftRL(v)
    23  	case OpARM64AND:
    24  		return rewriteValueARM64_OpARM64AND(v)
    25  	case OpARM64ANDconst:
    26  		return rewriteValueARM64_OpARM64ANDconst(v)
    27  	case OpARM64ANDshiftLL:
    28  		return rewriteValueARM64_OpARM64ANDshiftLL(v)
    29  	case OpARM64ANDshiftRA:
    30  		return rewriteValueARM64_OpARM64ANDshiftRA(v)
    31  	case OpARM64ANDshiftRL:
    32  		return rewriteValueARM64_OpARM64ANDshiftRL(v)
    33  	case OpARM64ANDshiftRO:
    34  		return rewriteValueARM64_OpARM64ANDshiftRO(v)
    35  	case OpARM64BIC:
    36  		return rewriteValueARM64_OpARM64BIC(v)
    37  	case OpARM64BICshiftLL:
    38  		return rewriteValueARM64_OpARM64BICshiftLL(v)
    39  	case OpARM64BICshiftRA:
    40  		return rewriteValueARM64_OpARM64BICshiftRA(v)
    41  	case OpARM64BICshiftRL:
    42  		return rewriteValueARM64_OpARM64BICshiftRL(v)
    43  	case OpARM64BICshiftRO:
    44  		return rewriteValueARM64_OpARM64BICshiftRO(v)
    45  	case OpARM64CMN:
    46  		return rewriteValueARM64_OpARM64CMN(v)
    47  	case OpARM64CMNW:
    48  		return rewriteValueARM64_OpARM64CMNW(v)
    49  	case OpARM64CMNWconst:
    50  		return rewriteValueARM64_OpARM64CMNWconst(v)
    51  	case OpARM64CMNconst:
    52  		return rewriteValueARM64_OpARM64CMNconst(v)
    53  	case OpARM64CMNshiftLL:
    54  		return rewriteValueARM64_OpARM64CMNshiftLL(v)
    55  	case OpARM64CMNshiftRA:
    56  		return rewriteValueARM64_OpARM64CMNshiftRA(v)
    57  	case OpARM64CMNshiftRL:
    58  		return rewriteValueARM64_OpARM64CMNshiftRL(v)
    59  	case OpARM64CMP:
    60  		return rewriteValueARM64_OpARM64CMP(v)
    61  	case OpARM64CMPW:
    62  		return rewriteValueARM64_OpARM64CMPW(v)
    63  	case OpARM64CMPWconst:
    64  		return rewriteValueARM64_OpARM64CMPWconst(v)
    65  	case OpARM64CMPconst:
    66  		return rewriteValueARM64_OpARM64CMPconst(v)
    67  	case OpARM64CMPshiftLL:
    68  		return rewriteValueARM64_OpARM64CMPshiftLL(v)
    69  	case OpARM64CMPshiftRA:
    70  		return rewriteValueARM64_OpARM64CMPshiftRA(v)
    71  	case OpARM64CMPshiftRL:
    72  		return rewriteValueARM64_OpARM64CMPshiftRL(v)
    73  	case OpARM64CSEL:
    74  		return rewriteValueARM64_OpARM64CSEL(v)
    75  	case OpARM64CSEL0:
    76  		return rewriteValueARM64_OpARM64CSEL0(v)
    77  	case OpARM64CSETM:
    78  		return rewriteValueARM64_OpARM64CSETM(v)
    79  	case OpARM64CSINC:
    80  		return rewriteValueARM64_OpARM64CSINC(v)
    81  	case OpARM64CSINV:
    82  		return rewriteValueARM64_OpARM64CSINV(v)
    83  	case OpARM64CSNEG:
    84  		return rewriteValueARM64_OpARM64CSNEG(v)
    85  	case OpARM64DIV:
    86  		return rewriteValueARM64_OpARM64DIV(v)
    87  	case OpARM64DIVW:
    88  		return rewriteValueARM64_OpARM64DIVW(v)
    89  	case OpARM64EON:
    90  		return rewriteValueARM64_OpARM64EON(v)
    91  	case OpARM64EONshiftLL:
    92  		return rewriteValueARM64_OpARM64EONshiftLL(v)
    93  	case OpARM64EONshiftRA:
    94  		return rewriteValueARM64_OpARM64EONshiftRA(v)
    95  	case OpARM64EONshiftRL:
    96  		return rewriteValueARM64_OpARM64EONshiftRL(v)
    97  	case OpARM64EONshiftRO:
    98  		return rewriteValueARM64_OpARM64EONshiftRO(v)
    99  	case OpARM64Equal:
   100  		return rewriteValueARM64_OpARM64Equal(v)
   101  	case OpARM64FADDD:
   102  		return rewriteValueARM64_OpARM64FADDD(v)
   103  	case OpARM64FADDS:
   104  		return rewriteValueARM64_OpARM64FADDS(v)
   105  	case OpARM64FCMPD:
   106  		return rewriteValueARM64_OpARM64FCMPD(v)
   107  	case OpARM64FCMPS:
   108  		return rewriteValueARM64_OpARM64FCMPS(v)
   109  	case OpARM64FCVTDS:
   110  		return rewriteValueARM64_OpARM64FCVTDS(v)
   111  	case OpARM64FLDPQ:
   112  		return rewriteValueARM64_OpARM64FLDPQ(v)
   113  	case OpARM64FMOVDfpgp:
   114  		return rewriteValueARM64_OpARM64FMOVDfpgp(v)
   115  	case OpARM64FMOVDgpfp:
   116  		return rewriteValueARM64_OpARM64FMOVDgpfp(v)
   117  	case OpARM64FMOVDload:
   118  		return rewriteValueARM64_OpARM64FMOVDload(v)
   119  	case OpARM64FMOVDloadidx:
   120  		return rewriteValueARM64_OpARM64FMOVDloadidx(v)
   121  	case OpARM64FMOVDloadidx8:
   122  		return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
   123  	case OpARM64FMOVDstore:
   124  		return rewriteValueARM64_OpARM64FMOVDstore(v)
   125  	case OpARM64FMOVDstoreidx:
   126  		return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
   127  	case OpARM64FMOVDstoreidx8:
   128  		return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
   129  	case OpARM64FMOVQload:
   130  		return rewriteValueARM64_OpARM64FMOVQload(v)
   131  	case OpARM64FMOVQstore:
   132  		return rewriteValueARM64_OpARM64FMOVQstore(v)
   133  	case OpARM64FMOVSload:
   134  		return rewriteValueARM64_OpARM64FMOVSload(v)
   135  	case OpARM64FMOVSloadidx:
   136  		return rewriteValueARM64_OpARM64FMOVSloadidx(v)
   137  	case OpARM64FMOVSloadidx4:
   138  		return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
   139  	case OpARM64FMOVSstore:
   140  		return rewriteValueARM64_OpARM64FMOVSstore(v)
   141  	case OpARM64FMOVSstoreidx:
   142  		return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
   143  	case OpARM64FMOVSstoreidx4:
   144  		return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
   145  	case OpARM64FMULD:
   146  		return rewriteValueARM64_OpARM64FMULD(v)
   147  	case OpARM64FMULS:
   148  		return rewriteValueARM64_OpARM64FMULS(v)
   149  	case OpARM64FNEGD:
   150  		return rewriteValueARM64_OpARM64FNEGD(v)
   151  	case OpARM64FNEGS:
   152  		return rewriteValueARM64_OpARM64FNEGS(v)
   153  	case OpARM64FNMULD:
   154  		return rewriteValueARM64_OpARM64FNMULD(v)
   155  	case OpARM64FNMULS:
   156  		return rewriteValueARM64_OpARM64FNMULS(v)
   157  	case OpARM64FSTPQ:
   158  		return rewriteValueARM64_OpARM64FSTPQ(v)
   159  	case OpARM64FSUBD:
   160  		return rewriteValueARM64_OpARM64FSUBD(v)
   161  	case OpARM64FSUBS:
   162  		return rewriteValueARM64_OpARM64FSUBS(v)
   163  	case OpARM64GreaterEqual:
   164  		return rewriteValueARM64_OpARM64GreaterEqual(v)
   165  	case OpARM64GreaterEqualF:
   166  		return rewriteValueARM64_OpARM64GreaterEqualF(v)
   167  	case OpARM64GreaterEqualNoov:
   168  		return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
   169  	case OpARM64GreaterEqualU:
   170  		return rewriteValueARM64_OpARM64GreaterEqualU(v)
   171  	case OpARM64GreaterThan:
   172  		return rewriteValueARM64_OpARM64GreaterThan(v)
   173  	case OpARM64GreaterThanF:
   174  		return rewriteValueARM64_OpARM64GreaterThanF(v)
   175  	case OpARM64GreaterThanU:
   176  		return rewriteValueARM64_OpARM64GreaterThanU(v)
   177  	case OpARM64LDP:
   178  		return rewriteValueARM64_OpARM64LDP(v)
   179  	case OpARM64LessEqual:
   180  		return rewriteValueARM64_OpARM64LessEqual(v)
   181  	case OpARM64LessEqualF:
   182  		return rewriteValueARM64_OpARM64LessEqualF(v)
   183  	case OpARM64LessEqualU:
   184  		return rewriteValueARM64_OpARM64LessEqualU(v)
   185  	case OpARM64LessThan:
   186  		return rewriteValueARM64_OpARM64LessThan(v)
   187  	case OpARM64LessThanF:
   188  		return rewriteValueARM64_OpARM64LessThanF(v)
   189  	case OpARM64LessThanNoov:
   190  		return rewriteValueARM64_OpARM64LessThanNoov(v)
   191  	case OpARM64LessThanU:
   192  		return rewriteValueARM64_OpARM64LessThanU(v)
   193  	case OpARM64LoweredPanicBoundsCR:
   194  		return rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v)
   195  	case OpARM64LoweredPanicBoundsRC:
   196  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v)
   197  	case OpARM64LoweredPanicBoundsRR:
   198  		return rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v)
   199  	case OpARM64MADD:
   200  		return rewriteValueARM64_OpARM64MADD(v)
   201  	case OpARM64MADDW:
   202  		return rewriteValueARM64_OpARM64MADDW(v)
   203  	case OpARM64MNEG:
   204  		return rewriteValueARM64_OpARM64MNEG(v)
   205  	case OpARM64MNEGW:
   206  		return rewriteValueARM64_OpARM64MNEGW(v)
   207  	case OpARM64MOD:
   208  		return rewriteValueARM64_OpARM64MOD(v)
   209  	case OpARM64MODW:
   210  		return rewriteValueARM64_OpARM64MODW(v)
   211  	case OpARM64MOVBUload:
   212  		return rewriteValueARM64_OpARM64MOVBUload(v)
   213  	case OpARM64MOVBUloadidx:
   214  		return rewriteValueARM64_OpARM64MOVBUloadidx(v)
   215  	case OpARM64MOVBUreg:
   216  		return rewriteValueARM64_OpARM64MOVBUreg(v)
   217  	case OpARM64MOVBload:
   218  		return rewriteValueARM64_OpARM64MOVBload(v)
   219  	case OpARM64MOVBloadidx:
   220  		return rewriteValueARM64_OpARM64MOVBloadidx(v)
   221  	case OpARM64MOVBreg:
   222  		return rewriteValueARM64_OpARM64MOVBreg(v)
   223  	case OpARM64MOVBstore:
   224  		return rewriteValueARM64_OpARM64MOVBstore(v)
   225  	case OpARM64MOVBstoreidx:
   226  		return rewriteValueARM64_OpARM64MOVBstoreidx(v)
   227  	case OpARM64MOVDload:
   228  		return rewriteValueARM64_OpARM64MOVDload(v)
   229  	case OpARM64MOVDloadidx:
   230  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   231  	case OpARM64MOVDloadidx8:
   232  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   233  	case OpARM64MOVDnop:
   234  		return rewriteValueARM64_OpARM64MOVDnop(v)
   235  	case OpARM64MOVDreg:
   236  		return rewriteValueARM64_OpARM64MOVDreg(v)
   237  	case OpARM64MOVDstore:
   238  		return rewriteValueARM64_OpARM64MOVDstore(v)
   239  	case OpARM64MOVDstoreidx:
   240  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   241  	case OpARM64MOVDstoreidx8:
   242  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   243  	case OpARM64MOVHUload:
   244  		return rewriteValueARM64_OpARM64MOVHUload(v)
   245  	case OpARM64MOVHUloadidx:
   246  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   247  	case OpARM64MOVHUloadidx2:
   248  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   249  	case OpARM64MOVHUreg:
   250  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   251  	case OpARM64MOVHload:
   252  		return rewriteValueARM64_OpARM64MOVHload(v)
   253  	case OpARM64MOVHloadidx:
   254  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   255  	case OpARM64MOVHloadidx2:
   256  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   257  	case OpARM64MOVHreg:
   258  		return rewriteValueARM64_OpARM64MOVHreg(v)
   259  	case OpARM64MOVHstore:
   260  		return rewriteValueARM64_OpARM64MOVHstore(v)
   261  	case OpARM64MOVHstoreidx:
   262  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   263  	case OpARM64MOVHstoreidx2:
   264  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   265  	case OpARM64MOVWUload:
   266  		return rewriteValueARM64_OpARM64MOVWUload(v)
   267  	case OpARM64MOVWUloadidx:
   268  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   269  	case OpARM64MOVWUloadidx4:
   270  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   271  	case OpARM64MOVWUreg:
   272  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   273  	case OpARM64MOVWload:
   274  		return rewriteValueARM64_OpARM64MOVWload(v)
   275  	case OpARM64MOVWloadidx:
   276  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   277  	case OpARM64MOVWloadidx4:
   278  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   279  	case OpARM64MOVWreg:
   280  		return rewriteValueARM64_OpARM64MOVWreg(v)
   281  	case OpARM64MOVWstore:
   282  		return rewriteValueARM64_OpARM64MOVWstore(v)
   283  	case OpARM64MOVWstoreidx:
   284  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   285  	case OpARM64MOVWstoreidx4:
   286  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   287  	case OpARM64MSUB:
   288  		return rewriteValueARM64_OpARM64MSUB(v)
   289  	case OpARM64MSUBW:
   290  		return rewriteValueARM64_OpARM64MSUBW(v)
   291  	case OpARM64MUL:
   292  		return rewriteValueARM64_OpARM64MUL(v)
   293  	case OpARM64MULW:
   294  		return rewriteValueARM64_OpARM64MULW(v)
   295  	case OpARM64MVN:
   296  		return rewriteValueARM64_OpARM64MVN(v)
   297  	case OpARM64MVNshiftLL:
   298  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   299  	case OpARM64MVNshiftRA:
   300  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   301  	case OpARM64MVNshiftRL:
   302  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   303  	case OpARM64MVNshiftRO:
   304  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   305  	case OpARM64NEG:
   306  		return rewriteValueARM64_OpARM64NEG(v)
   307  	case OpARM64NEGshiftLL:
   308  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   309  	case OpARM64NEGshiftRA:
   310  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   311  	case OpARM64NEGshiftRL:
   312  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   313  	case OpARM64NotEqual:
   314  		return rewriteValueARM64_OpARM64NotEqual(v)
   315  	case OpARM64OR:
   316  		return rewriteValueARM64_OpARM64OR(v)
   317  	case OpARM64ORN:
   318  		return rewriteValueARM64_OpARM64ORN(v)
   319  	case OpARM64ORNshiftLL:
   320  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   321  	case OpARM64ORNshiftRA:
   322  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   323  	case OpARM64ORNshiftRL:
   324  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   325  	case OpARM64ORNshiftRO:
   326  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   327  	case OpARM64ORconst:
   328  		return rewriteValueARM64_OpARM64ORconst(v)
   329  	case OpARM64ORshiftLL:
   330  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   331  	case OpARM64ORshiftRA:
   332  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   333  	case OpARM64ORshiftRL:
   334  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   335  	case OpARM64ORshiftRO:
   336  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   337  	case OpARM64REV:
   338  		return rewriteValueARM64_OpARM64REV(v)
   339  	case OpARM64REVW:
   340  		return rewriteValueARM64_OpARM64REVW(v)
   341  	case OpARM64ROR:
   342  		return rewriteValueARM64_OpARM64ROR(v)
   343  	case OpARM64RORW:
   344  		return rewriteValueARM64_OpARM64RORW(v)
   345  	case OpARM64SBCSflags:
   346  		return rewriteValueARM64_OpARM64SBCSflags(v)
   347  	case OpARM64SBFX:
   348  		return rewriteValueARM64_OpARM64SBFX(v)
   349  	case OpARM64SLL:
   350  		return rewriteValueARM64_OpARM64SLL(v)
   351  	case OpARM64SLLconst:
   352  		return rewriteValueARM64_OpARM64SLLconst(v)
   353  	case OpARM64SRA:
   354  		return rewriteValueARM64_OpARM64SRA(v)
   355  	case OpARM64SRAconst:
   356  		return rewriteValueARM64_OpARM64SRAconst(v)
   357  	case OpARM64SRL:
   358  		return rewriteValueARM64_OpARM64SRL(v)
   359  	case OpARM64SRLconst:
   360  		return rewriteValueARM64_OpARM64SRLconst(v)
   361  	case OpARM64STP:
   362  		return rewriteValueARM64_OpARM64STP(v)
   363  	case OpARM64SUB:
   364  		return rewriteValueARM64_OpARM64SUB(v)
   365  	case OpARM64SUBconst:
   366  		return rewriteValueARM64_OpARM64SUBconst(v)
   367  	case OpARM64SUBshiftLL:
   368  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   369  	case OpARM64SUBshiftRA:
   370  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   371  	case OpARM64SUBshiftRL:
   372  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   373  	case OpARM64TST:
   374  		return rewriteValueARM64_OpARM64TST(v)
   375  	case OpARM64TSTW:
   376  		return rewriteValueARM64_OpARM64TSTW(v)
   377  	case OpARM64TSTWconst:
   378  		return rewriteValueARM64_OpARM64TSTWconst(v)
   379  	case OpARM64TSTconst:
   380  		return rewriteValueARM64_OpARM64TSTconst(v)
   381  	case OpARM64TSTshiftLL:
   382  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   383  	case OpARM64TSTshiftRA:
   384  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   385  	case OpARM64TSTshiftRL:
   386  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   387  	case OpARM64TSTshiftRO:
   388  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   389  	case OpARM64UBFIZ:
   390  		return rewriteValueARM64_OpARM64UBFIZ(v)
   391  	case OpARM64UBFX:
   392  		return rewriteValueARM64_OpARM64UBFX(v)
   393  	case OpARM64UDIV:
   394  		return rewriteValueARM64_OpARM64UDIV(v)
   395  	case OpARM64UDIVW:
   396  		return rewriteValueARM64_OpARM64UDIVW(v)
   397  	case OpARM64UMOD:
   398  		return rewriteValueARM64_OpARM64UMOD(v)
   399  	case OpARM64UMODW:
   400  		return rewriteValueARM64_OpARM64UMODW(v)
   401  	case OpARM64XOR:
   402  		return rewriteValueARM64_OpARM64XOR(v)
   403  	case OpARM64XORconst:
   404  		return rewriteValueARM64_OpARM64XORconst(v)
   405  	case OpARM64XORshiftLL:
   406  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   407  	case OpARM64XORshiftRA:
   408  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   409  	case OpARM64XORshiftRL:
   410  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   411  	case OpARM64XORshiftRO:
   412  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   413  	case OpAbs:
   414  		v.Op = OpARM64FABSD
   415  		return true
   416  	case OpAdd16:
   417  		v.Op = OpARM64ADD
   418  		return true
   419  	case OpAdd32:
   420  		v.Op = OpARM64ADD
   421  		return true
   422  	case OpAdd32F:
   423  		v.Op = OpARM64FADDS
   424  		return true
   425  	case OpAdd64:
   426  		v.Op = OpARM64ADD
   427  		return true
   428  	case OpAdd64F:
   429  		v.Op = OpARM64FADDD
   430  		return true
   431  	case OpAdd8:
   432  		v.Op = OpARM64ADD
   433  		return true
   434  	case OpAddPtr:
   435  		v.Op = OpARM64ADD
   436  		return true
   437  	case OpAddr:
   438  		return rewriteValueARM64_OpAddr(v)
   439  	case OpAnd16:
   440  		v.Op = OpARM64AND
   441  		return true
   442  	case OpAnd32:
   443  		v.Op = OpARM64AND
   444  		return true
   445  	case OpAnd64:
   446  		v.Op = OpARM64AND
   447  		return true
   448  	case OpAnd8:
   449  		v.Op = OpARM64AND
   450  		return true
   451  	case OpAndB:
   452  		v.Op = OpARM64AND
   453  		return true
   454  	case OpAtomicAdd32:
   455  		v.Op = OpARM64LoweredAtomicAdd32
   456  		return true
   457  	case OpAtomicAdd32Variant:
   458  		v.Op = OpARM64LoweredAtomicAdd32Variant
   459  		return true
   460  	case OpAtomicAdd64:
   461  		v.Op = OpARM64LoweredAtomicAdd64
   462  		return true
   463  	case OpAtomicAdd64Variant:
   464  		v.Op = OpARM64LoweredAtomicAdd64Variant
   465  		return true
   466  	case OpAtomicAnd32value:
   467  		v.Op = OpARM64LoweredAtomicAnd32
   468  		return true
   469  	case OpAtomicAnd32valueVariant:
   470  		v.Op = OpARM64LoweredAtomicAnd32Variant
   471  		return true
   472  	case OpAtomicAnd64value:
   473  		v.Op = OpARM64LoweredAtomicAnd64
   474  		return true
   475  	case OpAtomicAnd64valueVariant:
   476  		v.Op = OpARM64LoweredAtomicAnd64Variant
   477  		return true
   478  	case OpAtomicAnd8value:
   479  		v.Op = OpARM64LoweredAtomicAnd8
   480  		return true
   481  	case OpAtomicAnd8valueVariant:
   482  		v.Op = OpARM64LoweredAtomicAnd8Variant
   483  		return true
   484  	case OpAtomicCompareAndSwap32:
   485  		v.Op = OpARM64LoweredAtomicCas32
   486  		return true
   487  	case OpAtomicCompareAndSwap32Variant:
   488  		v.Op = OpARM64LoweredAtomicCas32Variant
   489  		return true
   490  	case OpAtomicCompareAndSwap64:
   491  		v.Op = OpARM64LoweredAtomicCas64
   492  		return true
   493  	case OpAtomicCompareAndSwap64Variant:
   494  		v.Op = OpARM64LoweredAtomicCas64Variant
   495  		return true
   496  	case OpAtomicExchange32:
   497  		v.Op = OpARM64LoweredAtomicExchange32
   498  		return true
   499  	case OpAtomicExchange32Variant:
   500  		v.Op = OpARM64LoweredAtomicExchange32Variant
   501  		return true
   502  	case OpAtomicExchange64:
   503  		v.Op = OpARM64LoweredAtomicExchange64
   504  		return true
   505  	case OpAtomicExchange64Variant:
   506  		v.Op = OpARM64LoweredAtomicExchange64Variant
   507  		return true
   508  	case OpAtomicExchange8:
   509  		v.Op = OpARM64LoweredAtomicExchange8
   510  		return true
   511  	case OpAtomicExchange8Variant:
   512  		v.Op = OpARM64LoweredAtomicExchange8Variant
   513  		return true
   514  	case OpAtomicLoad32:
   515  		v.Op = OpARM64LDARW
   516  		return true
   517  	case OpAtomicLoad64:
   518  		v.Op = OpARM64LDAR
   519  		return true
   520  	case OpAtomicLoad8:
   521  		v.Op = OpARM64LDARB
   522  		return true
   523  	case OpAtomicLoadPtr:
   524  		v.Op = OpARM64LDAR
   525  		return true
   526  	case OpAtomicOr32value:
   527  		v.Op = OpARM64LoweredAtomicOr32
   528  		return true
   529  	case OpAtomicOr32valueVariant:
   530  		v.Op = OpARM64LoweredAtomicOr32Variant
   531  		return true
   532  	case OpAtomicOr64value:
   533  		v.Op = OpARM64LoweredAtomicOr64
   534  		return true
   535  	case OpAtomicOr64valueVariant:
   536  		v.Op = OpARM64LoweredAtomicOr64Variant
   537  		return true
   538  	case OpAtomicOr8value:
   539  		v.Op = OpARM64LoweredAtomicOr8
   540  		return true
   541  	case OpAtomicOr8valueVariant:
   542  		v.Op = OpARM64LoweredAtomicOr8Variant
   543  		return true
   544  	case OpAtomicStore32:
   545  		v.Op = OpARM64STLRW
   546  		return true
   547  	case OpAtomicStore64:
   548  		v.Op = OpARM64STLR
   549  		return true
   550  	case OpAtomicStore8:
   551  		v.Op = OpARM64STLRB
   552  		return true
   553  	case OpAtomicStorePtrNoWB:
   554  		v.Op = OpARM64STLR
   555  		return true
   556  	case OpAvg64u:
   557  		return rewriteValueARM64_OpAvg64u(v)
   558  	case OpBitLen16:
   559  		return rewriteValueARM64_OpBitLen16(v)
   560  	case OpBitLen32:
   561  		return rewriteValueARM64_OpBitLen32(v)
   562  	case OpBitLen64:
   563  		return rewriteValueARM64_OpBitLen64(v)
   564  	case OpBitLen8:
   565  		return rewriteValueARM64_OpBitLen8(v)
   566  	case OpBitRev16:
   567  		return rewriteValueARM64_OpBitRev16(v)
   568  	case OpBitRev32:
   569  		v.Op = OpARM64RBITW
   570  		return true
   571  	case OpBitRev64:
   572  		v.Op = OpARM64RBIT
   573  		return true
   574  	case OpBitRev8:
   575  		return rewriteValueARM64_OpBitRev8(v)
   576  	case OpBswap16:
   577  		v.Op = OpARM64REV16W
   578  		return true
   579  	case OpBswap32:
   580  		v.Op = OpARM64REVW
   581  		return true
   582  	case OpBswap64:
   583  		v.Op = OpARM64REV
   584  		return true
   585  	case OpCeil:
   586  		v.Op = OpARM64FRINTPD
   587  		return true
   588  	case OpClosureCall:
   589  		v.Op = OpARM64CALLclosure
   590  		return true
   591  	case OpCom16:
   592  		v.Op = OpARM64MVN
   593  		return true
   594  	case OpCom32:
   595  		v.Op = OpARM64MVN
   596  		return true
   597  	case OpCom64:
   598  		v.Op = OpARM64MVN
   599  		return true
   600  	case OpCom8:
   601  		v.Op = OpARM64MVN
   602  		return true
   603  	case OpCondSelect:
   604  		return rewriteValueARM64_OpCondSelect(v)
   605  	case OpConst16:
   606  		return rewriteValueARM64_OpConst16(v)
   607  	case OpConst32:
   608  		return rewriteValueARM64_OpConst32(v)
   609  	case OpConst32F:
   610  		return rewriteValueARM64_OpConst32F(v)
   611  	case OpConst64:
   612  		return rewriteValueARM64_OpConst64(v)
   613  	case OpConst64F:
   614  		return rewriteValueARM64_OpConst64F(v)
   615  	case OpConst8:
   616  		return rewriteValueARM64_OpConst8(v)
   617  	case OpConstBool:
   618  		return rewriteValueARM64_OpConstBool(v)
   619  	case OpConstNil:
   620  		return rewriteValueARM64_OpConstNil(v)
   621  	case OpCtz16:
   622  		return rewriteValueARM64_OpCtz16(v)
   623  	case OpCtz16NonZero:
   624  		v.Op = OpCtz32
   625  		return true
   626  	case OpCtz32:
   627  		return rewriteValueARM64_OpCtz32(v)
   628  	case OpCtz32NonZero:
   629  		v.Op = OpCtz32
   630  		return true
   631  	case OpCtz64:
   632  		return rewriteValueARM64_OpCtz64(v)
   633  	case OpCtz64NonZero:
   634  		v.Op = OpCtz64
   635  		return true
   636  	case OpCtz8:
   637  		return rewriteValueARM64_OpCtz8(v)
   638  	case OpCtz8NonZero:
   639  		v.Op = OpCtz32
   640  		return true
   641  	case OpCvt32Fto32:
   642  		v.Op = OpARM64FCVTZSSW
   643  		return true
   644  	case OpCvt32Fto32U:
   645  		v.Op = OpARM64FCVTZUSW
   646  		return true
   647  	case OpCvt32Fto64:
   648  		v.Op = OpARM64FCVTZSS
   649  		return true
   650  	case OpCvt32Fto64F:
   651  		v.Op = OpARM64FCVTSD
   652  		return true
   653  	case OpCvt32Fto64U:
   654  		v.Op = OpARM64FCVTZUS
   655  		return true
   656  	case OpCvt32Uto32F:
   657  		v.Op = OpARM64UCVTFWS
   658  		return true
   659  	case OpCvt32Uto64F:
   660  		v.Op = OpARM64UCVTFWD
   661  		return true
   662  	case OpCvt32to32F:
   663  		v.Op = OpARM64SCVTFWS
   664  		return true
   665  	case OpCvt32to64F:
   666  		v.Op = OpARM64SCVTFWD
   667  		return true
   668  	case OpCvt64Fto32:
   669  		v.Op = OpARM64FCVTZSDW
   670  		return true
   671  	case OpCvt64Fto32F:
   672  		v.Op = OpARM64FCVTDS
   673  		return true
   674  	case OpCvt64Fto32U:
   675  		v.Op = OpARM64FCVTZUDW
   676  		return true
   677  	case OpCvt64Fto64:
   678  		v.Op = OpARM64FCVTZSD
   679  		return true
   680  	case OpCvt64Fto64U:
   681  		v.Op = OpARM64FCVTZUD
   682  		return true
   683  	case OpCvt64Uto32F:
   684  		v.Op = OpARM64UCVTFS
   685  		return true
   686  	case OpCvt64Uto64F:
   687  		v.Op = OpARM64UCVTFD
   688  		return true
   689  	case OpCvt64to32F:
   690  		v.Op = OpARM64SCVTFS
   691  		return true
   692  	case OpCvt64to64F:
   693  		v.Op = OpARM64SCVTFD
   694  		return true
   695  	case OpCvtBoolToUint8:
   696  		v.Op = OpCopy
   697  		return true
   698  	case OpDiv16:
   699  		return rewriteValueARM64_OpDiv16(v)
   700  	case OpDiv16u:
   701  		return rewriteValueARM64_OpDiv16u(v)
   702  	case OpDiv32:
   703  		return rewriteValueARM64_OpDiv32(v)
   704  	case OpDiv32F:
   705  		v.Op = OpARM64FDIVS
   706  		return true
   707  	case OpDiv32u:
   708  		v.Op = OpARM64UDIVW
   709  		return true
   710  	case OpDiv64:
   711  		return rewriteValueARM64_OpDiv64(v)
   712  	case OpDiv64F:
   713  		v.Op = OpARM64FDIVD
   714  		return true
   715  	case OpDiv64u:
   716  		v.Op = OpARM64UDIV
   717  		return true
   718  	case OpDiv8:
   719  		return rewriteValueARM64_OpDiv8(v)
   720  	case OpDiv8u:
   721  		return rewriteValueARM64_OpDiv8u(v)
   722  	case OpEq16:
   723  		return rewriteValueARM64_OpEq16(v)
   724  	case OpEq32:
   725  		return rewriteValueARM64_OpEq32(v)
   726  	case OpEq32F:
   727  		return rewriteValueARM64_OpEq32F(v)
   728  	case OpEq64:
   729  		return rewriteValueARM64_OpEq64(v)
   730  	case OpEq64F:
   731  		return rewriteValueARM64_OpEq64F(v)
   732  	case OpEq8:
   733  		return rewriteValueARM64_OpEq8(v)
   734  	case OpEqB:
   735  		return rewriteValueARM64_OpEqB(v)
   736  	case OpEqPtr:
   737  		return rewriteValueARM64_OpEqPtr(v)
   738  	case OpFMA:
   739  		return rewriteValueARM64_OpFMA(v)
   740  	case OpFloor:
   741  		v.Op = OpARM64FRINTMD
   742  		return true
   743  	case OpGetCallerPC:
   744  		v.Op = OpARM64LoweredGetCallerPC
   745  		return true
   746  	case OpGetCallerSP:
   747  		v.Op = OpARM64LoweredGetCallerSP
   748  		return true
   749  	case OpGetClosurePtr:
   750  		v.Op = OpARM64LoweredGetClosurePtr
   751  		return true
   752  	case OpHmul32:
   753  		return rewriteValueARM64_OpHmul32(v)
   754  	case OpHmul32u:
   755  		return rewriteValueARM64_OpHmul32u(v)
   756  	case OpHmul64:
   757  		v.Op = OpARM64MULH
   758  		return true
   759  	case OpHmul64u:
   760  		v.Op = OpARM64UMULH
   761  		return true
   762  	case OpInterCall:
   763  		v.Op = OpARM64CALLinter
   764  		return true
   765  	case OpIsInBounds:
   766  		return rewriteValueARM64_OpIsInBounds(v)
   767  	case OpIsNonNil:
   768  		return rewriteValueARM64_OpIsNonNil(v)
   769  	case OpIsSliceInBounds:
   770  		return rewriteValueARM64_OpIsSliceInBounds(v)
   771  	case OpLeq16:
   772  		return rewriteValueARM64_OpLeq16(v)
   773  	case OpLeq16U:
   774  		return rewriteValueARM64_OpLeq16U(v)
   775  	case OpLeq32:
   776  		return rewriteValueARM64_OpLeq32(v)
   777  	case OpLeq32F:
   778  		return rewriteValueARM64_OpLeq32F(v)
   779  	case OpLeq32U:
   780  		return rewriteValueARM64_OpLeq32U(v)
   781  	case OpLeq64:
   782  		return rewriteValueARM64_OpLeq64(v)
   783  	case OpLeq64F:
   784  		return rewriteValueARM64_OpLeq64F(v)
   785  	case OpLeq64U:
   786  		return rewriteValueARM64_OpLeq64U(v)
   787  	case OpLeq8:
   788  		return rewriteValueARM64_OpLeq8(v)
   789  	case OpLeq8U:
   790  		return rewriteValueARM64_OpLeq8U(v)
   791  	case OpLess16:
   792  		return rewriteValueARM64_OpLess16(v)
   793  	case OpLess16U:
   794  		return rewriteValueARM64_OpLess16U(v)
   795  	case OpLess32:
   796  		return rewriteValueARM64_OpLess32(v)
   797  	case OpLess32F:
   798  		return rewriteValueARM64_OpLess32F(v)
   799  	case OpLess32U:
   800  		return rewriteValueARM64_OpLess32U(v)
   801  	case OpLess64:
   802  		return rewriteValueARM64_OpLess64(v)
   803  	case OpLess64F:
   804  		return rewriteValueARM64_OpLess64F(v)
   805  	case OpLess64U:
   806  		return rewriteValueARM64_OpLess64U(v)
   807  	case OpLess8:
   808  		return rewriteValueARM64_OpLess8(v)
   809  	case OpLess8U:
   810  		return rewriteValueARM64_OpLess8U(v)
   811  	case OpLoad:
   812  		return rewriteValueARM64_OpLoad(v)
   813  	case OpLocalAddr:
   814  		return rewriteValueARM64_OpLocalAddr(v)
   815  	case OpLsh16x16:
   816  		return rewriteValueARM64_OpLsh16x16(v)
   817  	case OpLsh16x32:
   818  		return rewriteValueARM64_OpLsh16x32(v)
   819  	case OpLsh16x64:
   820  		return rewriteValueARM64_OpLsh16x64(v)
   821  	case OpLsh16x8:
   822  		return rewriteValueARM64_OpLsh16x8(v)
   823  	case OpLsh32x16:
   824  		return rewriteValueARM64_OpLsh32x16(v)
   825  	case OpLsh32x32:
   826  		return rewriteValueARM64_OpLsh32x32(v)
   827  	case OpLsh32x64:
   828  		return rewriteValueARM64_OpLsh32x64(v)
   829  	case OpLsh32x8:
   830  		return rewriteValueARM64_OpLsh32x8(v)
   831  	case OpLsh64x16:
   832  		return rewriteValueARM64_OpLsh64x16(v)
   833  	case OpLsh64x32:
   834  		return rewriteValueARM64_OpLsh64x32(v)
   835  	case OpLsh64x64:
   836  		return rewriteValueARM64_OpLsh64x64(v)
   837  	case OpLsh64x8:
   838  		return rewriteValueARM64_OpLsh64x8(v)
   839  	case OpLsh8x16:
   840  		return rewriteValueARM64_OpLsh8x16(v)
   841  	case OpLsh8x32:
   842  		return rewriteValueARM64_OpLsh8x32(v)
   843  	case OpLsh8x64:
   844  		return rewriteValueARM64_OpLsh8x64(v)
   845  	case OpLsh8x8:
   846  		return rewriteValueARM64_OpLsh8x8(v)
   847  	case OpMax32F:
   848  		v.Op = OpARM64FMAXS
   849  		return true
   850  	case OpMax64F:
   851  		v.Op = OpARM64FMAXD
   852  		return true
   853  	case OpMemEq:
   854  		v.Op = OpARM64LoweredMemEq
   855  		return true
   856  	case OpMin32F:
   857  		v.Op = OpARM64FMINS
   858  		return true
   859  	case OpMin64F:
   860  		v.Op = OpARM64FMIND
   861  		return true
   862  	case OpMod16:
   863  		return rewriteValueARM64_OpMod16(v)
   864  	case OpMod16u:
   865  		return rewriteValueARM64_OpMod16u(v)
   866  	case OpMod32:
   867  		return rewriteValueARM64_OpMod32(v)
   868  	case OpMod32u:
   869  		v.Op = OpARM64UMODW
   870  		return true
   871  	case OpMod64:
   872  		return rewriteValueARM64_OpMod64(v)
   873  	case OpMod64u:
   874  		v.Op = OpARM64UMOD
   875  		return true
   876  	case OpMod8:
   877  		return rewriteValueARM64_OpMod8(v)
   878  	case OpMod8u:
   879  		return rewriteValueARM64_OpMod8u(v)
   880  	case OpMove:
   881  		return rewriteValueARM64_OpMove(v)
   882  	case OpMul16:
   883  		v.Op = OpARM64MULW
   884  		return true
   885  	case OpMul32:
   886  		v.Op = OpARM64MULW
   887  		return true
   888  	case OpMul32F:
   889  		v.Op = OpARM64FMULS
   890  		return true
   891  	case OpMul64:
   892  		v.Op = OpARM64MUL
   893  		return true
   894  	case OpMul64F:
   895  		v.Op = OpARM64FMULD
   896  		return true
   897  	case OpMul8:
   898  		v.Op = OpARM64MULW
   899  		return true
   900  	case OpNeg16:
   901  		v.Op = OpARM64NEG
   902  		return true
   903  	case OpNeg32:
   904  		v.Op = OpARM64NEG
   905  		return true
   906  	case OpNeg32F:
   907  		v.Op = OpARM64FNEGS
   908  		return true
   909  	case OpNeg64:
   910  		v.Op = OpARM64NEG
   911  		return true
   912  	case OpNeg64F:
   913  		v.Op = OpARM64FNEGD
   914  		return true
   915  	case OpNeg8:
   916  		v.Op = OpARM64NEG
   917  		return true
   918  	case OpNeq16:
   919  		return rewriteValueARM64_OpNeq16(v)
   920  	case OpNeq32:
   921  		return rewriteValueARM64_OpNeq32(v)
   922  	case OpNeq32F:
   923  		return rewriteValueARM64_OpNeq32F(v)
   924  	case OpNeq64:
   925  		return rewriteValueARM64_OpNeq64(v)
   926  	case OpNeq64F:
   927  		return rewriteValueARM64_OpNeq64F(v)
   928  	case OpNeq8:
   929  		return rewriteValueARM64_OpNeq8(v)
   930  	case OpNeqB:
   931  		v.Op = OpARM64XOR
   932  		return true
   933  	case OpNeqPtr:
   934  		return rewriteValueARM64_OpNeqPtr(v)
   935  	case OpNilCheck:
   936  		v.Op = OpARM64LoweredNilCheck
   937  		return true
   938  	case OpNot:
   939  		return rewriteValueARM64_OpNot(v)
   940  	case OpOffPtr:
   941  		return rewriteValueARM64_OpOffPtr(v)
   942  	case OpOr16:
   943  		v.Op = OpARM64OR
   944  		return true
   945  	case OpOr32:
   946  		v.Op = OpARM64OR
   947  		return true
   948  	case OpOr64:
   949  		v.Op = OpARM64OR
   950  		return true
   951  	case OpOr8:
   952  		v.Op = OpARM64OR
   953  		return true
   954  	case OpOrB:
   955  		v.Op = OpARM64OR
   956  		return true
   957  	case OpPanicBounds:
   958  		v.Op = OpARM64LoweredPanicBoundsRR
   959  		return true
   960  	case OpPopCount16:
   961  		return rewriteValueARM64_OpPopCount16(v)
   962  	case OpPopCount32:
   963  		return rewriteValueARM64_OpPopCount32(v)
   964  	case OpPopCount64:
   965  		return rewriteValueARM64_OpPopCount64(v)
   966  	case OpPrefetchCache:
   967  		return rewriteValueARM64_OpPrefetchCache(v)
   968  	case OpPrefetchCacheStreamed:
   969  		return rewriteValueARM64_OpPrefetchCacheStreamed(v)
   970  	case OpPubBarrier:
   971  		return rewriteValueARM64_OpPubBarrier(v)
   972  	case OpRotateLeft16:
   973  		return rewriteValueARM64_OpRotateLeft16(v)
   974  	case OpRotateLeft32:
   975  		return rewriteValueARM64_OpRotateLeft32(v)
   976  	case OpRotateLeft64:
   977  		return rewriteValueARM64_OpRotateLeft64(v)
   978  	case OpRotateLeft8:
   979  		return rewriteValueARM64_OpRotateLeft8(v)
   980  	case OpRound:
   981  		v.Op = OpARM64FRINTAD
   982  		return true
   983  	case OpRound32F:
   984  		v.Op = OpARM64LoweredRound32F
   985  		return true
   986  	case OpRound64F:
   987  		v.Op = OpARM64LoweredRound64F
   988  		return true
   989  	case OpRoundToEven:
   990  		v.Op = OpARM64FRINTND
   991  		return true
   992  	case OpRsh16Ux16:
   993  		return rewriteValueARM64_OpRsh16Ux16(v)
   994  	case OpRsh16Ux32:
   995  		return rewriteValueARM64_OpRsh16Ux32(v)
   996  	case OpRsh16Ux64:
   997  		return rewriteValueARM64_OpRsh16Ux64(v)
   998  	case OpRsh16Ux8:
   999  		return rewriteValueARM64_OpRsh16Ux8(v)
  1000  	case OpRsh16x16:
  1001  		return rewriteValueARM64_OpRsh16x16(v)
  1002  	case OpRsh16x32:
  1003  		return rewriteValueARM64_OpRsh16x32(v)
  1004  	case OpRsh16x64:
  1005  		return rewriteValueARM64_OpRsh16x64(v)
  1006  	case OpRsh16x8:
  1007  		return rewriteValueARM64_OpRsh16x8(v)
  1008  	case OpRsh32Ux16:
  1009  		return rewriteValueARM64_OpRsh32Ux16(v)
  1010  	case OpRsh32Ux32:
  1011  		return rewriteValueARM64_OpRsh32Ux32(v)
  1012  	case OpRsh32Ux64:
  1013  		return rewriteValueARM64_OpRsh32Ux64(v)
  1014  	case OpRsh32Ux8:
  1015  		return rewriteValueARM64_OpRsh32Ux8(v)
  1016  	case OpRsh32x16:
  1017  		return rewriteValueARM64_OpRsh32x16(v)
  1018  	case OpRsh32x32:
  1019  		return rewriteValueARM64_OpRsh32x32(v)
  1020  	case OpRsh32x64:
  1021  		return rewriteValueARM64_OpRsh32x64(v)
  1022  	case OpRsh32x8:
  1023  		return rewriteValueARM64_OpRsh32x8(v)
  1024  	case OpRsh64Ux16:
  1025  		return rewriteValueARM64_OpRsh64Ux16(v)
  1026  	case OpRsh64Ux32:
  1027  		return rewriteValueARM64_OpRsh64Ux32(v)
  1028  	case OpRsh64Ux64:
  1029  		return rewriteValueARM64_OpRsh64Ux64(v)
  1030  	case OpRsh64Ux8:
  1031  		return rewriteValueARM64_OpRsh64Ux8(v)
  1032  	case OpRsh64x16:
  1033  		return rewriteValueARM64_OpRsh64x16(v)
  1034  	case OpRsh64x32:
  1035  		return rewriteValueARM64_OpRsh64x32(v)
  1036  	case OpRsh64x64:
  1037  		return rewriteValueARM64_OpRsh64x64(v)
  1038  	case OpRsh64x8:
  1039  		return rewriteValueARM64_OpRsh64x8(v)
  1040  	case OpRsh8Ux16:
  1041  		return rewriteValueARM64_OpRsh8Ux16(v)
  1042  	case OpRsh8Ux32:
  1043  		return rewriteValueARM64_OpRsh8Ux32(v)
  1044  	case OpRsh8Ux64:
  1045  		return rewriteValueARM64_OpRsh8Ux64(v)
  1046  	case OpRsh8Ux8:
  1047  		return rewriteValueARM64_OpRsh8Ux8(v)
  1048  	case OpRsh8x16:
  1049  		return rewriteValueARM64_OpRsh8x16(v)
  1050  	case OpRsh8x32:
  1051  		return rewriteValueARM64_OpRsh8x32(v)
  1052  	case OpRsh8x64:
  1053  		return rewriteValueARM64_OpRsh8x64(v)
  1054  	case OpRsh8x8:
  1055  		return rewriteValueARM64_OpRsh8x8(v)
  1056  	case OpSelect0:
  1057  		return rewriteValueARM64_OpSelect0(v)
  1058  	case OpSelect1:
  1059  		return rewriteValueARM64_OpSelect1(v)
  1060  	case OpSelectN:
  1061  		return rewriteValueARM64_OpSelectN(v)
  1062  	case OpSignExt16to32:
  1063  		v.Op = OpARM64MOVHreg
  1064  		return true
  1065  	case OpSignExt16to64:
  1066  		v.Op = OpARM64MOVHreg
  1067  		return true
  1068  	case OpSignExt32to64:
  1069  		v.Op = OpARM64MOVWreg
  1070  		return true
  1071  	case OpSignExt8to16:
  1072  		v.Op = OpARM64MOVBreg
  1073  		return true
  1074  	case OpSignExt8to32:
  1075  		v.Op = OpARM64MOVBreg
  1076  		return true
  1077  	case OpSignExt8to64:
  1078  		v.Op = OpARM64MOVBreg
  1079  		return true
  1080  	case OpSlicemask:
  1081  		return rewriteValueARM64_OpSlicemask(v)
  1082  	case OpSqrt:
  1083  		v.Op = OpARM64FSQRTD
  1084  		return true
  1085  	case OpSqrt32:
  1086  		v.Op = OpARM64FSQRTS
  1087  		return true
  1088  	case OpStaticCall:
  1089  		v.Op = OpARM64CALLstatic
  1090  		return true
  1091  	case OpStore:
  1092  		return rewriteValueARM64_OpStore(v)
  1093  	case OpSub16:
  1094  		v.Op = OpARM64SUB
  1095  		return true
  1096  	case OpSub32:
  1097  		v.Op = OpARM64SUB
  1098  		return true
  1099  	case OpSub32F:
  1100  		v.Op = OpARM64FSUBS
  1101  		return true
  1102  	case OpSub64:
  1103  		v.Op = OpARM64SUB
  1104  		return true
  1105  	case OpSub64F:
  1106  		v.Op = OpARM64FSUBD
  1107  		return true
  1108  	case OpSub8:
  1109  		v.Op = OpARM64SUB
  1110  		return true
  1111  	case OpSubPtr:
  1112  		v.Op = OpARM64SUB
  1113  		return true
  1114  	case OpTailCall:
  1115  		v.Op = OpARM64CALLtail
  1116  		return true
  1117  	case OpTailCallInter:
  1118  		v.Op = OpARM64CALLtailinter
  1119  		return true
  1120  	case OpTrunc:
  1121  		v.Op = OpARM64FRINTZD
  1122  		return true
  1123  	case OpTrunc16to8:
  1124  		v.Op = OpCopy
  1125  		return true
  1126  	case OpTrunc32to16:
  1127  		v.Op = OpCopy
  1128  		return true
  1129  	case OpTrunc32to8:
  1130  		v.Op = OpCopy
  1131  		return true
  1132  	case OpTrunc64to16:
  1133  		v.Op = OpCopy
  1134  		return true
  1135  	case OpTrunc64to32:
  1136  		v.Op = OpCopy
  1137  		return true
  1138  	case OpTrunc64to8:
  1139  		v.Op = OpCopy
  1140  		return true
  1141  	case OpWB:
  1142  		v.Op = OpARM64LoweredWB
  1143  		return true
  1144  	case OpXor16:
  1145  		v.Op = OpARM64XOR
  1146  		return true
  1147  	case OpXor32:
  1148  		v.Op = OpARM64XOR
  1149  		return true
  1150  	case OpXor64:
  1151  		v.Op = OpARM64XOR
  1152  		return true
  1153  	case OpXor8:
  1154  		v.Op = OpARM64XOR
  1155  		return true
  1156  	case OpZero:
  1157  		return rewriteValueARM64_OpZero(v)
  1158  	case OpZeroExt16to32:
  1159  		v.Op = OpARM64MOVHUreg
  1160  		return true
  1161  	case OpZeroExt16to64:
  1162  		v.Op = OpARM64MOVHUreg
  1163  		return true
  1164  	case OpZeroExt32to64:
  1165  		v.Op = OpARM64MOVWUreg
  1166  		return true
  1167  	case OpZeroExt8to16:
  1168  		v.Op = OpARM64MOVBUreg
  1169  		return true
  1170  	case OpZeroExt8to32:
  1171  		v.Op = OpARM64MOVBUreg
  1172  		return true
  1173  	case OpZeroExt8to64:
  1174  		v.Op = OpARM64MOVBUreg
  1175  		return true
  1176  	}
  1177  	return false
  1178  }
  1179  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  1180  	v_2 := v.Args[2]
  1181  	v_1 := v.Args[1]
  1182  	v_0 := v.Args[0]
  1183  	b := v.Block
  1184  	typ := &b.Func.Config.Types
  1185  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  1186  	// result: (ADCSflags x y c)
  1187  	for {
  1188  		x := v_0
  1189  		y := v_1
  1190  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1191  			break
  1192  		}
  1193  		v_2_0 := v_2.Args[0]
  1194  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1195  			break
  1196  		}
  1197  		v_2_0_0 := v_2_0.Args[0]
  1198  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  1199  			break
  1200  		}
  1201  		c := v_2_0_0.Args[0]
  1202  		v.reset(OpARM64ADCSflags)
  1203  		v.AddArg3(x, y, c)
  1204  		return true
  1205  	}
  1206  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  1207  	// result: (ADDSflags x y)
  1208  	for {
  1209  		x := v_0
  1210  		y := v_1
  1211  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1212  			break
  1213  		}
  1214  		v_2_0 := v_2.Args[0]
  1215  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1216  			break
  1217  		}
  1218  		v_2_0_0 := v_2_0.Args[0]
  1219  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  1220  			break
  1221  		}
  1222  		v.reset(OpARM64ADDSflags)
  1223  		v.AddArg2(x, y)
  1224  		return true
  1225  	}
  1226  	return false
  1227  }
  1228  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  1229  	v_1 := v.Args[1]
  1230  	v_0 := v.Args[0]
  1231  	b := v.Block
  1232  	// match: (ADD x (MOVDconst <t> [c]))
  1233  	// cond: !t.IsPtr()
  1234  	// result: (ADDconst [c] x)
  1235  	for {
  1236  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1237  			x := v_0
  1238  			if v_1.Op != OpARM64MOVDconst {
  1239  				continue
  1240  			}
  1241  			t := v_1.Type
  1242  			c := auxIntToInt64(v_1.AuxInt)
  1243  			if !(!t.IsPtr()) {
  1244  				continue
  1245  			}
  1246  			v.reset(OpARM64ADDconst)
  1247  			v.AuxInt = int64ToAuxInt(c)
  1248  			v.AddArg(x)
  1249  			return true
  1250  		}
  1251  		break
  1252  	}
  1253  	// match: (ADD a l:(MUL x y))
  1254  	// cond: l.Uses==1 && clobber(l)
  1255  	// result: (MADD a x y)
  1256  	for {
  1257  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1258  			a := v_0
  1259  			l := v_1
  1260  			if l.Op != OpARM64MUL {
  1261  				continue
  1262  			}
  1263  			y := l.Args[1]
  1264  			x := l.Args[0]
  1265  			if !(l.Uses == 1 && clobber(l)) {
  1266  				continue
  1267  			}
  1268  			v.reset(OpARM64MADD)
  1269  			v.AddArg3(a, x, y)
  1270  			return true
  1271  		}
  1272  		break
  1273  	}
  1274  	// match: (ADD a l:(MNEG x y))
  1275  	// cond: l.Uses==1 && clobber(l)
  1276  	// result: (MSUB a x y)
  1277  	for {
  1278  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1279  			a := v_0
  1280  			l := v_1
  1281  			if l.Op != OpARM64MNEG {
  1282  				continue
  1283  			}
  1284  			y := l.Args[1]
  1285  			x := l.Args[0]
  1286  			if !(l.Uses == 1 && clobber(l)) {
  1287  				continue
  1288  			}
  1289  			v.reset(OpARM64MSUB)
  1290  			v.AddArg3(a, x, y)
  1291  			return true
  1292  		}
  1293  		break
  1294  	}
  1295  	// match: (ADD a l:(MULW x y))
  1296  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1297  	// result: (MADDW a x y)
  1298  	for {
  1299  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1300  			a := v_0
  1301  			l := v_1
  1302  			if l.Op != OpARM64MULW {
  1303  				continue
  1304  			}
  1305  			y := l.Args[1]
  1306  			x := l.Args[0]
  1307  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1308  				continue
  1309  			}
  1310  			v.reset(OpARM64MADDW)
  1311  			v.AddArg3(a, x, y)
  1312  			return true
  1313  		}
  1314  		break
  1315  	}
  1316  	// match: (ADD a l:(MNEGW x y))
  1317  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1318  	// result: (MSUBW a x y)
  1319  	for {
  1320  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1321  			a := v_0
  1322  			l := v_1
  1323  			if l.Op != OpARM64MNEGW {
  1324  				continue
  1325  			}
  1326  			y := l.Args[1]
  1327  			x := l.Args[0]
  1328  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1329  				continue
  1330  			}
  1331  			v.reset(OpARM64MSUBW)
  1332  			v.AddArg3(a, x, y)
  1333  			return true
  1334  		}
  1335  		break
  1336  	}
  1337  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  1338  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1339  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1340  	for {
  1341  		t := v.Type
  1342  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1343  			a := v_0
  1344  			p := v_1
  1345  			if p.Op != OpARM64ADDconst {
  1346  				continue
  1347  			}
  1348  			c := auxIntToInt64(p.AuxInt)
  1349  			m := p.Args[0]
  1350  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1351  				continue
  1352  			}
  1353  			v.reset(OpARM64ADDconst)
  1354  			v.AuxInt = int64ToAuxInt(c)
  1355  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1356  			v0.AddArg2(a, m)
  1357  			v.AddArg(v0)
  1358  			return true
  1359  		}
  1360  		break
  1361  	}
  1362  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  1363  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1364  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1365  	for {
  1366  		t := v.Type
  1367  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1368  			a := v_0
  1369  			p := v_1
  1370  			if p.Op != OpARM64ADDconst {
  1371  				continue
  1372  			}
  1373  			c := auxIntToInt64(p.AuxInt)
  1374  			m := p.Args[0]
  1375  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1376  				continue
  1377  			}
  1378  			v.reset(OpARM64ADDconst)
  1379  			v.AuxInt = int64ToAuxInt(c)
  1380  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1381  			v0.AddArg2(a, m)
  1382  			v.AddArg(v0)
  1383  			return true
  1384  		}
  1385  		break
  1386  	}
  1387  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  1388  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1389  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1390  	for {
  1391  		t := v.Type
  1392  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1393  			a := v_0
  1394  			p := v_1
  1395  			if p.Op != OpARM64ADDconst {
  1396  				continue
  1397  			}
  1398  			c := auxIntToInt64(p.AuxInt)
  1399  			m := p.Args[0]
  1400  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1401  				continue
  1402  			}
  1403  			v.reset(OpARM64ADDconst)
  1404  			v.AuxInt = int64ToAuxInt(c)
  1405  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1406  			v0.AddArg2(a, m)
  1407  			v.AddArg(v0)
  1408  			return true
  1409  		}
  1410  		break
  1411  	}
  1412  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  1413  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1414  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1415  	for {
  1416  		t := v.Type
  1417  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1418  			a := v_0
  1419  			p := v_1
  1420  			if p.Op != OpARM64ADDconst {
  1421  				continue
  1422  			}
  1423  			c := auxIntToInt64(p.AuxInt)
  1424  			m := p.Args[0]
  1425  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1426  				continue
  1427  			}
  1428  			v.reset(OpARM64ADDconst)
  1429  			v.AuxInt = int64ToAuxInt(c)
  1430  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1431  			v0.AddArg2(a, m)
  1432  			v.AddArg(v0)
  1433  			return true
  1434  		}
  1435  		break
  1436  	}
  1437  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  1438  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1439  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1440  	for {
  1441  		t := v.Type
  1442  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1443  			a := v_0
  1444  			p := v_1
  1445  			if p.Op != OpARM64SUBconst {
  1446  				continue
  1447  			}
  1448  			c := auxIntToInt64(p.AuxInt)
  1449  			m := p.Args[0]
  1450  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1451  				continue
  1452  			}
  1453  			v.reset(OpARM64SUBconst)
  1454  			v.AuxInt = int64ToAuxInt(c)
  1455  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1456  			v0.AddArg2(a, m)
  1457  			v.AddArg(v0)
  1458  			return true
  1459  		}
  1460  		break
  1461  	}
  1462  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  1463  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1464  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1465  	for {
  1466  		t := v.Type
  1467  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1468  			a := v_0
  1469  			p := v_1
  1470  			if p.Op != OpARM64SUBconst {
  1471  				continue
  1472  			}
  1473  			c := auxIntToInt64(p.AuxInt)
  1474  			m := p.Args[0]
  1475  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1476  				continue
  1477  			}
  1478  			v.reset(OpARM64SUBconst)
  1479  			v.AuxInt = int64ToAuxInt(c)
  1480  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1481  			v0.AddArg2(a, m)
  1482  			v.AddArg(v0)
  1483  			return true
  1484  		}
  1485  		break
  1486  	}
  1487  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  1488  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1489  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1490  	for {
  1491  		t := v.Type
  1492  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1493  			a := v_0
  1494  			p := v_1
  1495  			if p.Op != OpARM64SUBconst {
  1496  				continue
  1497  			}
  1498  			c := auxIntToInt64(p.AuxInt)
  1499  			m := p.Args[0]
  1500  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1501  				continue
  1502  			}
  1503  			v.reset(OpARM64SUBconst)
  1504  			v.AuxInt = int64ToAuxInt(c)
  1505  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1506  			v0.AddArg2(a, m)
  1507  			v.AddArg(v0)
  1508  			return true
  1509  		}
  1510  		break
  1511  	}
  1512  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  1513  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1514  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1515  	for {
  1516  		t := v.Type
  1517  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1518  			a := v_0
  1519  			p := v_1
  1520  			if p.Op != OpARM64SUBconst {
  1521  				continue
  1522  			}
  1523  			c := auxIntToInt64(p.AuxInt)
  1524  			m := p.Args[0]
  1525  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1526  				continue
  1527  			}
  1528  			v.reset(OpARM64SUBconst)
  1529  			v.AuxInt = int64ToAuxInt(c)
  1530  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1531  			v0.AddArg2(a, m)
  1532  			v.AddArg(v0)
  1533  			return true
  1534  		}
  1535  		break
  1536  	}
  1537  	// match: (ADD x (NEG y))
  1538  	// result: (SUB x y)
  1539  	for {
  1540  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1541  			x := v_0
  1542  			if v_1.Op != OpARM64NEG {
  1543  				continue
  1544  			}
  1545  			y := v_1.Args[0]
  1546  			v.reset(OpARM64SUB)
  1547  			v.AddArg2(x, y)
  1548  			return true
  1549  		}
  1550  		break
  1551  	}
  1552  	// match: (ADD x0 x1:(SLLconst [c] y))
  1553  	// cond: clobberIfDead(x1)
  1554  	// result: (ADDshiftLL x0 y [c])
  1555  	for {
  1556  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1557  			x0 := v_0
  1558  			x1 := v_1
  1559  			if x1.Op != OpARM64SLLconst {
  1560  				continue
  1561  			}
  1562  			c := auxIntToInt64(x1.AuxInt)
  1563  			y := x1.Args[0]
  1564  			if !(clobberIfDead(x1)) {
  1565  				continue
  1566  			}
  1567  			v.reset(OpARM64ADDshiftLL)
  1568  			v.AuxInt = int64ToAuxInt(c)
  1569  			v.AddArg2(x0, y)
  1570  			return true
  1571  		}
  1572  		break
  1573  	}
  1574  	// match: (ADD x0 x1:(SRLconst [c] y))
  1575  	// cond: clobberIfDead(x1)
  1576  	// result: (ADDshiftRL x0 y [c])
  1577  	for {
  1578  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1579  			x0 := v_0
  1580  			x1 := v_1
  1581  			if x1.Op != OpARM64SRLconst {
  1582  				continue
  1583  			}
  1584  			c := auxIntToInt64(x1.AuxInt)
  1585  			y := x1.Args[0]
  1586  			if !(clobberIfDead(x1)) {
  1587  				continue
  1588  			}
  1589  			v.reset(OpARM64ADDshiftRL)
  1590  			v.AuxInt = int64ToAuxInt(c)
  1591  			v.AddArg2(x0, y)
  1592  			return true
  1593  		}
  1594  		break
  1595  	}
  1596  	// match: (ADD x0 x1:(SRAconst [c] y))
  1597  	// cond: clobberIfDead(x1)
  1598  	// result: (ADDshiftRA x0 y [c])
  1599  	for {
  1600  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1601  			x0 := v_0
  1602  			x1 := v_1
  1603  			if x1.Op != OpARM64SRAconst {
  1604  				continue
  1605  			}
  1606  			c := auxIntToInt64(x1.AuxInt)
  1607  			y := x1.Args[0]
  1608  			if !(clobberIfDead(x1)) {
  1609  				continue
  1610  			}
  1611  			v.reset(OpARM64ADDshiftRA)
  1612  			v.AuxInt = int64ToAuxInt(c)
  1613  			v.AddArg2(x0, y)
  1614  			return true
  1615  		}
  1616  		break
  1617  	}
  1618  	// match: (ADD x0 x1:(ANDshiftRA x2:(SLLconst [sl] y) z [63]))
  1619  	// cond: x1.Uses == 1 && x2.Uses == 1
  1620  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  1621  	for {
  1622  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1623  			x0 := v_0
  1624  			x1 := v_1
  1625  			if x1.Op != OpARM64ANDshiftRA || auxIntToInt64(x1.AuxInt) != 63 {
  1626  				continue
  1627  			}
  1628  			z := x1.Args[1]
  1629  			x2 := x1.Args[0]
  1630  			if x2.Op != OpARM64SLLconst {
  1631  				continue
  1632  			}
  1633  			sl := auxIntToInt64(x2.AuxInt)
  1634  			y := x2.Args[0]
  1635  			if !(x1.Uses == 1 && x2.Uses == 1) {
  1636  				continue
  1637  			}
  1638  			v.reset(OpARM64ADDshiftLL)
  1639  			v.AuxInt = int64ToAuxInt(sl)
  1640  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  1641  			v0.AuxInt = int64ToAuxInt(63)
  1642  			v0.AddArg2(y, z)
  1643  			v.AddArg2(x0, v0)
  1644  			return true
  1645  		}
  1646  		break
  1647  	}
  1648  	// match: (ADD x0 x1:(ANDshiftLL x2:(SRAconst [63] z) y [sl]))
  1649  	// cond: x1.Uses == 1 && x2.Uses == 1
  1650  	// result: (ADDshiftLL x0 (ANDshiftRA <y.Type> y z [63]) [sl])
  1651  	for {
  1652  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1653  			x0 := v_0
  1654  			x1 := v_1
  1655  			if x1.Op != OpARM64ANDshiftLL {
  1656  				continue
  1657  			}
  1658  			sl := auxIntToInt64(x1.AuxInt)
  1659  			y := x1.Args[1]
  1660  			x2 := x1.Args[0]
  1661  			if x2.Op != OpARM64SRAconst || auxIntToInt64(x2.AuxInt) != 63 {
  1662  				continue
  1663  			}
  1664  			z := x2.Args[0]
  1665  			if !(x1.Uses == 1 && x2.Uses == 1) {
  1666  				continue
  1667  			}
  1668  			v.reset(OpARM64ADDshiftLL)
  1669  			v.AuxInt = int64ToAuxInt(sl)
  1670  			v0 := b.NewValue0(v.Pos, OpARM64ANDshiftRA, y.Type)
  1671  			v0.AuxInt = int64ToAuxInt(63)
  1672  			v0.AddArg2(y, z)
  1673  			v.AddArg2(x0, v0)
  1674  			return true
  1675  		}
  1676  		break
  1677  	}
  1678  	return false
  1679  }
  1680  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  1681  	v_1 := v.Args[1]
  1682  	v_0 := v.Args[0]
  1683  	// match: (ADDSflags x (MOVDconst [c]))
  1684  	// result: (ADDSconstflags [c] x)
  1685  	for {
  1686  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1687  			x := v_0
  1688  			if v_1.Op != OpARM64MOVDconst {
  1689  				continue
  1690  			}
  1691  			c := auxIntToInt64(v_1.AuxInt)
  1692  			v.reset(OpARM64ADDSconstflags)
  1693  			v.AuxInt = int64ToAuxInt(c)
  1694  			v.AddArg(x)
  1695  			return true
  1696  		}
  1697  		break
  1698  	}
  1699  	return false
  1700  }
  1701  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  1702  	v_0 := v.Args[0]
  1703  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  1704  	// cond: is32Bit(off1+int64(off2))
  1705  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  1706  	for {
  1707  		off1 := auxIntToInt64(v.AuxInt)
  1708  		if v_0.Op != OpARM64MOVDaddr {
  1709  			break
  1710  		}
  1711  		off2 := auxIntToInt32(v_0.AuxInt)
  1712  		sym := auxToSym(v_0.Aux)
  1713  		ptr := v_0.Args[0]
  1714  		if !(is32Bit(off1 + int64(off2))) {
  1715  			break
  1716  		}
  1717  		v.reset(OpARM64MOVDaddr)
  1718  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  1719  		v.Aux = symToAux(sym)
  1720  		v.AddArg(ptr)
  1721  		return true
  1722  	}
  1723  	// match: (ADDconst [c] y)
  1724  	// cond: c < 0
  1725  	// result: (SUBconst [-c] y)
  1726  	for {
  1727  		c := auxIntToInt64(v.AuxInt)
  1728  		y := v_0
  1729  		if !(c < 0) {
  1730  			break
  1731  		}
  1732  		v.reset(OpARM64SUBconst)
  1733  		v.AuxInt = int64ToAuxInt(-c)
  1734  		v.AddArg(y)
  1735  		return true
  1736  	}
  1737  	// match: (ADDconst [0] x)
  1738  	// result: x
  1739  	for {
  1740  		if auxIntToInt64(v.AuxInt) != 0 {
  1741  			break
  1742  		}
  1743  		x := v_0
  1744  		v.copyOf(x)
  1745  		return true
  1746  	}
  1747  	// match: (ADDconst [c] (MOVDconst [d]))
  1748  	// result: (MOVDconst [c+d])
  1749  	for {
  1750  		c := auxIntToInt64(v.AuxInt)
  1751  		if v_0.Op != OpARM64MOVDconst {
  1752  			break
  1753  		}
  1754  		d := auxIntToInt64(v_0.AuxInt)
  1755  		v.reset(OpARM64MOVDconst)
  1756  		v.AuxInt = int64ToAuxInt(c + d)
  1757  		return true
  1758  	}
  1759  	// match: (ADDconst [c] (ADDconst [d] x))
  1760  	// result: (ADDconst [c+d] x)
  1761  	for {
  1762  		c := auxIntToInt64(v.AuxInt)
  1763  		if v_0.Op != OpARM64ADDconst {
  1764  			break
  1765  		}
  1766  		d := auxIntToInt64(v_0.AuxInt)
  1767  		x := v_0.Args[0]
  1768  		v.reset(OpARM64ADDconst)
  1769  		v.AuxInt = int64ToAuxInt(c + d)
  1770  		v.AddArg(x)
  1771  		return true
  1772  	}
  1773  	// match: (ADDconst [c] (SUBconst [d] x))
  1774  	// result: (ADDconst [c-d] x)
  1775  	for {
  1776  		c := auxIntToInt64(v.AuxInt)
  1777  		if v_0.Op != OpARM64SUBconst {
  1778  			break
  1779  		}
  1780  		d := auxIntToInt64(v_0.AuxInt)
  1781  		x := v_0.Args[0]
  1782  		v.reset(OpARM64ADDconst)
  1783  		v.AuxInt = int64ToAuxInt(c - d)
  1784  		v.AddArg(x)
  1785  		return true
  1786  	}
  1787  	return false
  1788  }
  1789  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  1790  	v_1 := v.Args[1]
  1791  	v_0 := v.Args[0]
  1792  	b := v.Block
  1793  	typ := &b.Func.Config.Types
  1794  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  1795  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  1796  	for {
  1797  		d := auxIntToInt64(v.AuxInt)
  1798  		if v_0.Op != OpARM64MOVDconst {
  1799  			break
  1800  		}
  1801  		c := auxIntToInt64(v_0.AuxInt)
  1802  		x := v_1
  1803  		v.reset(OpARM64ADDconst)
  1804  		v.AuxInt = int64ToAuxInt(c)
  1805  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  1806  		v0.AuxInt = int64ToAuxInt(d)
  1807  		v0.AddArg(x)
  1808  		v.AddArg(v0)
  1809  		return true
  1810  	}
  1811  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  1812  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  1813  	for {
  1814  		d := auxIntToInt64(v.AuxInt)
  1815  		x := v_0
  1816  		if v_1.Op != OpARM64MOVDconst {
  1817  			break
  1818  		}
  1819  		c := auxIntToInt64(v_1.AuxInt)
  1820  		v.reset(OpARM64ADDconst)
  1821  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  1822  		v.AddArg(x)
  1823  		return true
  1824  	}
  1825  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  1826  	// result: (REV16W x)
  1827  	for {
  1828  		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) {
  1829  			break
  1830  		}
  1831  		x := v_0.Args[0]
  1832  		if x != v_1 {
  1833  			break
  1834  		}
  1835  		v.reset(OpARM64REV16W)
  1836  		v.AddArg(x)
  1837  		return true
  1838  	}
  1839  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  1840  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1841  	// result: (REV16W x)
  1842  	for {
  1843  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  1844  			break
  1845  		}
  1846  		v_0_0 := v_0.Args[0]
  1847  		if v_0_0.Op != OpARM64ANDconst {
  1848  			break
  1849  		}
  1850  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1851  		x := v_0_0.Args[0]
  1852  		if v_1.Op != OpARM64ANDconst {
  1853  			break
  1854  		}
  1855  		c2 := auxIntToInt64(v_1.AuxInt)
  1856  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1857  			break
  1858  		}
  1859  		v.reset(OpARM64REV16W)
  1860  		v.AddArg(x)
  1861  		return true
  1862  	}
  1863  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1864  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  1865  	// result: (REV16 x)
  1866  	for {
  1867  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1868  			break
  1869  		}
  1870  		v_0_0 := v_0.Args[0]
  1871  		if v_0_0.Op != OpARM64ANDconst {
  1872  			break
  1873  		}
  1874  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1875  		x := v_0_0.Args[0]
  1876  		if v_1.Op != OpARM64ANDconst {
  1877  			break
  1878  		}
  1879  		c2 := auxIntToInt64(v_1.AuxInt)
  1880  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1881  			break
  1882  		}
  1883  		v.reset(OpARM64REV16)
  1884  		v.AddArg(x)
  1885  		return true
  1886  	}
  1887  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1888  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  1889  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  1890  	for {
  1891  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1892  			break
  1893  		}
  1894  		v_0_0 := v_0.Args[0]
  1895  		if v_0_0.Op != OpARM64ANDconst {
  1896  			break
  1897  		}
  1898  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1899  		x := v_0_0.Args[0]
  1900  		if v_1.Op != OpARM64ANDconst {
  1901  			break
  1902  		}
  1903  		c2 := auxIntToInt64(v_1.AuxInt)
  1904  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1905  			break
  1906  		}
  1907  		v.reset(OpARM64REV16)
  1908  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  1909  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  1910  		v0.AddArg(x)
  1911  		v.AddArg(v0)
  1912  		return true
  1913  	}
  1914  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  1915  	// result: (EXTRconst [64-c] x2 x)
  1916  	for {
  1917  		c := auxIntToInt64(v.AuxInt)
  1918  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  1919  			break
  1920  		}
  1921  		x := v_0.Args[0]
  1922  		x2 := v_1
  1923  		v.reset(OpARM64EXTRconst)
  1924  		v.AuxInt = int64ToAuxInt(64 - c)
  1925  		v.AddArg2(x2, x)
  1926  		return true
  1927  	}
  1928  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  1929  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  1930  	// result: (EXTRWconst [32-c] x2 x)
  1931  	for {
  1932  		t := v.Type
  1933  		c := auxIntToInt64(v.AuxInt)
  1934  		if v_0.Op != OpARM64UBFX {
  1935  			break
  1936  		}
  1937  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  1938  		x := v_0.Args[0]
  1939  		x2 := v_1
  1940  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  1941  			break
  1942  		}
  1943  		v.reset(OpARM64EXTRWconst)
  1944  		v.AuxInt = int64ToAuxInt(32 - c)
  1945  		v.AddArg2(x2, x)
  1946  		return true
  1947  	}
  1948  	return false
  1949  }
  1950  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  1951  	v_1 := v.Args[1]
  1952  	v_0 := v.Args[0]
  1953  	b := v.Block
  1954  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  1955  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  1956  	for {
  1957  		d := auxIntToInt64(v.AuxInt)
  1958  		if v_0.Op != OpARM64MOVDconst {
  1959  			break
  1960  		}
  1961  		c := auxIntToInt64(v_0.AuxInt)
  1962  		x := v_1
  1963  		v.reset(OpARM64ADDconst)
  1964  		v.AuxInt = int64ToAuxInt(c)
  1965  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  1966  		v0.AuxInt = int64ToAuxInt(d)
  1967  		v0.AddArg(x)
  1968  		v.AddArg(v0)
  1969  		return true
  1970  	}
  1971  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  1972  	// result: (ADDconst x [c>>uint64(d)])
  1973  	for {
  1974  		d := auxIntToInt64(v.AuxInt)
  1975  		x := v_0
  1976  		if v_1.Op != OpARM64MOVDconst {
  1977  			break
  1978  		}
  1979  		c := auxIntToInt64(v_1.AuxInt)
  1980  		v.reset(OpARM64ADDconst)
  1981  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  1982  		v.AddArg(x)
  1983  		return true
  1984  	}
  1985  	return false
  1986  }
  1987  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  1988  	v_1 := v.Args[1]
  1989  	v_0 := v.Args[0]
  1990  	b := v.Block
  1991  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  1992  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  1993  	for {
  1994  		d := auxIntToInt64(v.AuxInt)
  1995  		if v_0.Op != OpARM64MOVDconst {
  1996  			break
  1997  		}
  1998  		c := auxIntToInt64(v_0.AuxInt)
  1999  		x := v_1
  2000  		v.reset(OpARM64ADDconst)
  2001  		v.AuxInt = int64ToAuxInt(c)
  2002  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2003  		v0.AuxInt = int64ToAuxInt(d)
  2004  		v0.AddArg(x)
  2005  		v.AddArg(v0)
  2006  		return true
  2007  	}
  2008  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  2009  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  2010  	for {
  2011  		d := auxIntToInt64(v.AuxInt)
  2012  		x := v_0
  2013  		if v_1.Op != OpARM64MOVDconst {
  2014  			break
  2015  		}
  2016  		c := auxIntToInt64(v_1.AuxInt)
  2017  		v.reset(OpARM64ADDconst)
  2018  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2019  		v.AddArg(x)
  2020  		return true
  2021  	}
  2022  	return false
  2023  }
  2024  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  2025  	v_1 := v.Args[1]
  2026  	v_0 := v.Args[0]
  2027  	// match: (AND x (MOVDconst [c]))
  2028  	// result: (ANDconst [c] x)
  2029  	for {
  2030  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2031  			x := v_0
  2032  			if v_1.Op != OpARM64MOVDconst {
  2033  				continue
  2034  			}
  2035  			c := auxIntToInt64(v_1.AuxInt)
  2036  			v.reset(OpARM64ANDconst)
  2037  			v.AuxInt = int64ToAuxInt(c)
  2038  			v.AddArg(x)
  2039  			return true
  2040  		}
  2041  		break
  2042  	}
  2043  	// match: (AND x x)
  2044  	// result: x
  2045  	for {
  2046  		x := v_0
  2047  		if x != v_1 {
  2048  			break
  2049  		}
  2050  		v.copyOf(x)
  2051  		return true
  2052  	}
  2053  	// match: (AND x (MVN y))
  2054  	// result: (BIC x y)
  2055  	for {
  2056  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2057  			x := v_0
  2058  			if v_1.Op != OpARM64MVN {
  2059  				continue
  2060  			}
  2061  			y := v_1.Args[0]
  2062  			v.reset(OpARM64BIC)
  2063  			v.AddArg2(x, y)
  2064  			return true
  2065  		}
  2066  		break
  2067  	}
  2068  	// match: (AND x0 x1:(SLLconst [c] y))
  2069  	// cond: clobberIfDead(x1)
  2070  	// result: (ANDshiftLL x0 y [c])
  2071  	for {
  2072  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2073  			x0 := v_0
  2074  			x1 := v_1
  2075  			if x1.Op != OpARM64SLLconst {
  2076  				continue
  2077  			}
  2078  			c := auxIntToInt64(x1.AuxInt)
  2079  			y := x1.Args[0]
  2080  			if !(clobberIfDead(x1)) {
  2081  				continue
  2082  			}
  2083  			v.reset(OpARM64ANDshiftLL)
  2084  			v.AuxInt = int64ToAuxInt(c)
  2085  			v.AddArg2(x0, y)
  2086  			return true
  2087  		}
  2088  		break
  2089  	}
  2090  	// match: (AND x0 x1:(SRLconst [c] y))
  2091  	// cond: clobberIfDead(x1)
  2092  	// result: (ANDshiftRL x0 y [c])
  2093  	for {
  2094  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2095  			x0 := v_0
  2096  			x1 := v_1
  2097  			if x1.Op != OpARM64SRLconst {
  2098  				continue
  2099  			}
  2100  			c := auxIntToInt64(x1.AuxInt)
  2101  			y := x1.Args[0]
  2102  			if !(clobberIfDead(x1)) {
  2103  				continue
  2104  			}
  2105  			v.reset(OpARM64ANDshiftRL)
  2106  			v.AuxInt = int64ToAuxInt(c)
  2107  			v.AddArg2(x0, y)
  2108  			return true
  2109  		}
  2110  		break
  2111  	}
  2112  	// match: (AND x0 x1:(SRAconst [c] y))
  2113  	// cond: clobberIfDead(x1)
  2114  	// result: (ANDshiftRA x0 y [c])
  2115  	for {
  2116  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2117  			x0 := v_0
  2118  			x1 := v_1
  2119  			if x1.Op != OpARM64SRAconst {
  2120  				continue
  2121  			}
  2122  			c := auxIntToInt64(x1.AuxInt)
  2123  			y := x1.Args[0]
  2124  			if !(clobberIfDead(x1)) {
  2125  				continue
  2126  			}
  2127  			v.reset(OpARM64ANDshiftRA)
  2128  			v.AuxInt = int64ToAuxInt(c)
  2129  			v.AddArg2(x0, y)
  2130  			return true
  2131  		}
  2132  		break
  2133  	}
  2134  	// match: (AND x0 x1:(RORconst [c] y))
  2135  	// cond: clobberIfDead(x1)
  2136  	// result: (ANDshiftRO x0 y [c])
  2137  	for {
  2138  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2139  			x0 := v_0
  2140  			x1 := v_1
  2141  			if x1.Op != OpARM64RORconst {
  2142  				continue
  2143  			}
  2144  			c := auxIntToInt64(x1.AuxInt)
  2145  			y := x1.Args[0]
  2146  			if !(clobberIfDead(x1)) {
  2147  				continue
  2148  			}
  2149  			v.reset(OpARM64ANDshiftRO)
  2150  			v.AuxInt = int64ToAuxInt(c)
  2151  			v.AddArg2(x0, y)
  2152  			return true
  2153  		}
  2154  		break
  2155  	}
  2156  	return false
  2157  }
  2158  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  2159  	v_0 := v.Args[0]
  2160  	// match: (ANDconst [0] _)
  2161  	// result: (MOVDconst [0])
  2162  	for {
  2163  		if auxIntToInt64(v.AuxInt) != 0 {
  2164  			break
  2165  		}
  2166  		v.reset(OpARM64MOVDconst)
  2167  		v.AuxInt = int64ToAuxInt(0)
  2168  		return true
  2169  	}
  2170  	// match: (ANDconst [-1] x)
  2171  	// result: x
  2172  	for {
  2173  		if auxIntToInt64(v.AuxInt) != -1 {
  2174  			break
  2175  		}
  2176  		x := v_0
  2177  		v.copyOf(x)
  2178  		return true
  2179  	}
  2180  	// match: (ANDconst [c] (MOVDconst [d]))
  2181  	// result: (MOVDconst [c&d])
  2182  	for {
  2183  		c := auxIntToInt64(v.AuxInt)
  2184  		if v_0.Op != OpARM64MOVDconst {
  2185  			break
  2186  		}
  2187  		d := auxIntToInt64(v_0.AuxInt)
  2188  		v.reset(OpARM64MOVDconst)
  2189  		v.AuxInt = int64ToAuxInt(c & d)
  2190  		return true
  2191  	}
  2192  	// match: (ANDconst [c] (ANDconst [d] x))
  2193  	// result: (ANDconst [c&d] x)
  2194  	for {
  2195  		c := auxIntToInt64(v.AuxInt)
  2196  		if v_0.Op != OpARM64ANDconst {
  2197  			break
  2198  		}
  2199  		d := auxIntToInt64(v_0.AuxInt)
  2200  		x := v_0.Args[0]
  2201  		v.reset(OpARM64ANDconst)
  2202  		v.AuxInt = int64ToAuxInt(c & d)
  2203  		v.AddArg(x)
  2204  		return true
  2205  	}
  2206  	// match: (ANDconst [c] (MOVWUreg x))
  2207  	// result: (ANDconst [c&(1<<32-1)] x)
  2208  	for {
  2209  		c := auxIntToInt64(v.AuxInt)
  2210  		if v_0.Op != OpARM64MOVWUreg {
  2211  			break
  2212  		}
  2213  		x := v_0.Args[0]
  2214  		v.reset(OpARM64ANDconst)
  2215  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  2216  		v.AddArg(x)
  2217  		return true
  2218  	}
  2219  	// match: (ANDconst [c] (MOVHUreg x))
  2220  	// result: (ANDconst [c&(1<<16-1)] x)
  2221  	for {
  2222  		c := auxIntToInt64(v.AuxInt)
  2223  		if v_0.Op != OpARM64MOVHUreg {
  2224  			break
  2225  		}
  2226  		x := v_0.Args[0]
  2227  		v.reset(OpARM64ANDconst)
  2228  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  2229  		v.AddArg(x)
  2230  		return true
  2231  	}
  2232  	// match: (ANDconst [c] (MOVBUreg x))
  2233  	// result: (ANDconst [c&(1<<8-1)] x)
  2234  	for {
  2235  		c := auxIntToInt64(v.AuxInt)
  2236  		if v_0.Op != OpARM64MOVBUreg {
  2237  			break
  2238  		}
  2239  		x := v_0.Args[0]
  2240  		v.reset(OpARM64ANDconst)
  2241  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  2242  		v.AddArg(x)
  2243  		return true
  2244  	}
  2245  	// match: (ANDconst [ac] (SLLconst [sc] x))
  2246  	// cond: isARM64BFMask(sc, ac, sc)
  2247  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  2248  	for {
  2249  		ac := auxIntToInt64(v.AuxInt)
  2250  		if v_0.Op != OpARM64SLLconst {
  2251  			break
  2252  		}
  2253  		sc := auxIntToInt64(v_0.AuxInt)
  2254  		x := v_0.Args[0]
  2255  		if !(isARM64BFMask(sc, ac, sc)) {
  2256  			break
  2257  		}
  2258  		v.reset(OpARM64UBFIZ)
  2259  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  2260  		v.AddArg(x)
  2261  		return true
  2262  	}
  2263  	// match: (ANDconst [ac] (SRLconst [sc] x))
  2264  	// cond: isARM64BFMask(sc, ac, 0)
  2265  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  2266  	for {
  2267  		ac := auxIntToInt64(v.AuxInt)
  2268  		if v_0.Op != OpARM64SRLconst {
  2269  			break
  2270  		}
  2271  		sc := auxIntToInt64(v_0.AuxInt)
  2272  		x := v_0.Args[0]
  2273  		if !(isARM64BFMask(sc, ac, 0)) {
  2274  			break
  2275  		}
  2276  		v.reset(OpARM64UBFX)
  2277  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  2278  		v.AddArg(x)
  2279  		return true
  2280  	}
  2281  	// match: (ANDconst [c] (UBFX [bfc] x))
  2282  	// cond: isARM64BFMask(0, c, 0)
  2283  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  2284  	for {
  2285  		c := auxIntToInt64(v.AuxInt)
  2286  		if v_0.Op != OpARM64UBFX {
  2287  			break
  2288  		}
  2289  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  2290  		x := v_0.Args[0]
  2291  		if !(isARM64BFMask(0, c, 0)) {
  2292  			break
  2293  		}
  2294  		v.reset(OpARM64UBFX)
  2295  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  2296  		v.AddArg(x)
  2297  		return true
  2298  	}
  2299  	return false
  2300  }
  2301  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  2302  	v_1 := v.Args[1]
  2303  	v_0 := v.Args[0]
  2304  	b := v.Block
  2305  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  2306  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  2307  	for {
  2308  		d := auxIntToInt64(v.AuxInt)
  2309  		if v_0.Op != OpARM64MOVDconst {
  2310  			break
  2311  		}
  2312  		c := auxIntToInt64(v_0.AuxInt)
  2313  		x := v_1
  2314  		v.reset(OpARM64ANDconst)
  2315  		v.AuxInt = int64ToAuxInt(c)
  2316  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2317  		v0.AuxInt = int64ToAuxInt(d)
  2318  		v0.AddArg(x)
  2319  		v.AddArg(v0)
  2320  		return true
  2321  	}
  2322  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  2323  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  2324  	for {
  2325  		d := auxIntToInt64(v.AuxInt)
  2326  		x := v_0
  2327  		if v_1.Op != OpARM64MOVDconst {
  2328  			break
  2329  		}
  2330  		c := auxIntToInt64(v_1.AuxInt)
  2331  		v.reset(OpARM64ANDconst)
  2332  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2333  		v.AddArg(x)
  2334  		return true
  2335  	}
  2336  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  2337  	// result: y
  2338  	for {
  2339  		c := auxIntToInt64(v.AuxInt)
  2340  		y := v_0
  2341  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  2342  			break
  2343  		}
  2344  		x := y.Args[0]
  2345  		if x != v_1 {
  2346  			break
  2347  		}
  2348  		v.copyOf(y)
  2349  		return true
  2350  	}
  2351  	return false
  2352  }
  2353  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  2354  	v_1 := v.Args[1]
  2355  	v_0 := v.Args[0]
  2356  	b := v.Block
  2357  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  2358  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  2359  	for {
  2360  		d := auxIntToInt64(v.AuxInt)
  2361  		if v_0.Op != OpARM64MOVDconst {
  2362  			break
  2363  		}
  2364  		c := auxIntToInt64(v_0.AuxInt)
  2365  		x := v_1
  2366  		v.reset(OpARM64ANDconst)
  2367  		v.AuxInt = int64ToAuxInt(c)
  2368  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2369  		v0.AuxInt = int64ToAuxInt(d)
  2370  		v0.AddArg(x)
  2371  		v.AddArg(v0)
  2372  		return true
  2373  	}
  2374  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  2375  	// result: (ANDconst x [c>>uint64(d)])
  2376  	for {
  2377  		d := auxIntToInt64(v.AuxInt)
  2378  		x := v_0
  2379  		if v_1.Op != OpARM64MOVDconst {
  2380  			break
  2381  		}
  2382  		c := auxIntToInt64(v_1.AuxInt)
  2383  		v.reset(OpARM64ANDconst)
  2384  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2385  		v.AddArg(x)
  2386  		return true
  2387  	}
  2388  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  2389  	// result: y
  2390  	for {
  2391  		c := auxIntToInt64(v.AuxInt)
  2392  		y := v_0
  2393  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  2394  			break
  2395  		}
  2396  		x := y.Args[0]
  2397  		if x != v_1 {
  2398  			break
  2399  		}
  2400  		v.copyOf(y)
  2401  		return true
  2402  	}
  2403  	return false
  2404  }
  2405  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  2406  	v_1 := v.Args[1]
  2407  	v_0 := v.Args[0]
  2408  	b := v.Block
  2409  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  2410  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  2411  	for {
  2412  		d := auxIntToInt64(v.AuxInt)
  2413  		if v_0.Op != OpARM64MOVDconst {
  2414  			break
  2415  		}
  2416  		c := auxIntToInt64(v_0.AuxInt)
  2417  		x := v_1
  2418  		v.reset(OpARM64ANDconst)
  2419  		v.AuxInt = int64ToAuxInt(c)
  2420  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2421  		v0.AuxInt = int64ToAuxInt(d)
  2422  		v0.AddArg(x)
  2423  		v.AddArg(v0)
  2424  		return true
  2425  	}
  2426  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  2427  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  2428  	for {
  2429  		d := auxIntToInt64(v.AuxInt)
  2430  		x := v_0
  2431  		if v_1.Op != OpARM64MOVDconst {
  2432  			break
  2433  		}
  2434  		c := auxIntToInt64(v_1.AuxInt)
  2435  		v.reset(OpARM64ANDconst)
  2436  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2437  		v.AddArg(x)
  2438  		return true
  2439  	}
  2440  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  2441  	// result: y
  2442  	for {
  2443  		c := auxIntToInt64(v.AuxInt)
  2444  		y := v_0
  2445  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  2446  			break
  2447  		}
  2448  		x := y.Args[0]
  2449  		if x != v_1 {
  2450  			break
  2451  		}
  2452  		v.copyOf(y)
  2453  		return true
  2454  	}
  2455  	return false
  2456  }
  2457  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  2458  	v_1 := v.Args[1]
  2459  	v_0 := v.Args[0]
  2460  	b := v.Block
  2461  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  2462  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  2463  	for {
  2464  		d := auxIntToInt64(v.AuxInt)
  2465  		if v_0.Op != OpARM64MOVDconst {
  2466  			break
  2467  		}
  2468  		c := auxIntToInt64(v_0.AuxInt)
  2469  		x := v_1
  2470  		v.reset(OpARM64ANDconst)
  2471  		v.AuxInt = int64ToAuxInt(c)
  2472  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  2473  		v0.AuxInt = int64ToAuxInt(d)
  2474  		v0.AddArg(x)
  2475  		v.AddArg(v0)
  2476  		return true
  2477  	}
  2478  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  2479  	// result: (ANDconst x [rotateRight64(c, d)])
  2480  	for {
  2481  		d := auxIntToInt64(v.AuxInt)
  2482  		x := v_0
  2483  		if v_1.Op != OpARM64MOVDconst {
  2484  			break
  2485  		}
  2486  		c := auxIntToInt64(v_1.AuxInt)
  2487  		v.reset(OpARM64ANDconst)
  2488  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  2489  		v.AddArg(x)
  2490  		return true
  2491  	}
  2492  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  2493  	// result: y
  2494  	for {
  2495  		c := auxIntToInt64(v.AuxInt)
  2496  		y := v_0
  2497  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  2498  			break
  2499  		}
  2500  		x := y.Args[0]
  2501  		if x != v_1 {
  2502  			break
  2503  		}
  2504  		v.copyOf(y)
  2505  		return true
  2506  	}
  2507  	return false
  2508  }
  2509  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  2510  	v_1 := v.Args[1]
  2511  	v_0 := v.Args[0]
  2512  	// match: (BIC x (MOVDconst [c]))
  2513  	// result: (ANDconst [^c] x)
  2514  	for {
  2515  		x := v_0
  2516  		if v_1.Op != OpARM64MOVDconst {
  2517  			break
  2518  		}
  2519  		c := auxIntToInt64(v_1.AuxInt)
  2520  		v.reset(OpARM64ANDconst)
  2521  		v.AuxInt = int64ToAuxInt(^c)
  2522  		v.AddArg(x)
  2523  		return true
  2524  	}
  2525  	// match: (BIC x x)
  2526  	// result: (MOVDconst [0])
  2527  	for {
  2528  		x := v_0
  2529  		if x != v_1 {
  2530  			break
  2531  		}
  2532  		v.reset(OpARM64MOVDconst)
  2533  		v.AuxInt = int64ToAuxInt(0)
  2534  		return true
  2535  	}
  2536  	// match: (BIC x0 x1:(SLLconst [c] y))
  2537  	// cond: clobberIfDead(x1)
  2538  	// result: (BICshiftLL x0 y [c])
  2539  	for {
  2540  		x0 := v_0
  2541  		x1 := v_1
  2542  		if x1.Op != OpARM64SLLconst {
  2543  			break
  2544  		}
  2545  		c := auxIntToInt64(x1.AuxInt)
  2546  		y := x1.Args[0]
  2547  		if !(clobberIfDead(x1)) {
  2548  			break
  2549  		}
  2550  		v.reset(OpARM64BICshiftLL)
  2551  		v.AuxInt = int64ToAuxInt(c)
  2552  		v.AddArg2(x0, y)
  2553  		return true
  2554  	}
  2555  	// match: (BIC x0 x1:(SRLconst [c] y))
  2556  	// cond: clobberIfDead(x1)
  2557  	// result: (BICshiftRL x0 y [c])
  2558  	for {
  2559  		x0 := v_0
  2560  		x1 := v_1
  2561  		if x1.Op != OpARM64SRLconst {
  2562  			break
  2563  		}
  2564  		c := auxIntToInt64(x1.AuxInt)
  2565  		y := x1.Args[0]
  2566  		if !(clobberIfDead(x1)) {
  2567  			break
  2568  		}
  2569  		v.reset(OpARM64BICshiftRL)
  2570  		v.AuxInt = int64ToAuxInt(c)
  2571  		v.AddArg2(x0, y)
  2572  		return true
  2573  	}
  2574  	// match: (BIC x0 x1:(SRAconst [c] y))
  2575  	// cond: clobberIfDead(x1)
  2576  	// result: (BICshiftRA x0 y [c])
  2577  	for {
  2578  		x0 := v_0
  2579  		x1 := v_1
  2580  		if x1.Op != OpARM64SRAconst {
  2581  			break
  2582  		}
  2583  		c := auxIntToInt64(x1.AuxInt)
  2584  		y := x1.Args[0]
  2585  		if !(clobberIfDead(x1)) {
  2586  			break
  2587  		}
  2588  		v.reset(OpARM64BICshiftRA)
  2589  		v.AuxInt = int64ToAuxInt(c)
  2590  		v.AddArg2(x0, y)
  2591  		return true
  2592  	}
  2593  	// match: (BIC x0 x1:(RORconst [c] y))
  2594  	// cond: clobberIfDead(x1)
  2595  	// result: (BICshiftRO x0 y [c])
  2596  	for {
  2597  		x0 := v_0
  2598  		x1 := v_1
  2599  		if x1.Op != OpARM64RORconst {
  2600  			break
  2601  		}
  2602  		c := auxIntToInt64(x1.AuxInt)
  2603  		y := x1.Args[0]
  2604  		if !(clobberIfDead(x1)) {
  2605  			break
  2606  		}
  2607  		v.reset(OpARM64BICshiftRO)
  2608  		v.AuxInt = int64ToAuxInt(c)
  2609  		v.AddArg2(x0, y)
  2610  		return true
  2611  	}
  2612  	return false
  2613  }
  2614  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  2615  	v_1 := v.Args[1]
  2616  	v_0 := v.Args[0]
  2617  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  2618  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  2619  	for {
  2620  		d := auxIntToInt64(v.AuxInt)
  2621  		x := v_0
  2622  		if v_1.Op != OpARM64MOVDconst {
  2623  			break
  2624  		}
  2625  		c := auxIntToInt64(v_1.AuxInt)
  2626  		v.reset(OpARM64ANDconst)
  2627  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  2628  		v.AddArg(x)
  2629  		return true
  2630  	}
  2631  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  2632  	// result: (MOVDconst [0])
  2633  	for {
  2634  		c := auxIntToInt64(v.AuxInt)
  2635  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  2636  			break
  2637  		}
  2638  		x := v_0.Args[0]
  2639  		if x != v_1 {
  2640  			break
  2641  		}
  2642  		v.reset(OpARM64MOVDconst)
  2643  		v.AuxInt = int64ToAuxInt(0)
  2644  		return true
  2645  	}
  2646  	return false
  2647  }
  2648  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  2649  	v_1 := v.Args[1]
  2650  	v_0 := v.Args[0]
  2651  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  2652  	// result: (ANDconst x [^(c>>uint64(d))])
  2653  	for {
  2654  		d := auxIntToInt64(v.AuxInt)
  2655  		x := v_0
  2656  		if v_1.Op != OpARM64MOVDconst {
  2657  			break
  2658  		}
  2659  		c := auxIntToInt64(v_1.AuxInt)
  2660  		v.reset(OpARM64ANDconst)
  2661  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  2662  		v.AddArg(x)
  2663  		return true
  2664  	}
  2665  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  2666  	// result: (MOVDconst [0])
  2667  	for {
  2668  		c := auxIntToInt64(v.AuxInt)
  2669  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  2670  			break
  2671  		}
  2672  		x := v_0.Args[0]
  2673  		if x != v_1 {
  2674  			break
  2675  		}
  2676  		v.reset(OpARM64MOVDconst)
  2677  		v.AuxInt = int64ToAuxInt(0)
  2678  		return true
  2679  	}
  2680  	return false
  2681  }
  2682  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  2683  	v_1 := v.Args[1]
  2684  	v_0 := v.Args[0]
  2685  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  2686  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  2687  	for {
  2688  		d := auxIntToInt64(v.AuxInt)
  2689  		x := v_0
  2690  		if v_1.Op != OpARM64MOVDconst {
  2691  			break
  2692  		}
  2693  		c := auxIntToInt64(v_1.AuxInt)
  2694  		v.reset(OpARM64ANDconst)
  2695  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  2696  		v.AddArg(x)
  2697  		return true
  2698  	}
  2699  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  2700  	// result: (MOVDconst [0])
  2701  	for {
  2702  		c := auxIntToInt64(v.AuxInt)
  2703  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  2704  			break
  2705  		}
  2706  		x := v_0.Args[0]
  2707  		if x != v_1 {
  2708  			break
  2709  		}
  2710  		v.reset(OpARM64MOVDconst)
  2711  		v.AuxInt = int64ToAuxInt(0)
  2712  		return true
  2713  	}
  2714  	return false
  2715  }
  2716  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  2717  	v_1 := v.Args[1]
  2718  	v_0 := v.Args[0]
  2719  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  2720  	// result: (ANDconst x [^rotateRight64(c, d)])
  2721  	for {
  2722  		d := auxIntToInt64(v.AuxInt)
  2723  		x := v_0
  2724  		if v_1.Op != OpARM64MOVDconst {
  2725  			break
  2726  		}
  2727  		c := auxIntToInt64(v_1.AuxInt)
  2728  		v.reset(OpARM64ANDconst)
  2729  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  2730  		v.AddArg(x)
  2731  		return true
  2732  	}
  2733  	// match: (BICshiftRO (RORconst x [c]) x [c])
  2734  	// result: (MOVDconst [0])
  2735  	for {
  2736  		c := auxIntToInt64(v.AuxInt)
  2737  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  2738  			break
  2739  		}
  2740  		x := v_0.Args[0]
  2741  		if x != v_1 {
  2742  			break
  2743  		}
  2744  		v.reset(OpARM64MOVDconst)
  2745  		v.AuxInt = int64ToAuxInt(0)
  2746  		return true
  2747  	}
  2748  	return false
  2749  }
  2750  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  2751  	v_1 := v.Args[1]
  2752  	v_0 := v.Args[0]
  2753  	// match: (CMN x (MOVDconst [c]))
  2754  	// result: (CMNconst [c] x)
  2755  	for {
  2756  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2757  			x := v_0
  2758  			if v_1.Op != OpARM64MOVDconst {
  2759  				continue
  2760  			}
  2761  			c := auxIntToInt64(v_1.AuxInt)
  2762  			v.reset(OpARM64CMNconst)
  2763  			v.AuxInt = int64ToAuxInt(c)
  2764  			v.AddArg(x)
  2765  			return true
  2766  		}
  2767  		break
  2768  	}
  2769  	// match: (CMN x0 x1:(SLLconst [c] y))
  2770  	// cond: clobberIfDead(x1)
  2771  	// result: (CMNshiftLL x0 y [c])
  2772  	for {
  2773  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2774  			x0 := v_0
  2775  			x1 := v_1
  2776  			if x1.Op != OpARM64SLLconst {
  2777  				continue
  2778  			}
  2779  			c := auxIntToInt64(x1.AuxInt)
  2780  			y := x1.Args[0]
  2781  			if !(clobberIfDead(x1)) {
  2782  				continue
  2783  			}
  2784  			v.reset(OpARM64CMNshiftLL)
  2785  			v.AuxInt = int64ToAuxInt(c)
  2786  			v.AddArg2(x0, y)
  2787  			return true
  2788  		}
  2789  		break
  2790  	}
  2791  	// match: (CMN x0 x1:(SRLconst [c] y))
  2792  	// cond: clobberIfDead(x1)
  2793  	// result: (CMNshiftRL x0 y [c])
  2794  	for {
  2795  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2796  			x0 := v_0
  2797  			x1 := v_1
  2798  			if x1.Op != OpARM64SRLconst {
  2799  				continue
  2800  			}
  2801  			c := auxIntToInt64(x1.AuxInt)
  2802  			y := x1.Args[0]
  2803  			if !(clobberIfDead(x1)) {
  2804  				continue
  2805  			}
  2806  			v.reset(OpARM64CMNshiftRL)
  2807  			v.AuxInt = int64ToAuxInt(c)
  2808  			v.AddArg2(x0, y)
  2809  			return true
  2810  		}
  2811  		break
  2812  	}
  2813  	// match: (CMN x0 x1:(SRAconst [c] y))
  2814  	// cond: clobberIfDead(x1)
  2815  	// result: (CMNshiftRA x0 y [c])
  2816  	for {
  2817  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2818  			x0 := v_0
  2819  			x1 := v_1
  2820  			if x1.Op != OpARM64SRAconst {
  2821  				continue
  2822  			}
  2823  			c := auxIntToInt64(x1.AuxInt)
  2824  			y := x1.Args[0]
  2825  			if !(clobberIfDead(x1)) {
  2826  				continue
  2827  			}
  2828  			v.reset(OpARM64CMNshiftRA)
  2829  			v.AuxInt = int64ToAuxInt(c)
  2830  			v.AddArg2(x0, y)
  2831  			return true
  2832  		}
  2833  		break
  2834  	}
  2835  	return false
  2836  }
  2837  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  2838  	v_1 := v.Args[1]
  2839  	v_0 := v.Args[0]
  2840  	// match: (CMNW x (MOVDconst [c]))
  2841  	// result: (CMNWconst [int32(c)] x)
  2842  	for {
  2843  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2844  			x := v_0
  2845  			if v_1.Op != OpARM64MOVDconst {
  2846  				continue
  2847  			}
  2848  			c := auxIntToInt64(v_1.AuxInt)
  2849  			v.reset(OpARM64CMNWconst)
  2850  			v.AuxInt = int32ToAuxInt(int32(c))
  2851  			v.AddArg(x)
  2852  			return true
  2853  		}
  2854  		break
  2855  	}
  2856  	return false
  2857  }
  2858  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  2859  	v_0 := v.Args[0]
  2860  	// match: (CMNWconst [c] y)
  2861  	// cond: c < 0 && c != -1<<31
  2862  	// result: (CMPWconst [-c] y)
  2863  	for {
  2864  		c := auxIntToInt32(v.AuxInt)
  2865  		y := v_0
  2866  		if !(c < 0 && c != -1<<31) {
  2867  			break
  2868  		}
  2869  		v.reset(OpARM64CMPWconst)
  2870  		v.AuxInt = int32ToAuxInt(-c)
  2871  		v.AddArg(y)
  2872  		return true
  2873  	}
  2874  	// match: (CMNWconst (MOVDconst [x]) [y])
  2875  	// result: (FlagConstant [addFlags32(int32(x),y)])
  2876  	for {
  2877  		y := auxIntToInt32(v.AuxInt)
  2878  		if v_0.Op != OpARM64MOVDconst {
  2879  			break
  2880  		}
  2881  		x := auxIntToInt64(v_0.AuxInt)
  2882  		v.reset(OpARM64FlagConstant)
  2883  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  2884  		return true
  2885  	}
  2886  	return false
  2887  }
  2888  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  2889  	v_0 := v.Args[0]
  2890  	// match: (CMNconst [c] y)
  2891  	// cond: c < 0 && c != -1<<63
  2892  	// result: (CMPconst [-c] y)
  2893  	for {
  2894  		c := auxIntToInt64(v.AuxInt)
  2895  		y := v_0
  2896  		if !(c < 0 && c != -1<<63) {
  2897  			break
  2898  		}
  2899  		v.reset(OpARM64CMPconst)
  2900  		v.AuxInt = int64ToAuxInt(-c)
  2901  		v.AddArg(y)
  2902  		return true
  2903  	}
  2904  	// match: (CMNconst (MOVDconst [x]) [y])
  2905  	// result: (FlagConstant [addFlags64(x,y)])
  2906  	for {
  2907  		y := auxIntToInt64(v.AuxInt)
  2908  		if v_0.Op != OpARM64MOVDconst {
  2909  			break
  2910  		}
  2911  		x := auxIntToInt64(v_0.AuxInt)
  2912  		v.reset(OpARM64FlagConstant)
  2913  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  2914  		return true
  2915  	}
  2916  	return false
  2917  }
  2918  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  2919  	v_1 := v.Args[1]
  2920  	v_0 := v.Args[0]
  2921  	b := v.Block
  2922  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  2923  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  2924  	for {
  2925  		d := auxIntToInt64(v.AuxInt)
  2926  		if v_0.Op != OpARM64MOVDconst {
  2927  			break
  2928  		}
  2929  		c := auxIntToInt64(v_0.AuxInt)
  2930  		x := v_1
  2931  		v.reset(OpARM64CMNconst)
  2932  		v.AuxInt = int64ToAuxInt(c)
  2933  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2934  		v0.AuxInt = int64ToAuxInt(d)
  2935  		v0.AddArg(x)
  2936  		v.AddArg(v0)
  2937  		return true
  2938  	}
  2939  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  2940  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  2941  	for {
  2942  		d := auxIntToInt64(v.AuxInt)
  2943  		x := v_0
  2944  		if v_1.Op != OpARM64MOVDconst {
  2945  			break
  2946  		}
  2947  		c := auxIntToInt64(v_1.AuxInt)
  2948  		v.reset(OpARM64CMNconst)
  2949  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2950  		v.AddArg(x)
  2951  		return true
  2952  	}
  2953  	return false
  2954  }
  2955  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  2956  	v_1 := v.Args[1]
  2957  	v_0 := v.Args[0]
  2958  	b := v.Block
  2959  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  2960  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  2961  	for {
  2962  		d := auxIntToInt64(v.AuxInt)
  2963  		if v_0.Op != OpARM64MOVDconst {
  2964  			break
  2965  		}
  2966  		c := auxIntToInt64(v_0.AuxInt)
  2967  		x := v_1
  2968  		v.reset(OpARM64CMNconst)
  2969  		v.AuxInt = int64ToAuxInt(c)
  2970  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2971  		v0.AuxInt = int64ToAuxInt(d)
  2972  		v0.AddArg(x)
  2973  		v.AddArg(v0)
  2974  		return true
  2975  	}
  2976  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  2977  	// result: (CMNconst x [c>>uint64(d)])
  2978  	for {
  2979  		d := auxIntToInt64(v.AuxInt)
  2980  		x := v_0
  2981  		if v_1.Op != OpARM64MOVDconst {
  2982  			break
  2983  		}
  2984  		c := auxIntToInt64(v_1.AuxInt)
  2985  		v.reset(OpARM64CMNconst)
  2986  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2987  		v.AddArg(x)
  2988  		return true
  2989  	}
  2990  	return false
  2991  }
  2992  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  2993  	v_1 := v.Args[1]
  2994  	v_0 := v.Args[0]
  2995  	b := v.Block
  2996  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  2997  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  2998  	for {
  2999  		d := auxIntToInt64(v.AuxInt)
  3000  		if v_0.Op != OpARM64MOVDconst {
  3001  			break
  3002  		}
  3003  		c := auxIntToInt64(v_0.AuxInt)
  3004  		x := v_1
  3005  		v.reset(OpARM64CMNconst)
  3006  		v.AuxInt = int64ToAuxInt(c)
  3007  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3008  		v0.AuxInt = int64ToAuxInt(d)
  3009  		v0.AddArg(x)
  3010  		v.AddArg(v0)
  3011  		return true
  3012  	}
  3013  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  3014  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  3015  	for {
  3016  		d := auxIntToInt64(v.AuxInt)
  3017  		x := v_0
  3018  		if v_1.Op != OpARM64MOVDconst {
  3019  			break
  3020  		}
  3021  		c := auxIntToInt64(v_1.AuxInt)
  3022  		v.reset(OpARM64CMNconst)
  3023  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3024  		v.AddArg(x)
  3025  		return true
  3026  	}
  3027  	return false
  3028  }
  3029  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  3030  	v_1 := v.Args[1]
  3031  	v_0 := v.Args[0]
  3032  	b := v.Block
  3033  	// match: (CMP x (MOVDconst [c]))
  3034  	// result: (CMPconst [c] x)
  3035  	for {
  3036  		x := v_0
  3037  		if v_1.Op != OpARM64MOVDconst {
  3038  			break
  3039  		}
  3040  		c := auxIntToInt64(v_1.AuxInt)
  3041  		v.reset(OpARM64CMPconst)
  3042  		v.AuxInt = int64ToAuxInt(c)
  3043  		v.AddArg(x)
  3044  		return true
  3045  	}
  3046  	// match: (CMP (MOVDconst [c]) x)
  3047  	// result: (InvertFlags (CMPconst [c] x))
  3048  	for {
  3049  		if v_0.Op != OpARM64MOVDconst {
  3050  			break
  3051  		}
  3052  		c := auxIntToInt64(v_0.AuxInt)
  3053  		x := v_1
  3054  		v.reset(OpARM64InvertFlags)
  3055  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3056  		v0.AuxInt = int64ToAuxInt(c)
  3057  		v0.AddArg(x)
  3058  		v.AddArg(v0)
  3059  		return true
  3060  	}
  3061  	// match: (CMP x y)
  3062  	// cond: canonLessThan(x,y)
  3063  	// result: (InvertFlags (CMP y x))
  3064  	for {
  3065  		x := v_0
  3066  		y := v_1
  3067  		if !(canonLessThan(x, y)) {
  3068  			break
  3069  		}
  3070  		v.reset(OpARM64InvertFlags)
  3071  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  3072  		v0.AddArg2(y, x)
  3073  		v.AddArg(v0)
  3074  		return true
  3075  	}
  3076  	// match: (CMP x0 x1:(SLLconst [c] y))
  3077  	// cond: clobberIfDead(x1)
  3078  	// result: (CMPshiftLL x0 y [c])
  3079  	for {
  3080  		x0 := v_0
  3081  		x1 := v_1
  3082  		if x1.Op != OpARM64SLLconst {
  3083  			break
  3084  		}
  3085  		c := auxIntToInt64(x1.AuxInt)
  3086  		y := x1.Args[0]
  3087  		if !(clobberIfDead(x1)) {
  3088  			break
  3089  		}
  3090  		v.reset(OpARM64CMPshiftLL)
  3091  		v.AuxInt = int64ToAuxInt(c)
  3092  		v.AddArg2(x0, y)
  3093  		return true
  3094  	}
  3095  	// match: (CMP x0:(SLLconst [c] y) x1)
  3096  	// cond: clobberIfDead(x0)
  3097  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  3098  	for {
  3099  		x0 := v_0
  3100  		if x0.Op != OpARM64SLLconst {
  3101  			break
  3102  		}
  3103  		c := auxIntToInt64(x0.AuxInt)
  3104  		y := x0.Args[0]
  3105  		x1 := v_1
  3106  		if !(clobberIfDead(x0)) {
  3107  			break
  3108  		}
  3109  		v.reset(OpARM64InvertFlags)
  3110  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  3111  		v0.AuxInt = int64ToAuxInt(c)
  3112  		v0.AddArg2(x1, y)
  3113  		v.AddArg(v0)
  3114  		return true
  3115  	}
  3116  	// match: (CMP x0 x1:(SRLconst [c] y))
  3117  	// cond: clobberIfDead(x1)
  3118  	// result: (CMPshiftRL x0 y [c])
  3119  	for {
  3120  		x0 := v_0
  3121  		x1 := v_1
  3122  		if x1.Op != OpARM64SRLconst {
  3123  			break
  3124  		}
  3125  		c := auxIntToInt64(x1.AuxInt)
  3126  		y := x1.Args[0]
  3127  		if !(clobberIfDead(x1)) {
  3128  			break
  3129  		}
  3130  		v.reset(OpARM64CMPshiftRL)
  3131  		v.AuxInt = int64ToAuxInt(c)
  3132  		v.AddArg2(x0, y)
  3133  		return true
  3134  	}
  3135  	// match: (CMP x0:(SRLconst [c] y) x1)
  3136  	// cond: clobberIfDead(x0)
  3137  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  3138  	for {
  3139  		x0 := v_0
  3140  		if x0.Op != OpARM64SRLconst {
  3141  			break
  3142  		}
  3143  		c := auxIntToInt64(x0.AuxInt)
  3144  		y := x0.Args[0]
  3145  		x1 := v_1
  3146  		if !(clobberIfDead(x0)) {
  3147  			break
  3148  		}
  3149  		v.reset(OpARM64InvertFlags)
  3150  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  3151  		v0.AuxInt = int64ToAuxInt(c)
  3152  		v0.AddArg2(x1, y)
  3153  		v.AddArg(v0)
  3154  		return true
  3155  	}
  3156  	// match: (CMP x0 x1:(SRAconst [c] y))
  3157  	// cond: clobberIfDead(x1)
  3158  	// result: (CMPshiftRA x0 y [c])
  3159  	for {
  3160  		x0 := v_0
  3161  		x1 := v_1
  3162  		if x1.Op != OpARM64SRAconst {
  3163  			break
  3164  		}
  3165  		c := auxIntToInt64(x1.AuxInt)
  3166  		y := x1.Args[0]
  3167  		if !(clobberIfDead(x1)) {
  3168  			break
  3169  		}
  3170  		v.reset(OpARM64CMPshiftRA)
  3171  		v.AuxInt = int64ToAuxInt(c)
  3172  		v.AddArg2(x0, y)
  3173  		return true
  3174  	}
  3175  	// match: (CMP x0:(SRAconst [c] y) x1)
  3176  	// cond: clobberIfDead(x0)
  3177  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  3178  	for {
  3179  		x0 := v_0
  3180  		if x0.Op != OpARM64SRAconst {
  3181  			break
  3182  		}
  3183  		c := auxIntToInt64(x0.AuxInt)
  3184  		y := x0.Args[0]
  3185  		x1 := v_1
  3186  		if !(clobberIfDead(x0)) {
  3187  			break
  3188  		}
  3189  		v.reset(OpARM64InvertFlags)
  3190  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  3191  		v0.AuxInt = int64ToAuxInt(c)
  3192  		v0.AddArg2(x1, y)
  3193  		v.AddArg(v0)
  3194  		return true
  3195  	}
  3196  	return false
  3197  }
  3198  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  3199  	v_1 := v.Args[1]
  3200  	v_0 := v.Args[0]
  3201  	b := v.Block
  3202  	// match: (CMPW x (MOVDconst [c]))
  3203  	// result: (CMPWconst [int32(c)] x)
  3204  	for {
  3205  		x := v_0
  3206  		if v_1.Op != OpARM64MOVDconst {
  3207  			break
  3208  		}
  3209  		c := auxIntToInt64(v_1.AuxInt)
  3210  		v.reset(OpARM64CMPWconst)
  3211  		v.AuxInt = int32ToAuxInt(int32(c))
  3212  		v.AddArg(x)
  3213  		return true
  3214  	}
  3215  	// match: (CMPW (MOVDconst [c]) x)
  3216  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  3217  	for {
  3218  		if v_0.Op != OpARM64MOVDconst {
  3219  			break
  3220  		}
  3221  		c := auxIntToInt64(v_0.AuxInt)
  3222  		x := v_1
  3223  		v.reset(OpARM64InvertFlags)
  3224  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  3225  		v0.AuxInt = int32ToAuxInt(int32(c))
  3226  		v0.AddArg(x)
  3227  		v.AddArg(v0)
  3228  		return true
  3229  	}
  3230  	// match: (CMPW x y)
  3231  	// cond: canonLessThan(x,y)
  3232  	// result: (InvertFlags (CMPW y x))
  3233  	for {
  3234  		x := v_0
  3235  		y := v_1
  3236  		if !(canonLessThan(x, y)) {
  3237  			break
  3238  		}
  3239  		v.reset(OpARM64InvertFlags)
  3240  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  3241  		v0.AddArg2(y, x)
  3242  		v.AddArg(v0)
  3243  		return true
  3244  	}
  3245  	return false
  3246  }
  3247  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  3248  	v_0 := v.Args[0]
  3249  	// match: (CMPWconst [c] y)
  3250  	// cond: c < 0 && c != -1<<31
  3251  	// result: (CMNWconst [-c] y)
  3252  	for {
  3253  		c := auxIntToInt32(v.AuxInt)
  3254  		y := v_0
  3255  		if !(c < 0 && c != -1<<31) {
  3256  			break
  3257  		}
  3258  		v.reset(OpARM64CMNWconst)
  3259  		v.AuxInt = int32ToAuxInt(-c)
  3260  		v.AddArg(y)
  3261  		return true
  3262  	}
  3263  	// match: (CMPWconst (MOVDconst [x]) [y])
  3264  	// result: (FlagConstant [subFlags32(int32(x),y)])
  3265  	for {
  3266  		y := auxIntToInt32(v.AuxInt)
  3267  		if v_0.Op != OpARM64MOVDconst {
  3268  			break
  3269  		}
  3270  		x := auxIntToInt64(v_0.AuxInt)
  3271  		v.reset(OpARM64FlagConstant)
  3272  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  3273  		return true
  3274  	}
  3275  	// match: (CMPWconst (MOVBUreg _) [c])
  3276  	// cond: 0xff < c
  3277  	// result: (FlagConstant [subFlags64(0,1)])
  3278  	for {
  3279  		c := auxIntToInt32(v.AuxInt)
  3280  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3281  			break
  3282  		}
  3283  		v.reset(OpARM64FlagConstant)
  3284  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3285  		return true
  3286  	}
  3287  	// match: (CMPWconst (MOVHUreg _) [c])
  3288  	// cond: 0xffff < c
  3289  	// result: (FlagConstant [subFlags64(0,1)])
  3290  	for {
  3291  		c := auxIntToInt32(v.AuxInt)
  3292  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3293  			break
  3294  		}
  3295  		v.reset(OpARM64FlagConstant)
  3296  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3297  		return true
  3298  	}
  3299  	return false
  3300  }
  3301  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  3302  	v_0 := v.Args[0]
  3303  	// match: (CMPconst [c] y)
  3304  	// cond: c < 0 && c != -1<<63
  3305  	// result: (CMNconst [-c] y)
  3306  	for {
  3307  		c := auxIntToInt64(v.AuxInt)
  3308  		y := v_0
  3309  		if !(c < 0 && c != -1<<63) {
  3310  			break
  3311  		}
  3312  		v.reset(OpARM64CMNconst)
  3313  		v.AuxInt = int64ToAuxInt(-c)
  3314  		v.AddArg(y)
  3315  		return true
  3316  	}
  3317  	// match: (CMPconst (MOVDconst [x]) [y])
  3318  	// result: (FlagConstant [subFlags64(x,y)])
  3319  	for {
  3320  		y := auxIntToInt64(v.AuxInt)
  3321  		if v_0.Op != OpARM64MOVDconst {
  3322  			break
  3323  		}
  3324  		x := auxIntToInt64(v_0.AuxInt)
  3325  		v.reset(OpARM64FlagConstant)
  3326  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  3327  		return true
  3328  	}
  3329  	// match: (CMPconst (MOVBUreg _) [c])
  3330  	// cond: 0xff < c
  3331  	// result: (FlagConstant [subFlags64(0,1)])
  3332  	for {
  3333  		c := auxIntToInt64(v.AuxInt)
  3334  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3335  			break
  3336  		}
  3337  		v.reset(OpARM64FlagConstant)
  3338  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3339  		return true
  3340  	}
  3341  	// match: (CMPconst (MOVHUreg _) [c])
  3342  	// cond: 0xffff < c
  3343  	// result: (FlagConstant [subFlags64(0,1)])
  3344  	for {
  3345  		c := auxIntToInt64(v.AuxInt)
  3346  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3347  			break
  3348  		}
  3349  		v.reset(OpARM64FlagConstant)
  3350  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3351  		return true
  3352  	}
  3353  	// match: (CMPconst (MOVWUreg _) [c])
  3354  	// cond: 0xffffffff < c
  3355  	// result: (FlagConstant [subFlags64(0,1)])
  3356  	for {
  3357  		c := auxIntToInt64(v.AuxInt)
  3358  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  3359  			break
  3360  		}
  3361  		v.reset(OpARM64FlagConstant)
  3362  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3363  		return true
  3364  	}
  3365  	// match: (CMPconst (ANDconst _ [m]) [n])
  3366  	// cond: 0 <= m && m < n
  3367  	// result: (FlagConstant [subFlags64(0,1)])
  3368  	for {
  3369  		n := auxIntToInt64(v.AuxInt)
  3370  		if v_0.Op != OpARM64ANDconst {
  3371  			break
  3372  		}
  3373  		m := auxIntToInt64(v_0.AuxInt)
  3374  		if !(0 <= m && m < n) {
  3375  			break
  3376  		}
  3377  		v.reset(OpARM64FlagConstant)
  3378  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3379  		return true
  3380  	}
  3381  	// match: (CMPconst (SRLconst _ [c]) [n])
  3382  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  3383  	// result: (FlagConstant [subFlags64(0,1)])
  3384  	for {
  3385  		n := auxIntToInt64(v.AuxInt)
  3386  		if v_0.Op != OpARM64SRLconst {
  3387  			break
  3388  		}
  3389  		c := auxIntToInt64(v_0.AuxInt)
  3390  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  3391  			break
  3392  		}
  3393  		v.reset(OpARM64FlagConstant)
  3394  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3395  		return true
  3396  	}
  3397  	return false
  3398  }
  3399  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  3400  	v_1 := v.Args[1]
  3401  	v_0 := v.Args[0]
  3402  	b := v.Block
  3403  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  3404  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  3405  	for {
  3406  		d := auxIntToInt64(v.AuxInt)
  3407  		if v_0.Op != OpARM64MOVDconst {
  3408  			break
  3409  		}
  3410  		c := auxIntToInt64(v_0.AuxInt)
  3411  		x := v_1
  3412  		v.reset(OpARM64InvertFlags)
  3413  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3414  		v0.AuxInt = int64ToAuxInt(c)
  3415  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3416  		v1.AuxInt = int64ToAuxInt(d)
  3417  		v1.AddArg(x)
  3418  		v0.AddArg(v1)
  3419  		v.AddArg(v0)
  3420  		return true
  3421  	}
  3422  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  3423  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  3424  	for {
  3425  		d := auxIntToInt64(v.AuxInt)
  3426  		x := v_0
  3427  		if v_1.Op != OpARM64MOVDconst {
  3428  			break
  3429  		}
  3430  		c := auxIntToInt64(v_1.AuxInt)
  3431  		v.reset(OpARM64CMPconst)
  3432  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3433  		v.AddArg(x)
  3434  		return true
  3435  	}
  3436  	return false
  3437  }
  3438  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  3439  	v_1 := v.Args[1]
  3440  	v_0 := v.Args[0]
  3441  	b := v.Block
  3442  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  3443  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  3444  	for {
  3445  		d := auxIntToInt64(v.AuxInt)
  3446  		if v_0.Op != OpARM64MOVDconst {
  3447  			break
  3448  		}
  3449  		c := auxIntToInt64(v_0.AuxInt)
  3450  		x := v_1
  3451  		v.reset(OpARM64InvertFlags)
  3452  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3453  		v0.AuxInt = int64ToAuxInt(c)
  3454  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3455  		v1.AuxInt = int64ToAuxInt(d)
  3456  		v1.AddArg(x)
  3457  		v0.AddArg(v1)
  3458  		v.AddArg(v0)
  3459  		return true
  3460  	}
  3461  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  3462  	// result: (CMPconst x [c>>uint64(d)])
  3463  	for {
  3464  		d := auxIntToInt64(v.AuxInt)
  3465  		x := v_0
  3466  		if v_1.Op != OpARM64MOVDconst {
  3467  			break
  3468  		}
  3469  		c := auxIntToInt64(v_1.AuxInt)
  3470  		v.reset(OpARM64CMPconst)
  3471  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3472  		v.AddArg(x)
  3473  		return true
  3474  	}
  3475  	return false
  3476  }
  3477  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  3478  	v_1 := v.Args[1]
  3479  	v_0 := v.Args[0]
  3480  	b := v.Block
  3481  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  3482  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  3483  	for {
  3484  		d := auxIntToInt64(v.AuxInt)
  3485  		if v_0.Op != OpARM64MOVDconst {
  3486  			break
  3487  		}
  3488  		c := auxIntToInt64(v_0.AuxInt)
  3489  		x := v_1
  3490  		v.reset(OpARM64InvertFlags)
  3491  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3492  		v0.AuxInt = int64ToAuxInt(c)
  3493  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3494  		v1.AuxInt = int64ToAuxInt(d)
  3495  		v1.AddArg(x)
  3496  		v0.AddArg(v1)
  3497  		v.AddArg(v0)
  3498  		return true
  3499  	}
  3500  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  3501  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  3502  	for {
  3503  		d := auxIntToInt64(v.AuxInt)
  3504  		x := v_0
  3505  		if v_1.Op != OpARM64MOVDconst {
  3506  			break
  3507  		}
  3508  		c := auxIntToInt64(v_1.AuxInt)
  3509  		v.reset(OpARM64CMPconst)
  3510  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3511  		v.AddArg(x)
  3512  		return true
  3513  	}
  3514  	return false
  3515  }
  3516  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  3517  	v_2 := v.Args[2]
  3518  	v_1 := v.Args[1]
  3519  	v_0 := v.Args[0]
  3520  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  3521  	// result: (CSETM [cc] flag)
  3522  	for {
  3523  		cc := auxIntToOp(v.AuxInt)
  3524  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3525  			break
  3526  		}
  3527  		flag := v_2
  3528  		v.reset(OpARM64CSETM)
  3529  		v.AuxInt = opToAuxInt(cc)
  3530  		v.AddArg(flag)
  3531  		return true
  3532  	}
  3533  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  3534  	// result: (CSETM [arm64Negate(cc)] flag)
  3535  	for {
  3536  		cc := auxIntToOp(v.AuxInt)
  3537  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  3538  			break
  3539  		}
  3540  		flag := v_2
  3541  		v.reset(OpARM64CSETM)
  3542  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3543  		v.AddArg(flag)
  3544  		return true
  3545  	}
  3546  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  3547  	// result: (CSEL0 [cc] x flag)
  3548  	for {
  3549  		cc := auxIntToOp(v.AuxInt)
  3550  		x := v_0
  3551  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3552  			break
  3553  		}
  3554  		flag := v_2
  3555  		v.reset(OpARM64CSEL0)
  3556  		v.AuxInt = opToAuxInt(cc)
  3557  		v.AddArg2(x, flag)
  3558  		return true
  3559  	}
  3560  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  3561  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  3562  	for {
  3563  		cc := auxIntToOp(v.AuxInt)
  3564  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  3565  			break
  3566  		}
  3567  		y := v_1
  3568  		flag := v_2
  3569  		v.reset(OpARM64CSEL0)
  3570  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3571  		v.AddArg2(y, flag)
  3572  		return true
  3573  	}
  3574  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  3575  	// result: (CSINC [cc] x a flag)
  3576  	for {
  3577  		cc := auxIntToOp(v.AuxInt)
  3578  		x := v_0
  3579  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  3580  			break
  3581  		}
  3582  		a := v_1.Args[0]
  3583  		flag := v_2
  3584  		v.reset(OpARM64CSINC)
  3585  		v.AuxInt = opToAuxInt(cc)
  3586  		v.AddArg3(x, a, flag)
  3587  		return true
  3588  	}
  3589  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  3590  	// result: (CSINC [arm64Negate(cc)] x a flag)
  3591  	for {
  3592  		cc := auxIntToOp(v.AuxInt)
  3593  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  3594  			break
  3595  		}
  3596  		a := v_0.Args[0]
  3597  		x := v_1
  3598  		flag := v_2
  3599  		v.reset(OpARM64CSINC)
  3600  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3601  		v.AddArg3(x, a, flag)
  3602  		return true
  3603  	}
  3604  	// match: (CSEL [cc] x (MVN a) flag)
  3605  	// result: (CSINV [cc] x a flag)
  3606  	for {
  3607  		cc := auxIntToOp(v.AuxInt)
  3608  		x := v_0
  3609  		if v_1.Op != OpARM64MVN {
  3610  			break
  3611  		}
  3612  		a := v_1.Args[0]
  3613  		flag := v_2
  3614  		v.reset(OpARM64CSINV)
  3615  		v.AuxInt = opToAuxInt(cc)
  3616  		v.AddArg3(x, a, flag)
  3617  		return true
  3618  	}
  3619  	// match: (CSEL [cc] (MVN a) x flag)
  3620  	// result: (CSINV [arm64Negate(cc)] x a flag)
  3621  	for {
  3622  		cc := auxIntToOp(v.AuxInt)
  3623  		if v_0.Op != OpARM64MVN {
  3624  			break
  3625  		}
  3626  		a := v_0.Args[0]
  3627  		x := v_1
  3628  		flag := v_2
  3629  		v.reset(OpARM64CSINV)
  3630  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3631  		v.AddArg3(x, a, flag)
  3632  		return true
  3633  	}
  3634  	// match: (CSEL [cc] x (NEG a) flag)
  3635  	// result: (CSNEG [cc] x a flag)
  3636  	for {
  3637  		cc := auxIntToOp(v.AuxInt)
  3638  		x := v_0
  3639  		if v_1.Op != OpARM64NEG {
  3640  			break
  3641  		}
  3642  		a := v_1.Args[0]
  3643  		flag := v_2
  3644  		v.reset(OpARM64CSNEG)
  3645  		v.AuxInt = opToAuxInt(cc)
  3646  		v.AddArg3(x, a, flag)
  3647  		return true
  3648  	}
  3649  	// match: (CSEL [cc] (NEG a) x flag)
  3650  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  3651  	for {
  3652  		cc := auxIntToOp(v.AuxInt)
  3653  		if v_0.Op != OpARM64NEG {
  3654  			break
  3655  		}
  3656  		a := v_0.Args[0]
  3657  		x := v_1
  3658  		flag := v_2
  3659  		v.reset(OpARM64CSNEG)
  3660  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3661  		v.AddArg3(x, a, flag)
  3662  		return true
  3663  	}
  3664  	// match: (CSEL [cc] x y (InvertFlags cmp))
  3665  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  3666  	for {
  3667  		cc := auxIntToOp(v.AuxInt)
  3668  		x := v_0
  3669  		y := v_1
  3670  		if v_2.Op != OpARM64InvertFlags {
  3671  			break
  3672  		}
  3673  		cmp := v_2.Args[0]
  3674  		v.reset(OpARM64CSEL)
  3675  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3676  		v.AddArg3(x, y, cmp)
  3677  		return true
  3678  	}
  3679  	// match: (CSEL [cc] x _ flag)
  3680  	// cond: ccARM64Eval(cc, flag) > 0
  3681  	// result: x
  3682  	for {
  3683  		cc := auxIntToOp(v.AuxInt)
  3684  		x := v_0
  3685  		flag := v_2
  3686  		if !(ccARM64Eval(cc, flag) > 0) {
  3687  			break
  3688  		}
  3689  		v.copyOf(x)
  3690  		return true
  3691  	}
  3692  	// match: (CSEL [cc] _ y flag)
  3693  	// cond: ccARM64Eval(cc, flag) < 0
  3694  	// result: y
  3695  	for {
  3696  		cc := auxIntToOp(v.AuxInt)
  3697  		y := v_1
  3698  		flag := v_2
  3699  		if !(ccARM64Eval(cc, flag) < 0) {
  3700  			break
  3701  		}
  3702  		v.copyOf(y)
  3703  		return true
  3704  	}
  3705  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3706  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3707  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  3708  	for {
  3709  		cc := auxIntToOp(v.AuxInt)
  3710  		x := v_0
  3711  		y := v_1
  3712  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3713  			break
  3714  		}
  3715  		boolval := v_2.Args[0]
  3716  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3717  			break
  3718  		}
  3719  		v.reset(OpARM64CSEL)
  3720  		v.AuxInt = opToAuxInt(boolval.Op)
  3721  		v.AddArg3(x, y, flagArg(boolval))
  3722  		return true
  3723  	}
  3724  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3725  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3726  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  3727  	for {
  3728  		cc := auxIntToOp(v.AuxInt)
  3729  		x := v_0
  3730  		y := v_1
  3731  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3732  			break
  3733  		}
  3734  		boolval := v_2.Args[0]
  3735  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3736  			break
  3737  		}
  3738  		v.reset(OpARM64CSEL)
  3739  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3740  		v.AddArg3(x, y, flagArg(boolval))
  3741  		return true
  3742  	}
  3743  	return false
  3744  }
  3745  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  3746  	v_1 := v.Args[1]
  3747  	v_0 := v.Args[0]
  3748  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  3749  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  3750  	for {
  3751  		cc := auxIntToOp(v.AuxInt)
  3752  		x := v_0
  3753  		if v_1.Op != OpARM64InvertFlags {
  3754  			break
  3755  		}
  3756  		cmp := v_1.Args[0]
  3757  		v.reset(OpARM64CSEL0)
  3758  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3759  		v.AddArg2(x, cmp)
  3760  		return true
  3761  	}
  3762  	// match: (CSEL0 [cc] x flag)
  3763  	// cond: ccARM64Eval(cc, flag) > 0
  3764  	// result: x
  3765  	for {
  3766  		cc := auxIntToOp(v.AuxInt)
  3767  		x := v_0
  3768  		flag := v_1
  3769  		if !(ccARM64Eval(cc, flag) > 0) {
  3770  			break
  3771  		}
  3772  		v.copyOf(x)
  3773  		return true
  3774  	}
  3775  	// match: (CSEL0 [cc] _ flag)
  3776  	// cond: ccARM64Eval(cc, flag) < 0
  3777  	// result: (MOVDconst [0])
  3778  	for {
  3779  		cc := auxIntToOp(v.AuxInt)
  3780  		flag := v_1
  3781  		if !(ccARM64Eval(cc, flag) < 0) {
  3782  			break
  3783  		}
  3784  		v.reset(OpARM64MOVDconst)
  3785  		v.AuxInt = int64ToAuxInt(0)
  3786  		return true
  3787  	}
  3788  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3789  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3790  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  3791  	for {
  3792  		cc := auxIntToOp(v.AuxInt)
  3793  		x := v_0
  3794  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3795  			break
  3796  		}
  3797  		boolval := v_1.Args[0]
  3798  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3799  			break
  3800  		}
  3801  		v.reset(OpARM64CSEL0)
  3802  		v.AuxInt = opToAuxInt(boolval.Op)
  3803  		v.AddArg2(x, flagArg(boolval))
  3804  		return true
  3805  	}
  3806  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3807  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3808  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  3809  	for {
  3810  		cc := auxIntToOp(v.AuxInt)
  3811  		x := v_0
  3812  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3813  			break
  3814  		}
  3815  		boolval := v_1.Args[0]
  3816  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3817  			break
  3818  		}
  3819  		v.reset(OpARM64CSEL0)
  3820  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3821  		v.AddArg2(x, flagArg(boolval))
  3822  		return true
  3823  	}
  3824  	return false
  3825  }
  3826  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  3827  	v_0 := v.Args[0]
  3828  	// match: (CSETM [cc] (InvertFlags cmp))
  3829  	// result: (CSETM [arm64Invert(cc)] cmp)
  3830  	for {
  3831  		cc := auxIntToOp(v.AuxInt)
  3832  		if v_0.Op != OpARM64InvertFlags {
  3833  			break
  3834  		}
  3835  		cmp := v_0.Args[0]
  3836  		v.reset(OpARM64CSETM)
  3837  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3838  		v.AddArg(cmp)
  3839  		return true
  3840  	}
  3841  	// match: (CSETM [cc] flag)
  3842  	// cond: ccARM64Eval(cc, flag) > 0
  3843  	// result: (MOVDconst [-1])
  3844  	for {
  3845  		cc := auxIntToOp(v.AuxInt)
  3846  		flag := v_0
  3847  		if !(ccARM64Eval(cc, flag) > 0) {
  3848  			break
  3849  		}
  3850  		v.reset(OpARM64MOVDconst)
  3851  		v.AuxInt = int64ToAuxInt(-1)
  3852  		return true
  3853  	}
  3854  	// match: (CSETM [cc] flag)
  3855  	// cond: ccARM64Eval(cc, flag) < 0
  3856  	// result: (MOVDconst [0])
  3857  	for {
  3858  		cc := auxIntToOp(v.AuxInt)
  3859  		flag := v_0
  3860  		if !(ccARM64Eval(cc, flag) < 0) {
  3861  			break
  3862  		}
  3863  		v.reset(OpARM64MOVDconst)
  3864  		v.AuxInt = int64ToAuxInt(0)
  3865  		return true
  3866  	}
  3867  	return false
  3868  }
  3869  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  3870  	v_2 := v.Args[2]
  3871  	v_1 := v.Args[1]
  3872  	v_0 := v.Args[0]
  3873  	// match: (CSINC [cc] x y (InvertFlags cmp))
  3874  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  3875  	for {
  3876  		cc := auxIntToOp(v.AuxInt)
  3877  		x := v_0
  3878  		y := v_1
  3879  		if v_2.Op != OpARM64InvertFlags {
  3880  			break
  3881  		}
  3882  		cmp := v_2.Args[0]
  3883  		v.reset(OpARM64CSINC)
  3884  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3885  		v.AddArg3(x, y, cmp)
  3886  		return true
  3887  	}
  3888  	// match: (CSINC [cc] x _ flag)
  3889  	// cond: ccARM64Eval(cc, flag) > 0
  3890  	// result: x
  3891  	for {
  3892  		cc := auxIntToOp(v.AuxInt)
  3893  		x := v_0
  3894  		flag := v_2
  3895  		if !(ccARM64Eval(cc, flag) > 0) {
  3896  			break
  3897  		}
  3898  		v.copyOf(x)
  3899  		return true
  3900  	}
  3901  	// match: (CSINC [cc] _ y flag)
  3902  	// cond: ccARM64Eval(cc, flag) < 0
  3903  	// result: (ADDconst [1] y)
  3904  	for {
  3905  		cc := auxIntToOp(v.AuxInt)
  3906  		y := v_1
  3907  		flag := v_2
  3908  		if !(ccARM64Eval(cc, flag) < 0) {
  3909  			break
  3910  		}
  3911  		v.reset(OpARM64ADDconst)
  3912  		v.AuxInt = int64ToAuxInt(1)
  3913  		v.AddArg(y)
  3914  		return true
  3915  	}
  3916  	return false
  3917  }
  3918  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  3919  	v_2 := v.Args[2]
  3920  	v_1 := v.Args[1]
  3921  	v_0 := v.Args[0]
  3922  	// match: (CSINV [cc] x y (InvertFlags cmp))
  3923  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  3924  	for {
  3925  		cc := auxIntToOp(v.AuxInt)
  3926  		x := v_0
  3927  		y := v_1
  3928  		if v_2.Op != OpARM64InvertFlags {
  3929  			break
  3930  		}
  3931  		cmp := v_2.Args[0]
  3932  		v.reset(OpARM64CSINV)
  3933  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3934  		v.AddArg3(x, y, cmp)
  3935  		return true
  3936  	}
  3937  	// match: (CSINV [cc] x _ flag)
  3938  	// cond: ccARM64Eval(cc, flag) > 0
  3939  	// result: x
  3940  	for {
  3941  		cc := auxIntToOp(v.AuxInt)
  3942  		x := v_0
  3943  		flag := v_2
  3944  		if !(ccARM64Eval(cc, flag) > 0) {
  3945  			break
  3946  		}
  3947  		v.copyOf(x)
  3948  		return true
  3949  	}
  3950  	// match: (CSINV [cc] _ y flag)
  3951  	// cond: ccARM64Eval(cc, flag) < 0
  3952  	// result: (Not y)
  3953  	for {
  3954  		cc := auxIntToOp(v.AuxInt)
  3955  		y := v_1
  3956  		flag := v_2
  3957  		if !(ccARM64Eval(cc, flag) < 0) {
  3958  			break
  3959  		}
  3960  		v.reset(OpNot)
  3961  		v.AddArg(y)
  3962  		return true
  3963  	}
  3964  	return false
  3965  }
  3966  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  3967  	v_2 := v.Args[2]
  3968  	v_1 := v.Args[1]
  3969  	v_0 := v.Args[0]
  3970  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  3971  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  3972  	for {
  3973  		cc := auxIntToOp(v.AuxInt)
  3974  		x := v_0
  3975  		y := v_1
  3976  		if v_2.Op != OpARM64InvertFlags {
  3977  			break
  3978  		}
  3979  		cmp := v_2.Args[0]
  3980  		v.reset(OpARM64CSNEG)
  3981  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3982  		v.AddArg3(x, y, cmp)
  3983  		return true
  3984  	}
  3985  	// match: (CSNEG [cc] x _ flag)
  3986  	// cond: ccARM64Eval(cc, flag) > 0
  3987  	// result: x
  3988  	for {
  3989  		cc := auxIntToOp(v.AuxInt)
  3990  		x := v_0
  3991  		flag := v_2
  3992  		if !(ccARM64Eval(cc, flag) > 0) {
  3993  			break
  3994  		}
  3995  		v.copyOf(x)
  3996  		return true
  3997  	}
  3998  	// match: (CSNEG [cc] _ y flag)
  3999  	// cond: ccARM64Eval(cc, flag) < 0
  4000  	// result: (NEG y)
  4001  	for {
  4002  		cc := auxIntToOp(v.AuxInt)
  4003  		y := v_1
  4004  		flag := v_2
  4005  		if !(ccARM64Eval(cc, flag) < 0) {
  4006  			break
  4007  		}
  4008  		v.reset(OpARM64NEG)
  4009  		v.AddArg(y)
  4010  		return true
  4011  	}
  4012  	return false
  4013  }
  4014  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  4015  	v_1 := v.Args[1]
  4016  	v_0 := v.Args[0]
  4017  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  4018  	// cond: d != 0
  4019  	// result: (MOVDconst [c/d])
  4020  	for {
  4021  		if v_0.Op != OpARM64MOVDconst {
  4022  			break
  4023  		}
  4024  		c := auxIntToInt64(v_0.AuxInt)
  4025  		if v_1.Op != OpARM64MOVDconst {
  4026  			break
  4027  		}
  4028  		d := auxIntToInt64(v_1.AuxInt)
  4029  		if !(d != 0) {
  4030  			break
  4031  		}
  4032  		v.reset(OpARM64MOVDconst)
  4033  		v.AuxInt = int64ToAuxInt(c / d)
  4034  		return true
  4035  	}
  4036  	return false
  4037  }
  4038  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  4039  	v_1 := v.Args[1]
  4040  	v_0 := v.Args[0]
  4041  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  4042  	// cond: d != 0
  4043  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  4044  	for {
  4045  		if v_0.Op != OpARM64MOVDconst {
  4046  			break
  4047  		}
  4048  		c := auxIntToInt64(v_0.AuxInt)
  4049  		if v_1.Op != OpARM64MOVDconst {
  4050  			break
  4051  		}
  4052  		d := auxIntToInt64(v_1.AuxInt)
  4053  		if !(d != 0) {
  4054  			break
  4055  		}
  4056  		v.reset(OpARM64MOVDconst)
  4057  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  4058  		return true
  4059  	}
  4060  	return false
  4061  }
  4062  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  4063  	v_1 := v.Args[1]
  4064  	v_0 := v.Args[0]
  4065  	// match: (EON x (MOVDconst [c]))
  4066  	// result: (XORconst [^c] x)
  4067  	for {
  4068  		x := v_0
  4069  		if v_1.Op != OpARM64MOVDconst {
  4070  			break
  4071  		}
  4072  		c := auxIntToInt64(v_1.AuxInt)
  4073  		v.reset(OpARM64XORconst)
  4074  		v.AuxInt = int64ToAuxInt(^c)
  4075  		v.AddArg(x)
  4076  		return true
  4077  	}
  4078  	// match: (EON x x)
  4079  	// result: (MOVDconst [-1])
  4080  	for {
  4081  		x := v_0
  4082  		if x != v_1 {
  4083  			break
  4084  		}
  4085  		v.reset(OpARM64MOVDconst)
  4086  		v.AuxInt = int64ToAuxInt(-1)
  4087  		return true
  4088  	}
  4089  	// match: (EON x0 x1:(SLLconst [c] y))
  4090  	// cond: clobberIfDead(x1)
  4091  	// result: (EONshiftLL x0 y [c])
  4092  	for {
  4093  		x0 := v_0
  4094  		x1 := v_1
  4095  		if x1.Op != OpARM64SLLconst {
  4096  			break
  4097  		}
  4098  		c := auxIntToInt64(x1.AuxInt)
  4099  		y := x1.Args[0]
  4100  		if !(clobberIfDead(x1)) {
  4101  			break
  4102  		}
  4103  		v.reset(OpARM64EONshiftLL)
  4104  		v.AuxInt = int64ToAuxInt(c)
  4105  		v.AddArg2(x0, y)
  4106  		return true
  4107  	}
  4108  	// match: (EON x0 x1:(SRLconst [c] y))
  4109  	// cond: clobberIfDead(x1)
  4110  	// result: (EONshiftRL x0 y [c])
  4111  	for {
  4112  		x0 := v_0
  4113  		x1 := v_1
  4114  		if x1.Op != OpARM64SRLconst {
  4115  			break
  4116  		}
  4117  		c := auxIntToInt64(x1.AuxInt)
  4118  		y := x1.Args[0]
  4119  		if !(clobberIfDead(x1)) {
  4120  			break
  4121  		}
  4122  		v.reset(OpARM64EONshiftRL)
  4123  		v.AuxInt = int64ToAuxInt(c)
  4124  		v.AddArg2(x0, y)
  4125  		return true
  4126  	}
  4127  	// match: (EON x0 x1:(SRAconst [c] y))
  4128  	// cond: clobberIfDead(x1)
  4129  	// result: (EONshiftRA x0 y [c])
  4130  	for {
  4131  		x0 := v_0
  4132  		x1 := v_1
  4133  		if x1.Op != OpARM64SRAconst {
  4134  			break
  4135  		}
  4136  		c := auxIntToInt64(x1.AuxInt)
  4137  		y := x1.Args[0]
  4138  		if !(clobberIfDead(x1)) {
  4139  			break
  4140  		}
  4141  		v.reset(OpARM64EONshiftRA)
  4142  		v.AuxInt = int64ToAuxInt(c)
  4143  		v.AddArg2(x0, y)
  4144  		return true
  4145  	}
  4146  	// match: (EON x0 x1:(RORconst [c] y))
  4147  	// cond: clobberIfDead(x1)
  4148  	// result: (EONshiftRO x0 y [c])
  4149  	for {
  4150  		x0 := v_0
  4151  		x1 := v_1
  4152  		if x1.Op != OpARM64RORconst {
  4153  			break
  4154  		}
  4155  		c := auxIntToInt64(x1.AuxInt)
  4156  		y := x1.Args[0]
  4157  		if !(clobberIfDead(x1)) {
  4158  			break
  4159  		}
  4160  		v.reset(OpARM64EONshiftRO)
  4161  		v.AuxInt = int64ToAuxInt(c)
  4162  		v.AddArg2(x0, y)
  4163  		return true
  4164  	}
  4165  	return false
  4166  }
  4167  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  4168  	v_1 := v.Args[1]
  4169  	v_0 := v.Args[0]
  4170  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  4171  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  4172  	for {
  4173  		d := auxIntToInt64(v.AuxInt)
  4174  		x := v_0
  4175  		if v_1.Op != OpARM64MOVDconst {
  4176  			break
  4177  		}
  4178  		c := auxIntToInt64(v_1.AuxInt)
  4179  		v.reset(OpARM64XORconst)
  4180  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  4181  		v.AddArg(x)
  4182  		return true
  4183  	}
  4184  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  4185  	// result: (MOVDconst [-1])
  4186  	for {
  4187  		c := auxIntToInt64(v.AuxInt)
  4188  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  4189  			break
  4190  		}
  4191  		x := v_0.Args[0]
  4192  		if x != v_1 {
  4193  			break
  4194  		}
  4195  		v.reset(OpARM64MOVDconst)
  4196  		v.AuxInt = int64ToAuxInt(-1)
  4197  		return true
  4198  	}
  4199  	return false
  4200  }
  4201  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  4202  	v_1 := v.Args[1]
  4203  	v_0 := v.Args[0]
  4204  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  4205  	// result: (XORconst x [^(c>>uint64(d))])
  4206  	for {
  4207  		d := auxIntToInt64(v.AuxInt)
  4208  		x := v_0
  4209  		if v_1.Op != OpARM64MOVDconst {
  4210  			break
  4211  		}
  4212  		c := auxIntToInt64(v_1.AuxInt)
  4213  		v.reset(OpARM64XORconst)
  4214  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  4215  		v.AddArg(x)
  4216  		return true
  4217  	}
  4218  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  4219  	// result: (MOVDconst [-1])
  4220  	for {
  4221  		c := auxIntToInt64(v.AuxInt)
  4222  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  4223  			break
  4224  		}
  4225  		x := v_0.Args[0]
  4226  		if x != v_1 {
  4227  			break
  4228  		}
  4229  		v.reset(OpARM64MOVDconst)
  4230  		v.AuxInt = int64ToAuxInt(-1)
  4231  		return true
  4232  	}
  4233  	return false
  4234  }
  4235  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  4236  	v_1 := v.Args[1]
  4237  	v_0 := v.Args[0]
  4238  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  4239  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  4240  	for {
  4241  		d := auxIntToInt64(v.AuxInt)
  4242  		x := v_0
  4243  		if v_1.Op != OpARM64MOVDconst {
  4244  			break
  4245  		}
  4246  		c := auxIntToInt64(v_1.AuxInt)
  4247  		v.reset(OpARM64XORconst)
  4248  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  4249  		v.AddArg(x)
  4250  		return true
  4251  	}
  4252  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  4253  	// result: (MOVDconst [-1])
  4254  	for {
  4255  		c := auxIntToInt64(v.AuxInt)
  4256  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  4257  			break
  4258  		}
  4259  		x := v_0.Args[0]
  4260  		if x != v_1 {
  4261  			break
  4262  		}
  4263  		v.reset(OpARM64MOVDconst)
  4264  		v.AuxInt = int64ToAuxInt(-1)
  4265  		return true
  4266  	}
  4267  	return false
  4268  }
  4269  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  4270  	v_1 := v.Args[1]
  4271  	v_0 := v.Args[0]
  4272  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  4273  	// result: (XORconst x [^rotateRight64(c, d)])
  4274  	for {
  4275  		d := auxIntToInt64(v.AuxInt)
  4276  		x := v_0
  4277  		if v_1.Op != OpARM64MOVDconst {
  4278  			break
  4279  		}
  4280  		c := auxIntToInt64(v_1.AuxInt)
  4281  		v.reset(OpARM64XORconst)
  4282  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  4283  		v.AddArg(x)
  4284  		return true
  4285  	}
  4286  	// match: (EONshiftRO (RORconst x [c]) x [c])
  4287  	// result: (MOVDconst [-1])
  4288  	for {
  4289  		c := auxIntToInt64(v.AuxInt)
  4290  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  4291  			break
  4292  		}
  4293  		x := v_0.Args[0]
  4294  		if x != v_1 {
  4295  			break
  4296  		}
  4297  		v.reset(OpARM64MOVDconst)
  4298  		v.AuxInt = int64ToAuxInt(-1)
  4299  		return true
  4300  	}
  4301  	return false
  4302  }
  4303  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  4304  	v_0 := v.Args[0]
  4305  	b := v.Block
  4306  	// match: (Equal (CMPconst [0] z:(AND x y)))
  4307  	// cond: z.Uses == 1
  4308  	// result: (Equal (TST x y))
  4309  	for {
  4310  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4311  			break
  4312  		}
  4313  		z := v_0.Args[0]
  4314  		if z.Op != OpARM64AND {
  4315  			break
  4316  		}
  4317  		y := z.Args[1]
  4318  		x := z.Args[0]
  4319  		if !(z.Uses == 1) {
  4320  			break
  4321  		}
  4322  		v.reset(OpARM64Equal)
  4323  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  4324  		v0.AddArg2(x, y)
  4325  		v.AddArg(v0)
  4326  		return true
  4327  	}
  4328  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  4329  	// cond: x.Uses == 1
  4330  	// result: (Equal (TSTWconst [int32(c)] y))
  4331  	for {
  4332  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4333  			break
  4334  		}
  4335  		x := v_0.Args[0]
  4336  		if x.Op != OpARM64ANDconst {
  4337  			break
  4338  		}
  4339  		c := auxIntToInt64(x.AuxInt)
  4340  		y := x.Args[0]
  4341  		if !(x.Uses == 1) {
  4342  			break
  4343  		}
  4344  		v.reset(OpARM64Equal)
  4345  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  4346  		v0.AuxInt = int32ToAuxInt(int32(c))
  4347  		v0.AddArg(y)
  4348  		v.AddArg(v0)
  4349  		return true
  4350  	}
  4351  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  4352  	// cond: z.Uses == 1
  4353  	// result: (Equal (TSTW x y))
  4354  	for {
  4355  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4356  			break
  4357  		}
  4358  		z := v_0.Args[0]
  4359  		if z.Op != OpARM64AND {
  4360  			break
  4361  		}
  4362  		y := z.Args[1]
  4363  		x := z.Args[0]
  4364  		if !(z.Uses == 1) {
  4365  			break
  4366  		}
  4367  		v.reset(OpARM64Equal)
  4368  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  4369  		v0.AddArg2(x, y)
  4370  		v.AddArg(v0)
  4371  		return true
  4372  	}
  4373  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  4374  	// cond: x.Uses == 1
  4375  	// result: (Equal (TSTconst [c] y))
  4376  	for {
  4377  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4378  			break
  4379  		}
  4380  		x := v_0.Args[0]
  4381  		if x.Op != OpARM64ANDconst {
  4382  			break
  4383  		}
  4384  		c := auxIntToInt64(x.AuxInt)
  4385  		y := x.Args[0]
  4386  		if !(x.Uses == 1) {
  4387  			break
  4388  		}
  4389  		v.reset(OpARM64Equal)
  4390  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  4391  		v0.AuxInt = int64ToAuxInt(c)
  4392  		v0.AddArg(y)
  4393  		v.AddArg(v0)
  4394  		return true
  4395  	}
  4396  	// match: (Equal (CMP x z:(NEG y)))
  4397  	// cond: z.Uses == 1
  4398  	// result: (Equal (CMN x y))
  4399  	for {
  4400  		if v_0.Op != OpARM64CMP {
  4401  			break
  4402  		}
  4403  		_ = v_0.Args[1]
  4404  		x := v_0.Args[0]
  4405  		z := v_0.Args[1]
  4406  		if z.Op != OpARM64NEG {
  4407  			break
  4408  		}
  4409  		y := z.Args[0]
  4410  		if !(z.Uses == 1) {
  4411  			break
  4412  		}
  4413  		v.reset(OpARM64Equal)
  4414  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4415  		v0.AddArg2(x, y)
  4416  		v.AddArg(v0)
  4417  		return true
  4418  	}
  4419  	// match: (Equal (CMPW x z:(NEG y)))
  4420  	// cond: z.Uses == 1
  4421  	// result: (Equal (CMNW x y))
  4422  	for {
  4423  		if v_0.Op != OpARM64CMPW {
  4424  			break
  4425  		}
  4426  		_ = v_0.Args[1]
  4427  		x := v_0.Args[0]
  4428  		z := v_0.Args[1]
  4429  		if z.Op != OpARM64NEG {
  4430  			break
  4431  		}
  4432  		y := z.Args[0]
  4433  		if !(z.Uses == 1) {
  4434  			break
  4435  		}
  4436  		v.reset(OpARM64Equal)
  4437  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4438  		v0.AddArg2(x, y)
  4439  		v.AddArg(v0)
  4440  		return true
  4441  	}
  4442  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  4443  	// cond: x.Uses == 1
  4444  	// result: (Equal (CMNconst [c] y))
  4445  	for {
  4446  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4447  			break
  4448  		}
  4449  		x := v_0.Args[0]
  4450  		if x.Op != OpARM64ADDconst {
  4451  			break
  4452  		}
  4453  		c := auxIntToInt64(x.AuxInt)
  4454  		y := x.Args[0]
  4455  		if !(x.Uses == 1) {
  4456  			break
  4457  		}
  4458  		v.reset(OpARM64Equal)
  4459  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  4460  		v0.AuxInt = int64ToAuxInt(c)
  4461  		v0.AddArg(y)
  4462  		v.AddArg(v0)
  4463  		return true
  4464  	}
  4465  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  4466  	// cond: x.Uses == 1
  4467  	// result: (Equal (CMNWconst [int32(c)] y))
  4468  	for {
  4469  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4470  			break
  4471  		}
  4472  		x := v_0.Args[0]
  4473  		if x.Op != OpARM64ADDconst {
  4474  			break
  4475  		}
  4476  		c := auxIntToInt64(x.AuxInt)
  4477  		y := x.Args[0]
  4478  		if !(x.Uses == 1) {
  4479  			break
  4480  		}
  4481  		v.reset(OpARM64Equal)
  4482  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  4483  		v0.AuxInt = int32ToAuxInt(int32(c))
  4484  		v0.AddArg(y)
  4485  		v.AddArg(v0)
  4486  		return true
  4487  	}
  4488  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  4489  	// cond: z.Uses == 1
  4490  	// result: (Equal (CMN x y))
  4491  	for {
  4492  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4493  			break
  4494  		}
  4495  		z := v_0.Args[0]
  4496  		if z.Op != OpARM64ADD {
  4497  			break
  4498  		}
  4499  		y := z.Args[1]
  4500  		x := z.Args[0]
  4501  		if !(z.Uses == 1) {
  4502  			break
  4503  		}
  4504  		v.reset(OpARM64Equal)
  4505  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4506  		v0.AddArg2(x, y)
  4507  		v.AddArg(v0)
  4508  		return true
  4509  	}
  4510  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  4511  	// cond: z.Uses == 1
  4512  	// result: (Equal (CMNW x y))
  4513  	for {
  4514  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4515  			break
  4516  		}
  4517  		z := v_0.Args[0]
  4518  		if z.Op != OpARM64ADD {
  4519  			break
  4520  		}
  4521  		y := z.Args[1]
  4522  		x := z.Args[0]
  4523  		if !(z.Uses == 1) {
  4524  			break
  4525  		}
  4526  		v.reset(OpARM64Equal)
  4527  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4528  		v0.AddArg2(x, y)
  4529  		v.AddArg(v0)
  4530  		return true
  4531  	}
  4532  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  4533  	// cond: z.Uses == 1
  4534  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  4535  	for {
  4536  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4537  			break
  4538  		}
  4539  		z := v_0.Args[0]
  4540  		if z.Op != OpARM64MADD {
  4541  			break
  4542  		}
  4543  		y := z.Args[2]
  4544  		a := z.Args[0]
  4545  		x := z.Args[1]
  4546  		if !(z.Uses == 1) {
  4547  			break
  4548  		}
  4549  		v.reset(OpARM64Equal)
  4550  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4551  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4552  		v1.AddArg2(x, y)
  4553  		v0.AddArg2(a, v1)
  4554  		v.AddArg(v0)
  4555  		return true
  4556  	}
  4557  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  4558  	// cond: z.Uses == 1
  4559  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  4560  	for {
  4561  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4562  			break
  4563  		}
  4564  		z := v_0.Args[0]
  4565  		if z.Op != OpARM64MSUB {
  4566  			break
  4567  		}
  4568  		y := z.Args[2]
  4569  		a := z.Args[0]
  4570  		x := z.Args[1]
  4571  		if !(z.Uses == 1) {
  4572  			break
  4573  		}
  4574  		v.reset(OpARM64Equal)
  4575  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4576  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4577  		v1.AddArg2(x, y)
  4578  		v0.AddArg2(a, v1)
  4579  		v.AddArg(v0)
  4580  		return true
  4581  	}
  4582  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  4583  	// cond: z.Uses == 1
  4584  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  4585  	for {
  4586  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4587  			break
  4588  		}
  4589  		z := v_0.Args[0]
  4590  		if z.Op != OpARM64MADDW {
  4591  			break
  4592  		}
  4593  		y := z.Args[2]
  4594  		a := z.Args[0]
  4595  		x := z.Args[1]
  4596  		if !(z.Uses == 1) {
  4597  			break
  4598  		}
  4599  		v.reset(OpARM64Equal)
  4600  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4601  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4602  		v1.AddArg2(x, y)
  4603  		v0.AddArg2(a, v1)
  4604  		v.AddArg(v0)
  4605  		return true
  4606  	}
  4607  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  4608  	// cond: z.Uses == 1
  4609  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  4610  	for {
  4611  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4612  			break
  4613  		}
  4614  		z := v_0.Args[0]
  4615  		if z.Op != OpARM64MSUBW {
  4616  			break
  4617  		}
  4618  		y := z.Args[2]
  4619  		a := z.Args[0]
  4620  		x := z.Args[1]
  4621  		if !(z.Uses == 1) {
  4622  			break
  4623  		}
  4624  		v.reset(OpARM64Equal)
  4625  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4626  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4627  		v1.AddArg2(x, y)
  4628  		v0.AddArg2(a, v1)
  4629  		v.AddArg(v0)
  4630  		return true
  4631  	}
  4632  	// match: (Equal (FlagConstant [fc]))
  4633  	// result: (MOVDconst [b2i(fc.eq())])
  4634  	for {
  4635  		if v_0.Op != OpARM64FlagConstant {
  4636  			break
  4637  		}
  4638  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4639  		v.reset(OpARM64MOVDconst)
  4640  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  4641  		return true
  4642  	}
  4643  	// match: (Equal (InvertFlags x))
  4644  	// result: (Equal x)
  4645  	for {
  4646  		if v_0.Op != OpARM64InvertFlags {
  4647  			break
  4648  		}
  4649  		x := v_0.Args[0]
  4650  		v.reset(OpARM64Equal)
  4651  		v.AddArg(x)
  4652  		return true
  4653  	}
  4654  	return false
  4655  }
  4656  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  4657  	v_1 := v.Args[1]
  4658  	v_0 := v.Args[0]
  4659  	// match: (FADDD a (FMULD x y))
  4660  	// cond: a.Block.Func.useFMA(v)
  4661  	// result: (FMADDD a x y)
  4662  	for {
  4663  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4664  			a := v_0
  4665  			if v_1.Op != OpARM64FMULD {
  4666  				continue
  4667  			}
  4668  			y := v_1.Args[1]
  4669  			x := v_1.Args[0]
  4670  			if !(a.Block.Func.useFMA(v)) {
  4671  				continue
  4672  			}
  4673  			v.reset(OpARM64FMADDD)
  4674  			v.AddArg3(a, x, y)
  4675  			return true
  4676  		}
  4677  		break
  4678  	}
  4679  	// match: (FADDD a (FNMULD x y))
  4680  	// cond: a.Block.Func.useFMA(v)
  4681  	// result: (FMSUBD a x y)
  4682  	for {
  4683  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4684  			a := v_0
  4685  			if v_1.Op != OpARM64FNMULD {
  4686  				continue
  4687  			}
  4688  			y := v_1.Args[1]
  4689  			x := v_1.Args[0]
  4690  			if !(a.Block.Func.useFMA(v)) {
  4691  				continue
  4692  			}
  4693  			v.reset(OpARM64FMSUBD)
  4694  			v.AddArg3(a, x, y)
  4695  			return true
  4696  		}
  4697  		break
  4698  	}
  4699  	return false
  4700  }
  4701  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  4702  	v_1 := v.Args[1]
  4703  	v_0 := v.Args[0]
  4704  	// match: (FADDS a (FMULS x y))
  4705  	// cond: a.Block.Func.useFMA(v)
  4706  	// result: (FMADDS a x y)
  4707  	for {
  4708  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4709  			a := v_0
  4710  			if v_1.Op != OpARM64FMULS {
  4711  				continue
  4712  			}
  4713  			y := v_1.Args[1]
  4714  			x := v_1.Args[0]
  4715  			if !(a.Block.Func.useFMA(v)) {
  4716  				continue
  4717  			}
  4718  			v.reset(OpARM64FMADDS)
  4719  			v.AddArg3(a, x, y)
  4720  			return true
  4721  		}
  4722  		break
  4723  	}
  4724  	// match: (FADDS a (FNMULS x y))
  4725  	// cond: a.Block.Func.useFMA(v)
  4726  	// result: (FMSUBS a x y)
  4727  	for {
  4728  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4729  			a := v_0
  4730  			if v_1.Op != OpARM64FNMULS {
  4731  				continue
  4732  			}
  4733  			y := v_1.Args[1]
  4734  			x := v_1.Args[0]
  4735  			if !(a.Block.Func.useFMA(v)) {
  4736  				continue
  4737  			}
  4738  			v.reset(OpARM64FMSUBS)
  4739  			v.AddArg3(a, x, y)
  4740  			return true
  4741  		}
  4742  		break
  4743  	}
  4744  	return false
  4745  }
  4746  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  4747  	v_1 := v.Args[1]
  4748  	v_0 := v.Args[0]
  4749  	b := v.Block
  4750  	// match: (FCMPD x (FMOVDconst [0]))
  4751  	// result: (FCMPD0 x)
  4752  	for {
  4753  		x := v_0
  4754  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4755  			break
  4756  		}
  4757  		v.reset(OpARM64FCMPD0)
  4758  		v.AddArg(x)
  4759  		return true
  4760  	}
  4761  	// match: (FCMPD (FMOVDconst [0]) x)
  4762  	// result: (InvertFlags (FCMPD0 x))
  4763  	for {
  4764  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4765  			break
  4766  		}
  4767  		x := v_1
  4768  		v.reset(OpARM64InvertFlags)
  4769  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  4770  		v0.AddArg(x)
  4771  		v.AddArg(v0)
  4772  		return true
  4773  	}
  4774  	return false
  4775  }
  4776  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  4777  	v_1 := v.Args[1]
  4778  	v_0 := v.Args[0]
  4779  	b := v.Block
  4780  	// match: (FCMPS x (FMOVSconst [0]))
  4781  	// result: (FCMPS0 x)
  4782  	for {
  4783  		x := v_0
  4784  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4785  			break
  4786  		}
  4787  		v.reset(OpARM64FCMPS0)
  4788  		v.AddArg(x)
  4789  		return true
  4790  	}
  4791  	// match: (FCMPS (FMOVSconst [0]) x)
  4792  	// result: (InvertFlags (FCMPS0 x))
  4793  	for {
  4794  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4795  			break
  4796  		}
  4797  		x := v_1
  4798  		v.reset(OpARM64InvertFlags)
  4799  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  4800  		v0.AddArg(x)
  4801  		v.AddArg(v0)
  4802  		return true
  4803  	}
  4804  	return false
  4805  }
  4806  func rewriteValueARM64_OpARM64FCVTDS(v *Value) bool {
  4807  	v_0 := v.Args[0]
  4808  	// match: (FCVTDS (FABSD (FCVTSD x)))
  4809  	// result: (FABSS x)
  4810  	for {
  4811  		if v_0.Op != OpARM64FABSD {
  4812  			break
  4813  		}
  4814  		v_0_0 := v_0.Args[0]
  4815  		if v_0_0.Op != OpARM64FCVTSD {
  4816  			break
  4817  		}
  4818  		x := v_0_0.Args[0]
  4819  		v.reset(OpARM64FABSS)
  4820  		v.AddArg(x)
  4821  		return true
  4822  	}
  4823  	// match: (FCVTDS (FSQRTD (FCVTSD x)))
  4824  	// result: (FSQRTS x)
  4825  	for {
  4826  		if v_0.Op != OpARM64FSQRTD {
  4827  			break
  4828  		}
  4829  		v_0_0 := v_0.Args[0]
  4830  		if v_0_0.Op != OpARM64FCVTSD {
  4831  			break
  4832  		}
  4833  		x := v_0_0.Args[0]
  4834  		v.reset(OpARM64FSQRTS)
  4835  		v.AddArg(x)
  4836  		return true
  4837  	}
  4838  	// match: (FCVTDS (FRINTPD (FCVTSD x)))
  4839  	// result: (FRINTPS x)
  4840  	for {
  4841  		if v_0.Op != OpARM64FRINTPD {
  4842  			break
  4843  		}
  4844  		v_0_0 := v_0.Args[0]
  4845  		if v_0_0.Op != OpARM64FCVTSD {
  4846  			break
  4847  		}
  4848  		x := v_0_0.Args[0]
  4849  		v.reset(OpARM64FRINTPS)
  4850  		v.AddArg(x)
  4851  		return true
  4852  	}
  4853  	// match: (FCVTDS (FRINTMD (FCVTSD x)))
  4854  	// result: (FRINTMS x)
  4855  	for {
  4856  		if v_0.Op != OpARM64FRINTMD {
  4857  			break
  4858  		}
  4859  		v_0_0 := v_0.Args[0]
  4860  		if v_0_0.Op != OpARM64FCVTSD {
  4861  			break
  4862  		}
  4863  		x := v_0_0.Args[0]
  4864  		v.reset(OpARM64FRINTMS)
  4865  		v.AddArg(x)
  4866  		return true
  4867  	}
  4868  	// match: (FCVTDS (FRINTAD (FCVTSD x)))
  4869  	// result: (FRINTAS x)
  4870  	for {
  4871  		if v_0.Op != OpARM64FRINTAD {
  4872  			break
  4873  		}
  4874  		v_0_0 := v_0.Args[0]
  4875  		if v_0_0.Op != OpARM64FCVTSD {
  4876  			break
  4877  		}
  4878  		x := v_0_0.Args[0]
  4879  		v.reset(OpARM64FRINTAS)
  4880  		v.AddArg(x)
  4881  		return true
  4882  	}
  4883  	// match: (FCVTDS (FRINTND (FCVTSD x)))
  4884  	// result: (FRINTNS x)
  4885  	for {
  4886  		if v_0.Op != OpARM64FRINTND {
  4887  			break
  4888  		}
  4889  		v_0_0 := v_0.Args[0]
  4890  		if v_0_0.Op != OpARM64FCVTSD {
  4891  			break
  4892  		}
  4893  		x := v_0_0.Args[0]
  4894  		v.reset(OpARM64FRINTNS)
  4895  		v.AddArg(x)
  4896  		return true
  4897  	}
  4898  	// match: (FCVTDS (FRINTZD (FCVTSD x)))
  4899  	// result: (FRINTZS x)
  4900  	for {
  4901  		if v_0.Op != OpARM64FRINTZD {
  4902  			break
  4903  		}
  4904  		v_0_0 := v_0.Args[0]
  4905  		if v_0_0.Op != OpARM64FCVTSD {
  4906  			break
  4907  		}
  4908  		x := v_0_0.Args[0]
  4909  		v.reset(OpARM64FRINTZS)
  4910  		v.AddArg(x)
  4911  		return true
  4912  	}
  4913  	return false
  4914  }
  4915  func rewriteValueARM64_OpARM64FLDPQ(v *Value) bool {
  4916  	v_1 := v.Args[1]
  4917  	v_0 := v.Args[0]
  4918  	b := v.Block
  4919  	config := b.Func.Config
  4920  	// match: (FLDPQ [off1] {sym} (ADDconst [off2] ptr) mem)
  4921  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4922  	// result: (FLDPQ [off1+int32(off2)] {sym} ptr mem)
  4923  	for {
  4924  		off1 := auxIntToInt32(v.AuxInt)
  4925  		sym := auxToSym(v.Aux)
  4926  		if v_0.Op != OpARM64ADDconst {
  4927  			break
  4928  		}
  4929  		off2 := auxIntToInt64(v_0.AuxInt)
  4930  		ptr := v_0.Args[0]
  4931  		mem := v_1
  4932  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4933  			break
  4934  		}
  4935  		v.reset(OpARM64FLDPQ)
  4936  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4937  		v.Aux = symToAux(sym)
  4938  		v.AddArg2(ptr, mem)
  4939  		return true
  4940  	}
  4941  	// match: (FLDPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  4942  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4943  	// result: (FLDPQ [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  4944  	for {
  4945  		off1 := auxIntToInt32(v.AuxInt)
  4946  		sym1 := auxToSym(v.Aux)
  4947  		if v_0.Op != OpARM64MOVDaddr {
  4948  			break
  4949  		}
  4950  		off2 := auxIntToInt32(v_0.AuxInt)
  4951  		sym2 := auxToSym(v_0.Aux)
  4952  		ptr := v_0.Args[0]
  4953  		mem := v_1
  4954  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4955  			break
  4956  		}
  4957  		v.reset(OpARM64FLDPQ)
  4958  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4959  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4960  		v.AddArg2(ptr, mem)
  4961  		return true
  4962  	}
  4963  	return false
  4964  }
  4965  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  4966  	v_0 := v.Args[0]
  4967  	b := v.Block
  4968  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  4969  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4970  	for {
  4971  		t := v.Type
  4972  		if v_0.Op != OpArg {
  4973  			break
  4974  		}
  4975  		off := auxIntToInt32(v_0.AuxInt)
  4976  		sym := auxToSym(v_0.Aux)
  4977  		b = b.Func.Entry
  4978  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4979  		v.copyOf(v0)
  4980  		v0.AuxInt = int32ToAuxInt(off)
  4981  		v0.Aux = symToAux(sym)
  4982  		return true
  4983  	}
  4984  	return false
  4985  }
  4986  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  4987  	v_0 := v.Args[0]
  4988  	b := v.Block
  4989  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  4990  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4991  	for {
  4992  		t := v.Type
  4993  		if v_0.Op != OpArg {
  4994  			break
  4995  		}
  4996  		off := auxIntToInt32(v_0.AuxInt)
  4997  		sym := auxToSym(v_0.Aux)
  4998  		b = b.Func.Entry
  4999  		v0 := b.NewValue0(v.Pos, OpArg, t)
  5000  		v.copyOf(v0)
  5001  		v0.AuxInt = int32ToAuxInt(off)
  5002  		v0.Aux = symToAux(sym)
  5003  		return true
  5004  	}
  5005  	return false
  5006  }
  5007  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  5008  	v_1 := v.Args[1]
  5009  	v_0 := v.Args[0]
  5010  	b := v.Block
  5011  	config := b.Func.Config
  5012  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  5013  	// result: (FMOVDgpfp val)
  5014  	for {
  5015  		off := auxIntToInt32(v.AuxInt)
  5016  		sym := auxToSym(v.Aux)
  5017  		ptr := v_0
  5018  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5019  			break
  5020  		}
  5021  		val := v_1.Args[1]
  5022  		if ptr != v_1.Args[0] {
  5023  			break
  5024  		}
  5025  		v.reset(OpARM64FMOVDgpfp)
  5026  		v.AddArg(val)
  5027  		return true
  5028  	}
  5029  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  5030  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5031  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  5032  	for {
  5033  		off1 := auxIntToInt32(v.AuxInt)
  5034  		sym := auxToSym(v.Aux)
  5035  		if v_0.Op != OpARM64ADDconst {
  5036  			break
  5037  		}
  5038  		off2 := auxIntToInt64(v_0.AuxInt)
  5039  		ptr := v_0.Args[0]
  5040  		mem := v_1
  5041  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5042  			break
  5043  		}
  5044  		v.reset(OpARM64FMOVDload)
  5045  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5046  		v.Aux = symToAux(sym)
  5047  		v.AddArg2(ptr, mem)
  5048  		return true
  5049  	}
  5050  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  5051  	// cond: off == 0 && sym == nil
  5052  	// result: (FMOVDloadidx ptr idx mem)
  5053  	for {
  5054  		off := auxIntToInt32(v.AuxInt)
  5055  		sym := auxToSym(v.Aux)
  5056  		if v_0.Op != OpARM64ADD {
  5057  			break
  5058  		}
  5059  		idx := v_0.Args[1]
  5060  		ptr := v_0.Args[0]
  5061  		mem := v_1
  5062  		if !(off == 0 && sym == nil) {
  5063  			break
  5064  		}
  5065  		v.reset(OpARM64FMOVDloadidx)
  5066  		v.AddArg3(ptr, idx, mem)
  5067  		return true
  5068  	}
  5069  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  5070  	// cond: off == 0 && sym == nil
  5071  	// result: (FMOVDloadidx8 ptr idx mem)
  5072  	for {
  5073  		off := auxIntToInt32(v.AuxInt)
  5074  		sym := auxToSym(v.Aux)
  5075  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  5076  			break
  5077  		}
  5078  		idx := v_0.Args[1]
  5079  		ptr := v_0.Args[0]
  5080  		mem := v_1
  5081  		if !(off == 0 && sym == nil) {
  5082  			break
  5083  		}
  5084  		v.reset(OpARM64FMOVDloadidx8)
  5085  		v.AddArg3(ptr, idx, mem)
  5086  		return true
  5087  	}
  5088  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  5089  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5090  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5091  	for {
  5092  		off1 := auxIntToInt32(v.AuxInt)
  5093  		sym1 := auxToSym(v.Aux)
  5094  		if v_0.Op != OpARM64MOVDaddr {
  5095  			break
  5096  		}
  5097  		off2 := auxIntToInt32(v_0.AuxInt)
  5098  		sym2 := auxToSym(v_0.Aux)
  5099  		ptr := v_0.Args[0]
  5100  		mem := v_1
  5101  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5102  			break
  5103  		}
  5104  		v.reset(OpARM64FMOVDload)
  5105  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5106  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5107  		v.AddArg2(ptr, mem)
  5108  		return true
  5109  	}
  5110  	return false
  5111  }
  5112  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  5113  	v_2 := v.Args[2]
  5114  	v_1 := v.Args[1]
  5115  	v_0 := v.Args[0]
  5116  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  5117  	// cond: is32Bit(c)
  5118  	// result: (FMOVDload [int32(c)] ptr mem)
  5119  	for {
  5120  		ptr := v_0
  5121  		if v_1.Op != OpARM64MOVDconst {
  5122  			break
  5123  		}
  5124  		c := auxIntToInt64(v_1.AuxInt)
  5125  		mem := v_2
  5126  		if !(is32Bit(c)) {
  5127  			break
  5128  		}
  5129  		v.reset(OpARM64FMOVDload)
  5130  		v.AuxInt = int32ToAuxInt(int32(c))
  5131  		v.AddArg2(ptr, mem)
  5132  		return true
  5133  	}
  5134  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  5135  	// cond: is32Bit(c)
  5136  	// result: (FMOVDload [int32(c)] ptr mem)
  5137  	for {
  5138  		if v_0.Op != OpARM64MOVDconst {
  5139  			break
  5140  		}
  5141  		c := auxIntToInt64(v_0.AuxInt)
  5142  		ptr := v_1
  5143  		mem := v_2
  5144  		if !(is32Bit(c)) {
  5145  			break
  5146  		}
  5147  		v.reset(OpARM64FMOVDload)
  5148  		v.AuxInt = int32ToAuxInt(int32(c))
  5149  		v.AddArg2(ptr, mem)
  5150  		return true
  5151  	}
  5152  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  5153  	// result: (FMOVDloadidx8 ptr idx mem)
  5154  	for {
  5155  		ptr := v_0
  5156  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  5157  			break
  5158  		}
  5159  		idx := v_1.Args[0]
  5160  		mem := v_2
  5161  		v.reset(OpARM64FMOVDloadidx8)
  5162  		v.AddArg3(ptr, idx, mem)
  5163  		return true
  5164  	}
  5165  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  5166  	// result: (FMOVDloadidx8 ptr idx mem)
  5167  	for {
  5168  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  5169  			break
  5170  		}
  5171  		idx := v_0.Args[0]
  5172  		ptr := v_1
  5173  		mem := v_2
  5174  		v.reset(OpARM64FMOVDloadidx8)
  5175  		v.AddArg3(ptr, idx, mem)
  5176  		return true
  5177  	}
  5178  	return false
  5179  }
  5180  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  5181  	v_2 := v.Args[2]
  5182  	v_1 := v.Args[1]
  5183  	v_0 := v.Args[0]
  5184  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  5185  	// cond: is32Bit(c<<3)
  5186  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  5187  	for {
  5188  		ptr := v_0
  5189  		if v_1.Op != OpARM64MOVDconst {
  5190  			break
  5191  		}
  5192  		c := auxIntToInt64(v_1.AuxInt)
  5193  		mem := v_2
  5194  		if !(is32Bit(c << 3)) {
  5195  			break
  5196  		}
  5197  		v.reset(OpARM64FMOVDload)
  5198  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  5199  		v.AddArg2(ptr, mem)
  5200  		return true
  5201  	}
  5202  	return false
  5203  }
  5204  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  5205  	v_2 := v.Args[2]
  5206  	v_1 := v.Args[1]
  5207  	v_0 := v.Args[0]
  5208  	b := v.Block
  5209  	config := b.Func.Config
  5210  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  5211  	// result: (MOVDstore [off] {sym} ptr val mem)
  5212  	for {
  5213  		off := auxIntToInt32(v.AuxInt)
  5214  		sym := auxToSym(v.Aux)
  5215  		ptr := v_0
  5216  		if v_1.Op != OpARM64FMOVDgpfp {
  5217  			break
  5218  		}
  5219  		val := v_1.Args[0]
  5220  		mem := v_2
  5221  		v.reset(OpARM64MOVDstore)
  5222  		v.AuxInt = int32ToAuxInt(off)
  5223  		v.Aux = symToAux(sym)
  5224  		v.AddArg3(ptr, val, mem)
  5225  		return true
  5226  	}
  5227  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5228  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5229  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  5230  	for {
  5231  		off1 := auxIntToInt32(v.AuxInt)
  5232  		sym := auxToSym(v.Aux)
  5233  		if v_0.Op != OpARM64ADDconst {
  5234  			break
  5235  		}
  5236  		off2 := auxIntToInt64(v_0.AuxInt)
  5237  		ptr := v_0.Args[0]
  5238  		val := v_1
  5239  		mem := v_2
  5240  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5241  			break
  5242  		}
  5243  		v.reset(OpARM64FMOVDstore)
  5244  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5245  		v.Aux = symToAux(sym)
  5246  		v.AddArg3(ptr, val, mem)
  5247  		return true
  5248  	}
  5249  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  5250  	// cond: off == 0 && sym == nil
  5251  	// result: (FMOVDstoreidx ptr idx val mem)
  5252  	for {
  5253  		off := auxIntToInt32(v.AuxInt)
  5254  		sym := auxToSym(v.Aux)
  5255  		if v_0.Op != OpARM64ADD {
  5256  			break
  5257  		}
  5258  		idx := v_0.Args[1]
  5259  		ptr := v_0.Args[0]
  5260  		val := v_1
  5261  		mem := v_2
  5262  		if !(off == 0 && sym == nil) {
  5263  			break
  5264  		}
  5265  		v.reset(OpARM64FMOVDstoreidx)
  5266  		v.AddArg4(ptr, idx, val, mem)
  5267  		return true
  5268  	}
  5269  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  5270  	// cond: off == 0 && sym == nil
  5271  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5272  	for {
  5273  		off := auxIntToInt32(v.AuxInt)
  5274  		sym := auxToSym(v.Aux)
  5275  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  5276  			break
  5277  		}
  5278  		idx := v_0.Args[1]
  5279  		ptr := v_0.Args[0]
  5280  		val := v_1
  5281  		mem := v_2
  5282  		if !(off == 0 && sym == nil) {
  5283  			break
  5284  		}
  5285  		v.reset(OpARM64FMOVDstoreidx8)
  5286  		v.AddArg4(ptr, idx, val, mem)
  5287  		return true
  5288  	}
  5289  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5290  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5291  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5292  	for {
  5293  		off1 := auxIntToInt32(v.AuxInt)
  5294  		sym1 := auxToSym(v.Aux)
  5295  		if v_0.Op != OpARM64MOVDaddr {
  5296  			break
  5297  		}
  5298  		off2 := auxIntToInt32(v_0.AuxInt)
  5299  		sym2 := auxToSym(v_0.Aux)
  5300  		ptr := v_0.Args[0]
  5301  		val := v_1
  5302  		mem := v_2
  5303  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5304  			break
  5305  		}
  5306  		v.reset(OpARM64FMOVDstore)
  5307  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5308  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5309  		v.AddArg3(ptr, val, mem)
  5310  		return true
  5311  	}
  5312  	return false
  5313  }
  5314  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  5315  	v_3 := v.Args[3]
  5316  	v_2 := v.Args[2]
  5317  	v_1 := v.Args[1]
  5318  	v_0 := v.Args[0]
  5319  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  5320  	// cond: is32Bit(c)
  5321  	// result: (FMOVDstore [int32(c)] ptr val mem)
  5322  	for {
  5323  		ptr := v_0
  5324  		if v_1.Op != OpARM64MOVDconst {
  5325  			break
  5326  		}
  5327  		c := auxIntToInt64(v_1.AuxInt)
  5328  		val := v_2
  5329  		mem := v_3
  5330  		if !(is32Bit(c)) {
  5331  			break
  5332  		}
  5333  		v.reset(OpARM64FMOVDstore)
  5334  		v.AuxInt = int32ToAuxInt(int32(c))
  5335  		v.AddArg3(ptr, val, mem)
  5336  		return true
  5337  	}
  5338  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  5339  	// cond: is32Bit(c)
  5340  	// result: (FMOVDstore [int32(c)] idx val mem)
  5341  	for {
  5342  		if v_0.Op != OpARM64MOVDconst {
  5343  			break
  5344  		}
  5345  		c := auxIntToInt64(v_0.AuxInt)
  5346  		idx := v_1
  5347  		val := v_2
  5348  		mem := v_3
  5349  		if !(is32Bit(c)) {
  5350  			break
  5351  		}
  5352  		v.reset(OpARM64FMOVDstore)
  5353  		v.AuxInt = int32ToAuxInt(int32(c))
  5354  		v.AddArg3(idx, val, mem)
  5355  		return true
  5356  	}
  5357  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  5358  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5359  	for {
  5360  		ptr := v_0
  5361  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  5362  			break
  5363  		}
  5364  		idx := v_1.Args[0]
  5365  		val := v_2
  5366  		mem := v_3
  5367  		v.reset(OpARM64FMOVDstoreidx8)
  5368  		v.AddArg4(ptr, idx, val, mem)
  5369  		return true
  5370  	}
  5371  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  5372  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5373  	for {
  5374  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  5375  			break
  5376  		}
  5377  		idx := v_0.Args[0]
  5378  		ptr := v_1
  5379  		val := v_2
  5380  		mem := v_3
  5381  		v.reset(OpARM64FMOVDstoreidx8)
  5382  		v.AddArg4(ptr, idx, val, mem)
  5383  		return true
  5384  	}
  5385  	return false
  5386  }
  5387  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  5388  	v_3 := v.Args[3]
  5389  	v_2 := v.Args[2]
  5390  	v_1 := v.Args[1]
  5391  	v_0 := v.Args[0]
  5392  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  5393  	// cond: is32Bit(c<<3)
  5394  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  5395  	for {
  5396  		ptr := v_0
  5397  		if v_1.Op != OpARM64MOVDconst {
  5398  			break
  5399  		}
  5400  		c := auxIntToInt64(v_1.AuxInt)
  5401  		val := v_2
  5402  		mem := v_3
  5403  		if !(is32Bit(c << 3)) {
  5404  			break
  5405  		}
  5406  		v.reset(OpARM64FMOVDstore)
  5407  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  5408  		v.AddArg3(ptr, val, mem)
  5409  		return true
  5410  	}
  5411  	return false
  5412  }
  5413  func rewriteValueARM64_OpARM64FMOVQload(v *Value) bool {
  5414  	v_1 := v.Args[1]
  5415  	v_0 := v.Args[0]
  5416  	b := v.Block
  5417  	config := b.Func.Config
  5418  	// match: (FMOVQload [off1] {sym} (ADDconst [off2] ptr) mem)
  5419  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5420  	// result: (FMOVQload [off1+int32(off2)] {sym} ptr mem)
  5421  	for {
  5422  		off1 := auxIntToInt32(v.AuxInt)
  5423  		sym := auxToSym(v.Aux)
  5424  		if v_0.Op != OpARM64ADDconst {
  5425  			break
  5426  		}
  5427  		off2 := auxIntToInt64(v_0.AuxInt)
  5428  		ptr := v_0.Args[0]
  5429  		mem := v_1
  5430  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5431  			break
  5432  		}
  5433  		v.reset(OpARM64FMOVQload)
  5434  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5435  		v.Aux = symToAux(sym)
  5436  		v.AddArg2(ptr, mem)
  5437  		return true
  5438  	}
  5439  	// match: (FMOVQload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  5440  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5441  	// result: (FMOVQload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5442  	for {
  5443  		off1 := auxIntToInt32(v.AuxInt)
  5444  		sym1 := auxToSym(v.Aux)
  5445  		if v_0.Op != OpARM64MOVDaddr {
  5446  			break
  5447  		}
  5448  		off2 := auxIntToInt32(v_0.AuxInt)
  5449  		sym2 := auxToSym(v_0.Aux)
  5450  		ptr := v_0.Args[0]
  5451  		mem := v_1
  5452  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5453  			break
  5454  		}
  5455  		v.reset(OpARM64FMOVQload)
  5456  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5457  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5458  		v.AddArg2(ptr, mem)
  5459  		return true
  5460  	}
  5461  	return false
  5462  }
  5463  func rewriteValueARM64_OpARM64FMOVQstore(v *Value) bool {
  5464  	v_2 := v.Args[2]
  5465  	v_1 := v.Args[1]
  5466  	v_0 := v.Args[0]
  5467  	b := v.Block
  5468  	config := b.Func.Config
  5469  	// match: (FMOVQstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5470  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5471  	// result: (FMOVQstore [off1+int32(off2)] {sym} ptr val mem)
  5472  	for {
  5473  		off1 := auxIntToInt32(v.AuxInt)
  5474  		sym := auxToSym(v.Aux)
  5475  		if v_0.Op != OpARM64ADDconst {
  5476  			break
  5477  		}
  5478  		off2 := auxIntToInt64(v_0.AuxInt)
  5479  		ptr := v_0.Args[0]
  5480  		val := v_1
  5481  		mem := v_2
  5482  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5483  			break
  5484  		}
  5485  		v.reset(OpARM64FMOVQstore)
  5486  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5487  		v.Aux = symToAux(sym)
  5488  		v.AddArg3(ptr, val, mem)
  5489  		return true
  5490  	}
  5491  	// match: (FMOVQstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5492  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5493  	// result: (FMOVQstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5494  	for {
  5495  		off1 := auxIntToInt32(v.AuxInt)
  5496  		sym1 := auxToSym(v.Aux)
  5497  		if v_0.Op != OpARM64MOVDaddr {
  5498  			break
  5499  		}
  5500  		off2 := auxIntToInt32(v_0.AuxInt)
  5501  		sym2 := auxToSym(v_0.Aux)
  5502  		ptr := v_0.Args[0]
  5503  		val := v_1
  5504  		mem := v_2
  5505  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5506  			break
  5507  		}
  5508  		v.reset(OpARM64FMOVQstore)
  5509  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5510  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5511  		v.AddArg3(ptr, val, mem)
  5512  		return true
  5513  	}
  5514  	return false
  5515  }
  5516  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  5517  	v_1 := v.Args[1]
  5518  	v_0 := v.Args[0]
  5519  	b := v.Block
  5520  	config := b.Func.Config
  5521  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  5522  	// result: (FMOVSgpfp val)
  5523  	for {
  5524  		off := auxIntToInt32(v.AuxInt)
  5525  		sym := auxToSym(v.Aux)
  5526  		ptr := v_0
  5527  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5528  			break
  5529  		}
  5530  		val := v_1.Args[1]
  5531  		if ptr != v_1.Args[0] {
  5532  			break
  5533  		}
  5534  		v.reset(OpARM64FMOVSgpfp)
  5535  		v.AddArg(val)
  5536  		return true
  5537  	}
  5538  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  5539  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5540  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  5541  	for {
  5542  		off1 := auxIntToInt32(v.AuxInt)
  5543  		sym := auxToSym(v.Aux)
  5544  		if v_0.Op != OpARM64ADDconst {
  5545  			break
  5546  		}
  5547  		off2 := auxIntToInt64(v_0.AuxInt)
  5548  		ptr := v_0.Args[0]
  5549  		mem := v_1
  5550  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5551  			break
  5552  		}
  5553  		v.reset(OpARM64FMOVSload)
  5554  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5555  		v.Aux = symToAux(sym)
  5556  		v.AddArg2(ptr, mem)
  5557  		return true
  5558  	}
  5559  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  5560  	// cond: off == 0 && sym == nil
  5561  	// result: (FMOVSloadidx ptr idx mem)
  5562  	for {
  5563  		off := auxIntToInt32(v.AuxInt)
  5564  		sym := auxToSym(v.Aux)
  5565  		if v_0.Op != OpARM64ADD {
  5566  			break
  5567  		}
  5568  		idx := v_0.Args[1]
  5569  		ptr := v_0.Args[0]
  5570  		mem := v_1
  5571  		if !(off == 0 && sym == nil) {
  5572  			break
  5573  		}
  5574  		v.reset(OpARM64FMOVSloadidx)
  5575  		v.AddArg3(ptr, idx, mem)
  5576  		return true
  5577  	}
  5578  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  5579  	// cond: off == 0 && sym == nil
  5580  	// result: (FMOVSloadidx4 ptr idx mem)
  5581  	for {
  5582  		off := auxIntToInt32(v.AuxInt)
  5583  		sym := auxToSym(v.Aux)
  5584  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5585  			break
  5586  		}
  5587  		idx := v_0.Args[1]
  5588  		ptr := v_0.Args[0]
  5589  		mem := v_1
  5590  		if !(off == 0 && sym == nil) {
  5591  			break
  5592  		}
  5593  		v.reset(OpARM64FMOVSloadidx4)
  5594  		v.AddArg3(ptr, idx, mem)
  5595  		return true
  5596  	}
  5597  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  5598  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5599  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5600  	for {
  5601  		off1 := auxIntToInt32(v.AuxInt)
  5602  		sym1 := auxToSym(v.Aux)
  5603  		if v_0.Op != OpARM64MOVDaddr {
  5604  			break
  5605  		}
  5606  		off2 := auxIntToInt32(v_0.AuxInt)
  5607  		sym2 := auxToSym(v_0.Aux)
  5608  		ptr := v_0.Args[0]
  5609  		mem := v_1
  5610  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5611  			break
  5612  		}
  5613  		v.reset(OpARM64FMOVSload)
  5614  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5615  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5616  		v.AddArg2(ptr, mem)
  5617  		return true
  5618  	}
  5619  	return false
  5620  }
  5621  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  5622  	v_2 := v.Args[2]
  5623  	v_1 := v.Args[1]
  5624  	v_0 := v.Args[0]
  5625  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  5626  	// cond: is32Bit(c)
  5627  	// result: (FMOVSload [int32(c)] ptr mem)
  5628  	for {
  5629  		ptr := v_0
  5630  		if v_1.Op != OpARM64MOVDconst {
  5631  			break
  5632  		}
  5633  		c := auxIntToInt64(v_1.AuxInt)
  5634  		mem := v_2
  5635  		if !(is32Bit(c)) {
  5636  			break
  5637  		}
  5638  		v.reset(OpARM64FMOVSload)
  5639  		v.AuxInt = int32ToAuxInt(int32(c))
  5640  		v.AddArg2(ptr, mem)
  5641  		return true
  5642  	}
  5643  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  5644  	// cond: is32Bit(c)
  5645  	// result: (FMOVSload [int32(c)] ptr mem)
  5646  	for {
  5647  		if v_0.Op != OpARM64MOVDconst {
  5648  			break
  5649  		}
  5650  		c := auxIntToInt64(v_0.AuxInt)
  5651  		ptr := v_1
  5652  		mem := v_2
  5653  		if !(is32Bit(c)) {
  5654  			break
  5655  		}
  5656  		v.reset(OpARM64FMOVSload)
  5657  		v.AuxInt = int32ToAuxInt(int32(c))
  5658  		v.AddArg2(ptr, mem)
  5659  		return true
  5660  	}
  5661  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  5662  	// result: (FMOVSloadidx4 ptr idx mem)
  5663  	for {
  5664  		ptr := v_0
  5665  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5666  			break
  5667  		}
  5668  		idx := v_1.Args[0]
  5669  		mem := v_2
  5670  		v.reset(OpARM64FMOVSloadidx4)
  5671  		v.AddArg3(ptr, idx, mem)
  5672  		return true
  5673  	}
  5674  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  5675  	// result: (FMOVSloadidx4 ptr idx mem)
  5676  	for {
  5677  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5678  			break
  5679  		}
  5680  		idx := v_0.Args[0]
  5681  		ptr := v_1
  5682  		mem := v_2
  5683  		v.reset(OpARM64FMOVSloadidx4)
  5684  		v.AddArg3(ptr, idx, mem)
  5685  		return true
  5686  	}
  5687  	return false
  5688  }
  5689  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  5690  	v_2 := v.Args[2]
  5691  	v_1 := v.Args[1]
  5692  	v_0 := v.Args[0]
  5693  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  5694  	// cond: is32Bit(c<<2)
  5695  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  5696  	for {
  5697  		ptr := v_0
  5698  		if v_1.Op != OpARM64MOVDconst {
  5699  			break
  5700  		}
  5701  		c := auxIntToInt64(v_1.AuxInt)
  5702  		mem := v_2
  5703  		if !(is32Bit(c << 2)) {
  5704  			break
  5705  		}
  5706  		v.reset(OpARM64FMOVSload)
  5707  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5708  		v.AddArg2(ptr, mem)
  5709  		return true
  5710  	}
  5711  	return false
  5712  }
  5713  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  5714  	v_2 := v.Args[2]
  5715  	v_1 := v.Args[1]
  5716  	v_0 := v.Args[0]
  5717  	b := v.Block
  5718  	config := b.Func.Config
  5719  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  5720  	// result: (MOVWstore [off] {sym} ptr val mem)
  5721  	for {
  5722  		off := auxIntToInt32(v.AuxInt)
  5723  		sym := auxToSym(v.Aux)
  5724  		ptr := v_0
  5725  		if v_1.Op != OpARM64FMOVSgpfp {
  5726  			break
  5727  		}
  5728  		val := v_1.Args[0]
  5729  		mem := v_2
  5730  		v.reset(OpARM64MOVWstore)
  5731  		v.AuxInt = int32ToAuxInt(off)
  5732  		v.Aux = symToAux(sym)
  5733  		v.AddArg3(ptr, val, mem)
  5734  		return true
  5735  	}
  5736  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5737  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5738  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  5739  	for {
  5740  		off1 := auxIntToInt32(v.AuxInt)
  5741  		sym := auxToSym(v.Aux)
  5742  		if v_0.Op != OpARM64ADDconst {
  5743  			break
  5744  		}
  5745  		off2 := auxIntToInt64(v_0.AuxInt)
  5746  		ptr := v_0.Args[0]
  5747  		val := v_1
  5748  		mem := v_2
  5749  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5750  			break
  5751  		}
  5752  		v.reset(OpARM64FMOVSstore)
  5753  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5754  		v.Aux = symToAux(sym)
  5755  		v.AddArg3(ptr, val, mem)
  5756  		return true
  5757  	}
  5758  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  5759  	// cond: off == 0 && sym == nil
  5760  	// result: (FMOVSstoreidx ptr idx val mem)
  5761  	for {
  5762  		off := auxIntToInt32(v.AuxInt)
  5763  		sym := auxToSym(v.Aux)
  5764  		if v_0.Op != OpARM64ADD {
  5765  			break
  5766  		}
  5767  		idx := v_0.Args[1]
  5768  		ptr := v_0.Args[0]
  5769  		val := v_1
  5770  		mem := v_2
  5771  		if !(off == 0 && sym == nil) {
  5772  			break
  5773  		}
  5774  		v.reset(OpARM64FMOVSstoreidx)
  5775  		v.AddArg4(ptr, idx, val, mem)
  5776  		return true
  5777  	}
  5778  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  5779  	// cond: off == 0 && sym == nil
  5780  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5781  	for {
  5782  		off := auxIntToInt32(v.AuxInt)
  5783  		sym := auxToSym(v.Aux)
  5784  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5785  			break
  5786  		}
  5787  		idx := v_0.Args[1]
  5788  		ptr := v_0.Args[0]
  5789  		val := v_1
  5790  		mem := v_2
  5791  		if !(off == 0 && sym == nil) {
  5792  			break
  5793  		}
  5794  		v.reset(OpARM64FMOVSstoreidx4)
  5795  		v.AddArg4(ptr, idx, val, mem)
  5796  		return true
  5797  	}
  5798  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5799  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5800  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5801  	for {
  5802  		off1 := auxIntToInt32(v.AuxInt)
  5803  		sym1 := auxToSym(v.Aux)
  5804  		if v_0.Op != OpARM64MOVDaddr {
  5805  			break
  5806  		}
  5807  		off2 := auxIntToInt32(v_0.AuxInt)
  5808  		sym2 := auxToSym(v_0.Aux)
  5809  		ptr := v_0.Args[0]
  5810  		val := v_1
  5811  		mem := v_2
  5812  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5813  			break
  5814  		}
  5815  		v.reset(OpARM64FMOVSstore)
  5816  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5817  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5818  		v.AddArg3(ptr, val, mem)
  5819  		return true
  5820  	}
  5821  	return false
  5822  }
  5823  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  5824  	v_3 := v.Args[3]
  5825  	v_2 := v.Args[2]
  5826  	v_1 := v.Args[1]
  5827  	v_0 := v.Args[0]
  5828  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  5829  	// cond: is32Bit(c)
  5830  	// result: (FMOVSstore [int32(c)] ptr val mem)
  5831  	for {
  5832  		ptr := v_0
  5833  		if v_1.Op != OpARM64MOVDconst {
  5834  			break
  5835  		}
  5836  		c := auxIntToInt64(v_1.AuxInt)
  5837  		val := v_2
  5838  		mem := v_3
  5839  		if !(is32Bit(c)) {
  5840  			break
  5841  		}
  5842  		v.reset(OpARM64FMOVSstore)
  5843  		v.AuxInt = int32ToAuxInt(int32(c))
  5844  		v.AddArg3(ptr, val, mem)
  5845  		return true
  5846  	}
  5847  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  5848  	// cond: is32Bit(c)
  5849  	// result: (FMOVSstore [int32(c)] idx val mem)
  5850  	for {
  5851  		if v_0.Op != OpARM64MOVDconst {
  5852  			break
  5853  		}
  5854  		c := auxIntToInt64(v_0.AuxInt)
  5855  		idx := v_1
  5856  		val := v_2
  5857  		mem := v_3
  5858  		if !(is32Bit(c)) {
  5859  			break
  5860  		}
  5861  		v.reset(OpARM64FMOVSstore)
  5862  		v.AuxInt = int32ToAuxInt(int32(c))
  5863  		v.AddArg3(idx, val, mem)
  5864  		return true
  5865  	}
  5866  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  5867  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5868  	for {
  5869  		ptr := v_0
  5870  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5871  			break
  5872  		}
  5873  		idx := v_1.Args[0]
  5874  		val := v_2
  5875  		mem := v_3
  5876  		v.reset(OpARM64FMOVSstoreidx4)
  5877  		v.AddArg4(ptr, idx, val, mem)
  5878  		return true
  5879  	}
  5880  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  5881  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5882  	for {
  5883  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5884  			break
  5885  		}
  5886  		idx := v_0.Args[0]
  5887  		ptr := v_1
  5888  		val := v_2
  5889  		mem := v_3
  5890  		v.reset(OpARM64FMOVSstoreidx4)
  5891  		v.AddArg4(ptr, idx, val, mem)
  5892  		return true
  5893  	}
  5894  	return false
  5895  }
  5896  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  5897  	v_3 := v.Args[3]
  5898  	v_2 := v.Args[2]
  5899  	v_1 := v.Args[1]
  5900  	v_0 := v.Args[0]
  5901  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  5902  	// cond: is32Bit(c<<2)
  5903  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  5904  	for {
  5905  		ptr := v_0
  5906  		if v_1.Op != OpARM64MOVDconst {
  5907  			break
  5908  		}
  5909  		c := auxIntToInt64(v_1.AuxInt)
  5910  		val := v_2
  5911  		mem := v_3
  5912  		if !(is32Bit(c << 2)) {
  5913  			break
  5914  		}
  5915  		v.reset(OpARM64FMOVSstore)
  5916  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5917  		v.AddArg3(ptr, val, mem)
  5918  		return true
  5919  	}
  5920  	return false
  5921  }
  5922  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  5923  	v_1 := v.Args[1]
  5924  	v_0 := v.Args[0]
  5925  	// match: (FMULD (FNEGD x) y)
  5926  	// result: (FNMULD x y)
  5927  	for {
  5928  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5929  			if v_0.Op != OpARM64FNEGD {
  5930  				continue
  5931  			}
  5932  			x := v_0.Args[0]
  5933  			y := v_1
  5934  			v.reset(OpARM64FNMULD)
  5935  			v.AddArg2(x, y)
  5936  			return true
  5937  		}
  5938  		break
  5939  	}
  5940  	return false
  5941  }
  5942  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  5943  	v_1 := v.Args[1]
  5944  	v_0 := v.Args[0]
  5945  	// match: (FMULS (FNEGS x) y)
  5946  	// result: (FNMULS x y)
  5947  	for {
  5948  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5949  			if v_0.Op != OpARM64FNEGS {
  5950  				continue
  5951  			}
  5952  			x := v_0.Args[0]
  5953  			y := v_1
  5954  			v.reset(OpARM64FNMULS)
  5955  			v.AddArg2(x, y)
  5956  			return true
  5957  		}
  5958  		break
  5959  	}
  5960  	return false
  5961  }
  5962  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  5963  	v_0 := v.Args[0]
  5964  	// match: (FNEGD (FMULD x y))
  5965  	// result: (FNMULD x y)
  5966  	for {
  5967  		if v_0.Op != OpARM64FMULD {
  5968  			break
  5969  		}
  5970  		y := v_0.Args[1]
  5971  		x := v_0.Args[0]
  5972  		v.reset(OpARM64FNMULD)
  5973  		v.AddArg2(x, y)
  5974  		return true
  5975  	}
  5976  	// match: (FNEGD (FNMULD x y))
  5977  	// result: (FMULD x y)
  5978  	for {
  5979  		if v_0.Op != OpARM64FNMULD {
  5980  			break
  5981  		}
  5982  		y := v_0.Args[1]
  5983  		x := v_0.Args[0]
  5984  		v.reset(OpARM64FMULD)
  5985  		v.AddArg2(x, y)
  5986  		return true
  5987  	}
  5988  	return false
  5989  }
  5990  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  5991  	v_0 := v.Args[0]
  5992  	// match: (FNEGS (FMULS x y))
  5993  	// result: (FNMULS x y)
  5994  	for {
  5995  		if v_0.Op != OpARM64FMULS {
  5996  			break
  5997  		}
  5998  		y := v_0.Args[1]
  5999  		x := v_0.Args[0]
  6000  		v.reset(OpARM64FNMULS)
  6001  		v.AddArg2(x, y)
  6002  		return true
  6003  	}
  6004  	// match: (FNEGS (FNMULS x y))
  6005  	// result: (FMULS x y)
  6006  	for {
  6007  		if v_0.Op != OpARM64FNMULS {
  6008  			break
  6009  		}
  6010  		y := v_0.Args[1]
  6011  		x := v_0.Args[0]
  6012  		v.reset(OpARM64FMULS)
  6013  		v.AddArg2(x, y)
  6014  		return true
  6015  	}
  6016  	return false
  6017  }
  6018  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  6019  	v_1 := v.Args[1]
  6020  	v_0 := v.Args[0]
  6021  	// match: (FNMULD (FNEGD x) y)
  6022  	// result: (FMULD x y)
  6023  	for {
  6024  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6025  			if v_0.Op != OpARM64FNEGD {
  6026  				continue
  6027  			}
  6028  			x := v_0.Args[0]
  6029  			y := v_1
  6030  			v.reset(OpARM64FMULD)
  6031  			v.AddArg2(x, y)
  6032  			return true
  6033  		}
  6034  		break
  6035  	}
  6036  	return false
  6037  }
  6038  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  6039  	v_1 := v.Args[1]
  6040  	v_0 := v.Args[0]
  6041  	// match: (FNMULS (FNEGS x) y)
  6042  	// result: (FMULS x y)
  6043  	for {
  6044  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6045  			if v_0.Op != OpARM64FNEGS {
  6046  				continue
  6047  			}
  6048  			x := v_0.Args[0]
  6049  			y := v_1
  6050  			v.reset(OpARM64FMULS)
  6051  			v.AddArg2(x, y)
  6052  			return true
  6053  		}
  6054  		break
  6055  	}
  6056  	return false
  6057  }
  6058  func rewriteValueARM64_OpARM64FSTPQ(v *Value) bool {
  6059  	v_3 := v.Args[3]
  6060  	v_2 := v.Args[2]
  6061  	v_1 := v.Args[1]
  6062  	v_0 := v.Args[0]
  6063  	b := v.Block
  6064  	config := b.Func.Config
  6065  	// match: (FSTPQ [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
  6066  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6067  	// result: (FSTPQ [off1+int32(off2)] {sym} ptr val1 val2 mem)
  6068  	for {
  6069  		off1 := auxIntToInt32(v.AuxInt)
  6070  		sym := auxToSym(v.Aux)
  6071  		if v_0.Op != OpARM64ADDconst {
  6072  			break
  6073  		}
  6074  		off2 := auxIntToInt64(v_0.AuxInt)
  6075  		ptr := v_0.Args[0]
  6076  		val1 := v_1
  6077  		val2 := v_2
  6078  		mem := v_3
  6079  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6080  			break
  6081  		}
  6082  		v.reset(OpARM64FSTPQ)
  6083  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6084  		v.Aux = symToAux(sym)
  6085  		v.AddArg4(ptr, val1, val2, mem)
  6086  		return true
  6087  	}
  6088  	// match: (FSTPQ [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
  6089  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6090  	// result: (FSTPQ [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
  6091  	for {
  6092  		off1 := auxIntToInt32(v.AuxInt)
  6093  		sym1 := auxToSym(v.Aux)
  6094  		if v_0.Op != OpARM64MOVDaddr {
  6095  			break
  6096  		}
  6097  		off2 := auxIntToInt32(v_0.AuxInt)
  6098  		sym2 := auxToSym(v_0.Aux)
  6099  		ptr := v_0.Args[0]
  6100  		val1 := v_1
  6101  		val2 := v_2
  6102  		mem := v_3
  6103  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6104  			break
  6105  		}
  6106  		v.reset(OpARM64FSTPQ)
  6107  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6108  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6109  		v.AddArg4(ptr, val1, val2, mem)
  6110  		return true
  6111  	}
  6112  	return false
  6113  }
  6114  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  6115  	v_1 := v.Args[1]
  6116  	v_0 := v.Args[0]
  6117  	// match: (FSUBD a (FMULD x y))
  6118  	// cond: a.Block.Func.useFMA(v)
  6119  	// result: (FMSUBD a x y)
  6120  	for {
  6121  		a := v_0
  6122  		if v_1.Op != OpARM64FMULD {
  6123  			break
  6124  		}
  6125  		y := v_1.Args[1]
  6126  		x := v_1.Args[0]
  6127  		if !(a.Block.Func.useFMA(v)) {
  6128  			break
  6129  		}
  6130  		v.reset(OpARM64FMSUBD)
  6131  		v.AddArg3(a, x, y)
  6132  		return true
  6133  	}
  6134  	// match: (FSUBD (FMULD x y) a)
  6135  	// cond: a.Block.Func.useFMA(v)
  6136  	// result: (FNMSUBD a x y)
  6137  	for {
  6138  		if v_0.Op != OpARM64FMULD {
  6139  			break
  6140  		}
  6141  		y := v_0.Args[1]
  6142  		x := v_0.Args[0]
  6143  		a := v_1
  6144  		if !(a.Block.Func.useFMA(v)) {
  6145  			break
  6146  		}
  6147  		v.reset(OpARM64FNMSUBD)
  6148  		v.AddArg3(a, x, y)
  6149  		return true
  6150  	}
  6151  	// match: (FSUBD a (FNMULD x y))
  6152  	// cond: a.Block.Func.useFMA(v)
  6153  	// result: (FMADDD a x y)
  6154  	for {
  6155  		a := v_0
  6156  		if v_1.Op != OpARM64FNMULD {
  6157  			break
  6158  		}
  6159  		y := v_1.Args[1]
  6160  		x := v_1.Args[0]
  6161  		if !(a.Block.Func.useFMA(v)) {
  6162  			break
  6163  		}
  6164  		v.reset(OpARM64FMADDD)
  6165  		v.AddArg3(a, x, y)
  6166  		return true
  6167  	}
  6168  	// match: (FSUBD (FNMULD x y) a)
  6169  	// cond: a.Block.Func.useFMA(v)
  6170  	// result: (FNMADDD a x y)
  6171  	for {
  6172  		if v_0.Op != OpARM64FNMULD {
  6173  			break
  6174  		}
  6175  		y := v_0.Args[1]
  6176  		x := v_0.Args[0]
  6177  		a := v_1
  6178  		if !(a.Block.Func.useFMA(v)) {
  6179  			break
  6180  		}
  6181  		v.reset(OpARM64FNMADDD)
  6182  		v.AddArg3(a, x, y)
  6183  		return true
  6184  	}
  6185  	return false
  6186  }
  6187  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  6188  	v_1 := v.Args[1]
  6189  	v_0 := v.Args[0]
  6190  	// match: (FSUBS a (FMULS x y))
  6191  	// cond: a.Block.Func.useFMA(v)
  6192  	// result: (FMSUBS a x y)
  6193  	for {
  6194  		a := v_0
  6195  		if v_1.Op != OpARM64FMULS {
  6196  			break
  6197  		}
  6198  		y := v_1.Args[1]
  6199  		x := v_1.Args[0]
  6200  		if !(a.Block.Func.useFMA(v)) {
  6201  			break
  6202  		}
  6203  		v.reset(OpARM64FMSUBS)
  6204  		v.AddArg3(a, x, y)
  6205  		return true
  6206  	}
  6207  	// match: (FSUBS (FMULS x y) a)
  6208  	// cond: a.Block.Func.useFMA(v)
  6209  	// result: (FNMSUBS a x y)
  6210  	for {
  6211  		if v_0.Op != OpARM64FMULS {
  6212  			break
  6213  		}
  6214  		y := v_0.Args[1]
  6215  		x := v_0.Args[0]
  6216  		a := v_1
  6217  		if !(a.Block.Func.useFMA(v)) {
  6218  			break
  6219  		}
  6220  		v.reset(OpARM64FNMSUBS)
  6221  		v.AddArg3(a, x, y)
  6222  		return true
  6223  	}
  6224  	// match: (FSUBS a (FNMULS x y))
  6225  	// cond: a.Block.Func.useFMA(v)
  6226  	// result: (FMADDS a x y)
  6227  	for {
  6228  		a := v_0
  6229  		if v_1.Op != OpARM64FNMULS {
  6230  			break
  6231  		}
  6232  		y := v_1.Args[1]
  6233  		x := v_1.Args[0]
  6234  		if !(a.Block.Func.useFMA(v)) {
  6235  			break
  6236  		}
  6237  		v.reset(OpARM64FMADDS)
  6238  		v.AddArg3(a, x, y)
  6239  		return true
  6240  	}
  6241  	// match: (FSUBS (FNMULS x y) a)
  6242  	// cond: a.Block.Func.useFMA(v)
  6243  	// result: (FNMADDS a x y)
  6244  	for {
  6245  		if v_0.Op != OpARM64FNMULS {
  6246  			break
  6247  		}
  6248  		y := v_0.Args[1]
  6249  		x := v_0.Args[0]
  6250  		a := v_1
  6251  		if !(a.Block.Func.useFMA(v)) {
  6252  			break
  6253  		}
  6254  		v.reset(OpARM64FNMADDS)
  6255  		v.AddArg3(a, x, y)
  6256  		return true
  6257  	}
  6258  	return false
  6259  }
  6260  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  6261  	v_0 := v.Args[0]
  6262  	b := v.Block
  6263  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  6264  	// cond: z.Uses == 1
  6265  	// result: (GreaterEqual (TST x y))
  6266  	for {
  6267  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6268  			break
  6269  		}
  6270  		z := v_0.Args[0]
  6271  		if z.Op != OpARM64AND {
  6272  			break
  6273  		}
  6274  		y := z.Args[1]
  6275  		x := z.Args[0]
  6276  		if !(z.Uses == 1) {
  6277  			break
  6278  		}
  6279  		v.reset(OpARM64GreaterEqual)
  6280  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6281  		v0.AddArg2(x, y)
  6282  		v.AddArg(v0)
  6283  		return true
  6284  	}
  6285  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  6286  	// cond: x.Uses == 1
  6287  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  6288  	for {
  6289  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6290  			break
  6291  		}
  6292  		x := v_0.Args[0]
  6293  		if x.Op != OpARM64ANDconst {
  6294  			break
  6295  		}
  6296  		c := auxIntToInt64(x.AuxInt)
  6297  		y := x.Args[0]
  6298  		if !(x.Uses == 1) {
  6299  			break
  6300  		}
  6301  		v.reset(OpARM64GreaterEqual)
  6302  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6303  		v0.AuxInt = int32ToAuxInt(int32(c))
  6304  		v0.AddArg(y)
  6305  		v.AddArg(v0)
  6306  		return true
  6307  	}
  6308  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  6309  	// cond: z.Uses == 1
  6310  	// result: (GreaterEqual (TSTW x y))
  6311  	for {
  6312  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6313  			break
  6314  		}
  6315  		z := v_0.Args[0]
  6316  		if z.Op != OpARM64AND {
  6317  			break
  6318  		}
  6319  		y := z.Args[1]
  6320  		x := z.Args[0]
  6321  		if !(z.Uses == 1) {
  6322  			break
  6323  		}
  6324  		v.reset(OpARM64GreaterEqual)
  6325  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6326  		v0.AddArg2(x, y)
  6327  		v.AddArg(v0)
  6328  		return true
  6329  	}
  6330  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  6331  	// cond: x.Uses == 1
  6332  	// result: (GreaterEqual (TSTconst [c] y))
  6333  	for {
  6334  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6335  			break
  6336  		}
  6337  		x := v_0.Args[0]
  6338  		if x.Op != OpARM64ANDconst {
  6339  			break
  6340  		}
  6341  		c := auxIntToInt64(x.AuxInt)
  6342  		y := x.Args[0]
  6343  		if !(x.Uses == 1) {
  6344  			break
  6345  		}
  6346  		v.reset(OpARM64GreaterEqual)
  6347  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6348  		v0.AuxInt = int64ToAuxInt(c)
  6349  		v0.AddArg(y)
  6350  		v.AddArg(v0)
  6351  		return true
  6352  	}
  6353  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  6354  	// cond: x.Uses == 1
  6355  	// result: (GreaterEqualNoov (CMNconst [c] y))
  6356  	for {
  6357  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6358  			break
  6359  		}
  6360  		x := v_0.Args[0]
  6361  		if x.Op != OpARM64ADDconst {
  6362  			break
  6363  		}
  6364  		c := auxIntToInt64(x.AuxInt)
  6365  		y := x.Args[0]
  6366  		if !(x.Uses == 1) {
  6367  			break
  6368  		}
  6369  		v.reset(OpARM64GreaterEqualNoov)
  6370  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  6371  		v0.AuxInt = int64ToAuxInt(c)
  6372  		v0.AddArg(y)
  6373  		v.AddArg(v0)
  6374  		return true
  6375  	}
  6376  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  6377  	// cond: x.Uses == 1
  6378  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  6379  	for {
  6380  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6381  			break
  6382  		}
  6383  		x := v_0.Args[0]
  6384  		if x.Op != OpARM64ADDconst {
  6385  			break
  6386  		}
  6387  		c := auxIntToInt64(x.AuxInt)
  6388  		y := x.Args[0]
  6389  		if !(x.Uses == 1) {
  6390  			break
  6391  		}
  6392  		v.reset(OpARM64GreaterEqualNoov)
  6393  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  6394  		v0.AuxInt = int32ToAuxInt(int32(c))
  6395  		v0.AddArg(y)
  6396  		v.AddArg(v0)
  6397  		return true
  6398  	}
  6399  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  6400  	// cond: z.Uses == 1
  6401  	// result: (GreaterEqualNoov (CMN x y))
  6402  	for {
  6403  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6404  			break
  6405  		}
  6406  		z := v_0.Args[0]
  6407  		if z.Op != OpARM64ADD {
  6408  			break
  6409  		}
  6410  		y := z.Args[1]
  6411  		x := z.Args[0]
  6412  		if !(z.Uses == 1) {
  6413  			break
  6414  		}
  6415  		v.reset(OpARM64GreaterEqualNoov)
  6416  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6417  		v0.AddArg2(x, y)
  6418  		v.AddArg(v0)
  6419  		return true
  6420  	}
  6421  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  6422  	// cond: z.Uses == 1
  6423  	// result: (GreaterEqualNoov (CMNW x y))
  6424  	for {
  6425  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6426  			break
  6427  		}
  6428  		z := v_0.Args[0]
  6429  		if z.Op != OpARM64ADD {
  6430  			break
  6431  		}
  6432  		y := z.Args[1]
  6433  		x := z.Args[0]
  6434  		if !(z.Uses == 1) {
  6435  			break
  6436  		}
  6437  		v.reset(OpARM64GreaterEqualNoov)
  6438  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6439  		v0.AddArg2(x, y)
  6440  		v.AddArg(v0)
  6441  		return true
  6442  	}
  6443  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  6444  	// cond: z.Uses == 1
  6445  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  6446  	for {
  6447  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6448  			break
  6449  		}
  6450  		z := v_0.Args[0]
  6451  		if z.Op != OpARM64MADD {
  6452  			break
  6453  		}
  6454  		y := z.Args[2]
  6455  		a := z.Args[0]
  6456  		x := z.Args[1]
  6457  		if !(z.Uses == 1) {
  6458  			break
  6459  		}
  6460  		v.reset(OpARM64GreaterEqualNoov)
  6461  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6462  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6463  		v1.AddArg2(x, y)
  6464  		v0.AddArg2(a, v1)
  6465  		v.AddArg(v0)
  6466  		return true
  6467  	}
  6468  	// match: (GreaterEqual (CMPconst [0] z:(MSUB a x y)))
  6469  	// cond: z.Uses == 1
  6470  	// result: (GreaterEqualNoov (CMP a (MUL <x.Type> x y)))
  6471  	for {
  6472  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6473  			break
  6474  		}
  6475  		z := v_0.Args[0]
  6476  		if z.Op != OpARM64MSUB {
  6477  			break
  6478  		}
  6479  		y := z.Args[2]
  6480  		a := z.Args[0]
  6481  		x := z.Args[1]
  6482  		if !(z.Uses == 1) {
  6483  			break
  6484  		}
  6485  		v.reset(OpARM64GreaterEqualNoov)
  6486  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6487  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6488  		v1.AddArg2(x, y)
  6489  		v0.AddArg2(a, v1)
  6490  		v.AddArg(v0)
  6491  		return true
  6492  	}
  6493  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  6494  	// cond: z.Uses == 1
  6495  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  6496  	for {
  6497  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6498  			break
  6499  		}
  6500  		z := v_0.Args[0]
  6501  		if z.Op != OpARM64MADDW {
  6502  			break
  6503  		}
  6504  		y := z.Args[2]
  6505  		a := z.Args[0]
  6506  		x := z.Args[1]
  6507  		if !(z.Uses == 1) {
  6508  			break
  6509  		}
  6510  		v.reset(OpARM64GreaterEqualNoov)
  6511  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6512  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6513  		v1.AddArg2(x, y)
  6514  		v0.AddArg2(a, v1)
  6515  		v.AddArg(v0)
  6516  		return true
  6517  	}
  6518  	// match: (GreaterEqual (CMPWconst [0] z:(MSUBW a x y)))
  6519  	// cond: z.Uses == 1
  6520  	// result: (GreaterEqualNoov (CMPW a (MULW <x.Type> x y)))
  6521  	for {
  6522  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6523  			break
  6524  		}
  6525  		z := v_0.Args[0]
  6526  		if z.Op != OpARM64MSUBW {
  6527  			break
  6528  		}
  6529  		y := z.Args[2]
  6530  		a := z.Args[0]
  6531  		x := z.Args[1]
  6532  		if !(z.Uses == 1) {
  6533  			break
  6534  		}
  6535  		v.reset(OpARM64GreaterEqualNoov)
  6536  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6537  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6538  		v1.AddArg2(x, y)
  6539  		v0.AddArg2(a, v1)
  6540  		v.AddArg(v0)
  6541  		return true
  6542  	}
  6543  	// match: (GreaterEqual (FlagConstant [fc]))
  6544  	// result: (MOVDconst [b2i(fc.ge())])
  6545  	for {
  6546  		if v_0.Op != OpARM64FlagConstant {
  6547  			break
  6548  		}
  6549  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6550  		v.reset(OpARM64MOVDconst)
  6551  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  6552  		return true
  6553  	}
  6554  	// match: (GreaterEqual (InvertFlags x))
  6555  	// result: (LessEqual x)
  6556  	for {
  6557  		if v_0.Op != OpARM64InvertFlags {
  6558  			break
  6559  		}
  6560  		x := v_0.Args[0]
  6561  		v.reset(OpARM64LessEqual)
  6562  		v.AddArg(x)
  6563  		return true
  6564  	}
  6565  	return false
  6566  }
  6567  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  6568  	v_0 := v.Args[0]
  6569  	// match: (GreaterEqualF (InvertFlags x))
  6570  	// result: (LessEqualF x)
  6571  	for {
  6572  		if v_0.Op != OpARM64InvertFlags {
  6573  			break
  6574  		}
  6575  		x := v_0.Args[0]
  6576  		v.reset(OpARM64LessEqualF)
  6577  		v.AddArg(x)
  6578  		return true
  6579  	}
  6580  	return false
  6581  }
  6582  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  6583  	v_0 := v.Args[0]
  6584  	b := v.Block
  6585  	typ := &b.Func.Config.Types
  6586  	// match: (GreaterEqualNoov (FlagConstant [fc]))
  6587  	// result: (MOVDconst [b2i(fc.geNoov())])
  6588  	for {
  6589  		if v_0.Op != OpARM64FlagConstant {
  6590  			break
  6591  		}
  6592  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6593  		v.reset(OpARM64MOVDconst)
  6594  		v.AuxInt = int64ToAuxInt(b2i(fc.geNoov()))
  6595  		return true
  6596  	}
  6597  	// match: (GreaterEqualNoov (InvertFlags x))
  6598  	// result: (CSINC [OpARM64NotEqual] (LessThanNoov <typ.Bool> x) (MOVDconst [0]) x)
  6599  	for {
  6600  		if v_0.Op != OpARM64InvertFlags {
  6601  			break
  6602  		}
  6603  		x := v_0.Args[0]
  6604  		v.reset(OpARM64CSINC)
  6605  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6606  		v0 := b.NewValue0(v.Pos, OpARM64LessThanNoov, typ.Bool)
  6607  		v0.AddArg(x)
  6608  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
  6609  		v1.AuxInt = int64ToAuxInt(0)
  6610  		v.AddArg3(v0, v1, x)
  6611  		return true
  6612  	}
  6613  	return false
  6614  }
  6615  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  6616  	v_0 := v.Args[0]
  6617  	// match: (GreaterEqualU (FlagConstant [fc]))
  6618  	// result: (MOVDconst [b2i(fc.uge())])
  6619  	for {
  6620  		if v_0.Op != OpARM64FlagConstant {
  6621  			break
  6622  		}
  6623  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6624  		v.reset(OpARM64MOVDconst)
  6625  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  6626  		return true
  6627  	}
  6628  	// match: (GreaterEqualU (InvertFlags x))
  6629  	// result: (LessEqualU x)
  6630  	for {
  6631  		if v_0.Op != OpARM64InvertFlags {
  6632  			break
  6633  		}
  6634  		x := v_0.Args[0]
  6635  		v.reset(OpARM64LessEqualU)
  6636  		v.AddArg(x)
  6637  		return true
  6638  	}
  6639  	return false
  6640  }
  6641  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  6642  	v_0 := v.Args[0]
  6643  	b := v.Block
  6644  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  6645  	// cond: z.Uses == 1
  6646  	// result: (GreaterThan (TST x y))
  6647  	for {
  6648  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6649  			break
  6650  		}
  6651  		z := v_0.Args[0]
  6652  		if z.Op != OpARM64AND {
  6653  			break
  6654  		}
  6655  		y := z.Args[1]
  6656  		x := z.Args[0]
  6657  		if !(z.Uses == 1) {
  6658  			break
  6659  		}
  6660  		v.reset(OpARM64GreaterThan)
  6661  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6662  		v0.AddArg2(x, y)
  6663  		v.AddArg(v0)
  6664  		return true
  6665  	}
  6666  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  6667  	// cond: x.Uses == 1
  6668  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  6669  	for {
  6670  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6671  			break
  6672  		}
  6673  		x := v_0.Args[0]
  6674  		if x.Op != OpARM64ANDconst {
  6675  			break
  6676  		}
  6677  		c := auxIntToInt64(x.AuxInt)
  6678  		y := x.Args[0]
  6679  		if !(x.Uses == 1) {
  6680  			break
  6681  		}
  6682  		v.reset(OpARM64GreaterThan)
  6683  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6684  		v0.AuxInt = int32ToAuxInt(int32(c))
  6685  		v0.AddArg(y)
  6686  		v.AddArg(v0)
  6687  		return true
  6688  	}
  6689  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  6690  	// cond: z.Uses == 1
  6691  	// result: (GreaterThan (TSTW x y))
  6692  	for {
  6693  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6694  			break
  6695  		}
  6696  		z := v_0.Args[0]
  6697  		if z.Op != OpARM64AND {
  6698  			break
  6699  		}
  6700  		y := z.Args[1]
  6701  		x := z.Args[0]
  6702  		if !(z.Uses == 1) {
  6703  			break
  6704  		}
  6705  		v.reset(OpARM64GreaterThan)
  6706  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6707  		v0.AddArg2(x, y)
  6708  		v.AddArg(v0)
  6709  		return true
  6710  	}
  6711  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  6712  	// cond: x.Uses == 1
  6713  	// result: (GreaterThan (TSTconst [c] y))
  6714  	for {
  6715  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6716  			break
  6717  		}
  6718  		x := v_0.Args[0]
  6719  		if x.Op != OpARM64ANDconst {
  6720  			break
  6721  		}
  6722  		c := auxIntToInt64(x.AuxInt)
  6723  		y := x.Args[0]
  6724  		if !(x.Uses == 1) {
  6725  			break
  6726  		}
  6727  		v.reset(OpARM64GreaterThan)
  6728  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6729  		v0.AuxInt = int64ToAuxInt(c)
  6730  		v0.AddArg(y)
  6731  		v.AddArg(v0)
  6732  		return true
  6733  	}
  6734  	// match: (GreaterThan (FlagConstant [fc]))
  6735  	// result: (MOVDconst [b2i(fc.gt())])
  6736  	for {
  6737  		if v_0.Op != OpARM64FlagConstant {
  6738  			break
  6739  		}
  6740  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6741  		v.reset(OpARM64MOVDconst)
  6742  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  6743  		return true
  6744  	}
  6745  	// match: (GreaterThan (InvertFlags x))
  6746  	// result: (LessThan x)
  6747  	for {
  6748  		if v_0.Op != OpARM64InvertFlags {
  6749  			break
  6750  		}
  6751  		x := v_0.Args[0]
  6752  		v.reset(OpARM64LessThan)
  6753  		v.AddArg(x)
  6754  		return true
  6755  	}
  6756  	return false
  6757  }
  6758  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  6759  	v_0 := v.Args[0]
  6760  	// match: (GreaterThanF (InvertFlags x))
  6761  	// result: (LessThanF x)
  6762  	for {
  6763  		if v_0.Op != OpARM64InvertFlags {
  6764  			break
  6765  		}
  6766  		x := v_0.Args[0]
  6767  		v.reset(OpARM64LessThanF)
  6768  		v.AddArg(x)
  6769  		return true
  6770  	}
  6771  	return false
  6772  }
  6773  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  6774  	v_0 := v.Args[0]
  6775  	// match: (GreaterThanU (FlagConstant [fc]))
  6776  	// result: (MOVDconst [b2i(fc.ugt())])
  6777  	for {
  6778  		if v_0.Op != OpARM64FlagConstant {
  6779  			break
  6780  		}
  6781  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6782  		v.reset(OpARM64MOVDconst)
  6783  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  6784  		return true
  6785  	}
  6786  	// match: (GreaterThanU (InvertFlags x))
  6787  	// result: (LessThanU x)
  6788  	for {
  6789  		if v_0.Op != OpARM64InvertFlags {
  6790  			break
  6791  		}
  6792  		x := v_0.Args[0]
  6793  		v.reset(OpARM64LessThanU)
  6794  		v.AddArg(x)
  6795  		return true
  6796  	}
  6797  	return false
  6798  }
  6799  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  6800  	v_1 := v.Args[1]
  6801  	v_0 := v.Args[0]
  6802  	b := v.Block
  6803  	config := b.Func.Config
  6804  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  6805  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6806  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  6807  	for {
  6808  		off1 := auxIntToInt32(v.AuxInt)
  6809  		sym := auxToSym(v.Aux)
  6810  		if v_0.Op != OpARM64ADDconst {
  6811  			break
  6812  		}
  6813  		off2 := auxIntToInt64(v_0.AuxInt)
  6814  		ptr := v_0.Args[0]
  6815  		mem := v_1
  6816  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6817  			break
  6818  		}
  6819  		v.reset(OpARM64LDP)
  6820  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6821  		v.Aux = symToAux(sym)
  6822  		v.AddArg2(ptr, mem)
  6823  		return true
  6824  	}
  6825  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6826  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6827  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6828  	for {
  6829  		off1 := auxIntToInt32(v.AuxInt)
  6830  		sym1 := auxToSym(v.Aux)
  6831  		if v_0.Op != OpARM64MOVDaddr {
  6832  			break
  6833  		}
  6834  		off2 := auxIntToInt32(v_0.AuxInt)
  6835  		sym2 := auxToSym(v_0.Aux)
  6836  		ptr := v_0.Args[0]
  6837  		mem := v_1
  6838  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6839  			break
  6840  		}
  6841  		v.reset(OpARM64LDP)
  6842  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6843  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6844  		v.AddArg2(ptr, mem)
  6845  		return true
  6846  	}
  6847  	return false
  6848  }
  6849  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  6850  	v_0 := v.Args[0]
  6851  	b := v.Block
  6852  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  6853  	// cond: z.Uses == 1
  6854  	// result: (LessEqual (TST x y))
  6855  	for {
  6856  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6857  			break
  6858  		}
  6859  		z := v_0.Args[0]
  6860  		if z.Op != OpARM64AND {
  6861  			break
  6862  		}
  6863  		y := z.Args[1]
  6864  		x := z.Args[0]
  6865  		if !(z.Uses == 1) {
  6866  			break
  6867  		}
  6868  		v.reset(OpARM64LessEqual)
  6869  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6870  		v0.AddArg2(x, y)
  6871  		v.AddArg(v0)
  6872  		return true
  6873  	}
  6874  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  6875  	// cond: x.Uses == 1
  6876  	// result: (LessEqual (TSTWconst [int32(c)] y))
  6877  	for {
  6878  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6879  			break
  6880  		}
  6881  		x := v_0.Args[0]
  6882  		if x.Op != OpARM64ANDconst {
  6883  			break
  6884  		}
  6885  		c := auxIntToInt64(x.AuxInt)
  6886  		y := x.Args[0]
  6887  		if !(x.Uses == 1) {
  6888  			break
  6889  		}
  6890  		v.reset(OpARM64LessEqual)
  6891  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6892  		v0.AuxInt = int32ToAuxInt(int32(c))
  6893  		v0.AddArg(y)
  6894  		v.AddArg(v0)
  6895  		return true
  6896  	}
  6897  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  6898  	// cond: z.Uses == 1
  6899  	// result: (LessEqual (TSTW x y))
  6900  	for {
  6901  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6902  			break
  6903  		}
  6904  		z := v_0.Args[0]
  6905  		if z.Op != OpARM64AND {
  6906  			break
  6907  		}
  6908  		y := z.Args[1]
  6909  		x := z.Args[0]
  6910  		if !(z.Uses == 1) {
  6911  			break
  6912  		}
  6913  		v.reset(OpARM64LessEqual)
  6914  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6915  		v0.AddArg2(x, y)
  6916  		v.AddArg(v0)
  6917  		return true
  6918  	}
  6919  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  6920  	// cond: x.Uses == 1
  6921  	// result: (LessEqual (TSTconst [c] y))
  6922  	for {
  6923  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6924  			break
  6925  		}
  6926  		x := v_0.Args[0]
  6927  		if x.Op != OpARM64ANDconst {
  6928  			break
  6929  		}
  6930  		c := auxIntToInt64(x.AuxInt)
  6931  		y := x.Args[0]
  6932  		if !(x.Uses == 1) {
  6933  			break
  6934  		}
  6935  		v.reset(OpARM64LessEqual)
  6936  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6937  		v0.AuxInt = int64ToAuxInt(c)
  6938  		v0.AddArg(y)
  6939  		v.AddArg(v0)
  6940  		return true
  6941  	}
  6942  	// match: (LessEqual (FlagConstant [fc]))
  6943  	// result: (MOVDconst [b2i(fc.le())])
  6944  	for {
  6945  		if v_0.Op != OpARM64FlagConstant {
  6946  			break
  6947  		}
  6948  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6949  		v.reset(OpARM64MOVDconst)
  6950  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  6951  		return true
  6952  	}
  6953  	// match: (LessEqual (InvertFlags x))
  6954  	// result: (GreaterEqual x)
  6955  	for {
  6956  		if v_0.Op != OpARM64InvertFlags {
  6957  			break
  6958  		}
  6959  		x := v_0.Args[0]
  6960  		v.reset(OpARM64GreaterEqual)
  6961  		v.AddArg(x)
  6962  		return true
  6963  	}
  6964  	return false
  6965  }
  6966  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  6967  	v_0 := v.Args[0]
  6968  	// match: (LessEqualF (InvertFlags x))
  6969  	// result: (GreaterEqualF x)
  6970  	for {
  6971  		if v_0.Op != OpARM64InvertFlags {
  6972  			break
  6973  		}
  6974  		x := v_0.Args[0]
  6975  		v.reset(OpARM64GreaterEqualF)
  6976  		v.AddArg(x)
  6977  		return true
  6978  	}
  6979  	return false
  6980  }
  6981  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  6982  	v_0 := v.Args[0]
  6983  	// match: (LessEqualU (FlagConstant [fc]))
  6984  	// result: (MOVDconst [b2i(fc.ule())])
  6985  	for {
  6986  		if v_0.Op != OpARM64FlagConstant {
  6987  			break
  6988  		}
  6989  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6990  		v.reset(OpARM64MOVDconst)
  6991  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  6992  		return true
  6993  	}
  6994  	// match: (LessEqualU (InvertFlags x))
  6995  	// result: (GreaterEqualU x)
  6996  	for {
  6997  		if v_0.Op != OpARM64InvertFlags {
  6998  			break
  6999  		}
  7000  		x := v_0.Args[0]
  7001  		v.reset(OpARM64GreaterEqualU)
  7002  		v.AddArg(x)
  7003  		return true
  7004  	}
  7005  	return false
  7006  }
  7007  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  7008  	v_0 := v.Args[0]
  7009  	b := v.Block
  7010  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  7011  	// cond: z.Uses == 1
  7012  	// result: (LessThan (TST x y))
  7013  	for {
  7014  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7015  			break
  7016  		}
  7017  		z := v_0.Args[0]
  7018  		if z.Op != OpARM64AND {
  7019  			break
  7020  		}
  7021  		y := z.Args[1]
  7022  		x := z.Args[0]
  7023  		if !(z.Uses == 1) {
  7024  			break
  7025  		}
  7026  		v.reset(OpARM64LessThan)
  7027  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  7028  		v0.AddArg2(x, y)
  7029  		v.AddArg(v0)
  7030  		return true
  7031  	}
  7032  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  7033  	// cond: x.Uses == 1
  7034  	// result: (LessThan (TSTWconst [int32(c)] y))
  7035  	for {
  7036  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7037  			break
  7038  		}
  7039  		x := v_0.Args[0]
  7040  		if x.Op != OpARM64ANDconst {
  7041  			break
  7042  		}
  7043  		c := auxIntToInt64(x.AuxInt)
  7044  		y := x.Args[0]
  7045  		if !(x.Uses == 1) {
  7046  			break
  7047  		}
  7048  		v.reset(OpARM64LessThan)
  7049  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  7050  		v0.AuxInt = int32ToAuxInt(int32(c))
  7051  		v0.AddArg(y)
  7052  		v.AddArg(v0)
  7053  		return true
  7054  	}
  7055  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  7056  	// cond: z.Uses == 1
  7057  	// result: (LessThan (TSTW x y))
  7058  	for {
  7059  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7060  			break
  7061  		}
  7062  		z := v_0.Args[0]
  7063  		if z.Op != OpARM64AND {
  7064  			break
  7065  		}
  7066  		y := z.Args[1]
  7067  		x := z.Args[0]
  7068  		if !(z.Uses == 1) {
  7069  			break
  7070  		}
  7071  		v.reset(OpARM64LessThan)
  7072  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  7073  		v0.AddArg2(x, y)
  7074  		v.AddArg(v0)
  7075  		return true
  7076  	}
  7077  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  7078  	// cond: x.Uses == 1
  7079  	// result: (LessThan (TSTconst [c] y))
  7080  	for {
  7081  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7082  			break
  7083  		}
  7084  		x := v_0.Args[0]
  7085  		if x.Op != OpARM64ANDconst {
  7086  			break
  7087  		}
  7088  		c := auxIntToInt64(x.AuxInt)
  7089  		y := x.Args[0]
  7090  		if !(x.Uses == 1) {
  7091  			break
  7092  		}
  7093  		v.reset(OpARM64LessThan)
  7094  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  7095  		v0.AuxInt = int64ToAuxInt(c)
  7096  		v0.AddArg(y)
  7097  		v.AddArg(v0)
  7098  		return true
  7099  	}
  7100  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  7101  	// cond: x.Uses == 1
  7102  	// result: (LessThanNoov (CMNconst [c] y))
  7103  	for {
  7104  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7105  			break
  7106  		}
  7107  		x := v_0.Args[0]
  7108  		if x.Op != OpARM64ADDconst {
  7109  			break
  7110  		}
  7111  		c := auxIntToInt64(x.AuxInt)
  7112  		y := x.Args[0]
  7113  		if !(x.Uses == 1) {
  7114  			break
  7115  		}
  7116  		v.reset(OpARM64LessThanNoov)
  7117  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  7118  		v0.AuxInt = int64ToAuxInt(c)
  7119  		v0.AddArg(y)
  7120  		v.AddArg(v0)
  7121  		return true
  7122  	}
  7123  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  7124  	// cond: x.Uses == 1
  7125  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  7126  	for {
  7127  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7128  			break
  7129  		}
  7130  		x := v_0.Args[0]
  7131  		if x.Op != OpARM64ADDconst {
  7132  			break
  7133  		}
  7134  		c := auxIntToInt64(x.AuxInt)
  7135  		y := x.Args[0]
  7136  		if !(x.Uses == 1) {
  7137  			break
  7138  		}
  7139  		v.reset(OpARM64LessThanNoov)
  7140  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  7141  		v0.AuxInt = int32ToAuxInt(int32(c))
  7142  		v0.AddArg(y)
  7143  		v.AddArg(v0)
  7144  		return true
  7145  	}
  7146  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  7147  	// cond: z.Uses == 1
  7148  	// result: (LessThanNoov (CMN x y))
  7149  	for {
  7150  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7151  			break
  7152  		}
  7153  		z := v_0.Args[0]
  7154  		if z.Op != OpARM64ADD {
  7155  			break
  7156  		}
  7157  		y := z.Args[1]
  7158  		x := z.Args[0]
  7159  		if !(z.Uses == 1) {
  7160  			break
  7161  		}
  7162  		v.reset(OpARM64LessThanNoov)
  7163  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7164  		v0.AddArg2(x, y)
  7165  		v.AddArg(v0)
  7166  		return true
  7167  	}
  7168  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  7169  	// cond: z.Uses == 1
  7170  	// result: (LessThanNoov (CMNW x y))
  7171  	for {
  7172  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7173  			break
  7174  		}
  7175  		z := v_0.Args[0]
  7176  		if z.Op != OpARM64ADD {
  7177  			break
  7178  		}
  7179  		y := z.Args[1]
  7180  		x := z.Args[0]
  7181  		if !(z.Uses == 1) {
  7182  			break
  7183  		}
  7184  		v.reset(OpARM64LessThanNoov)
  7185  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7186  		v0.AddArg2(x, y)
  7187  		v.AddArg(v0)
  7188  		return true
  7189  	}
  7190  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  7191  	// cond: z.Uses == 1
  7192  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  7193  	for {
  7194  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7195  			break
  7196  		}
  7197  		z := v_0.Args[0]
  7198  		if z.Op != OpARM64MADD {
  7199  			break
  7200  		}
  7201  		y := z.Args[2]
  7202  		a := z.Args[0]
  7203  		x := z.Args[1]
  7204  		if !(z.Uses == 1) {
  7205  			break
  7206  		}
  7207  		v.reset(OpARM64LessThanNoov)
  7208  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  7209  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7210  		v1.AddArg2(x, y)
  7211  		v0.AddArg2(a, v1)
  7212  		v.AddArg(v0)
  7213  		return true
  7214  	}
  7215  	// match: (LessThan (CMPconst [0] z:(MSUB a x y)))
  7216  	// cond: z.Uses == 1
  7217  	// result: (LessThanNoov (CMP a (MUL <x.Type> x y)))
  7218  	for {
  7219  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  7220  			break
  7221  		}
  7222  		z := v_0.Args[0]
  7223  		if z.Op != OpARM64MSUB {
  7224  			break
  7225  		}
  7226  		y := z.Args[2]
  7227  		a := z.Args[0]
  7228  		x := z.Args[1]
  7229  		if !(z.Uses == 1) {
  7230  			break
  7231  		}
  7232  		v.reset(OpARM64LessThanNoov)
  7233  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  7234  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7235  		v1.AddArg2(x, y)
  7236  		v0.AddArg2(a, v1)
  7237  		v.AddArg(v0)
  7238  		return true
  7239  	}
  7240  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  7241  	// cond: z.Uses == 1
  7242  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  7243  	for {
  7244  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7245  			break
  7246  		}
  7247  		z := v_0.Args[0]
  7248  		if z.Op != OpARM64MADDW {
  7249  			break
  7250  		}
  7251  		y := z.Args[2]
  7252  		a := z.Args[0]
  7253  		x := z.Args[1]
  7254  		if !(z.Uses == 1) {
  7255  			break
  7256  		}
  7257  		v.reset(OpARM64LessThanNoov)
  7258  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  7259  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7260  		v1.AddArg2(x, y)
  7261  		v0.AddArg2(a, v1)
  7262  		v.AddArg(v0)
  7263  		return true
  7264  	}
  7265  	// match: (LessThan (CMPWconst [0] z:(MSUBW a x y)))
  7266  	// cond: z.Uses == 1
  7267  	// result: (LessThanNoov (CMPW a (MULW <x.Type> x y)))
  7268  	for {
  7269  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  7270  			break
  7271  		}
  7272  		z := v_0.Args[0]
  7273  		if z.Op != OpARM64MSUBW {
  7274  			break
  7275  		}
  7276  		y := z.Args[2]
  7277  		a := z.Args[0]
  7278  		x := z.Args[1]
  7279  		if !(z.Uses == 1) {
  7280  			break
  7281  		}
  7282  		v.reset(OpARM64LessThanNoov)
  7283  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  7284  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7285  		v1.AddArg2(x, y)
  7286  		v0.AddArg2(a, v1)
  7287  		v.AddArg(v0)
  7288  		return true
  7289  	}
  7290  	// match: (LessThan (FlagConstant [fc]))
  7291  	// result: (MOVDconst [b2i(fc.lt())])
  7292  	for {
  7293  		if v_0.Op != OpARM64FlagConstant {
  7294  			break
  7295  		}
  7296  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7297  		v.reset(OpARM64MOVDconst)
  7298  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  7299  		return true
  7300  	}
  7301  	// match: (LessThan (InvertFlags x))
  7302  	// result: (GreaterThan x)
  7303  	for {
  7304  		if v_0.Op != OpARM64InvertFlags {
  7305  			break
  7306  		}
  7307  		x := v_0.Args[0]
  7308  		v.reset(OpARM64GreaterThan)
  7309  		v.AddArg(x)
  7310  		return true
  7311  	}
  7312  	return false
  7313  }
  7314  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  7315  	v_0 := v.Args[0]
  7316  	// match: (LessThanF (InvertFlags x))
  7317  	// result: (GreaterThanF x)
  7318  	for {
  7319  		if v_0.Op != OpARM64InvertFlags {
  7320  			break
  7321  		}
  7322  		x := v_0.Args[0]
  7323  		v.reset(OpARM64GreaterThanF)
  7324  		v.AddArg(x)
  7325  		return true
  7326  	}
  7327  	return false
  7328  }
  7329  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  7330  	v_0 := v.Args[0]
  7331  	b := v.Block
  7332  	typ := &b.Func.Config.Types
  7333  	// match: (LessThanNoov (FlagConstant [fc]))
  7334  	// result: (MOVDconst [b2i(fc.ltNoov())])
  7335  	for {
  7336  		if v_0.Op != OpARM64FlagConstant {
  7337  			break
  7338  		}
  7339  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7340  		v.reset(OpARM64MOVDconst)
  7341  		v.AuxInt = int64ToAuxInt(b2i(fc.ltNoov()))
  7342  		return true
  7343  	}
  7344  	// match: (LessThanNoov (InvertFlags x))
  7345  	// result: (CSEL0 [OpARM64NotEqual] (GreaterEqualNoov <typ.Bool> x) x)
  7346  	for {
  7347  		if v_0.Op != OpARM64InvertFlags {
  7348  			break
  7349  		}
  7350  		x := v_0.Args[0]
  7351  		v.reset(OpARM64CSEL0)
  7352  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  7353  		v0 := b.NewValue0(v.Pos, OpARM64GreaterEqualNoov, typ.Bool)
  7354  		v0.AddArg(x)
  7355  		v.AddArg2(v0, x)
  7356  		return true
  7357  	}
  7358  	return false
  7359  }
  7360  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  7361  	v_0 := v.Args[0]
  7362  	// match: (LessThanU (FlagConstant [fc]))
  7363  	// result: (MOVDconst [b2i(fc.ult())])
  7364  	for {
  7365  		if v_0.Op != OpARM64FlagConstant {
  7366  			break
  7367  		}
  7368  		fc := auxIntToFlagConstant(v_0.AuxInt)
  7369  		v.reset(OpARM64MOVDconst)
  7370  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  7371  		return true
  7372  	}
  7373  	// match: (LessThanU (InvertFlags x))
  7374  	// result: (GreaterThanU x)
  7375  	for {
  7376  		if v_0.Op != OpARM64InvertFlags {
  7377  			break
  7378  		}
  7379  		x := v_0.Args[0]
  7380  		v.reset(OpARM64GreaterThanU)
  7381  		v.AddArg(x)
  7382  		return true
  7383  	}
  7384  	return false
  7385  }
  7386  func rewriteValueARM64_OpARM64LoweredPanicBoundsCR(v *Value) bool {
  7387  	v_1 := v.Args[1]
  7388  	v_0 := v.Args[0]
  7389  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  7390  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  7391  	for {
  7392  		kind := auxIntToInt64(v.AuxInt)
  7393  		p := auxToPanicBoundsC(v.Aux)
  7394  		if v_0.Op != OpARM64MOVDconst {
  7395  			break
  7396  		}
  7397  		c := auxIntToInt64(v_0.AuxInt)
  7398  		mem := v_1
  7399  		v.reset(OpARM64LoweredPanicBoundsCC)
  7400  		v.AuxInt = int64ToAuxInt(kind)
  7401  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
  7402  		v.AddArg(mem)
  7403  		return true
  7404  	}
  7405  	return false
  7406  }
  7407  func rewriteValueARM64_OpARM64LoweredPanicBoundsRC(v *Value) bool {
  7408  	v_1 := v.Args[1]
  7409  	v_0 := v.Args[0]
  7410  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  7411  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  7412  	for {
  7413  		kind := auxIntToInt64(v.AuxInt)
  7414  		p := auxToPanicBoundsC(v.Aux)
  7415  		if v_0.Op != OpARM64MOVDconst {
  7416  			break
  7417  		}
  7418  		c := auxIntToInt64(v_0.AuxInt)
  7419  		mem := v_1
  7420  		v.reset(OpARM64LoweredPanicBoundsCC)
  7421  		v.AuxInt = int64ToAuxInt(kind)
  7422  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
  7423  		v.AddArg(mem)
  7424  		return true
  7425  	}
  7426  	return false
  7427  }
  7428  func rewriteValueARM64_OpARM64LoweredPanicBoundsRR(v *Value) bool {
  7429  	v_2 := v.Args[2]
  7430  	v_1 := v.Args[1]
  7431  	v_0 := v.Args[0]
  7432  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  7433  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:c}} mem)
  7434  	for {
  7435  		kind := auxIntToInt64(v.AuxInt)
  7436  		x := v_0
  7437  		if v_1.Op != OpARM64MOVDconst {
  7438  			break
  7439  		}
  7440  		c := auxIntToInt64(v_1.AuxInt)
  7441  		mem := v_2
  7442  		v.reset(OpARM64LoweredPanicBoundsRC)
  7443  		v.AuxInt = int64ToAuxInt(kind)
  7444  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  7445  		v.AddArg2(x, mem)
  7446  		return true
  7447  	}
  7448  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  7449  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:c}} y mem)
  7450  	for {
  7451  		kind := auxIntToInt64(v.AuxInt)
  7452  		if v_0.Op != OpARM64MOVDconst {
  7453  			break
  7454  		}
  7455  		c := auxIntToInt64(v_0.AuxInt)
  7456  		y := v_1
  7457  		mem := v_2
  7458  		v.reset(OpARM64LoweredPanicBoundsCR)
  7459  		v.AuxInt = int64ToAuxInt(kind)
  7460  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  7461  		v.AddArg2(y, mem)
  7462  		return true
  7463  	}
  7464  	return false
  7465  }
  7466  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  7467  	v_2 := v.Args[2]
  7468  	v_1 := v.Args[1]
  7469  	v_0 := v.Args[0]
  7470  	b := v.Block
  7471  	// match: (MADD a x (MOVDconst [-1]))
  7472  	// result: (SUB a x)
  7473  	for {
  7474  		a := v_0
  7475  		x := v_1
  7476  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  7477  			break
  7478  		}
  7479  		v.reset(OpARM64SUB)
  7480  		v.AddArg2(a, x)
  7481  		return true
  7482  	}
  7483  	// match: (MADD a _ (MOVDconst [0]))
  7484  	// result: a
  7485  	for {
  7486  		a := v_0
  7487  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  7488  			break
  7489  		}
  7490  		v.copyOf(a)
  7491  		return true
  7492  	}
  7493  	// match: (MADD a x (MOVDconst [1]))
  7494  	// result: (ADD a x)
  7495  	for {
  7496  		a := v_0
  7497  		x := v_1
  7498  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  7499  			break
  7500  		}
  7501  		v.reset(OpARM64ADD)
  7502  		v.AddArg2(a, x)
  7503  		return true
  7504  	}
  7505  	// match: (MADD a x (MOVDconst [c]))
  7506  	// cond: isPowerOfTwo(c)
  7507  	// result: (ADDshiftLL a x [log64(c)])
  7508  	for {
  7509  		a := v_0
  7510  		x := v_1
  7511  		if v_2.Op != OpARM64MOVDconst {
  7512  			break
  7513  		}
  7514  		c := auxIntToInt64(v_2.AuxInt)
  7515  		if !(isPowerOfTwo(c)) {
  7516  			break
  7517  		}
  7518  		v.reset(OpARM64ADDshiftLL)
  7519  		v.AuxInt = int64ToAuxInt(log64(c))
  7520  		v.AddArg2(a, x)
  7521  		return true
  7522  	}
  7523  	// match: (MADD a x (MOVDconst [c]))
  7524  	// cond: isPowerOfTwo(c-1) && c>=3
  7525  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7526  	for {
  7527  		a := v_0
  7528  		x := v_1
  7529  		if v_2.Op != OpARM64MOVDconst {
  7530  			break
  7531  		}
  7532  		c := auxIntToInt64(v_2.AuxInt)
  7533  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7534  			break
  7535  		}
  7536  		v.reset(OpARM64ADD)
  7537  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7538  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7539  		v0.AddArg2(x, x)
  7540  		v.AddArg2(a, v0)
  7541  		return true
  7542  	}
  7543  	// match: (MADD a x (MOVDconst [c]))
  7544  	// cond: isPowerOfTwo(c+1) && c>=7
  7545  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7546  	for {
  7547  		a := v_0
  7548  		x := v_1
  7549  		if v_2.Op != OpARM64MOVDconst {
  7550  			break
  7551  		}
  7552  		c := auxIntToInt64(v_2.AuxInt)
  7553  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7554  			break
  7555  		}
  7556  		v.reset(OpARM64SUB)
  7557  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7558  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7559  		v0.AddArg2(x, x)
  7560  		v.AddArg2(a, v0)
  7561  		return true
  7562  	}
  7563  	// match: (MADD a x (MOVDconst [c]))
  7564  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7565  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7566  	for {
  7567  		a := v_0
  7568  		x := v_1
  7569  		if v_2.Op != OpARM64MOVDconst {
  7570  			break
  7571  		}
  7572  		c := auxIntToInt64(v_2.AuxInt)
  7573  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7574  			break
  7575  		}
  7576  		v.reset(OpARM64SUBshiftLL)
  7577  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7578  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7579  		v0.AuxInt = int64ToAuxInt(2)
  7580  		v0.AddArg2(x, x)
  7581  		v.AddArg2(a, v0)
  7582  		return true
  7583  	}
  7584  	// match: (MADD a x (MOVDconst [c]))
  7585  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7586  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7587  	for {
  7588  		a := v_0
  7589  		x := v_1
  7590  		if v_2.Op != OpARM64MOVDconst {
  7591  			break
  7592  		}
  7593  		c := auxIntToInt64(v_2.AuxInt)
  7594  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7595  			break
  7596  		}
  7597  		v.reset(OpARM64ADDshiftLL)
  7598  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7599  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7600  		v0.AuxInt = int64ToAuxInt(2)
  7601  		v0.AddArg2(x, x)
  7602  		v.AddArg2(a, v0)
  7603  		return true
  7604  	}
  7605  	// match: (MADD a x (MOVDconst [c]))
  7606  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7607  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7608  	for {
  7609  		a := v_0
  7610  		x := v_1
  7611  		if v_2.Op != OpARM64MOVDconst {
  7612  			break
  7613  		}
  7614  		c := auxIntToInt64(v_2.AuxInt)
  7615  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7616  			break
  7617  		}
  7618  		v.reset(OpARM64SUBshiftLL)
  7619  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7620  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7621  		v0.AuxInt = int64ToAuxInt(3)
  7622  		v0.AddArg2(x, x)
  7623  		v.AddArg2(a, v0)
  7624  		return true
  7625  	}
  7626  	// match: (MADD a x (MOVDconst [c]))
  7627  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7628  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7629  	for {
  7630  		a := v_0
  7631  		x := v_1
  7632  		if v_2.Op != OpARM64MOVDconst {
  7633  			break
  7634  		}
  7635  		c := auxIntToInt64(v_2.AuxInt)
  7636  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7637  			break
  7638  		}
  7639  		v.reset(OpARM64ADDshiftLL)
  7640  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7641  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7642  		v0.AuxInt = int64ToAuxInt(3)
  7643  		v0.AddArg2(x, x)
  7644  		v.AddArg2(a, v0)
  7645  		return true
  7646  	}
  7647  	// match: (MADD a (MOVDconst [-1]) x)
  7648  	// result: (SUB a x)
  7649  	for {
  7650  		a := v_0
  7651  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7652  			break
  7653  		}
  7654  		x := v_2
  7655  		v.reset(OpARM64SUB)
  7656  		v.AddArg2(a, x)
  7657  		return true
  7658  	}
  7659  	// match: (MADD a (MOVDconst [0]) _)
  7660  	// result: a
  7661  	for {
  7662  		a := v_0
  7663  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7664  			break
  7665  		}
  7666  		v.copyOf(a)
  7667  		return true
  7668  	}
  7669  	// match: (MADD a (MOVDconst [1]) x)
  7670  	// result: (ADD a x)
  7671  	for {
  7672  		a := v_0
  7673  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7674  			break
  7675  		}
  7676  		x := v_2
  7677  		v.reset(OpARM64ADD)
  7678  		v.AddArg2(a, x)
  7679  		return true
  7680  	}
  7681  	// match: (MADD a (MOVDconst [c]) x)
  7682  	// cond: isPowerOfTwo(c)
  7683  	// result: (ADDshiftLL a x [log64(c)])
  7684  	for {
  7685  		a := v_0
  7686  		if v_1.Op != OpARM64MOVDconst {
  7687  			break
  7688  		}
  7689  		c := auxIntToInt64(v_1.AuxInt)
  7690  		x := v_2
  7691  		if !(isPowerOfTwo(c)) {
  7692  			break
  7693  		}
  7694  		v.reset(OpARM64ADDshiftLL)
  7695  		v.AuxInt = int64ToAuxInt(log64(c))
  7696  		v.AddArg2(a, x)
  7697  		return true
  7698  	}
  7699  	// match: (MADD a (MOVDconst [c]) x)
  7700  	// cond: isPowerOfTwo(c-1) && c>=3
  7701  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7702  	for {
  7703  		a := v_0
  7704  		if v_1.Op != OpARM64MOVDconst {
  7705  			break
  7706  		}
  7707  		c := auxIntToInt64(v_1.AuxInt)
  7708  		x := v_2
  7709  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7710  			break
  7711  		}
  7712  		v.reset(OpARM64ADD)
  7713  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7714  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7715  		v0.AddArg2(x, x)
  7716  		v.AddArg2(a, v0)
  7717  		return true
  7718  	}
  7719  	// match: (MADD a (MOVDconst [c]) x)
  7720  	// cond: isPowerOfTwo(c+1) && c>=7
  7721  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7722  	for {
  7723  		a := v_0
  7724  		if v_1.Op != OpARM64MOVDconst {
  7725  			break
  7726  		}
  7727  		c := auxIntToInt64(v_1.AuxInt)
  7728  		x := v_2
  7729  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7730  			break
  7731  		}
  7732  		v.reset(OpARM64SUB)
  7733  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7734  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7735  		v0.AddArg2(x, x)
  7736  		v.AddArg2(a, v0)
  7737  		return true
  7738  	}
  7739  	// match: (MADD a (MOVDconst [c]) x)
  7740  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7741  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  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 !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7750  			break
  7751  		}
  7752  		v.reset(OpARM64SUBshiftLL)
  7753  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7754  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7755  		v0.AuxInt = int64ToAuxInt(2)
  7756  		v0.AddArg2(x, x)
  7757  		v.AddArg2(a, v0)
  7758  		return true
  7759  	}
  7760  	// match: (MADD a (MOVDconst [c]) x)
  7761  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7762  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7763  	for {
  7764  		a := v_0
  7765  		if v_1.Op != OpARM64MOVDconst {
  7766  			break
  7767  		}
  7768  		c := auxIntToInt64(v_1.AuxInt)
  7769  		x := v_2
  7770  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7771  			break
  7772  		}
  7773  		v.reset(OpARM64ADDshiftLL)
  7774  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7775  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7776  		v0.AuxInt = int64ToAuxInt(2)
  7777  		v0.AddArg2(x, x)
  7778  		v.AddArg2(a, v0)
  7779  		return true
  7780  	}
  7781  	// match: (MADD a (MOVDconst [c]) x)
  7782  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7783  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7784  	for {
  7785  		a := v_0
  7786  		if v_1.Op != OpARM64MOVDconst {
  7787  			break
  7788  		}
  7789  		c := auxIntToInt64(v_1.AuxInt)
  7790  		x := v_2
  7791  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7792  			break
  7793  		}
  7794  		v.reset(OpARM64SUBshiftLL)
  7795  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7796  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7797  		v0.AuxInt = int64ToAuxInt(3)
  7798  		v0.AddArg2(x, x)
  7799  		v.AddArg2(a, v0)
  7800  		return true
  7801  	}
  7802  	// match: (MADD a (MOVDconst [c]) x)
  7803  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7804  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7805  	for {
  7806  		a := v_0
  7807  		if v_1.Op != OpARM64MOVDconst {
  7808  			break
  7809  		}
  7810  		c := auxIntToInt64(v_1.AuxInt)
  7811  		x := v_2
  7812  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7813  			break
  7814  		}
  7815  		v.reset(OpARM64ADDshiftLL)
  7816  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7817  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7818  		v0.AuxInt = int64ToAuxInt(3)
  7819  		v0.AddArg2(x, x)
  7820  		v.AddArg2(a, v0)
  7821  		return true
  7822  	}
  7823  	// match: (MADD (MOVDconst [c]) x y)
  7824  	// result: (ADDconst [c] (MUL <x.Type> x y))
  7825  	for {
  7826  		if v_0.Op != OpARM64MOVDconst {
  7827  			break
  7828  		}
  7829  		c := auxIntToInt64(v_0.AuxInt)
  7830  		x := v_1
  7831  		y := v_2
  7832  		v.reset(OpARM64ADDconst)
  7833  		v.AuxInt = int64ToAuxInt(c)
  7834  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7835  		v0.AddArg2(x, y)
  7836  		v.AddArg(v0)
  7837  		return true
  7838  	}
  7839  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  7840  	// result: (ADDconst [c*d] a)
  7841  	for {
  7842  		a := v_0
  7843  		if v_1.Op != OpARM64MOVDconst {
  7844  			break
  7845  		}
  7846  		c := auxIntToInt64(v_1.AuxInt)
  7847  		if v_2.Op != OpARM64MOVDconst {
  7848  			break
  7849  		}
  7850  		d := auxIntToInt64(v_2.AuxInt)
  7851  		v.reset(OpARM64ADDconst)
  7852  		v.AuxInt = int64ToAuxInt(c * d)
  7853  		v.AddArg(a)
  7854  		return true
  7855  	}
  7856  	return false
  7857  }
  7858  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  7859  	v_2 := v.Args[2]
  7860  	v_1 := v.Args[1]
  7861  	v_0 := v.Args[0]
  7862  	b := v.Block
  7863  	// match: (MADDW a x (MOVDconst [c]))
  7864  	// cond: int32(c)==-1
  7865  	// result: (MOVWUreg (SUB <a.Type> a x))
  7866  	for {
  7867  		a := v_0
  7868  		x := v_1
  7869  		if v_2.Op != OpARM64MOVDconst {
  7870  			break
  7871  		}
  7872  		c := auxIntToInt64(v_2.AuxInt)
  7873  		if !(int32(c) == -1) {
  7874  			break
  7875  		}
  7876  		v.reset(OpARM64MOVWUreg)
  7877  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7878  		v0.AddArg2(a, x)
  7879  		v.AddArg(v0)
  7880  		return true
  7881  	}
  7882  	// match: (MADDW a _ (MOVDconst [c]))
  7883  	// cond: int32(c)==0
  7884  	// result: (MOVWUreg a)
  7885  	for {
  7886  		a := v_0
  7887  		if v_2.Op != OpARM64MOVDconst {
  7888  			break
  7889  		}
  7890  		c := auxIntToInt64(v_2.AuxInt)
  7891  		if !(int32(c) == 0) {
  7892  			break
  7893  		}
  7894  		v.reset(OpARM64MOVWUreg)
  7895  		v.AddArg(a)
  7896  		return true
  7897  	}
  7898  	// match: (MADDW a x (MOVDconst [c]))
  7899  	// cond: int32(c)==1
  7900  	// result: (MOVWUreg (ADD <a.Type> a x))
  7901  	for {
  7902  		a := v_0
  7903  		x := v_1
  7904  		if v_2.Op != OpARM64MOVDconst {
  7905  			break
  7906  		}
  7907  		c := auxIntToInt64(v_2.AuxInt)
  7908  		if !(int32(c) == 1) {
  7909  			break
  7910  		}
  7911  		v.reset(OpARM64MOVWUreg)
  7912  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7913  		v0.AddArg2(a, x)
  7914  		v.AddArg(v0)
  7915  		return true
  7916  	}
  7917  	// match: (MADDW a x (MOVDconst [c]))
  7918  	// cond: isPowerOfTwo(c)
  7919  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7920  	for {
  7921  		a := v_0
  7922  		x := v_1
  7923  		if v_2.Op != OpARM64MOVDconst {
  7924  			break
  7925  		}
  7926  		c := auxIntToInt64(v_2.AuxInt)
  7927  		if !(isPowerOfTwo(c)) {
  7928  			break
  7929  		}
  7930  		v.reset(OpARM64MOVWUreg)
  7931  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7932  		v0.AuxInt = int64ToAuxInt(log64(c))
  7933  		v0.AddArg2(a, x)
  7934  		v.AddArg(v0)
  7935  		return true
  7936  	}
  7937  	// match: (MADDW a x (MOVDconst [c]))
  7938  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7939  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7940  	for {
  7941  		a := v_0
  7942  		x := v_1
  7943  		if v_2.Op != OpARM64MOVDconst {
  7944  			break
  7945  		}
  7946  		c := auxIntToInt64(v_2.AuxInt)
  7947  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7948  			break
  7949  		}
  7950  		v.reset(OpARM64MOVWUreg)
  7951  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7952  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7953  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7954  		v1.AddArg2(x, x)
  7955  		v0.AddArg2(a, v1)
  7956  		v.AddArg(v0)
  7957  		return true
  7958  	}
  7959  	// match: (MADDW a x (MOVDconst [c]))
  7960  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7961  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7962  	for {
  7963  		a := v_0
  7964  		x := v_1
  7965  		if v_2.Op != OpARM64MOVDconst {
  7966  			break
  7967  		}
  7968  		c := auxIntToInt64(v_2.AuxInt)
  7969  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7970  			break
  7971  		}
  7972  		v.reset(OpARM64MOVWUreg)
  7973  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7974  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7975  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7976  		v1.AddArg2(x, x)
  7977  		v0.AddArg2(a, v1)
  7978  		v.AddArg(v0)
  7979  		return true
  7980  	}
  7981  	// match: (MADDW a x (MOVDconst [c]))
  7982  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7983  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7984  	for {
  7985  		a := v_0
  7986  		x := v_1
  7987  		if v_2.Op != OpARM64MOVDconst {
  7988  			break
  7989  		}
  7990  		c := auxIntToInt64(v_2.AuxInt)
  7991  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7992  			break
  7993  		}
  7994  		v.reset(OpARM64MOVWUreg)
  7995  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7996  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7997  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7998  		v1.AuxInt = int64ToAuxInt(2)
  7999  		v1.AddArg2(x, x)
  8000  		v0.AddArg2(a, v1)
  8001  		v.AddArg(v0)
  8002  		return true
  8003  	}
  8004  	// match: (MADDW a x (MOVDconst [c]))
  8005  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  8006  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  8007  	for {
  8008  		a := v_0
  8009  		x := v_1
  8010  		if v_2.Op != OpARM64MOVDconst {
  8011  			break
  8012  		}
  8013  		c := auxIntToInt64(v_2.AuxInt)
  8014  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  8015  			break
  8016  		}
  8017  		v.reset(OpARM64MOVWUreg)
  8018  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  8019  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  8020  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8021  		v1.AuxInt = int64ToAuxInt(2)
  8022  		v1.AddArg2(x, x)
  8023  		v0.AddArg2(a, v1)
  8024  		v.AddArg(v0)
  8025  		return true
  8026  	}
  8027  	// match: (MADDW a x (MOVDconst [c]))
  8028  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  8029  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  8030  	for {
  8031  		a := v_0
  8032  		x := v_1
  8033  		if v_2.Op != OpARM64MOVDconst {
  8034  			break
  8035  		}
  8036  		c := auxIntToInt64(v_2.AuxInt)
  8037  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  8038  			break
  8039  		}
  8040  		v.reset(OpARM64MOVWUreg)
  8041  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  8042  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  8043  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8044  		v1.AuxInt = int64ToAuxInt(3)
  8045  		v1.AddArg2(x, x)
  8046  		v0.AddArg2(a, v1)
  8047  		v.AddArg(v0)
  8048  		return true
  8049  	}
  8050  	// match: (MADDW a x (MOVDconst [c]))
  8051  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  8052  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  8053  	for {
  8054  		a := v_0
  8055  		x := v_1
  8056  		if v_2.Op != OpARM64MOVDconst {
  8057  			break
  8058  		}
  8059  		c := auxIntToInt64(v_2.AuxInt)
  8060  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  8061  			break
  8062  		}
  8063  		v.reset(OpARM64MOVWUreg)
  8064  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  8065  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  8066  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8067  		v1.AuxInt = int64ToAuxInt(3)
  8068  		v1.AddArg2(x, x)
  8069  		v0.AddArg2(a, v1)
  8070  		v.AddArg(v0)
  8071  		return true
  8072  	}
  8073  	// match: (MADDW a (MOVDconst [c]) x)
  8074  	// cond: int32(c)==-1
  8075  	// result: (MOVWUreg (SUB <a.Type> a x))
  8076  	for {
  8077  		a := v_0
  8078  		if v_1.Op != OpARM64MOVDconst {
  8079  			break
  8080  		}
  8081  		c := auxIntToInt64(v_1.AuxInt)
  8082  		x := v_2
  8083  		if !(int32(c) == -1) {
  8084  			break
  8085  		}
  8086  		v.reset(OpARM64MOVWUreg)
  8087  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  8088  		v0.AddArg2(a, x)
  8089  		v.AddArg(v0)
  8090  		return true
  8091  	}
  8092  	// match: (MADDW a (MOVDconst [c]) _)
  8093  	// cond: int32(c)==0
  8094  	// result: (MOVWUreg a)
  8095  	for {
  8096  		a := v_0
  8097  		if v_1.Op != OpARM64MOVDconst {
  8098  			break
  8099  		}
  8100  		c := auxIntToInt64(v_1.AuxInt)
  8101  		if !(int32(c) == 0) {
  8102  			break
  8103  		}
  8104  		v.reset(OpARM64MOVWUreg)
  8105  		v.AddArg(a)
  8106  		return true
  8107  	}
  8108  	// match: (MADDW a (MOVDconst [c]) x)
  8109  	// cond: int32(c)==1
  8110  	// result: (MOVWUreg (ADD <a.Type> a x))
  8111  	for {
  8112  		a := v_0
  8113  		if v_1.Op != OpARM64MOVDconst {
  8114  			break
  8115  		}
  8116  		c := auxIntToInt64(v_1.AuxInt)
  8117  		x := v_2
  8118  		if !(int32(c) == 1) {
  8119  			break
  8120  		}
  8121  		v.reset(OpARM64MOVWUreg)
  8122  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  8123  		v0.AddArg2(a, x)
  8124  		v.AddArg(v0)
  8125  		return true
  8126  	}
  8127  	// match: (MADDW a (MOVDconst [c]) x)
  8128  	// cond: isPowerOfTwo(c)
  8129  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  8130  	for {
  8131  		a := v_0
  8132  		if v_1.Op != OpARM64MOVDconst {
  8133  			break
  8134  		}
  8135  		c := auxIntToInt64(v_1.AuxInt)
  8136  		x := v_2
  8137  		if !(isPowerOfTwo(c)) {
  8138  			break
  8139  		}
  8140  		v.reset(OpARM64MOVWUreg)
  8141  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  8142  		v0.AuxInt = int64ToAuxInt(log64(c))
  8143  		v0.AddArg2(a, x)
  8144  		v.AddArg(v0)
  8145  		return true
  8146  	}
  8147  	// match: (MADDW a (MOVDconst [c]) x)
  8148  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  8149  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  8150  	for {
  8151  		a := v_0
  8152  		if v_1.Op != OpARM64MOVDconst {
  8153  			break
  8154  		}
  8155  		c := auxIntToInt64(v_1.AuxInt)
  8156  		x := v_2
  8157  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  8158  			break
  8159  		}
  8160  		v.reset(OpARM64MOVWUreg)
  8161  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  8162  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8163  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  8164  		v1.AddArg2(x, x)
  8165  		v0.AddArg2(a, v1)
  8166  		v.AddArg(v0)
  8167  		return true
  8168  	}
  8169  	// match: (MADDW a (MOVDconst [c]) x)
  8170  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  8171  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  8172  	for {
  8173  		a := v_0
  8174  		if v_1.Op != OpARM64MOVDconst {
  8175  			break
  8176  		}
  8177  		c := auxIntToInt64(v_1.AuxInt)
  8178  		x := v_2
  8179  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  8180  			break
  8181  		}
  8182  		v.reset(OpARM64MOVWUreg)
  8183  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  8184  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8185  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  8186  		v1.AddArg2(x, x)
  8187  		v0.AddArg2(a, v1)
  8188  		v.AddArg(v0)
  8189  		return true
  8190  	}
  8191  	// match: (MADDW a (MOVDconst [c]) x)
  8192  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  8193  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  8194  	for {
  8195  		a := v_0
  8196  		if v_1.Op != OpARM64MOVDconst {
  8197  			break
  8198  		}
  8199  		c := auxIntToInt64(v_1.AuxInt)
  8200  		x := v_2
  8201  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  8202  			break
  8203  		}
  8204  		v.reset(OpARM64MOVWUreg)
  8205  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  8206  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  8207  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8208  		v1.AuxInt = int64ToAuxInt(2)
  8209  		v1.AddArg2(x, x)
  8210  		v0.AddArg2(a, v1)
  8211  		v.AddArg(v0)
  8212  		return true
  8213  	}
  8214  	// match: (MADDW a (MOVDconst [c]) x)
  8215  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  8216  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  8217  	for {
  8218  		a := v_0
  8219  		if v_1.Op != OpARM64MOVDconst {
  8220  			break
  8221  		}
  8222  		c := auxIntToInt64(v_1.AuxInt)
  8223  		x := v_2
  8224  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  8225  			break
  8226  		}
  8227  		v.reset(OpARM64MOVWUreg)
  8228  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  8229  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  8230  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8231  		v1.AuxInt = int64ToAuxInt(2)
  8232  		v1.AddArg2(x, x)
  8233  		v0.AddArg2(a, v1)
  8234  		v.AddArg(v0)
  8235  		return true
  8236  	}
  8237  	// match: (MADDW a (MOVDconst [c]) x)
  8238  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  8239  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  8240  	for {
  8241  		a := v_0
  8242  		if v_1.Op != OpARM64MOVDconst {
  8243  			break
  8244  		}
  8245  		c := auxIntToInt64(v_1.AuxInt)
  8246  		x := v_2
  8247  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  8248  			break
  8249  		}
  8250  		v.reset(OpARM64MOVWUreg)
  8251  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  8252  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  8253  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8254  		v1.AuxInt = int64ToAuxInt(3)
  8255  		v1.AddArg2(x, x)
  8256  		v0.AddArg2(a, v1)
  8257  		v.AddArg(v0)
  8258  		return true
  8259  	}
  8260  	// match: (MADDW a (MOVDconst [c]) x)
  8261  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  8262  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  8263  	for {
  8264  		a := v_0
  8265  		if v_1.Op != OpARM64MOVDconst {
  8266  			break
  8267  		}
  8268  		c := auxIntToInt64(v_1.AuxInt)
  8269  		x := v_2
  8270  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  8271  			break
  8272  		}
  8273  		v.reset(OpARM64MOVWUreg)
  8274  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  8275  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  8276  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8277  		v1.AuxInt = int64ToAuxInt(3)
  8278  		v1.AddArg2(x, x)
  8279  		v0.AddArg2(a, v1)
  8280  		v.AddArg(v0)
  8281  		return true
  8282  	}
  8283  	// match: (MADDW (MOVDconst [c]) x y)
  8284  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  8285  	for {
  8286  		if v_0.Op != OpARM64MOVDconst {
  8287  			break
  8288  		}
  8289  		c := auxIntToInt64(v_0.AuxInt)
  8290  		x := v_1
  8291  		y := v_2
  8292  		v.reset(OpARM64MOVWUreg)
  8293  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  8294  		v0.AuxInt = int64ToAuxInt(c)
  8295  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  8296  		v1.AddArg2(x, y)
  8297  		v0.AddArg(v1)
  8298  		v.AddArg(v0)
  8299  		return true
  8300  	}
  8301  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  8302  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  8303  	for {
  8304  		a := v_0
  8305  		if v_1.Op != OpARM64MOVDconst {
  8306  			break
  8307  		}
  8308  		c := auxIntToInt64(v_1.AuxInt)
  8309  		if v_2.Op != OpARM64MOVDconst {
  8310  			break
  8311  		}
  8312  		d := auxIntToInt64(v_2.AuxInt)
  8313  		v.reset(OpARM64MOVWUreg)
  8314  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  8315  		v0.AuxInt = int64ToAuxInt(c * d)
  8316  		v0.AddArg(a)
  8317  		v.AddArg(v0)
  8318  		return true
  8319  	}
  8320  	return false
  8321  }
  8322  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  8323  	v_1 := v.Args[1]
  8324  	v_0 := v.Args[0]
  8325  	b := v.Block
  8326  	// match: (MNEG x (MOVDconst [-1]))
  8327  	// result: x
  8328  	for {
  8329  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8330  			x := v_0
  8331  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  8332  				continue
  8333  			}
  8334  			v.copyOf(x)
  8335  			return true
  8336  		}
  8337  		break
  8338  	}
  8339  	// match: (MNEG _ (MOVDconst [0]))
  8340  	// result: (MOVDconst [0])
  8341  	for {
  8342  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8343  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  8344  				continue
  8345  			}
  8346  			v.reset(OpARM64MOVDconst)
  8347  			v.AuxInt = int64ToAuxInt(0)
  8348  			return true
  8349  		}
  8350  		break
  8351  	}
  8352  	// match: (MNEG x (MOVDconst [1]))
  8353  	// result: (NEG x)
  8354  	for {
  8355  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8356  			x := v_0
  8357  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  8358  				continue
  8359  			}
  8360  			v.reset(OpARM64NEG)
  8361  			v.AddArg(x)
  8362  			return true
  8363  		}
  8364  		break
  8365  	}
  8366  	// match: (MNEG x (MOVDconst [c]))
  8367  	// cond: isPowerOfTwo(c)
  8368  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  8369  	for {
  8370  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8371  			x := v_0
  8372  			if v_1.Op != OpARM64MOVDconst {
  8373  				continue
  8374  			}
  8375  			c := auxIntToInt64(v_1.AuxInt)
  8376  			if !(isPowerOfTwo(c)) {
  8377  				continue
  8378  			}
  8379  			v.reset(OpARM64NEG)
  8380  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8381  			v0.AuxInt = int64ToAuxInt(log64(c))
  8382  			v0.AddArg(x)
  8383  			v.AddArg(v0)
  8384  			return true
  8385  		}
  8386  		break
  8387  	}
  8388  	// match: (MNEG x (MOVDconst [c]))
  8389  	// cond: isPowerOfTwo(c-1) && c >= 3
  8390  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  8391  	for {
  8392  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8393  			x := v_0
  8394  			if v_1.Op != OpARM64MOVDconst {
  8395  				continue
  8396  			}
  8397  			c := auxIntToInt64(v_1.AuxInt)
  8398  			if !(isPowerOfTwo(c-1) && c >= 3) {
  8399  				continue
  8400  			}
  8401  			v.reset(OpARM64NEG)
  8402  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8403  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  8404  			v0.AddArg2(x, x)
  8405  			v.AddArg(v0)
  8406  			return true
  8407  		}
  8408  		break
  8409  	}
  8410  	// match: (MNEG x (MOVDconst [c]))
  8411  	// cond: isPowerOfTwo(c+1) && c >= 7
  8412  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  8413  	for {
  8414  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8415  			x := v_0
  8416  			if v_1.Op != OpARM64MOVDconst {
  8417  				continue
  8418  			}
  8419  			c := auxIntToInt64(v_1.AuxInt)
  8420  			if !(isPowerOfTwo(c+1) && c >= 7) {
  8421  				continue
  8422  			}
  8423  			v.reset(OpARM64NEG)
  8424  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8425  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  8426  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8427  			v1.AddArg(x)
  8428  			v0.AddArg2(v1, x)
  8429  			v.AddArg(v0)
  8430  			return true
  8431  		}
  8432  		break
  8433  	}
  8434  	// match: (MNEG x (MOVDconst [c]))
  8435  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  8436  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  8437  	for {
  8438  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8439  			x := v_0
  8440  			if v_1.Op != OpARM64MOVDconst {
  8441  				continue
  8442  			}
  8443  			c := auxIntToInt64(v_1.AuxInt)
  8444  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  8445  				continue
  8446  			}
  8447  			v.reset(OpARM64SLLconst)
  8448  			v.Type = x.Type
  8449  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  8450  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8451  			v0.AuxInt = int64ToAuxInt(2)
  8452  			v0.AddArg2(x, x)
  8453  			v.AddArg(v0)
  8454  			return true
  8455  		}
  8456  		break
  8457  	}
  8458  	// match: (MNEG x (MOVDconst [c]))
  8459  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  8460  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  8461  	for {
  8462  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8463  			x := v_0
  8464  			if v_1.Op != OpARM64MOVDconst {
  8465  				continue
  8466  			}
  8467  			c := auxIntToInt64(v_1.AuxInt)
  8468  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  8469  				continue
  8470  			}
  8471  			v.reset(OpARM64NEG)
  8472  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8473  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  8474  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8475  			v1.AuxInt = int64ToAuxInt(2)
  8476  			v1.AddArg2(x, x)
  8477  			v0.AddArg(v1)
  8478  			v.AddArg(v0)
  8479  			return true
  8480  		}
  8481  		break
  8482  	}
  8483  	// match: (MNEG x (MOVDconst [c]))
  8484  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8485  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  8486  	for {
  8487  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8488  			x := v_0
  8489  			if v_1.Op != OpARM64MOVDconst {
  8490  				continue
  8491  			}
  8492  			c := auxIntToInt64(v_1.AuxInt)
  8493  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8494  				continue
  8495  			}
  8496  			v.reset(OpARM64SLLconst)
  8497  			v.Type = x.Type
  8498  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  8499  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8500  			v0.AuxInt = int64ToAuxInt(3)
  8501  			v0.AddArg2(x, x)
  8502  			v.AddArg(v0)
  8503  			return true
  8504  		}
  8505  		break
  8506  	}
  8507  	// match: (MNEG x (MOVDconst [c]))
  8508  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8509  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  8510  	for {
  8511  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8512  			x := v_0
  8513  			if v_1.Op != OpARM64MOVDconst {
  8514  				continue
  8515  			}
  8516  			c := auxIntToInt64(v_1.AuxInt)
  8517  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8518  				continue
  8519  			}
  8520  			v.reset(OpARM64NEG)
  8521  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8522  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  8523  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8524  			v1.AuxInt = int64ToAuxInt(3)
  8525  			v1.AddArg2(x, x)
  8526  			v0.AddArg(v1)
  8527  			v.AddArg(v0)
  8528  			return true
  8529  		}
  8530  		break
  8531  	}
  8532  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  8533  	// result: (MOVDconst [-c*d])
  8534  	for {
  8535  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8536  			if v_0.Op != OpARM64MOVDconst {
  8537  				continue
  8538  			}
  8539  			c := auxIntToInt64(v_0.AuxInt)
  8540  			if v_1.Op != OpARM64MOVDconst {
  8541  				continue
  8542  			}
  8543  			d := auxIntToInt64(v_1.AuxInt)
  8544  			v.reset(OpARM64MOVDconst)
  8545  			v.AuxInt = int64ToAuxInt(-c * d)
  8546  			return true
  8547  		}
  8548  		break
  8549  	}
  8550  	return false
  8551  }
  8552  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  8553  	v_1 := v.Args[1]
  8554  	v_0 := v.Args[0]
  8555  	b := v.Block
  8556  	// match: (MNEGW x (MOVDconst [c]))
  8557  	// cond: int32(c)==-1
  8558  	// result: (MOVWUreg x)
  8559  	for {
  8560  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8561  			x := v_0
  8562  			if v_1.Op != OpARM64MOVDconst {
  8563  				continue
  8564  			}
  8565  			c := auxIntToInt64(v_1.AuxInt)
  8566  			if !(int32(c) == -1) {
  8567  				continue
  8568  			}
  8569  			v.reset(OpARM64MOVWUreg)
  8570  			v.AddArg(x)
  8571  			return true
  8572  		}
  8573  		break
  8574  	}
  8575  	// match: (MNEGW _ (MOVDconst [c]))
  8576  	// cond: int32(c)==0
  8577  	// result: (MOVDconst [0])
  8578  	for {
  8579  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8580  			if v_1.Op != OpARM64MOVDconst {
  8581  				continue
  8582  			}
  8583  			c := auxIntToInt64(v_1.AuxInt)
  8584  			if !(int32(c) == 0) {
  8585  				continue
  8586  			}
  8587  			v.reset(OpARM64MOVDconst)
  8588  			v.AuxInt = int64ToAuxInt(0)
  8589  			return true
  8590  		}
  8591  		break
  8592  	}
  8593  	// match: (MNEGW x (MOVDconst [c]))
  8594  	// cond: int32(c)==1
  8595  	// result: (MOVWUreg (NEG <x.Type> x))
  8596  	for {
  8597  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8598  			x := v_0
  8599  			if v_1.Op != OpARM64MOVDconst {
  8600  				continue
  8601  			}
  8602  			c := auxIntToInt64(v_1.AuxInt)
  8603  			if !(int32(c) == 1) {
  8604  				continue
  8605  			}
  8606  			v.reset(OpARM64MOVWUreg)
  8607  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8608  			v0.AddArg(x)
  8609  			v.AddArg(v0)
  8610  			return true
  8611  		}
  8612  		break
  8613  	}
  8614  	// match: (MNEGW x (MOVDconst [c]))
  8615  	// cond: isPowerOfTwo(c)
  8616  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  8617  	for {
  8618  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8619  			x := v_0
  8620  			if v_1.Op != OpARM64MOVDconst {
  8621  				continue
  8622  			}
  8623  			c := auxIntToInt64(v_1.AuxInt)
  8624  			if !(isPowerOfTwo(c)) {
  8625  				continue
  8626  			}
  8627  			v.reset(OpARM64NEG)
  8628  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8629  			v0.AuxInt = int64ToAuxInt(log64(c))
  8630  			v0.AddArg(x)
  8631  			v.AddArg(v0)
  8632  			return true
  8633  		}
  8634  		break
  8635  	}
  8636  	// match: (MNEGW x (MOVDconst [c]))
  8637  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  8638  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  8639  	for {
  8640  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8641  			x := v_0
  8642  			if v_1.Op != OpARM64MOVDconst {
  8643  				continue
  8644  			}
  8645  			c := auxIntToInt64(v_1.AuxInt)
  8646  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  8647  				continue
  8648  			}
  8649  			v.reset(OpARM64MOVWUreg)
  8650  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8651  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8652  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  8653  			v1.AddArg2(x, x)
  8654  			v0.AddArg(v1)
  8655  			v.AddArg(v0)
  8656  			return true
  8657  		}
  8658  		break
  8659  	}
  8660  	// match: (MNEGW x (MOVDconst [c]))
  8661  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  8662  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  8663  	for {
  8664  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8665  			x := v_0
  8666  			if v_1.Op != OpARM64MOVDconst {
  8667  				continue
  8668  			}
  8669  			c := auxIntToInt64(v_1.AuxInt)
  8670  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  8671  				continue
  8672  			}
  8673  			v.reset(OpARM64MOVWUreg)
  8674  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8675  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8676  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  8677  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8678  			v2.AddArg(x)
  8679  			v1.AddArg2(v2, x)
  8680  			v0.AddArg(v1)
  8681  			v.AddArg(v0)
  8682  			return true
  8683  		}
  8684  		break
  8685  	}
  8686  	// match: (MNEGW x (MOVDconst [c]))
  8687  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  8688  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  8689  	for {
  8690  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8691  			x := v_0
  8692  			if v_1.Op != OpARM64MOVDconst {
  8693  				continue
  8694  			}
  8695  			c := auxIntToInt64(v_1.AuxInt)
  8696  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  8697  				continue
  8698  			}
  8699  			v.reset(OpARM64MOVWUreg)
  8700  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8701  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  8702  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8703  			v1.AuxInt = int64ToAuxInt(2)
  8704  			v1.AddArg2(x, x)
  8705  			v0.AddArg(v1)
  8706  			v.AddArg(v0)
  8707  			return true
  8708  		}
  8709  		break
  8710  	}
  8711  	// match: (MNEGW x (MOVDconst [c]))
  8712  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  8713  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  8714  	for {
  8715  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8716  			x := v_0
  8717  			if v_1.Op != OpARM64MOVDconst {
  8718  				continue
  8719  			}
  8720  			c := auxIntToInt64(v_1.AuxInt)
  8721  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  8722  				continue
  8723  			}
  8724  			v.reset(OpARM64MOVWUreg)
  8725  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8726  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8727  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  8728  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8729  			v2.AuxInt = int64ToAuxInt(2)
  8730  			v2.AddArg2(x, x)
  8731  			v1.AddArg(v2)
  8732  			v0.AddArg(v1)
  8733  			v.AddArg(v0)
  8734  			return true
  8735  		}
  8736  		break
  8737  	}
  8738  	// match: (MNEGW x (MOVDconst [c]))
  8739  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  8740  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  8741  	for {
  8742  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8743  			x := v_0
  8744  			if v_1.Op != OpARM64MOVDconst {
  8745  				continue
  8746  			}
  8747  			c := auxIntToInt64(v_1.AuxInt)
  8748  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  8749  				continue
  8750  			}
  8751  			v.reset(OpARM64MOVWUreg)
  8752  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8753  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  8754  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8755  			v1.AuxInt = int64ToAuxInt(3)
  8756  			v1.AddArg2(x, x)
  8757  			v0.AddArg(v1)
  8758  			v.AddArg(v0)
  8759  			return true
  8760  		}
  8761  		break
  8762  	}
  8763  	// match: (MNEGW x (MOVDconst [c]))
  8764  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  8765  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  8766  	for {
  8767  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8768  			x := v_0
  8769  			if v_1.Op != OpARM64MOVDconst {
  8770  				continue
  8771  			}
  8772  			c := auxIntToInt64(v_1.AuxInt)
  8773  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  8774  				continue
  8775  			}
  8776  			v.reset(OpARM64MOVWUreg)
  8777  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8778  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8779  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
  8780  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8781  			v2.AuxInt = int64ToAuxInt(3)
  8782  			v2.AddArg2(x, x)
  8783  			v1.AddArg(v2)
  8784  			v0.AddArg(v1)
  8785  			v.AddArg(v0)
  8786  			return true
  8787  		}
  8788  		break
  8789  	}
  8790  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
  8791  	// result: (MOVDconst [int64(uint32(-c*d))])
  8792  	for {
  8793  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8794  			if v_0.Op != OpARM64MOVDconst {
  8795  				continue
  8796  			}
  8797  			c := auxIntToInt64(v_0.AuxInt)
  8798  			if v_1.Op != OpARM64MOVDconst {
  8799  				continue
  8800  			}
  8801  			d := auxIntToInt64(v_1.AuxInt)
  8802  			v.reset(OpARM64MOVDconst)
  8803  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
  8804  			return true
  8805  		}
  8806  		break
  8807  	}
  8808  	return false
  8809  }
  8810  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
  8811  	v_1 := v.Args[1]
  8812  	v_0 := v.Args[0]
  8813  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
  8814  	// cond: d != 0
  8815  	// result: (MOVDconst [c%d])
  8816  	for {
  8817  		if v_0.Op != OpARM64MOVDconst {
  8818  			break
  8819  		}
  8820  		c := auxIntToInt64(v_0.AuxInt)
  8821  		if v_1.Op != OpARM64MOVDconst {
  8822  			break
  8823  		}
  8824  		d := auxIntToInt64(v_1.AuxInt)
  8825  		if !(d != 0) {
  8826  			break
  8827  		}
  8828  		v.reset(OpARM64MOVDconst)
  8829  		v.AuxInt = int64ToAuxInt(c % d)
  8830  		return true
  8831  	}
  8832  	return false
  8833  }
  8834  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
  8835  	v_1 := v.Args[1]
  8836  	v_0 := v.Args[0]
  8837  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
  8838  	// cond: d != 0
  8839  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
  8840  	for {
  8841  		if v_0.Op != OpARM64MOVDconst {
  8842  			break
  8843  		}
  8844  		c := auxIntToInt64(v_0.AuxInt)
  8845  		if v_1.Op != OpARM64MOVDconst {
  8846  			break
  8847  		}
  8848  		d := auxIntToInt64(v_1.AuxInt)
  8849  		if !(d != 0) {
  8850  			break
  8851  		}
  8852  		v.reset(OpARM64MOVDconst)
  8853  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
  8854  		return true
  8855  	}
  8856  	return false
  8857  }
  8858  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
  8859  	v_1 := v.Args[1]
  8860  	v_0 := v.Args[0]
  8861  	b := v.Block
  8862  	config := b.Func.Config
  8863  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  8864  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8865  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  8866  	for {
  8867  		off1 := auxIntToInt32(v.AuxInt)
  8868  		sym := auxToSym(v.Aux)
  8869  		if v_0.Op != OpARM64ADDconst {
  8870  			break
  8871  		}
  8872  		off2 := auxIntToInt64(v_0.AuxInt)
  8873  		ptr := v_0.Args[0]
  8874  		mem := v_1
  8875  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8876  			break
  8877  		}
  8878  		v.reset(OpARM64MOVBUload)
  8879  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8880  		v.Aux = symToAux(sym)
  8881  		v.AddArg2(ptr, mem)
  8882  		return true
  8883  	}
  8884  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
  8885  	// cond: off == 0 && sym == nil
  8886  	// result: (MOVBUloadidx ptr idx mem)
  8887  	for {
  8888  		off := auxIntToInt32(v.AuxInt)
  8889  		sym := auxToSym(v.Aux)
  8890  		if v_0.Op != OpARM64ADD {
  8891  			break
  8892  		}
  8893  		idx := v_0.Args[1]
  8894  		ptr := v_0.Args[0]
  8895  		mem := v_1
  8896  		if !(off == 0 && sym == nil) {
  8897  			break
  8898  		}
  8899  		v.reset(OpARM64MOVBUloadidx)
  8900  		v.AddArg3(ptr, idx, mem)
  8901  		return true
  8902  	}
  8903  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8904  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8905  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8906  	for {
  8907  		off1 := auxIntToInt32(v.AuxInt)
  8908  		sym1 := auxToSym(v.Aux)
  8909  		if v_0.Op != OpARM64MOVDaddr {
  8910  			break
  8911  		}
  8912  		off2 := auxIntToInt32(v_0.AuxInt)
  8913  		sym2 := auxToSym(v_0.Aux)
  8914  		ptr := v_0.Args[0]
  8915  		mem := v_1
  8916  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8917  			break
  8918  		}
  8919  		v.reset(OpARM64MOVBUload)
  8920  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8921  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8922  		v.AddArg2(ptr, mem)
  8923  		return true
  8924  	}
  8925  	// match: (MOVBUload [off] {sym} (SB) _)
  8926  	// cond: symIsRO(sym)
  8927  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
  8928  	for {
  8929  		off := auxIntToInt32(v.AuxInt)
  8930  		sym := auxToSym(v.Aux)
  8931  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8932  			break
  8933  		}
  8934  		v.reset(OpARM64MOVDconst)
  8935  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
  8936  		return true
  8937  	}
  8938  	return false
  8939  }
  8940  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
  8941  	v_2 := v.Args[2]
  8942  	v_1 := v.Args[1]
  8943  	v_0 := v.Args[0]
  8944  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
  8945  	// cond: is32Bit(c)
  8946  	// result: (MOVBUload [int32(c)] ptr mem)
  8947  	for {
  8948  		ptr := v_0
  8949  		if v_1.Op != OpARM64MOVDconst {
  8950  			break
  8951  		}
  8952  		c := auxIntToInt64(v_1.AuxInt)
  8953  		mem := v_2
  8954  		if !(is32Bit(c)) {
  8955  			break
  8956  		}
  8957  		v.reset(OpARM64MOVBUload)
  8958  		v.AuxInt = int32ToAuxInt(int32(c))
  8959  		v.AddArg2(ptr, mem)
  8960  		return true
  8961  	}
  8962  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
  8963  	// cond: is32Bit(c)
  8964  	// result: (MOVBUload [int32(c)] ptr mem)
  8965  	for {
  8966  		if v_0.Op != OpARM64MOVDconst {
  8967  			break
  8968  		}
  8969  		c := auxIntToInt64(v_0.AuxInt)
  8970  		ptr := v_1
  8971  		mem := v_2
  8972  		if !(is32Bit(c)) {
  8973  			break
  8974  		}
  8975  		v.reset(OpARM64MOVBUload)
  8976  		v.AuxInt = int32ToAuxInt(int32(c))
  8977  		v.AddArg2(ptr, mem)
  8978  		return true
  8979  	}
  8980  	return false
  8981  }
  8982  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
  8983  	v_0 := v.Args[0]
  8984  	// match: (MOVBUreg (ANDconst [c] x))
  8985  	// result: (ANDconst [c&(1<<8-1)] x)
  8986  	for {
  8987  		if v_0.Op != OpARM64ANDconst {
  8988  			break
  8989  		}
  8990  		c := auxIntToInt64(v_0.AuxInt)
  8991  		x := v_0.Args[0]
  8992  		v.reset(OpARM64ANDconst)
  8993  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  8994  		v.AddArg(x)
  8995  		return true
  8996  	}
  8997  	// match: (MOVBUreg (MOVDconst [c]))
  8998  	// result: (MOVDconst [int64(uint8(c))])
  8999  	for {
  9000  		if v_0.Op != OpARM64MOVDconst {
  9001  			break
  9002  		}
  9003  		c := auxIntToInt64(v_0.AuxInt)
  9004  		v.reset(OpARM64MOVDconst)
  9005  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  9006  		return true
  9007  	}
  9008  	// match: (MOVBUreg x)
  9009  	// cond: v.Type.Size() <= 1
  9010  	// result: x
  9011  	for {
  9012  		x := v_0
  9013  		if !(v.Type.Size() <= 1) {
  9014  			break
  9015  		}
  9016  		v.copyOf(x)
  9017  		return true
  9018  	}
  9019  	// match: (MOVBUreg (SLLconst [lc] x))
  9020  	// cond: lc >= 8
  9021  	// result: (MOVDconst [0])
  9022  	for {
  9023  		if v_0.Op != OpARM64SLLconst {
  9024  			break
  9025  		}
  9026  		lc := auxIntToInt64(v_0.AuxInt)
  9027  		if !(lc >= 8) {
  9028  			break
  9029  		}
  9030  		v.reset(OpARM64MOVDconst)
  9031  		v.AuxInt = int64ToAuxInt(0)
  9032  		return true
  9033  	}
  9034  	// match: (MOVBUreg (SLLconst [lc] x))
  9035  	// cond: lc < 8
  9036  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
  9037  	for {
  9038  		if v_0.Op != OpARM64SLLconst {
  9039  			break
  9040  		}
  9041  		lc := auxIntToInt64(v_0.AuxInt)
  9042  		x := v_0.Args[0]
  9043  		if !(lc < 8) {
  9044  			break
  9045  		}
  9046  		v.reset(OpARM64UBFIZ)
  9047  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  9048  		v.AddArg(x)
  9049  		return true
  9050  	}
  9051  	// match: (MOVBUreg (SRLconst [rc] x))
  9052  	// cond: rc < 8
  9053  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
  9054  	for {
  9055  		if v_0.Op != OpARM64SRLconst {
  9056  			break
  9057  		}
  9058  		rc := auxIntToInt64(v_0.AuxInt)
  9059  		x := v_0.Args[0]
  9060  		if !(rc < 8) {
  9061  			break
  9062  		}
  9063  		v.reset(OpARM64UBFX)
  9064  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
  9065  		v.AddArg(x)
  9066  		return true
  9067  	}
  9068  	// match: (MOVBUreg (UBFX [bfc] x))
  9069  	// cond: bfc.width() <= 8
  9070  	// result: (UBFX [bfc] x)
  9071  	for {
  9072  		if v_0.Op != OpARM64UBFX {
  9073  			break
  9074  		}
  9075  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  9076  		x := v_0.Args[0]
  9077  		if !(bfc.width() <= 8) {
  9078  			break
  9079  		}
  9080  		v.reset(OpARM64UBFX)
  9081  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  9082  		v.AddArg(x)
  9083  		return true
  9084  	}
  9085  	return false
  9086  }
  9087  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
  9088  	v_1 := v.Args[1]
  9089  	v_0 := v.Args[0]
  9090  	b := v.Block
  9091  	config := b.Func.Config
  9092  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  9093  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9094  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  9095  	for {
  9096  		off1 := auxIntToInt32(v.AuxInt)
  9097  		sym := auxToSym(v.Aux)
  9098  		if v_0.Op != OpARM64ADDconst {
  9099  			break
  9100  		}
  9101  		off2 := auxIntToInt64(v_0.AuxInt)
  9102  		ptr := v_0.Args[0]
  9103  		mem := v_1
  9104  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9105  			break
  9106  		}
  9107  		v.reset(OpARM64MOVBload)
  9108  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9109  		v.Aux = symToAux(sym)
  9110  		v.AddArg2(ptr, mem)
  9111  		return true
  9112  	}
  9113  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
  9114  	// cond: off == 0 && sym == nil
  9115  	// result: (MOVBloadidx ptr idx mem)
  9116  	for {
  9117  		off := auxIntToInt32(v.AuxInt)
  9118  		sym := auxToSym(v.Aux)
  9119  		if v_0.Op != OpARM64ADD {
  9120  			break
  9121  		}
  9122  		idx := v_0.Args[1]
  9123  		ptr := v_0.Args[0]
  9124  		mem := v_1
  9125  		if !(off == 0 && sym == nil) {
  9126  			break
  9127  		}
  9128  		v.reset(OpARM64MOVBloadidx)
  9129  		v.AddArg3(ptr, idx, mem)
  9130  		return true
  9131  	}
  9132  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9133  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9134  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9135  	for {
  9136  		off1 := auxIntToInt32(v.AuxInt)
  9137  		sym1 := auxToSym(v.Aux)
  9138  		if v_0.Op != OpARM64MOVDaddr {
  9139  			break
  9140  		}
  9141  		off2 := auxIntToInt32(v_0.AuxInt)
  9142  		sym2 := auxToSym(v_0.Aux)
  9143  		ptr := v_0.Args[0]
  9144  		mem := v_1
  9145  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9146  			break
  9147  		}
  9148  		v.reset(OpARM64MOVBload)
  9149  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9150  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9151  		v.AddArg2(ptr, mem)
  9152  		return true
  9153  	}
  9154  	// match: (MOVBload [off] {sym} (SB) _)
  9155  	// cond: symIsRO(sym)
  9156  	// result: (MOVDconst [int64(int8(read8(sym, int64(off))))])
  9157  	for {
  9158  		off := auxIntToInt32(v.AuxInt)
  9159  		sym := auxToSym(v.Aux)
  9160  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9161  			break
  9162  		}
  9163  		v.reset(OpARM64MOVDconst)
  9164  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
  9165  		return true
  9166  	}
  9167  	return false
  9168  }
  9169  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
  9170  	v_2 := v.Args[2]
  9171  	v_1 := v.Args[1]
  9172  	v_0 := v.Args[0]
  9173  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
  9174  	// cond: is32Bit(c)
  9175  	// result: (MOVBload [int32(c)] ptr mem)
  9176  	for {
  9177  		ptr := v_0
  9178  		if v_1.Op != OpARM64MOVDconst {
  9179  			break
  9180  		}
  9181  		c := auxIntToInt64(v_1.AuxInt)
  9182  		mem := v_2
  9183  		if !(is32Bit(c)) {
  9184  			break
  9185  		}
  9186  		v.reset(OpARM64MOVBload)
  9187  		v.AuxInt = int32ToAuxInt(int32(c))
  9188  		v.AddArg2(ptr, mem)
  9189  		return true
  9190  	}
  9191  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
  9192  	// cond: is32Bit(c)
  9193  	// result: (MOVBload [int32(c)] ptr mem)
  9194  	for {
  9195  		if v_0.Op != OpARM64MOVDconst {
  9196  			break
  9197  		}
  9198  		c := auxIntToInt64(v_0.AuxInt)
  9199  		ptr := v_1
  9200  		mem := v_2
  9201  		if !(is32Bit(c)) {
  9202  			break
  9203  		}
  9204  		v.reset(OpARM64MOVBload)
  9205  		v.AuxInt = int32ToAuxInt(int32(c))
  9206  		v.AddArg2(ptr, mem)
  9207  		return true
  9208  	}
  9209  	return false
  9210  }
  9211  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
  9212  	v_0 := v.Args[0]
  9213  	// match: (MOVBreg (MOVDconst [c]))
  9214  	// result: (MOVDconst [int64(int8(c))])
  9215  	for {
  9216  		if v_0.Op != OpARM64MOVDconst {
  9217  			break
  9218  		}
  9219  		c := auxIntToInt64(v_0.AuxInt)
  9220  		v.reset(OpARM64MOVDconst)
  9221  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  9222  		return true
  9223  	}
  9224  	// match: (MOVBreg x)
  9225  	// cond: v.Type.Size() <= 1
  9226  	// result: x
  9227  	for {
  9228  		x := v_0
  9229  		if !(v.Type.Size() <= 1) {
  9230  			break
  9231  		}
  9232  		v.copyOf(x)
  9233  		return true
  9234  	}
  9235  	// match: (MOVBreg <t> (ANDconst x [c]))
  9236  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
  9237  	// result: (ANDconst <t> x [c])
  9238  	for {
  9239  		t := v.Type
  9240  		if v_0.Op != OpARM64ANDconst {
  9241  			break
  9242  		}
  9243  		c := auxIntToInt64(v_0.AuxInt)
  9244  		x := v_0.Args[0]
  9245  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
  9246  			break
  9247  		}
  9248  		v.reset(OpARM64ANDconst)
  9249  		v.Type = t
  9250  		v.AuxInt = int64ToAuxInt(c)
  9251  		v.AddArg(x)
  9252  		return true
  9253  	}
  9254  	// match: (MOVBreg (SLLconst [lc] x))
  9255  	// cond: lc < 8
  9256  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
  9257  	for {
  9258  		if v_0.Op != OpARM64SLLconst {
  9259  			break
  9260  		}
  9261  		lc := auxIntToInt64(v_0.AuxInt)
  9262  		x := v_0.Args[0]
  9263  		if !(lc < 8) {
  9264  			break
  9265  		}
  9266  		v.reset(OpARM64SBFIZ)
  9267  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  9268  		v.AddArg(x)
  9269  		return true
  9270  	}
  9271  	// match: (MOVBreg (SBFX [bfc] x))
  9272  	// cond: bfc.width() <= 8
  9273  	// result: (SBFX [bfc] x)
  9274  	for {
  9275  		if v_0.Op != OpARM64SBFX {
  9276  			break
  9277  		}
  9278  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  9279  		x := v_0.Args[0]
  9280  		if !(bfc.width() <= 8) {
  9281  			break
  9282  		}
  9283  		v.reset(OpARM64SBFX)
  9284  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  9285  		v.AddArg(x)
  9286  		return true
  9287  	}
  9288  	return false
  9289  }
  9290  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
  9291  	v_2 := v.Args[2]
  9292  	v_1 := v.Args[1]
  9293  	v_0 := v.Args[0]
  9294  	b := v.Block
  9295  	config := b.Func.Config
  9296  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9297  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9298  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  9299  	for {
  9300  		off1 := auxIntToInt32(v.AuxInt)
  9301  		sym := auxToSym(v.Aux)
  9302  		if v_0.Op != OpARM64ADDconst {
  9303  			break
  9304  		}
  9305  		off2 := auxIntToInt64(v_0.AuxInt)
  9306  		ptr := v_0.Args[0]
  9307  		val := v_1
  9308  		mem := v_2
  9309  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9310  			break
  9311  		}
  9312  		v.reset(OpARM64MOVBstore)
  9313  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9314  		v.Aux = symToAux(sym)
  9315  		v.AddArg3(ptr, val, mem)
  9316  		return true
  9317  	}
  9318  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
  9319  	// cond: off == 0 && sym == nil
  9320  	// result: (MOVBstoreidx ptr idx val mem)
  9321  	for {
  9322  		off := auxIntToInt32(v.AuxInt)
  9323  		sym := auxToSym(v.Aux)
  9324  		if v_0.Op != OpARM64ADD {
  9325  			break
  9326  		}
  9327  		idx := v_0.Args[1]
  9328  		ptr := v_0.Args[0]
  9329  		val := v_1
  9330  		mem := v_2
  9331  		if !(off == 0 && sym == nil) {
  9332  			break
  9333  		}
  9334  		v.reset(OpARM64MOVBstoreidx)
  9335  		v.AddArg4(ptr, idx, val, mem)
  9336  		return true
  9337  	}
  9338  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  9339  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9340  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9341  	for {
  9342  		off1 := auxIntToInt32(v.AuxInt)
  9343  		sym1 := auxToSym(v.Aux)
  9344  		if v_0.Op != OpARM64MOVDaddr {
  9345  			break
  9346  		}
  9347  		off2 := auxIntToInt32(v_0.AuxInt)
  9348  		sym2 := auxToSym(v_0.Aux)
  9349  		ptr := v_0.Args[0]
  9350  		val := v_1
  9351  		mem := v_2
  9352  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9353  			break
  9354  		}
  9355  		v.reset(OpARM64MOVBstore)
  9356  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9357  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9358  		v.AddArg3(ptr, val, mem)
  9359  		return true
  9360  	}
  9361  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  9362  	// result: (MOVBstore [off] {sym} ptr x mem)
  9363  	for {
  9364  		off := auxIntToInt32(v.AuxInt)
  9365  		sym := auxToSym(v.Aux)
  9366  		ptr := v_0
  9367  		if v_1.Op != OpARM64MOVBreg {
  9368  			break
  9369  		}
  9370  		x := v_1.Args[0]
  9371  		mem := v_2
  9372  		v.reset(OpARM64MOVBstore)
  9373  		v.AuxInt = int32ToAuxInt(off)
  9374  		v.Aux = symToAux(sym)
  9375  		v.AddArg3(ptr, x, mem)
  9376  		return true
  9377  	}
  9378  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  9379  	// result: (MOVBstore [off] {sym} ptr x mem)
  9380  	for {
  9381  		off := auxIntToInt32(v.AuxInt)
  9382  		sym := auxToSym(v.Aux)
  9383  		ptr := v_0
  9384  		if v_1.Op != OpARM64MOVBUreg {
  9385  			break
  9386  		}
  9387  		x := v_1.Args[0]
  9388  		mem := v_2
  9389  		v.reset(OpARM64MOVBstore)
  9390  		v.AuxInt = int32ToAuxInt(off)
  9391  		v.Aux = symToAux(sym)
  9392  		v.AddArg3(ptr, x, mem)
  9393  		return true
  9394  	}
  9395  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  9396  	// result: (MOVBstore [off] {sym} ptr x mem)
  9397  	for {
  9398  		off := auxIntToInt32(v.AuxInt)
  9399  		sym := auxToSym(v.Aux)
  9400  		ptr := v_0
  9401  		if v_1.Op != OpARM64MOVHreg {
  9402  			break
  9403  		}
  9404  		x := v_1.Args[0]
  9405  		mem := v_2
  9406  		v.reset(OpARM64MOVBstore)
  9407  		v.AuxInt = int32ToAuxInt(off)
  9408  		v.Aux = symToAux(sym)
  9409  		v.AddArg3(ptr, x, mem)
  9410  		return true
  9411  	}
  9412  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  9413  	// result: (MOVBstore [off] {sym} ptr x mem)
  9414  	for {
  9415  		off := auxIntToInt32(v.AuxInt)
  9416  		sym := auxToSym(v.Aux)
  9417  		ptr := v_0
  9418  		if v_1.Op != OpARM64MOVHUreg {
  9419  			break
  9420  		}
  9421  		x := v_1.Args[0]
  9422  		mem := v_2
  9423  		v.reset(OpARM64MOVBstore)
  9424  		v.AuxInt = int32ToAuxInt(off)
  9425  		v.Aux = symToAux(sym)
  9426  		v.AddArg3(ptr, x, mem)
  9427  		return true
  9428  	}
  9429  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  9430  	// result: (MOVBstore [off] {sym} ptr x mem)
  9431  	for {
  9432  		off := auxIntToInt32(v.AuxInt)
  9433  		sym := auxToSym(v.Aux)
  9434  		ptr := v_0
  9435  		if v_1.Op != OpARM64MOVWreg {
  9436  			break
  9437  		}
  9438  		x := v_1.Args[0]
  9439  		mem := v_2
  9440  		v.reset(OpARM64MOVBstore)
  9441  		v.AuxInt = int32ToAuxInt(off)
  9442  		v.Aux = symToAux(sym)
  9443  		v.AddArg3(ptr, x, mem)
  9444  		return true
  9445  	}
  9446  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  9447  	// result: (MOVBstore [off] {sym} ptr x mem)
  9448  	for {
  9449  		off := auxIntToInt32(v.AuxInt)
  9450  		sym := auxToSym(v.Aux)
  9451  		ptr := v_0
  9452  		if v_1.Op != OpARM64MOVWUreg {
  9453  			break
  9454  		}
  9455  		x := v_1.Args[0]
  9456  		mem := v_2
  9457  		v.reset(OpARM64MOVBstore)
  9458  		v.AuxInt = int32ToAuxInt(off)
  9459  		v.Aux = symToAux(sym)
  9460  		v.AddArg3(ptr, x, mem)
  9461  		return true
  9462  	}
  9463  	return false
  9464  }
  9465  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
  9466  	v_3 := v.Args[3]
  9467  	v_2 := v.Args[2]
  9468  	v_1 := v.Args[1]
  9469  	v_0 := v.Args[0]
  9470  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  9471  	// cond: is32Bit(c)
  9472  	// result: (MOVBstore [int32(c)] ptr val mem)
  9473  	for {
  9474  		ptr := v_0
  9475  		if v_1.Op != OpARM64MOVDconst {
  9476  			break
  9477  		}
  9478  		c := auxIntToInt64(v_1.AuxInt)
  9479  		val := v_2
  9480  		mem := v_3
  9481  		if !(is32Bit(c)) {
  9482  			break
  9483  		}
  9484  		v.reset(OpARM64MOVBstore)
  9485  		v.AuxInt = int32ToAuxInt(int32(c))
  9486  		v.AddArg3(ptr, val, mem)
  9487  		return true
  9488  	}
  9489  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
  9490  	// cond: is32Bit(c)
  9491  	// result: (MOVBstore [int32(c)] idx val mem)
  9492  	for {
  9493  		if v_0.Op != OpARM64MOVDconst {
  9494  			break
  9495  		}
  9496  		c := auxIntToInt64(v_0.AuxInt)
  9497  		idx := v_1
  9498  		val := v_2
  9499  		mem := v_3
  9500  		if !(is32Bit(c)) {
  9501  			break
  9502  		}
  9503  		v.reset(OpARM64MOVBstore)
  9504  		v.AuxInt = int32ToAuxInt(int32(c))
  9505  		v.AddArg3(idx, val, mem)
  9506  		return true
  9507  	}
  9508  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
  9509  	// result: (MOVBstoreidx ptr idx x mem)
  9510  	for {
  9511  		ptr := v_0
  9512  		idx := v_1
  9513  		if v_2.Op != OpARM64MOVBreg {
  9514  			break
  9515  		}
  9516  		x := v_2.Args[0]
  9517  		mem := v_3
  9518  		v.reset(OpARM64MOVBstoreidx)
  9519  		v.AddArg4(ptr, idx, x, mem)
  9520  		return true
  9521  	}
  9522  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
  9523  	// result: (MOVBstoreidx ptr idx x mem)
  9524  	for {
  9525  		ptr := v_0
  9526  		idx := v_1
  9527  		if v_2.Op != OpARM64MOVBUreg {
  9528  			break
  9529  		}
  9530  		x := v_2.Args[0]
  9531  		mem := v_3
  9532  		v.reset(OpARM64MOVBstoreidx)
  9533  		v.AddArg4(ptr, idx, x, mem)
  9534  		return true
  9535  	}
  9536  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
  9537  	// result: (MOVBstoreidx ptr idx x mem)
  9538  	for {
  9539  		ptr := v_0
  9540  		idx := v_1
  9541  		if v_2.Op != OpARM64MOVHreg {
  9542  			break
  9543  		}
  9544  		x := v_2.Args[0]
  9545  		mem := v_3
  9546  		v.reset(OpARM64MOVBstoreidx)
  9547  		v.AddArg4(ptr, idx, x, mem)
  9548  		return true
  9549  	}
  9550  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
  9551  	// result: (MOVBstoreidx ptr idx x mem)
  9552  	for {
  9553  		ptr := v_0
  9554  		idx := v_1
  9555  		if v_2.Op != OpARM64MOVHUreg {
  9556  			break
  9557  		}
  9558  		x := v_2.Args[0]
  9559  		mem := v_3
  9560  		v.reset(OpARM64MOVBstoreidx)
  9561  		v.AddArg4(ptr, idx, x, mem)
  9562  		return true
  9563  	}
  9564  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
  9565  	// result: (MOVBstoreidx ptr idx x mem)
  9566  	for {
  9567  		ptr := v_0
  9568  		idx := v_1
  9569  		if v_2.Op != OpARM64MOVWreg {
  9570  			break
  9571  		}
  9572  		x := v_2.Args[0]
  9573  		mem := v_3
  9574  		v.reset(OpARM64MOVBstoreidx)
  9575  		v.AddArg4(ptr, idx, x, mem)
  9576  		return true
  9577  	}
  9578  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
  9579  	// result: (MOVBstoreidx ptr idx x mem)
  9580  	for {
  9581  		ptr := v_0
  9582  		idx := v_1
  9583  		if v_2.Op != OpARM64MOVWUreg {
  9584  			break
  9585  		}
  9586  		x := v_2.Args[0]
  9587  		mem := v_3
  9588  		v.reset(OpARM64MOVBstoreidx)
  9589  		v.AddArg4(ptr, idx, x, mem)
  9590  		return true
  9591  	}
  9592  	return false
  9593  }
  9594  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
  9595  	v_1 := v.Args[1]
  9596  	v_0 := v.Args[0]
  9597  	b := v.Block
  9598  	config := b.Func.Config
  9599  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
  9600  	// result: (FMOVDfpgp val)
  9601  	for {
  9602  		off := auxIntToInt32(v.AuxInt)
  9603  		sym := auxToSym(v.Aux)
  9604  		ptr := v_0
  9605  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9606  			break
  9607  		}
  9608  		val := v_1.Args[1]
  9609  		if ptr != v_1.Args[0] {
  9610  			break
  9611  		}
  9612  		v.reset(OpARM64FMOVDfpgp)
  9613  		v.AddArg(val)
  9614  		return true
  9615  	}
  9616  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9617  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9618  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  9619  	for {
  9620  		off1 := auxIntToInt32(v.AuxInt)
  9621  		sym := auxToSym(v.Aux)
  9622  		if v_0.Op != OpARM64ADDconst {
  9623  			break
  9624  		}
  9625  		off2 := auxIntToInt64(v_0.AuxInt)
  9626  		ptr := v_0.Args[0]
  9627  		mem := v_1
  9628  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9629  			break
  9630  		}
  9631  		v.reset(OpARM64MOVDload)
  9632  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9633  		v.Aux = symToAux(sym)
  9634  		v.AddArg2(ptr, mem)
  9635  		return true
  9636  	}
  9637  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
  9638  	// cond: off == 0 && sym == nil
  9639  	// result: (MOVDloadidx ptr idx mem)
  9640  	for {
  9641  		off := auxIntToInt32(v.AuxInt)
  9642  		sym := auxToSym(v.Aux)
  9643  		if v_0.Op != OpARM64ADD {
  9644  			break
  9645  		}
  9646  		idx := v_0.Args[1]
  9647  		ptr := v_0.Args[0]
  9648  		mem := v_1
  9649  		if !(off == 0 && sym == nil) {
  9650  			break
  9651  		}
  9652  		v.reset(OpARM64MOVDloadidx)
  9653  		v.AddArg3(ptr, idx, mem)
  9654  		return true
  9655  	}
  9656  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  9657  	// cond: off == 0 && sym == nil
  9658  	// result: (MOVDloadidx8 ptr idx mem)
  9659  	for {
  9660  		off := auxIntToInt32(v.AuxInt)
  9661  		sym := auxToSym(v.Aux)
  9662  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9663  			break
  9664  		}
  9665  		idx := v_0.Args[1]
  9666  		ptr := v_0.Args[0]
  9667  		mem := v_1
  9668  		if !(off == 0 && sym == nil) {
  9669  			break
  9670  		}
  9671  		v.reset(OpARM64MOVDloadidx8)
  9672  		v.AddArg3(ptr, idx, mem)
  9673  		return true
  9674  	}
  9675  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9676  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9677  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9678  	for {
  9679  		off1 := auxIntToInt32(v.AuxInt)
  9680  		sym1 := auxToSym(v.Aux)
  9681  		if v_0.Op != OpARM64MOVDaddr {
  9682  			break
  9683  		}
  9684  		off2 := auxIntToInt32(v_0.AuxInt)
  9685  		sym2 := auxToSym(v_0.Aux)
  9686  		ptr := v_0.Args[0]
  9687  		mem := v_1
  9688  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9689  			break
  9690  		}
  9691  		v.reset(OpARM64MOVDload)
  9692  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9693  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9694  		v.AddArg2(ptr, mem)
  9695  		return true
  9696  	}
  9697  	// match: (MOVDload [off] {sym} (SB) _)
  9698  	// cond: symIsRO(sym)
  9699  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9700  	for {
  9701  		off := auxIntToInt32(v.AuxInt)
  9702  		sym := auxToSym(v.Aux)
  9703  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9704  			break
  9705  		}
  9706  		v.reset(OpARM64MOVDconst)
  9707  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9708  		return true
  9709  	}
  9710  	return false
  9711  }
  9712  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
  9713  	v_2 := v.Args[2]
  9714  	v_1 := v.Args[1]
  9715  	v_0 := v.Args[0]
  9716  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  9717  	// cond: is32Bit(c)
  9718  	// result: (MOVDload [int32(c)] ptr mem)
  9719  	for {
  9720  		ptr := v_0
  9721  		if v_1.Op != OpARM64MOVDconst {
  9722  			break
  9723  		}
  9724  		c := auxIntToInt64(v_1.AuxInt)
  9725  		mem := v_2
  9726  		if !(is32Bit(c)) {
  9727  			break
  9728  		}
  9729  		v.reset(OpARM64MOVDload)
  9730  		v.AuxInt = int32ToAuxInt(int32(c))
  9731  		v.AddArg2(ptr, mem)
  9732  		return true
  9733  	}
  9734  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  9735  	// cond: is32Bit(c)
  9736  	// result: (MOVDload [int32(c)] ptr mem)
  9737  	for {
  9738  		if v_0.Op != OpARM64MOVDconst {
  9739  			break
  9740  		}
  9741  		c := auxIntToInt64(v_0.AuxInt)
  9742  		ptr := v_1
  9743  		mem := v_2
  9744  		if !(is32Bit(c)) {
  9745  			break
  9746  		}
  9747  		v.reset(OpARM64MOVDload)
  9748  		v.AuxInt = int32ToAuxInt(int32(c))
  9749  		v.AddArg2(ptr, mem)
  9750  		return true
  9751  	}
  9752  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
  9753  	// result: (MOVDloadidx8 ptr idx mem)
  9754  	for {
  9755  		ptr := v_0
  9756  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9757  			break
  9758  		}
  9759  		idx := v_1.Args[0]
  9760  		mem := v_2
  9761  		v.reset(OpARM64MOVDloadidx8)
  9762  		v.AddArg3(ptr, idx, mem)
  9763  		return true
  9764  	}
  9765  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
  9766  	// result: (MOVDloadidx8 ptr idx mem)
  9767  	for {
  9768  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9769  			break
  9770  		}
  9771  		idx := v_0.Args[0]
  9772  		ptr := v_1
  9773  		mem := v_2
  9774  		v.reset(OpARM64MOVDloadidx8)
  9775  		v.AddArg3(ptr, idx, mem)
  9776  		return true
  9777  	}
  9778  	return false
  9779  }
  9780  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
  9781  	v_2 := v.Args[2]
  9782  	v_1 := v.Args[1]
  9783  	v_0 := v.Args[0]
  9784  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
  9785  	// cond: is32Bit(c<<3)
  9786  	// result: (MOVDload [int32(c)<<3] ptr mem)
  9787  	for {
  9788  		ptr := v_0
  9789  		if v_1.Op != OpARM64MOVDconst {
  9790  			break
  9791  		}
  9792  		c := auxIntToInt64(v_1.AuxInt)
  9793  		mem := v_2
  9794  		if !(is32Bit(c << 3)) {
  9795  			break
  9796  		}
  9797  		v.reset(OpARM64MOVDload)
  9798  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9799  		v.AddArg2(ptr, mem)
  9800  		return true
  9801  	}
  9802  	return false
  9803  }
  9804  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
  9805  	v_0 := v.Args[0]
  9806  	// match: (MOVDnop (MOVDconst [c]))
  9807  	// result: (MOVDconst [c])
  9808  	for {
  9809  		if v_0.Op != OpARM64MOVDconst {
  9810  			break
  9811  		}
  9812  		c := auxIntToInt64(v_0.AuxInt)
  9813  		v.reset(OpARM64MOVDconst)
  9814  		v.AuxInt = int64ToAuxInt(c)
  9815  		return true
  9816  	}
  9817  	return false
  9818  }
  9819  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
  9820  	v_0 := v.Args[0]
  9821  	// match: (MOVDreg x)
  9822  	// cond: x.Uses == 1
  9823  	// result: (MOVDnop x)
  9824  	for {
  9825  		x := v_0
  9826  		if !(x.Uses == 1) {
  9827  			break
  9828  		}
  9829  		v.reset(OpARM64MOVDnop)
  9830  		v.AddArg(x)
  9831  		return true
  9832  	}
  9833  	// match: (MOVDreg (MOVDconst [c]))
  9834  	// result: (MOVDconst [c])
  9835  	for {
  9836  		if v_0.Op != OpARM64MOVDconst {
  9837  			break
  9838  		}
  9839  		c := auxIntToInt64(v_0.AuxInt)
  9840  		v.reset(OpARM64MOVDconst)
  9841  		v.AuxInt = int64ToAuxInt(c)
  9842  		return true
  9843  	}
  9844  	return false
  9845  }
  9846  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
  9847  	v_2 := v.Args[2]
  9848  	v_1 := v.Args[1]
  9849  	v_0 := v.Args[0]
  9850  	b := v.Block
  9851  	config := b.Func.Config
  9852  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
  9853  	// result: (FMOVDstore [off] {sym} ptr val mem)
  9854  	for {
  9855  		off := auxIntToInt32(v.AuxInt)
  9856  		sym := auxToSym(v.Aux)
  9857  		ptr := v_0
  9858  		if v_1.Op != OpARM64FMOVDfpgp {
  9859  			break
  9860  		}
  9861  		val := v_1.Args[0]
  9862  		mem := v_2
  9863  		v.reset(OpARM64FMOVDstore)
  9864  		v.AuxInt = int32ToAuxInt(off)
  9865  		v.Aux = symToAux(sym)
  9866  		v.AddArg3(ptr, val, mem)
  9867  		return true
  9868  	}
  9869  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9870  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9871  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  9872  	for {
  9873  		off1 := auxIntToInt32(v.AuxInt)
  9874  		sym := auxToSym(v.Aux)
  9875  		if v_0.Op != OpARM64ADDconst {
  9876  			break
  9877  		}
  9878  		off2 := auxIntToInt64(v_0.AuxInt)
  9879  		ptr := v_0.Args[0]
  9880  		val := v_1
  9881  		mem := v_2
  9882  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9883  			break
  9884  		}
  9885  		v.reset(OpARM64MOVDstore)
  9886  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9887  		v.Aux = symToAux(sym)
  9888  		v.AddArg3(ptr, val, mem)
  9889  		return true
  9890  	}
  9891  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
  9892  	// cond: off == 0 && sym == nil
  9893  	// result: (MOVDstoreidx ptr idx val mem)
  9894  	for {
  9895  		off := auxIntToInt32(v.AuxInt)
  9896  		sym := auxToSym(v.Aux)
  9897  		if v_0.Op != OpARM64ADD {
  9898  			break
  9899  		}
  9900  		idx := v_0.Args[1]
  9901  		ptr := v_0.Args[0]
  9902  		val := v_1
  9903  		mem := v_2
  9904  		if !(off == 0 && sym == nil) {
  9905  			break
  9906  		}
  9907  		v.reset(OpARM64MOVDstoreidx)
  9908  		v.AddArg4(ptr, idx, val, mem)
  9909  		return true
  9910  	}
  9911  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  9912  	// cond: off == 0 && sym == nil
  9913  	// result: (MOVDstoreidx8 ptr idx val mem)
  9914  	for {
  9915  		off := auxIntToInt32(v.AuxInt)
  9916  		sym := auxToSym(v.Aux)
  9917  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9918  			break
  9919  		}
  9920  		idx := v_0.Args[1]
  9921  		ptr := v_0.Args[0]
  9922  		val := v_1
  9923  		mem := v_2
  9924  		if !(off == 0 && sym == nil) {
  9925  			break
  9926  		}
  9927  		v.reset(OpARM64MOVDstoreidx8)
  9928  		v.AddArg4(ptr, idx, val, mem)
  9929  		return true
  9930  	}
  9931  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  9932  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9933  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9934  	for {
  9935  		off1 := auxIntToInt32(v.AuxInt)
  9936  		sym1 := auxToSym(v.Aux)
  9937  		if v_0.Op != OpARM64MOVDaddr {
  9938  			break
  9939  		}
  9940  		off2 := auxIntToInt32(v_0.AuxInt)
  9941  		sym2 := auxToSym(v_0.Aux)
  9942  		ptr := v_0.Args[0]
  9943  		val := v_1
  9944  		mem := v_2
  9945  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9946  			break
  9947  		}
  9948  		v.reset(OpARM64MOVDstore)
  9949  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9950  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9951  		v.AddArg3(ptr, val, mem)
  9952  		return true
  9953  	}
  9954  	return false
  9955  }
  9956  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
  9957  	v_3 := v.Args[3]
  9958  	v_2 := v.Args[2]
  9959  	v_1 := v.Args[1]
  9960  	v_0 := v.Args[0]
  9961  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  9962  	// cond: is32Bit(c)
  9963  	// result: (MOVDstore [int32(c)] ptr val mem)
  9964  	for {
  9965  		ptr := v_0
  9966  		if v_1.Op != OpARM64MOVDconst {
  9967  			break
  9968  		}
  9969  		c := auxIntToInt64(v_1.AuxInt)
  9970  		val := v_2
  9971  		mem := v_3
  9972  		if !(is32Bit(c)) {
  9973  			break
  9974  		}
  9975  		v.reset(OpARM64MOVDstore)
  9976  		v.AuxInt = int32ToAuxInt(int32(c))
  9977  		v.AddArg3(ptr, val, mem)
  9978  		return true
  9979  	}
  9980  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
  9981  	// cond: is32Bit(c)
  9982  	// result: (MOVDstore [int32(c)] idx val mem)
  9983  	for {
  9984  		if v_0.Op != OpARM64MOVDconst {
  9985  			break
  9986  		}
  9987  		c := auxIntToInt64(v_0.AuxInt)
  9988  		idx := v_1
  9989  		val := v_2
  9990  		mem := v_3
  9991  		if !(is32Bit(c)) {
  9992  			break
  9993  		}
  9994  		v.reset(OpARM64MOVDstore)
  9995  		v.AuxInt = int32ToAuxInt(int32(c))
  9996  		v.AddArg3(idx, val, mem)
  9997  		return true
  9998  	}
  9999  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
 10000  	// result: (MOVDstoreidx8 ptr idx val mem)
 10001  	for {
 10002  		ptr := v_0
 10003  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 10004  			break
 10005  		}
 10006  		idx := v_1.Args[0]
 10007  		val := v_2
 10008  		mem := v_3
 10009  		v.reset(OpARM64MOVDstoreidx8)
 10010  		v.AddArg4(ptr, idx, val, mem)
 10011  		return true
 10012  	}
 10013  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
 10014  	// result: (MOVDstoreidx8 ptr idx val mem)
 10015  	for {
 10016  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 10017  			break
 10018  		}
 10019  		idx := v_0.Args[0]
 10020  		ptr := v_1
 10021  		val := v_2
 10022  		mem := v_3
 10023  		v.reset(OpARM64MOVDstoreidx8)
 10024  		v.AddArg4(ptr, idx, val, mem)
 10025  		return true
 10026  	}
 10027  	return false
 10028  }
 10029  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
 10030  	v_3 := v.Args[3]
 10031  	v_2 := v.Args[2]
 10032  	v_1 := v.Args[1]
 10033  	v_0 := v.Args[0]
 10034  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
 10035  	// cond: is32Bit(c<<3)
 10036  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
 10037  	for {
 10038  		ptr := v_0
 10039  		if v_1.Op != OpARM64MOVDconst {
 10040  			break
 10041  		}
 10042  		c := auxIntToInt64(v_1.AuxInt)
 10043  		val := v_2
 10044  		mem := v_3
 10045  		if !(is32Bit(c << 3)) {
 10046  			break
 10047  		}
 10048  		v.reset(OpARM64MOVDstore)
 10049  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
 10050  		v.AddArg3(ptr, val, mem)
 10051  		return true
 10052  	}
 10053  	return false
 10054  }
 10055  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
 10056  	v_1 := v.Args[1]
 10057  	v_0 := v.Args[0]
 10058  	b := v.Block
 10059  	config := b.Func.Config
 10060  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10061  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10062  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
 10063  	for {
 10064  		off1 := auxIntToInt32(v.AuxInt)
 10065  		sym := auxToSym(v.Aux)
 10066  		if v_0.Op != OpARM64ADDconst {
 10067  			break
 10068  		}
 10069  		off2 := auxIntToInt64(v_0.AuxInt)
 10070  		ptr := v_0.Args[0]
 10071  		mem := v_1
 10072  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10073  			break
 10074  		}
 10075  		v.reset(OpARM64MOVHUload)
 10076  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10077  		v.Aux = symToAux(sym)
 10078  		v.AddArg2(ptr, mem)
 10079  		return true
 10080  	}
 10081  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
 10082  	// cond: off == 0 && sym == nil
 10083  	// result: (MOVHUloadidx ptr idx mem)
 10084  	for {
 10085  		off := auxIntToInt32(v.AuxInt)
 10086  		sym := auxToSym(v.Aux)
 10087  		if v_0.Op != OpARM64ADD {
 10088  			break
 10089  		}
 10090  		idx := v_0.Args[1]
 10091  		ptr := v_0.Args[0]
 10092  		mem := v_1
 10093  		if !(off == 0 && sym == nil) {
 10094  			break
 10095  		}
 10096  		v.reset(OpARM64MOVHUloadidx)
 10097  		v.AddArg3(ptr, idx, mem)
 10098  		return true
 10099  	}
 10100  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 10101  	// cond: off == 0 && sym == nil
 10102  	// result: (MOVHUloadidx2 ptr idx mem)
 10103  	for {
 10104  		off := auxIntToInt32(v.AuxInt)
 10105  		sym := auxToSym(v.Aux)
 10106  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10107  			break
 10108  		}
 10109  		idx := v_0.Args[1]
 10110  		ptr := v_0.Args[0]
 10111  		mem := v_1
 10112  		if !(off == 0 && sym == nil) {
 10113  			break
 10114  		}
 10115  		v.reset(OpARM64MOVHUloadidx2)
 10116  		v.AddArg3(ptr, idx, mem)
 10117  		return true
 10118  	}
 10119  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10120  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10121  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10122  	for {
 10123  		off1 := auxIntToInt32(v.AuxInt)
 10124  		sym1 := auxToSym(v.Aux)
 10125  		if v_0.Op != OpARM64MOVDaddr {
 10126  			break
 10127  		}
 10128  		off2 := auxIntToInt32(v_0.AuxInt)
 10129  		sym2 := auxToSym(v_0.Aux)
 10130  		ptr := v_0.Args[0]
 10131  		mem := v_1
 10132  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10133  			break
 10134  		}
 10135  		v.reset(OpARM64MOVHUload)
 10136  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10137  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10138  		v.AddArg2(ptr, mem)
 10139  		return true
 10140  	}
 10141  	// match: (MOVHUload [off] {sym} (SB) _)
 10142  	// cond: symIsRO(sym)
 10143  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10144  	for {
 10145  		off := auxIntToInt32(v.AuxInt)
 10146  		sym := auxToSym(v.Aux)
 10147  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10148  			break
 10149  		}
 10150  		v.reset(OpARM64MOVDconst)
 10151  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10152  		return true
 10153  	}
 10154  	return false
 10155  }
 10156  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
 10157  	v_2 := v.Args[2]
 10158  	v_1 := v.Args[1]
 10159  	v_0 := v.Args[0]
 10160  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
 10161  	// cond: is32Bit(c)
 10162  	// result: (MOVHUload [int32(c)] ptr mem)
 10163  	for {
 10164  		ptr := v_0
 10165  		if v_1.Op != OpARM64MOVDconst {
 10166  			break
 10167  		}
 10168  		c := auxIntToInt64(v_1.AuxInt)
 10169  		mem := v_2
 10170  		if !(is32Bit(c)) {
 10171  			break
 10172  		}
 10173  		v.reset(OpARM64MOVHUload)
 10174  		v.AuxInt = int32ToAuxInt(int32(c))
 10175  		v.AddArg2(ptr, mem)
 10176  		return true
 10177  	}
 10178  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
 10179  	// cond: is32Bit(c)
 10180  	// result: (MOVHUload [int32(c)] ptr mem)
 10181  	for {
 10182  		if v_0.Op != OpARM64MOVDconst {
 10183  			break
 10184  		}
 10185  		c := auxIntToInt64(v_0.AuxInt)
 10186  		ptr := v_1
 10187  		mem := v_2
 10188  		if !(is32Bit(c)) {
 10189  			break
 10190  		}
 10191  		v.reset(OpARM64MOVHUload)
 10192  		v.AuxInt = int32ToAuxInt(int32(c))
 10193  		v.AddArg2(ptr, mem)
 10194  		return true
 10195  	}
 10196  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
 10197  	// result: (MOVHUloadidx2 ptr idx mem)
 10198  	for {
 10199  		ptr := v_0
 10200  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10201  			break
 10202  		}
 10203  		idx := v_1.Args[0]
 10204  		mem := v_2
 10205  		v.reset(OpARM64MOVHUloadidx2)
 10206  		v.AddArg3(ptr, idx, mem)
 10207  		return true
 10208  	}
 10209  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
 10210  	// result: (MOVHUloadidx2 ptr idx mem)
 10211  	for {
 10212  		ptr := v_0
 10213  		if v_1.Op != OpARM64ADD {
 10214  			break
 10215  		}
 10216  		idx := v_1.Args[1]
 10217  		if idx != v_1.Args[0] {
 10218  			break
 10219  		}
 10220  		mem := v_2
 10221  		v.reset(OpARM64MOVHUloadidx2)
 10222  		v.AddArg3(ptr, idx, mem)
 10223  		return true
 10224  	}
 10225  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
 10226  	// result: (MOVHUloadidx2 ptr idx mem)
 10227  	for {
 10228  		if v_0.Op != OpARM64ADD {
 10229  			break
 10230  		}
 10231  		idx := v_0.Args[1]
 10232  		if idx != v_0.Args[0] {
 10233  			break
 10234  		}
 10235  		ptr := v_1
 10236  		mem := v_2
 10237  		v.reset(OpARM64MOVHUloadidx2)
 10238  		v.AddArg3(ptr, idx, mem)
 10239  		return true
 10240  	}
 10241  	return false
 10242  }
 10243  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
 10244  	v_2 := v.Args[2]
 10245  	v_1 := v.Args[1]
 10246  	v_0 := v.Args[0]
 10247  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
 10248  	// cond: is32Bit(c<<1)
 10249  	// result: (MOVHUload [int32(c)<<1] ptr mem)
 10250  	for {
 10251  		ptr := v_0
 10252  		if v_1.Op != OpARM64MOVDconst {
 10253  			break
 10254  		}
 10255  		c := auxIntToInt64(v_1.AuxInt)
 10256  		mem := v_2
 10257  		if !(is32Bit(c << 1)) {
 10258  			break
 10259  		}
 10260  		v.reset(OpARM64MOVHUload)
 10261  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10262  		v.AddArg2(ptr, mem)
 10263  		return true
 10264  	}
 10265  	return false
 10266  }
 10267  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
 10268  	v_0 := v.Args[0]
 10269  	// match: (MOVHUreg (ANDconst [c] x))
 10270  	// result: (ANDconst [c&(1<<16-1)] x)
 10271  	for {
 10272  		if v_0.Op != OpARM64ANDconst {
 10273  			break
 10274  		}
 10275  		c := auxIntToInt64(v_0.AuxInt)
 10276  		x := v_0.Args[0]
 10277  		v.reset(OpARM64ANDconst)
 10278  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
 10279  		v.AddArg(x)
 10280  		return true
 10281  	}
 10282  	// match: (MOVHUreg (MOVDconst [c]))
 10283  	// result: (MOVDconst [int64(uint16(c))])
 10284  	for {
 10285  		if v_0.Op != OpARM64MOVDconst {
 10286  			break
 10287  		}
 10288  		c := auxIntToInt64(v_0.AuxInt)
 10289  		v.reset(OpARM64MOVDconst)
 10290  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
 10291  		return true
 10292  	}
 10293  	// match: (MOVHUreg x)
 10294  	// cond: v.Type.Size() <= 2
 10295  	// result: x
 10296  	for {
 10297  		x := v_0
 10298  		if !(v.Type.Size() <= 2) {
 10299  			break
 10300  		}
 10301  		v.copyOf(x)
 10302  		return true
 10303  	}
 10304  	// match: (MOVHUreg (SLLconst [lc] x))
 10305  	// cond: lc >= 16
 10306  	// result: (MOVDconst [0])
 10307  	for {
 10308  		if v_0.Op != OpARM64SLLconst {
 10309  			break
 10310  		}
 10311  		lc := auxIntToInt64(v_0.AuxInt)
 10312  		if !(lc >= 16) {
 10313  			break
 10314  		}
 10315  		v.reset(OpARM64MOVDconst)
 10316  		v.AuxInt = int64ToAuxInt(0)
 10317  		return true
 10318  	}
 10319  	// match: (MOVHUreg (SLLconst [lc] x))
 10320  	// cond: lc < 16
 10321  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
 10322  	for {
 10323  		if v_0.Op != OpARM64SLLconst {
 10324  			break
 10325  		}
 10326  		lc := auxIntToInt64(v_0.AuxInt)
 10327  		x := v_0.Args[0]
 10328  		if !(lc < 16) {
 10329  			break
 10330  		}
 10331  		v.reset(OpARM64UBFIZ)
 10332  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 10333  		v.AddArg(x)
 10334  		return true
 10335  	}
 10336  	// match: (MOVHUreg (SRLconst [rc] x))
 10337  	// cond: rc < 16
 10338  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
 10339  	for {
 10340  		if v_0.Op != OpARM64SRLconst {
 10341  			break
 10342  		}
 10343  		rc := auxIntToInt64(v_0.AuxInt)
 10344  		x := v_0.Args[0]
 10345  		if !(rc < 16) {
 10346  			break
 10347  		}
 10348  		v.reset(OpARM64UBFX)
 10349  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
 10350  		v.AddArg(x)
 10351  		return true
 10352  	}
 10353  	// match: (MOVHUreg (UBFX [bfc] x))
 10354  	// cond: bfc.width() <= 16
 10355  	// result: (UBFX [bfc] x)
 10356  	for {
 10357  		if v_0.Op != OpARM64UBFX {
 10358  			break
 10359  		}
 10360  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10361  		x := v_0.Args[0]
 10362  		if !(bfc.width() <= 16) {
 10363  			break
 10364  		}
 10365  		v.reset(OpARM64UBFX)
 10366  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10367  		v.AddArg(x)
 10368  		return true
 10369  	}
 10370  	return false
 10371  }
 10372  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
 10373  	v_1 := v.Args[1]
 10374  	v_0 := v.Args[0]
 10375  	b := v.Block
 10376  	config := b.Func.Config
 10377  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
 10378  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10379  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
 10380  	for {
 10381  		off1 := auxIntToInt32(v.AuxInt)
 10382  		sym := auxToSym(v.Aux)
 10383  		if v_0.Op != OpARM64ADDconst {
 10384  			break
 10385  		}
 10386  		off2 := auxIntToInt64(v_0.AuxInt)
 10387  		ptr := v_0.Args[0]
 10388  		mem := v_1
 10389  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10390  			break
 10391  		}
 10392  		v.reset(OpARM64MOVHload)
 10393  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10394  		v.Aux = symToAux(sym)
 10395  		v.AddArg2(ptr, mem)
 10396  		return true
 10397  	}
 10398  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
 10399  	// cond: off == 0 && sym == nil
 10400  	// result: (MOVHloadidx ptr idx mem)
 10401  	for {
 10402  		off := auxIntToInt32(v.AuxInt)
 10403  		sym := auxToSym(v.Aux)
 10404  		if v_0.Op != OpARM64ADD {
 10405  			break
 10406  		}
 10407  		idx := v_0.Args[1]
 10408  		ptr := v_0.Args[0]
 10409  		mem := v_1
 10410  		if !(off == 0 && sym == nil) {
 10411  			break
 10412  		}
 10413  		v.reset(OpARM64MOVHloadidx)
 10414  		v.AddArg3(ptr, idx, mem)
 10415  		return true
 10416  	}
 10417  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 10418  	// cond: off == 0 && sym == nil
 10419  	// result: (MOVHloadidx2 ptr idx mem)
 10420  	for {
 10421  		off := auxIntToInt32(v.AuxInt)
 10422  		sym := auxToSym(v.Aux)
 10423  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10424  			break
 10425  		}
 10426  		idx := v_0.Args[1]
 10427  		ptr := v_0.Args[0]
 10428  		mem := v_1
 10429  		if !(off == 0 && sym == nil) {
 10430  			break
 10431  		}
 10432  		v.reset(OpARM64MOVHloadidx2)
 10433  		v.AddArg3(ptr, idx, mem)
 10434  		return true
 10435  	}
 10436  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10437  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10438  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10439  	for {
 10440  		off1 := auxIntToInt32(v.AuxInt)
 10441  		sym1 := auxToSym(v.Aux)
 10442  		if v_0.Op != OpARM64MOVDaddr {
 10443  			break
 10444  		}
 10445  		off2 := auxIntToInt32(v_0.AuxInt)
 10446  		sym2 := auxToSym(v_0.Aux)
 10447  		ptr := v_0.Args[0]
 10448  		mem := v_1
 10449  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10450  			break
 10451  		}
 10452  		v.reset(OpARM64MOVHload)
 10453  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10454  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10455  		v.AddArg2(ptr, mem)
 10456  		return true
 10457  	}
 10458  	// match: (MOVHload [off] {sym} (SB) _)
 10459  	// cond: symIsRO(sym)
 10460  	// result: (MOVDconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 10461  	for {
 10462  		off := auxIntToInt32(v.AuxInt)
 10463  		sym := auxToSym(v.Aux)
 10464  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10465  			break
 10466  		}
 10467  		v.reset(OpARM64MOVDconst)
 10468  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 10469  		return true
 10470  	}
 10471  	return false
 10472  }
 10473  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
 10474  	v_2 := v.Args[2]
 10475  	v_1 := v.Args[1]
 10476  	v_0 := v.Args[0]
 10477  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 10478  	// cond: is32Bit(c)
 10479  	// result: (MOVHload [int32(c)] ptr mem)
 10480  	for {
 10481  		ptr := v_0
 10482  		if v_1.Op != OpARM64MOVDconst {
 10483  			break
 10484  		}
 10485  		c := auxIntToInt64(v_1.AuxInt)
 10486  		mem := v_2
 10487  		if !(is32Bit(c)) {
 10488  			break
 10489  		}
 10490  		v.reset(OpARM64MOVHload)
 10491  		v.AuxInt = int32ToAuxInt(int32(c))
 10492  		v.AddArg2(ptr, mem)
 10493  		return true
 10494  	}
 10495  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 10496  	// cond: is32Bit(c)
 10497  	// result: (MOVHload [int32(c)] ptr mem)
 10498  	for {
 10499  		if v_0.Op != OpARM64MOVDconst {
 10500  			break
 10501  		}
 10502  		c := auxIntToInt64(v_0.AuxInt)
 10503  		ptr := v_1
 10504  		mem := v_2
 10505  		if !(is32Bit(c)) {
 10506  			break
 10507  		}
 10508  		v.reset(OpARM64MOVHload)
 10509  		v.AuxInt = int32ToAuxInt(int32(c))
 10510  		v.AddArg2(ptr, mem)
 10511  		return true
 10512  	}
 10513  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 10514  	// result: (MOVHloadidx2 ptr idx mem)
 10515  	for {
 10516  		ptr := v_0
 10517  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10518  			break
 10519  		}
 10520  		idx := v_1.Args[0]
 10521  		mem := v_2
 10522  		v.reset(OpARM64MOVHloadidx2)
 10523  		v.AddArg3(ptr, idx, mem)
 10524  		return true
 10525  	}
 10526  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 10527  	// result: (MOVHloadidx2 ptr idx mem)
 10528  	for {
 10529  		ptr := v_0
 10530  		if v_1.Op != OpARM64ADD {
 10531  			break
 10532  		}
 10533  		idx := v_1.Args[1]
 10534  		if idx != v_1.Args[0] {
 10535  			break
 10536  		}
 10537  		mem := v_2
 10538  		v.reset(OpARM64MOVHloadidx2)
 10539  		v.AddArg3(ptr, idx, mem)
 10540  		return true
 10541  	}
 10542  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 10543  	// result: (MOVHloadidx2 ptr idx mem)
 10544  	for {
 10545  		if v_0.Op != OpARM64ADD {
 10546  			break
 10547  		}
 10548  		idx := v_0.Args[1]
 10549  		if idx != v_0.Args[0] {
 10550  			break
 10551  		}
 10552  		ptr := v_1
 10553  		mem := v_2
 10554  		v.reset(OpARM64MOVHloadidx2)
 10555  		v.AddArg3(ptr, idx, mem)
 10556  		return true
 10557  	}
 10558  	return false
 10559  }
 10560  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 10561  	v_2 := v.Args[2]
 10562  	v_1 := v.Args[1]
 10563  	v_0 := v.Args[0]
 10564  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 10565  	// cond: is32Bit(c<<1)
 10566  	// result: (MOVHload [int32(c)<<1] ptr mem)
 10567  	for {
 10568  		ptr := v_0
 10569  		if v_1.Op != OpARM64MOVDconst {
 10570  			break
 10571  		}
 10572  		c := auxIntToInt64(v_1.AuxInt)
 10573  		mem := v_2
 10574  		if !(is32Bit(c << 1)) {
 10575  			break
 10576  		}
 10577  		v.reset(OpARM64MOVHload)
 10578  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10579  		v.AddArg2(ptr, mem)
 10580  		return true
 10581  	}
 10582  	return false
 10583  }
 10584  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 10585  	v_0 := v.Args[0]
 10586  	// match: (MOVHreg (MOVDconst [c]))
 10587  	// result: (MOVDconst [int64(int16(c))])
 10588  	for {
 10589  		if v_0.Op != OpARM64MOVDconst {
 10590  			break
 10591  		}
 10592  		c := auxIntToInt64(v_0.AuxInt)
 10593  		v.reset(OpARM64MOVDconst)
 10594  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 10595  		return true
 10596  	}
 10597  	// match: (MOVHreg x)
 10598  	// cond: v.Type.Size() <= 2
 10599  	// result: x
 10600  	for {
 10601  		x := v_0
 10602  		if !(v.Type.Size() <= 2) {
 10603  			break
 10604  		}
 10605  		v.copyOf(x)
 10606  		return true
 10607  	}
 10608  	// match: (MOVHreg <t> (ANDconst x [c]))
 10609  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 10610  	// result: (ANDconst <t> x [c])
 10611  	for {
 10612  		t := v.Type
 10613  		if v_0.Op != OpARM64ANDconst {
 10614  			break
 10615  		}
 10616  		c := auxIntToInt64(v_0.AuxInt)
 10617  		x := v_0.Args[0]
 10618  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 10619  			break
 10620  		}
 10621  		v.reset(OpARM64ANDconst)
 10622  		v.Type = t
 10623  		v.AuxInt = int64ToAuxInt(c)
 10624  		v.AddArg(x)
 10625  		return true
 10626  	}
 10627  	// match: (MOVHreg (SLLconst [lc] x))
 10628  	// cond: lc < 16
 10629  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 10630  	for {
 10631  		if v_0.Op != OpARM64SLLconst {
 10632  			break
 10633  		}
 10634  		lc := auxIntToInt64(v_0.AuxInt)
 10635  		x := v_0.Args[0]
 10636  		if !(lc < 16) {
 10637  			break
 10638  		}
 10639  		v.reset(OpARM64SBFIZ)
 10640  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 10641  		v.AddArg(x)
 10642  		return true
 10643  	}
 10644  	// match: (MOVHreg (SBFX [bfc] x))
 10645  	// cond: bfc.width() <= 16
 10646  	// result: (SBFX [bfc] x)
 10647  	for {
 10648  		if v_0.Op != OpARM64SBFX {
 10649  			break
 10650  		}
 10651  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10652  		x := v_0.Args[0]
 10653  		if !(bfc.width() <= 16) {
 10654  			break
 10655  		}
 10656  		v.reset(OpARM64SBFX)
 10657  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10658  		v.AddArg(x)
 10659  		return true
 10660  	}
 10661  	return false
 10662  }
 10663  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 10664  	v_2 := v.Args[2]
 10665  	v_1 := v.Args[1]
 10666  	v_0 := v.Args[0]
 10667  	b := v.Block
 10668  	config := b.Func.Config
 10669  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10670  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10671  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 10672  	for {
 10673  		off1 := auxIntToInt32(v.AuxInt)
 10674  		sym := auxToSym(v.Aux)
 10675  		if v_0.Op != OpARM64ADDconst {
 10676  			break
 10677  		}
 10678  		off2 := auxIntToInt64(v_0.AuxInt)
 10679  		ptr := v_0.Args[0]
 10680  		val := v_1
 10681  		mem := v_2
 10682  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10683  			break
 10684  		}
 10685  		v.reset(OpARM64MOVHstore)
 10686  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10687  		v.Aux = symToAux(sym)
 10688  		v.AddArg3(ptr, val, mem)
 10689  		return true
 10690  	}
 10691  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 10692  	// cond: off == 0 && sym == nil
 10693  	// result: (MOVHstoreidx ptr idx val mem)
 10694  	for {
 10695  		off := auxIntToInt32(v.AuxInt)
 10696  		sym := auxToSym(v.Aux)
 10697  		if v_0.Op != OpARM64ADD {
 10698  			break
 10699  		}
 10700  		idx := v_0.Args[1]
 10701  		ptr := v_0.Args[0]
 10702  		val := v_1
 10703  		mem := v_2
 10704  		if !(off == 0 && sym == nil) {
 10705  			break
 10706  		}
 10707  		v.reset(OpARM64MOVHstoreidx)
 10708  		v.AddArg4(ptr, idx, val, mem)
 10709  		return true
 10710  	}
 10711  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 10712  	// cond: off == 0 && sym == nil
 10713  	// result: (MOVHstoreidx2 ptr idx val mem)
 10714  	for {
 10715  		off := auxIntToInt32(v.AuxInt)
 10716  		sym := auxToSym(v.Aux)
 10717  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10718  			break
 10719  		}
 10720  		idx := v_0.Args[1]
 10721  		ptr := v_0.Args[0]
 10722  		val := v_1
 10723  		mem := v_2
 10724  		if !(off == 0 && sym == nil) {
 10725  			break
 10726  		}
 10727  		v.reset(OpARM64MOVHstoreidx2)
 10728  		v.AddArg4(ptr, idx, val, mem)
 10729  		return true
 10730  	}
 10731  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10732  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10733  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10734  	for {
 10735  		off1 := auxIntToInt32(v.AuxInt)
 10736  		sym1 := auxToSym(v.Aux)
 10737  		if v_0.Op != OpARM64MOVDaddr {
 10738  			break
 10739  		}
 10740  		off2 := auxIntToInt32(v_0.AuxInt)
 10741  		sym2 := auxToSym(v_0.Aux)
 10742  		ptr := v_0.Args[0]
 10743  		val := v_1
 10744  		mem := v_2
 10745  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10746  			break
 10747  		}
 10748  		v.reset(OpARM64MOVHstore)
 10749  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10750  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10751  		v.AddArg3(ptr, val, mem)
 10752  		return true
 10753  	}
 10754  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10755  	// result: (MOVHstore [off] {sym} ptr x mem)
 10756  	for {
 10757  		off := auxIntToInt32(v.AuxInt)
 10758  		sym := auxToSym(v.Aux)
 10759  		ptr := v_0
 10760  		if v_1.Op != OpARM64MOVHreg {
 10761  			break
 10762  		}
 10763  		x := v_1.Args[0]
 10764  		mem := v_2
 10765  		v.reset(OpARM64MOVHstore)
 10766  		v.AuxInt = int32ToAuxInt(off)
 10767  		v.Aux = symToAux(sym)
 10768  		v.AddArg3(ptr, x, mem)
 10769  		return true
 10770  	}
 10771  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 10772  	// result: (MOVHstore [off] {sym} ptr x mem)
 10773  	for {
 10774  		off := auxIntToInt32(v.AuxInt)
 10775  		sym := auxToSym(v.Aux)
 10776  		ptr := v_0
 10777  		if v_1.Op != OpARM64MOVHUreg {
 10778  			break
 10779  		}
 10780  		x := v_1.Args[0]
 10781  		mem := v_2
 10782  		v.reset(OpARM64MOVHstore)
 10783  		v.AuxInt = int32ToAuxInt(off)
 10784  		v.Aux = symToAux(sym)
 10785  		v.AddArg3(ptr, x, mem)
 10786  		return true
 10787  	}
 10788  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 10789  	// result: (MOVHstore [off] {sym} ptr x mem)
 10790  	for {
 10791  		off := auxIntToInt32(v.AuxInt)
 10792  		sym := auxToSym(v.Aux)
 10793  		ptr := v_0
 10794  		if v_1.Op != OpARM64MOVWreg {
 10795  			break
 10796  		}
 10797  		x := v_1.Args[0]
 10798  		mem := v_2
 10799  		v.reset(OpARM64MOVHstore)
 10800  		v.AuxInt = int32ToAuxInt(off)
 10801  		v.Aux = symToAux(sym)
 10802  		v.AddArg3(ptr, x, mem)
 10803  		return true
 10804  	}
 10805  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 10806  	// result: (MOVHstore [off] {sym} ptr x mem)
 10807  	for {
 10808  		off := auxIntToInt32(v.AuxInt)
 10809  		sym := auxToSym(v.Aux)
 10810  		ptr := v_0
 10811  		if v_1.Op != OpARM64MOVWUreg {
 10812  			break
 10813  		}
 10814  		x := v_1.Args[0]
 10815  		mem := v_2
 10816  		v.reset(OpARM64MOVHstore)
 10817  		v.AuxInt = int32ToAuxInt(off)
 10818  		v.Aux = symToAux(sym)
 10819  		v.AddArg3(ptr, x, mem)
 10820  		return true
 10821  	}
 10822  	return false
 10823  }
 10824  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 10825  	v_3 := v.Args[3]
 10826  	v_2 := v.Args[2]
 10827  	v_1 := v.Args[1]
 10828  	v_0 := v.Args[0]
 10829  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10830  	// cond: is32Bit(c)
 10831  	// result: (MOVHstore [int32(c)] ptr val mem)
 10832  	for {
 10833  		ptr := v_0
 10834  		if v_1.Op != OpARM64MOVDconst {
 10835  			break
 10836  		}
 10837  		c := auxIntToInt64(v_1.AuxInt)
 10838  		val := v_2
 10839  		mem := v_3
 10840  		if !(is32Bit(c)) {
 10841  			break
 10842  		}
 10843  		v.reset(OpARM64MOVHstore)
 10844  		v.AuxInt = int32ToAuxInt(int32(c))
 10845  		v.AddArg3(ptr, val, mem)
 10846  		return true
 10847  	}
 10848  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 10849  	// cond: is32Bit(c)
 10850  	// result: (MOVHstore [int32(c)] idx val mem)
 10851  	for {
 10852  		if v_0.Op != OpARM64MOVDconst {
 10853  			break
 10854  		}
 10855  		c := auxIntToInt64(v_0.AuxInt)
 10856  		idx := v_1
 10857  		val := v_2
 10858  		mem := v_3
 10859  		if !(is32Bit(c)) {
 10860  			break
 10861  		}
 10862  		v.reset(OpARM64MOVHstore)
 10863  		v.AuxInt = int32ToAuxInt(int32(c))
 10864  		v.AddArg3(idx, val, mem)
 10865  		return true
 10866  	}
 10867  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 10868  	// result: (MOVHstoreidx2 ptr idx val mem)
 10869  	for {
 10870  		ptr := v_0
 10871  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10872  			break
 10873  		}
 10874  		idx := v_1.Args[0]
 10875  		val := v_2
 10876  		mem := v_3
 10877  		v.reset(OpARM64MOVHstoreidx2)
 10878  		v.AddArg4(ptr, idx, val, mem)
 10879  		return true
 10880  	}
 10881  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 10882  	// result: (MOVHstoreidx2 ptr idx val mem)
 10883  	for {
 10884  		ptr := v_0
 10885  		if v_1.Op != OpARM64ADD {
 10886  			break
 10887  		}
 10888  		idx := v_1.Args[1]
 10889  		if idx != v_1.Args[0] {
 10890  			break
 10891  		}
 10892  		val := v_2
 10893  		mem := v_3
 10894  		v.reset(OpARM64MOVHstoreidx2)
 10895  		v.AddArg4(ptr, idx, val, mem)
 10896  		return true
 10897  	}
 10898  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 10899  	// result: (MOVHstoreidx2 ptr idx val mem)
 10900  	for {
 10901  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 10902  			break
 10903  		}
 10904  		idx := v_0.Args[0]
 10905  		ptr := v_1
 10906  		val := v_2
 10907  		mem := v_3
 10908  		v.reset(OpARM64MOVHstoreidx2)
 10909  		v.AddArg4(ptr, idx, val, mem)
 10910  		return true
 10911  	}
 10912  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 10913  	// result: (MOVHstoreidx2 ptr idx val mem)
 10914  	for {
 10915  		if v_0.Op != OpARM64ADD {
 10916  			break
 10917  		}
 10918  		idx := v_0.Args[1]
 10919  		if idx != v_0.Args[0] {
 10920  			break
 10921  		}
 10922  		ptr := v_1
 10923  		val := v_2
 10924  		mem := v_3
 10925  		v.reset(OpARM64MOVHstoreidx2)
 10926  		v.AddArg4(ptr, idx, val, mem)
 10927  		return true
 10928  	}
 10929  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 10930  	// result: (MOVHstoreidx ptr idx x mem)
 10931  	for {
 10932  		ptr := v_0
 10933  		idx := v_1
 10934  		if v_2.Op != OpARM64MOVHreg {
 10935  			break
 10936  		}
 10937  		x := v_2.Args[0]
 10938  		mem := v_3
 10939  		v.reset(OpARM64MOVHstoreidx)
 10940  		v.AddArg4(ptr, idx, x, mem)
 10941  		return true
 10942  	}
 10943  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 10944  	// result: (MOVHstoreidx ptr idx x mem)
 10945  	for {
 10946  		ptr := v_0
 10947  		idx := v_1
 10948  		if v_2.Op != OpARM64MOVHUreg {
 10949  			break
 10950  		}
 10951  		x := v_2.Args[0]
 10952  		mem := v_3
 10953  		v.reset(OpARM64MOVHstoreidx)
 10954  		v.AddArg4(ptr, idx, x, mem)
 10955  		return true
 10956  	}
 10957  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 10958  	// result: (MOVHstoreidx ptr idx x mem)
 10959  	for {
 10960  		ptr := v_0
 10961  		idx := v_1
 10962  		if v_2.Op != OpARM64MOVWreg {
 10963  			break
 10964  		}
 10965  		x := v_2.Args[0]
 10966  		mem := v_3
 10967  		v.reset(OpARM64MOVHstoreidx)
 10968  		v.AddArg4(ptr, idx, x, mem)
 10969  		return true
 10970  	}
 10971  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 10972  	// result: (MOVHstoreidx ptr idx x mem)
 10973  	for {
 10974  		ptr := v_0
 10975  		idx := v_1
 10976  		if v_2.Op != OpARM64MOVWUreg {
 10977  			break
 10978  		}
 10979  		x := v_2.Args[0]
 10980  		mem := v_3
 10981  		v.reset(OpARM64MOVHstoreidx)
 10982  		v.AddArg4(ptr, idx, x, mem)
 10983  		return true
 10984  	}
 10985  	return false
 10986  }
 10987  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 10988  	v_3 := v.Args[3]
 10989  	v_2 := v.Args[2]
 10990  	v_1 := v.Args[1]
 10991  	v_0 := v.Args[0]
 10992  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 10993  	// cond: is32Bit(c<<1)
 10994  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 10995  	for {
 10996  		ptr := v_0
 10997  		if v_1.Op != OpARM64MOVDconst {
 10998  			break
 10999  		}
 11000  		c := auxIntToInt64(v_1.AuxInt)
 11001  		val := v_2
 11002  		mem := v_3
 11003  		if !(is32Bit(c << 1)) {
 11004  			break
 11005  		}
 11006  		v.reset(OpARM64MOVHstore)
 11007  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11008  		v.AddArg3(ptr, val, mem)
 11009  		return true
 11010  	}
 11011  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 11012  	// result: (MOVHstoreidx2 ptr idx x mem)
 11013  	for {
 11014  		ptr := v_0
 11015  		idx := v_1
 11016  		if v_2.Op != OpARM64MOVHreg {
 11017  			break
 11018  		}
 11019  		x := v_2.Args[0]
 11020  		mem := v_3
 11021  		v.reset(OpARM64MOVHstoreidx2)
 11022  		v.AddArg4(ptr, idx, x, mem)
 11023  		return true
 11024  	}
 11025  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 11026  	// result: (MOVHstoreidx2 ptr idx x mem)
 11027  	for {
 11028  		ptr := v_0
 11029  		idx := v_1
 11030  		if v_2.Op != OpARM64MOVHUreg {
 11031  			break
 11032  		}
 11033  		x := v_2.Args[0]
 11034  		mem := v_3
 11035  		v.reset(OpARM64MOVHstoreidx2)
 11036  		v.AddArg4(ptr, idx, x, mem)
 11037  		return true
 11038  	}
 11039  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 11040  	// result: (MOVHstoreidx2 ptr idx x mem)
 11041  	for {
 11042  		ptr := v_0
 11043  		idx := v_1
 11044  		if v_2.Op != OpARM64MOVWreg {
 11045  			break
 11046  		}
 11047  		x := v_2.Args[0]
 11048  		mem := v_3
 11049  		v.reset(OpARM64MOVHstoreidx2)
 11050  		v.AddArg4(ptr, idx, x, mem)
 11051  		return true
 11052  	}
 11053  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 11054  	// result: (MOVHstoreidx2 ptr idx x mem)
 11055  	for {
 11056  		ptr := v_0
 11057  		idx := v_1
 11058  		if v_2.Op != OpARM64MOVWUreg {
 11059  			break
 11060  		}
 11061  		x := v_2.Args[0]
 11062  		mem := v_3
 11063  		v.reset(OpARM64MOVHstoreidx2)
 11064  		v.AddArg4(ptr, idx, x, mem)
 11065  		return true
 11066  	}
 11067  	return false
 11068  }
 11069  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 11070  	v_1 := v.Args[1]
 11071  	v_0 := v.Args[0]
 11072  	b := v.Block
 11073  	config := b.Func.Config
 11074  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 11075  	// result: (FMOVSfpgp val)
 11076  	for {
 11077  		off := auxIntToInt32(v.AuxInt)
 11078  		sym := auxToSym(v.Aux)
 11079  		ptr := v_0
 11080  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 11081  			break
 11082  		}
 11083  		val := v_1.Args[1]
 11084  		if ptr != v_1.Args[0] {
 11085  			break
 11086  		}
 11087  		v.reset(OpARM64FMOVSfpgp)
 11088  		v.AddArg(val)
 11089  		return true
 11090  	}
 11091  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 11092  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11093  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 11094  	for {
 11095  		off1 := auxIntToInt32(v.AuxInt)
 11096  		sym := auxToSym(v.Aux)
 11097  		if v_0.Op != OpARM64ADDconst {
 11098  			break
 11099  		}
 11100  		off2 := auxIntToInt64(v_0.AuxInt)
 11101  		ptr := v_0.Args[0]
 11102  		mem := v_1
 11103  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11104  			break
 11105  		}
 11106  		v.reset(OpARM64MOVWUload)
 11107  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11108  		v.Aux = symToAux(sym)
 11109  		v.AddArg2(ptr, mem)
 11110  		return true
 11111  	}
 11112  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 11113  	// cond: off == 0 && sym == nil
 11114  	// result: (MOVWUloadidx ptr idx mem)
 11115  	for {
 11116  		off := auxIntToInt32(v.AuxInt)
 11117  		sym := auxToSym(v.Aux)
 11118  		if v_0.Op != OpARM64ADD {
 11119  			break
 11120  		}
 11121  		idx := v_0.Args[1]
 11122  		ptr := v_0.Args[0]
 11123  		mem := v_1
 11124  		if !(off == 0 && sym == nil) {
 11125  			break
 11126  		}
 11127  		v.reset(OpARM64MOVWUloadidx)
 11128  		v.AddArg3(ptr, idx, mem)
 11129  		return true
 11130  	}
 11131  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 11132  	// cond: off == 0 && sym == nil
 11133  	// result: (MOVWUloadidx4 ptr idx mem)
 11134  	for {
 11135  		off := auxIntToInt32(v.AuxInt)
 11136  		sym := auxToSym(v.Aux)
 11137  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11138  			break
 11139  		}
 11140  		idx := v_0.Args[1]
 11141  		ptr := v_0.Args[0]
 11142  		mem := v_1
 11143  		if !(off == 0 && sym == nil) {
 11144  			break
 11145  		}
 11146  		v.reset(OpARM64MOVWUloadidx4)
 11147  		v.AddArg3(ptr, idx, mem)
 11148  		return true
 11149  	}
 11150  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11151  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11152  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11153  	for {
 11154  		off1 := auxIntToInt32(v.AuxInt)
 11155  		sym1 := auxToSym(v.Aux)
 11156  		if v_0.Op != OpARM64MOVDaddr {
 11157  			break
 11158  		}
 11159  		off2 := auxIntToInt32(v_0.AuxInt)
 11160  		sym2 := auxToSym(v_0.Aux)
 11161  		ptr := v_0.Args[0]
 11162  		mem := v_1
 11163  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11164  			break
 11165  		}
 11166  		v.reset(OpARM64MOVWUload)
 11167  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11168  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11169  		v.AddArg2(ptr, mem)
 11170  		return true
 11171  	}
 11172  	// match: (MOVWUload [off] {sym} (SB) _)
 11173  	// cond: symIsRO(sym)
 11174  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 11175  	for {
 11176  		off := auxIntToInt32(v.AuxInt)
 11177  		sym := auxToSym(v.Aux)
 11178  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11179  			break
 11180  		}
 11181  		v.reset(OpARM64MOVDconst)
 11182  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 11183  		return true
 11184  	}
 11185  	return false
 11186  }
 11187  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 11188  	v_2 := v.Args[2]
 11189  	v_1 := v.Args[1]
 11190  	v_0 := v.Args[0]
 11191  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 11192  	// cond: is32Bit(c)
 11193  	// result: (MOVWUload [int32(c)] ptr mem)
 11194  	for {
 11195  		ptr := v_0
 11196  		if v_1.Op != OpARM64MOVDconst {
 11197  			break
 11198  		}
 11199  		c := auxIntToInt64(v_1.AuxInt)
 11200  		mem := v_2
 11201  		if !(is32Bit(c)) {
 11202  			break
 11203  		}
 11204  		v.reset(OpARM64MOVWUload)
 11205  		v.AuxInt = int32ToAuxInt(int32(c))
 11206  		v.AddArg2(ptr, mem)
 11207  		return true
 11208  	}
 11209  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 11210  	// cond: is32Bit(c)
 11211  	// result: (MOVWUload [int32(c)] ptr mem)
 11212  	for {
 11213  		if v_0.Op != OpARM64MOVDconst {
 11214  			break
 11215  		}
 11216  		c := auxIntToInt64(v_0.AuxInt)
 11217  		ptr := v_1
 11218  		mem := v_2
 11219  		if !(is32Bit(c)) {
 11220  			break
 11221  		}
 11222  		v.reset(OpARM64MOVWUload)
 11223  		v.AuxInt = int32ToAuxInt(int32(c))
 11224  		v.AddArg2(ptr, mem)
 11225  		return true
 11226  	}
 11227  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 11228  	// result: (MOVWUloadidx4 ptr idx mem)
 11229  	for {
 11230  		ptr := v_0
 11231  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11232  			break
 11233  		}
 11234  		idx := v_1.Args[0]
 11235  		mem := v_2
 11236  		v.reset(OpARM64MOVWUloadidx4)
 11237  		v.AddArg3(ptr, idx, mem)
 11238  		return true
 11239  	}
 11240  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 11241  	// result: (MOVWUloadidx4 ptr idx mem)
 11242  	for {
 11243  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11244  			break
 11245  		}
 11246  		idx := v_0.Args[0]
 11247  		ptr := v_1
 11248  		mem := v_2
 11249  		v.reset(OpARM64MOVWUloadidx4)
 11250  		v.AddArg3(ptr, idx, mem)
 11251  		return true
 11252  	}
 11253  	return false
 11254  }
 11255  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 11256  	v_2 := v.Args[2]
 11257  	v_1 := v.Args[1]
 11258  	v_0 := v.Args[0]
 11259  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 11260  	// cond: is32Bit(c<<2)
 11261  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 11262  	for {
 11263  		ptr := v_0
 11264  		if v_1.Op != OpARM64MOVDconst {
 11265  			break
 11266  		}
 11267  		c := auxIntToInt64(v_1.AuxInt)
 11268  		mem := v_2
 11269  		if !(is32Bit(c << 2)) {
 11270  			break
 11271  		}
 11272  		v.reset(OpARM64MOVWUload)
 11273  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11274  		v.AddArg2(ptr, mem)
 11275  		return true
 11276  	}
 11277  	return false
 11278  }
 11279  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 11280  	v_0 := v.Args[0]
 11281  	// match: (MOVWUreg (ANDconst [c] x))
 11282  	// result: (ANDconst [c&(1<<32-1)] x)
 11283  	for {
 11284  		if v_0.Op != OpARM64ANDconst {
 11285  			break
 11286  		}
 11287  		c := auxIntToInt64(v_0.AuxInt)
 11288  		x := v_0.Args[0]
 11289  		v.reset(OpARM64ANDconst)
 11290  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 11291  		v.AddArg(x)
 11292  		return true
 11293  	}
 11294  	// match: (MOVWUreg (MOVDconst [c]))
 11295  	// result: (MOVDconst [int64(uint32(c))])
 11296  	for {
 11297  		if v_0.Op != OpARM64MOVDconst {
 11298  			break
 11299  		}
 11300  		c := auxIntToInt64(v_0.AuxInt)
 11301  		v.reset(OpARM64MOVDconst)
 11302  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 11303  		return true
 11304  	}
 11305  	// match: (MOVWUreg x)
 11306  	// cond: v.Type.Size() <= 4
 11307  	// result: x
 11308  	for {
 11309  		x := v_0
 11310  		if !(v.Type.Size() <= 4) {
 11311  			break
 11312  		}
 11313  		v.copyOf(x)
 11314  		return true
 11315  	}
 11316  	// match: (MOVWUreg (SLLconst [lc] x))
 11317  	// cond: lc >= 32
 11318  	// result: (MOVDconst [0])
 11319  	for {
 11320  		if v_0.Op != OpARM64SLLconst {
 11321  			break
 11322  		}
 11323  		lc := auxIntToInt64(v_0.AuxInt)
 11324  		if !(lc >= 32) {
 11325  			break
 11326  		}
 11327  		v.reset(OpARM64MOVDconst)
 11328  		v.AuxInt = int64ToAuxInt(0)
 11329  		return true
 11330  	}
 11331  	// match: (MOVWUreg (SLLconst [lc] x))
 11332  	// cond: lc < 32
 11333  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 11334  	for {
 11335  		if v_0.Op != OpARM64SLLconst {
 11336  			break
 11337  		}
 11338  		lc := auxIntToInt64(v_0.AuxInt)
 11339  		x := v_0.Args[0]
 11340  		if !(lc < 32) {
 11341  			break
 11342  		}
 11343  		v.reset(OpARM64UBFIZ)
 11344  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 11345  		v.AddArg(x)
 11346  		return true
 11347  	}
 11348  	// match: (MOVWUreg (SRLconst [rc] x))
 11349  	// cond: rc < 32
 11350  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 11351  	for {
 11352  		if v_0.Op != OpARM64SRLconst {
 11353  			break
 11354  		}
 11355  		rc := auxIntToInt64(v_0.AuxInt)
 11356  		x := v_0.Args[0]
 11357  		if !(rc < 32) {
 11358  			break
 11359  		}
 11360  		v.reset(OpARM64UBFX)
 11361  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 11362  		v.AddArg(x)
 11363  		return true
 11364  	}
 11365  	// match: (MOVWUreg (UBFX [bfc] x))
 11366  	// cond: bfc.width() <= 32
 11367  	// result: (UBFX [bfc] x)
 11368  	for {
 11369  		if v_0.Op != OpARM64UBFX {
 11370  			break
 11371  		}
 11372  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11373  		x := v_0.Args[0]
 11374  		if !(bfc.width() <= 32) {
 11375  			break
 11376  		}
 11377  		v.reset(OpARM64UBFX)
 11378  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11379  		v.AddArg(x)
 11380  		return true
 11381  	}
 11382  	return false
 11383  }
 11384  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 11385  	v_1 := v.Args[1]
 11386  	v_0 := v.Args[0]
 11387  	b := v.Block
 11388  	config := b.Func.Config
 11389  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 11390  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11391  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 11392  	for {
 11393  		off1 := auxIntToInt32(v.AuxInt)
 11394  		sym := auxToSym(v.Aux)
 11395  		if v_0.Op != OpARM64ADDconst {
 11396  			break
 11397  		}
 11398  		off2 := auxIntToInt64(v_0.AuxInt)
 11399  		ptr := v_0.Args[0]
 11400  		mem := v_1
 11401  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11402  			break
 11403  		}
 11404  		v.reset(OpARM64MOVWload)
 11405  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11406  		v.Aux = symToAux(sym)
 11407  		v.AddArg2(ptr, mem)
 11408  		return true
 11409  	}
 11410  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 11411  	// cond: off == 0 && sym == nil
 11412  	// result: (MOVWloadidx ptr idx mem)
 11413  	for {
 11414  		off := auxIntToInt32(v.AuxInt)
 11415  		sym := auxToSym(v.Aux)
 11416  		if v_0.Op != OpARM64ADD {
 11417  			break
 11418  		}
 11419  		idx := v_0.Args[1]
 11420  		ptr := v_0.Args[0]
 11421  		mem := v_1
 11422  		if !(off == 0 && sym == nil) {
 11423  			break
 11424  		}
 11425  		v.reset(OpARM64MOVWloadidx)
 11426  		v.AddArg3(ptr, idx, mem)
 11427  		return true
 11428  	}
 11429  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 11430  	// cond: off == 0 && sym == nil
 11431  	// result: (MOVWloadidx4 ptr idx mem)
 11432  	for {
 11433  		off := auxIntToInt32(v.AuxInt)
 11434  		sym := auxToSym(v.Aux)
 11435  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11436  			break
 11437  		}
 11438  		idx := v_0.Args[1]
 11439  		ptr := v_0.Args[0]
 11440  		mem := v_1
 11441  		if !(off == 0 && sym == nil) {
 11442  			break
 11443  		}
 11444  		v.reset(OpARM64MOVWloadidx4)
 11445  		v.AddArg3(ptr, idx, mem)
 11446  		return true
 11447  	}
 11448  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11449  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11450  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11451  	for {
 11452  		off1 := auxIntToInt32(v.AuxInt)
 11453  		sym1 := auxToSym(v.Aux)
 11454  		if v_0.Op != OpARM64MOVDaddr {
 11455  			break
 11456  		}
 11457  		off2 := auxIntToInt32(v_0.AuxInt)
 11458  		sym2 := auxToSym(v_0.Aux)
 11459  		ptr := v_0.Args[0]
 11460  		mem := v_1
 11461  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11462  			break
 11463  		}
 11464  		v.reset(OpARM64MOVWload)
 11465  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11466  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11467  		v.AddArg2(ptr, mem)
 11468  		return true
 11469  	}
 11470  	// match: (MOVWload [off] {sym} (SB) _)
 11471  	// cond: symIsRO(sym)
 11472  	// result: (MOVDconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 11473  	for {
 11474  		off := auxIntToInt32(v.AuxInt)
 11475  		sym := auxToSym(v.Aux)
 11476  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11477  			break
 11478  		}
 11479  		v.reset(OpARM64MOVDconst)
 11480  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 11481  		return true
 11482  	}
 11483  	return false
 11484  }
 11485  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 11486  	v_2 := v.Args[2]
 11487  	v_1 := v.Args[1]
 11488  	v_0 := v.Args[0]
 11489  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 11490  	// cond: is32Bit(c)
 11491  	// result: (MOVWload [int32(c)] ptr mem)
 11492  	for {
 11493  		ptr := v_0
 11494  		if v_1.Op != OpARM64MOVDconst {
 11495  			break
 11496  		}
 11497  		c := auxIntToInt64(v_1.AuxInt)
 11498  		mem := v_2
 11499  		if !(is32Bit(c)) {
 11500  			break
 11501  		}
 11502  		v.reset(OpARM64MOVWload)
 11503  		v.AuxInt = int32ToAuxInt(int32(c))
 11504  		v.AddArg2(ptr, mem)
 11505  		return true
 11506  	}
 11507  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 11508  	// cond: is32Bit(c)
 11509  	// result: (MOVWload [int32(c)] ptr mem)
 11510  	for {
 11511  		if v_0.Op != OpARM64MOVDconst {
 11512  			break
 11513  		}
 11514  		c := auxIntToInt64(v_0.AuxInt)
 11515  		ptr := v_1
 11516  		mem := v_2
 11517  		if !(is32Bit(c)) {
 11518  			break
 11519  		}
 11520  		v.reset(OpARM64MOVWload)
 11521  		v.AuxInt = int32ToAuxInt(int32(c))
 11522  		v.AddArg2(ptr, mem)
 11523  		return true
 11524  	}
 11525  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 11526  	// result: (MOVWloadidx4 ptr idx mem)
 11527  	for {
 11528  		ptr := v_0
 11529  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11530  			break
 11531  		}
 11532  		idx := v_1.Args[0]
 11533  		mem := v_2
 11534  		v.reset(OpARM64MOVWloadidx4)
 11535  		v.AddArg3(ptr, idx, mem)
 11536  		return true
 11537  	}
 11538  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 11539  	// result: (MOVWloadidx4 ptr idx mem)
 11540  	for {
 11541  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11542  			break
 11543  		}
 11544  		idx := v_0.Args[0]
 11545  		ptr := v_1
 11546  		mem := v_2
 11547  		v.reset(OpARM64MOVWloadidx4)
 11548  		v.AddArg3(ptr, idx, mem)
 11549  		return true
 11550  	}
 11551  	return false
 11552  }
 11553  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 11554  	v_2 := v.Args[2]
 11555  	v_1 := v.Args[1]
 11556  	v_0 := v.Args[0]
 11557  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 11558  	// cond: is32Bit(c<<2)
 11559  	// result: (MOVWload [int32(c)<<2] ptr mem)
 11560  	for {
 11561  		ptr := v_0
 11562  		if v_1.Op != OpARM64MOVDconst {
 11563  			break
 11564  		}
 11565  		c := auxIntToInt64(v_1.AuxInt)
 11566  		mem := v_2
 11567  		if !(is32Bit(c << 2)) {
 11568  			break
 11569  		}
 11570  		v.reset(OpARM64MOVWload)
 11571  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11572  		v.AddArg2(ptr, mem)
 11573  		return true
 11574  	}
 11575  	return false
 11576  }
 11577  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 11578  	v_0 := v.Args[0]
 11579  	// match: (MOVWreg (MOVDconst [c]))
 11580  	// result: (MOVDconst [int64(int32(c))])
 11581  	for {
 11582  		if v_0.Op != OpARM64MOVDconst {
 11583  			break
 11584  		}
 11585  		c := auxIntToInt64(v_0.AuxInt)
 11586  		v.reset(OpARM64MOVDconst)
 11587  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 11588  		return true
 11589  	}
 11590  	// match: (MOVWreg x)
 11591  	// cond: v.Type.Size() <= 4
 11592  	// result: x
 11593  	for {
 11594  		x := v_0
 11595  		if !(v.Type.Size() <= 4) {
 11596  			break
 11597  		}
 11598  		v.copyOf(x)
 11599  		return true
 11600  	}
 11601  	// match: (MOVWreg <t> (ANDconst x [c]))
 11602  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 11603  	// result: (ANDconst <t> x [c])
 11604  	for {
 11605  		t := v.Type
 11606  		if v_0.Op != OpARM64ANDconst {
 11607  			break
 11608  		}
 11609  		c := auxIntToInt64(v_0.AuxInt)
 11610  		x := v_0.Args[0]
 11611  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 11612  			break
 11613  		}
 11614  		v.reset(OpARM64ANDconst)
 11615  		v.Type = t
 11616  		v.AuxInt = int64ToAuxInt(c)
 11617  		v.AddArg(x)
 11618  		return true
 11619  	}
 11620  	// match: (MOVWreg (SLLconst [lc] x))
 11621  	// cond: lc < 32
 11622  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 11623  	for {
 11624  		if v_0.Op != OpARM64SLLconst {
 11625  			break
 11626  		}
 11627  		lc := auxIntToInt64(v_0.AuxInt)
 11628  		x := v_0.Args[0]
 11629  		if !(lc < 32) {
 11630  			break
 11631  		}
 11632  		v.reset(OpARM64SBFIZ)
 11633  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 11634  		v.AddArg(x)
 11635  		return true
 11636  	}
 11637  	// match: (MOVWreg (SBFX [bfc] x))
 11638  	// cond: bfc.width() <= 32
 11639  	// result: (SBFX [bfc] x)
 11640  	for {
 11641  		if v_0.Op != OpARM64SBFX {
 11642  			break
 11643  		}
 11644  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11645  		x := v_0.Args[0]
 11646  		if !(bfc.width() <= 32) {
 11647  			break
 11648  		}
 11649  		v.reset(OpARM64SBFX)
 11650  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11651  		v.AddArg(x)
 11652  		return true
 11653  	}
 11654  	return false
 11655  }
 11656  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 11657  	v_2 := v.Args[2]
 11658  	v_1 := v.Args[1]
 11659  	v_0 := v.Args[0]
 11660  	b := v.Block
 11661  	config := b.Func.Config
 11662  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 11663  	// result: (FMOVSstore [off] {sym} ptr val mem)
 11664  	for {
 11665  		off := auxIntToInt32(v.AuxInt)
 11666  		sym := auxToSym(v.Aux)
 11667  		ptr := v_0
 11668  		if v_1.Op != OpARM64FMOVSfpgp {
 11669  			break
 11670  		}
 11671  		val := v_1.Args[0]
 11672  		mem := v_2
 11673  		v.reset(OpARM64FMOVSstore)
 11674  		v.AuxInt = int32ToAuxInt(off)
 11675  		v.Aux = symToAux(sym)
 11676  		v.AddArg3(ptr, val, mem)
 11677  		return true
 11678  	}
 11679  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11680  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11681  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 11682  	for {
 11683  		off1 := auxIntToInt32(v.AuxInt)
 11684  		sym := auxToSym(v.Aux)
 11685  		if v_0.Op != OpARM64ADDconst {
 11686  			break
 11687  		}
 11688  		off2 := auxIntToInt64(v_0.AuxInt)
 11689  		ptr := v_0.Args[0]
 11690  		val := v_1
 11691  		mem := v_2
 11692  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11693  			break
 11694  		}
 11695  		v.reset(OpARM64MOVWstore)
 11696  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11697  		v.Aux = symToAux(sym)
 11698  		v.AddArg3(ptr, val, mem)
 11699  		return true
 11700  	}
 11701  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 11702  	// cond: off == 0 && sym == nil
 11703  	// result: (MOVWstoreidx ptr idx val mem)
 11704  	for {
 11705  		off := auxIntToInt32(v.AuxInt)
 11706  		sym := auxToSym(v.Aux)
 11707  		if v_0.Op != OpARM64ADD {
 11708  			break
 11709  		}
 11710  		idx := v_0.Args[1]
 11711  		ptr := v_0.Args[0]
 11712  		val := v_1
 11713  		mem := v_2
 11714  		if !(off == 0 && sym == nil) {
 11715  			break
 11716  		}
 11717  		v.reset(OpARM64MOVWstoreidx)
 11718  		v.AddArg4(ptr, idx, val, mem)
 11719  		return true
 11720  	}
 11721  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 11722  	// cond: off == 0 && sym == nil
 11723  	// result: (MOVWstoreidx4 ptr idx val mem)
 11724  	for {
 11725  		off := auxIntToInt32(v.AuxInt)
 11726  		sym := auxToSym(v.Aux)
 11727  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11728  			break
 11729  		}
 11730  		idx := v_0.Args[1]
 11731  		ptr := v_0.Args[0]
 11732  		val := v_1
 11733  		mem := v_2
 11734  		if !(off == 0 && sym == nil) {
 11735  			break
 11736  		}
 11737  		v.reset(OpARM64MOVWstoreidx4)
 11738  		v.AddArg4(ptr, idx, val, mem)
 11739  		return true
 11740  	}
 11741  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11742  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11743  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11744  	for {
 11745  		off1 := auxIntToInt32(v.AuxInt)
 11746  		sym1 := auxToSym(v.Aux)
 11747  		if v_0.Op != OpARM64MOVDaddr {
 11748  			break
 11749  		}
 11750  		off2 := auxIntToInt32(v_0.AuxInt)
 11751  		sym2 := auxToSym(v_0.Aux)
 11752  		ptr := v_0.Args[0]
 11753  		val := v_1
 11754  		mem := v_2
 11755  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11756  			break
 11757  		}
 11758  		v.reset(OpARM64MOVWstore)
 11759  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11760  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11761  		v.AddArg3(ptr, val, mem)
 11762  		return true
 11763  	}
 11764  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 11765  	// result: (MOVWstore [off] {sym} ptr x mem)
 11766  	for {
 11767  		off := auxIntToInt32(v.AuxInt)
 11768  		sym := auxToSym(v.Aux)
 11769  		ptr := v_0
 11770  		if v_1.Op != OpARM64MOVWreg {
 11771  			break
 11772  		}
 11773  		x := v_1.Args[0]
 11774  		mem := v_2
 11775  		v.reset(OpARM64MOVWstore)
 11776  		v.AuxInt = int32ToAuxInt(off)
 11777  		v.Aux = symToAux(sym)
 11778  		v.AddArg3(ptr, x, mem)
 11779  		return true
 11780  	}
 11781  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 11782  	// result: (MOVWstore [off] {sym} ptr x mem)
 11783  	for {
 11784  		off := auxIntToInt32(v.AuxInt)
 11785  		sym := auxToSym(v.Aux)
 11786  		ptr := v_0
 11787  		if v_1.Op != OpARM64MOVWUreg {
 11788  			break
 11789  		}
 11790  		x := v_1.Args[0]
 11791  		mem := v_2
 11792  		v.reset(OpARM64MOVWstore)
 11793  		v.AuxInt = int32ToAuxInt(off)
 11794  		v.Aux = symToAux(sym)
 11795  		v.AddArg3(ptr, x, mem)
 11796  		return true
 11797  	}
 11798  	return false
 11799  }
 11800  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 11801  	v_3 := v.Args[3]
 11802  	v_2 := v.Args[2]
 11803  	v_1 := v.Args[1]
 11804  	v_0 := v.Args[0]
 11805  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 11806  	// cond: is32Bit(c)
 11807  	// result: (MOVWstore [int32(c)] ptr val mem)
 11808  	for {
 11809  		ptr := v_0
 11810  		if v_1.Op != OpARM64MOVDconst {
 11811  			break
 11812  		}
 11813  		c := auxIntToInt64(v_1.AuxInt)
 11814  		val := v_2
 11815  		mem := v_3
 11816  		if !(is32Bit(c)) {
 11817  			break
 11818  		}
 11819  		v.reset(OpARM64MOVWstore)
 11820  		v.AuxInt = int32ToAuxInt(int32(c))
 11821  		v.AddArg3(ptr, val, mem)
 11822  		return true
 11823  	}
 11824  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 11825  	// cond: is32Bit(c)
 11826  	// result: (MOVWstore [int32(c)] idx val mem)
 11827  	for {
 11828  		if v_0.Op != OpARM64MOVDconst {
 11829  			break
 11830  		}
 11831  		c := auxIntToInt64(v_0.AuxInt)
 11832  		idx := v_1
 11833  		val := v_2
 11834  		mem := v_3
 11835  		if !(is32Bit(c)) {
 11836  			break
 11837  		}
 11838  		v.reset(OpARM64MOVWstore)
 11839  		v.AuxInt = int32ToAuxInt(int32(c))
 11840  		v.AddArg3(idx, val, mem)
 11841  		return true
 11842  	}
 11843  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 11844  	// result: (MOVWstoreidx4 ptr idx val mem)
 11845  	for {
 11846  		ptr := v_0
 11847  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11848  			break
 11849  		}
 11850  		idx := v_1.Args[0]
 11851  		val := v_2
 11852  		mem := v_3
 11853  		v.reset(OpARM64MOVWstoreidx4)
 11854  		v.AddArg4(ptr, idx, val, mem)
 11855  		return true
 11856  	}
 11857  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 11858  	// result: (MOVWstoreidx4 ptr idx val mem)
 11859  	for {
 11860  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11861  			break
 11862  		}
 11863  		idx := v_0.Args[0]
 11864  		ptr := v_1
 11865  		val := v_2
 11866  		mem := v_3
 11867  		v.reset(OpARM64MOVWstoreidx4)
 11868  		v.AddArg4(ptr, idx, val, mem)
 11869  		return true
 11870  	}
 11871  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 11872  	// result: (MOVWstoreidx ptr idx x mem)
 11873  	for {
 11874  		ptr := v_0
 11875  		idx := v_1
 11876  		if v_2.Op != OpARM64MOVWreg {
 11877  			break
 11878  		}
 11879  		x := v_2.Args[0]
 11880  		mem := v_3
 11881  		v.reset(OpARM64MOVWstoreidx)
 11882  		v.AddArg4(ptr, idx, x, mem)
 11883  		return true
 11884  	}
 11885  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 11886  	// result: (MOVWstoreidx ptr idx x mem)
 11887  	for {
 11888  		ptr := v_0
 11889  		idx := v_1
 11890  		if v_2.Op != OpARM64MOVWUreg {
 11891  			break
 11892  		}
 11893  		x := v_2.Args[0]
 11894  		mem := v_3
 11895  		v.reset(OpARM64MOVWstoreidx)
 11896  		v.AddArg4(ptr, idx, x, mem)
 11897  		return true
 11898  	}
 11899  	return false
 11900  }
 11901  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 11902  	v_3 := v.Args[3]
 11903  	v_2 := v.Args[2]
 11904  	v_1 := v.Args[1]
 11905  	v_0 := v.Args[0]
 11906  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 11907  	// cond: is32Bit(c<<2)
 11908  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 11909  	for {
 11910  		ptr := v_0
 11911  		if v_1.Op != OpARM64MOVDconst {
 11912  			break
 11913  		}
 11914  		c := auxIntToInt64(v_1.AuxInt)
 11915  		val := v_2
 11916  		mem := v_3
 11917  		if !(is32Bit(c << 2)) {
 11918  			break
 11919  		}
 11920  		v.reset(OpARM64MOVWstore)
 11921  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11922  		v.AddArg3(ptr, val, mem)
 11923  		return true
 11924  	}
 11925  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 11926  	// result: (MOVWstoreidx4 ptr idx x mem)
 11927  	for {
 11928  		ptr := v_0
 11929  		idx := v_1
 11930  		if v_2.Op != OpARM64MOVWreg {
 11931  			break
 11932  		}
 11933  		x := v_2.Args[0]
 11934  		mem := v_3
 11935  		v.reset(OpARM64MOVWstoreidx4)
 11936  		v.AddArg4(ptr, idx, x, mem)
 11937  		return true
 11938  	}
 11939  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 11940  	// result: (MOVWstoreidx4 ptr idx x mem)
 11941  	for {
 11942  		ptr := v_0
 11943  		idx := v_1
 11944  		if v_2.Op != OpARM64MOVWUreg {
 11945  			break
 11946  		}
 11947  		x := v_2.Args[0]
 11948  		mem := v_3
 11949  		v.reset(OpARM64MOVWstoreidx4)
 11950  		v.AddArg4(ptr, idx, x, mem)
 11951  		return true
 11952  	}
 11953  	return false
 11954  }
 11955  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 11956  	v_2 := v.Args[2]
 11957  	v_1 := v.Args[1]
 11958  	v_0 := v.Args[0]
 11959  	b := v.Block
 11960  	// match: (MSUB a x (MOVDconst [-1]))
 11961  	// result: (ADD a x)
 11962  	for {
 11963  		a := v_0
 11964  		x := v_1
 11965  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 11966  			break
 11967  		}
 11968  		v.reset(OpARM64ADD)
 11969  		v.AddArg2(a, x)
 11970  		return true
 11971  	}
 11972  	// match: (MSUB a _ (MOVDconst [0]))
 11973  	// result: a
 11974  	for {
 11975  		a := v_0
 11976  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 11977  			break
 11978  		}
 11979  		v.copyOf(a)
 11980  		return true
 11981  	}
 11982  	// match: (MSUB a x (MOVDconst [1]))
 11983  	// result: (SUB a x)
 11984  	for {
 11985  		a := v_0
 11986  		x := v_1
 11987  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 11988  			break
 11989  		}
 11990  		v.reset(OpARM64SUB)
 11991  		v.AddArg2(a, x)
 11992  		return true
 11993  	}
 11994  	// match: (MSUB a x (MOVDconst [c]))
 11995  	// cond: isPowerOfTwo(c)
 11996  	// result: (SUBshiftLL a x [log64(c)])
 11997  	for {
 11998  		a := v_0
 11999  		x := v_1
 12000  		if v_2.Op != OpARM64MOVDconst {
 12001  			break
 12002  		}
 12003  		c := auxIntToInt64(v_2.AuxInt)
 12004  		if !(isPowerOfTwo(c)) {
 12005  			break
 12006  		}
 12007  		v.reset(OpARM64SUBshiftLL)
 12008  		v.AuxInt = int64ToAuxInt(log64(c))
 12009  		v.AddArg2(a, x)
 12010  		return true
 12011  	}
 12012  	// match: (MSUB a x (MOVDconst [c]))
 12013  	// cond: isPowerOfTwo(c-1) && c>=3
 12014  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 12015  	for {
 12016  		a := v_0
 12017  		x := v_1
 12018  		if v_2.Op != OpARM64MOVDconst {
 12019  			break
 12020  		}
 12021  		c := auxIntToInt64(v_2.AuxInt)
 12022  		if !(isPowerOfTwo(c-1) && c >= 3) {
 12023  			break
 12024  		}
 12025  		v.reset(OpARM64SUB)
 12026  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12027  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 12028  		v0.AddArg2(x, x)
 12029  		v.AddArg2(a, v0)
 12030  		return true
 12031  	}
 12032  	// match: (MSUB a x (MOVDconst [c]))
 12033  	// cond: isPowerOfTwo(c+1) && c>=7
 12034  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 12035  	for {
 12036  		a := v_0
 12037  		x := v_1
 12038  		if v_2.Op != OpARM64MOVDconst {
 12039  			break
 12040  		}
 12041  		c := auxIntToInt64(v_2.AuxInt)
 12042  		if !(isPowerOfTwo(c+1) && c >= 7) {
 12043  			break
 12044  		}
 12045  		v.reset(OpARM64ADD)
 12046  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12047  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 12048  		v0.AddArg2(x, x)
 12049  		v.AddArg2(a, v0)
 12050  		return true
 12051  	}
 12052  	// match: (MSUB a x (MOVDconst [c]))
 12053  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 12054  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 12055  	for {
 12056  		a := v_0
 12057  		x := v_1
 12058  		if v_2.Op != OpARM64MOVDconst {
 12059  			break
 12060  		}
 12061  		c := auxIntToInt64(v_2.AuxInt)
 12062  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 12063  			break
 12064  		}
 12065  		v.reset(OpARM64ADDshiftLL)
 12066  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 12067  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12068  		v0.AuxInt = int64ToAuxInt(2)
 12069  		v0.AddArg2(x, x)
 12070  		v.AddArg2(a, v0)
 12071  		return true
 12072  	}
 12073  	// match: (MSUB a x (MOVDconst [c]))
 12074  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 12075  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 12076  	for {
 12077  		a := v_0
 12078  		x := v_1
 12079  		if v_2.Op != OpARM64MOVDconst {
 12080  			break
 12081  		}
 12082  		c := auxIntToInt64(v_2.AuxInt)
 12083  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 12084  			break
 12085  		}
 12086  		v.reset(OpARM64SUBshiftLL)
 12087  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 12088  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12089  		v0.AuxInt = int64ToAuxInt(2)
 12090  		v0.AddArg2(x, x)
 12091  		v.AddArg2(a, v0)
 12092  		return true
 12093  	}
 12094  	// match: (MSUB a x (MOVDconst [c]))
 12095  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 12096  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 12097  	for {
 12098  		a := v_0
 12099  		x := v_1
 12100  		if v_2.Op != OpARM64MOVDconst {
 12101  			break
 12102  		}
 12103  		c := auxIntToInt64(v_2.AuxInt)
 12104  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 12105  			break
 12106  		}
 12107  		v.reset(OpARM64ADDshiftLL)
 12108  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 12109  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12110  		v0.AuxInt = int64ToAuxInt(3)
 12111  		v0.AddArg2(x, x)
 12112  		v.AddArg2(a, v0)
 12113  		return true
 12114  	}
 12115  	// match: (MSUB a x (MOVDconst [c]))
 12116  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 12117  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 12118  	for {
 12119  		a := v_0
 12120  		x := v_1
 12121  		if v_2.Op != OpARM64MOVDconst {
 12122  			break
 12123  		}
 12124  		c := auxIntToInt64(v_2.AuxInt)
 12125  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 12126  			break
 12127  		}
 12128  		v.reset(OpARM64SUBshiftLL)
 12129  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 12130  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12131  		v0.AuxInt = int64ToAuxInt(3)
 12132  		v0.AddArg2(x, x)
 12133  		v.AddArg2(a, v0)
 12134  		return true
 12135  	}
 12136  	// match: (MSUB a (MOVDconst [-1]) x)
 12137  	// result: (ADD a x)
 12138  	for {
 12139  		a := v_0
 12140  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 12141  			break
 12142  		}
 12143  		x := v_2
 12144  		v.reset(OpARM64ADD)
 12145  		v.AddArg2(a, x)
 12146  		return true
 12147  	}
 12148  	// match: (MSUB a (MOVDconst [0]) _)
 12149  	// result: a
 12150  	for {
 12151  		a := v_0
 12152  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 12153  			break
 12154  		}
 12155  		v.copyOf(a)
 12156  		return true
 12157  	}
 12158  	// match: (MSUB a (MOVDconst [1]) x)
 12159  	// result: (SUB a x)
 12160  	for {
 12161  		a := v_0
 12162  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12163  			break
 12164  		}
 12165  		x := v_2
 12166  		v.reset(OpARM64SUB)
 12167  		v.AddArg2(a, x)
 12168  		return true
 12169  	}
 12170  	// match: (MSUB a (MOVDconst [c]) x)
 12171  	// cond: isPowerOfTwo(c)
 12172  	// result: (SUBshiftLL a x [log64(c)])
 12173  	for {
 12174  		a := v_0
 12175  		if v_1.Op != OpARM64MOVDconst {
 12176  			break
 12177  		}
 12178  		c := auxIntToInt64(v_1.AuxInt)
 12179  		x := v_2
 12180  		if !(isPowerOfTwo(c)) {
 12181  			break
 12182  		}
 12183  		v.reset(OpARM64SUBshiftLL)
 12184  		v.AuxInt = int64ToAuxInt(log64(c))
 12185  		v.AddArg2(a, x)
 12186  		return true
 12187  	}
 12188  	// match: (MSUB a (MOVDconst [c]) x)
 12189  	// cond: isPowerOfTwo(c-1) && c>=3
 12190  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 12191  	for {
 12192  		a := v_0
 12193  		if v_1.Op != OpARM64MOVDconst {
 12194  			break
 12195  		}
 12196  		c := auxIntToInt64(v_1.AuxInt)
 12197  		x := v_2
 12198  		if !(isPowerOfTwo(c-1) && c >= 3) {
 12199  			break
 12200  		}
 12201  		v.reset(OpARM64SUB)
 12202  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12203  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 12204  		v0.AddArg2(x, x)
 12205  		v.AddArg2(a, v0)
 12206  		return true
 12207  	}
 12208  	// match: (MSUB a (MOVDconst [c]) x)
 12209  	// cond: isPowerOfTwo(c+1) && c>=7
 12210  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 12211  	for {
 12212  		a := v_0
 12213  		if v_1.Op != OpARM64MOVDconst {
 12214  			break
 12215  		}
 12216  		c := auxIntToInt64(v_1.AuxInt)
 12217  		x := v_2
 12218  		if !(isPowerOfTwo(c+1) && c >= 7) {
 12219  			break
 12220  		}
 12221  		v.reset(OpARM64ADD)
 12222  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12223  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 12224  		v0.AddArg2(x, x)
 12225  		v.AddArg2(a, v0)
 12226  		return true
 12227  	}
 12228  	// match: (MSUB a (MOVDconst [c]) x)
 12229  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 12230  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 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 !(c%3 == 0 && isPowerOfTwo(c/3)) {
 12239  			break
 12240  		}
 12241  		v.reset(OpARM64ADDshiftLL)
 12242  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 12243  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12244  		v0.AuxInt = int64ToAuxInt(2)
 12245  		v0.AddArg2(x, x)
 12246  		v.AddArg2(a, v0)
 12247  		return true
 12248  	}
 12249  	// match: (MSUB a (MOVDconst [c]) x)
 12250  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 12251  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 12252  	for {
 12253  		a := v_0
 12254  		if v_1.Op != OpARM64MOVDconst {
 12255  			break
 12256  		}
 12257  		c := auxIntToInt64(v_1.AuxInt)
 12258  		x := v_2
 12259  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 12260  			break
 12261  		}
 12262  		v.reset(OpARM64SUBshiftLL)
 12263  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 12264  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12265  		v0.AuxInt = int64ToAuxInt(2)
 12266  		v0.AddArg2(x, x)
 12267  		v.AddArg2(a, v0)
 12268  		return true
 12269  	}
 12270  	// match: (MSUB a (MOVDconst [c]) x)
 12271  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 12272  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 12273  	for {
 12274  		a := v_0
 12275  		if v_1.Op != OpARM64MOVDconst {
 12276  			break
 12277  		}
 12278  		c := auxIntToInt64(v_1.AuxInt)
 12279  		x := v_2
 12280  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 12281  			break
 12282  		}
 12283  		v.reset(OpARM64ADDshiftLL)
 12284  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 12285  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12286  		v0.AuxInt = int64ToAuxInt(3)
 12287  		v0.AddArg2(x, x)
 12288  		v.AddArg2(a, v0)
 12289  		return true
 12290  	}
 12291  	// match: (MSUB a (MOVDconst [c]) x)
 12292  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 12293  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 12294  	for {
 12295  		a := v_0
 12296  		if v_1.Op != OpARM64MOVDconst {
 12297  			break
 12298  		}
 12299  		c := auxIntToInt64(v_1.AuxInt)
 12300  		x := v_2
 12301  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 12302  			break
 12303  		}
 12304  		v.reset(OpARM64SUBshiftLL)
 12305  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 12306  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12307  		v0.AuxInt = int64ToAuxInt(3)
 12308  		v0.AddArg2(x, x)
 12309  		v.AddArg2(a, v0)
 12310  		return true
 12311  	}
 12312  	// match: (MSUB (MOVDconst [c]) x y)
 12313  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 12314  	for {
 12315  		if v_0.Op != OpARM64MOVDconst {
 12316  			break
 12317  		}
 12318  		c := auxIntToInt64(v_0.AuxInt)
 12319  		x := v_1
 12320  		y := v_2
 12321  		v.reset(OpARM64ADDconst)
 12322  		v.AuxInt = int64ToAuxInt(c)
 12323  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 12324  		v0.AddArg2(x, y)
 12325  		v.AddArg(v0)
 12326  		return true
 12327  	}
 12328  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 12329  	// result: (SUBconst [c*d] a)
 12330  	for {
 12331  		a := v_0
 12332  		if v_1.Op != OpARM64MOVDconst {
 12333  			break
 12334  		}
 12335  		c := auxIntToInt64(v_1.AuxInt)
 12336  		if v_2.Op != OpARM64MOVDconst {
 12337  			break
 12338  		}
 12339  		d := auxIntToInt64(v_2.AuxInt)
 12340  		v.reset(OpARM64SUBconst)
 12341  		v.AuxInt = int64ToAuxInt(c * d)
 12342  		v.AddArg(a)
 12343  		return true
 12344  	}
 12345  	return false
 12346  }
 12347  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 12348  	v_2 := v.Args[2]
 12349  	v_1 := v.Args[1]
 12350  	v_0 := v.Args[0]
 12351  	b := v.Block
 12352  	// match: (MSUBW a x (MOVDconst [c]))
 12353  	// cond: int32(c)==-1
 12354  	// result: (MOVWUreg (ADD <a.Type> a x))
 12355  	for {
 12356  		a := v_0
 12357  		x := v_1
 12358  		if v_2.Op != OpARM64MOVDconst {
 12359  			break
 12360  		}
 12361  		c := auxIntToInt64(v_2.AuxInt)
 12362  		if !(int32(c) == -1) {
 12363  			break
 12364  		}
 12365  		v.reset(OpARM64MOVWUreg)
 12366  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12367  		v0.AddArg2(a, x)
 12368  		v.AddArg(v0)
 12369  		return true
 12370  	}
 12371  	// match: (MSUBW a _ (MOVDconst [c]))
 12372  	// cond: int32(c)==0
 12373  	// result: (MOVWUreg a)
 12374  	for {
 12375  		a := v_0
 12376  		if v_2.Op != OpARM64MOVDconst {
 12377  			break
 12378  		}
 12379  		c := auxIntToInt64(v_2.AuxInt)
 12380  		if !(int32(c) == 0) {
 12381  			break
 12382  		}
 12383  		v.reset(OpARM64MOVWUreg)
 12384  		v.AddArg(a)
 12385  		return true
 12386  	}
 12387  	// match: (MSUBW a x (MOVDconst [c]))
 12388  	// cond: int32(c)==1
 12389  	// result: (MOVWUreg (SUB <a.Type> a x))
 12390  	for {
 12391  		a := v_0
 12392  		x := v_1
 12393  		if v_2.Op != OpARM64MOVDconst {
 12394  			break
 12395  		}
 12396  		c := auxIntToInt64(v_2.AuxInt)
 12397  		if !(int32(c) == 1) {
 12398  			break
 12399  		}
 12400  		v.reset(OpARM64MOVWUreg)
 12401  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12402  		v0.AddArg2(a, x)
 12403  		v.AddArg(v0)
 12404  		return true
 12405  	}
 12406  	// match: (MSUBW a x (MOVDconst [c]))
 12407  	// cond: isPowerOfTwo(c)
 12408  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 12409  	for {
 12410  		a := v_0
 12411  		x := v_1
 12412  		if v_2.Op != OpARM64MOVDconst {
 12413  			break
 12414  		}
 12415  		c := auxIntToInt64(v_2.AuxInt)
 12416  		if !(isPowerOfTwo(c)) {
 12417  			break
 12418  		}
 12419  		v.reset(OpARM64MOVWUreg)
 12420  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12421  		v0.AuxInt = int64ToAuxInt(log64(c))
 12422  		v0.AddArg2(a, x)
 12423  		v.AddArg(v0)
 12424  		return true
 12425  	}
 12426  	// match: (MSUBW a x (MOVDconst [c]))
 12427  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 12428  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 12429  	for {
 12430  		a := v_0
 12431  		x := v_1
 12432  		if v_2.Op != OpARM64MOVDconst {
 12433  			break
 12434  		}
 12435  		c := auxIntToInt64(v_2.AuxInt)
 12436  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 12437  			break
 12438  		}
 12439  		v.reset(OpARM64MOVWUreg)
 12440  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12441  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12442  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 12443  		v1.AddArg2(x, x)
 12444  		v0.AddArg2(a, v1)
 12445  		v.AddArg(v0)
 12446  		return true
 12447  	}
 12448  	// match: (MSUBW a x (MOVDconst [c]))
 12449  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 12450  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 12451  	for {
 12452  		a := v_0
 12453  		x := v_1
 12454  		if v_2.Op != OpARM64MOVDconst {
 12455  			break
 12456  		}
 12457  		c := auxIntToInt64(v_2.AuxInt)
 12458  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 12459  			break
 12460  		}
 12461  		v.reset(OpARM64MOVWUreg)
 12462  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12463  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12464  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 12465  		v1.AddArg2(x, x)
 12466  		v0.AddArg2(a, v1)
 12467  		v.AddArg(v0)
 12468  		return true
 12469  	}
 12470  	// match: (MSUBW a x (MOVDconst [c]))
 12471  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 12472  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 12473  	for {
 12474  		a := v_0
 12475  		x := v_1
 12476  		if v_2.Op != OpARM64MOVDconst {
 12477  			break
 12478  		}
 12479  		c := auxIntToInt64(v_2.AuxInt)
 12480  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12481  			break
 12482  		}
 12483  		v.reset(OpARM64MOVWUreg)
 12484  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12485  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12486  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12487  		v1.AuxInt = int64ToAuxInt(2)
 12488  		v1.AddArg2(x, x)
 12489  		v0.AddArg2(a, v1)
 12490  		v.AddArg(v0)
 12491  		return true
 12492  	}
 12493  	// match: (MSUBW a x (MOVDconst [c]))
 12494  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12495  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12496  	for {
 12497  		a := v_0
 12498  		x := v_1
 12499  		if v_2.Op != OpARM64MOVDconst {
 12500  			break
 12501  		}
 12502  		c := auxIntToInt64(v_2.AuxInt)
 12503  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12504  			break
 12505  		}
 12506  		v.reset(OpARM64MOVWUreg)
 12507  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12508  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12509  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12510  		v1.AuxInt = int64ToAuxInt(2)
 12511  		v1.AddArg2(x, x)
 12512  		v0.AddArg2(a, v1)
 12513  		v.AddArg(v0)
 12514  		return true
 12515  	}
 12516  	// match: (MSUBW a x (MOVDconst [c]))
 12517  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12518  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12519  	for {
 12520  		a := v_0
 12521  		x := v_1
 12522  		if v_2.Op != OpARM64MOVDconst {
 12523  			break
 12524  		}
 12525  		c := auxIntToInt64(v_2.AuxInt)
 12526  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12527  			break
 12528  		}
 12529  		v.reset(OpARM64MOVWUreg)
 12530  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12531  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12532  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12533  		v1.AuxInt = int64ToAuxInt(3)
 12534  		v1.AddArg2(x, x)
 12535  		v0.AddArg2(a, v1)
 12536  		v.AddArg(v0)
 12537  		return true
 12538  	}
 12539  	// match: (MSUBW a x (MOVDconst [c]))
 12540  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12541  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12542  	for {
 12543  		a := v_0
 12544  		x := v_1
 12545  		if v_2.Op != OpARM64MOVDconst {
 12546  			break
 12547  		}
 12548  		c := auxIntToInt64(v_2.AuxInt)
 12549  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12550  			break
 12551  		}
 12552  		v.reset(OpARM64MOVWUreg)
 12553  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12554  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12555  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12556  		v1.AuxInt = int64ToAuxInt(3)
 12557  		v1.AddArg2(x, x)
 12558  		v0.AddArg2(a, v1)
 12559  		v.AddArg(v0)
 12560  		return true
 12561  	}
 12562  	// match: (MSUBW a (MOVDconst [c]) x)
 12563  	// cond: int32(c)==-1
 12564  	// result: (MOVWUreg (ADD <a.Type> a x))
 12565  	for {
 12566  		a := v_0
 12567  		if v_1.Op != OpARM64MOVDconst {
 12568  			break
 12569  		}
 12570  		c := auxIntToInt64(v_1.AuxInt)
 12571  		x := v_2
 12572  		if !(int32(c) == -1) {
 12573  			break
 12574  		}
 12575  		v.reset(OpARM64MOVWUreg)
 12576  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12577  		v0.AddArg2(a, x)
 12578  		v.AddArg(v0)
 12579  		return true
 12580  	}
 12581  	// match: (MSUBW a (MOVDconst [c]) _)
 12582  	// cond: int32(c)==0
 12583  	// result: (MOVWUreg a)
 12584  	for {
 12585  		a := v_0
 12586  		if v_1.Op != OpARM64MOVDconst {
 12587  			break
 12588  		}
 12589  		c := auxIntToInt64(v_1.AuxInt)
 12590  		if !(int32(c) == 0) {
 12591  			break
 12592  		}
 12593  		v.reset(OpARM64MOVWUreg)
 12594  		v.AddArg(a)
 12595  		return true
 12596  	}
 12597  	// match: (MSUBW a (MOVDconst [c]) x)
 12598  	// cond: int32(c)==1
 12599  	// result: (MOVWUreg (SUB <a.Type> a x))
 12600  	for {
 12601  		a := v_0
 12602  		if v_1.Op != OpARM64MOVDconst {
 12603  			break
 12604  		}
 12605  		c := auxIntToInt64(v_1.AuxInt)
 12606  		x := v_2
 12607  		if !(int32(c) == 1) {
 12608  			break
 12609  		}
 12610  		v.reset(OpARM64MOVWUreg)
 12611  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12612  		v0.AddArg2(a, x)
 12613  		v.AddArg(v0)
 12614  		return true
 12615  	}
 12616  	// match: (MSUBW a (MOVDconst [c]) x)
 12617  	// cond: isPowerOfTwo(c)
 12618  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 12619  	for {
 12620  		a := v_0
 12621  		if v_1.Op != OpARM64MOVDconst {
 12622  			break
 12623  		}
 12624  		c := auxIntToInt64(v_1.AuxInt)
 12625  		x := v_2
 12626  		if !(isPowerOfTwo(c)) {
 12627  			break
 12628  		}
 12629  		v.reset(OpARM64MOVWUreg)
 12630  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12631  		v0.AuxInt = int64ToAuxInt(log64(c))
 12632  		v0.AddArg2(a, x)
 12633  		v.AddArg(v0)
 12634  		return true
 12635  	}
 12636  	// match: (MSUBW a (MOVDconst [c]) x)
 12637  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 12638  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 12639  	for {
 12640  		a := v_0
 12641  		if v_1.Op != OpARM64MOVDconst {
 12642  			break
 12643  		}
 12644  		c := auxIntToInt64(v_1.AuxInt)
 12645  		x := v_2
 12646  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 12647  			break
 12648  		}
 12649  		v.reset(OpARM64MOVWUreg)
 12650  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12651  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12652  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 12653  		v1.AddArg2(x, x)
 12654  		v0.AddArg2(a, v1)
 12655  		v.AddArg(v0)
 12656  		return true
 12657  	}
 12658  	// match: (MSUBW a (MOVDconst [c]) x)
 12659  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 12660  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 12661  	for {
 12662  		a := v_0
 12663  		if v_1.Op != OpARM64MOVDconst {
 12664  			break
 12665  		}
 12666  		c := auxIntToInt64(v_1.AuxInt)
 12667  		x := v_2
 12668  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 12669  			break
 12670  		}
 12671  		v.reset(OpARM64MOVWUreg)
 12672  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12673  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12674  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 12675  		v1.AddArg2(x, x)
 12676  		v0.AddArg2(a, v1)
 12677  		v.AddArg(v0)
 12678  		return true
 12679  	}
 12680  	// match: (MSUBW a (MOVDconst [c]) x)
 12681  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 12682  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 12683  	for {
 12684  		a := v_0
 12685  		if v_1.Op != OpARM64MOVDconst {
 12686  			break
 12687  		}
 12688  		c := auxIntToInt64(v_1.AuxInt)
 12689  		x := v_2
 12690  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12691  			break
 12692  		}
 12693  		v.reset(OpARM64MOVWUreg)
 12694  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12695  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12696  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12697  		v1.AuxInt = int64ToAuxInt(2)
 12698  		v1.AddArg2(x, x)
 12699  		v0.AddArg2(a, v1)
 12700  		v.AddArg(v0)
 12701  		return true
 12702  	}
 12703  	// match: (MSUBW a (MOVDconst [c]) x)
 12704  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12705  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12706  	for {
 12707  		a := v_0
 12708  		if v_1.Op != OpARM64MOVDconst {
 12709  			break
 12710  		}
 12711  		c := auxIntToInt64(v_1.AuxInt)
 12712  		x := v_2
 12713  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12714  			break
 12715  		}
 12716  		v.reset(OpARM64MOVWUreg)
 12717  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12718  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12719  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12720  		v1.AuxInt = int64ToAuxInt(2)
 12721  		v1.AddArg2(x, x)
 12722  		v0.AddArg2(a, v1)
 12723  		v.AddArg(v0)
 12724  		return true
 12725  	}
 12726  	// match: (MSUBW a (MOVDconst [c]) x)
 12727  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12728  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12729  	for {
 12730  		a := v_0
 12731  		if v_1.Op != OpARM64MOVDconst {
 12732  			break
 12733  		}
 12734  		c := auxIntToInt64(v_1.AuxInt)
 12735  		x := v_2
 12736  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12737  			break
 12738  		}
 12739  		v.reset(OpARM64MOVWUreg)
 12740  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12741  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12742  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12743  		v1.AuxInt = int64ToAuxInt(3)
 12744  		v1.AddArg2(x, x)
 12745  		v0.AddArg2(a, v1)
 12746  		v.AddArg(v0)
 12747  		return true
 12748  	}
 12749  	// match: (MSUBW a (MOVDconst [c]) x)
 12750  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12751  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12752  	for {
 12753  		a := v_0
 12754  		if v_1.Op != OpARM64MOVDconst {
 12755  			break
 12756  		}
 12757  		c := auxIntToInt64(v_1.AuxInt)
 12758  		x := v_2
 12759  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12760  			break
 12761  		}
 12762  		v.reset(OpARM64MOVWUreg)
 12763  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12764  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12765  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12766  		v1.AuxInt = int64ToAuxInt(3)
 12767  		v1.AddArg2(x, x)
 12768  		v0.AddArg2(a, v1)
 12769  		v.AddArg(v0)
 12770  		return true
 12771  	}
 12772  	// match: (MSUBW (MOVDconst [c]) x y)
 12773  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 12774  	for {
 12775  		if v_0.Op != OpARM64MOVDconst {
 12776  			break
 12777  		}
 12778  		c := auxIntToInt64(v_0.AuxInt)
 12779  		x := v_1
 12780  		y := v_2
 12781  		v.reset(OpARM64MOVWUreg)
 12782  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 12783  		v0.AuxInt = int64ToAuxInt(c)
 12784  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 12785  		v1.AddArg2(x, y)
 12786  		v0.AddArg(v1)
 12787  		v.AddArg(v0)
 12788  		return true
 12789  	}
 12790  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 12791  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 12792  	for {
 12793  		a := v_0
 12794  		if v_1.Op != OpARM64MOVDconst {
 12795  			break
 12796  		}
 12797  		c := auxIntToInt64(v_1.AuxInt)
 12798  		if v_2.Op != OpARM64MOVDconst {
 12799  			break
 12800  		}
 12801  		d := auxIntToInt64(v_2.AuxInt)
 12802  		v.reset(OpARM64MOVWUreg)
 12803  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 12804  		v0.AuxInt = int64ToAuxInt(c * d)
 12805  		v0.AddArg(a)
 12806  		v.AddArg(v0)
 12807  		return true
 12808  	}
 12809  	return false
 12810  }
 12811  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 12812  	v_1 := v.Args[1]
 12813  	v_0 := v.Args[0]
 12814  	b := v.Block
 12815  	config := b.Func.Config
 12816  	// match: (MUL (NEG x) y)
 12817  	// result: (MNEG x y)
 12818  	for {
 12819  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12820  			if v_0.Op != OpARM64NEG {
 12821  				continue
 12822  			}
 12823  			x := v_0.Args[0]
 12824  			y := v_1
 12825  			v.reset(OpARM64MNEG)
 12826  			v.AddArg2(x, y)
 12827  			return true
 12828  		}
 12829  		break
 12830  	}
 12831  	// match: (MUL _ (MOVDconst [0]))
 12832  	// result: (MOVDconst [0])
 12833  	for {
 12834  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12835  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 12836  				continue
 12837  			}
 12838  			v.reset(OpARM64MOVDconst)
 12839  			v.AuxInt = int64ToAuxInt(0)
 12840  			return true
 12841  		}
 12842  		break
 12843  	}
 12844  	// match: (MUL x (MOVDconst [1]))
 12845  	// result: x
 12846  	for {
 12847  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12848  			x := v_0
 12849  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12850  				continue
 12851  			}
 12852  			v.copyOf(x)
 12853  			return true
 12854  		}
 12855  		break
 12856  	}
 12857  	// match: (MUL x (MOVDconst [c]))
 12858  	// cond: canMulStrengthReduce(config, c)
 12859  	// result: {mulStrengthReduce(v, x, c)}
 12860  	for {
 12861  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12862  			x := v_0
 12863  			if v_1.Op != OpARM64MOVDconst {
 12864  				continue
 12865  			}
 12866  			c := auxIntToInt64(v_1.AuxInt)
 12867  			if !(canMulStrengthReduce(config, c)) {
 12868  				continue
 12869  			}
 12870  			v.copyOf(mulStrengthReduce(v, x, c))
 12871  			return true
 12872  		}
 12873  		break
 12874  	}
 12875  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 12876  	// result: (MOVDconst [c*d])
 12877  	for {
 12878  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12879  			if v_0.Op != OpARM64MOVDconst {
 12880  				continue
 12881  			}
 12882  			c := auxIntToInt64(v_0.AuxInt)
 12883  			if v_1.Op != OpARM64MOVDconst {
 12884  				continue
 12885  			}
 12886  			d := auxIntToInt64(v_1.AuxInt)
 12887  			v.reset(OpARM64MOVDconst)
 12888  			v.AuxInt = int64ToAuxInt(c * d)
 12889  			return true
 12890  		}
 12891  		break
 12892  	}
 12893  	// match: (MUL r:(MOVWUreg x) s:(MOVWUreg y))
 12894  	// cond: r.Uses == 1 && s.Uses == 1
 12895  	// result: (UMULL x y)
 12896  	for {
 12897  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12898  			r := v_0
 12899  			if r.Op != OpARM64MOVWUreg {
 12900  				continue
 12901  			}
 12902  			x := r.Args[0]
 12903  			s := v_1
 12904  			if s.Op != OpARM64MOVWUreg {
 12905  				continue
 12906  			}
 12907  			y := s.Args[0]
 12908  			if !(r.Uses == 1 && s.Uses == 1) {
 12909  				continue
 12910  			}
 12911  			v.reset(OpARM64UMULL)
 12912  			v.AddArg2(x, y)
 12913  			return true
 12914  		}
 12915  		break
 12916  	}
 12917  	// match: (MUL r:(MOVWreg x) s:(MOVWreg y))
 12918  	// cond: r.Uses == 1 && s.Uses == 1
 12919  	// result: (MULL x y)
 12920  	for {
 12921  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12922  			r := v_0
 12923  			if r.Op != OpARM64MOVWreg {
 12924  				continue
 12925  			}
 12926  			x := r.Args[0]
 12927  			s := v_1
 12928  			if s.Op != OpARM64MOVWreg {
 12929  				continue
 12930  			}
 12931  			y := s.Args[0]
 12932  			if !(r.Uses == 1 && s.Uses == 1) {
 12933  				continue
 12934  			}
 12935  			v.reset(OpARM64MULL)
 12936  			v.AddArg2(x, y)
 12937  			return true
 12938  		}
 12939  		break
 12940  	}
 12941  	return false
 12942  }
 12943  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 12944  	v_1 := v.Args[1]
 12945  	v_0 := v.Args[0]
 12946  	b := v.Block
 12947  	config := b.Func.Config
 12948  	// match: (MULW (NEG x) y)
 12949  	// result: (MNEGW x y)
 12950  	for {
 12951  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12952  			if v_0.Op != OpARM64NEG {
 12953  				continue
 12954  			}
 12955  			x := v_0.Args[0]
 12956  			y := v_1
 12957  			v.reset(OpARM64MNEGW)
 12958  			v.AddArg2(x, y)
 12959  			return true
 12960  		}
 12961  		break
 12962  	}
 12963  	// match: (MULW _ (MOVDconst [c]))
 12964  	// cond: int32(c)==0
 12965  	// result: (MOVDconst [0])
 12966  	for {
 12967  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12968  			if v_1.Op != OpARM64MOVDconst {
 12969  				continue
 12970  			}
 12971  			c := auxIntToInt64(v_1.AuxInt)
 12972  			if !(int32(c) == 0) {
 12973  				continue
 12974  			}
 12975  			v.reset(OpARM64MOVDconst)
 12976  			v.AuxInt = int64ToAuxInt(0)
 12977  			return true
 12978  		}
 12979  		break
 12980  	}
 12981  	// match: (MULW x (MOVDconst [c]))
 12982  	// cond: int32(c)==1
 12983  	// result: (MOVWUreg x)
 12984  	for {
 12985  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12986  			x := v_0
 12987  			if v_1.Op != OpARM64MOVDconst {
 12988  				continue
 12989  			}
 12990  			c := auxIntToInt64(v_1.AuxInt)
 12991  			if !(int32(c) == 1) {
 12992  				continue
 12993  			}
 12994  			v.reset(OpARM64MOVWUreg)
 12995  			v.AddArg(x)
 12996  			return true
 12997  		}
 12998  		break
 12999  	}
 13000  	// match: (MULW x (MOVDconst [c]))
 13001  	// cond: v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))
 13002  	// result: {mulStrengthReduce32(v, x, int32(c))}
 13003  	for {
 13004  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13005  			x := v_0
 13006  			if v_1.Op != OpARM64MOVDconst {
 13007  				continue
 13008  			}
 13009  			c := auxIntToInt64(v_1.AuxInt)
 13010  			if !(v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))) {
 13011  				continue
 13012  			}
 13013  			v.copyOf(mulStrengthReduce32(v, x, int32(c)))
 13014  			return true
 13015  		}
 13016  		break
 13017  	}
 13018  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 13019  	// result: (MOVDconst [int64(uint32(c*d))])
 13020  	for {
 13021  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13022  			if v_0.Op != OpARM64MOVDconst {
 13023  				continue
 13024  			}
 13025  			c := auxIntToInt64(v_0.AuxInt)
 13026  			if v_1.Op != OpARM64MOVDconst {
 13027  				continue
 13028  			}
 13029  			d := auxIntToInt64(v_1.AuxInt)
 13030  			v.reset(OpARM64MOVDconst)
 13031  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 13032  			return true
 13033  		}
 13034  		break
 13035  	}
 13036  	return false
 13037  }
 13038  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 13039  	v_0 := v.Args[0]
 13040  	// match: (MVN (XOR x y))
 13041  	// result: (EON x y)
 13042  	for {
 13043  		if v_0.Op != OpARM64XOR {
 13044  			break
 13045  		}
 13046  		y := v_0.Args[1]
 13047  		x := v_0.Args[0]
 13048  		v.reset(OpARM64EON)
 13049  		v.AddArg2(x, y)
 13050  		return true
 13051  	}
 13052  	// match: (MVN (MOVDconst [c]))
 13053  	// result: (MOVDconst [^c])
 13054  	for {
 13055  		if v_0.Op != OpARM64MOVDconst {
 13056  			break
 13057  		}
 13058  		c := auxIntToInt64(v_0.AuxInt)
 13059  		v.reset(OpARM64MOVDconst)
 13060  		v.AuxInt = int64ToAuxInt(^c)
 13061  		return true
 13062  	}
 13063  	// match: (MVN x:(SLLconst [c] y))
 13064  	// cond: clobberIfDead(x)
 13065  	// result: (MVNshiftLL [c] y)
 13066  	for {
 13067  		x := v_0
 13068  		if x.Op != OpARM64SLLconst {
 13069  			break
 13070  		}
 13071  		c := auxIntToInt64(x.AuxInt)
 13072  		y := x.Args[0]
 13073  		if !(clobberIfDead(x)) {
 13074  			break
 13075  		}
 13076  		v.reset(OpARM64MVNshiftLL)
 13077  		v.AuxInt = int64ToAuxInt(c)
 13078  		v.AddArg(y)
 13079  		return true
 13080  	}
 13081  	// match: (MVN x:(SRLconst [c] y))
 13082  	// cond: clobberIfDead(x)
 13083  	// result: (MVNshiftRL [c] y)
 13084  	for {
 13085  		x := v_0
 13086  		if x.Op != OpARM64SRLconst {
 13087  			break
 13088  		}
 13089  		c := auxIntToInt64(x.AuxInt)
 13090  		y := x.Args[0]
 13091  		if !(clobberIfDead(x)) {
 13092  			break
 13093  		}
 13094  		v.reset(OpARM64MVNshiftRL)
 13095  		v.AuxInt = int64ToAuxInt(c)
 13096  		v.AddArg(y)
 13097  		return true
 13098  	}
 13099  	// match: (MVN x:(SRAconst [c] y))
 13100  	// cond: clobberIfDead(x)
 13101  	// result: (MVNshiftRA [c] y)
 13102  	for {
 13103  		x := v_0
 13104  		if x.Op != OpARM64SRAconst {
 13105  			break
 13106  		}
 13107  		c := auxIntToInt64(x.AuxInt)
 13108  		y := x.Args[0]
 13109  		if !(clobberIfDead(x)) {
 13110  			break
 13111  		}
 13112  		v.reset(OpARM64MVNshiftRA)
 13113  		v.AuxInt = int64ToAuxInt(c)
 13114  		v.AddArg(y)
 13115  		return true
 13116  	}
 13117  	// match: (MVN x:(RORconst [c] y))
 13118  	// cond: clobberIfDead(x)
 13119  	// result: (MVNshiftRO [c] y)
 13120  	for {
 13121  		x := v_0
 13122  		if x.Op != OpARM64RORconst {
 13123  			break
 13124  		}
 13125  		c := auxIntToInt64(x.AuxInt)
 13126  		y := x.Args[0]
 13127  		if !(clobberIfDead(x)) {
 13128  			break
 13129  		}
 13130  		v.reset(OpARM64MVNshiftRO)
 13131  		v.AuxInt = int64ToAuxInt(c)
 13132  		v.AddArg(y)
 13133  		return true
 13134  	}
 13135  	return false
 13136  }
 13137  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 13138  	v_0 := v.Args[0]
 13139  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 13140  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 13141  	for {
 13142  		d := auxIntToInt64(v.AuxInt)
 13143  		if v_0.Op != OpARM64MOVDconst {
 13144  			break
 13145  		}
 13146  		c := auxIntToInt64(v_0.AuxInt)
 13147  		v.reset(OpARM64MOVDconst)
 13148  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 13149  		return true
 13150  	}
 13151  	return false
 13152  }
 13153  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 13154  	v_0 := v.Args[0]
 13155  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 13156  	// result: (MOVDconst [^(c>>uint64(d))])
 13157  	for {
 13158  		d := auxIntToInt64(v.AuxInt)
 13159  		if v_0.Op != OpARM64MOVDconst {
 13160  			break
 13161  		}
 13162  		c := auxIntToInt64(v_0.AuxInt)
 13163  		v.reset(OpARM64MOVDconst)
 13164  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 13165  		return true
 13166  	}
 13167  	return false
 13168  }
 13169  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 13170  	v_0 := v.Args[0]
 13171  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 13172  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 13173  	for {
 13174  		d := auxIntToInt64(v.AuxInt)
 13175  		if v_0.Op != OpARM64MOVDconst {
 13176  			break
 13177  		}
 13178  		c := auxIntToInt64(v_0.AuxInt)
 13179  		v.reset(OpARM64MOVDconst)
 13180  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 13181  		return true
 13182  	}
 13183  	return false
 13184  }
 13185  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 13186  	v_0 := v.Args[0]
 13187  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 13188  	// result: (MOVDconst [^rotateRight64(c, d)])
 13189  	for {
 13190  		d := auxIntToInt64(v.AuxInt)
 13191  		if v_0.Op != OpARM64MOVDconst {
 13192  			break
 13193  		}
 13194  		c := auxIntToInt64(v_0.AuxInt)
 13195  		v.reset(OpARM64MOVDconst)
 13196  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 13197  		return true
 13198  	}
 13199  	return false
 13200  }
 13201  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 13202  	v_0 := v.Args[0]
 13203  	// match: (NEG (MUL x y))
 13204  	// result: (MNEG x y)
 13205  	for {
 13206  		if v_0.Op != OpARM64MUL {
 13207  			break
 13208  		}
 13209  		y := v_0.Args[1]
 13210  		x := v_0.Args[0]
 13211  		v.reset(OpARM64MNEG)
 13212  		v.AddArg2(x, y)
 13213  		return true
 13214  	}
 13215  	// match: (NEG (MULW x y))
 13216  	// cond: v.Type.Size() <= 4
 13217  	// result: (MNEGW x y)
 13218  	for {
 13219  		if v_0.Op != OpARM64MULW {
 13220  			break
 13221  		}
 13222  		y := v_0.Args[1]
 13223  		x := v_0.Args[0]
 13224  		if !(v.Type.Size() <= 4) {
 13225  			break
 13226  		}
 13227  		v.reset(OpARM64MNEGW)
 13228  		v.AddArg2(x, y)
 13229  		return true
 13230  	}
 13231  	// match: (NEG (SUB x y))
 13232  	// result: (SUB y x)
 13233  	for {
 13234  		if v_0.Op != OpARM64SUB {
 13235  			break
 13236  		}
 13237  		y := v_0.Args[1]
 13238  		x := v_0.Args[0]
 13239  		v.reset(OpARM64SUB)
 13240  		v.AddArg2(y, x)
 13241  		return true
 13242  	}
 13243  	// match: (NEG (NEG x))
 13244  	// result: x
 13245  	for {
 13246  		if v_0.Op != OpARM64NEG {
 13247  			break
 13248  		}
 13249  		x := v_0.Args[0]
 13250  		v.copyOf(x)
 13251  		return true
 13252  	}
 13253  	// match: (NEG (MOVDconst [c]))
 13254  	// result: (MOVDconst [-c])
 13255  	for {
 13256  		if v_0.Op != OpARM64MOVDconst {
 13257  			break
 13258  		}
 13259  		c := auxIntToInt64(v_0.AuxInt)
 13260  		v.reset(OpARM64MOVDconst)
 13261  		v.AuxInt = int64ToAuxInt(-c)
 13262  		return true
 13263  	}
 13264  	// match: (NEG x:(SLLconst [c] y))
 13265  	// cond: clobberIfDead(x)
 13266  	// result: (NEGshiftLL [c] y)
 13267  	for {
 13268  		x := v_0
 13269  		if x.Op != OpARM64SLLconst {
 13270  			break
 13271  		}
 13272  		c := auxIntToInt64(x.AuxInt)
 13273  		y := x.Args[0]
 13274  		if !(clobberIfDead(x)) {
 13275  			break
 13276  		}
 13277  		v.reset(OpARM64NEGshiftLL)
 13278  		v.AuxInt = int64ToAuxInt(c)
 13279  		v.AddArg(y)
 13280  		return true
 13281  	}
 13282  	// match: (NEG x:(SRLconst [c] y))
 13283  	// cond: clobberIfDead(x)
 13284  	// result: (NEGshiftRL [c] y)
 13285  	for {
 13286  		x := v_0
 13287  		if x.Op != OpARM64SRLconst {
 13288  			break
 13289  		}
 13290  		c := auxIntToInt64(x.AuxInt)
 13291  		y := x.Args[0]
 13292  		if !(clobberIfDead(x)) {
 13293  			break
 13294  		}
 13295  		v.reset(OpARM64NEGshiftRL)
 13296  		v.AuxInt = int64ToAuxInt(c)
 13297  		v.AddArg(y)
 13298  		return true
 13299  	}
 13300  	// match: (NEG x:(SRAconst [c] y))
 13301  	// cond: clobberIfDead(x)
 13302  	// result: (NEGshiftRA [c] y)
 13303  	for {
 13304  		x := v_0
 13305  		if x.Op != OpARM64SRAconst {
 13306  			break
 13307  		}
 13308  		c := auxIntToInt64(x.AuxInt)
 13309  		y := x.Args[0]
 13310  		if !(clobberIfDead(x)) {
 13311  			break
 13312  		}
 13313  		v.reset(OpARM64NEGshiftRA)
 13314  		v.AuxInt = int64ToAuxInt(c)
 13315  		v.AddArg(y)
 13316  		return true
 13317  	}
 13318  	return false
 13319  }
 13320  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 13321  	v_0 := v.Args[0]
 13322  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 13323  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 13324  	for {
 13325  		d := auxIntToInt64(v.AuxInt)
 13326  		if v_0.Op != OpARM64MOVDconst {
 13327  			break
 13328  		}
 13329  		c := auxIntToInt64(v_0.AuxInt)
 13330  		v.reset(OpARM64MOVDconst)
 13331  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 13332  		return true
 13333  	}
 13334  	return false
 13335  }
 13336  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 13337  	v_0 := v.Args[0]
 13338  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 13339  	// result: (MOVDconst [-(c>>uint64(d))])
 13340  	for {
 13341  		d := auxIntToInt64(v.AuxInt)
 13342  		if v_0.Op != OpARM64MOVDconst {
 13343  			break
 13344  		}
 13345  		c := auxIntToInt64(v_0.AuxInt)
 13346  		v.reset(OpARM64MOVDconst)
 13347  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 13348  		return true
 13349  	}
 13350  	return false
 13351  }
 13352  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 13353  	v_0 := v.Args[0]
 13354  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 13355  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 13356  	for {
 13357  		d := auxIntToInt64(v.AuxInt)
 13358  		if v_0.Op != OpARM64MOVDconst {
 13359  			break
 13360  		}
 13361  		c := auxIntToInt64(v_0.AuxInt)
 13362  		v.reset(OpARM64MOVDconst)
 13363  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 13364  		return true
 13365  	}
 13366  	return false
 13367  }
 13368  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 13369  	v_0 := v.Args[0]
 13370  	b := v.Block
 13371  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 13372  	// cond: z.Uses == 1
 13373  	// result: (NotEqual (TST x y))
 13374  	for {
 13375  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13376  			break
 13377  		}
 13378  		z := v_0.Args[0]
 13379  		if z.Op != OpARM64AND {
 13380  			break
 13381  		}
 13382  		y := z.Args[1]
 13383  		x := z.Args[0]
 13384  		if !(z.Uses == 1) {
 13385  			break
 13386  		}
 13387  		v.reset(OpARM64NotEqual)
 13388  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 13389  		v0.AddArg2(x, y)
 13390  		v.AddArg(v0)
 13391  		return true
 13392  	}
 13393  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 13394  	// cond: x.Uses == 1
 13395  	// result: (NotEqual (TSTWconst [int32(c)] y))
 13396  	for {
 13397  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13398  			break
 13399  		}
 13400  		x := v_0.Args[0]
 13401  		if x.Op != OpARM64ANDconst {
 13402  			break
 13403  		}
 13404  		c := auxIntToInt64(x.AuxInt)
 13405  		y := x.Args[0]
 13406  		if !(x.Uses == 1) {
 13407  			break
 13408  		}
 13409  		v.reset(OpARM64NotEqual)
 13410  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 13411  		v0.AuxInt = int32ToAuxInt(int32(c))
 13412  		v0.AddArg(y)
 13413  		v.AddArg(v0)
 13414  		return true
 13415  	}
 13416  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 13417  	// cond: z.Uses == 1
 13418  	// result: (NotEqual (TSTW x y))
 13419  	for {
 13420  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13421  			break
 13422  		}
 13423  		z := v_0.Args[0]
 13424  		if z.Op != OpARM64AND {
 13425  			break
 13426  		}
 13427  		y := z.Args[1]
 13428  		x := z.Args[0]
 13429  		if !(z.Uses == 1) {
 13430  			break
 13431  		}
 13432  		v.reset(OpARM64NotEqual)
 13433  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 13434  		v0.AddArg2(x, y)
 13435  		v.AddArg(v0)
 13436  		return true
 13437  	}
 13438  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 13439  	// cond: x.Uses == 1
 13440  	// result: (NotEqual (TSTconst [c] y))
 13441  	for {
 13442  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13443  			break
 13444  		}
 13445  		x := v_0.Args[0]
 13446  		if x.Op != OpARM64ANDconst {
 13447  			break
 13448  		}
 13449  		c := auxIntToInt64(x.AuxInt)
 13450  		y := x.Args[0]
 13451  		if !(x.Uses == 1) {
 13452  			break
 13453  		}
 13454  		v.reset(OpARM64NotEqual)
 13455  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 13456  		v0.AuxInt = int64ToAuxInt(c)
 13457  		v0.AddArg(y)
 13458  		v.AddArg(v0)
 13459  		return true
 13460  	}
 13461  	// match: (NotEqual (CMP x z:(NEG y)))
 13462  	// cond: z.Uses == 1
 13463  	// result: (NotEqual (CMN x y))
 13464  	for {
 13465  		if v_0.Op != OpARM64CMP {
 13466  			break
 13467  		}
 13468  		_ = v_0.Args[1]
 13469  		x := v_0.Args[0]
 13470  		z := v_0.Args[1]
 13471  		if z.Op != OpARM64NEG {
 13472  			break
 13473  		}
 13474  		y := z.Args[0]
 13475  		if !(z.Uses == 1) {
 13476  			break
 13477  		}
 13478  		v.reset(OpARM64NotEqual)
 13479  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13480  		v0.AddArg2(x, y)
 13481  		v.AddArg(v0)
 13482  		return true
 13483  	}
 13484  	// match: (NotEqual (CMPW x z:(NEG y)))
 13485  	// cond: z.Uses == 1
 13486  	// result: (NotEqual (CMNW x y))
 13487  	for {
 13488  		if v_0.Op != OpARM64CMPW {
 13489  			break
 13490  		}
 13491  		_ = v_0.Args[1]
 13492  		x := v_0.Args[0]
 13493  		z := v_0.Args[1]
 13494  		if z.Op != OpARM64NEG {
 13495  			break
 13496  		}
 13497  		y := z.Args[0]
 13498  		if !(z.Uses == 1) {
 13499  			break
 13500  		}
 13501  		v.reset(OpARM64NotEqual)
 13502  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13503  		v0.AddArg2(x, y)
 13504  		v.AddArg(v0)
 13505  		return true
 13506  	}
 13507  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 13508  	// cond: x.Uses == 1
 13509  	// result: (NotEqual (CMNconst [c] y))
 13510  	for {
 13511  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13512  			break
 13513  		}
 13514  		x := v_0.Args[0]
 13515  		if x.Op != OpARM64ADDconst {
 13516  			break
 13517  		}
 13518  		c := auxIntToInt64(x.AuxInt)
 13519  		y := x.Args[0]
 13520  		if !(x.Uses == 1) {
 13521  			break
 13522  		}
 13523  		v.reset(OpARM64NotEqual)
 13524  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 13525  		v0.AuxInt = int64ToAuxInt(c)
 13526  		v0.AddArg(y)
 13527  		v.AddArg(v0)
 13528  		return true
 13529  	}
 13530  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 13531  	// cond: x.Uses == 1
 13532  	// result: (NotEqual (CMNWconst [int32(c)] y))
 13533  	for {
 13534  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13535  			break
 13536  		}
 13537  		x := v_0.Args[0]
 13538  		if x.Op != OpARM64ADDconst {
 13539  			break
 13540  		}
 13541  		c := auxIntToInt64(x.AuxInt)
 13542  		y := x.Args[0]
 13543  		if !(x.Uses == 1) {
 13544  			break
 13545  		}
 13546  		v.reset(OpARM64NotEqual)
 13547  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 13548  		v0.AuxInt = int32ToAuxInt(int32(c))
 13549  		v0.AddArg(y)
 13550  		v.AddArg(v0)
 13551  		return true
 13552  	}
 13553  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 13554  	// cond: z.Uses == 1
 13555  	// result: (NotEqual (CMN x y))
 13556  	for {
 13557  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13558  			break
 13559  		}
 13560  		z := v_0.Args[0]
 13561  		if z.Op != OpARM64ADD {
 13562  			break
 13563  		}
 13564  		y := z.Args[1]
 13565  		x := z.Args[0]
 13566  		if !(z.Uses == 1) {
 13567  			break
 13568  		}
 13569  		v.reset(OpARM64NotEqual)
 13570  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13571  		v0.AddArg2(x, y)
 13572  		v.AddArg(v0)
 13573  		return true
 13574  	}
 13575  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 13576  	// cond: z.Uses == 1
 13577  	// result: (NotEqual (CMNW x y))
 13578  	for {
 13579  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13580  			break
 13581  		}
 13582  		z := v_0.Args[0]
 13583  		if z.Op != OpARM64ADD {
 13584  			break
 13585  		}
 13586  		y := z.Args[1]
 13587  		x := z.Args[0]
 13588  		if !(z.Uses == 1) {
 13589  			break
 13590  		}
 13591  		v.reset(OpARM64NotEqual)
 13592  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13593  		v0.AddArg2(x, y)
 13594  		v.AddArg(v0)
 13595  		return true
 13596  	}
 13597  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 13598  	// cond: z.Uses == 1
 13599  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 13600  	for {
 13601  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13602  			break
 13603  		}
 13604  		z := v_0.Args[0]
 13605  		if z.Op != OpARM64MADD {
 13606  			break
 13607  		}
 13608  		y := z.Args[2]
 13609  		a := z.Args[0]
 13610  		x := z.Args[1]
 13611  		if !(z.Uses == 1) {
 13612  			break
 13613  		}
 13614  		v.reset(OpARM64NotEqual)
 13615  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13616  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13617  		v1.AddArg2(x, y)
 13618  		v0.AddArg2(a, v1)
 13619  		v.AddArg(v0)
 13620  		return true
 13621  	}
 13622  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 13623  	// cond: z.Uses == 1
 13624  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 13625  	for {
 13626  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13627  			break
 13628  		}
 13629  		z := v_0.Args[0]
 13630  		if z.Op != OpARM64MSUB {
 13631  			break
 13632  		}
 13633  		y := z.Args[2]
 13634  		a := z.Args[0]
 13635  		x := z.Args[1]
 13636  		if !(z.Uses == 1) {
 13637  			break
 13638  		}
 13639  		v.reset(OpARM64NotEqual)
 13640  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 13641  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13642  		v1.AddArg2(x, y)
 13643  		v0.AddArg2(a, v1)
 13644  		v.AddArg(v0)
 13645  		return true
 13646  	}
 13647  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 13648  	// cond: z.Uses == 1
 13649  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 13650  	for {
 13651  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13652  			break
 13653  		}
 13654  		z := v_0.Args[0]
 13655  		if z.Op != OpARM64MADDW {
 13656  			break
 13657  		}
 13658  		y := z.Args[2]
 13659  		a := z.Args[0]
 13660  		x := z.Args[1]
 13661  		if !(z.Uses == 1) {
 13662  			break
 13663  		}
 13664  		v.reset(OpARM64NotEqual)
 13665  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13666  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13667  		v1.AddArg2(x, y)
 13668  		v0.AddArg2(a, v1)
 13669  		v.AddArg(v0)
 13670  		return true
 13671  	}
 13672  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 13673  	// cond: z.Uses == 1
 13674  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 13675  	for {
 13676  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13677  			break
 13678  		}
 13679  		z := v_0.Args[0]
 13680  		if z.Op != OpARM64MSUBW {
 13681  			break
 13682  		}
 13683  		y := z.Args[2]
 13684  		a := z.Args[0]
 13685  		x := z.Args[1]
 13686  		if !(z.Uses == 1) {
 13687  			break
 13688  		}
 13689  		v.reset(OpARM64NotEqual)
 13690  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 13691  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13692  		v1.AddArg2(x, y)
 13693  		v0.AddArg2(a, v1)
 13694  		v.AddArg(v0)
 13695  		return true
 13696  	}
 13697  	// match: (NotEqual (FlagConstant [fc]))
 13698  	// result: (MOVDconst [b2i(fc.ne())])
 13699  	for {
 13700  		if v_0.Op != OpARM64FlagConstant {
 13701  			break
 13702  		}
 13703  		fc := auxIntToFlagConstant(v_0.AuxInt)
 13704  		v.reset(OpARM64MOVDconst)
 13705  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 13706  		return true
 13707  	}
 13708  	// match: (NotEqual (InvertFlags x))
 13709  	// result: (NotEqual x)
 13710  	for {
 13711  		if v_0.Op != OpARM64InvertFlags {
 13712  			break
 13713  		}
 13714  		x := v_0.Args[0]
 13715  		v.reset(OpARM64NotEqual)
 13716  		v.AddArg(x)
 13717  		return true
 13718  	}
 13719  	return false
 13720  }
 13721  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 13722  	v_1 := v.Args[1]
 13723  	v_0 := v.Args[0]
 13724  	// match: (OR x (MOVDconst [c]))
 13725  	// result: (ORconst [c] x)
 13726  	for {
 13727  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13728  			x := v_0
 13729  			if v_1.Op != OpARM64MOVDconst {
 13730  				continue
 13731  			}
 13732  			c := auxIntToInt64(v_1.AuxInt)
 13733  			v.reset(OpARM64ORconst)
 13734  			v.AuxInt = int64ToAuxInt(c)
 13735  			v.AddArg(x)
 13736  			return true
 13737  		}
 13738  		break
 13739  	}
 13740  	// match: (OR x x)
 13741  	// result: x
 13742  	for {
 13743  		x := v_0
 13744  		if x != v_1 {
 13745  			break
 13746  		}
 13747  		v.copyOf(x)
 13748  		return true
 13749  	}
 13750  	// match: (OR x (MVN y))
 13751  	// result: (ORN x y)
 13752  	for {
 13753  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13754  			x := v_0
 13755  			if v_1.Op != OpARM64MVN {
 13756  				continue
 13757  			}
 13758  			y := v_1.Args[0]
 13759  			v.reset(OpARM64ORN)
 13760  			v.AddArg2(x, y)
 13761  			return true
 13762  		}
 13763  		break
 13764  	}
 13765  	// match: (OR x0 x1:(SLLconst [c] y))
 13766  	// cond: clobberIfDead(x1)
 13767  	// result: (ORshiftLL x0 y [c])
 13768  	for {
 13769  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13770  			x0 := v_0
 13771  			x1 := v_1
 13772  			if x1.Op != OpARM64SLLconst {
 13773  				continue
 13774  			}
 13775  			c := auxIntToInt64(x1.AuxInt)
 13776  			y := x1.Args[0]
 13777  			if !(clobberIfDead(x1)) {
 13778  				continue
 13779  			}
 13780  			v.reset(OpARM64ORshiftLL)
 13781  			v.AuxInt = int64ToAuxInt(c)
 13782  			v.AddArg2(x0, y)
 13783  			return true
 13784  		}
 13785  		break
 13786  	}
 13787  	// match: (OR x0 x1:(SRLconst [c] y))
 13788  	// cond: clobberIfDead(x1)
 13789  	// result: (ORshiftRL x0 y [c])
 13790  	for {
 13791  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13792  			x0 := v_0
 13793  			x1 := v_1
 13794  			if x1.Op != OpARM64SRLconst {
 13795  				continue
 13796  			}
 13797  			c := auxIntToInt64(x1.AuxInt)
 13798  			y := x1.Args[0]
 13799  			if !(clobberIfDead(x1)) {
 13800  				continue
 13801  			}
 13802  			v.reset(OpARM64ORshiftRL)
 13803  			v.AuxInt = int64ToAuxInt(c)
 13804  			v.AddArg2(x0, y)
 13805  			return true
 13806  		}
 13807  		break
 13808  	}
 13809  	// match: (OR x0 x1:(SRAconst [c] y))
 13810  	// cond: clobberIfDead(x1)
 13811  	// result: (ORshiftRA x0 y [c])
 13812  	for {
 13813  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13814  			x0 := v_0
 13815  			x1 := v_1
 13816  			if x1.Op != OpARM64SRAconst {
 13817  				continue
 13818  			}
 13819  			c := auxIntToInt64(x1.AuxInt)
 13820  			y := x1.Args[0]
 13821  			if !(clobberIfDead(x1)) {
 13822  				continue
 13823  			}
 13824  			v.reset(OpARM64ORshiftRA)
 13825  			v.AuxInt = int64ToAuxInt(c)
 13826  			v.AddArg2(x0, y)
 13827  			return true
 13828  		}
 13829  		break
 13830  	}
 13831  	// match: (OR x0 x1:(RORconst [c] y))
 13832  	// cond: clobberIfDead(x1)
 13833  	// result: (ORshiftRO x0 y [c])
 13834  	for {
 13835  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13836  			x0 := v_0
 13837  			x1 := v_1
 13838  			if x1.Op != OpARM64RORconst {
 13839  				continue
 13840  			}
 13841  			c := auxIntToInt64(x1.AuxInt)
 13842  			y := x1.Args[0]
 13843  			if !(clobberIfDead(x1)) {
 13844  				continue
 13845  			}
 13846  			v.reset(OpARM64ORshiftRO)
 13847  			v.AuxInt = int64ToAuxInt(c)
 13848  			v.AddArg2(x0, y)
 13849  			return true
 13850  		}
 13851  		break
 13852  	}
 13853  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 13854  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 13855  	// result: (BFI [bfc] y x)
 13856  	for {
 13857  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13858  			if v_0.Op != OpARM64UBFIZ {
 13859  				continue
 13860  			}
 13861  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13862  			x := v_0.Args[0]
 13863  			if v_1.Op != OpARM64ANDconst {
 13864  				continue
 13865  			}
 13866  			ac := auxIntToInt64(v_1.AuxInt)
 13867  			y := v_1.Args[0]
 13868  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 13869  				continue
 13870  			}
 13871  			v.reset(OpARM64BFI)
 13872  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13873  			v.AddArg2(y, x)
 13874  			return true
 13875  		}
 13876  		break
 13877  	}
 13878  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 13879  	// cond: ac == ^(1<<uint(bfc.width())-1)
 13880  	// result: (BFXIL [bfc] y x)
 13881  	for {
 13882  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13883  			if v_0.Op != OpARM64UBFX {
 13884  				continue
 13885  			}
 13886  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13887  			x := v_0.Args[0]
 13888  			if v_1.Op != OpARM64ANDconst {
 13889  				continue
 13890  			}
 13891  			ac := auxIntToInt64(v_1.AuxInt)
 13892  			y := v_1.Args[0]
 13893  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 13894  				continue
 13895  			}
 13896  			v.reset(OpARM64BFXIL)
 13897  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13898  			v.AddArg2(y, x)
 13899  			return true
 13900  		}
 13901  		break
 13902  	}
 13903  	return false
 13904  }
 13905  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 13906  	v_1 := v.Args[1]
 13907  	v_0 := v.Args[0]
 13908  	// match: (ORN x (MOVDconst [c]))
 13909  	// result: (ORconst [^c] x)
 13910  	for {
 13911  		x := v_0
 13912  		if v_1.Op != OpARM64MOVDconst {
 13913  			break
 13914  		}
 13915  		c := auxIntToInt64(v_1.AuxInt)
 13916  		v.reset(OpARM64ORconst)
 13917  		v.AuxInt = int64ToAuxInt(^c)
 13918  		v.AddArg(x)
 13919  		return true
 13920  	}
 13921  	// match: (ORN x x)
 13922  	// result: (MOVDconst [-1])
 13923  	for {
 13924  		x := v_0
 13925  		if x != v_1 {
 13926  			break
 13927  		}
 13928  		v.reset(OpARM64MOVDconst)
 13929  		v.AuxInt = int64ToAuxInt(-1)
 13930  		return true
 13931  	}
 13932  	// match: (ORN x0 x1:(SLLconst [c] y))
 13933  	// cond: clobberIfDead(x1)
 13934  	// result: (ORNshiftLL x0 y [c])
 13935  	for {
 13936  		x0 := v_0
 13937  		x1 := v_1
 13938  		if x1.Op != OpARM64SLLconst {
 13939  			break
 13940  		}
 13941  		c := auxIntToInt64(x1.AuxInt)
 13942  		y := x1.Args[0]
 13943  		if !(clobberIfDead(x1)) {
 13944  			break
 13945  		}
 13946  		v.reset(OpARM64ORNshiftLL)
 13947  		v.AuxInt = int64ToAuxInt(c)
 13948  		v.AddArg2(x0, y)
 13949  		return true
 13950  	}
 13951  	// match: (ORN x0 x1:(SRLconst [c] y))
 13952  	// cond: clobberIfDead(x1)
 13953  	// result: (ORNshiftRL x0 y [c])
 13954  	for {
 13955  		x0 := v_0
 13956  		x1 := v_1
 13957  		if x1.Op != OpARM64SRLconst {
 13958  			break
 13959  		}
 13960  		c := auxIntToInt64(x1.AuxInt)
 13961  		y := x1.Args[0]
 13962  		if !(clobberIfDead(x1)) {
 13963  			break
 13964  		}
 13965  		v.reset(OpARM64ORNshiftRL)
 13966  		v.AuxInt = int64ToAuxInt(c)
 13967  		v.AddArg2(x0, y)
 13968  		return true
 13969  	}
 13970  	// match: (ORN x0 x1:(SRAconst [c] y))
 13971  	// cond: clobberIfDead(x1)
 13972  	// result: (ORNshiftRA x0 y [c])
 13973  	for {
 13974  		x0 := v_0
 13975  		x1 := v_1
 13976  		if x1.Op != OpARM64SRAconst {
 13977  			break
 13978  		}
 13979  		c := auxIntToInt64(x1.AuxInt)
 13980  		y := x1.Args[0]
 13981  		if !(clobberIfDead(x1)) {
 13982  			break
 13983  		}
 13984  		v.reset(OpARM64ORNshiftRA)
 13985  		v.AuxInt = int64ToAuxInt(c)
 13986  		v.AddArg2(x0, y)
 13987  		return true
 13988  	}
 13989  	// match: (ORN x0 x1:(RORconst [c] y))
 13990  	// cond: clobberIfDead(x1)
 13991  	// result: (ORNshiftRO x0 y [c])
 13992  	for {
 13993  		x0 := v_0
 13994  		x1 := v_1
 13995  		if x1.Op != OpARM64RORconst {
 13996  			break
 13997  		}
 13998  		c := auxIntToInt64(x1.AuxInt)
 13999  		y := x1.Args[0]
 14000  		if !(clobberIfDead(x1)) {
 14001  			break
 14002  		}
 14003  		v.reset(OpARM64ORNshiftRO)
 14004  		v.AuxInt = int64ToAuxInt(c)
 14005  		v.AddArg2(x0, y)
 14006  		return true
 14007  	}
 14008  	return false
 14009  }
 14010  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 14011  	v_1 := v.Args[1]
 14012  	v_0 := v.Args[0]
 14013  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 14014  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 14015  	for {
 14016  		d := auxIntToInt64(v.AuxInt)
 14017  		x := v_0
 14018  		if v_1.Op != OpARM64MOVDconst {
 14019  			break
 14020  		}
 14021  		c := auxIntToInt64(v_1.AuxInt)
 14022  		v.reset(OpARM64ORconst)
 14023  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 14024  		v.AddArg(x)
 14025  		return true
 14026  	}
 14027  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 14028  	// result: (MOVDconst [-1])
 14029  	for {
 14030  		c := auxIntToInt64(v.AuxInt)
 14031  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 14032  			break
 14033  		}
 14034  		x := v_0.Args[0]
 14035  		if x != v_1 {
 14036  			break
 14037  		}
 14038  		v.reset(OpARM64MOVDconst)
 14039  		v.AuxInt = int64ToAuxInt(-1)
 14040  		return true
 14041  	}
 14042  	return false
 14043  }
 14044  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 14045  	v_1 := v.Args[1]
 14046  	v_0 := v.Args[0]
 14047  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 14048  	// result: (ORconst x [^(c>>uint64(d))])
 14049  	for {
 14050  		d := auxIntToInt64(v.AuxInt)
 14051  		x := v_0
 14052  		if v_1.Op != OpARM64MOVDconst {
 14053  			break
 14054  		}
 14055  		c := auxIntToInt64(v_1.AuxInt)
 14056  		v.reset(OpARM64ORconst)
 14057  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 14058  		v.AddArg(x)
 14059  		return true
 14060  	}
 14061  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 14062  	// result: (MOVDconst [-1])
 14063  	for {
 14064  		c := auxIntToInt64(v.AuxInt)
 14065  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 14066  			break
 14067  		}
 14068  		x := v_0.Args[0]
 14069  		if x != v_1 {
 14070  			break
 14071  		}
 14072  		v.reset(OpARM64MOVDconst)
 14073  		v.AuxInt = int64ToAuxInt(-1)
 14074  		return true
 14075  	}
 14076  	return false
 14077  }
 14078  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 14079  	v_1 := v.Args[1]
 14080  	v_0 := v.Args[0]
 14081  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 14082  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 14083  	for {
 14084  		d := auxIntToInt64(v.AuxInt)
 14085  		x := v_0
 14086  		if v_1.Op != OpARM64MOVDconst {
 14087  			break
 14088  		}
 14089  		c := auxIntToInt64(v_1.AuxInt)
 14090  		v.reset(OpARM64ORconst)
 14091  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 14092  		v.AddArg(x)
 14093  		return true
 14094  	}
 14095  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 14096  	// result: (MOVDconst [-1])
 14097  	for {
 14098  		c := auxIntToInt64(v.AuxInt)
 14099  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 14100  			break
 14101  		}
 14102  		x := v_0.Args[0]
 14103  		if x != v_1 {
 14104  			break
 14105  		}
 14106  		v.reset(OpARM64MOVDconst)
 14107  		v.AuxInt = int64ToAuxInt(-1)
 14108  		return true
 14109  	}
 14110  	return false
 14111  }
 14112  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 14113  	v_1 := v.Args[1]
 14114  	v_0 := v.Args[0]
 14115  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 14116  	// result: (ORconst x [^rotateRight64(c, d)])
 14117  	for {
 14118  		d := auxIntToInt64(v.AuxInt)
 14119  		x := v_0
 14120  		if v_1.Op != OpARM64MOVDconst {
 14121  			break
 14122  		}
 14123  		c := auxIntToInt64(v_1.AuxInt)
 14124  		v.reset(OpARM64ORconst)
 14125  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 14126  		v.AddArg(x)
 14127  		return true
 14128  	}
 14129  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 14130  	// result: (MOVDconst [-1])
 14131  	for {
 14132  		c := auxIntToInt64(v.AuxInt)
 14133  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 14134  			break
 14135  		}
 14136  		x := v_0.Args[0]
 14137  		if x != v_1 {
 14138  			break
 14139  		}
 14140  		v.reset(OpARM64MOVDconst)
 14141  		v.AuxInt = int64ToAuxInt(-1)
 14142  		return true
 14143  	}
 14144  	return false
 14145  }
 14146  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 14147  	v_0 := v.Args[0]
 14148  	// match: (ORconst [0] x)
 14149  	// result: x
 14150  	for {
 14151  		if auxIntToInt64(v.AuxInt) != 0 {
 14152  			break
 14153  		}
 14154  		x := v_0
 14155  		v.copyOf(x)
 14156  		return true
 14157  	}
 14158  	// match: (ORconst [-1] _)
 14159  	// result: (MOVDconst [-1])
 14160  	for {
 14161  		if auxIntToInt64(v.AuxInt) != -1 {
 14162  			break
 14163  		}
 14164  		v.reset(OpARM64MOVDconst)
 14165  		v.AuxInt = int64ToAuxInt(-1)
 14166  		return true
 14167  	}
 14168  	// match: (ORconst [c] (MOVDconst [d]))
 14169  	// result: (MOVDconst [c|d])
 14170  	for {
 14171  		c := auxIntToInt64(v.AuxInt)
 14172  		if v_0.Op != OpARM64MOVDconst {
 14173  			break
 14174  		}
 14175  		d := auxIntToInt64(v_0.AuxInt)
 14176  		v.reset(OpARM64MOVDconst)
 14177  		v.AuxInt = int64ToAuxInt(c | d)
 14178  		return true
 14179  	}
 14180  	// match: (ORconst [c] (ORconst [d] x))
 14181  	// result: (ORconst [c|d] x)
 14182  	for {
 14183  		c := auxIntToInt64(v.AuxInt)
 14184  		if v_0.Op != OpARM64ORconst {
 14185  			break
 14186  		}
 14187  		d := auxIntToInt64(v_0.AuxInt)
 14188  		x := v_0.Args[0]
 14189  		v.reset(OpARM64ORconst)
 14190  		v.AuxInt = int64ToAuxInt(c | d)
 14191  		v.AddArg(x)
 14192  		return true
 14193  	}
 14194  	// match: (ORconst [c1] (ANDconst [c2] x))
 14195  	// cond: c2|c1 == ^0
 14196  	// result: (ORconst [c1] x)
 14197  	for {
 14198  		c1 := auxIntToInt64(v.AuxInt)
 14199  		if v_0.Op != OpARM64ANDconst {
 14200  			break
 14201  		}
 14202  		c2 := auxIntToInt64(v_0.AuxInt)
 14203  		x := v_0.Args[0]
 14204  		if !(c2|c1 == ^0) {
 14205  			break
 14206  		}
 14207  		v.reset(OpARM64ORconst)
 14208  		v.AuxInt = int64ToAuxInt(c1)
 14209  		v.AddArg(x)
 14210  		return true
 14211  	}
 14212  	return false
 14213  }
 14214  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 14215  	v_1 := v.Args[1]
 14216  	v_0 := v.Args[0]
 14217  	b := v.Block
 14218  	typ := &b.Func.Config.Types
 14219  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 14220  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 14221  	for {
 14222  		d := auxIntToInt64(v.AuxInt)
 14223  		if v_0.Op != OpARM64MOVDconst {
 14224  			break
 14225  		}
 14226  		c := auxIntToInt64(v_0.AuxInt)
 14227  		x := v_1
 14228  		v.reset(OpARM64ORconst)
 14229  		v.AuxInt = int64ToAuxInt(c)
 14230  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 14231  		v0.AuxInt = int64ToAuxInt(d)
 14232  		v0.AddArg(x)
 14233  		v.AddArg(v0)
 14234  		return true
 14235  	}
 14236  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 14237  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 14238  	for {
 14239  		d := auxIntToInt64(v.AuxInt)
 14240  		x := v_0
 14241  		if v_1.Op != OpARM64MOVDconst {
 14242  			break
 14243  		}
 14244  		c := auxIntToInt64(v_1.AuxInt)
 14245  		v.reset(OpARM64ORconst)
 14246  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 14247  		v.AddArg(x)
 14248  		return true
 14249  	}
 14250  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 14251  	// result: y
 14252  	for {
 14253  		c := auxIntToInt64(v.AuxInt)
 14254  		y := v_0
 14255  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 14256  			break
 14257  		}
 14258  		x := y.Args[0]
 14259  		if x != v_1 {
 14260  			break
 14261  		}
 14262  		v.copyOf(y)
 14263  		return true
 14264  	}
 14265  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 14266  	// result: (REV16W x)
 14267  	for {
 14268  		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) {
 14269  			break
 14270  		}
 14271  		x := v_0.Args[0]
 14272  		if x != v_1 {
 14273  			break
 14274  		}
 14275  		v.reset(OpARM64REV16W)
 14276  		v.AddArg(x)
 14277  		return true
 14278  	}
 14279  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 14280  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 14281  	// result: (REV16W x)
 14282  	for {
 14283  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 14284  			break
 14285  		}
 14286  		v_0_0 := v_0.Args[0]
 14287  		if v_0_0.Op != OpARM64ANDconst {
 14288  			break
 14289  		}
 14290  		c1 := auxIntToInt64(v_0_0.AuxInt)
 14291  		x := v_0_0.Args[0]
 14292  		if v_1.Op != OpARM64ANDconst {
 14293  			break
 14294  		}
 14295  		c2 := auxIntToInt64(v_1.AuxInt)
 14296  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 14297  			break
 14298  		}
 14299  		v.reset(OpARM64REV16W)
 14300  		v.AddArg(x)
 14301  		return true
 14302  	}
 14303  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 14304  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 14305  	// result: (REV16 x)
 14306  	for {
 14307  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 14308  			break
 14309  		}
 14310  		v_0_0 := v_0.Args[0]
 14311  		if v_0_0.Op != OpARM64ANDconst {
 14312  			break
 14313  		}
 14314  		c1 := auxIntToInt64(v_0_0.AuxInt)
 14315  		x := v_0_0.Args[0]
 14316  		if v_1.Op != OpARM64ANDconst {
 14317  			break
 14318  		}
 14319  		c2 := auxIntToInt64(v_1.AuxInt)
 14320  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 14321  			break
 14322  		}
 14323  		v.reset(OpARM64REV16)
 14324  		v.AddArg(x)
 14325  		return true
 14326  	}
 14327  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 14328  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 14329  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 14330  	for {
 14331  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 14332  			break
 14333  		}
 14334  		v_0_0 := v_0.Args[0]
 14335  		if v_0_0.Op != OpARM64ANDconst {
 14336  			break
 14337  		}
 14338  		c1 := auxIntToInt64(v_0_0.AuxInt)
 14339  		x := v_0_0.Args[0]
 14340  		if v_1.Op != OpARM64ANDconst {
 14341  			break
 14342  		}
 14343  		c2 := auxIntToInt64(v_1.AuxInt)
 14344  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 14345  			break
 14346  		}
 14347  		v.reset(OpARM64REV16)
 14348  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 14349  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 14350  		v0.AddArg(x)
 14351  		v.AddArg(v0)
 14352  		return true
 14353  	}
 14354  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 14355  	// result: (EXTRconst [64-c] x2 x)
 14356  	for {
 14357  		c := auxIntToInt64(v.AuxInt)
 14358  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 14359  			break
 14360  		}
 14361  		x := v_0.Args[0]
 14362  		x2 := v_1
 14363  		v.reset(OpARM64EXTRconst)
 14364  		v.AuxInt = int64ToAuxInt(64 - c)
 14365  		v.AddArg2(x2, x)
 14366  		return true
 14367  	}
 14368  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 14369  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 14370  	// result: (EXTRWconst [32-c] x2 x)
 14371  	for {
 14372  		t := v.Type
 14373  		c := auxIntToInt64(v.AuxInt)
 14374  		if v_0.Op != OpARM64UBFX {
 14375  			break
 14376  		}
 14377  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14378  		x := v_0.Args[0]
 14379  		x2 := v_1
 14380  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 14381  			break
 14382  		}
 14383  		v.reset(OpARM64EXTRWconst)
 14384  		v.AuxInt = int64ToAuxInt(32 - c)
 14385  		v.AddArg2(x2, x)
 14386  		return true
 14387  	}
 14388  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 14389  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 14390  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 14391  	for {
 14392  		s := auxIntToInt64(v.AuxInt)
 14393  		if v_0.Op != OpARM64ANDconst {
 14394  			break
 14395  		}
 14396  		xc := auxIntToInt64(v_0.AuxInt)
 14397  		x := v_0.Args[0]
 14398  		if v_1.Op != OpARM64ANDconst {
 14399  			break
 14400  		}
 14401  		yc := auxIntToInt64(v_1.AuxInt)
 14402  		y := v_1.Args[0]
 14403  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 14404  			break
 14405  		}
 14406  		v.reset(OpARM64BFI)
 14407  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 14408  		v.AddArg2(x, y)
 14409  		return true
 14410  	}
 14411  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 14412  	// cond: sc == bfc.width()
 14413  	// result: (BFXIL [bfc] y x)
 14414  	for {
 14415  		sc := auxIntToInt64(v.AuxInt)
 14416  		if v_0.Op != OpARM64UBFX {
 14417  			break
 14418  		}
 14419  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14420  		x := v_0.Args[0]
 14421  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 14422  			break
 14423  		}
 14424  		y := v_1.Args[0]
 14425  		if !(sc == bfc.width()) {
 14426  			break
 14427  		}
 14428  		v.reset(OpARM64BFXIL)
 14429  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 14430  		v.AddArg2(y, x)
 14431  		return true
 14432  	}
 14433  	return false
 14434  }
 14435  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 14436  	v_1 := v.Args[1]
 14437  	v_0 := v.Args[0]
 14438  	b := v.Block
 14439  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 14440  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 14441  	for {
 14442  		d := auxIntToInt64(v.AuxInt)
 14443  		if v_0.Op != OpARM64MOVDconst {
 14444  			break
 14445  		}
 14446  		c := auxIntToInt64(v_0.AuxInt)
 14447  		x := v_1
 14448  		v.reset(OpARM64ORconst)
 14449  		v.AuxInt = int64ToAuxInt(c)
 14450  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 14451  		v0.AuxInt = int64ToAuxInt(d)
 14452  		v0.AddArg(x)
 14453  		v.AddArg(v0)
 14454  		return true
 14455  	}
 14456  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 14457  	// result: (ORconst x [c>>uint64(d)])
 14458  	for {
 14459  		d := auxIntToInt64(v.AuxInt)
 14460  		x := v_0
 14461  		if v_1.Op != OpARM64MOVDconst {
 14462  			break
 14463  		}
 14464  		c := auxIntToInt64(v_1.AuxInt)
 14465  		v.reset(OpARM64ORconst)
 14466  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 14467  		v.AddArg(x)
 14468  		return true
 14469  	}
 14470  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 14471  	// result: y
 14472  	for {
 14473  		c := auxIntToInt64(v.AuxInt)
 14474  		y := v_0
 14475  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 14476  			break
 14477  		}
 14478  		x := y.Args[0]
 14479  		if x != v_1 {
 14480  			break
 14481  		}
 14482  		v.copyOf(y)
 14483  		return true
 14484  	}
 14485  	return false
 14486  }
 14487  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 14488  	v_1 := v.Args[1]
 14489  	v_0 := v.Args[0]
 14490  	b := v.Block
 14491  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 14492  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 14493  	for {
 14494  		d := auxIntToInt64(v.AuxInt)
 14495  		if v_0.Op != OpARM64MOVDconst {
 14496  			break
 14497  		}
 14498  		c := auxIntToInt64(v_0.AuxInt)
 14499  		x := v_1
 14500  		v.reset(OpARM64ORconst)
 14501  		v.AuxInt = int64ToAuxInt(c)
 14502  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 14503  		v0.AuxInt = int64ToAuxInt(d)
 14504  		v0.AddArg(x)
 14505  		v.AddArg(v0)
 14506  		return true
 14507  	}
 14508  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 14509  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 14510  	for {
 14511  		d := auxIntToInt64(v.AuxInt)
 14512  		x := v_0
 14513  		if v_1.Op != OpARM64MOVDconst {
 14514  			break
 14515  		}
 14516  		c := auxIntToInt64(v_1.AuxInt)
 14517  		v.reset(OpARM64ORconst)
 14518  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 14519  		v.AddArg(x)
 14520  		return true
 14521  	}
 14522  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 14523  	// result: y
 14524  	for {
 14525  		c := auxIntToInt64(v.AuxInt)
 14526  		y := v_0
 14527  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 14528  			break
 14529  		}
 14530  		x := y.Args[0]
 14531  		if x != v_1 {
 14532  			break
 14533  		}
 14534  		v.copyOf(y)
 14535  		return true
 14536  	}
 14537  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 14538  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 14539  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 14540  	for {
 14541  		rc := auxIntToInt64(v.AuxInt)
 14542  		if v_0.Op != OpARM64ANDconst {
 14543  			break
 14544  		}
 14545  		ac := auxIntToInt64(v_0.AuxInt)
 14546  		x := v_0.Args[0]
 14547  		if v_1.Op != OpARM64SLLconst {
 14548  			break
 14549  		}
 14550  		lc := auxIntToInt64(v_1.AuxInt)
 14551  		y := v_1.Args[0]
 14552  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 14553  			break
 14554  		}
 14555  		v.reset(OpARM64BFI)
 14556  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14557  		v.AddArg2(x, y)
 14558  		return true
 14559  	}
 14560  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 14561  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 14562  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 14563  	for {
 14564  		rc := auxIntToInt64(v.AuxInt)
 14565  		if v_0.Op != OpARM64ANDconst {
 14566  			break
 14567  		}
 14568  		ac := auxIntToInt64(v_0.AuxInt)
 14569  		y := v_0.Args[0]
 14570  		if v_1.Op != OpARM64SLLconst {
 14571  			break
 14572  		}
 14573  		lc := auxIntToInt64(v_1.AuxInt)
 14574  		x := v_1.Args[0]
 14575  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 14576  			break
 14577  		}
 14578  		v.reset(OpARM64BFXIL)
 14579  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14580  		v.AddArg2(y, x)
 14581  		return true
 14582  	}
 14583  	return false
 14584  }
 14585  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 14586  	v_1 := v.Args[1]
 14587  	v_0 := v.Args[0]
 14588  	b := v.Block
 14589  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 14590  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 14591  	for {
 14592  		d := auxIntToInt64(v.AuxInt)
 14593  		if v_0.Op != OpARM64MOVDconst {
 14594  			break
 14595  		}
 14596  		c := auxIntToInt64(v_0.AuxInt)
 14597  		x := v_1
 14598  		v.reset(OpARM64ORconst)
 14599  		v.AuxInt = int64ToAuxInt(c)
 14600  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 14601  		v0.AuxInt = int64ToAuxInt(d)
 14602  		v0.AddArg(x)
 14603  		v.AddArg(v0)
 14604  		return true
 14605  	}
 14606  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 14607  	// result: (ORconst x [rotateRight64(c, d)])
 14608  	for {
 14609  		d := auxIntToInt64(v.AuxInt)
 14610  		x := v_0
 14611  		if v_1.Op != OpARM64MOVDconst {
 14612  			break
 14613  		}
 14614  		c := auxIntToInt64(v_1.AuxInt)
 14615  		v.reset(OpARM64ORconst)
 14616  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 14617  		v.AddArg(x)
 14618  		return true
 14619  	}
 14620  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 14621  	// result: y
 14622  	for {
 14623  		c := auxIntToInt64(v.AuxInt)
 14624  		y := v_0
 14625  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 14626  			break
 14627  		}
 14628  		x := y.Args[0]
 14629  		if x != v_1 {
 14630  			break
 14631  		}
 14632  		v.copyOf(y)
 14633  		return true
 14634  	}
 14635  	return false
 14636  }
 14637  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 14638  	v_0 := v.Args[0]
 14639  	// match: (REV (REV p))
 14640  	// result: p
 14641  	for {
 14642  		if v_0.Op != OpARM64REV {
 14643  			break
 14644  		}
 14645  		p := v_0.Args[0]
 14646  		v.copyOf(p)
 14647  		return true
 14648  	}
 14649  	return false
 14650  }
 14651  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 14652  	v_0 := v.Args[0]
 14653  	// match: (REVW (REVW p))
 14654  	// result: p
 14655  	for {
 14656  		if v_0.Op != OpARM64REVW {
 14657  			break
 14658  		}
 14659  		p := v_0.Args[0]
 14660  		v.copyOf(p)
 14661  		return true
 14662  	}
 14663  	return false
 14664  }
 14665  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 14666  	v_1 := v.Args[1]
 14667  	v_0 := v.Args[0]
 14668  	// match: (ROR x (MOVDconst [c]))
 14669  	// result: (RORconst x [c&63])
 14670  	for {
 14671  		x := v_0
 14672  		if v_1.Op != OpARM64MOVDconst {
 14673  			break
 14674  		}
 14675  		c := auxIntToInt64(v_1.AuxInt)
 14676  		v.reset(OpARM64RORconst)
 14677  		v.AuxInt = int64ToAuxInt(c & 63)
 14678  		v.AddArg(x)
 14679  		return true
 14680  	}
 14681  	return false
 14682  }
 14683  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 14684  	v_1 := v.Args[1]
 14685  	v_0 := v.Args[0]
 14686  	// match: (RORW x (MOVDconst [c]))
 14687  	// result: (RORWconst x [c&31])
 14688  	for {
 14689  		x := v_0
 14690  		if v_1.Op != OpARM64MOVDconst {
 14691  			break
 14692  		}
 14693  		c := auxIntToInt64(v_1.AuxInt)
 14694  		v.reset(OpARM64RORWconst)
 14695  		v.AuxInt = int64ToAuxInt(c & 31)
 14696  		v.AddArg(x)
 14697  		return true
 14698  	}
 14699  	return false
 14700  }
 14701  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 14702  	v_2 := v.Args[2]
 14703  	v_1 := v.Args[1]
 14704  	v_0 := v.Args[0]
 14705  	b := v.Block
 14706  	typ := &b.Func.Config.Types
 14707  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 14708  	// result: (SBCSflags x y bo)
 14709  	for {
 14710  		x := v_0
 14711  		y := v_1
 14712  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14713  			break
 14714  		}
 14715  		v_2_0 := v_2.Args[0]
 14716  		if v_2_0.Op != OpARM64NEGSflags {
 14717  			break
 14718  		}
 14719  		v_2_0_0 := v_2_0.Args[0]
 14720  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 14721  			break
 14722  		}
 14723  		v_2_0_0_0 := v_2_0_0.Args[0]
 14724  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 14725  			break
 14726  		}
 14727  		bo := v_2_0_0_0.Args[0]
 14728  		v.reset(OpARM64SBCSflags)
 14729  		v.AddArg3(x, y, bo)
 14730  		return true
 14731  	}
 14732  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 14733  	// result: (SUBSflags x y)
 14734  	for {
 14735  		x := v_0
 14736  		y := v_1
 14737  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14738  			break
 14739  		}
 14740  		v_2_0 := v_2.Args[0]
 14741  		if v_2_0.Op != OpARM64NEGSflags {
 14742  			break
 14743  		}
 14744  		v_2_0_0 := v_2_0.Args[0]
 14745  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 14746  			break
 14747  		}
 14748  		v.reset(OpARM64SUBSflags)
 14749  		v.AddArg2(x, y)
 14750  		return true
 14751  	}
 14752  	return false
 14753  }
 14754  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 14755  	v_0 := v.Args[0]
 14756  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14757  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 14758  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 14759  	for {
 14760  		bfc := auxIntToArm64BitField(v.AuxInt)
 14761  		s := v_0
 14762  		if s.Op != OpARM64SLLconst {
 14763  			break
 14764  		}
 14765  		sc := auxIntToInt64(s.AuxInt)
 14766  		x := s.Args[0]
 14767  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 14768  			break
 14769  		}
 14770  		v.reset(OpARM64SBFX)
 14771  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14772  		v.AddArg(x)
 14773  		return true
 14774  	}
 14775  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14776  	// cond: s.Uses == 1 && sc > bfc.lsb()
 14777  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 14778  	for {
 14779  		bfc := auxIntToArm64BitField(v.AuxInt)
 14780  		s := v_0
 14781  		if s.Op != OpARM64SLLconst {
 14782  			break
 14783  		}
 14784  		sc := auxIntToInt64(s.AuxInt)
 14785  		x := s.Args[0]
 14786  		if !(s.Uses == 1 && sc > bfc.lsb()) {
 14787  			break
 14788  		}
 14789  		v.reset(OpARM64SBFIZ)
 14790  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 14791  		v.AddArg(x)
 14792  		return true
 14793  	}
 14794  	return false
 14795  }
 14796  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 14797  	v_1 := v.Args[1]
 14798  	v_0 := v.Args[0]
 14799  	// match: (SLL x (MOVDconst [c]))
 14800  	// result: (SLLconst x [c&63])
 14801  	for {
 14802  		x := v_0
 14803  		if v_1.Op != OpARM64MOVDconst {
 14804  			break
 14805  		}
 14806  		c := auxIntToInt64(v_1.AuxInt)
 14807  		v.reset(OpARM64SLLconst)
 14808  		v.AuxInt = int64ToAuxInt(c & 63)
 14809  		v.AddArg(x)
 14810  		return true
 14811  	}
 14812  	// match: (SLL x (ANDconst [63] y))
 14813  	// result: (SLL x y)
 14814  	for {
 14815  		x := v_0
 14816  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14817  			break
 14818  		}
 14819  		y := v_1.Args[0]
 14820  		v.reset(OpARM64SLL)
 14821  		v.AddArg2(x, y)
 14822  		return true
 14823  	}
 14824  	return false
 14825  }
 14826  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 14827  	v_0 := v.Args[0]
 14828  	// match: (SLLconst [c] (MOVDconst [d]))
 14829  	// result: (MOVDconst [d<<uint64(c)])
 14830  	for {
 14831  		c := auxIntToInt64(v.AuxInt)
 14832  		if v_0.Op != OpARM64MOVDconst {
 14833  			break
 14834  		}
 14835  		d := auxIntToInt64(v_0.AuxInt)
 14836  		v.reset(OpARM64MOVDconst)
 14837  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 14838  		return true
 14839  	}
 14840  	// match: (SLLconst [c] (SRLconst [c] x))
 14841  	// cond: 0 < c && c < 64
 14842  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 14843  	for {
 14844  		c := auxIntToInt64(v.AuxInt)
 14845  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 14846  			break
 14847  		}
 14848  		x := v_0.Args[0]
 14849  		if !(0 < c && c < 64) {
 14850  			break
 14851  		}
 14852  		v.reset(OpARM64ANDconst)
 14853  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 14854  		v.AddArg(x)
 14855  		return true
 14856  	}
 14857  	// match: (SLLconst [lc] (MOVWreg x))
 14858  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14859  	for {
 14860  		lc := auxIntToInt64(v.AuxInt)
 14861  		if v_0.Op != OpARM64MOVWreg {
 14862  			break
 14863  		}
 14864  		x := v_0.Args[0]
 14865  		v.reset(OpARM64SBFIZ)
 14866  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14867  		v.AddArg(x)
 14868  		return true
 14869  	}
 14870  	// match: (SLLconst [lc] (MOVHreg x))
 14871  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14872  	for {
 14873  		lc := auxIntToInt64(v.AuxInt)
 14874  		if v_0.Op != OpARM64MOVHreg {
 14875  			break
 14876  		}
 14877  		x := v_0.Args[0]
 14878  		v.reset(OpARM64SBFIZ)
 14879  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14880  		v.AddArg(x)
 14881  		return true
 14882  	}
 14883  	// match: (SLLconst [lc] (MOVBreg x))
 14884  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14885  	for {
 14886  		lc := auxIntToInt64(v.AuxInt)
 14887  		if v_0.Op != OpARM64MOVBreg {
 14888  			break
 14889  		}
 14890  		x := v_0.Args[0]
 14891  		v.reset(OpARM64SBFIZ)
 14892  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14893  		v.AddArg(x)
 14894  		return true
 14895  	}
 14896  	// match: (SLLconst [lc] (MOVWUreg x))
 14897  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14898  	for {
 14899  		lc := auxIntToInt64(v.AuxInt)
 14900  		if v_0.Op != OpARM64MOVWUreg {
 14901  			break
 14902  		}
 14903  		x := v_0.Args[0]
 14904  		v.reset(OpARM64UBFIZ)
 14905  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14906  		v.AddArg(x)
 14907  		return true
 14908  	}
 14909  	// match: (SLLconst [lc] (MOVHUreg x))
 14910  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14911  	for {
 14912  		lc := auxIntToInt64(v.AuxInt)
 14913  		if v_0.Op != OpARM64MOVHUreg {
 14914  			break
 14915  		}
 14916  		x := v_0.Args[0]
 14917  		v.reset(OpARM64UBFIZ)
 14918  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14919  		v.AddArg(x)
 14920  		return true
 14921  	}
 14922  	// match: (SLLconst [lc] (MOVBUreg x))
 14923  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14924  	for {
 14925  		lc := auxIntToInt64(v.AuxInt)
 14926  		if v_0.Op != OpARM64MOVBUreg {
 14927  			break
 14928  		}
 14929  		x := v_0.Args[0]
 14930  		v.reset(OpARM64UBFIZ)
 14931  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14932  		v.AddArg(x)
 14933  		return true
 14934  	}
 14935  	// match: (SLLconst [sc] (ANDconst [ac] x))
 14936  	// cond: isARM64BFMask(sc, ac, 0)
 14937  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 14938  	for {
 14939  		sc := auxIntToInt64(v.AuxInt)
 14940  		if v_0.Op != OpARM64ANDconst {
 14941  			break
 14942  		}
 14943  		ac := auxIntToInt64(v_0.AuxInt)
 14944  		x := v_0.Args[0]
 14945  		if !(isARM64BFMask(sc, ac, 0)) {
 14946  			break
 14947  		}
 14948  		v.reset(OpARM64UBFIZ)
 14949  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 14950  		v.AddArg(x)
 14951  		return true
 14952  	}
 14953  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 14954  	// cond: sc+bfc.width()+bfc.lsb() < 64
 14955  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 14956  	for {
 14957  		sc := auxIntToInt64(v.AuxInt)
 14958  		if v_0.Op != OpARM64UBFIZ {
 14959  			break
 14960  		}
 14961  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14962  		x := v_0.Args[0]
 14963  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 14964  			break
 14965  		}
 14966  		v.reset(OpARM64UBFIZ)
 14967  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 14968  		v.AddArg(x)
 14969  		return true
 14970  	}
 14971  	return false
 14972  }
 14973  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 14974  	v_1 := v.Args[1]
 14975  	v_0 := v.Args[0]
 14976  	// match: (SRA x (MOVDconst [c]))
 14977  	// result: (SRAconst x [c&63])
 14978  	for {
 14979  		x := v_0
 14980  		if v_1.Op != OpARM64MOVDconst {
 14981  			break
 14982  		}
 14983  		c := auxIntToInt64(v_1.AuxInt)
 14984  		v.reset(OpARM64SRAconst)
 14985  		v.AuxInt = int64ToAuxInt(c & 63)
 14986  		v.AddArg(x)
 14987  		return true
 14988  	}
 14989  	// match: (SRA x (ANDconst [63] y))
 14990  	// result: (SRA x y)
 14991  	for {
 14992  		x := v_0
 14993  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14994  			break
 14995  		}
 14996  		y := v_1.Args[0]
 14997  		v.reset(OpARM64SRA)
 14998  		v.AddArg2(x, y)
 14999  		return true
 15000  	}
 15001  	return false
 15002  }
 15003  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 15004  	v_0 := v.Args[0]
 15005  	// match: (SRAconst [c] (MOVDconst [d]))
 15006  	// result: (MOVDconst [d>>uint64(c)])
 15007  	for {
 15008  		c := auxIntToInt64(v.AuxInt)
 15009  		if v_0.Op != OpARM64MOVDconst {
 15010  			break
 15011  		}
 15012  		d := auxIntToInt64(v_0.AuxInt)
 15013  		v.reset(OpARM64MOVDconst)
 15014  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 15015  		return true
 15016  	}
 15017  	// match: (SRAconst [rc] (SLLconst [lc] x))
 15018  	// cond: lc > rc
 15019  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 15020  	for {
 15021  		rc := auxIntToInt64(v.AuxInt)
 15022  		if v_0.Op != OpARM64SLLconst {
 15023  			break
 15024  		}
 15025  		lc := auxIntToInt64(v_0.AuxInt)
 15026  		x := v_0.Args[0]
 15027  		if !(lc > rc) {
 15028  			break
 15029  		}
 15030  		v.reset(OpARM64SBFIZ)
 15031  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 15032  		v.AddArg(x)
 15033  		return true
 15034  	}
 15035  	// match: (SRAconst [rc] (SLLconst [lc] x))
 15036  	// cond: lc <= rc
 15037  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 15038  	for {
 15039  		rc := auxIntToInt64(v.AuxInt)
 15040  		if v_0.Op != OpARM64SLLconst {
 15041  			break
 15042  		}
 15043  		lc := auxIntToInt64(v_0.AuxInt)
 15044  		x := v_0.Args[0]
 15045  		if !(lc <= rc) {
 15046  			break
 15047  		}
 15048  		v.reset(OpARM64SBFX)
 15049  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 15050  		v.AddArg(x)
 15051  		return true
 15052  	}
 15053  	// match: (SRAconst [rc] (MOVWreg x))
 15054  	// cond: rc < 32
 15055  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 15056  	for {
 15057  		rc := auxIntToInt64(v.AuxInt)
 15058  		if v_0.Op != OpARM64MOVWreg {
 15059  			break
 15060  		}
 15061  		x := v_0.Args[0]
 15062  		if !(rc < 32) {
 15063  			break
 15064  		}
 15065  		v.reset(OpARM64SBFX)
 15066  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 15067  		v.AddArg(x)
 15068  		return true
 15069  	}
 15070  	// match: (SRAconst [rc] (MOVHreg x))
 15071  	// cond: rc < 16
 15072  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 15073  	for {
 15074  		rc := auxIntToInt64(v.AuxInt)
 15075  		if v_0.Op != OpARM64MOVHreg {
 15076  			break
 15077  		}
 15078  		x := v_0.Args[0]
 15079  		if !(rc < 16) {
 15080  			break
 15081  		}
 15082  		v.reset(OpARM64SBFX)
 15083  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 15084  		v.AddArg(x)
 15085  		return true
 15086  	}
 15087  	// match: (SRAconst [rc] (MOVBreg x))
 15088  	// cond: rc < 8
 15089  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 15090  	for {
 15091  		rc := auxIntToInt64(v.AuxInt)
 15092  		if v_0.Op != OpARM64MOVBreg {
 15093  			break
 15094  		}
 15095  		x := v_0.Args[0]
 15096  		if !(rc < 8) {
 15097  			break
 15098  		}
 15099  		v.reset(OpARM64SBFX)
 15100  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 15101  		v.AddArg(x)
 15102  		return true
 15103  	}
 15104  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 15105  	// cond: sc < bfc.lsb()
 15106  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 15107  	for {
 15108  		sc := auxIntToInt64(v.AuxInt)
 15109  		if v_0.Op != OpARM64SBFIZ {
 15110  			break
 15111  		}
 15112  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15113  		x := v_0.Args[0]
 15114  		if !(sc < bfc.lsb()) {
 15115  			break
 15116  		}
 15117  		v.reset(OpARM64SBFIZ)
 15118  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15119  		v.AddArg(x)
 15120  		return true
 15121  	}
 15122  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 15123  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 15124  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 15125  	for {
 15126  		sc := auxIntToInt64(v.AuxInt)
 15127  		if v_0.Op != OpARM64SBFIZ {
 15128  			break
 15129  		}
 15130  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15131  		x := v_0.Args[0]
 15132  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 15133  			break
 15134  		}
 15135  		v.reset(OpARM64SBFX)
 15136  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 15137  		v.AddArg(x)
 15138  		return true
 15139  	}
 15140  	return false
 15141  }
 15142  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 15143  	v_1 := v.Args[1]
 15144  	v_0 := v.Args[0]
 15145  	// match: (SRL x (MOVDconst [c]))
 15146  	// result: (SRLconst x [c&63])
 15147  	for {
 15148  		x := v_0
 15149  		if v_1.Op != OpARM64MOVDconst {
 15150  			break
 15151  		}
 15152  		c := auxIntToInt64(v_1.AuxInt)
 15153  		v.reset(OpARM64SRLconst)
 15154  		v.AuxInt = int64ToAuxInt(c & 63)
 15155  		v.AddArg(x)
 15156  		return true
 15157  	}
 15158  	// match: (SRL x (ANDconst [63] y))
 15159  	// result: (SRL x y)
 15160  	for {
 15161  		x := v_0
 15162  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 15163  			break
 15164  		}
 15165  		y := v_1.Args[0]
 15166  		v.reset(OpARM64SRL)
 15167  		v.AddArg2(x, y)
 15168  		return true
 15169  	}
 15170  	return false
 15171  }
 15172  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 15173  	v_0 := v.Args[0]
 15174  	// match: (SRLconst [c] (MOVDconst [d]))
 15175  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 15176  	for {
 15177  		c := auxIntToInt64(v.AuxInt)
 15178  		if v_0.Op != OpARM64MOVDconst {
 15179  			break
 15180  		}
 15181  		d := auxIntToInt64(v_0.AuxInt)
 15182  		v.reset(OpARM64MOVDconst)
 15183  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 15184  		return true
 15185  	}
 15186  	// match: (SRLconst [c] (SLLconst [c] x))
 15187  	// cond: 0 < c && c < 64
 15188  	// result: (ANDconst [1<<uint(64-c)-1] x)
 15189  	for {
 15190  		c := auxIntToInt64(v.AuxInt)
 15191  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15192  			break
 15193  		}
 15194  		x := v_0.Args[0]
 15195  		if !(0 < c && c < 64) {
 15196  			break
 15197  		}
 15198  		v.reset(OpARM64ANDconst)
 15199  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 15200  		v.AddArg(x)
 15201  		return true
 15202  	}
 15203  	// match: (SRLconst [rc] (MOVWUreg x))
 15204  	// cond: rc >= 32
 15205  	// result: (MOVDconst [0])
 15206  	for {
 15207  		rc := auxIntToInt64(v.AuxInt)
 15208  		if v_0.Op != OpARM64MOVWUreg {
 15209  			break
 15210  		}
 15211  		if !(rc >= 32) {
 15212  			break
 15213  		}
 15214  		v.reset(OpARM64MOVDconst)
 15215  		v.AuxInt = int64ToAuxInt(0)
 15216  		return true
 15217  	}
 15218  	// match: (SRLconst [rc] (MOVHUreg x))
 15219  	// cond: rc >= 16
 15220  	// result: (MOVDconst [0])
 15221  	for {
 15222  		rc := auxIntToInt64(v.AuxInt)
 15223  		if v_0.Op != OpARM64MOVHUreg {
 15224  			break
 15225  		}
 15226  		if !(rc >= 16) {
 15227  			break
 15228  		}
 15229  		v.reset(OpARM64MOVDconst)
 15230  		v.AuxInt = int64ToAuxInt(0)
 15231  		return true
 15232  	}
 15233  	// match: (SRLconst [rc] (MOVBUreg x))
 15234  	// cond: rc >= 8
 15235  	// result: (MOVDconst [0])
 15236  	for {
 15237  		rc := auxIntToInt64(v.AuxInt)
 15238  		if v_0.Op != OpARM64MOVBUreg {
 15239  			break
 15240  		}
 15241  		if !(rc >= 8) {
 15242  			break
 15243  		}
 15244  		v.reset(OpARM64MOVDconst)
 15245  		v.AuxInt = int64ToAuxInt(0)
 15246  		return true
 15247  	}
 15248  	// match: (SRLconst [rc] (SLLconst [lc] x))
 15249  	// cond: lc > rc
 15250  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 15251  	for {
 15252  		rc := auxIntToInt64(v.AuxInt)
 15253  		if v_0.Op != OpARM64SLLconst {
 15254  			break
 15255  		}
 15256  		lc := auxIntToInt64(v_0.AuxInt)
 15257  		x := v_0.Args[0]
 15258  		if !(lc > rc) {
 15259  			break
 15260  		}
 15261  		v.reset(OpARM64UBFIZ)
 15262  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 15263  		v.AddArg(x)
 15264  		return true
 15265  	}
 15266  	// match: (SRLconst [rc] (SLLconst [lc] x))
 15267  	// cond: lc < rc
 15268  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 15269  	for {
 15270  		rc := auxIntToInt64(v.AuxInt)
 15271  		if v_0.Op != OpARM64SLLconst {
 15272  			break
 15273  		}
 15274  		lc := auxIntToInt64(v_0.AuxInt)
 15275  		x := v_0.Args[0]
 15276  		if !(lc < rc) {
 15277  			break
 15278  		}
 15279  		v.reset(OpARM64UBFX)
 15280  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 15281  		v.AddArg(x)
 15282  		return true
 15283  	}
 15284  	// match: (SRLconst [rc] (MOVWUreg x))
 15285  	// cond: rc < 32
 15286  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 15287  	for {
 15288  		rc := auxIntToInt64(v.AuxInt)
 15289  		if v_0.Op != OpARM64MOVWUreg {
 15290  			break
 15291  		}
 15292  		x := v_0.Args[0]
 15293  		if !(rc < 32) {
 15294  			break
 15295  		}
 15296  		v.reset(OpARM64UBFX)
 15297  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 15298  		v.AddArg(x)
 15299  		return true
 15300  	}
 15301  	// match: (SRLconst [rc] (MOVHUreg x))
 15302  	// cond: rc < 16
 15303  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 15304  	for {
 15305  		rc := auxIntToInt64(v.AuxInt)
 15306  		if v_0.Op != OpARM64MOVHUreg {
 15307  			break
 15308  		}
 15309  		x := v_0.Args[0]
 15310  		if !(rc < 16) {
 15311  			break
 15312  		}
 15313  		v.reset(OpARM64UBFX)
 15314  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 15315  		v.AddArg(x)
 15316  		return true
 15317  	}
 15318  	// match: (SRLconst [rc] (MOVBUreg x))
 15319  	// cond: rc < 8
 15320  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 15321  	for {
 15322  		rc := auxIntToInt64(v.AuxInt)
 15323  		if v_0.Op != OpARM64MOVBUreg {
 15324  			break
 15325  		}
 15326  		x := v_0.Args[0]
 15327  		if !(rc < 8) {
 15328  			break
 15329  		}
 15330  		v.reset(OpARM64UBFX)
 15331  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 15332  		v.AddArg(x)
 15333  		return true
 15334  	}
 15335  	// match: (SRLconst [sc] (ANDconst [ac] x))
 15336  	// cond: isARM64BFMask(sc, ac, sc)
 15337  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 15338  	for {
 15339  		sc := auxIntToInt64(v.AuxInt)
 15340  		if v_0.Op != OpARM64ANDconst {
 15341  			break
 15342  		}
 15343  		ac := auxIntToInt64(v_0.AuxInt)
 15344  		x := v_0.Args[0]
 15345  		if !(isARM64BFMask(sc, ac, sc)) {
 15346  			break
 15347  		}
 15348  		v.reset(OpARM64UBFX)
 15349  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 15350  		v.AddArg(x)
 15351  		return true
 15352  	}
 15353  	// match: (SRLconst [sc] (UBFX [bfc] x))
 15354  	// cond: sc < bfc.width()
 15355  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 15356  	for {
 15357  		sc := auxIntToInt64(v.AuxInt)
 15358  		if v_0.Op != OpARM64UBFX {
 15359  			break
 15360  		}
 15361  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15362  		x := v_0.Args[0]
 15363  		if !(sc < bfc.width()) {
 15364  			break
 15365  		}
 15366  		v.reset(OpARM64UBFX)
 15367  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 15368  		v.AddArg(x)
 15369  		return true
 15370  	}
 15371  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15372  	// cond: sc == bfc.lsb()
 15373  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 15374  	for {
 15375  		sc := auxIntToInt64(v.AuxInt)
 15376  		if v_0.Op != OpARM64UBFIZ {
 15377  			break
 15378  		}
 15379  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15380  		x := v_0.Args[0]
 15381  		if !(sc == bfc.lsb()) {
 15382  			break
 15383  		}
 15384  		v.reset(OpARM64ANDconst)
 15385  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 15386  		v.AddArg(x)
 15387  		return true
 15388  	}
 15389  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15390  	// cond: sc < bfc.lsb()
 15391  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 15392  	for {
 15393  		sc := auxIntToInt64(v.AuxInt)
 15394  		if v_0.Op != OpARM64UBFIZ {
 15395  			break
 15396  		}
 15397  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15398  		x := v_0.Args[0]
 15399  		if !(sc < bfc.lsb()) {
 15400  			break
 15401  		}
 15402  		v.reset(OpARM64UBFIZ)
 15403  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15404  		v.AddArg(x)
 15405  		return true
 15406  	}
 15407  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 15408  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 15409  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 15410  	for {
 15411  		sc := auxIntToInt64(v.AuxInt)
 15412  		if v_0.Op != OpARM64UBFIZ {
 15413  			break
 15414  		}
 15415  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15416  		x := v_0.Args[0]
 15417  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 15418  			break
 15419  		}
 15420  		v.reset(OpARM64UBFX)
 15421  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 15422  		v.AddArg(x)
 15423  		return true
 15424  	}
 15425  	return false
 15426  }
 15427  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 15428  	v_3 := v.Args[3]
 15429  	v_2 := v.Args[2]
 15430  	v_1 := v.Args[1]
 15431  	v_0 := v.Args[0]
 15432  	b := v.Block
 15433  	config := b.Func.Config
 15434  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 15435  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 15436  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 15437  	for {
 15438  		off1 := auxIntToInt32(v.AuxInt)
 15439  		sym := auxToSym(v.Aux)
 15440  		if v_0.Op != OpARM64ADDconst {
 15441  			break
 15442  		}
 15443  		off2 := auxIntToInt64(v_0.AuxInt)
 15444  		ptr := v_0.Args[0]
 15445  		val1 := v_1
 15446  		val2 := v_2
 15447  		mem := v_3
 15448  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 15449  			break
 15450  		}
 15451  		v.reset(OpARM64STP)
 15452  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 15453  		v.Aux = symToAux(sym)
 15454  		v.AddArg4(ptr, val1, val2, mem)
 15455  		return true
 15456  	}
 15457  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 15458  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 15459  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 15460  	for {
 15461  		off1 := auxIntToInt32(v.AuxInt)
 15462  		sym1 := auxToSym(v.Aux)
 15463  		if v_0.Op != OpARM64MOVDaddr {
 15464  			break
 15465  		}
 15466  		off2 := auxIntToInt32(v_0.AuxInt)
 15467  		sym2 := auxToSym(v_0.Aux)
 15468  		ptr := v_0.Args[0]
 15469  		val1 := v_1
 15470  		val2 := v_2
 15471  		mem := v_3
 15472  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 15473  			break
 15474  		}
 15475  		v.reset(OpARM64STP)
 15476  		v.AuxInt = int32ToAuxInt(off1 + off2)
 15477  		v.Aux = symToAux(mergeSym(sym1, sym2))
 15478  		v.AddArg4(ptr, val1, val2, mem)
 15479  		return true
 15480  	}
 15481  	return false
 15482  }
 15483  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 15484  	v_1 := v.Args[1]
 15485  	v_0 := v.Args[0]
 15486  	b := v.Block
 15487  	// match: (SUB x (MOVDconst [c]))
 15488  	// result: (SUBconst [c] x)
 15489  	for {
 15490  		x := v_0
 15491  		if v_1.Op != OpARM64MOVDconst {
 15492  			break
 15493  		}
 15494  		c := auxIntToInt64(v_1.AuxInt)
 15495  		v.reset(OpARM64SUBconst)
 15496  		v.AuxInt = int64ToAuxInt(c)
 15497  		v.AddArg(x)
 15498  		return true
 15499  	}
 15500  	// match: (SUB a l:(MUL x y))
 15501  	// cond: l.Uses==1 && clobber(l)
 15502  	// result: (MSUB a x y)
 15503  	for {
 15504  		a := v_0
 15505  		l := v_1
 15506  		if l.Op != OpARM64MUL {
 15507  			break
 15508  		}
 15509  		y := l.Args[1]
 15510  		x := l.Args[0]
 15511  		if !(l.Uses == 1 && clobber(l)) {
 15512  			break
 15513  		}
 15514  		v.reset(OpARM64MSUB)
 15515  		v.AddArg3(a, x, y)
 15516  		return true
 15517  	}
 15518  	// match: (SUB a l:(MNEG x y))
 15519  	// cond: l.Uses==1 && clobber(l)
 15520  	// result: (MADD a x y)
 15521  	for {
 15522  		a := v_0
 15523  		l := v_1
 15524  		if l.Op != OpARM64MNEG {
 15525  			break
 15526  		}
 15527  		y := l.Args[1]
 15528  		x := l.Args[0]
 15529  		if !(l.Uses == 1 && clobber(l)) {
 15530  			break
 15531  		}
 15532  		v.reset(OpARM64MADD)
 15533  		v.AddArg3(a, x, y)
 15534  		return true
 15535  	}
 15536  	// match: (SUB a l:(MULW x y))
 15537  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 15538  	// result: (MSUBW a x y)
 15539  	for {
 15540  		a := v_0
 15541  		l := v_1
 15542  		if l.Op != OpARM64MULW {
 15543  			break
 15544  		}
 15545  		y := l.Args[1]
 15546  		x := l.Args[0]
 15547  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15548  			break
 15549  		}
 15550  		v.reset(OpARM64MSUBW)
 15551  		v.AddArg3(a, x, y)
 15552  		return true
 15553  	}
 15554  	// match: (SUB a l:(MNEGW x y))
 15555  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 15556  	// result: (MADDW a x y)
 15557  	for {
 15558  		a := v_0
 15559  		l := v_1
 15560  		if l.Op != OpARM64MNEGW {
 15561  			break
 15562  		}
 15563  		y := l.Args[1]
 15564  		x := l.Args[0]
 15565  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15566  			break
 15567  		}
 15568  		v.reset(OpARM64MADDW)
 15569  		v.AddArg3(a, x, y)
 15570  		return true
 15571  	}
 15572  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 15573  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15574  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15575  	for {
 15576  		t := v.Type
 15577  		a := v_0
 15578  		p := v_1
 15579  		if p.Op != OpARM64ADDconst {
 15580  			break
 15581  		}
 15582  		c := auxIntToInt64(p.AuxInt)
 15583  		m := p.Args[0]
 15584  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15585  			break
 15586  		}
 15587  		v.reset(OpARM64SUBconst)
 15588  		v.AuxInt = int64ToAuxInt(c)
 15589  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15590  		v0.AddArg2(a, m)
 15591  		v.AddArg(v0)
 15592  		return true
 15593  	}
 15594  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 15595  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15596  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15597  	for {
 15598  		t := v.Type
 15599  		a := v_0
 15600  		p := v_1
 15601  		if p.Op != OpARM64ADDconst {
 15602  			break
 15603  		}
 15604  		c := auxIntToInt64(p.AuxInt)
 15605  		m := p.Args[0]
 15606  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15607  			break
 15608  		}
 15609  		v.reset(OpARM64SUBconst)
 15610  		v.AuxInt = int64ToAuxInt(c)
 15611  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15612  		v0.AddArg2(a, m)
 15613  		v.AddArg(v0)
 15614  		return true
 15615  	}
 15616  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 15617  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15618  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15619  	for {
 15620  		t := v.Type
 15621  		a := v_0
 15622  		p := v_1
 15623  		if p.Op != OpARM64ADDconst {
 15624  			break
 15625  		}
 15626  		c := auxIntToInt64(p.AuxInt)
 15627  		m := p.Args[0]
 15628  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15629  			break
 15630  		}
 15631  		v.reset(OpARM64SUBconst)
 15632  		v.AuxInt = int64ToAuxInt(c)
 15633  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15634  		v0.AddArg2(a, m)
 15635  		v.AddArg(v0)
 15636  		return true
 15637  	}
 15638  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 15639  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15640  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15641  	for {
 15642  		t := v.Type
 15643  		a := v_0
 15644  		p := v_1
 15645  		if p.Op != OpARM64ADDconst {
 15646  			break
 15647  		}
 15648  		c := auxIntToInt64(p.AuxInt)
 15649  		m := p.Args[0]
 15650  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15651  			break
 15652  		}
 15653  		v.reset(OpARM64SUBconst)
 15654  		v.AuxInt = int64ToAuxInt(c)
 15655  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15656  		v0.AddArg2(a, m)
 15657  		v.AddArg(v0)
 15658  		return true
 15659  	}
 15660  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 15661  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15662  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15663  	for {
 15664  		t := v.Type
 15665  		a := v_0
 15666  		p := v_1
 15667  		if p.Op != OpARM64SUBconst {
 15668  			break
 15669  		}
 15670  		c := auxIntToInt64(p.AuxInt)
 15671  		m := p.Args[0]
 15672  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15673  			break
 15674  		}
 15675  		v.reset(OpARM64ADDconst)
 15676  		v.AuxInt = int64ToAuxInt(c)
 15677  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15678  		v0.AddArg2(a, m)
 15679  		v.AddArg(v0)
 15680  		return true
 15681  	}
 15682  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 15683  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15684  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15685  	for {
 15686  		t := v.Type
 15687  		a := v_0
 15688  		p := v_1
 15689  		if p.Op != OpARM64SUBconst {
 15690  			break
 15691  		}
 15692  		c := auxIntToInt64(p.AuxInt)
 15693  		m := p.Args[0]
 15694  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15695  			break
 15696  		}
 15697  		v.reset(OpARM64ADDconst)
 15698  		v.AuxInt = int64ToAuxInt(c)
 15699  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15700  		v0.AddArg2(a, m)
 15701  		v.AddArg(v0)
 15702  		return true
 15703  	}
 15704  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 15705  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15706  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15707  	for {
 15708  		t := v.Type
 15709  		a := v_0
 15710  		p := v_1
 15711  		if p.Op != OpARM64SUBconst {
 15712  			break
 15713  		}
 15714  		c := auxIntToInt64(p.AuxInt)
 15715  		m := p.Args[0]
 15716  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15717  			break
 15718  		}
 15719  		v.reset(OpARM64ADDconst)
 15720  		v.AuxInt = int64ToAuxInt(c)
 15721  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15722  		v0.AddArg2(a, m)
 15723  		v.AddArg(v0)
 15724  		return true
 15725  	}
 15726  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 15727  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15728  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15729  	for {
 15730  		t := v.Type
 15731  		a := v_0
 15732  		p := v_1
 15733  		if p.Op != OpARM64SUBconst {
 15734  			break
 15735  		}
 15736  		c := auxIntToInt64(p.AuxInt)
 15737  		m := p.Args[0]
 15738  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15739  			break
 15740  		}
 15741  		v.reset(OpARM64ADDconst)
 15742  		v.AuxInt = int64ToAuxInt(c)
 15743  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15744  		v0.AddArg2(a, m)
 15745  		v.AddArg(v0)
 15746  		return true
 15747  	}
 15748  	// match: (SUB x (NEG y))
 15749  	// result: (ADD x y)
 15750  	for {
 15751  		x := v_0
 15752  		if v_1.Op != OpARM64NEG {
 15753  			break
 15754  		}
 15755  		y := v_1.Args[0]
 15756  		v.reset(OpARM64ADD)
 15757  		v.AddArg2(x, y)
 15758  		return true
 15759  	}
 15760  	// match: (SUB x x)
 15761  	// result: (MOVDconst [0])
 15762  	for {
 15763  		x := v_0
 15764  		if x != v_1 {
 15765  			break
 15766  		}
 15767  		v.reset(OpARM64MOVDconst)
 15768  		v.AuxInt = int64ToAuxInt(0)
 15769  		return true
 15770  	}
 15771  	// match: (SUB x (SUB y z))
 15772  	// result: (SUB (ADD <v.Type> x z) y)
 15773  	for {
 15774  		x := v_0
 15775  		if v_1.Op != OpARM64SUB {
 15776  			break
 15777  		}
 15778  		z := v_1.Args[1]
 15779  		y := v_1.Args[0]
 15780  		v.reset(OpARM64SUB)
 15781  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 15782  		v0.AddArg2(x, z)
 15783  		v.AddArg2(v0, y)
 15784  		return true
 15785  	}
 15786  	// match: (SUB (SUB x y) z)
 15787  	// result: (SUB x (ADD <y.Type> y z))
 15788  	for {
 15789  		if v_0.Op != OpARM64SUB {
 15790  			break
 15791  		}
 15792  		y := v_0.Args[1]
 15793  		x := v_0.Args[0]
 15794  		z := v_1
 15795  		v.reset(OpARM64SUB)
 15796  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 15797  		v0.AddArg2(y, z)
 15798  		v.AddArg2(x, v0)
 15799  		return true
 15800  	}
 15801  	// match: (SUB x0 x1:(SLLconst [c] y))
 15802  	// cond: clobberIfDead(x1)
 15803  	// result: (SUBshiftLL x0 y [c])
 15804  	for {
 15805  		x0 := v_0
 15806  		x1 := v_1
 15807  		if x1.Op != OpARM64SLLconst {
 15808  			break
 15809  		}
 15810  		c := auxIntToInt64(x1.AuxInt)
 15811  		y := x1.Args[0]
 15812  		if !(clobberIfDead(x1)) {
 15813  			break
 15814  		}
 15815  		v.reset(OpARM64SUBshiftLL)
 15816  		v.AuxInt = int64ToAuxInt(c)
 15817  		v.AddArg2(x0, y)
 15818  		return true
 15819  	}
 15820  	// match: (SUB x0 x1:(SRLconst [c] y))
 15821  	// cond: clobberIfDead(x1)
 15822  	// result: (SUBshiftRL x0 y [c])
 15823  	for {
 15824  		x0 := v_0
 15825  		x1 := v_1
 15826  		if x1.Op != OpARM64SRLconst {
 15827  			break
 15828  		}
 15829  		c := auxIntToInt64(x1.AuxInt)
 15830  		y := x1.Args[0]
 15831  		if !(clobberIfDead(x1)) {
 15832  			break
 15833  		}
 15834  		v.reset(OpARM64SUBshiftRL)
 15835  		v.AuxInt = int64ToAuxInt(c)
 15836  		v.AddArg2(x0, y)
 15837  		return true
 15838  	}
 15839  	// match: (SUB x0 x1:(SRAconst [c] y))
 15840  	// cond: clobberIfDead(x1)
 15841  	// result: (SUBshiftRA x0 y [c])
 15842  	for {
 15843  		x0 := v_0
 15844  		x1 := v_1
 15845  		if x1.Op != OpARM64SRAconst {
 15846  			break
 15847  		}
 15848  		c := auxIntToInt64(x1.AuxInt)
 15849  		y := x1.Args[0]
 15850  		if !(clobberIfDead(x1)) {
 15851  			break
 15852  		}
 15853  		v.reset(OpARM64SUBshiftRA)
 15854  		v.AuxInt = int64ToAuxInt(c)
 15855  		v.AddArg2(x0, y)
 15856  		return true
 15857  	}
 15858  	return false
 15859  }
 15860  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 15861  	v_0 := v.Args[0]
 15862  	// match: (SUBconst [0] x)
 15863  	// result: x
 15864  	for {
 15865  		if auxIntToInt64(v.AuxInt) != 0 {
 15866  			break
 15867  		}
 15868  		x := v_0
 15869  		v.copyOf(x)
 15870  		return true
 15871  	}
 15872  	// match: (SUBconst [c] (MOVDconst [d]))
 15873  	// result: (MOVDconst [d-c])
 15874  	for {
 15875  		c := auxIntToInt64(v.AuxInt)
 15876  		if v_0.Op != OpARM64MOVDconst {
 15877  			break
 15878  		}
 15879  		d := auxIntToInt64(v_0.AuxInt)
 15880  		v.reset(OpARM64MOVDconst)
 15881  		v.AuxInt = int64ToAuxInt(d - c)
 15882  		return true
 15883  	}
 15884  	// match: (SUBconst [c] (SUBconst [d] x))
 15885  	// result: (ADDconst [-c-d] x)
 15886  	for {
 15887  		c := auxIntToInt64(v.AuxInt)
 15888  		if v_0.Op != OpARM64SUBconst {
 15889  			break
 15890  		}
 15891  		d := auxIntToInt64(v_0.AuxInt)
 15892  		x := v_0.Args[0]
 15893  		v.reset(OpARM64ADDconst)
 15894  		v.AuxInt = int64ToAuxInt(-c - d)
 15895  		v.AddArg(x)
 15896  		return true
 15897  	}
 15898  	// match: (SUBconst [c] (ADDconst [d] x))
 15899  	// result: (ADDconst [-c+d] x)
 15900  	for {
 15901  		c := auxIntToInt64(v.AuxInt)
 15902  		if v_0.Op != OpARM64ADDconst {
 15903  			break
 15904  		}
 15905  		d := auxIntToInt64(v_0.AuxInt)
 15906  		x := v_0.Args[0]
 15907  		v.reset(OpARM64ADDconst)
 15908  		v.AuxInt = int64ToAuxInt(-c + d)
 15909  		v.AddArg(x)
 15910  		return true
 15911  	}
 15912  	return false
 15913  }
 15914  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 15915  	v_1 := v.Args[1]
 15916  	v_0 := v.Args[0]
 15917  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 15918  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 15919  	for {
 15920  		d := auxIntToInt64(v.AuxInt)
 15921  		x := v_0
 15922  		if v_1.Op != OpARM64MOVDconst {
 15923  			break
 15924  		}
 15925  		c := auxIntToInt64(v_1.AuxInt)
 15926  		v.reset(OpARM64SUBconst)
 15927  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15928  		v.AddArg(x)
 15929  		return true
 15930  	}
 15931  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 15932  	// result: (MOVDconst [0])
 15933  	for {
 15934  		c := auxIntToInt64(v.AuxInt)
 15935  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15936  			break
 15937  		}
 15938  		x := v_0.Args[0]
 15939  		if x != v_1 {
 15940  			break
 15941  		}
 15942  		v.reset(OpARM64MOVDconst)
 15943  		v.AuxInt = int64ToAuxInt(0)
 15944  		return true
 15945  	}
 15946  	return false
 15947  }
 15948  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 15949  	v_1 := v.Args[1]
 15950  	v_0 := v.Args[0]
 15951  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 15952  	// result: (SUBconst x [c>>uint64(d)])
 15953  	for {
 15954  		d := auxIntToInt64(v.AuxInt)
 15955  		x := v_0
 15956  		if v_1.Op != OpARM64MOVDconst {
 15957  			break
 15958  		}
 15959  		c := auxIntToInt64(v_1.AuxInt)
 15960  		v.reset(OpARM64SUBconst)
 15961  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15962  		v.AddArg(x)
 15963  		return true
 15964  	}
 15965  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 15966  	// result: (MOVDconst [0])
 15967  	for {
 15968  		c := auxIntToInt64(v.AuxInt)
 15969  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15970  			break
 15971  		}
 15972  		x := v_0.Args[0]
 15973  		if x != v_1 {
 15974  			break
 15975  		}
 15976  		v.reset(OpARM64MOVDconst)
 15977  		v.AuxInt = int64ToAuxInt(0)
 15978  		return true
 15979  	}
 15980  	return false
 15981  }
 15982  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 15983  	v_1 := v.Args[1]
 15984  	v_0 := v.Args[0]
 15985  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 15986  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 15987  	for {
 15988  		d := auxIntToInt64(v.AuxInt)
 15989  		x := v_0
 15990  		if v_1.Op != OpARM64MOVDconst {
 15991  			break
 15992  		}
 15993  		c := auxIntToInt64(v_1.AuxInt)
 15994  		v.reset(OpARM64SUBconst)
 15995  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15996  		v.AddArg(x)
 15997  		return true
 15998  	}
 15999  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 16000  	// result: (MOVDconst [0])
 16001  	for {
 16002  		c := auxIntToInt64(v.AuxInt)
 16003  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 16004  			break
 16005  		}
 16006  		x := v_0.Args[0]
 16007  		if x != v_1 {
 16008  			break
 16009  		}
 16010  		v.reset(OpARM64MOVDconst)
 16011  		v.AuxInt = int64ToAuxInt(0)
 16012  		return true
 16013  	}
 16014  	return false
 16015  }
 16016  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 16017  	v_1 := v.Args[1]
 16018  	v_0 := v.Args[0]
 16019  	// match: (TST x (MOVDconst [c]))
 16020  	// result: (TSTconst [c] x)
 16021  	for {
 16022  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16023  			x := v_0
 16024  			if v_1.Op != OpARM64MOVDconst {
 16025  				continue
 16026  			}
 16027  			c := auxIntToInt64(v_1.AuxInt)
 16028  			v.reset(OpARM64TSTconst)
 16029  			v.AuxInt = int64ToAuxInt(c)
 16030  			v.AddArg(x)
 16031  			return true
 16032  		}
 16033  		break
 16034  	}
 16035  	// match: (TST x0 x1:(SLLconst [c] y))
 16036  	// cond: clobberIfDead(x1)
 16037  	// result: (TSTshiftLL x0 y [c])
 16038  	for {
 16039  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16040  			x0 := v_0
 16041  			x1 := v_1
 16042  			if x1.Op != OpARM64SLLconst {
 16043  				continue
 16044  			}
 16045  			c := auxIntToInt64(x1.AuxInt)
 16046  			y := x1.Args[0]
 16047  			if !(clobberIfDead(x1)) {
 16048  				continue
 16049  			}
 16050  			v.reset(OpARM64TSTshiftLL)
 16051  			v.AuxInt = int64ToAuxInt(c)
 16052  			v.AddArg2(x0, y)
 16053  			return true
 16054  		}
 16055  		break
 16056  	}
 16057  	// match: (TST x0 x1:(SRLconst [c] y))
 16058  	// cond: clobberIfDead(x1)
 16059  	// result: (TSTshiftRL x0 y [c])
 16060  	for {
 16061  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16062  			x0 := v_0
 16063  			x1 := v_1
 16064  			if x1.Op != OpARM64SRLconst {
 16065  				continue
 16066  			}
 16067  			c := auxIntToInt64(x1.AuxInt)
 16068  			y := x1.Args[0]
 16069  			if !(clobberIfDead(x1)) {
 16070  				continue
 16071  			}
 16072  			v.reset(OpARM64TSTshiftRL)
 16073  			v.AuxInt = int64ToAuxInt(c)
 16074  			v.AddArg2(x0, y)
 16075  			return true
 16076  		}
 16077  		break
 16078  	}
 16079  	// match: (TST x0 x1:(SRAconst [c] y))
 16080  	// cond: clobberIfDead(x1)
 16081  	// result: (TSTshiftRA x0 y [c])
 16082  	for {
 16083  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16084  			x0 := v_0
 16085  			x1 := v_1
 16086  			if x1.Op != OpARM64SRAconst {
 16087  				continue
 16088  			}
 16089  			c := auxIntToInt64(x1.AuxInt)
 16090  			y := x1.Args[0]
 16091  			if !(clobberIfDead(x1)) {
 16092  				continue
 16093  			}
 16094  			v.reset(OpARM64TSTshiftRA)
 16095  			v.AuxInt = int64ToAuxInt(c)
 16096  			v.AddArg2(x0, y)
 16097  			return true
 16098  		}
 16099  		break
 16100  	}
 16101  	// match: (TST x0 x1:(RORconst [c] y))
 16102  	// cond: clobberIfDead(x1)
 16103  	// result: (TSTshiftRO x0 y [c])
 16104  	for {
 16105  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16106  			x0 := v_0
 16107  			x1 := v_1
 16108  			if x1.Op != OpARM64RORconst {
 16109  				continue
 16110  			}
 16111  			c := auxIntToInt64(x1.AuxInt)
 16112  			y := x1.Args[0]
 16113  			if !(clobberIfDead(x1)) {
 16114  				continue
 16115  			}
 16116  			v.reset(OpARM64TSTshiftRO)
 16117  			v.AuxInt = int64ToAuxInt(c)
 16118  			v.AddArg2(x0, y)
 16119  			return true
 16120  		}
 16121  		break
 16122  	}
 16123  	return false
 16124  }
 16125  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 16126  	v_1 := v.Args[1]
 16127  	v_0 := v.Args[0]
 16128  	// match: (TSTW x (MOVDconst [c]))
 16129  	// result: (TSTWconst [int32(c)] x)
 16130  	for {
 16131  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16132  			x := v_0
 16133  			if v_1.Op != OpARM64MOVDconst {
 16134  				continue
 16135  			}
 16136  			c := auxIntToInt64(v_1.AuxInt)
 16137  			v.reset(OpARM64TSTWconst)
 16138  			v.AuxInt = int32ToAuxInt(int32(c))
 16139  			v.AddArg(x)
 16140  			return true
 16141  		}
 16142  		break
 16143  	}
 16144  	return false
 16145  }
 16146  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 16147  	v_0 := v.Args[0]
 16148  	// match: (TSTWconst (MOVDconst [x]) [y])
 16149  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 16150  	for {
 16151  		y := auxIntToInt32(v.AuxInt)
 16152  		if v_0.Op != OpARM64MOVDconst {
 16153  			break
 16154  		}
 16155  		x := auxIntToInt64(v_0.AuxInt)
 16156  		v.reset(OpARM64FlagConstant)
 16157  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 16158  		return true
 16159  	}
 16160  	return false
 16161  }
 16162  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 16163  	v_0 := v.Args[0]
 16164  	// match: (TSTconst (MOVDconst [x]) [y])
 16165  	// result: (FlagConstant [logicFlags64(x&y)])
 16166  	for {
 16167  		y := auxIntToInt64(v.AuxInt)
 16168  		if v_0.Op != OpARM64MOVDconst {
 16169  			break
 16170  		}
 16171  		x := auxIntToInt64(v_0.AuxInt)
 16172  		v.reset(OpARM64FlagConstant)
 16173  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 16174  		return true
 16175  	}
 16176  	return false
 16177  }
 16178  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 16179  	v_1 := v.Args[1]
 16180  	v_0 := v.Args[0]
 16181  	b := v.Block
 16182  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 16183  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 16184  	for {
 16185  		d := auxIntToInt64(v.AuxInt)
 16186  		if v_0.Op != OpARM64MOVDconst {
 16187  			break
 16188  		}
 16189  		c := auxIntToInt64(v_0.AuxInt)
 16190  		x := v_1
 16191  		v.reset(OpARM64TSTconst)
 16192  		v.AuxInt = int64ToAuxInt(c)
 16193  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 16194  		v0.AuxInt = int64ToAuxInt(d)
 16195  		v0.AddArg(x)
 16196  		v.AddArg(v0)
 16197  		return true
 16198  	}
 16199  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 16200  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 16201  	for {
 16202  		d := auxIntToInt64(v.AuxInt)
 16203  		x := v_0
 16204  		if v_1.Op != OpARM64MOVDconst {
 16205  			break
 16206  		}
 16207  		c := auxIntToInt64(v_1.AuxInt)
 16208  		v.reset(OpARM64TSTconst)
 16209  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 16210  		v.AddArg(x)
 16211  		return true
 16212  	}
 16213  	return false
 16214  }
 16215  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 16216  	v_1 := v.Args[1]
 16217  	v_0 := v.Args[0]
 16218  	b := v.Block
 16219  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 16220  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 16221  	for {
 16222  		d := auxIntToInt64(v.AuxInt)
 16223  		if v_0.Op != OpARM64MOVDconst {
 16224  			break
 16225  		}
 16226  		c := auxIntToInt64(v_0.AuxInt)
 16227  		x := v_1
 16228  		v.reset(OpARM64TSTconst)
 16229  		v.AuxInt = int64ToAuxInt(c)
 16230  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 16231  		v0.AuxInt = int64ToAuxInt(d)
 16232  		v0.AddArg(x)
 16233  		v.AddArg(v0)
 16234  		return true
 16235  	}
 16236  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 16237  	// result: (TSTconst x [c>>uint64(d)])
 16238  	for {
 16239  		d := auxIntToInt64(v.AuxInt)
 16240  		x := v_0
 16241  		if v_1.Op != OpARM64MOVDconst {
 16242  			break
 16243  		}
 16244  		c := auxIntToInt64(v_1.AuxInt)
 16245  		v.reset(OpARM64TSTconst)
 16246  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 16247  		v.AddArg(x)
 16248  		return true
 16249  	}
 16250  	return false
 16251  }
 16252  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 16253  	v_1 := v.Args[1]
 16254  	v_0 := v.Args[0]
 16255  	b := v.Block
 16256  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 16257  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 16258  	for {
 16259  		d := auxIntToInt64(v.AuxInt)
 16260  		if v_0.Op != OpARM64MOVDconst {
 16261  			break
 16262  		}
 16263  		c := auxIntToInt64(v_0.AuxInt)
 16264  		x := v_1
 16265  		v.reset(OpARM64TSTconst)
 16266  		v.AuxInt = int64ToAuxInt(c)
 16267  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 16268  		v0.AuxInt = int64ToAuxInt(d)
 16269  		v0.AddArg(x)
 16270  		v.AddArg(v0)
 16271  		return true
 16272  	}
 16273  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 16274  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 16275  	for {
 16276  		d := auxIntToInt64(v.AuxInt)
 16277  		x := v_0
 16278  		if v_1.Op != OpARM64MOVDconst {
 16279  			break
 16280  		}
 16281  		c := auxIntToInt64(v_1.AuxInt)
 16282  		v.reset(OpARM64TSTconst)
 16283  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 16284  		v.AddArg(x)
 16285  		return true
 16286  	}
 16287  	return false
 16288  }
 16289  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 16290  	v_1 := v.Args[1]
 16291  	v_0 := v.Args[0]
 16292  	b := v.Block
 16293  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 16294  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 16295  	for {
 16296  		d := auxIntToInt64(v.AuxInt)
 16297  		if v_0.Op != OpARM64MOVDconst {
 16298  			break
 16299  		}
 16300  		c := auxIntToInt64(v_0.AuxInt)
 16301  		x := v_1
 16302  		v.reset(OpARM64TSTconst)
 16303  		v.AuxInt = int64ToAuxInt(c)
 16304  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 16305  		v0.AuxInt = int64ToAuxInt(d)
 16306  		v0.AddArg(x)
 16307  		v.AddArg(v0)
 16308  		return true
 16309  	}
 16310  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 16311  	// result: (TSTconst x [rotateRight64(c, d)])
 16312  	for {
 16313  		d := auxIntToInt64(v.AuxInt)
 16314  		x := v_0
 16315  		if v_1.Op != OpARM64MOVDconst {
 16316  			break
 16317  		}
 16318  		c := auxIntToInt64(v_1.AuxInt)
 16319  		v.reset(OpARM64TSTconst)
 16320  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 16321  		v.AddArg(x)
 16322  		return true
 16323  	}
 16324  	return false
 16325  }
 16326  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 16327  	v_0 := v.Args[0]
 16328  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 16329  	// cond: sc < bfc.width()
 16330  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 16331  	for {
 16332  		bfc := auxIntToArm64BitField(v.AuxInt)
 16333  		if v_0.Op != OpARM64SLLconst {
 16334  			break
 16335  		}
 16336  		sc := auxIntToInt64(v_0.AuxInt)
 16337  		x := v_0.Args[0]
 16338  		if !(sc < bfc.width()) {
 16339  			break
 16340  		}
 16341  		v.reset(OpARM64UBFIZ)
 16342  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 16343  		v.AddArg(x)
 16344  		return true
 16345  	}
 16346  	return false
 16347  }
 16348  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 16349  	v_0 := v.Args[0]
 16350  	// match: (UBFX [bfc] (ANDconst [c] x))
 16351  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 16352  	// result: (UBFX [bfc] x)
 16353  	for {
 16354  		bfc := auxIntToArm64BitField(v.AuxInt)
 16355  		if v_0.Op != OpARM64ANDconst {
 16356  			break
 16357  		}
 16358  		c := auxIntToInt64(v_0.AuxInt)
 16359  		x := v_0.Args[0]
 16360  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 16361  			break
 16362  		}
 16363  		v.reset(OpARM64UBFX)
 16364  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 16365  		v.AddArg(x)
 16366  		return true
 16367  	}
 16368  	// match: (UBFX [bfc] e:(MOVWUreg x))
 16369  	// cond: e.Uses == 1 && bfc.lsb() < 32
 16370  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 16371  	for {
 16372  		bfc := auxIntToArm64BitField(v.AuxInt)
 16373  		e := v_0
 16374  		if e.Op != OpARM64MOVWUreg {
 16375  			break
 16376  		}
 16377  		x := e.Args[0]
 16378  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 16379  			break
 16380  		}
 16381  		v.reset(OpARM64UBFX)
 16382  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 16383  		v.AddArg(x)
 16384  		return true
 16385  	}
 16386  	// match: (UBFX [bfc] e:(MOVHUreg x))
 16387  	// cond: e.Uses == 1 && bfc.lsb() < 16
 16388  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 16389  	for {
 16390  		bfc := auxIntToArm64BitField(v.AuxInt)
 16391  		e := v_0
 16392  		if e.Op != OpARM64MOVHUreg {
 16393  			break
 16394  		}
 16395  		x := e.Args[0]
 16396  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 16397  			break
 16398  		}
 16399  		v.reset(OpARM64UBFX)
 16400  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 16401  		v.AddArg(x)
 16402  		return true
 16403  	}
 16404  	// match: (UBFX [bfc] e:(MOVBUreg x))
 16405  	// cond: e.Uses == 1 && bfc.lsb() < 8
 16406  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 16407  	for {
 16408  		bfc := auxIntToArm64BitField(v.AuxInt)
 16409  		e := v_0
 16410  		if e.Op != OpARM64MOVBUreg {
 16411  			break
 16412  		}
 16413  		x := e.Args[0]
 16414  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 16415  			break
 16416  		}
 16417  		v.reset(OpARM64UBFX)
 16418  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 16419  		v.AddArg(x)
 16420  		return true
 16421  	}
 16422  	// match: (UBFX [bfc] (SRLconst [sc] x))
 16423  	// cond: sc+bfc.width()+bfc.lsb() < 64
 16424  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 16425  	for {
 16426  		bfc := auxIntToArm64BitField(v.AuxInt)
 16427  		if v_0.Op != OpARM64SRLconst {
 16428  			break
 16429  		}
 16430  		sc := auxIntToInt64(v_0.AuxInt)
 16431  		x := v_0.Args[0]
 16432  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 16433  			break
 16434  		}
 16435  		v.reset(OpARM64UBFX)
 16436  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 16437  		v.AddArg(x)
 16438  		return true
 16439  	}
 16440  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16441  	// cond: sc == bfc.lsb()
 16442  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 16443  	for {
 16444  		bfc := auxIntToArm64BitField(v.AuxInt)
 16445  		if v_0.Op != OpARM64SLLconst {
 16446  			break
 16447  		}
 16448  		sc := auxIntToInt64(v_0.AuxInt)
 16449  		x := v_0.Args[0]
 16450  		if !(sc == bfc.lsb()) {
 16451  			break
 16452  		}
 16453  		v.reset(OpARM64ANDconst)
 16454  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 16455  		v.AddArg(x)
 16456  		return true
 16457  	}
 16458  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16459  	// cond: sc < bfc.lsb()
 16460  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16461  	for {
 16462  		bfc := auxIntToArm64BitField(v.AuxInt)
 16463  		if v_0.Op != OpARM64SLLconst {
 16464  			break
 16465  		}
 16466  		sc := auxIntToInt64(v_0.AuxInt)
 16467  		x := v_0.Args[0]
 16468  		if !(sc < bfc.lsb()) {
 16469  			break
 16470  		}
 16471  		v.reset(OpARM64UBFX)
 16472  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16473  		v.AddArg(x)
 16474  		return true
 16475  	}
 16476  	// match: (UBFX [bfc] (SLLconst [sc] x))
 16477  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16478  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16479  	for {
 16480  		bfc := auxIntToArm64BitField(v.AuxInt)
 16481  		if v_0.Op != OpARM64SLLconst {
 16482  			break
 16483  		}
 16484  		sc := auxIntToInt64(v_0.AuxInt)
 16485  		x := v_0.Args[0]
 16486  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16487  			break
 16488  		}
 16489  		v.reset(OpARM64UBFIZ)
 16490  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16491  		v.AddArg(x)
 16492  		return true
 16493  	}
 16494  	return false
 16495  }
 16496  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 16497  	v_1 := v.Args[1]
 16498  	v_0 := v.Args[0]
 16499  	// match: (UDIV x (MOVDconst [1]))
 16500  	// result: x
 16501  	for {
 16502  		x := v_0
 16503  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 16504  			break
 16505  		}
 16506  		v.copyOf(x)
 16507  		return true
 16508  	}
 16509  	// match: (UDIV x (MOVDconst [c]))
 16510  	// cond: isPowerOfTwo(c)
 16511  	// result: (SRLconst [log64(c)] x)
 16512  	for {
 16513  		x := v_0
 16514  		if v_1.Op != OpARM64MOVDconst {
 16515  			break
 16516  		}
 16517  		c := auxIntToInt64(v_1.AuxInt)
 16518  		if !(isPowerOfTwo(c)) {
 16519  			break
 16520  		}
 16521  		v.reset(OpARM64SRLconst)
 16522  		v.AuxInt = int64ToAuxInt(log64(c))
 16523  		v.AddArg(x)
 16524  		return true
 16525  	}
 16526  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 16527  	// cond: d != 0
 16528  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 16529  	for {
 16530  		if v_0.Op != OpARM64MOVDconst {
 16531  			break
 16532  		}
 16533  		c := auxIntToInt64(v_0.AuxInt)
 16534  		if v_1.Op != OpARM64MOVDconst {
 16535  			break
 16536  		}
 16537  		d := auxIntToInt64(v_1.AuxInt)
 16538  		if !(d != 0) {
 16539  			break
 16540  		}
 16541  		v.reset(OpARM64MOVDconst)
 16542  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 16543  		return true
 16544  	}
 16545  	return false
 16546  }
 16547  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 16548  	v_1 := v.Args[1]
 16549  	v_0 := v.Args[0]
 16550  	b := v.Block
 16551  	// match: (UDIVW x (MOVDconst [c]))
 16552  	// cond: uint32(c)==1
 16553  	// result: (MOVWUreg x)
 16554  	for {
 16555  		x := v_0
 16556  		if v_1.Op != OpARM64MOVDconst {
 16557  			break
 16558  		}
 16559  		c := auxIntToInt64(v_1.AuxInt)
 16560  		if !(uint32(c) == 1) {
 16561  			break
 16562  		}
 16563  		v.reset(OpARM64MOVWUreg)
 16564  		v.AddArg(x)
 16565  		return true
 16566  	}
 16567  	// match: (UDIVW x (MOVDconst [c]))
 16568  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16569  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 16570  	for {
 16571  		x := v_0
 16572  		if v_1.Op != OpARM64MOVDconst {
 16573  			break
 16574  		}
 16575  		c := auxIntToInt64(v_1.AuxInt)
 16576  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16577  			break
 16578  		}
 16579  		v.reset(OpARM64SRLconst)
 16580  		v.AuxInt = int64ToAuxInt(log64(c))
 16581  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 16582  		v0.AddArg(x)
 16583  		v.AddArg(v0)
 16584  		return true
 16585  	}
 16586  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 16587  	// cond: d != 0
 16588  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 16589  	for {
 16590  		if v_0.Op != OpARM64MOVDconst {
 16591  			break
 16592  		}
 16593  		c := auxIntToInt64(v_0.AuxInt)
 16594  		if v_1.Op != OpARM64MOVDconst {
 16595  			break
 16596  		}
 16597  		d := auxIntToInt64(v_1.AuxInt)
 16598  		if !(d != 0) {
 16599  			break
 16600  		}
 16601  		v.reset(OpARM64MOVDconst)
 16602  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 16603  		return true
 16604  	}
 16605  	return false
 16606  }
 16607  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 16608  	v_1 := v.Args[1]
 16609  	v_0 := v.Args[0]
 16610  	b := v.Block
 16611  	typ := &b.Func.Config.Types
 16612  	// match: (UMOD <typ.UInt64> x y)
 16613  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 16614  	for {
 16615  		if v.Type != typ.UInt64 {
 16616  			break
 16617  		}
 16618  		x := v_0
 16619  		y := v_1
 16620  		v.reset(OpARM64MSUB)
 16621  		v.Type = typ.UInt64
 16622  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 16623  		v0.AddArg2(x, y)
 16624  		v.AddArg3(x, y, v0)
 16625  		return true
 16626  	}
 16627  	// match: (UMOD _ (MOVDconst [1]))
 16628  	// result: (MOVDconst [0])
 16629  	for {
 16630  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 16631  			break
 16632  		}
 16633  		v.reset(OpARM64MOVDconst)
 16634  		v.AuxInt = int64ToAuxInt(0)
 16635  		return true
 16636  	}
 16637  	// match: (UMOD x (MOVDconst [c]))
 16638  	// cond: isPowerOfTwo(c)
 16639  	// result: (ANDconst [c-1] x)
 16640  	for {
 16641  		x := v_0
 16642  		if v_1.Op != OpARM64MOVDconst {
 16643  			break
 16644  		}
 16645  		c := auxIntToInt64(v_1.AuxInt)
 16646  		if !(isPowerOfTwo(c)) {
 16647  			break
 16648  		}
 16649  		v.reset(OpARM64ANDconst)
 16650  		v.AuxInt = int64ToAuxInt(c - 1)
 16651  		v.AddArg(x)
 16652  		return true
 16653  	}
 16654  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 16655  	// cond: d != 0
 16656  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 16657  	for {
 16658  		if v_0.Op != OpARM64MOVDconst {
 16659  			break
 16660  		}
 16661  		c := auxIntToInt64(v_0.AuxInt)
 16662  		if v_1.Op != OpARM64MOVDconst {
 16663  			break
 16664  		}
 16665  		d := auxIntToInt64(v_1.AuxInt)
 16666  		if !(d != 0) {
 16667  			break
 16668  		}
 16669  		v.reset(OpARM64MOVDconst)
 16670  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 16671  		return true
 16672  	}
 16673  	return false
 16674  }
 16675  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 16676  	v_1 := v.Args[1]
 16677  	v_0 := v.Args[0]
 16678  	b := v.Block
 16679  	typ := &b.Func.Config.Types
 16680  	// match: (UMODW <typ.UInt32> x y)
 16681  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 16682  	for {
 16683  		if v.Type != typ.UInt32 {
 16684  			break
 16685  		}
 16686  		x := v_0
 16687  		y := v_1
 16688  		v.reset(OpARM64MSUBW)
 16689  		v.Type = typ.UInt32
 16690  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 16691  		v0.AddArg2(x, y)
 16692  		v.AddArg3(x, y, v0)
 16693  		return true
 16694  	}
 16695  	// match: (UMODW _ (MOVDconst [c]))
 16696  	// cond: uint32(c)==1
 16697  	// result: (MOVDconst [0])
 16698  	for {
 16699  		if v_1.Op != OpARM64MOVDconst {
 16700  			break
 16701  		}
 16702  		c := auxIntToInt64(v_1.AuxInt)
 16703  		if !(uint32(c) == 1) {
 16704  			break
 16705  		}
 16706  		v.reset(OpARM64MOVDconst)
 16707  		v.AuxInt = int64ToAuxInt(0)
 16708  		return true
 16709  	}
 16710  	// match: (UMODW x (MOVDconst [c]))
 16711  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16712  	// result: (ANDconst [c-1] x)
 16713  	for {
 16714  		x := v_0
 16715  		if v_1.Op != OpARM64MOVDconst {
 16716  			break
 16717  		}
 16718  		c := auxIntToInt64(v_1.AuxInt)
 16719  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16720  			break
 16721  		}
 16722  		v.reset(OpARM64ANDconst)
 16723  		v.AuxInt = int64ToAuxInt(c - 1)
 16724  		v.AddArg(x)
 16725  		return true
 16726  	}
 16727  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 16728  	// cond: d != 0
 16729  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 16730  	for {
 16731  		if v_0.Op != OpARM64MOVDconst {
 16732  			break
 16733  		}
 16734  		c := auxIntToInt64(v_0.AuxInt)
 16735  		if v_1.Op != OpARM64MOVDconst {
 16736  			break
 16737  		}
 16738  		d := auxIntToInt64(v_1.AuxInt)
 16739  		if !(d != 0) {
 16740  			break
 16741  		}
 16742  		v.reset(OpARM64MOVDconst)
 16743  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 16744  		return true
 16745  	}
 16746  	return false
 16747  }
 16748  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 16749  	v_1 := v.Args[1]
 16750  	v_0 := v.Args[0]
 16751  	// match: (XOR x (MOVDconst [c]))
 16752  	// result: (XORconst [c] x)
 16753  	for {
 16754  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16755  			x := v_0
 16756  			if v_1.Op != OpARM64MOVDconst {
 16757  				continue
 16758  			}
 16759  			c := auxIntToInt64(v_1.AuxInt)
 16760  			v.reset(OpARM64XORconst)
 16761  			v.AuxInt = int64ToAuxInt(c)
 16762  			v.AddArg(x)
 16763  			return true
 16764  		}
 16765  		break
 16766  	}
 16767  	// match: (XOR x x)
 16768  	// result: (MOVDconst [0])
 16769  	for {
 16770  		x := v_0
 16771  		if x != v_1 {
 16772  			break
 16773  		}
 16774  		v.reset(OpARM64MOVDconst)
 16775  		v.AuxInt = int64ToAuxInt(0)
 16776  		return true
 16777  	}
 16778  	// match: (XOR x (MVN y))
 16779  	// result: (EON x y)
 16780  	for {
 16781  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16782  			x := v_0
 16783  			if v_1.Op != OpARM64MVN {
 16784  				continue
 16785  			}
 16786  			y := v_1.Args[0]
 16787  			v.reset(OpARM64EON)
 16788  			v.AddArg2(x, y)
 16789  			return true
 16790  		}
 16791  		break
 16792  	}
 16793  	// match: (XOR x0 x1:(SLLconst [c] y))
 16794  	// cond: clobberIfDead(x1)
 16795  	// result: (XORshiftLL x0 y [c])
 16796  	for {
 16797  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16798  			x0 := v_0
 16799  			x1 := v_1
 16800  			if x1.Op != OpARM64SLLconst {
 16801  				continue
 16802  			}
 16803  			c := auxIntToInt64(x1.AuxInt)
 16804  			y := x1.Args[0]
 16805  			if !(clobberIfDead(x1)) {
 16806  				continue
 16807  			}
 16808  			v.reset(OpARM64XORshiftLL)
 16809  			v.AuxInt = int64ToAuxInt(c)
 16810  			v.AddArg2(x0, y)
 16811  			return true
 16812  		}
 16813  		break
 16814  	}
 16815  	// match: (XOR x0 x1:(SRLconst [c] y))
 16816  	// cond: clobberIfDead(x1)
 16817  	// result: (XORshiftRL x0 y [c])
 16818  	for {
 16819  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16820  			x0 := v_0
 16821  			x1 := v_1
 16822  			if x1.Op != OpARM64SRLconst {
 16823  				continue
 16824  			}
 16825  			c := auxIntToInt64(x1.AuxInt)
 16826  			y := x1.Args[0]
 16827  			if !(clobberIfDead(x1)) {
 16828  				continue
 16829  			}
 16830  			v.reset(OpARM64XORshiftRL)
 16831  			v.AuxInt = int64ToAuxInt(c)
 16832  			v.AddArg2(x0, y)
 16833  			return true
 16834  		}
 16835  		break
 16836  	}
 16837  	// match: (XOR x0 x1:(SRAconst [c] y))
 16838  	// cond: clobberIfDead(x1)
 16839  	// result: (XORshiftRA x0 y [c])
 16840  	for {
 16841  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16842  			x0 := v_0
 16843  			x1 := v_1
 16844  			if x1.Op != OpARM64SRAconst {
 16845  				continue
 16846  			}
 16847  			c := auxIntToInt64(x1.AuxInt)
 16848  			y := x1.Args[0]
 16849  			if !(clobberIfDead(x1)) {
 16850  				continue
 16851  			}
 16852  			v.reset(OpARM64XORshiftRA)
 16853  			v.AuxInt = int64ToAuxInt(c)
 16854  			v.AddArg2(x0, y)
 16855  			return true
 16856  		}
 16857  		break
 16858  	}
 16859  	// match: (XOR x0 x1:(RORconst [c] y))
 16860  	// cond: clobberIfDead(x1)
 16861  	// result: (XORshiftRO x0 y [c])
 16862  	for {
 16863  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16864  			x0 := v_0
 16865  			x1 := v_1
 16866  			if x1.Op != OpARM64RORconst {
 16867  				continue
 16868  			}
 16869  			c := auxIntToInt64(x1.AuxInt)
 16870  			y := x1.Args[0]
 16871  			if !(clobberIfDead(x1)) {
 16872  				continue
 16873  			}
 16874  			v.reset(OpARM64XORshiftRO)
 16875  			v.AuxInt = int64ToAuxInt(c)
 16876  			v.AddArg2(x0, y)
 16877  			return true
 16878  		}
 16879  		break
 16880  	}
 16881  	return false
 16882  }
 16883  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 16884  	v_0 := v.Args[0]
 16885  	// match: (XORconst [0] x)
 16886  	// result: x
 16887  	for {
 16888  		if auxIntToInt64(v.AuxInt) != 0 {
 16889  			break
 16890  		}
 16891  		x := v_0
 16892  		v.copyOf(x)
 16893  		return true
 16894  	}
 16895  	// match: (XORconst [-1] x)
 16896  	// result: (MVN x)
 16897  	for {
 16898  		if auxIntToInt64(v.AuxInt) != -1 {
 16899  			break
 16900  		}
 16901  		x := v_0
 16902  		v.reset(OpARM64MVN)
 16903  		v.AddArg(x)
 16904  		return true
 16905  	}
 16906  	// match: (XORconst [c] (MOVDconst [d]))
 16907  	// result: (MOVDconst [c^d])
 16908  	for {
 16909  		c := auxIntToInt64(v.AuxInt)
 16910  		if v_0.Op != OpARM64MOVDconst {
 16911  			break
 16912  		}
 16913  		d := auxIntToInt64(v_0.AuxInt)
 16914  		v.reset(OpARM64MOVDconst)
 16915  		v.AuxInt = int64ToAuxInt(c ^ d)
 16916  		return true
 16917  	}
 16918  	// match: (XORconst [c] (XORconst [d] x))
 16919  	// result: (XORconst [c^d] x)
 16920  	for {
 16921  		c := auxIntToInt64(v.AuxInt)
 16922  		if v_0.Op != OpARM64XORconst {
 16923  			break
 16924  		}
 16925  		d := auxIntToInt64(v_0.AuxInt)
 16926  		x := v_0.Args[0]
 16927  		v.reset(OpARM64XORconst)
 16928  		v.AuxInt = int64ToAuxInt(c ^ d)
 16929  		v.AddArg(x)
 16930  		return true
 16931  	}
 16932  	return false
 16933  }
 16934  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 16935  	v_1 := v.Args[1]
 16936  	v_0 := v.Args[0]
 16937  	b := v.Block
 16938  	typ := &b.Func.Config.Types
 16939  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 16940  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 16941  	for {
 16942  		d := auxIntToInt64(v.AuxInt)
 16943  		if v_0.Op != OpARM64MOVDconst {
 16944  			break
 16945  		}
 16946  		c := auxIntToInt64(v_0.AuxInt)
 16947  		x := v_1
 16948  		v.reset(OpARM64XORconst)
 16949  		v.AuxInt = int64ToAuxInt(c)
 16950  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 16951  		v0.AuxInt = int64ToAuxInt(d)
 16952  		v0.AddArg(x)
 16953  		v.AddArg(v0)
 16954  		return true
 16955  	}
 16956  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 16957  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 16958  	for {
 16959  		d := auxIntToInt64(v.AuxInt)
 16960  		x := v_0
 16961  		if v_1.Op != OpARM64MOVDconst {
 16962  			break
 16963  		}
 16964  		c := auxIntToInt64(v_1.AuxInt)
 16965  		v.reset(OpARM64XORconst)
 16966  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 16967  		v.AddArg(x)
 16968  		return true
 16969  	}
 16970  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 16971  	// result: (MOVDconst [0])
 16972  	for {
 16973  		c := auxIntToInt64(v.AuxInt)
 16974  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16975  			break
 16976  		}
 16977  		x := v_0.Args[0]
 16978  		if x != v_1 {
 16979  			break
 16980  		}
 16981  		v.reset(OpARM64MOVDconst)
 16982  		v.AuxInt = int64ToAuxInt(0)
 16983  		return true
 16984  	}
 16985  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 16986  	// result: (REV16W x)
 16987  	for {
 16988  		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) {
 16989  			break
 16990  		}
 16991  		x := v_0.Args[0]
 16992  		if x != v_1 {
 16993  			break
 16994  		}
 16995  		v.reset(OpARM64REV16W)
 16996  		v.AddArg(x)
 16997  		return true
 16998  	}
 16999  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 17000  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 17001  	// result: (REV16W x)
 17002  	for {
 17003  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 17004  			break
 17005  		}
 17006  		v_0_0 := v_0.Args[0]
 17007  		if v_0_0.Op != OpARM64ANDconst {
 17008  			break
 17009  		}
 17010  		c1 := auxIntToInt64(v_0_0.AuxInt)
 17011  		x := v_0_0.Args[0]
 17012  		if v_1.Op != OpARM64ANDconst {
 17013  			break
 17014  		}
 17015  		c2 := auxIntToInt64(v_1.AuxInt)
 17016  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 17017  			break
 17018  		}
 17019  		v.reset(OpARM64REV16W)
 17020  		v.AddArg(x)
 17021  		return true
 17022  	}
 17023  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 17024  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 17025  	// result: (REV16 x)
 17026  	for {
 17027  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 17028  			break
 17029  		}
 17030  		v_0_0 := v_0.Args[0]
 17031  		if v_0_0.Op != OpARM64ANDconst {
 17032  			break
 17033  		}
 17034  		c1 := auxIntToInt64(v_0_0.AuxInt)
 17035  		x := v_0_0.Args[0]
 17036  		if v_1.Op != OpARM64ANDconst {
 17037  			break
 17038  		}
 17039  		c2 := auxIntToInt64(v_1.AuxInt)
 17040  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 17041  			break
 17042  		}
 17043  		v.reset(OpARM64REV16)
 17044  		v.AddArg(x)
 17045  		return true
 17046  	}
 17047  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 17048  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 17049  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 17050  	for {
 17051  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 17052  			break
 17053  		}
 17054  		v_0_0 := v_0.Args[0]
 17055  		if v_0_0.Op != OpARM64ANDconst {
 17056  			break
 17057  		}
 17058  		c1 := auxIntToInt64(v_0_0.AuxInt)
 17059  		x := v_0_0.Args[0]
 17060  		if v_1.Op != OpARM64ANDconst {
 17061  			break
 17062  		}
 17063  		c2 := auxIntToInt64(v_1.AuxInt)
 17064  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 17065  			break
 17066  		}
 17067  		v.reset(OpARM64REV16)
 17068  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 17069  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 17070  		v0.AddArg(x)
 17071  		v.AddArg(v0)
 17072  		return true
 17073  	}
 17074  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 17075  	// result: (EXTRconst [64-c] x2 x)
 17076  	for {
 17077  		c := auxIntToInt64(v.AuxInt)
 17078  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 17079  			break
 17080  		}
 17081  		x := v_0.Args[0]
 17082  		x2 := v_1
 17083  		v.reset(OpARM64EXTRconst)
 17084  		v.AuxInt = int64ToAuxInt(64 - c)
 17085  		v.AddArg2(x2, x)
 17086  		return true
 17087  	}
 17088  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 17089  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 17090  	// result: (EXTRWconst [32-c] x2 x)
 17091  	for {
 17092  		t := v.Type
 17093  		c := auxIntToInt64(v.AuxInt)
 17094  		if v_0.Op != OpARM64UBFX {
 17095  			break
 17096  		}
 17097  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 17098  		x := v_0.Args[0]
 17099  		x2 := v_1
 17100  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 17101  			break
 17102  		}
 17103  		v.reset(OpARM64EXTRWconst)
 17104  		v.AuxInt = int64ToAuxInt(32 - c)
 17105  		v.AddArg2(x2, x)
 17106  		return true
 17107  	}
 17108  	return false
 17109  }
 17110  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 17111  	v_1 := v.Args[1]
 17112  	v_0 := v.Args[0]
 17113  	b := v.Block
 17114  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 17115  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 17116  	for {
 17117  		d := auxIntToInt64(v.AuxInt)
 17118  		if v_0.Op != OpARM64MOVDconst {
 17119  			break
 17120  		}
 17121  		c := auxIntToInt64(v_0.AuxInt)
 17122  		x := v_1
 17123  		v.reset(OpARM64XORconst)
 17124  		v.AuxInt = int64ToAuxInt(c)
 17125  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 17126  		v0.AuxInt = int64ToAuxInt(d)
 17127  		v0.AddArg(x)
 17128  		v.AddArg(v0)
 17129  		return true
 17130  	}
 17131  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 17132  	// result: (XORconst x [c>>uint64(d)])
 17133  	for {
 17134  		d := auxIntToInt64(v.AuxInt)
 17135  		x := v_0
 17136  		if v_1.Op != OpARM64MOVDconst {
 17137  			break
 17138  		}
 17139  		c := auxIntToInt64(v_1.AuxInt)
 17140  		v.reset(OpARM64XORconst)
 17141  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17142  		v.AddArg(x)
 17143  		return true
 17144  	}
 17145  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 17146  	// result: (MOVDconst [0])
 17147  	for {
 17148  		c := auxIntToInt64(v.AuxInt)
 17149  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 17150  			break
 17151  		}
 17152  		x := v_0.Args[0]
 17153  		if x != v_1 {
 17154  			break
 17155  		}
 17156  		v.reset(OpARM64MOVDconst)
 17157  		v.AuxInt = int64ToAuxInt(0)
 17158  		return true
 17159  	}
 17160  	return false
 17161  }
 17162  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 17163  	v_1 := v.Args[1]
 17164  	v_0 := v.Args[0]
 17165  	b := v.Block
 17166  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 17167  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 17168  	for {
 17169  		d := auxIntToInt64(v.AuxInt)
 17170  		if v_0.Op != OpARM64MOVDconst {
 17171  			break
 17172  		}
 17173  		c := auxIntToInt64(v_0.AuxInt)
 17174  		x := v_1
 17175  		v.reset(OpARM64XORconst)
 17176  		v.AuxInt = int64ToAuxInt(c)
 17177  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 17178  		v0.AuxInt = int64ToAuxInt(d)
 17179  		v0.AddArg(x)
 17180  		v.AddArg(v0)
 17181  		return true
 17182  	}
 17183  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 17184  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 17185  	for {
 17186  		d := auxIntToInt64(v.AuxInt)
 17187  		x := v_0
 17188  		if v_1.Op != OpARM64MOVDconst {
 17189  			break
 17190  		}
 17191  		c := auxIntToInt64(v_1.AuxInt)
 17192  		v.reset(OpARM64XORconst)
 17193  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17194  		v.AddArg(x)
 17195  		return true
 17196  	}
 17197  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 17198  	// result: (MOVDconst [0])
 17199  	for {
 17200  		c := auxIntToInt64(v.AuxInt)
 17201  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 17202  			break
 17203  		}
 17204  		x := v_0.Args[0]
 17205  		if x != v_1 {
 17206  			break
 17207  		}
 17208  		v.reset(OpARM64MOVDconst)
 17209  		v.AuxInt = int64ToAuxInt(0)
 17210  		return true
 17211  	}
 17212  	return false
 17213  }
 17214  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 17215  	v_1 := v.Args[1]
 17216  	v_0 := v.Args[0]
 17217  	b := v.Block
 17218  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 17219  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 17220  	for {
 17221  		d := auxIntToInt64(v.AuxInt)
 17222  		if v_0.Op != OpARM64MOVDconst {
 17223  			break
 17224  		}
 17225  		c := auxIntToInt64(v_0.AuxInt)
 17226  		x := v_1
 17227  		v.reset(OpARM64XORconst)
 17228  		v.AuxInt = int64ToAuxInt(c)
 17229  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 17230  		v0.AuxInt = int64ToAuxInt(d)
 17231  		v0.AddArg(x)
 17232  		v.AddArg(v0)
 17233  		return true
 17234  	}
 17235  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 17236  	// result: (XORconst x [rotateRight64(c, d)])
 17237  	for {
 17238  		d := auxIntToInt64(v.AuxInt)
 17239  		x := v_0
 17240  		if v_1.Op != OpARM64MOVDconst {
 17241  			break
 17242  		}
 17243  		c := auxIntToInt64(v_1.AuxInt)
 17244  		v.reset(OpARM64XORconst)
 17245  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 17246  		v.AddArg(x)
 17247  		return true
 17248  	}
 17249  	// match: (XORshiftRO (RORconst x [c]) x [c])
 17250  	// result: (MOVDconst [0])
 17251  	for {
 17252  		c := auxIntToInt64(v.AuxInt)
 17253  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 17254  			break
 17255  		}
 17256  		x := v_0.Args[0]
 17257  		if x != v_1 {
 17258  			break
 17259  		}
 17260  		v.reset(OpARM64MOVDconst)
 17261  		v.AuxInt = int64ToAuxInt(0)
 17262  		return true
 17263  	}
 17264  	return false
 17265  }
 17266  func rewriteValueARM64_OpAddr(v *Value) bool {
 17267  	v_0 := v.Args[0]
 17268  	// match: (Addr {sym} base)
 17269  	// result: (MOVDaddr {sym} base)
 17270  	for {
 17271  		sym := auxToSym(v.Aux)
 17272  		base := v_0
 17273  		v.reset(OpARM64MOVDaddr)
 17274  		v.Aux = symToAux(sym)
 17275  		v.AddArg(base)
 17276  		return true
 17277  	}
 17278  }
 17279  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 17280  	v_1 := v.Args[1]
 17281  	v_0 := v.Args[0]
 17282  	b := v.Block
 17283  	// match: (Avg64u <t> x y)
 17284  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 17285  	for {
 17286  		t := v.Type
 17287  		x := v_0
 17288  		y := v_1
 17289  		v.reset(OpARM64ADD)
 17290  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 17291  		v0.AuxInt = int64ToAuxInt(1)
 17292  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 17293  		v1.AddArg2(x, y)
 17294  		v0.AddArg(v1)
 17295  		v.AddArg2(v0, y)
 17296  		return true
 17297  	}
 17298  }
 17299  func rewriteValueARM64_OpBitLen16(v *Value) bool {
 17300  	v_0 := v.Args[0]
 17301  	b := v.Block
 17302  	typ := &b.Func.Config.Types
 17303  	// match: (BitLen16 x)
 17304  	// result: (BitLen64 (ZeroExt16to64 x))
 17305  	for {
 17306  		x := v_0
 17307  		v.reset(OpBitLen64)
 17308  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 17309  		v0.AddArg(x)
 17310  		v.AddArg(v0)
 17311  		return true
 17312  	}
 17313  }
 17314  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 17315  	v_0 := v.Args[0]
 17316  	b := v.Block
 17317  	typ := &b.Func.Config.Types
 17318  	// match: (BitLen32 x)
 17319  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 17320  	for {
 17321  		x := v_0
 17322  		v.reset(OpARM64SUB)
 17323  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17324  		v0.AuxInt = int64ToAuxInt(32)
 17325  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 17326  		v1.AddArg(x)
 17327  		v.AddArg2(v0, v1)
 17328  		return true
 17329  	}
 17330  }
 17331  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 17332  	v_0 := v.Args[0]
 17333  	b := v.Block
 17334  	typ := &b.Func.Config.Types
 17335  	// match: (BitLen64 x)
 17336  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 17337  	for {
 17338  		x := v_0
 17339  		v.reset(OpARM64SUB)
 17340  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17341  		v0.AuxInt = int64ToAuxInt(64)
 17342  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 17343  		v1.AddArg(x)
 17344  		v.AddArg2(v0, v1)
 17345  		return true
 17346  	}
 17347  }
 17348  func rewriteValueARM64_OpBitLen8(v *Value) bool {
 17349  	v_0 := v.Args[0]
 17350  	b := v.Block
 17351  	typ := &b.Func.Config.Types
 17352  	// match: (BitLen8 x)
 17353  	// result: (BitLen64 (ZeroExt8to64 x))
 17354  	for {
 17355  		x := v_0
 17356  		v.reset(OpBitLen64)
 17357  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 17358  		v0.AddArg(x)
 17359  		v.AddArg(v0)
 17360  		return true
 17361  	}
 17362  }
 17363  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 17364  	v_0 := v.Args[0]
 17365  	b := v.Block
 17366  	typ := &b.Func.Config.Types
 17367  	// match: (BitRev16 x)
 17368  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 17369  	for {
 17370  		x := v_0
 17371  		v.reset(OpARM64SRLconst)
 17372  		v.AuxInt = int64ToAuxInt(48)
 17373  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 17374  		v0.AddArg(x)
 17375  		v.AddArg(v0)
 17376  		return true
 17377  	}
 17378  }
 17379  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 17380  	v_0 := v.Args[0]
 17381  	b := v.Block
 17382  	typ := &b.Func.Config.Types
 17383  	// match: (BitRev8 x)
 17384  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 17385  	for {
 17386  		x := v_0
 17387  		v.reset(OpARM64SRLconst)
 17388  		v.AuxInt = int64ToAuxInt(56)
 17389  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 17390  		v0.AddArg(x)
 17391  		v.AddArg(v0)
 17392  		return true
 17393  	}
 17394  }
 17395  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 17396  	v_2 := v.Args[2]
 17397  	v_1 := v.Args[1]
 17398  	v_0 := v.Args[0]
 17399  	b := v.Block
 17400  	// match: (CondSelect x y boolval)
 17401  	// cond: flagArg(boolval) != nil
 17402  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 17403  	for {
 17404  		x := v_0
 17405  		y := v_1
 17406  		boolval := v_2
 17407  		if !(flagArg(boolval) != nil) {
 17408  			break
 17409  		}
 17410  		v.reset(OpARM64CSEL)
 17411  		v.AuxInt = opToAuxInt(boolval.Op)
 17412  		v.AddArg3(x, y, flagArg(boolval))
 17413  		return true
 17414  	}
 17415  	// match: (CondSelect x y boolval)
 17416  	// cond: flagArg(boolval) == nil
 17417  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 17418  	for {
 17419  		x := v_0
 17420  		y := v_1
 17421  		boolval := v_2
 17422  		if !(flagArg(boolval) == nil) {
 17423  			break
 17424  		}
 17425  		v.reset(OpARM64CSEL)
 17426  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 17427  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 17428  		v0.AuxInt = int32ToAuxInt(1)
 17429  		v0.AddArg(boolval)
 17430  		v.AddArg3(x, y, v0)
 17431  		return true
 17432  	}
 17433  	return false
 17434  }
 17435  func rewriteValueARM64_OpConst16(v *Value) bool {
 17436  	// match: (Const16 [val])
 17437  	// result: (MOVDconst [int64(val)])
 17438  	for {
 17439  		val := auxIntToInt16(v.AuxInt)
 17440  		v.reset(OpARM64MOVDconst)
 17441  		v.AuxInt = int64ToAuxInt(int64(val))
 17442  		return true
 17443  	}
 17444  }
 17445  func rewriteValueARM64_OpConst32(v *Value) bool {
 17446  	// match: (Const32 [val])
 17447  	// result: (MOVDconst [int64(val)])
 17448  	for {
 17449  		val := auxIntToInt32(v.AuxInt)
 17450  		v.reset(OpARM64MOVDconst)
 17451  		v.AuxInt = int64ToAuxInt(int64(val))
 17452  		return true
 17453  	}
 17454  }
 17455  func rewriteValueARM64_OpConst32F(v *Value) bool {
 17456  	// match: (Const32F [val])
 17457  	// result: (FMOVSconst [float64(val)])
 17458  	for {
 17459  		val := auxIntToFloat32(v.AuxInt)
 17460  		v.reset(OpARM64FMOVSconst)
 17461  		v.AuxInt = float64ToAuxInt(float64(val))
 17462  		return true
 17463  	}
 17464  }
 17465  func rewriteValueARM64_OpConst64(v *Value) bool {
 17466  	// match: (Const64 [val])
 17467  	// result: (MOVDconst [int64(val)])
 17468  	for {
 17469  		val := auxIntToInt64(v.AuxInt)
 17470  		v.reset(OpARM64MOVDconst)
 17471  		v.AuxInt = int64ToAuxInt(int64(val))
 17472  		return true
 17473  	}
 17474  }
 17475  func rewriteValueARM64_OpConst64F(v *Value) bool {
 17476  	// match: (Const64F [val])
 17477  	// result: (FMOVDconst [float64(val)])
 17478  	for {
 17479  		val := auxIntToFloat64(v.AuxInt)
 17480  		v.reset(OpARM64FMOVDconst)
 17481  		v.AuxInt = float64ToAuxInt(float64(val))
 17482  		return true
 17483  	}
 17484  }
 17485  func rewriteValueARM64_OpConst8(v *Value) bool {
 17486  	// match: (Const8 [val])
 17487  	// result: (MOVDconst [int64(val)])
 17488  	for {
 17489  		val := auxIntToInt8(v.AuxInt)
 17490  		v.reset(OpARM64MOVDconst)
 17491  		v.AuxInt = int64ToAuxInt(int64(val))
 17492  		return true
 17493  	}
 17494  }
 17495  func rewriteValueARM64_OpConstBool(v *Value) bool {
 17496  	// match: (ConstBool [t])
 17497  	// result: (MOVDconst [b2i(t)])
 17498  	for {
 17499  		t := auxIntToBool(v.AuxInt)
 17500  		v.reset(OpARM64MOVDconst)
 17501  		v.AuxInt = int64ToAuxInt(b2i(t))
 17502  		return true
 17503  	}
 17504  }
 17505  func rewriteValueARM64_OpConstNil(v *Value) bool {
 17506  	// match: (ConstNil)
 17507  	// result: (MOVDconst [0])
 17508  	for {
 17509  		v.reset(OpARM64MOVDconst)
 17510  		v.AuxInt = int64ToAuxInt(0)
 17511  		return true
 17512  	}
 17513  }
 17514  func rewriteValueARM64_OpCtz16(v *Value) bool {
 17515  	v_0 := v.Args[0]
 17516  	b := v.Block
 17517  	typ := &b.Func.Config.Types
 17518  	// match: (Ctz16 <t> x)
 17519  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 17520  	for {
 17521  		t := v.Type
 17522  		x := v_0
 17523  		v.reset(OpARM64CLZW)
 17524  		v.Type = t
 17525  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 17526  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 17527  		v1.AuxInt = int64ToAuxInt(0x10000)
 17528  		v1.AddArg(x)
 17529  		v0.AddArg(v1)
 17530  		v.AddArg(v0)
 17531  		return true
 17532  	}
 17533  }
 17534  func rewriteValueARM64_OpCtz32(v *Value) bool {
 17535  	v_0 := v.Args[0]
 17536  	b := v.Block
 17537  	// match: (Ctz32 <t> x)
 17538  	// result: (CLZW (RBITW <t> x))
 17539  	for {
 17540  		t := v.Type
 17541  		x := v_0
 17542  		v.reset(OpARM64CLZW)
 17543  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 17544  		v0.AddArg(x)
 17545  		v.AddArg(v0)
 17546  		return true
 17547  	}
 17548  }
 17549  func rewriteValueARM64_OpCtz64(v *Value) bool {
 17550  	v_0 := v.Args[0]
 17551  	b := v.Block
 17552  	// match: (Ctz64 <t> x)
 17553  	// result: (CLZ (RBIT <t> x))
 17554  	for {
 17555  		t := v.Type
 17556  		x := v_0
 17557  		v.reset(OpARM64CLZ)
 17558  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 17559  		v0.AddArg(x)
 17560  		v.AddArg(v0)
 17561  		return true
 17562  	}
 17563  }
 17564  func rewriteValueARM64_OpCtz8(v *Value) bool {
 17565  	v_0 := v.Args[0]
 17566  	b := v.Block
 17567  	typ := &b.Func.Config.Types
 17568  	// match: (Ctz8 <t> x)
 17569  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 17570  	for {
 17571  		t := v.Type
 17572  		x := v_0
 17573  		v.reset(OpARM64CLZW)
 17574  		v.Type = t
 17575  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 17576  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 17577  		v1.AuxInt = int64ToAuxInt(0x100)
 17578  		v1.AddArg(x)
 17579  		v0.AddArg(v1)
 17580  		v.AddArg(v0)
 17581  		return true
 17582  	}
 17583  }
 17584  func rewriteValueARM64_OpDiv16(v *Value) bool {
 17585  	v_1 := v.Args[1]
 17586  	v_0 := v.Args[0]
 17587  	b := v.Block
 17588  	typ := &b.Func.Config.Types
 17589  	// match: (Div16 [false] x y)
 17590  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 17591  	for {
 17592  		if auxIntToBool(v.AuxInt) != false {
 17593  			break
 17594  		}
 17595  		x := v_0
 17596  		y := v_1
 17597  		v.reset(OpARM64DIVW)
 17598  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17599  		v0.AddArg(x)
 17600  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17601  		v1.AddArg(y)
 17602  		v.AddArg2(v0, v1)
 17603  		return true
 17604  	}
 17605  	return false
 17606  }
 17607  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 17608  	v_1 := v.Args[1]
 17609  	v_0 := v.Args[0]
 17610  	b := v.Block
 17611  	typ := &b.Func.Config.Types
 17612  	// match: (Div16u x y)
 17613  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 17614  	for {
 17615  		x := v_0
 17616  		y := v_1
 17617  		v.reset(OpARM64UDIVW)
 17618  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17619  		v0.AddArg(x)
 17620  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17621  		v1.AddArg(y)
 17622  		v.AddArg2(v0, v1)
 17623  		return true
 17624  	}
 17625  }
 17626  func rewriteValueARM64_OpDiv32(v *Value) bool {
 17627  	v_1 := v.Args[1]
 17628  	v_0 := v.Args[0]
 17629  	// match: (Div32 [false] x y)
 17630  	// result: (DIVW x y)
 17631  	for {
 17632  		if auxIntToBool(v.AuxInt) != false {
 17633  			break
 17634  		}
 17635  		x := v_0
 17636  		y := v_1
 17637  		v.reset(OpARM64DIVW)
 17638  		v.AddArg2(x, y)
 17639  		return true
 17640  	}
 17641  	return false
 17642  }
 17643  func rewriteValueARM64_OpDiv64(v *Value) bool {
 17644  	v_1 := v.Args[1]
 17645  	v_0 := v.Args[0]
 17646  	// match: (Div64 [false] x y)
 17647  	// result: (DIV x y)
 17648  	for {
 17649  		if auxIntToBool(v.AuxInt) != false {
 17650  			break
 17651  		}
 17652  		x := v_0
 17653  		y := v_1
 17654  		v.reset(OpARM64DIV)
 17655  		v.AddArg2(x, y)
 17656  		return true
 17657  	}
 17658  	return false
 17659  }
 17660  func rewriteValueARM64_OpDiv8(v *Value) bool {
 17661  	v_1 := v.Args[1]
 17662  	v_0 := v.Args[0]
 17663  	b := v.Block
 17664  	typ := &b.Func.Config.Types
 17665  	// match: (Div8 x y)
 17666  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 17667  	for {
 17668  		x := v_0
 17669  		y := v_1
 17670  		v.reset(OpARM64DIVW)
 17671  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17672  		v0.AddArg(x)
 17673  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17674  		v1.AddArg(y)
 17675  		v.AddArg2(v0, v1)
 17676  		return true
 17677  	}
 17678  }
 17679  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 17680  	v_1 := v.Args[1]
 17681  	v_0 := v.Args[0]
 17682  	b := v.Block
 17683  	typ := &b.Func.Config.Types
 17684  	// match: (Div8u x y)
 17685  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 17686  	for {
 17687  		x := v_0
 17688  		y := v_1
 17689  		v.reset(OpARM64UDIVW)
 17690  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17691  		v0.AddArg(x)
 17692  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17693  		v1.AddArg(y)
 17694  		v.AddArg2(v0, v1)
 17695  		return true
 17696  	}
 17697  }
 17698  func rewriteValueARM64_OpEq16(v *Value) bool {
 17699  	v_1 := v.Args[1]
 17700  	v_0 := v.Args[0]
 17701  	b := v.Block
 17702  	typ := &b.Func.Config.Types
 17703  	// match: (Eq16 x y)
 17704  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17705  	for {
 17706  		x := v_0
 17707  		y := v_1
 17708  		v.reset(OpARM64Equal)
 17709  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17710  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17711  		v1.AddArg(x)
 17712  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17713  		v2.AddArg(y)
 17714  		v0.AddArg2(v1, v2)
 17715  		v.AddArg(v0)
 17716  		return true
 17717  	}
 17718  }
 17719  func rewriteValueARM64_OpEq32(v *Value) bool {
 17720  	v_1 := v.Args[1]
 17721  	v_0 := v.Args[0]
 17722  	b := v.Block
 17723  	// match: (Eq32 x y)
 17724  	// result: (Equal (CMPW x y))
 17725  	for {
 17726  		x := v_0
 17727  		y := v_1
 17728  		v.reset(OpARM64Equal)
 17729  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17730  		v0.AddArg2(x, y)
 17731  		v.AddArg(v0)
 17732  		return true
 17733  	}
 17734  }
 17735  func rewriteValueARM64_OpEq32F(v *Value) bool {
 17736  	v_1 := v.Args[1]
 17737  	v_0 := v.Args[0]
 17738  	b := v.Block
 17739  	// match: (Eq32F x y)
 17740  	// result: (Equal (FCMPS x y))
 17741  	for {
 17742  		x := v_0
 17743  		y := v_1
 17744  		v.reset(OpARM64Equal)
 17745  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17746  		v0.AddArg2(x, y)
 17747  		v.AddArg(v0)
 17748  		return true
 17749  	}
 17750  }
 17751  func rewriteValueARM64_OpEq64(v *Value) bool {
 17752  	v_1 := v.Args[1]
 17753  	v_0 := v.Args[0]
 17754  	b := v.Block
 17755  	// match: (Eq64 x y)
 17756  	// result: (Equal (CMP x y))
 17757  	for {
 17758  		x := v_0
 17759  		y := v_1
 17760  		v.reset(OpARM64Equal)
 17761  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17762  		v0.AddArg2(x, y)
 17763  		v.AddArg(v0)
 17764  		return true
 17765  	}
 17766  }
 17767  func rewriteValueARM64_OpEq64F(v *Value) bool {
 17768  	v_1 := v.Args[1]
 17769  	v_0 := v.Args[0]
 17770  	b := v.Block
 17771  	// match: (Eq64F x y)
 17772  	// result: (Equal (FCMPD x y))
 17773  	for {
 17774  		x := v_0
 17775  		y := v_1
 17776  		v.reset(OpARM64Equal)
 17777  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17778  		v0.AddArg2(x, y)
 17779  		v.AddArg(v0)
 17780  		return true
 17781  	}
 17782  }
 17783  func rewriteValueARM64_OpEq8(v *Value) bool {
 17784  	v_1 := v.Args[1]
 17785  	v_0 := v.Args[0]
 17786  	b := v.Block
 17787  	typ := &b.Func.Config.Types
 17788  	// match: (Eq8 x y)
 17789  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17790  	for {
 17791  		x := v_0
 17792  		y := v_1
 17793  		v.reset(OpARM64Equal)
 17794  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17795  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17796  		v1.AddArg(x)
 17797  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17798  		v2.AddArg(y)
 17799  		v0.AddArg2(v1, v2)
 17800  		v.AddArg(v0)
 17801  		return true
 17802  	}
 17803  }
 17804  func rewriteValueARM64_OpEqB(v *Value) bool {
 17805  	v_1 := v.Args[1]
 17806  	v_0 := v.Args[0]
 17807  	b := v.Block
 17808  	typ := &b.Func.Config.Types
 17809  	// match: (EqB x y)
 17810  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 17811  	for {
 17812  		x := v_0
 17813  		y := v_1
 17814  		v.reset(OpARM64XOR)
 17815  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17816  		v0.AuxInt = int64ToAuxInt(1)
 17817  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 17818  		v1.AddArg2(x, y)
 17819  		v.AddArg2(v0, v1)
 17820  		return true
 17821  	}
 17822  }
 17823  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 17824  	v_1 := v.Args[1]
 17825  	v_0 := v.Args[0]
 17826  	b := v.Block
 17827  	// match: (EqPtr x y)
 17828  	// result: (Equal (CMP x y))
 17829  	for {
 17830  		x := v_0
 17831  		y := v_1
 17832  		v.reset(OpARM64Equal)
 17833  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17834  		v0.AddArg2(x, y)
 17835  		v.AddArg(v0)
 17836  		return true
 17837  	}
 17838  }
 17839  func rewriteValueARM64_OpFMA(v *Value) bool {
 17840  	v_2 := v.Args[2]
 17841  	v_1 := v.Args[1]
 17842  	v_0 := v.Args[0]
 17843  	// match: (FMA x y z)
 17844  	// result: (FMADDD z x y)
 17845  	for {
 17846  		x := v_0
 17847  		y := v_1
 17848  		z := v_2
 17849  		v.reset(OpARM64FMADDD)
 17850  		v.AddArg3(z, x, y)
 17851  		return true
 17852  	}
 17853  }
 17854  func rewriteValueARM64_OpHmul32(v *Value) bool {
 17855  	v_1 := v.Args[1]
 17856  	v_0 := v.Args[0]
 17857  	b := v.Block
 17858  	typ := &b.Func.Config.Types
 17859  	// match: (Hmul32 x y)
 17860  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 17861  	for {
 17862  		x := v_0
 17863  		y := v_1
 17864  		v.reset(OpARM64SRAconst)
 17865  		v.AuxInt = int64ToAuxInt(32)
 17866  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 17867  		v0.AddArg2(x, y)
 17868  		v.AddArg(v0)
 17869  		return true
 17870  	}
 17871  }
 17872  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 17873  	v_1 := v.Args[1]
 17874  	v_0 := v.Args[0]
 17875  	b := v.Block
 17876  	typ := &b.Func.Config.Types
 17877  	// match: (Hmul32u x y)
 17878  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 17879  	for {
 17880  		x := v_0
 17881  		y := v_1
 17882  		v.reset(OpARM64SRAconst)
 17883  		v.AuxInt = int64ToAuxInt(32)
 17884  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 17885  		v0.AddArg2(x, y)
 17886  		v.AddArg(v0)
 17887  		return true
 17888  	}
 17889  }
 17890  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 17891  	v_1 := v.Args[1]
 17892  	v_0 := v.Args[0]
 17893  	b := v.Block
 17894  	// match: (IsInBounds idx len)
 17895  	// result: (LessThanU (CMP idx len))
 17896  	for {
 17897  		idx := v_0
 17898  		len := v_1
 17899  		v.reset(OpARM64LessThanU)
 17900  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17901  		v0.AddArg2(idx, len)
 17902  		v.AddArg(v0)
 17903  		return true
 17904  	}
 17905  }
 17906  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 17907  	v_0 := v.Args[0]
 17908  	b := v.Block
 17909  	// match: (IsNonNil ptr)
 17910  	// result: (NotEqual (CMPconst [0] ptr))
 17911  	for {
 17912  		ptr := v_0
 17913  		v.reset(OpARM64NotEqual)
 17914  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 17915  		v0.AuxInt = int64ToAuxInt(0)
 17916  		v0.AddArg(ptr)
 17917  		v.AddArg(v0)
 17918  		return true
 17919  	}
 17920  }
 17921  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 17922  	v_1 := v.Args[1]
 17923  	v_0 := v.Args[0]
 17924  	b := v.Block
 17925  	// match: (IsSliceInBounds idx len)
 17926  	// result: (LessEqualU (CMP idx len))
 17927  	for {
 17928  		idx := v_0
 17929  		len := v_1
 17930  		v.reset(OpARM64LessEqualU)
 17931  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17932  		v0.AddArg2(idx, len)
 17933  		v.AddArg(v0)
 17934  		return true
 17935  	}
 17936  }
 17937  func rewriteValueARM64_OpLeq16(v *Value) bool {
 17938  	v_1 := v.Args[1]
 17939  	v_0 := v.Args[0]
 17940  	b := v.Block
 17941  	typ := &b.Func.Config.Types
 17942  	// match: (Leq16 x y)
 17943  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 17944  	for {
 17945  		x := v_0
 17946  		y := v_1
 17947  		v.reset(OpARM64LessEqual)
 17948  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17949  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17950  		v1.AddArg(x)
 17951  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17952  		v2.AddArg(y)
 17953  		v0.AddArg2(v1, v2)
 17954  		v.AddArg(v0)
 17955  		return true
 17956  	}
 17957  }
 17958  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 17959  	v_1 := v.Args[1]
 17960  	v_0 := v.Args[0]
 17961  	b := v.Block
 17962  	typ := &b.Func.Config.Types
 17963  	// match: (Leq16U x zero:(MOVDconst [0]))
 17964  	// result: (Eq16 x zero)
 17965  	for {
 17966  		x := v_0
 17967  		zero := v_1
 17968  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17969  			break
 17970  		}
 17971  		v.reset(OpEq16)
 17972  		v.AddArg2(x, zero)
 17973  		return true
 17974  	}
 17975  	// match: (Leq16U (MOVDconst [1]) x)
 17976  	// result: (Neq16 (MOVDconst [0]) x)
 17977  	for {
 17978  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17979  			break
 17980  		}
 17981  		x := v_1
 17982  		v.reset(OpNeq16)
 17983  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17984  		v0.AuxInt = int64ToAuxInt(0)
 17985  		v.AddArg2(v0, x)
 17986  		return true
 17987  	}
 17988  	// match: (Leq16U x y)
 17989  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17990  	for {
 17991  		x := v_0
 17992  		y := v_1
 17993  		v.reset(OpARM64LessEqualU)
 17994  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17995  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17996  		v1.AddArg(x)
 17997  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17998  		v2.AddArg(y)
 17999  		v0.AddArg2(v1, v2)
 18000  		v.AddArg(v0)
 18001  		return true
 18002  	}
 18003  }
 18004  func rewriteValueARM64_OpLeq32(v *Value) bool {
 18005  	v_1 := v.Args[1]
 18006  	v_0 := v.Args[0]
 18007  	b := v.Block
 18008  	// match: (Leq32 x y)
 18009  	// result: (LessEqual (CMPW x y))
 18010  	for {
 18011  		x := v_0
 18012  		y := v_1
 18013  		v.reset(OpARM64LessEqual)
 18014  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18015  		v0.AddArg2(x, y)
 18016  		v.AddArg(v0)
 18017  		return true
 18018  	}
 18019  }
 18020  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 18021  	v_1 := v.Args[1]
 18022  	v_0 := v.Args[0]
 18023  	b := v.Block
 18024  	// match: (Leq32F x y)
 18025  	// result: (LessEqualF (FCMPS x y))
 18026  	for {
 18027  		x := v_0
 18028  		y := v_1
 18029  		v.reset(OpARM64LessEqualF)
 18030  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 18031  		v0.AddArg2(x, y)
 18032  		v.AddArg(v0)
 18033  		return true
 18034  	}
 18035  }
 18036  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 18037  	v_1 := v.Args[1]
 18038  	v_0 := v.Args[0]
 18039  	b := v.Block
 18040  	typ := &b.Func.Config.Types
 18041  	// match: (Leq32U x zero:(MOVDconst [0]))
 18042  	// result: (Eq32 x zero)
 18043  	for {
 18044  		x := v_0
 18045  		zero := v_1
 18046  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18047  			break
 18048  		}
 18049  		v.reset(OpEq32)
 18050  		v.AddArg2(x, zero)
 18051  		return true
 18052  	}
 18053  	// match: (Leq32U (MOVDconst [1]) x)
 18054  	// result: (Neq32 (MOVDconst [0]) x)
 18055  	for {
 18056  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 18057  			break
 18058  		}
 18059  		x := v_1
 18060  		v.reset(OpNeq32)
 18061  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18062  		v0.AuxInt = int64ToAuxInt(0)
 18063  		v.AddArg2(v0, x)
 18064  		return true
 18065  	}
 18066  	// match: (Leq32U x y)
 18067  	// result: (LessEqualU (CMPW x y))
 18068  	for {
 18069  		x := v_0
 18070  		y := v_1
 18071  		v.reset(OpARM64LessEqualU)
 18072  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18073  		v0.AddArg2(x, y)
 18074  		v.AddArg(v0)
 18075  		return true
 18076  	}
 18077  }
 18078  func rewriteValueARM64_OpLeq64(v *Value) bool {
 18079  	v_1 := v.Args[1]
 18080  	v_0 := v.Args[0]
 18081  	b := v.Block
 18082  	// match: (Leq64 x y)
 18083  	// result: (LessEqual (CMP x y))
 18084  	for {
 18085  		x := v_0
 18086  		y := v_1
 18087  		v.reset(OpARM64LessEqual)
 18088  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18089  		v0.AddArg2(x, y)
 18090  		v.AddArg(v0)
 18091  		return true
 18092  	}
 18093  }
 18094  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 18095  	v_1 := v.Args[1]
 18096  	v_0 := v.Args[0]
 18097  	b := v.Block
 18098  	// match: (Leq64F x y)
 18099  	// result: (LessEqualF (FCMPD x y))
 18100  	for {
 18101  		x := v_0
 18102  		y := v_1
 18103  		v.reset(OpARM64LessEqualF)
 18104  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 18105  		v0.AddArg2(x, y)
 18106  		v.AddArg(v0)
 18107  		return true
 18108  	}
 18109  }
 18110  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 18111  	v_1 := v.Args[1]
 18112  	v_0 := v.Args[0]
 18113  	b := v.Block
 18114  	typ := &b.Func.Config.Types
 18115  	// match: (Leq64U x zero:(MOVDconst [0]))
 18116  	// result: (Eq64 x zero)
 18117  	for {
 18118  		x := v_0
 18119  		zero := v_1
 18120  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18121  			break
 18122  		}
 18123  		v.reset(OpEq64)
 18124  		v.AddArg2(x, zero)
 18125  		return true
 18126  	}
 18127  	// match: (Leq64U (MOVDconst [1]) x)
 18128  	// result: (Neq64 (MOVDconst [0]) x)
 18129  	for {
 18130  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 18131  			break
 18132  		}
 18133  		x := v_1
 18134  		v.reset(OpNeq64)
 18135  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18136  		v0.AuxInt = int64ToAuxInt(0)
 18137  		v.AddArg2(v0, x)
 18138  		return true
 18139  	}
 18140  	// match: (Leq64U x y)
 18141  	// result: (LessEqualU (CMP x y))
 18142  	for {
 18143  		x := v_0
 18144  		y := v_1
 18145  		v.reset(OpARM64LessEqualU)
 18146  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18147  		v0.AddArg2(x, y)
 18148  		v.AddArg(v0)
 18149  		return true
 18150  	}
 18151  }
 18152  func rewriteValueARM64_OpLeq8(v *Value) bool {
 18153  	v_1 := v.Args[1]
 18154  	v_0 := v.Args[0]
 18155  	b := v.Block
 18156  	typ := &b.Func.Config.Types
 18157  	// match: (Leq8 x y)
 18158  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 18159  	for {
 18160  		x := v_0
 18161  		y := v_1
 18162  		v.reset(OpARM64LessEqual)
 18163  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18164  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18165  		v1.AddArg(x)
 18166  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18167  		v2.AddArg(y)
 18168  		v0.AddArg2(v1, v2)
 18169  		v.AddArg(v0)
 18170  		return true
 18171  	}
 18172  }
 18173  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 18174  	v_1 := v.Args[1]
 18175  	v_0 := v.Args[0]
 18176  	b := v.Block
 18177  	typ := &b.Func.Config.Types
 18178  	// match: (Leq8U x zero:(MOVDconst [0]))
 18179  	// result: (Eq8 x zero)
 18180  	for {
 18181  		x := v_0
 18182  		zero := v_1
 18183  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18184  			break
 18185  		}
 18186  		v.reset(OpEq8)
 18187  		v.AddArg2(x, zero)
 18188  		return true
 18189  	}
 18190  	// match: (Leq8U (MOVDconst [1]) x)
 18191  	// result: (Neq8 (MOVDconst [0]) x)
 18192  	for {
 18193  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 18194  			break
 18195  		}
 18196  		x := v_1
 18197  		v.reset(OpNeq8)
 18198  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18199  		v0.AuxInt = int64ToAuxInt(0)
 18200  		v.AddArg2(v0, x)
 18201  		return true
 18202  	}
 18203  	// match: (Leq8U x y)
 18204  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 18205  	for {
 18206  		x := v_0
 18207  		y := v_1
 18208  		v.reset(OpARM64LessEqualU)
 18209  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18210  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18211  		v1.AddArg(x)
 18212  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18213  		v2.AddArg(y)
 18214  		v0.AddArg2(v1, v2)
 18215  		v.AddArg(v0)
 18216  		return true
 18217  	}
 18218  }
 18219  func rewriteValueARM64_OpLess16(v *Value) bool {
 18220  	v_1 := v.Args[1]
 18221  	v_0 := v.Args[0]
 18222  	b := v.Block
 18223  	typ := &b.Func.Config.Types
 18224  	// match: (Less16 x y)
 18225  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 18226  	for {
 18227  		x := v_0
 18228  		y := v_1
 18229  		v.reset(OpARM64LessThan)
 18230  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18231  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18232  		v1.AddArg(x)
 18233  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18234  		v2.AddArg(y)
 18235  		v0.AddArg2(v1, v2)
 18236  		v.AddArg(v0)
 18237  		return true
 18238  	}
 18239  }
 18240  func rewriteValueARM64_OpLess16U(v *Value) bool {
 18241  	v_1 := v.Args[1]
 18242  	v_0 := v.Args[0]
 18243  	b := v.Block
 18244  	typ := &b.Func.Config.Types
 18245  	// match: (Less16U zero:(MOVDconst [0]) x)
 18246  	// result: (Neq16 zero x)
 18247  	for {
 18248  		zero := v_0
 18249  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18250  			break
 18251  		}
 18252  		x := v_1
 18253  		v.reset(OpNeq16)
 18254  		v.AddArg2(zero, x)
 18255  		return true
 18256  	}
 18257  	// match: (Less16U x (MOVDconst [1]))
 18258  	// result: (Eq16 x (MOVDconst [0]))
 18259  	for {
 18260  		x := v_0
 18261  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18262  			break
 18263  		}
 18264  		v.reset(OpEq16)
 18265  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18266  		v0.AuxInt = int64ToAuxInt(0)
 18267  		v.AddArg2(x, v0)
 18268  		return true
 18269  	}
 18270  	// match: (Less16U x y)
 18271  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 18272  	for {
 18273  		x := v_0
 18274  		y := v_1
 18275  		v.reset(OpARM64LessThanU)
 18276  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18277  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18278  		v1.AddArg(x)
 18279  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18280  		v2.AddArg(y)
 18281  		v0.AddArg2(v1, v2)
 18282  		v.AddArg(v0)
 18283  		return true
 18284  	}
 18285  }
 18286  func rewriteValueARM64_OpLess32(v *Value) bool {
 18287  	v_1 := v.Args[1]
 18288  	v_0 := v.Args[0]
 18289  	b := v.Block
 18290  	// match: (Less32 x y)
 18291  	// result: (LessThan (CMPW x y))
 18292  	for {
 18293  		x := v_0
 18294  		y := v_1
 18295  		v.reset(OpARM64LessThan)
 18296  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18297  		v0.AddArg2(x, y)
 18298  		v.AddArg(v0)
 18299  		return true
 18300  	}
 18301  }
 18302  func rewriteValueARM64_OpLess32F(v *Value) bool {
 18303  	v_1 := v.Args[1]
 18304  	v_0 := v.Args[0]
 18305  	b := v.Block
 18306  	// match: (Less32F x y)
 18307  	// result: (LessThanF (FCMPS x y))
 18308  	for {
 18309  		x := v_0
 18310  		y := v_1
 18311  		v.reset(OpARM64LessThanF)
 18312  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 18313  		v0.AddArg2(x, y)
 18314  		v.AddArg(v0)
 18315  		return true
 18316  	}
 18317  }
 18318  func rewriteValueARM64_OpLess32U(v *Value) bool {
 18319  	v_1 := v.Args[1]
 18320  	v_0 := v.Args[0]
 18321  	b := v.Block
 18322  	typ := &b.Func.Config.Types
 18323  	// match: (Less32U zero:(MOVDconst [0]) x)
 18324  	// result: (Neq32 zero x)
 18325  	for {
 18326  		zero := v_0
 18327  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18328  			break
 18329  		}
 18330  		x := v_1
 18331  		v.reset(OpNeq32)
 18332  		v.AddArg2(zero, x)
 18333  		return true
 18334  	}
 18335  	// match: (Less32U x (MOVDconst [1]))
 18336  	// result: (Eq32 x (MOVDconst [0]))
 18337  	for {
 18338  		x := v_0
 18339  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18340  			break
 18341  		}
 18342  		v.reset(OpEq32)
 18343  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18344  		v0.AuxInt = int64ToAuxInt(0)
 18345  		v.AddArg2(x, v0)
 18346  		return true
 18347  	}
 18348  	// match: (Less32U x y)
 18349  	// result: (LessThanU (CMPW x y))
 18350  	for {
 18351  		x := v_0
 18352  		y := v_1
 18353  		v.reset(OpARM64LessThanU)
 18354  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18355  		v0.AddArg2(x, y)
 18356  		v.AddArg(v0)
 18357  		return true
 18358  	}
 18359  }
 18360  func rewriteValueARM64_OpLess64(v *Value) bool {
 18361  	v_1 := v.Args[1]
 18362  	v_0 := v.Args[0]
 18363  	b := v.Block
 18364  	// match: (Less64 x y)
 18365  	// result: (LessThan (CMP x y))
 18366  	for {
 18367  		x := v_0
 18368  		y := v_1
 18369  		v.reset(OpARM64LessThan)
 18370  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18371  		v0.AddArg2(x, y)
 18372  		v.AddArg(v0)
 18373  		return true
 18374  	}
 18375  }
 18376  func rewriteValueARM64_OpLess64F(v *Value) bool {
 18377  	v_1 := v.Args[1]
 18378  	v_0 := v.Args[0]
 18379  	b := v.Block
 18380  	// match: (Less64F x y)
 18381  	// result: (LessThanF (FCMPD x y))
 18382  	for {
 18383  		x := v_0
 18384  		y := v_1
 18385  		v.reset(OpARM64LessThanF)
 18386  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 18387  		v0.AddArg2(x, y)
 18388  		v.AddArg(v0)
 18389  		return true
 18390  	}
 18391  }
 18392  func rewriteValueARM64_OpLess64U(v *Value) bool {
 18393  	v_1 := v.Args[1]
 18394  	v_0 := v.Args[0]
 18395  	b := v.Block
 18396  	typ := &b.Func.Config.Types
 18397  	// match: (Less64U zero:(MOVDconst [0]) x)
 18398  	// result: (Neq64 zero x)
 18399  	for {
 18400  		zero := v_0
 18401  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18402  			break
 18403  		}
 18404  		x := v_1
 18405  		v.reset(OpNeq64)
 18406  		v.AddArg2(zero, x)
 18407  		return true
 18408  	}
 18409  	// match: (Less64U x (MOVDconst [1]))
 18410  	// result: (Eq64 x (MOVDconst [0]))
 18411  	for {
 18412  		x := v_0
 18413  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18414  			break
 18415  		}
 18416  		v.reset(OpEq64)
 18417  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18418  		v0.AuxInt = int64ToAuxInt(0)
 18419  		v.AddArg2(x, v0)
 18420  		return true
 18421  	}
 18422  	// match: (Less64U x y)
 18423  	// result: (LessThanU (CMP x y))
 18424  	for {
 18425  		x := v_0
 18426  		y := v_1
 18427  		v.reset(OpARM64LessThanU)
 18428  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18429  		v0.AddArg2(x, y)
 18430  		v.AddArg(v0)
 18431  		return true
 18432  	}
 18433  }
 18434  func rewriteValueARM64_OpLess8(v *Value) bool {
 18435  	v_1 := v.Args[1]
 18436  	v_0 := v.Args[0]
 18437  	b := v.Block
 18438  	typ := &b.Func.Config.Types
 18439  	// match: (Less8 x y)
 18440  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 18441  	for {
 18442  		x := v_0
 18443  		y := v_1
 18444  		v.reset(OpARM64LessThan)
 18445  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18446  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18447  		v1.AddArg(x)
 18448  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18449  		v2.AddArg(y)
 18450  		v0.AddArg2(v1, v2)
 18451  		v.AddArg(v0)
 18452  		return true
 18453  	}
 18454  }
 18455  func rewriteValueARM64_OpLess8U(v *Value) bool {
 18456  	v_1 := v.Args[1]
 18457  	v_0 := v.Args[0]
 18458  	b := v.Block
 18459  	typ := &b.Func.Config.Types
 18460  	// match: (Less8U zero:(MOVDconst [0]) x)
 18461  	// result: (Neq8 zero x)
 18462  	for {
 18463  		zero := v_0
 18464  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18465  			break
 18466  		}
 18467  		x := v_1
 18468  		v.reset(OpNeq8)
 18469  		v.AddArg2(zero, x)
 18470  		return true
 18471  	}
 18472  	// match: (Less8U x (MOVDconst [1]))
 18473  	// result: (Eq8 x (MOVDconst [0]))
 18474  	for {
 18475  		x := v_0
 18476  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 18477  			break
 18478  		}
 18479  		v.reset(OpEq8)
 18480  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18481  		v0.AuxInt = int64ToAuxInt(0)
 18482  		v.AddArg2(x, v0)
 18483  		return true
 18484  	}
 18485  	// match: (Less8U x y)
 18486  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 18487  	for {
 18488  		x := v_0
 18489  		y := v_1
 18490  		v.reset(OpARM64LessThanU)
 18491  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18492  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18493  		v1.AddArg(x)
 18494  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18495  		v2.AddArg(y)
 18496  		v0.AddArg2(v1, v2)
 18497  		v.AddArg(v0)
 18498  		return true
 18499  	}
 18500  }
 18501  func rewriteValueARM64_OpLoad(v *Value) bool {
 18502  	v_1 := v.Args[1]
 18503  	v_0 := v.Args[0]
 18504  	// match: (Load <t> ptr mem)
 18505  	// cond: t.IsBoolean()
 18506  	// result: (MOVBUload ptr mem)
 18507  	for {
 18508  		t := v.Type
 18509  		ptr := v_0
 18510  		mem := v_1
 18511  		if !(t.IsBoolean()) {
 18512  			break
 18513  		}
 18514  		v.reset(OpARM64MOVBUload)
 18515  		v.AddArg2(ptr, mem)
 18516  		return true
 18517  	}
 18518  	// match: (Load <t> ptr mem)
 18519  	// cond: (is8BitInt(t) && t.IsSigned())
 18520  	// result: (MOVBload ptr mem)
 18521  	for {
 18522  		t := v.Type
 18523  		ptr := v_0
 18524  		mem := v_1
 18525  		if !(is8BitInt(t) && t.IsSigned()) {
 18526  			break
 18527  		}
 18528  		v.reset(OpARM64MOVBload)
 18529  		v.AddArg2(ptr, mem)
 18530  		return true
 18531  	}
 18532  	// match: (Load <t> ptr mem)
 18533  	// cond: (is8BitInt(t) && !t.IsSigned())
 18534  	// result: (MOVBUload ptr mem)
 18535  	for {
 18536  		t := v.Type
 18537  		ptr := v_0
 18538  		mem := v_1
 18539  		if !(is8BitInt(t) && !t.IsSigned()) {
 18540  			break
 18541  		}
 18542  		v.reset(OpARM64MOVBUload)
 18543  		v.AddArg2(ptr, mem)
 18544  		return true
 18545  	}
 18546  	// match: (Load <t> ptr mem)
 18547  	// cond: (is16BitInt(t) && t.IsSigned())
 18548  	// result: (MOVHload ptr mem)
 18549  	for {
 18550  		t := v.Type
 18551  		ptr := v_0
 18552  		mem := v_1
 18553  		if !(is16BitInt(t) && t.IsSigned()) {
 18554  			break
 18555  		}
 18556  		v.reset(OpARM64MOVHload)
 18557  		v.AddArg2(ptr, mem)
 18558  		return true
 18559  	}
 18560  	// match: (Load <t> ptr mem)
 18561  	// cond: (is16BitInt(t) && !t.IsSigned())
 18562  	// result: (MOVHUload ptr mem)
 18563  	for {
 18564  		t := v.Type
 18565  		ptr := v_0
 18566  		mem := v_1
 18567  		if !(is16BitInt(t) && !t.IsSigned()) {
 18568  			break
 18569  		}
 18570  		v.reset(OpARM64MOVHUload)
 18571  		v.AddArg2(ptr, mem)
 18572  		return true
 18573  	}
 18574  	// match: (Load <t> ptr mem)
 18575  	// cond: (is32BitInt(t) && t.IsSigned())
 18576  	// result: (MOVWload ptr mem)
 18577  	for {
 18578  		t := v.Type
 18579  		ptr := v_0
 18580  		mem := v_1
 18581  		if !(is32BitInt(t) && t.IsSigned()) {
 18582  			break
 18583  		}
 18584  		v.reset(OpARM64MOVWload)
 18585  		v.AddArg2(ptr, mem)
 18586  		return true
 18587  	}
 18588  	// match: (Load <t> ptr mem)
 18589  	// cond: (is32BitInt(t) && !t.IsSigned())
 18590  	// result: (MOVWUload ptr mem)
 18591  	for {
 18592  		t := v.Type
 18593  		ptr := v_0
 18594  		mem := v_1
 18595  		if !(is32BitInt(t) && !t.IsSigned()) {
 18596  			break
 18597  		}
 18598  		v.reset(OpARM64MOVWUload)
 18599  		v.AddArg2(ptr, mem)
 18600  		return true
 18601  	}
 18602  	// match: (Load <t> ptr mem)
 18603  	// cond: (is64BitInt(t) || isPtr(t))
 18604  	// result: (MOVDload ptr mem)
 18605  	for {
 18606  		t := v.Type
 18607  		ptr := v_0
 18608  		mem := v_1
 18609  		if !(is64BitInt(t) || isPtr(t)) {
 18610  			break
 18611  		}
 18612  		v.reset(OpARM64MOVDload)
 18613  		v.AddArg2(ptr, mem)
 18614  		return true
 18615  	}
 18616  	// match: (Load <t> ptr mem)
 18617  	// cond: is32BitFloat(t)
 18618  	// result: (FMOVSload ptr mem)
 18619  	for {
 18620  		t := v.Type
 18621  		ptr := v_0
 18622  		mem := v_1
 18623  		if !(is32BitFloat(t)) {
 18624  			break
 18625  		}
 18626  		v.reset(OpARM64FMOVSload)
 18627  		v.AddArg2(ptr, mem)
 18628  		return true
 18629  	}
 18630  	// match: (Load <t> ptr mem)
 18631  	// cond: is64BitFloat(t)
 18632  	// result: (FMOVDload ptr mem)
 18633  	for {
 18634  		t := v.Type
 18635  		ptr := v_0
 18636  		mem := v_1
 18637  		if !(is64BitFloat(t)) {
 18638  			break
 18639  		}
 18640  		v.reset(OpARM64FMOVDload)
 18641  		v.AddArg2(ptr, mem)
 18642  		return true
 18643  	}
 18644  	return false
 18645  }
 18646  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 18647  	v_1 := v.Args[1]
 18648  	v_0 := v.Args[0]
 18649  	b := v.Block
 18650  	typ := &b.Func.Config.Types
 18651  	// match: (LocalAddr <t> {sym} base mem)
 18652  	// cond: t.Elem().HasPointers()
 18653  	// result: (MOVDaddr {sym} (SPanchored base mem))
 18654  	for {
 18655  		t := v.Type
 18656  		sym := auxToSym(v.Aux)
 18657  		base := v_0
 18658  		mem := v_1
 18659  		if !(t.Elem().HasPointers()) {
 18660  			break
 18661  		}
 18662  		v.reset(OpARM64MOVDaddr)
 18663  		v.Aux = symToAux(sym)
 18664  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 18665  		v0.AddArg2(base, mem)
 18666  		v.AddArg(v0)
 18667  		return true
 18668  	}
 18669  	// match: (LocalAddr <t> {sym} base _)
 18670  	// cond: !t.Elem().HasPointers()
 18671  	// result: (MOVDaddr {sym} base)
 18672  	for {
 18673  		t := v.Type
 18674  		sym := auxToSym(v.Aux)
 18675  		base := v_0
 18676  		if !(!t.Elem().HasPointers()) {
 18677  			break
 18678  		}
 18679  		v.reset(OpARM64MOVDaddr)
 18680  		v.Aux = symToAux(sym)
 18681  		v.AddArg(base)
 18682  		return true
 18683  	}
 18684  	return false
 18685  }
 18686  func rewriteValueARM64_OpLsh16x16(v *Value) bool {
 18687  	v_1 := v.Args[1]
 18688  	v_0 := v.Args[0]
 18689  	b := v.Block
 18690  	typ := &b.Func.Config.Types
 18691  	// match: (Lsh16x16 <t> x y)
 18692  	// cond: shiftIsBounded(v)
 18693  	// result: (SLL <t> x y)
 18694  	for {
 18695  		t := v.Type
 18696  		x := v_0
 18697  		y := v_1
 18698  		if !(shiftIsBounded(v)) {
 18699  			break
 18700  		}
 18701  		v.reset(OpARM64SLL)
 18702  		v.Type = t
 18703  		v.AddArg2(x, y)
 18704  		return true
 18705  	}
 18706  	// match: (Lsh16x16 <t> x y)
 18707  	// cond: !shiftIsBounded(v)
 18708  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18709  	for {
 18710  		t := v.Type
 18711  		x := v_0
 18712  		y := v_1
 18713  		if !(!shiftIsBounded(v)) {
 18714  			break
 18715  		}
 18716  		v.reset(OpARM64CSEL)
 18717  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18718  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18719  		v0.AddArg2(x, y)
 18720  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18721  		v1.AuxInt = int64ToAuxInt(0)
 18722  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18723  		v2.AuxInt = int64ToAuxInt(64)
 18724  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18725  		v3.AddArg(y)
 18726  		v2.AddArg(v3)
 18727  		v.AddArg3(v0, v1, v2)
 18728  		return true
 18729  	}
 18730  	return false
 18731  }
 18732  func rewriteValueARM64_OpLsh16x32(v *Value) bool {
 18733  	v_1 := v.Args[1]
 18734  	v_0 := v.Args[0]
 18735  	b := v.Block
 18736  	typ := &b.Func.Config.Types
 18737  	// match: (Lsh16x32 <t> x y)
 18738  	// cond: shiftIsBounded(v)
 18739  	// result: (SLL <t> x y)
 18740  	for {
 18741  		t := v.Type
 18742  		x := v_0
 18743  		y := v_1
 18744  		if !(shiftIsBounded(v)) {
 18745  			break
 18746  		}
 18747  		v.reset(OpARM64SLL)
 18748  		v.Type = t
 18749  		v.AddArg2(x, y)
 18750  		return true
 18751  	}
 18752  	// match: (Lsh16x32 <t> x y)
 18753  	// cond: !shiftIsBounded(v)
 18754  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18755  	for {
 18756  		t := v.Type
 18757  		x := v_0
 18758  		y := v_1
 18759  		if !(!shiftIsBounded(v)) {
 18760  			break
 18761  		}
 18762  		v.reset(OpARM64CSEL)
 18763  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18764  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18765  		v0.AddArg2(x, y)
 18766  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18767  		v1.AuxInt = int64ToAuxInt(0)
 18768  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18769  		v2.AuxInt = int64ToAuxInt(64)
 18770  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18771  		v3.AddArg(y)
 18772  		v2.AddArg(v3)
 18773  		v.AddArg3(v0, v1, v2)
 18774  		return true
 18775  	}
 18776  	return false
 18777  }
 18778  func rewriteValueARM64_OpLsh16x64(v *Value) bool {
 18779  	v_1 := v.Args[1]
 18780  	v_0 := v.Args[0]
 18781  	b := v.Block
 18782  	// match: (Lsh16x64 <t> x y)
 18783  	// cond: shiftIsBounded(v)
 18784  	// result: (SLL <t> x y)
 18785  	for {
 18786  		t := v.Type
 18787  		x := v_0
 18788  		y := v_1
 18789  		if !(shiftIsBounded(v)) {
 18790  			break
 18791  		}
 18792  		v.reset(OpARM64SLL)
 18793  		v.Type = t
 18794  		v.AddArg2(x, y)
 18795  		return true
 18796  	}
 18797  	// match: (Lsh16x64 <t> x y)
 18798  	// cond: !shiftIsBounded(v)
 18799  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18800  	for {
 18801  		t := v.Type
 18802  		x := v_0
 18803  		y := v_1
 18804  		if !(!shiftIsBounded(v)) {
 18805  			break
 18806  		}
 18807  		v.reset(OpARM64CSEL)
 18808  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18809  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18810  		v0.AddArg2(x, y)
 18811  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18812  		v1.AuxInt = int64ToAuxInt(0)
 18813  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18814  		v2.AuxInt = int64ToAuxInt(64)
 18815  		v2.AddArg(y)
 18816  		v.AddArg3(v0, v1, v2)
 18817  		return true
 18818  	}
 18819  	return false
 18820  }
 18821  func rewriteValueARM64_OpLsh16x8(v *Value) bool {
 18822  	v_1 := v.Args[1]
 18823  	v_0 := v.Args[0]
 18824  	b := v.Block
 18825  	typ := &b.Func.Config.Types
 18826  	// match: (Lsh16x8 <t> x y)
 18827  	// cond: shiftIsBounded(v)
 18828  	// result: (SLL <t> x y)
 18829  	for {
 18830  		t := v.Type
 18831  		x := v_0
 18832  		y := v_1
 18833  		if !(shiftIsBounded(v)) {
 18834  			break
 18835  		}
 18836  		v.reset(OpARM64SLL)
 18837  		v.Type = t
 18838  		v.AddArg2(x, y)
 18839  		return true
 18840  	}
 18841  	// match: (Lsh16x8 <t> x y)
 18842  	// cond: !shiftIsBounded(v)
 18843  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18844  	for {
 18845  		t := v.Type
 18846  		x := v_0
 18847  		y := v_1
 18848  		if !(!shiftIsBounded(v)) {
 18849  			break
 18850  		}
 18851  		v.reset(OpARM64CSEL)
 18852  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18853  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18854  		v0.AddArg2(x, y)
 18855  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18856  		v1.AuxInt = int64ToAuxInt(0)
 18857  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18858  		v2.AuxInt = int64ToAuxInt(64)
 18859  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18860  		v3.AddArg(y)
 18861  		v2.AddArg(v3)
 18862  		v.AddArg3(v0, v1, v2)
 18863  		return true
 18864  	}
 18865  	return false
 18866  }
 18867  func rewriteValueARM64_OpLsh32x16(v *Value) bool {
 18868  	v_1 := v.Args[1]
 18869  	v_0 := v.Args[0]
 18870  	b := v.Block
 18871  	typ := &b.Func.Config.Types
 18872  	// match: (Lsh32x16 <t> x y)
 18873  	// cond: shiftIsBounded(v)
 18874  	// result: (SLL <t> x y)
 18875  	for {
 18876  		t := v.Type
 18877  		x := v_0
 18878  		y := v_1
 18879  		if !(shiftIsBounded(v)) {
 18880  			break
 18881  		}
 18882  		v.reset(OpARM64SLL)
 18883  		v.Type = t
 18884  		v.AddArg2(x, y)
 18885  		return true
 18886  	}
 18887  	// match: (Lsh32x16 <t> x y)
 18888  	// cond: !shiftIsBounded(v)
 18889  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18890  	for {
 18891  		t := v.Type
 18892  		x := v_0
 18893  		y := v_1
 18894  		if !(!shiftIsBounded(v)) {
 18895  			break
 18896  		}
 18897  		v.reset(OpARM64CSEL)
 18898  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18899  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18900  		v0.AddArg2(x, y)
 18901  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18902  		v1.AuxInt = int64ToAuxInt(0)
 18903  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18904  		v2.AuxInt = int64ToAuxInt(64)
 18905  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18906  		v3.AddArg(y)
 18907  		v2.AddArg(v3)
 18908  		v.AddArg3(v0, v1, v2)
 18909  		return true
 18910  	}
 18911  	return false
 18912  }
 18913  func rewriteValueARM64_OpLsh32x32(v *Value) bool {
 18914  	v_1 := v.Args[1]
 18915  	v_0 := v.Args[0]
 18916  	b := v.Block
 18917  	typ := &b.Func.Config.Types
 18918  	// match: (Lsh32x32 <t> x y)
 18919  	// cond: shiftIsBounded(v)
 18920  	// result: (SLL <t> x y)
 18921  	for {
 18922  		t := v.Type
 18923  		x := v_0
 18924  		y := v_1
 18925  		if !(shiftIsBounded(v)) {
 18926  			break
 18927  		}
 18928  		v.reset(OpARM64SLL)
 18929  		v.Type = t
 18930  		v.AddArg2(x, y)
 18931  		return true
 18932  	}
 18933  	// match: (Lsh32x32 <t> x y)
 18934  	// cond: !shiftIsBounded(v)
 18935  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18936  	for {
 18937  		t := v.Type
 18938  		x := v_0
 18939  		y := v_1
 18940  		if !(!shiftIsBounded(v)) {
 18941  			break
 18942  		}
 18943  		v.reset(OpARM64CSEL)
 18944  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18945  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18946  		v0.AddArg2(x, y)
 18947  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18948  		v1.AuxInt = int64ToAuxInt(0)
 18949  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18950  		v2.AuxInt = int64ToAuxInt(64)
 18951  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18952  		v3.AddArg(y)
 18953  		v2.AddArg(v3)
 18954  		v.AddArg3(v0, v1, v2)
 18955  		return true
 18956  	}
 18957  	return false
 18958  }
 18959  func rewriteValueARM64_OpLsh32x64(v *Value) bool {
 18960  	v_1 := v.Args[1]
 18961  	v_0 := v.Args[0]
 18962  	b := v.Block
 18963  	// match: (Lsh32x64 <t> x y)
 18964  	// cond: shiftIsBounded(v)
 18965  	// result: (SLL <t> x y)
 18966  	for {
 18967  		t := v.Type
 18968  		x := v_0
 18969  		y := v_1
 18970  		if !(shiftIsBounded(v)) {
 18971  			break
 18972  		}
 18973  		v.reset(OpARM64SLL)
 18974  		v.Type = t
 18975  		v.AddArg2(x, y)
 18976  		return true
 18977  	}
 18978  	// match: (Lsh32x64 <t> x y)
 18979  	// cond: !shiftIsBounded(v)
 18980  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18981  	for {
 18982  		t := v.Type
 18983  		x := v_0
 18984  		y := v_1
 18985  		if !(!shiftIsBounded(v)) {
 18986  			break
 18987  		}
 18988  		v.reset(OpARM64CSEL)
 18989  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18990  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18991  		v0.AddArg2(x, y)
 18992  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18993  		v1.AuxInt = int64ToAuxInt(0)
 18994  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18995  		v2.AuxInt = int64ToAuxInt(64)
 18996  		v2.AddArg(y)
 18997  		v.AddArg3(v0, v1, v2)
 18998  		return true
 18999  	}
 19000  	return false
 19001  }
 19002  func rewriteValueARM64_OpLsh32x8(v *Value) bool {
 19003  	v_1 := v.Args[1]
 19004  	v_0 := v.Args[0]
 19005  	b := v.Block
 19006  	typ := &b.Func.Config.Types
 19007  	// match: (Lsh32x8 <t> x y)
 19008  	// cond: shiftIsBounded(v)
 19009  	// result: (SLL <t> x y)
 19010  	for {
 19011  		t := v.Type
 19012  		x := v_0
 19013  		y := v_1
 19014  		if !(shiftIsBounded(v)) {
 19015  			break
 19016  		}
 19017  		v.reset(OpARM64SLL)
 19018  		v.Type = t
 19019  		v.AddArg2(x, y)
 19020  		return true
 19021  	}
 19022  	// match: (Lsh32x8 <t> x y)
 19023  	// cond: !shiftIsBounded(v)
 19024  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 19025  	for {
 19026  		t := v.Type
 19027  		x := v_0
 19028  		y := v_1
 19029  		if !(!shiftIsBounded(v)) {
 19030  			break
 19031  		}
 19032  		v.reset(OpARM64CSEL)
 19033  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19034  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19035  		v0.AddArg2(x, y)
 19036  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19037  		v1.AuxInt = int64ToAuxInt(0)
 19038  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19039  		v2.AuxInt = int64ToAuxInt(64)
 19040  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19041  		v3.AddArg(y)
 19042  		v2.AddArg(v3)
 19043  		v.AddArg3(v0, v1, v2)
 19044  		return true
 19045  	}
 19046  	return false
 19047  }
 19048  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 19049  	v_1 := v.Args[1]
 19050  	v_0 := v.Args[0]
 19051  	b := v.Block
 19052  	typ := &b.Func.Config.Types
 19053  	// match: (Lsh64x16 <t> x y)
 19054  	// cond: shiftIsBounded(v)
 19055  	// result: (SLL <t> x y)
 19056  	for {
 19057  		t := v.Type
 19058  		x := v_0
 19059  		y := v_1
 19060  		if !(shiftIsBounded(v)) {
 19061  			break
 19062  		}
 19063  		v.reset(OpARM64SLL)
 19064  		v.Type = t
 19065  		v.AddArg2(x, y)
 19066  		return true
 19067  	}
 19068  	// match: (Lsh64x16 <t> x y)
 19069  	// cond: !shiftIsBounded(v)
 19070  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 19071  	for {
 19072  		t := v.Type
 19073  		x := v_0
 19074  		y := v_1
 19075  		if !(!shiftIsBounded(v)) {
 19076  			break
 19077  		}
 19078  		v.reset(OpARM64CSEL)
 19079  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19080  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19081  		v0.AddArg2(x, y)
 19082  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19083  		v1.AuxInt = int64ToAuxInt(0)
 19084  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19085  		v2.AuxInt = int64ToAuxInt(64)
 19086  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19087  		v3.AddArg(y)
 19088  		v2.AddArg(v3)
 19089  		v.AddArg3(v0, v1, v2)
 19090  		return true
 19091  	}
 19092  	return false
 19093  }
 19094  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 19095  	v_1 := v.Args[1]
 19096  	v_0 := v.Args[0]
 19097  	b := v.Block
 19098  	typ := &b.Func.Config.Types
 19099  	// match: (Lsh64x32 <t> x y)
 19100  	// cond: shiftIsBounded(v)
 19101  	// result: (SLL <t> x y)
 19102  	for {
 19103  		t := v.Type
 19104  		x := v_0
 19105  		y := v_1
 19106  		if !(shiftIsBounded(v)) {
 19107  			break
 19108  		}
 19109  		v.reset(OpARM64SLL)
 19110  		v.Type = t
 19111  		v.AddArg2(x, y)
 19112  		return true
 19113  	}
 19114  	// match: (Lsh64x32 <t> x y)
 19115  	// cond: !shiftIsBounded(v)
 19116  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 19117  	for {
 19118  		t := v.Type
 19119  		x := v_0
 19120  		y := v_1
 19121  		if !(!shiftIsBounded(v)) {
 19122  			break
 19123  		}
 19124  		v.reset(OpARM64CSEL)
 19125  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19126  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19127  		v0.AddArg2(x, y)
 19128  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19129  		v1.AuxInt = int64ToAuxInt(0)
 19130  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19131  		v2.AuxInt = int64ToAuxInt(64)
 19132  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 19133  		v3.AddArg(y)
 19134  		v2.AddArg(v3)
 19135  		v.AddArg3(v0, v1, v2)
 19136  		return true
 19137  	}
 19138  	return false
 19139  }
 19140  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 19141  	v_1 := v.Args[1]
 19142  	v_0 := v.Args[0]
 19143  	b := v.Block
 19144  	// match: (Lsh64x64 <t> x y)
 19145  	// cond: shiftIsBounded(v)
 19146  	// result: (SLL <t> x y)
 19147  	for {
 19148  		t := v.Type
 19149  		x := v_0
 19150  		y := v_1
 19151  		if !(shiftIsBounded(v)) {
 19152  			break
 19153  		}
 19154  		v.reset(OpARM64SLL)
 19155  		v.Type = t
 19156  		v.AddArg2(x, y)
 19157  		return true
 19158  	}
 19159  	// match: (Lsh64x64 <t> x y)
 19160  	// cond: !shiftIsBounded(v)
 19161  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 19162  	for {
 19163  		t := v.Type
 19164  		x := v_0
 19165  		y := v_1
 19166  		if !(!shiftIsBounded(v)) {
 19167  			break
 19168  		}
 19169  		v.reset(OpARM64CSEL)
 19170  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19171  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19172  		v0.AddArg2(x, y)
 19173  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19174  		v1.AuxInt = int64ToAuxInt(0)
 19175  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19176  		v2.AuxInt = int64ToAuxInt(64)
 19177  		v2.AddArg(y)
 19178  		v.AddArg3(v0, v1, v2)
 19179  		return true
 19180  	}
 19181  	return false
 19182  }
 19183  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 19184  	v_1 := v.Args[1]
 19185  	v_0 := v.Args[0]
 19186  	b := v.Block
 19187  	typ := &b.Func.Config.Types
 19188  	// match: (Lsh64x8 <t> x y)
 19189  	// cond: shiftIsBounded(v)
 19190  	// result: (SLL <t> x y)
 19191  	for {
 19192  		t := v.Type
 19193  		x := v_0
 19194  		y := v_1
 19195  		if !(shiftIsBounded(v)) {
 19196  			break
 19197  		}
 19198  		v.reset(OpARM64SLL)
 19199  		v.Type = t
 19200  		v.AddArg2(x, y)
 19201  		return true
 19202  	}
 19203  	// match: (Lsh64x8 <t> x y)
 19204  	// cond: !shiftIsBounded(v)
 19205  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 19206  	for {
 19207  		t := v.Type
 19208  		x := v_0
 19209  		y := v_1
 19210  		if !(!shiftIsBounded(v)) {
 19211  			break
 19212  		}
 19213  		v.reset(OpARM64CSEL)
 19214  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19215  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19216  		v0.AddArg2(x, y)
 19217  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19218  		v1.AuxInt = int64ToAuxInt(0)
 19219  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19220  		v2.AuxInt = int64ToAuxInt(64)
 19221  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19222  		v3.AddArg(y)
 19223  		v2.AddArg(v3)
 19224  		v.AddArg3(v0, v1, v2)
 19225  		return true
 19226  	}
 19227  	return false
 19228  }
 19229  func rewriteValueARM64_OpLsh8x16(v *Value) bool {
 19230  	v_1 := v.Args[1]
 19231  	v_0 := v.Args[0]
 19232  	b := v.Block
 19233  	typ := &b.Func.Config.Types
 19234  	// match: (Lsh8x16 <t> x y)
 19235  	// cond: shiftIsBounded(v)
 19236  	// result: (SLL <t> x y)
 19237  	for {
 19238  		t := v.Type
 19239  		x := v_0
 19240  		y := v_1
 19241  		if !(shiftIsBounded(v)) {
 19242  			break
 19243  		}
 19244  		v.reset(OpARM64SLL)
 19245  		v.Type = t
 19246  		v.AddArg2(x, y)
 19247  		return true
 19248  	}
 19249  	// match: (Lsh8x16 <t> x y)
 19250  	// cond: !shiftIsBounded(v)
 19251  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 19252  	for {
 19253  		t := v.Type
 19254  		x := v_0
 19255  		y := v_1
 19256  		if !(!shiftIsBounded(v)) {
 19257  			break
 19258  		}
 19259  		v.reset(OpARM64CSEL)
 19260  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19261  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19262  		v0.AddArg2(x, y)
 19263  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19264  		v1.AuxInt = int64ToAuxInt(0)
 19265  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19266  		v2.AuxInt = int64ToAuxInt(64)
 19267  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19268  		v3.AddArg(y)
 19269  		v2.AddArg(v3)
 19270  		v.AddArg3(v0, v1, v2)
 19271  		return true
 19272  	}
 19273  	return false
 19274  }
 19275  func rewriteValueARM64_OpLsh8x32(v *Value) bool {
 19276  	v_1 := v.Args[1]
 19277  	v_0 := v.Args[0]
 19278  	b := v.Block
 19279  	typ := &b.Func.Config.Types
 19280  	// match: (Lsh8x32 <t> x y)
 19281  	// cond: shiftIsBounded(v)
 19282  	// result: (SLL <t> x y)
 19283  	for {
 19284  		t := v.Type
 19285  		x := v_0
 19286  		y := v_1
 19287  		if !(shiftIsBounded(v)) {
 19288  			break
 19289  		}
 19290  		v.reset(OpARM64SLL)
 19291  		v.Type = t
 19292  		v.AddArg2(x, y)
 19293  		return true
 19294  	}
 19295  	// match: (Lsh8x32 <t> x y)
 19296  	// cond: !shiftIsBounded(v)
 19297  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 19298  	for {
 19299  		t := v.Type
 19300  		x := v_0
 19301  		y := v_1
 19302  		if !(!shiftIsBounded(v)) {
 19303  			break
 19304  		}
 19305  		v.reset(OpARM64CSEL)
 19306  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19307  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19308  		v0.AddArg2(x, y)
 19309  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19310  		v1.AuxInt = int64ToAuxInt(0)
 19311  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19312  		v2.AuxInt = int64ToAuxInt(64)
 19313  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 19314  		v3.AddArg(y)
 19315  		v2.AddArg(v3)
 19316  		v.AddArg3(v0, v1, v2)
 19317  		return true
 19318  	}
 19319  	return false
 19320  }
 19321  func rewriteValueARM64_OpLsh8x64(v *Value) bool {
 19322  	v_1 := v.Args[1]
 19323  	v_0 := v.Args[0]
 19324  	b := v.Block
 19325  	// match: (Lsh8x64 <t> x y)
 19326  	// cond: shiftIsBounded(v)
 19327  	// result: (SLL <t> x y)
 19328  	for {
 19329  		t := v.Type
 19330  		x := v_0
 19331  		y := v_1
 19332  		if !(shiftIsBounded(v)) {
 19333  			break
 19334  		}
 19335  		v.reset(OpARM64SLL)
 19336  		v.Type = t
 19337  		v.AddArg2(x, y)
 19338  		return true
 19339  	}
 19340  	// match: (Lsh8x64 <t> x y)
 19341  	// cond: !shiftIsBounded(v)
 19342  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 19343  	for {
 19344  		t := v.Type
 19345  		x := v_0
 19346  		y := v_1
 19347  		if !(!shiftIsBounded(v)) {
 19348  			break
 19349  		}
 19350  		v.reset(OpARM64CSEL)
 19351  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19352  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19353  		v0.AddArg2(x, y)
 19354  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19355  		v1.AuxInt = int64ToAuxInt(0)
 19356  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19357  		v2.AuxInt = int64ToAuxInt(64)
 19358  		v2.AddArg(y)
 19359  		v.AddArg3(v0, v1, v2)
 19360  		return true
 19361  	}
 19362  	return false
 19363  }
 19364  func rewriteValueARM64_OpLsh8x8(v *Value) bool {
 19365  	v_1 := v.Args[1]
 19366  	v_0 := v.Args[0]
 19367  	b := v.Block
 19368  	typ := &b.Func.Config.Types
 19369  	// match: (Lsh8x8 <t> x y)
 19370  	// cond: shiftIsBounded(v)
 19371  	// result: (SLL <t> x y)
 19372  	for {
 19373  		t := v.Type
 19374  		x := v_0
 19375  		y := v_1
 19376  		if !(shiftIsBounded(v)) {
 19377  			break
 19378  		}
 19379  		v.reset(OpARM64SLL)
 19380  		v.Type = t
 19381  		v.AddArg2(x, y)
 19382  		return true
 19383  	}
 19384  	// match: (Lsh8x8 <t> x y)
 19385  	// cond: !shiftIsBounded(v)
 19386  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 19387  	for {
 19388  		t := v.Type
 19389  		x := v_0
 19390  		y := v_1
 19391  		if !(!shiftIsBounded(v)) {
 19392  			break
 19393  		}
 19394  		v.reset(OpARM64CSEL)
 19395  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19396  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19397  		v0.AddArg2(x, y)
 19398  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19399  		v1.AuxInt = int64ToAuxInt(0)
 19400  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19401  		v2.AuxInt = int64ToAuxInt(64)
 19402  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19403  		v3.AddArg(y)
 19404  		v2.AddArg(v3)
 19405  		v.AddArg3(v0, v1, v2)
 19406  		return true
 19407  	}
 19408  	return false
 19409  }
 19410  func rewriteValueARM64_OpMod16(v *Value) bool {
 19411  	v_1 := v.Args[1]
 19412  	v_0 := v.Args[0]
 19413  	b := v.Block
 19414  	typ := &b.Func.Config.Types
 19415  	// match: (Mod16 x y)
 19416  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 19417  	for {
 19418  		x := v_0
 19419  		y := v_1
 19420  		v.reset(OpARM64MODW)
 19421  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19422  		v0.AddArg(x)
 19423  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19424  		v1.AddArg(y)
 19425  		v.AddArg2(v0, v1)
 19426  		return true
 19427  	}
 19428  }
 19429  func rewriteValueARM64_OpMod16u(v *Value) bool {
 19430  	v_1 := v.Args[1]
 19431  	v_0 := v.Args[0]
 19432  	b := v.Block
 19433  	typ := &b.Func.Config.Types
 19434  	// match: (Mod16u x y)
 19435  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 19436  	for {
 19437  		x := v_0
 19438  		y := v_1
 19439  		v.reset(OpARM64UMODW)
 19440  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19441  		v0.AddArg(x)
 19442  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19443  		v1.AddArg(y)
 19444  		v.AddArg2(v0, v1)
 19445  		return true
 19446  	}
 19447  }
 19448  func rewriteValueARM64_OpMod32(v *Value) bool {
 19449  	v_1 := v.Args[1]
 19450  	v_0 := v.Args[0]
 19451  	// match: (Mod32 x y)
 19452  	// result: (MODW x y)
 19453  	for {
 19454  		x := v_0
 19455  		y := v_1
 19456  		v.reset(OpARM64MODW)
 19457  		v.AddArg2(x, y)
 19458  		return true
 19459  	}
 19460  }
 19461  func rewriteValueARM64_OpMod64(v *Value) bool {
 19462  	v_1 := v.Args[1]
 19463  	v_0 := v.Args[0]
 19464  	// match: (Mod64 x y)
 19465  	// result: (MOD x y)
 19466  	for {
 19467  		x := v_0
 19468  		y := v_1
 19469  		v.reset(OpARM64MOD)
 19470  		v.AddArg2(x, y)
 19471  		return true
 19472  	}
 19473  }
 19474  func rewriteValueARM64_OpMod8(v *Value) bool {
 19475  	v_1 := v.Args[1]
 19476  	v_0 := v.Args[0]
 19477  	b := v.Block
 19478  	typ := &b.Func.Config.Types
 19479  	// match: (Mod8 x y)
 19480  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 19481  	for {
 19482  		x := v_0
 19483  		y := v_1
 19484  		v.reset(OpARM64MODW)
 19485  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19486  		v0.AddArg(x)
 19487  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19488  		v1.AddArg(y)
 19489  		v.AddArg2(v0, v1)
 19490  		return true
 19491  	}
 19492  }
 19493  func rewriteValueARM64_OpMod8u(v *Value) bool {
 19494  	v_1 := v.Args[1]
 19495  	v_0 := v.Args[0]
 19496  	b := v.Block
 19497  	typ := &b.Func.Config.Types
 19498  	// match: (Mod8u x y)
 19499  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 19500  	for {
 19501  		x := v_0
 19502  		y := v_1
 19503  		v.reset(OpARM64UMODW)
 19504  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19505  		v0.AddArg(x)
 19506  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19507  		v1.AddArg(y)
 19508  		v.AddArg2(v0, v1)
 19509  		return true
 19510  	}
 19511  }
 19512  func rewriteValueARM64_OpMove(v *Value) bool {
 19513  	v_2 := v.Args[2]
 19514  	v_1 := v.Args[1]
 19515  	v_0 := v.Args[0]
 19516  	b := v.Block
 19517  	typ := &b.Func.Config.Types
 19518  	// match: (Move [0] _ _ mem)
 19519  	// result: mem
 19520  	for {
 19521  		if auxIntToInt64(v.AuxInt) != 0 {
 19522  			break
 19523  		}
 19524  		mem := v_2
 19525  		v.copyOf(mem)
 19526  		return true
 19527  	}
 19528  	// match: (Move [1] dst src mem)
 19529  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 19530  	for {
 19531  		if auxIntToInt64(v.AuxInt) != 1 {
 19532  			break
 19533  		}
 19534  		dst := v_0
 19535  		src := v_1
 19536  		mem := v_2
 19537  		v.reset(OpARM64MOVBstore)
 19538  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19539  		v0.AddArg2(src, mem)
 19540  		v.AddArg3(dst, v0, mem)
 19541  		return true
 19542  	}
 19543  	// match: (Move [2] dst src mem)
 19544  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 19545  	for {
 19546  		if auxIntToInt64(v.AuxInt) != 2 {
 19547  			break
 19548  		}
 19549  		dst := v_0
 19550  		src := v_1
 19551  		mem := v_2
 19552  		v.reset(OpARM64MOVHstore)
 19553  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19554  		v0.AddArg2(src, mem)
 19555  		v.AddArg3(dst, v0, mem)
 19556  		return true
 19557  	}
 19558  	// match: (Move [3] dst src mem)
 19559  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 19560  	for {
 19561  		if auxIntToInt64(v.AuxInt) != 3 {
 19562  			break
 19563  		}
 19564  		dst := v_0
 19565  		src := v_1
 19566  		mem := v_2
 19567  		v.reset(OpARM64MOVBstore)
 19568  		v.AuxInt = int32ToAuxInt(2)
 19569  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19570  		v0.AuxInt = int32ToAuxInt(2)
 19571  		v0.AddArg2(src, mem)
 19572  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 19573  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19574  		v2.AddArg2(src, mem)
 19575  		v1.AddArg3(dst, v2, mem)
 19576  		v.AddArg3(dst, v0, v1)
 19577  		return true
 19578  	}
 19579  	// match: (Move [4] dst src mem)
 19580  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 19581  	for {
 19582  		if auxIntToInt64(v.AuxInt) != 4 {
 19583  			break
 19584  		}
 19585  		dst := v_0
 19586  		src := v_1
 19587  		mem := v_2
 19588  		v.reset(OpARM64MOVWstore)
 19589  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19590  		v0.AddArg2(src, mem)
 19591  		v.AddArg3(dst, v0, mem)
 19592  		return true
 19593  	}
 19594  	// match: (Move [5] dst src mem)
 19595  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19596  	for {
 19597  		if auxIntToInt64(v.AuxInt) != 5 {
 19598  			break
 19599  		}
 19600  		dst := v_0
 19601  		src := v_1
 19602  		mem := v_2
 19603  		v.reset(OpARM64MOVBstore)
 19604  		v.AuxInt = int32ToAuxInt(4)
 19605  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19606  		v0.AuxInt = int32ToAuxInt(4)
 19607  		v0.AddArg2(src, mem)
 19608  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19609  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19610  		v2.AddArg2(src, mem)
 19611  		v1.AddArg3(dst, v2, mem)
 19612  		v.AddArg3(dst, v0, v1)
 19613  		return true
 19614  	}
 19615  	// match: (Move [6] dst src mem)
 19616  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19617  	for {
 19618  		if auxIntToInt64(v.AuxInt) != 6 {
 19619  			break
 19620  		}
 19621  		dst := v_0
 19622  		src := v_1
 19623  		mem := v_2
 19624  		v.reset(OpARM64MOVHstore)
 19625  		v.AuxInt = int32ToAuxInt(4)
 19626  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19627  		v0.AuxInt = int32ToAuxInt(4)
 19628  		v0.AddArg2(src, mem)
 19629  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19630  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19631  		v2.AddArg2(src, mem)
 19632  		v1.AddArg3(dst, v2, mem)
 19633  		v.AddArg3(dst, v0, v1)
 19634  		return true
 19635  	}
 19636  	// match: (Move [7] dst src mem)
 19637  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19638  	for {
 19639  		if auxIntToInt64(v.AuxInt) != 7 {
 19640  			break
 19641  		}
 19642  		dst := v_0
 19643  		src := v_1
 19644  		mem := v_2
 19645  		v.reset(OpARM64MOVWstore)
 19646  		v.AuxInt = int32ToAuxInt(3)
 19647  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19648  		v0.AuxInt = int32ToAuxInt(3)
 19649  		v0.AddArg2(src, mem)
 19650  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19651  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19652  		v2.AddArg2(src, mem)
 19653  		v1.AddArg3(dst, v2, mem)
 19654  		v.AddArg3(dst, v0, v1)
 19655  		return true
 19656  	}
 19657  	// match: (Move [8] dst src mem)
 19658  	// result: (MOVDstore dst (MOVDload src mem) mem)
 19659  	for {
 19660  		if auxIntToInt64(v.AuxInt) != 8 {
 19661  			break
 19662  		}
 19663  		dst := v_0
 19664  		src := v_1
 19665  		mem := v_2
 19666  		v.reset(OpARM64MOVDstore)
 19667  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19668  		v0.AddArg2(src, mem)
 19669  		v.AddArg3(dst, v0, mem)
 19670  		return true
 19671  	}
 19672  	// match: (Move [9] dst src mem)
 19673  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19674  	for {
 19675  		if auxIntToInt64(v.AuxInt) != 9 {
 19676  			break
 19677  		}
 19678  		dst := v_0
 19679  		src := v_1
 19680  		mem := v_2
 19681  		v.reset(OpARM64MOVBstore)
 19682  		v.AuxInt = int32ToAuxInt(8)
 19683  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19684  		v0.AuxInt = int32ToAuxInt(8)
 19685  		v0.AddArg2(src, mem)
 19686  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19687  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19688  		v2.AddArg2(src, mem)
 19689  		v1.AddArg3(dst, v2, mem)
 19690  		v.AddArg3(dst, v0, v1)
 19691  		return true
 19692  	}
 19693  	// match: (Move [10] dst src mem)
 19694  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19695  	for {
 19696  		if auxIntToInt64(v.AuxInt) != 10 {
 19697  			break
 19698  		}
 19699  		dst := v_0
 19700  		src := v_1
 19701  		mem := v_2
 19702  		v.reset(OpARM64MOVHstore)
 19703  		v.AuxInt = int32ToAuxInt(8)
 19704  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19705  		v0.AuxInt = int32ToAuxInt(8)
 19706  		v0.AddArg2(src, mem)
 19707  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19708  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19709  		v2.AddArg2(src, mem)
 19710  		v1.AddArg3(dst, v2, mem)
 19711  		v.AddArg3(dst, v0, v1)
 19712  		return true
 19713  	}
 19714  	// match: (Move [11] dst src mem)
 19715  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19716  	for {
 19717  		if auxIntToInt64(v.AuxInt) != 11 {
 19718  			break
 19719  		}
 19720  		dst := v_0
 19721  		src := v_1
 19722  		mem := v_2
 19723  		v.reset(OpARM64MOVDstore)
 19724  		v.AuxInt = int32ToAuxInt(3)
 19725  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19726  		v0.AuxInt = int32ToAuxInt(3)
 19727  		v0.AddArg2(src, mem)
 19728  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19729  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19730  		v2.AddArg2(src, mem)
 19731  		v1.AddArg3(dst, v2, mem)
 19732  		v.AddArg3(dst, v0, v1)
 19733  		return true
 19734  	}
 19735  	// match: (Move [12] dst src mem)
 19736  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19737  	for {
 19738  		if auxIntToInt64(v.AuxInt) != 12 {
 19739  			break
 19740  		}
 19741  		dst := v_0
 19742  		src := v_1
 19743  		mem := v_2
 19744  		v.reset(OpARM64MOVWstore)
 19745  		v.AuxInt = int32ToAuxInt(8)
 19746  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19747  		v0.AuxInt = int32ToAuxInt(8)
 19748  		v0.AddArg2(src, mem)
 19749  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19750  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19751  		v2.AddArg2(src, mem)
 19752  		v1.AddArg3(dst, v2, mem)
 19753  		v.AddArg3(dst, v0, v1)
 19754  		return true
 19755  	}
 19756  	// match: (Move [13] dst src mem)
 19757  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19758  	for {
 19759  		if auxIntToInt64(v.AuxInt) != 13 {
 19760  			break
 19761  		}
 19762  		dst := v_0
 19763  		src := v_1
 19764  		mem := v_2
 19765  		v.reset(OpARM64MOVDstore)
 19766  		v.AuxInt = int32ToAuxInt(5)
 19767  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19768  		v0.AuxInt = int32ToAuxInt(5)
 19769  		v0.AddArg2(src, mem)
 19770  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19771  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19772  		v2.AddArg2(src, mem)
 19773  		v1.AddArg3(dst, v2, mem)
 19774  		v.AddArg3(dst, v0, v1)
 19775  		return true
 19776  	}
 19777  	// match: (Move [14] dst src mem)
 19778  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19779  	for {
 19780  		if auxIntToInt64(v.AuxInt) != 14 {
 19781  			break
 19782  		}
 19783  		dst := v_0
 19784  		src := v_1
 19785  		mem := v_2
 19786  		v.reset(OpARM64MOVDstore)
 19787  		v.AuxInt = int32ToAuxInt(6)
 19788  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19789  		v0.AuxInt = int32ToAuxInt(6)
 19790  		v0.AddArg2(src, mem)
 19791  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19792  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19793  		v2.AddArg2(src, mem)
 19794  		v1.AddArg3(dst, v2, mem)
 19795  		v.AddArg3(dst, v0, v1)
 19796  		return true
 19797  	}
 19798  	// match: (Move [15] dst src mem)
 19799  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19800  	for {
 19801  		if auxIntToInt64(v.AuxInt) != 15 {
 19802  			break
 19803  		}
 19804  		dst := v_0
 19805  		src := v_1
 19806  		mem := v_2
 19807  		v.reset(OpARM64MOVDstore)
 19808  		v.AuxInt = int32ToAuxInt(7)
 19809  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19810  		v0.AuxInt = int32ToAuxInt(7)
 19811  		v0.AddArg2(src, mem)
 19812  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19813  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19814  		v2.AddArg2(src, mem)
 19815  		v1.AddArg3(dst, v2, mem)
 19816  		v.AddArg3(dst, v0, v1)
 19817  		return true
 19818  	}
 19819  	// match: (Move [16] dst src mem)
 19820  	// result: (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)
 19821  	for {
 19822  		if auxIntToInt64(v.AuxInt) != 16 {
 19823  			break
 19824  		}
 19825  		dst := v_0
 19826  		src := v_1
 19827  		mem := v_2
 19828  		v.reset(OpARM64STP)
 19829  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19830  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19831  		v1.AddArg2(src, mem)
 19832  		v0.AddArg(v1)
 19833  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19834  		v2.AddArg(v1)
 19835  		v.AddArg4(dst, v0, v2, mem)
 19836  		return true
 19837  	}
 19838  	// match: (Move [s] dst src mem)
 19839  	// cond: s > 16 && s <= 24
 19840  	// 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))
 19841  	for {
 19842  		s := auxIntToInt64(v.AuxInt)
 19843  		dst := v_0
 19844  		src := v_1
 19845  		mem := v_2
 19846  		if !(s > 16 && s <= 24) {
 19847  			break
 19848  		}
 19849  		v.reset(OpARM64MOVDstore)
 19850  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 19851  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19852  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 19853  		v0.AddArg2(src, mem)
 19854  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19855  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19856  		v3 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19857  		v3.AddArg2(src, mem)
 19858  		v2.AddArg(v3)
 19859  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19860  		v4.AddArg(v3)
 19861  		v1.AddArg4(dst, v2, v4, mem)
 19862  		v.AddArg3(dst, v0, v1)
 19863  		return true
 19864  	}
 19865  	// match: (Move [s] dst src mem)
 19866  	// cond: s > 24 && s <= 32
 19867  	// 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))
 19868  	for {
 19869  		s := auxIntToInt64(v.AuxInt)
 19870  		dst := v_0
 19871  		src := v_1
 19872  		mem := v_2
 19873  		if !(s > 24 && s <= 32) {
 19874  			break
 19875  		}
 19876  		v.reset(OpARM64STP)
 19877  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 19878  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19879  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19880  		v1.AuxInt = int32ToAuxInt(int32(s - 16))
 19881  		v1.AddArg2(src, mem)
 19882  		v0.AddArg(v1)
 19883  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19884  		v2.AddArg(v1)
 19885  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19886  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19887  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19888  		v5.AddArg2(src, mem)
 19889  		v4.AddArg(v5)
 19890  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19891  		v6.AddArg(v5)
 19892  		v3.AddArg4(dst, v4, v6, mem)
 19893  		v.AddArg4(dst, v0, v2, v3)
 19894  		return true
 19895  	}
 19896  	// match: (Move [s] dst src mem)
 19897  	// cond: s > 32 && s <= 40
 19898  	// 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)))
 19899  	for {
 19900  		s := auxIntToInt64(v.AuxInt)
 19901  		dst := v_0
 19902  		src := v_1
 19903  		mem := v_2
 19904  		if !(s > 32 && s <= 40) {
 19905  			break
 19906  		}
 19907  		v.reset(OpARM64MOVDstore)
 19908  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 19909  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19910  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 19911  		v0.AddArg2(src, mem)
 19912  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19913  		v1.AuxInt = int32ToAuxInt(16)
 19914  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19915  		v3 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19916  		v3.AuxInt = int32ToAuxInt(16)
 19917  		v3.AddArg2(src, mem)
 19918  		v2.AddArg(v3)
 19919  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19920  		v4.AddArg(v3)
 19921  		v5 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19922  		v6 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19923  		v7 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19924  		v7.AddArg2(src, mem)
 19925  		v6.AddArg(v7)
 19926  		v8 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19927  		v8.AddArg(v7)
 19928  		v5.AddArg4(dst, v6, v8, mem)
 19929  		v1.AddArg4(dst, v2, v4, v5)
 19930  		v.AddArg3(dst, v0, v1)
 19931  		return true
 19932  	}
 19933  	// match: (Move [s] dst src mem)
 19934  	// cond: s > 40 && s <= 48
 19935  	// 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)))
 19936  	for {
 19937  		s := auxIntToInt64(v.AuxInt)
 19938  		dst := v_0
 19939  		src := v_1
 19940  		mem := v_2
 19941  		if !(s > 40 && s <= 48) {
 19942  			break
 19943  		}
 19944  		v.reset(OpARM64STP)
 19945  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 19946  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19947  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19948  		v1.AuxInt = int32ToAuxInt(int32(s - 16))
 19949  		v1.AddArg2(src, mem)
 19950  		v0.AddArg(v1)
 19951  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19952  		v2.AddArg(v1)
 19953  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19954  		v3.AuxInt = int32ToAuxInt(16)
 19955  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19956  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19957  		v5.AuxInt = int32ToAuxInt(16)
 19958  		v5.AddArg2(src, mem)
 19959  		v4.AddArg(v5)
 19960  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19961  		v6.AddArg(v5)
 19962  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19963  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19964  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19965  		v9.AddArg2(src, mem)
 19966  		v8.AddArg(v9)
 19967  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19968  		v10.AddArg(v9)
 19969  		v7.AddArg4(dst, v8, v10, mem)
 19970  		v3.AddArg4(dst, v4, v6, v7)
 19971  		v.AddArg4(dst, v0, v2, v3)
 19972  		return true
 19973  	}
 19974  	// match: (Move [s] dst src mem)
 19975  	// cond: s > 48 && s <= 56
 19976  	// 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))))
 19977  	for {
 19978  		s := auxIntToInt64(v.AuxInt)
 19979  		dst := v_0
 19980  		src := v_1
 19981  		mem := v_2
 19982  		if !(s > 48 && s <= 56) {
 19983  			break
 19984  		}
 19985  		v.reset(OpARM64MOVDstore)
 19986  		v.AuxInt = int32ToAuxInt(int32(s - 8))
 19987  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19988  		v0.AuxInt = int32ToAuxInt(int32(s - 8))
 19989  		v0.AddArg2(src, mem)
 19990  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19991  		v1.AuxInt = int32ToAuxInt(32)
 19992  		v2 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19993  		v3 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19994  		v3.AuxInt = int32ToAuxInt(32)
 19995  		v3.AddArg2(src, mem)
 19996  		v2.AddArg(v3)
 19997  		v4 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19998  		v4.AddArg(v3)
 19999  		v5 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20000  		v5.AuxInt = int32ToAuxInt(16)
 20001  		v6 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20002  		v7 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20003  		v7.AuxInt = int32ToAuxInt(16)
 20004  		v7.AddArg2(src, mem)
 20005  		v6.AddArg(v7)
 20006  		v8 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20007  		v8.AddArg(v7)
 20008  		v9 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20009  		v10 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20010  		v11 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20011  		v11.AddArg2(src, mem)
 20012  		v10.AddArg(v11)
 20013  		v12 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20014  		v12.AddArg(v11)
 20015  		v9.AddArg4(dst, v10, v12, mem)
 20016  		v5.AddArg4(dst, v6, v8, v9)
 20017  		v1.AddArg4(dst, v2, v4, v5)
 20018  		v.AddArg3(dst, v0, v1)
 20019  		return true
 20020  	}
 20021  	// match: (Move [s] dst src mem)
 20022  	// cond: s > 56 && s <= 64
 20023  	// 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))))
 20024  	for {
 20025  		s := auxIntToInt64(v.AuxInt)
 20026  		dst := v_0
 20027  		src := v_1
 20028  		mem := v_2
 20029  		if !(s > 56 && s <= 64) {
 20030  			break
 20031  		}
 20032  		v.reset(OpARM64STP)
 20033  		v.AuxInt = int32ToAuxInt(int32(s - 16))
 20034  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20035  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20036  		v1.AuxInt = int32ToAuxInt(int32(s - 16))
 20037  		v1.AddArg2(src, mem)
 20038  		v0.AddArg(v1)
 20039  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20040  		v2.AddArg(v1)
 20041  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20042  		v3.AuxInt = int32ToAuxInt(32)
 20043  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20044  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20045  		v5.AuxInt = int32ToAuxInt(32)
 20046  		v5.AddArg2(src, mem)
 20047  		v4.AddArg(v5)
 20048  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20049  		v6.AddArg(v5)
 20050  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20051  		v7.AuxInt = int32ToAuxInt(16)
 20052  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20053  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20054  		v9.AuxInt = int32ToAuxInt(16)
 20055  		v9.AddArg2(src, mem)
 20056  		v8.AddArg(v9)
 20057  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20058  		v10.AddArg(v9)
 20059  		v11 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20060  		v12 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20061  		v13 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20062  		v13.AddArg2(src, mem)
 20063  		v12.AddArg(v13)
 20064  		v14 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20065  		v14.AddArg(v13)
 20066  		v11.AddArg4(dst, v12, v14, mem)
 20067  		v7.AddArg4(dst, v8, v10, v11)
 20068  		v3.AddArg4(dst, v4, v6, v7)
 20069  		v.AddArg4(dst, v0, v2, v3)
 20070  		return true
 20071  	}
 20072  	// match: (Move [s] dst src mem)
 20073  	// cond: s > 64 && s < 192 && logLargeCopy(v, s)
 20074  	// result: (LoweredMove [s] dst src mem)
 20075  	for {
 20076  		s := auxIntToInt64(v.AuxInt)
 20077  		dst := v_0
 20078  		src := v_1
 20079  		mem := v_2
 20080  		if !(s > 64 && s < 192 && logLargeCopy(v, s)) {
 20081  			break
 20082  		}
 20083  		v.reset(OpARM64LoweredMove)
 20084  		v.AuxInt = int64ToAuxInt(s)
 20085  		v.AddArg3(dst, src, mem)
 20086  		return true
 20087  	}
 20088  	// match: (Move [s] dst src mem)
 20089  	// cond: s >= 192 && logLargeCopy(v, s)
 20090  	// result: (LoweredMoveLoop [s] dst src mem)
 20091  	for {
 20092  		s := auxIntToInt64(v.AuxInt)
 20093  		dst := v_0
 20094  		src := v_1
 20095  		mem := v_2
 20096  		if !(s >= 192 && logLargeCopy(v, s)) {
 20097  			break
 20098  		}
 20099  		v.reset(OpARM64LoweredMoveLoop)
 20100  		v.AuxInt = int64ToAuxInt(s)
 20101  		v.AddArg3(dst, src, mem)
 20102  		return true
 20103  	}
 20104  	return false
 20105  }
 20106  func rewriteValueARM64_OpNeq16(v *Value) bool {
 20107  	v_1 := v.Args[1]
 20108  	v_0 := v.Args[0]
 20109  	b := v.Block
 20110  	typ := &b.Func.Config.Types
 20111  	// match: (Neq16 x y)
 20112  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 20113  	for {
 20114  		x := v_0
 20115  		y := v_1
 20116  		v.reset(OpARM64NotEqual)
 20117  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20118  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20119  		v1.AddArg(x)
 20120  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20121  		v2.AddArg(y)
 20122  		v0.AddArg2(v1, v2)
 20123  		v.AddArg(v0)
 20124  		return true
 20125  	}
 20126  }
 20127  func rewriteValueARM64_OpNeq32(v *Value) bool {
 20128  	v_1 := v.Args[1]
 20129  	v_0 := v.Args[0]
 20130  	b := v.Block
 20131  	// match: (Neq32 x y)
 20132  	// result: (NotEqual (CMPW x y))
 20133  	for {
 20134  		x := v_0
 20135  		y := v_1
 20136  		v.reset(OpARM64NotEqual)
 20137  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20138  		v0.AddArg2(x, y)
 20139  		v.AddArg(v0)
 20140  		return true
 20141  	}
 20142  }
 20143  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 20144  	v_1 := v.Args[1]
 20145  	v_0 := v.Args[0]
 20146  	b := v.Block
 20147  	// match: (Neq32F x y)
 20148  	// result: (NotEqual (FCMPS x y))
 20149  	for {
 20150  		x := v_0
 20151  		y := v_1
 20152  		v.reset(OpARM64NotEqual)
 20153  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 20154  		v0.AddArg2(x, y)
 20155  		v.AddArg(v0)
 20156  		return true
 20157  	}
 20158  }
 20159  func rewriteValueARM64_OpNeq64(v *Value) bool {
 20160  	v_1 := v.Args[1]
 20161  	v_0 := v.Args[0]
 20162  	b := v.Block
 20163  	// match: (Neq64 x y)
 20164  	// result: (NotEqual (CMP x y))
 20165  	for {
 20166  		x := v_0
 20167  		y := v_1
 20168  		v.reset(OpARM64NotEqual)
 20169  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20170  		v0.AddArg2(x, y)
 20171  		v.AddArg(v0)
 20172  		return true
 20173  	}
 20174  }
 20175  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 20176  	v_1 := v.Args[1]
 20177  	v_0 := v.Args[0]
 20178  	b := v.Block
 20179  	// match: (Neq64F x y)
 20180  	// result: (NotEqual (FCMPD x y))
 20181  	for {
 20182  		x := v_0
 20183  		y := v_1
 20184  		v.reset(OpARM64NotEqual)
 20185  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 20186  		v0.AddArg2(x, y)
 20187  		v.AddArg(v0)
 20188  		return true
 20189  	}
 20190  }
 20191  func rewriteValueARM64_OpNeq8(v *Value) bool {
 20192  	v_1 := v.Args[1]
 20193  	v_0 := v.Args[0]
 20194  	b := v.Block
 20195  	typ := &b.Func.Config.Types
 20196  	// match: (Neq8 x y)
 20197  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 20198  	for {
 20199  		x := v_0
 20200  		y := v_1
 20201  		v.reset(OpARM64NotEqual)
 20202  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 20203  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20204  		v1.AddArg(x)
 20205  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20206  		v2.AddArg(y)
 20207  		v0.AddArg2(v1, v2)
 20208  		v.AddArg(v0)
 20209  		return true
 20210  	}
 20211  }
 20212  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 20213  	v_1 := v.Args[1]
 20214  	v_0 := v.Args[0]
 20215  	b := v.Block
 20216  	// match: (NeqPtr x y)
 20217  	// result: (NotEqual (CMP x y))
 20218  	for {
 20219  		x := v_0
 20220  		y := v_1
 20221  		v.reset(OpARM64NotEqual)
 20222  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 20223  		v0.AddArg2(x, y)
 20224  		v.AddArg(v0)
 20225  		return true
 20226  	}
 20227  }
 20228  func rewriteValueARM64_OpNot(v *Value) bool {
 20229  	v_0 := v.Args[0]
 20230  	b := v.Block
 20231  	typ := &b.Func.Config.Types
 20232  	// match: (Not x)
 20233  	// result: (XOR (MOVDconst [1]) x)
 20234  	for {
 20235  		x := v_0
 20236  		v.reset(OpARM64XOR)
 20237  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20238  		v0.AuxInt = int64ToAuxInt(1)
 20239  		v.AddArg2(v0, x)
 20240  		return true
 20241  	}
 20242  }
 20243  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 20244  	v_0 := v.Args[0]
 20245  	// match: (OffPtr [off] ptr:(SP))
 20246  	// cond: is32Bit(off)
 20247  	// result: (MOVDaddr [int32(off)] ptr)
 20248  	for {
 20249  		off := auxIntToInt64(v.AuxInt)
 20250  		ptr := v_0
 20251  		if ptr.Op != OpSP || !(is32Bit(off)) {
 20252  			break
 20253  		}
 20254  		v.reset(OpARM64MOVDaddr)
 20255  		v.AuxInt = int32ToAuxInt(int32(off))
 20256  		v.AddArg(ptr)
 20257  		return true
 20258  	}
 20259  	// match: (OffPtr [off] ptr)
 20260  	// result: (ADDconst [off] ptr)
 20261  	for {
 20262  		off := auxIntToInt64(v.AuxInt)
 20263  		ptr := v_0
 20264  		v.reset(OpARM64ADDconst)
 20265  		v.AuxInt = int64ToAuxInt(off)
 20266  		v.AddArg(ptr)
 20267  		return true
 20268  	}
 20269  }
 20270  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 20271  	v_0 := v.Args[0]
 20272  	b := v.Block
 20273  	typ := &b.Func.Config.Types
 20274  	// match: (PopCount16 <t> x)
 20275  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 20276  	for {
 20277  		t := v.Type
 20278  		x := v_0
 20279  		v.reset(OpARM64FMOVDfpgp)
 20280  		v.Type = t
 20281  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 20282  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 20283  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 20284  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20285  		v3.AddArg(x)
 20286  		v2.AddArg(v3)
 20287  		v1.AddArg(v2)
 20288  		v0.AddArg(v1)
 20289  		v.AddArg(v0)
 20290  		return true
 20291  	}
 20292  }
 20293  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 20294  	v_0 := v.Args[0]
 20295  	b := v.Block
 20296  	typ := &b.Func.Config.Types
 20297  	// match: (PopCount32 <t> x)
 20298  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 20299  	for {
 20300  		t := v.Type
 20301  		x := v_0
 20302  		v.reset(OpARM64FMOVDfpgp)
 20303  		v.Type = t
 20304  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 20305  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 20306  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 20307  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20308  		v3.AddArg(x)
 20309  		v2.AddArg(v3)
 20310  		v1.AddArg(v2)
 20311  		v0.AddArg(v1)
 20312  		v.AddArg(v0)
 20313  		return true
 20314  	}
 20315  }
 20316  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 20317  	v_0 := v.Args[0]
 20318  	b := v.Block
 20319  	typ := &b.Func.Config.Types
 20320  	// match: (PopCount64 <t> x)
 20321  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 20322  	for {
 20323  		t := v.Type
 20324  		x := v_0
 20325  		v.reset(OpARM64FMOVDfpgp)
 20326  		v.Type = t
 20327  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 20328  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 20329  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 20330  		v2.AddArg(x)
 20331  		v1.AddArg(v2)
 20332  		v0.AddArg(v1)
 20333  		v.AddArg(v0)
 20334  		return true
 20335  	}
 20336  }
 20337  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 20338  	v_1 := v.Args[1]
 20339  	v_0 := v.Args[0]
 20340  	// match: (PrefetchCache addr mem)
 20341  	// result: (PRFM [0] addr mem)
 20342  	for {
 20343  		addr := v_0
 20344  		mem := v_1
 20345  		v.reset(OpARM64PRFM)
 20346  		v.AuxInt = int64ToAuxInt(0)
 20347  		v.AddArg2(addr, mem)
 20348  		return true
 20349  	}
 20350  }
 20351  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 20352  	v_1 := v.Args[1]
 20353  	v_0 := v.Args[0]
 20354  	// match: (PrefetchCacheStreamed addr mem)
 20355  	// result: (PRFM [1] addr mem)
 20356  	for {
 20357  		addr := v_0
 20358  		mem := v_1
 20359  		v.reset(OpARM64PRFM)
 20360  		v.AuxInt = int64ToAuxInt(1)
 20361  		v.AddArg2(addr, mem)
 20362  		return true
 20363  	}
 20364  }
 20365  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 20366  	v_0 := v.Args[0]
 20367  	// match: (PubBarrier mem)
 20368  	// result: (DMB [0xe] mem)
 20369  	for {
 20370  		mem := v_0
 20371  		v.reset(OpARM64DMB)
 20372  		v.AuxInt = int64ToAuxInt(0xe)
 20373  		v.AddArg(mem)
 20374  		return true
 20375  	}
 20376  }
 20377  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 20378  	v_1 := v.Args[1]
 20379  	v_0 := v.Args[0]
 20380  	b := v.Block
 20381  	typ := &b.Func.Config.Types
 20382  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 20383  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 20384  	for {
 20385  		t := v.Type
 20386  		x := v_0
 20387  		if v_1.Op != OpARM64MOVDconst {
 20388  			break
 20389  		}
 20390  		c := auxIntToInt64(v_1.AuxInt)
 20391  		v.reset(OpOr16)
 20392  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 20393  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20394  		v1.AuxInt = int64ToAuxInt(c & 15)
 20395  		v0.AddArg2(x, v1)
 20396  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 20397  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20398  		v3.AuxInt = int64ToAuxInt(-c & 15)
 20399  		v2.AddArg2(x, v3)
 20400  		v.AddArg2(v0, v2)
 20401  		return true
 20402  	}
 20403  	// match: (RotateLeft16 <t> x y)
 20404  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 20405  	for {
 20406  		t := v.Type
 20407  		x := v_0
 20408  		y := v_1
 20409  		v.reset(OpARM64RORW)
 20410  		v.Type = t
 20411  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 20412  		v0.AuxInt = int64ToAuxInt(16)
 20413  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20414  		v1.AddArg(x)
 20415  		v0.AddArg2(v1, v1)
 20416  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 20417  		v2.AddArg(y)
 20418  		v.AddArg2(v0, v2)
 20419  		return true
 20420  	}
 20421  }
 20422  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 20423  	v_1 := v.Args[1]
 20424  	v_0 := v.Args[0]
 20425  	b := v.Block
 20426  	// match: (RotateLeft32 x y)
 20427  	// result: (RORW x (NEG <y.Type> y))
 20428  	for {
 20429  		x := v_0
 20430  		y := v_1
 20431  		v.reset(OpARM64RORW)
 20432  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 20433  		v0.AddArg(y)
 20434  		v.AddArg2(x, v0)
 20435  		return true
 20436  	}
 20437  }
 20438  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 20439  	v_1 := v.Args[1]
 20440  	v_0 := v.Args[0]
 20441  	b := v.Block
 20442  	// match: (RotateLeft64 x y)
 20443  	// result: (ROR x (NEG <y.Type> y))
 20444  	for {
 20445  		x := v_0
 20446  		y := v_1
 20447  		v.reset(OpARM64ROR)
 20448  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 20449  		v0.AddArg(y)
 20450  		v.AddArg2(x, v0)
 20451  		return true
 20452  	}
 20453  }
 20454  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 20455  	v_1 := v.Args[1]
 20456  	v_0 := v.Args[0]
 20457  	b := v.Block
 20458  	typ := &b.Func.Config.Types
 20459  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 20460  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 20461  	for {
 20462  		t := v.Type
 20463  		x := v_0
 20464  		if v_1.Op != OpARM64MOVDconst {
 20465  			break
 20466  		}
 20467  		c := auxIntToInt64(v_1.AuxInt)
 20468  		v.reset(OpOr8)
 20469  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 20470  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20471  		v1.AuxInt = int64ToAuxInt(c & 7)
 20472  		v0.AddArg2(x, v1)
 20473  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 20474  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 20475  		v3.AuxInt = int64ToAuxInt(-c & 7)
 20476  		v2.AddArg2(x, v3)
 20477  		v.AddArg2(v0, v2)
 20478  		return true
 20479  	}
 20480  	// match: (RotateLeft8 <t> x y)
 20481  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 20482  	for {
 20483  		t := v.Type
 20484  		x := v_0
 20485  		y := v_1
 20486  		v.reset(OpARM64OR)
 20487  		v.Type = t
 20488  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20489  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 20490  		v1.AuxInt = int64ToAuxInt(7)
 20491  		v1.AddArg(y)
 20492  		v0.AddArg2(x, v1)
 20493  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20494  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20495  		v3.AddArg(x)
 20496  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 20497  		v4.AuxInt = int64ToAuxInt(7)
 20498  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 20499  		v5.AddArg(y)
 20500  		v4.AddArg(v5)
 20501  		v2.AddArg2(v3, v4)
 20502  		v.AddArg2(v0, v2)
 20503  		return true
 20504  	}
 20505  }
 20506  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 20507  	v_1 := v.Args[1]
 20508  	v_0 := v.Args[0]
 20509  	b := v.Block
 20510  	typ := &b.Func.Config.Types
 20511  	// match: (Rsh16Ux16 <t> x y)
 20512  	// cond: shiftIsBounded(v)
 20513  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20514  	for {
 20515  		t := v.Type
 20516  		x := v_0
 20517  		y := v_1
 20518  		if !(shiftIsBounded(v)) {
 20519  			break
 20520  		}
 20521  		v.reset(OpARM64SRL)
 20522  		v.Type = t
 20523  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20524  		v0.AddArg(x)
 20525  		v.AddArg2(v0, y)
 20526  		return true
 20527  	}
 20528  	// match: (Rsh16Ux16 <t> x y)
 20529  	// cond: !shiftIsBounded(v)
 20530  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20531  	for {
 20532  		t := v.Type
 20533  		x := v_0
 20534  		y := v_1
 20535  		if !(!shiftIsBounded(v)) {
 20536  			break
 20537  		}
 20538  		v.reset(OpARM64CSEL)
 20539  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20540  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20541  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20542  		v1.AddArg(x)
 20543  		v0.AddArg2(v1, y)
 20544  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20545  		v2.AuxInt = int64ToAuxInt(0)
 20546  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20547  		v3.AuxInt = int64ToAuxInt(64)
 20548  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20549  		v4.AddArg(y)
 20550  		v3.AddArg(v4)
 20551  		v.AddArg3(v0, v2, v3)
 20552  		return true
 20553  	}
 20554  	return false
 20555  }
 20556  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 20557  	v_1 := v.Args[1]
 20558  	v_0 := v.Args[0]
 20559  	b := v.Block
 20560  	typ := &b.Func.Config.Types
 20561  	// match: (Rsh16Ux32 <t> x y)
 20562  	// cond: shiftIsBounded(v)
 20563  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20564  	for {
 20565  		t := v.Type
 20566  		x := v_0
 20567  		y := v_1
 20568  		if !(shiftIsBounded(v)) {
 20569  			break
 20570  		}
 20571  		v.reset(OpARM64SRL)
 20572  		v.Type = t
 20573  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20574  		v0.AddArg(x)
 20575  		v.AddArg2(v0, y)
 20576  		return true
 20577  	}
 20578  	// match: (Rsh16Ux32 <t> x y)
 20579  	// cond: !shiftIsBounded(v)
 20580  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20581  	for {
 20582  		t := v.Type
 20583  		x := v_0
 20584  		y := v_1
 20585  		if !(!shiftIsBounded(v)) {
 20586  			break
 20587  		}
 20588  		v.reset(OpARM64CSEL)
 20589  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20590  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20591  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20592  		v1.AddArg(x)
 20593  		v0.AddArg2(v1, y)
 20594  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20595  		v2.AuxInt = int64ToAuxInt(0)
 20596  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20597  		v3.AuxInt = int64ToAuxInt(64)
 20598  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20599  		v4.AddArg(y)
 20600  		v3.AddArg(v4)
 20601  		v.AddArg3(v0, v2, v3)
 20602  		return true
 20603  	}
 20604  	return false
 20605  }
 20606  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 20607  	v_1 := v.Args[1]
 20608  	v_0 := v.Args[0]
 20609  	b := v.Block
 20610  	typ := &b.Func.Config.Types
 20611  	// match: (Rsh16Ux64 <t> x y)
 20612  	// cond: shiftIsBounded(v)
 20613  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20614  	for {
 20615  		t := v.Type
 20616  		x := v_0
 20617  		y := v_1
 20618  		if !(shiftIsBounded(v)) {
 20619  			break
 20620  		}
 20621  		v.reset(OpARM64SRL)
 20622  		v.Type = t
 20623  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20624  		v0.AddArg(x)
 20625  		v.AddArg2(v0, y)
 20626  		return true
 20627  	}
 20628  	// match: (Rsh16Ux64 <t> x y)
 20629  	// cond: !shiftIsBounded(v)
 20630  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 20631  	for {
 20632  		t := v.Type
 20633  		x := v_0
 20634  		y := v_1
 20635  		if !(!shiftIsBounded(v)) {
 20636  			break
 20637  		}
 20638  		v.reset(OpARM64CSEL)
 20639  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20640  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20641  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20642  		v1.AddArg(x)
 20643  		v0.AddArg2(v1, y)
 20644  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20645  		v2.AuxInt = int64ToAuxInt(0)
 20646  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20647  		v3.AuxInt = int64ToAuxInt(64)
 20648  		v3.AddArg(y)
 20649  		v.AddArg3(v0, v2, v3)
 20650  		return true
 20651  	}
 20652  	return false
 20653  }
 20654  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 20655  	v_1 := v.Args[1]
 20656  	v_0 := v.Args[0]
 20657  	b := v.Block
 20658  	typ := &b.Func.Config.Types
 20659  	// match: (Rsh16Ux8 <t> x y)
 20660  	// cond: shiftIsBounded(v)
 20661  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20662  	for {
 20663  		t := v.Type
 20664  		x := v_0
 20665  		y := v_1
 20666  		if !(shiftIsBounded(v)) {
 20667  			break
 20668  		}
 20669  		v.reset(OpARM64SRL)
 20670  		v.Type = t
 20671  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20672  		v0.AddArg(x)
 20673  		v.AddArg2(v0, y)
 20674  		return true
 20675  	}
 20676  	// match: (Rsh16Ux8 <t> x y)
 20677  	// cond: !shiftIsBounded(v)
 20678  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20679  	for {
 20680  		t := v.Type
 20681  		x := v_0
 20682  		y := v_1
 20683  		if !(!shiftIsBounded(v)) {
 20684  			break
 20685  		}
 20686  		v.reset(OpARM64CSEL)
 20687  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20688  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20689  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20690  		v1.AddArg(x)
 20691  		v0.AddArg2(v1, y)
 20692  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20693  		v2.AuxInt = int64ToAuxInt(0)
 20694  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20695  		v3.AuxInt = int64ToAuxInt(64)
 20696  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20697  		v4.AddArg(y)
 20698  		v3.AddArg(v4)
 20699  		v.AddArg3(v0, v2, v3)
 20700  		return true
 20701  	}
 20702  	return false
 20703  }
 20704  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 20705  	v_1 := v.Args[1]
 20706  	v_0 := v.Args[0]
 20707  	b := v.Block
 20708  	typ := &b.Func.Config.Types
 20709  	// match: (Rsh16x16 <t> x y)
 20710  	// cond: shiftIsBounded(v)
 20711  	// result: (SRA <t> (SignExt16to64 x) y)
 20712  	for {
 20713  		t := v.Type
 20714  		x := v_0
 20715  		y := v_1
 20716  		if !(shiftIsBounded(v)) {
 20717  			break
 20718  		}
 20719  		v.reset(OpARM64SRA)
 20720  		v.Type = t
 20721  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20722  		v0.AddArg(x)
 20723  		v.AddArg2(v0, y)
 20724  		return true
 20725  	}
 20726  	// match: (Rsh16x16 x y)
 20727  	// cond: !shiftIsBounded(v)
 20728  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20729  	for {
 20730  		x := v_0
 20731  		y := v_1
 20732  		if !(!shiftIsBounded(v)) {
 20733  			break
 20734  		}
 20735  		v.reset(OpARM64SRA)
 20736  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20737  		v0.AddArg(x)
 20738  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20739  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20740  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20741  		v2.AuxInt = int64ToAuxInt(63)
 20742  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20743  		v3.AuxInt = int64ToAuxInt(64)
 20744  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20745  		v4.AddArg(y)
 20746  		v3.AddArg(v4)
 20747  		v1.AddArg3(y, v2, v3)
 20748  		v.AddArg2(v0, v1)
 20749  		return true
 20750  	}
 20751  	return false
 20752  }
 20753  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 20754  	v_1 := v.Args[1]
 20755  	v_0 := v.Args[0]
 20756  	b := v.Block
 20757  	typ := &b.Func.Config.Types
 20758  	// match: (Rsh16x32 <t> x y)
 20759  	// cond: shiftIsBounded(v)
 20760  	// result: (SRA <t> (SignExt16to64 x) y)
 20761  	for {
 20762  		t := v.Type
 20763  		x := v_0
 20764  		y := v_1
 20765  		if !(shiftIsBounded(v)) {
 20766  			break
 20767  		}
 20768  		v.reset(OpARM64SRA)
 20769  		v.Type = t
 20770  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20771  		v0.AddArg(x)
 20772  		v.AddArg2(v0, y)
 20773  		return true
 20774  	}
 20775  	// match: (Rsh16x32 x y)
 20776  	// cond: !shiftIsBounded(v)
 20777  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20778  	for {
 20779  		x := v_0
 20780  		y := v_1
 20781  		if !(!shiftIsBounded(v)) {
 20782  			break
 20783  		}
 20784  		v.reset(OpARM64SRA)
 20785  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20786  		v0.AddArg(x)
 20787  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20788  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20789  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20790  		v2.AuxInt = int64ToAuxInt(63)
 20791  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20792  		v3.AuxInt = int64ToAuxInt(64)
 20793  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20794  		v4.AddArg(y)
 20795  		v3.AddArg(v4)
 20796  		v1.AddArg3(y, v2, v3)
 20797  		v.AddArg2(v0, v1)
 20798  		return true
 20799  	}
 20800  	return false
 20801  }
 20802  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 20803  	v_1 := v.Args[1]
 20804  	v_0 := v.Args[0]
 20805  	b := v.Block
 20806  	typ := &b.Func.Config.Types
 20807  	// match: (Rsh16x64 <t> x y)
 20808  	// cond: shiftIsBounded(v)
 20809  	// result: (SRA <t> (SignExt16to64 x) y)
 20810  	for {
 20811  		t := v.Type
 20812  		x := v_0
 20813  		y := v_1
 20814  		if !(shiftIsBounded(v)) {
 20815  			break
 20816  		}
 20817  		v.reset(OpARM64SRA)
 20818  		v.Type = t
 20819  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20820  		v0.AddArg(x)
 20821  		v.AddArg2(v0, y)
 20822  		return true
 20823  	}
 20824  	// match: (Rsh16x64 x y)
 20825  	// cond: !shiftIsBounded(v)
 20826  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 20827  	for {
 20828  		x := v_0
 20829  		y := v_1
 20830  		if !(!shiftIsBounded(v)) {
 20831  			break
 20832  		}
 20833  		v.reset(OpARM64SRA)
 20834  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20835  		v0.AddArg(x)
 20836  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20837  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20838  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20839  		v2.AuxInt = int64ToAuxInt(63)
 20840  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20841  		v3.AuxInt = int64ToAuxInt(64)
 20842  		v3.AddArg(y)
 20843  		v1.AddArg3(y, v2, v3)
 20844  		v.AddArg2(v0, v1)
 20845  		return true
 20846  	}
 20847  	return false
 20848  }
 20849  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 20850  	v_1 := v.Args[1]
 20851  	v_0 := v.Args[0]
 20852  	b := v.Block
 20853  	typ := &b.Func.Config.Types
 20854  	// match: (Rsh16x8 <t> x y)
 20855  	// cond: shiftIsBounded(v)
 20856  	// result: (SRA <t> (SignExt16to64 x) y)
 20857  	for {
 20858  		t := v.Type
 20859  		x := v_0
 20860  		y := v_1
 20861  		if !(shiftIsBounded(v)) {
 20862  			break
 20863  		}
 20864  		v.reset(OpARM64SRA)
 20865  		v.Type = t
 20866  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20867  		v0.AddArg(x)
 20868  		v.AddArg2(v0, y)
 20869  		return true
 20870  	}
 20871  	// match: (Rsh16x8 x y)
 20872  	// cond: !shiftIsBounded(v)
 20873  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 20874  	for {
 20875  		x := v_0
 20876  		y := v_1
 20877  		if !(!shiftIsBounded(v)) {
 20878  			break
 20879  		}
 20880  		v.reset(OpARM64SRA)
 20881  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20882  		v0.AddArg(x)
 20883  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20884  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20885  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20886  		v2.AuxInt = int64ToAuxInt(63)
 20887  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20888  		v3.AuxInt = int64ToAuxInt(64)
 20889  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20890  		v4.AddArg(y)
 20891  		v3.AddArg(v4)
 20892  		v1.AddArg3(y, v2, v3)
 20893  		v.AddArg2(v0, v1)
 20894  		return true
 20895  	}
 20896  	return false
 20897  }
 20898  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 20899  	v_1 := v.Args[1]
 20900  	v_0 := v.Args[0]
 20901  	b := v.Block
 20902  	typ := &b.Func.Config.Types
 20903  	// match: (Rsh32Ux16 <t> x y)
 20904  	// cond: shiftIsBounded(v)
 20905  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20906  	for {
 20907  		t := v.Type
 20908  		x := v_0
 20909  		y := v_1
 20910  		if !(shiftIsBounded(v)) {
 20911  			break
 20912  		}
 20913  		v.reset(OpARM64SRL)
 20914  		v.Type = t
 20915  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20916  		v0.AddArg(x)
 20917  		v.AddArg2(v0, y)
 20918  		return true
 20919  	}
 20920  	// match: (Rsh32Ux16 <t> x y)
 20921  	// cond: !shiftIsBounded(v)
 20922  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20923  	for {
 20924  		t := v.Type
 20925  		x := v_0
 20926  		y := v_1
 20927  		if !(!shiftIsBounded(v)) {
 20928  			break
 20929  		}
 20930  		v.reset(OpARM64CSEL)
 20931  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20932  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20933  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20934  		v1.AddArg(x)
 20935  		v0.AddArg2(v1, y)
 20936  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20937  		v2.AuxInt = int64ToAuxInt(0)
 20938  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20939  		v3.AuxInt = int64ToAuxInt(64)
 20940  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20941  		v4.AddArg(y)
 20942  		v3.AddArg(v4)
 20943  		v.AddArg3(v0, v2, v3)
 20944  		return true
 20945  	}
 20946  	return false
 20947  }
 20948  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 20949  	v_1 := v.Args[1]
 20950  	v_0 := v.Args[0]
 20951  	b := v.Block
 20952  	typ := &b.Func.Config.Types
 20953  	// match: (Rsh32Ux32 <t> x y)
 20954  	// cond: shiftIsBounded(v)
 20955  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20956  	for {
 20957  		t := v.Type
 20958  		x := v_0
 20959  		y := v_1
 20960  		if !(shiftIsBounded(v)) {
 20961  			break
 20962  		}
 20963  		v.reset(OpARM64SRL)
 20964  		v.Type = t
 20965  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20966  		v0.AddArg(x)
 20967  		v.AddArg2(v0, y)
 20968  		return true
 20969  	}
 20970  	// match: (Rsh32Ux32 <t> x y)
 20971  	// cond: !shiftIsBounded(v)
 20972  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20973  	for {
 20974  		t := v.Type
 20975  		x := v_0
 20976  		y := v_1
 20977  		if !(!shiftIsBounded(v)) {
 20978  			break
 20979  		}
 20980  		v.reset(OpARM64CSEL)
 20981  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20982  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20983  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20984  		v1.AddArg(x)
 20985  		v0.AddArg2(v1, y)
 20986  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20987  		v2.AuxInt = int64ToAuxInt(0)
 20988  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20989  		v3.AuxInt = int64ToAuxInt(64)
 20990  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20991  		v4.AddArg(y)
 20992  		v3.AddArg(v4)
 20993  		v.AddArg3(v0, v2, v3)
 20994  		return true
 20995  	}
 20996  	return false
 20997  }
 20998  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 20999  	v_1 := v.Args[1]
 21000  	v_0 := v.Args[0]
 21001  	b := v.Block
 21002  	typ := &b.Func.Config.Types
 21003  	// match: (Rsh32Ux64 <t> x y)
 21004  	// cond: shiftIsBounded(v)
 21005  	// result: (SRL <t> (ZeroExt32to64 x) y)
 21006  	for {
 21007  		t := v.Type
 21008  		x := v_0
 21009  		y := v_1
 21010  		if !(shiftIsBounded(v)) {
 21011  			break
 21012  		}
 21013  		v.reset(OpARM64SRL)
 21014  		v.Type = t
 21015  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21016  		v0.AddArg(x)
 21017  		v.AddArg2(v0, y)
 21018  		return true
 21019  	}
 21020  	// match: (Rsh32Ux64 <t> x y)
 21021  	// cond: !shiftIsBounded(v)
 21022  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 21023  	for {
 21024  		t := v.Type
 21025  		x := v_0
 21026  		y := v_1
 21027  		if !(!shiftIsBounded(v)) {
 21028  			break
 21029  		}
 21030  		v.reset(OpARM64CSEL)
 21031  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21032  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21033  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21034  		v1.AddArg(x)
 21035  		v0.AddArg2(v1, y)
 21036  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21037  		v2.AuxInt = int64ToAuxInt(0)
 21038  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21039  		v3.AuxInt = int64ToAuxInt(64)
 21040  		v3.AddArg(y)
 21041  		v.AddArg3(v0, v2, v3)
 21042  		return true
 21043  	}
 21044  	return false
 21045  }
 21046  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 21047  	v_1 := v.Args[1]
 21048  	v_0 := v.Args[0]
 21049  	b := v.Block
 21050  	typ := &b.Func.Config.Types
 21051  	// match: (Rsh32Ux8 <t> x y)
 21052  	// cond: shiftIsBounded(v)
 21053  	// result: (SRL <t> (ZeroExt32to64 x) y)
 21054  	for {
 21055  		t := v.Type
 21056  		x := v_0
 21057  		y := v_1
 21058  		if !(shiftIsBounded(v)) {
 21059  			break
 21060  		}
 21061  		v.reset(OpARM64SRL)
 21062  		v.Type = t
 21063  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21064  		v0.AddArg(x)
 21065  		v.AddArg2(v0, y)
 21066  		return true
 21067  	}
 21068  	// match: (Rsh32Ux8 <t> x y)
 21069  	// cond: !shiftIsBounded(v)
 21070  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21071  	for {
 21072  		t := v.Type
 21073  		x := v_0
 21074  		y := v_1
 21075  		if !(!shiftIsBounded(v)) {
 21076  			break
 21077  		}
 21078  		v.reset(OpARM64CSEL)
 21079  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21080  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21081  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21082  		v1.AddArg(x)
 21083  		v0.AddArg2(v1, y)
 21084  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21085  		v2.AuxInt = int64ToAuxInt(0)
 21086  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21087  		v3.AuxInt = int64ToAuxInt(64)
 21088  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21089  		v4.AddArg(y)
 21090  		v3.AddArg(v4)
 21091  		v.AddArg3(v0, v2, v3)
 21092  		return true
 21093  	}
 21094  	return false
 21095  }
 21096  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 21097  	v_1 := v.Args[1]
 21098  	v_0 := v.Args[0]
 21099  	b := v.Block
 21100  	typ := &b.Func.Config.Types
 21101  	// match: (Rsh32x16 <t> x y)
 21102  	// cond: shiftIsBounded(v)
 21103  	// result: (SRA <t> (SignExt32to64 x) y)
 21104  	for {
 21105  		t := v.Type
 21106  		x := v_0
 21107  		y := v_1
 21108  		if !(shiftIsBounded(v)) {
 21109  			break
 21110  		}
 21111  		v.reset(OpARM64SRA)
 21112  		v.Type = t
 21113  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21114  		v0.AddArg(x)
 21115  		v.AddArg2(v0, y)
 21116  		return true
 21117  	}
 21118  	// match: (Rsh32x16 x y)
 21119  	// cond: !shiftIsBounded(v)
 21120  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21121  	for {
 21122  		x := v_0
 21123  		y := v_1
 21124  		if !(!shiftIsBounded(v)) {
 21125  			break
 21126  		}
 21127  		v.reset(OpARM64SRA)
 21128  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21129  		v0.AddArg(x)
 21130  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21131  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21132  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21133  		v2.AuxInt = int64ToAuxInt(63)
 21134  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21135  		v3.AuxInt = int64ToAuxInt(64)
 21136  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21137  		v4.AddArg(y)
 21138  		v3.AddArg(v4)
 21139  		v1.AddArg3(y, v2, v3)
 21140  		v.AddArg2(v0, v1)
 21141  		return true
 21142  	}
 21143  	return false
 21144  }
 21145  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 21146  	v_1 := v.Args[1]
 21147  	v_0 := v.Args[0]
 21148  	b := v.Block
 21149  	typ := &b.Func.Config.Types
 21150  	// match: (Rsh32x32 <t> x y)
 21151  	// cond: shiftIsBounded(v)
 21152  	// result: (SRA <t> (SignExt32to64 x) y)
 21153  	for {
 21154  		t := v.Type
 21155  		x := v_0
 21156  		y := v_1
 21157  		if !(shiftIsBounded(v)) {
 21158  			break
 21159  		}
 21160  		v.reset(OpARM64SRA)
 21161  		v.Type = t
 21162  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21163  		v0.AddArg(x)
 21164  		v.AddArg2(v0, y)
 21165  		return true
 21166  	}
 21167  	// match: (Rsh32x32 x y)
 21168  	// cond: !shiftIsBounded(v)
 21169  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21170  	for {
 21171  		x := v_0
 21172  		y := v_1
 21173  		if !(!shiftIsBounded(v)) {
 21174  			break
 21175  		}
 21176  		v.reset(OpARM64SRA)
 21177  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21178  		v0.AddArg(x)
 21179  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21180  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21181  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21182  		v2.AuxInt = int64ToAuxInt(63)
 21183  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21184  		v3.AuxInt = int64ToAuxInt(64)
 21185  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21186  		v4.AddArg(y)
 21187  		v3.AddArg(v4)
 21188  		v1.AddArg3(y, v2, v3)
 21189  		v.AddArg2(v0, v1)
 21190  		return true
 21191  	}
 21192  	return false
 21193  }
 21194  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 21195  	v_1 := v.Args[1]
 21196  	v_0 := v.Args[0]
 21197  	b := v.Block
 21198  	typ := &b.Func.Config.Types
 21199  	// match: (Rsh32x64 <t> x y)
 21200  	// cond: shiftIsBounded(v)
 21201  	// result: (SRA <t> (SignExt32to64 x) y)
 21202  	for {
 21203  		t := v.Type
 21204  		x := v_0
 21205  		y := v_1
 21206  		if !(shiftIsBounded(v)) {
 21207  			break
 21208  		}
 21209  		v.reset(OpARM64SRA)
 21210  		v.Type = t
 21211  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21212  		v0.AddArg(x)
 21213  		v.AddArg2(v0, y)
 21214  		return true
 21215  	}
 21216  	// match: (Rsh32x64 x y)
 21217  	// cond: !shiftIsBounded(v)
 21218  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21219  	for {
 21220  		x := v_0
 21221  		y := v_1
 21222  		if !(!shiftIsBounded(v)) {
 21223  			break
 21224  		}
 21225  		v.reset(OpARM64SRA)
 21226  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21227  		v0.AddArg(x)
 21228  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21229  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21230  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21231  		v2.AuxInt = int64ToAuxInt(63)
 21232  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21233  		v3.AuxInt = int64ToAuxInt(64)
 21234  		v3.AddArg(y)
 21235  		v1.AddArg3(y, v2, v3)
 21236  		v.AddArg2(v0, v1)
 21237  		return true
 21238  	}
 21239  	return false
 21240  }
 21241  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 21242  	v_1 := v.Args[1]
 21243  	v_0 := v.Args[0]
 21244  	b := v.Block
 21245  	typ := &b.Func.Config.Types
 21246  	// match: (Rsh32x8 <t> x y)
 21247  	// cond: shiftIsBounded(v)
 21248  	// result: (SRA <t> (SignExt32to64 x) y)
 21249  	for {
 21250  		t := v.Type
 21251  		x := v_0
 21252  		y := v_1
 21253  		if !(shiftIsBounded(v)) {
 21254  			break
 21255  		}
 21256  		v.reset(OpARM64SRA)
 21257  		v.Type = t
 21258  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21259  		v0.AddArg(x)
 21260  		v.AddArg2(v0, y)
 21261  		return true
 21262  	}
 21263  	// match: (Rsh32x8 x y)
 21264  	// cond: !shiftIsBounded(v)
 21265  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21266  	for {
 21267  		x := v_0
 21268  		y := v_1
 21269  		if !(!shiftIsBounded(v)) {
 21270  			break
 21271  		}
 21272  		v.reset(OpARM64SRA)
 21273  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 21274  		v0.AddArg(x)
 21275  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21276  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21277  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21278  		v2.AuxInt = int64ToAuxInt(63)
 21279  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21280  		v3.AuxInt = int64ToAuxInt(64)
 21281  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21282  		v4.AddArg(y)
 21283  		v3.AddArg(v4)
 21284  		v1.AddArg3(y, v2, v3)
 21285  		v.AddArg2(v0, v1)
 21286  		return true
 21287  	}
 21288  	return false
 21289  }
 21290  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 21291  	v_1 := v.Args[1]
 21292  	v_0 := v.Args[0]
 21293  	b := v.Block
 21294  	typ := &b.Func.Config.Types
 21295  	// match: (Rsh64Ux16 <t> x y)
 21296  	// cond: shiftIsBounded(v)
 21297  	// result: (SRL <t> x y)
 21298  	for {
 21299  		t := v.Type
 21300  		x := v_0
 21301  		y := v_1
 21302  		if !(shiftIsBounded(v)) {
 21303  			break
 21304  		}
 21305  		v.reset(OpARM64SRL)
 21306  		v.Type = t
 21307  		v.AddArg2(x, y)
 21308  		return true
 21309  	}
 21310  	// match: (Rsh64Ux16 <t> x y)
 21311  	// cond: !shiftIsBounded(v)
 21312  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21313  	for {
 21314  		t := v.Type
 21315  		x := v_0
 21316  		y := v_1
 21317  		if !(!shiftIsBounded(v)) {
 21318  			break
 21319  		}
 21320  		v.reset(OpARM64CSEL)
 21321  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21322  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21323  		v0.AddArg2(x, y)
 21324  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21325  		v1.AuxInt = int64ToAuxInt(0)
 21326  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21327  		v2.AuxInt = int64ToAuxInt(64)
 21328  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21329  		v3.AddArg(y)
 21330  		v2.AddArg(v3)
 21331  		v.AddArg3(v0, v1, v2)
 21332  		return true
 21333  	}
 21334  	return false
 21335  }
 21336  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 21337  	v_1 := v.Args[1]
 21338  	v_0 := v.Args[0]
 21339  	b := v.Block
 21340  	typ := &b.Func.Config.Types
 21341  	// match: (Rsh64Ux32 <t> x y)
 21342  	// cond: shiftIsBounded(v)
 21343  	// result: (SRL <t> x y)
 21344  	for {
 21345  		t := v.Type
 21346  		x := v_0
 21347  		y := v_1
 21348  		if !(shiftIsBounded(v)) {
 21349  			break
 21350  		}
 21351  		v.reset(OpARM64SRL)
 21352  		v.Type = t
 21353  		v.AddArg2(x, y)
 21354  		return true
 21355  	}
 21356  	// match: (Rsh64Ux32 <t> x y)
 21357  	// cond: !shiftIsBounded(v)
 21358  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21359  	for {
 21360  		t := v.Type
 21361  		x := v_0
 21362  		y := v_1
 21363  		if !(!shiftIsBounded(v)) {
 21364  			break
 21365  		}
 21366  		v.reset(OpARM64CSEL)
 21367  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21368  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21369  		v0.AddArg2(x, y)
 21370  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21371  		v1.AuxInt = int64ToAuxInt(0)
 21372  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21373  		v2.AuxInt = int64ToAuxInt(64)
 21374  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21375  		v3.AddArg(y)
 21376  		v2.AddArg(v3)
 21377  		v.AddArg3(v0, v1, v2)
 21378  		return true
 21379  	}
 21380  	return false
 21381  }
 21382  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 21383  	v_1 := v.Args[1]
 21384  	v_0 := v.Args[0]
 21385  	b := v.Block
 21386  	// match: (Rsh64Ux64 <t> x y)
 21387  	// cond: shiftIsBounded(v)
 21388  	// result: (SRL <t> x y)
 21389  	for {
 21390  		t := v.Type
 21391  		x := v_0
 21392  		y := v_1
 21393  		if !(shiftIsBounded(v)) {
 21394  			break
 21395  		}
 21396  		v.reset(OpARM64SRL)
 21397  		v.Type = t
 21398  		v.AddArg2(x, y)
 21399  		return true
 21400  	}
 21401  	// match: (Rsh64Ux64 <t> x y)
 21402  	// cond: !shiftIsBounded(v)
 21403  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 21404  	for {
 21405  		t := v.Type
 21406  		x := v_0
 21407  		y := v_1
 21408  		if !(!shiftIsBounded(v)) {
 21409  			break
 21410  		}
 21411  		v.reset(OpARM64CSEL)
 21412  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21413  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21414  		v0.AddArg2(x, y)
 21415  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21416  		v1.AuxInt = int64ToAuxInt(0)
 21417  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21418  		v2.AuxInt = int64ToAuxInt(64)
 21419  		v2.AddArg(y)
 21420  		v.AddArg3(v0, v1, v2)
 21421  		return true
 21422  	}
 21423  	return false
 21424  }
 21425  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 21426  	v_1 := v.Args[1]
 21427  	v_0 := v.Args[0]
 21428  	b := v.Block
 21429  	typ := &b.Func.Config.Types
 21430  	// match: (Rsh64Ux8 <t> x y)
 21431  	// cond: shiftIsBounded(v)
 21432  	// result: (SRL <t> x y)
 21433  	for {
 21434  		t := v.Type
 21435  		x := v_0
 21436  		y := v_1
 21437  		if !(shiftIsBounded(v)) {
 21438  			break
 21439  		}
 21440  		v.reset(OpARM64SRL)
 21441  		v.Type = t
 21442  		v.AddArg2(x, y)
 21443  		return true
 21444  	}
 21445  	// match: (Rsh64Ux8 <t> x y)
 21446  	// cond: !shiftIsBounded(v)
 21447  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21448  	for {
 21449  		t := v.Type
 21450  		x := v_0
 21451  		y := v_1
 21452  		if !(!shiftIsBounded(v)) {
 21453  			break
 21454  		}
 21455  		v.reset(OpARM64CSEL)
 21456  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21457  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21458  		v0.AddArg2(x, y)
 21459  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 21460  		v1.AuxInt = int64ToAuxInt(0)
 21461  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21462  		v2.AuxInt = int64ToAuxInt(64)
 21463  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21464  		v3.AddArg(y)
 21465  		v2.AddArg(v3)
 21466  		v.AddArg3(v0, v1, v2)
 21467  		return true
 21468  	}
 21469  	return false
 21470  }
 21471  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 21472  	v_1 := v.Args[1]
 21473  	v_0 := v.Args[0]
 21474  	b := v.Block
 21475  	typ := &b.Func.Config.Types
 21476  	// match: (Rsh64x16 <t> x y)
 21477  	// cond: shiftIsBounded(v)
 21478  	// result: (SRA <t> x y)
 21479  	for {
 21480  		t := v.Type
 21481  		x := v_0
 21482  		y := v_1
 21483  		if !(shiftIsBounded(v)) {
 21484  			break
 21485  		}
 21486  		v.reset(OpARM64SRA)
 21487  		v.Type = t
 21488  		v.AddArg2(x, y)
 21489  		return true
 21490  	}
 21491  	// match: (Rsh64x16 x y)
 21492  	// cond: !shiftIsBounded(v)
 21493  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21494  	for {
 21495  		x := v_0
 21496  		y := v_1
 21497  		if !(!shiftIsBounded(v)) {
 21498  			break
 21499  		}
 21500  		v.reset(OpARM64SRA)
 21501  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21502  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21503  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21504  		v1.AuxInt = int64ToAuxInt(63)
 21505  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21506  		v2.AuxInt = int64ToAuxInt(64)
 21507  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21508  		v3.AddArg(y)
 21509  		v2.AddArg(v3)
 21510  		v0.AddArg3(y, v1, v2)
 21511  		v.AddArg2(x, v0)
 21512  		return true
 21513  	}
 21514  	return false
 21515  }
 21516  func rewriteValueARM64_OpRsh64x32(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: (Rsh64x32 <t> x y)
 21522  	// cond: shiftIsBounded(v)
 21523  	// result: (SRA <t> 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  		v.AddArg2(x, y)
 21534  		return true
 21535  	}
 21536  	// match: (Rsh64x32 x y)
 21537  	// cond: !shiftIsBounded(v)
 21538  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21539  	for {
 21540  		x := v_0
 21541  		y := v_1
 21542  		if !(!shiftIsBounded(v)) {
 21543  			break
 21544  		}
 21545  		v.reset(OpARM64SRA)
 21546  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21547  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21548  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21549  		v1.AuxInt = int64ToAuxInt(63)
 21550  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21551  		v2.AuxInt = int64ToAuxInt(64)
 21552  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21553  		v3.AddArg(y)
 21554  		v2.AddArg(v3)
 21555  		v0.AddArg3(y, v1, v2)
 21556  		v.AddArg2(x, v0)
 21557  		return true
 21558  	}
 21559  	return false
 21560  }
 21561  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 21562  	v_1 := v.Args[1]
 21563  	v_0 := v.Args[0]
 21564  	b := v.Block
 21565  	// match: (Rsh64x64 <t> x y)
 21566  	// cond: shiftIsBounded(v)
 21567  	// result: (SRA <t> x y)
 21568  	for {
 21569  		t := v.Type
 21570  		x := v_0
 21571  		y := v_1
 21572  		if !(shiftIsBounded(v)) {
 21573  			break
 21574  		}
 21575  		v.reset(OpARM64SRA)
 21576  		v.Type = t
 21577  		v.AddArg2(x, y)
 21578  		return true
 21579  	}
 21580  	// match: (Rsh64x64 x y)
 21581  	// cond: !shiftIsBounded(v)
 21582  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21583  	for {
 21584  		x := v_0
 21585  		y := v_1
 21586  		if !(!shiftIsBounded(v)) {
 21587  			break
 21588  		}
 21589  		v.reset(OpARM64SRA)
 21590  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21591  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21592  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21593  		v1.AuxInt = int64ToAuxInt(63)
 21594  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21595  		v2.AuxInt = int64ToAuxInt(64)
 21596  		v2.AddArg(y)
 21597  		v0.AddArg3(y, v1, v2)
 21598  		v.AddArg2(x, v0)
 21599  		return true
 21600  	}
 21601  	return false
 21602  }
 21603  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 21604  	v_1 := v.Args[1]
 21605  	v_0 := v.Args[0]
 21606  	b := v.Block
 21607  	typ := &b.Func.Config.Types
 21608  	// match: (Rsh64x8 <t> x y)
 21609  	// cond: shiftIsBounded(v)
 21610  	// result: (SRA <t> x y)
 21611  	for {
 21612  		t := v.Type
 21613  		x := v_0
 21614  		y := v_1
 21615  		if !(shiftIsBounded(v)) {
 21616  			break
 21617  		}
 21618  		v.reset(OpARM64SRA)
 21619  		v.Type = t
 21620  		v.AddArg2(x, y)
 21621  		return true
 21622  	}
 21623  	// match: (Rsh64x8 x y)
 21624  	// cond: !shiftIsBounded(v)
 21625  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21626  	for {
 21627  		x := v_0
 21628  		y := v_1
 21629  		if !(!shiftIsBounded(v)) {
 21630  			break
 21631  		}
 21632  		v.reset(OpARM64SRA)
 21633  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21634  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21635  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21636  		v1.AuxInt = int64ToAuxInt(63)
 21637  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21638  		v2.AuxInt = int64ToAuxInt(64)
 21639  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21640  		v3.AddArg(y)
 21641  		v2.AddArg(v3)
 21642  		v0.AddArg3(y, v1, v2)
 21643  		v.AddArg2(x, v0)
 21644  		return true
 21645  	}
 21646  	return false
 21647  }
 21648  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 21649  	v_1 := v.Args[1]
 21650  	v_0 := v.Args[0]
 21651  	b := v.Block
 21652  	typ := &b.Func.Config.Types
 21653  	// match: (Rsh8Ux16 <t> x y)
 21654  	// cond: shiftIsBounded(v)
 21655  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21656  	for {
 21657  		t := v.Type
 21658  		x := v_0
 21659  		y := v_1
 21660  		if !(shiftIsBounded(v)) {
 21661  			break
 21662  		}
 21663  		v.reset(OpARM64SRL)
 21664  		v.Type = t
 21665  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21666  		v0.AddArg(x)
 21667  		v.AddArg2(v0, y)
 21668  		return true
 21669  	}
 21670  	// match: (Rsh8Ux16 <t> x y)
 21671  	// cond: !shiftIsBounded(v)
 21672  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21673  	for {
 21674  		t := v.Type
 21675  		x := v_0
 21676  		y := v_1
 21677  		if !(!shiftIsBounded(v)) {
 21678  			break
 21679  		}
 21680  		v.reset(OpARM64CSEL)
 21681  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21682  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21683  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21684  		v1.AddArg(x)
 21685  		v0.AddArg2(v1, y)
 21686  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21687  		v2.AuxInt = int64ToAuxInt(0)
 21688  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21689  		v3.AuxInt = int64ToAuxInt(64)
 21690  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21691  		v4.AddArg(y)
 21692  		v3.AddArg(v4)
 21693  		v.AddArg3(v0, v2, v3)
 21694  		return true
 21695  	}
 21696  	return false
 21697  }
 21698  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 21699  	v_1 := v.Args[1]
 21700  	v_0 := v.Args[0]
 21701  	b := v.Block
 21702  	typ := &b.Func.Config.Types
 21703  	// match: (Rsh8Ux32 <t> x y)
 21704  	// cond: shiftIsBounded(v)
 21705  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21706  	for {
 21707  		t := v.Type
 21708  		x := v_0
 21709  		y := v_1
 21710  		if !(shiftIsBounded(v)) {
 21711  			break
 21712  		}
 21713  		v.reset(OpARM64SRL)
 21714  		v.Type = t
 21715  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21716  		v0.AddArg(x)
 21717  		v.AddArg2(v0, y)
 21718  		return true
 21719  	}
 21720  	// match: (Rsh8Ux32 <t> x y)
 21721  	// cond: !shiftIsBounded(v)
 21722  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21723  	for {
 21724  		t := v.Type
 21725  		x := v_0
 21726  		y := v_1
 21727  		if !(!shiftIsBounded(v)) {
 21728  			break
 21729  		}
 21730  		v.reset(OpARM64CSEL)
 21731  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21732  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21733  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21734  		v1.AddArg(x)
 21735  		v0.AddArg2(v1, y)
 21736  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21737  		v2.AuxInt = int64ToAuxInt(0)
 21738  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21739  		v3.AuxInt = int64ToAuxInt(64)
 21740  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21741  		v4.AddArg(y)
 21742  		v3.AddArg(v4)
 21743  		v.AddArg3(v0, v2, v3)
 21744  		return true
 21745  	}
 21746  	return false
 21747  }
 21748  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 21749  	v_1 := v.Args[1]
 21750  	v_0 := v.Args[0]
 21751  	b := v.Block
 21752  	typ := &b.Func.Config.Types
 21753  	// match: (Rsh8Ux64 <t> x y)
 21754  	// cond: shiftIsBounded(v)
 21755  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21756  	for {
 21757  		t := v.Type
 21758  		x := v_0
 21759  		y := v_1
 21760  		if !(shiftIsBounded(v)) {
 21761  			break
 21762  		}
 21763  		v.reset(OpARM64SRL)
 21764  		v.Type = t
 21765  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21766  		v0.AddArg(x)
 21767  		v.AddArg2(v0, y)
 21768  		return true
 21769  	}
 21770  	// match: (Rsh8Ux64 <t> x y)
 21771  	// cond: !shiftIsBounded(v)
 21772  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 21773  	for {
 21774  		t := v.Type
 21775  		x := v_0
 21776  		y := v_1
 21777  		if !(!shiftIsBounded(v)) {
 21778  			break
 21779  		}
 21780  		v.reset(OpARM64CSEL)
 21781  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21782  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21783  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21784  		v1.AddArg(x)
 21785  		v0.AddArg2(v1, y)
 21786  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21787  		v2.AuxInt = int64ToAuxInt(0)
 21788  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21789  		v3.AuxInt = int64ToAuxInt(64)
 21790  		v3.AddArg(y)
 21791  		v.AddArg3(v0, v2, v3)
 21792  		return true
 21793  	}
 21794  	return false
 21795  }
 21796  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 21797  	v_1 := v.Args[1]
 21798  	v_0 := v.Args[0]
 21799  	b := v.Block
 21800  	typ := &b.Func.Config.Types
 21801  	// match: (Rsh8Ux8 <t> x y)
 21802  	// cond: shiftIsBounded(v)
 21803  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21804  	for {
 21805  		t := v.Type
 21806  		x := v_0
 21807  		y := v_1
 21808  		if !(shiftIsBounded(v)) {
 21809  			break
 21810  		}
 21811  		v.reset(OpARM64SRL)
 21812  		v.Type = t
 21813  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21814  		v0.AddArg(x)
 21815  		v.AddArg2(v0, y)
 21816  		return true
 21817  	}
 21818  	// match: (Rsh8Ux8 <t> x y)
 21819  	// cond: !shiftIsBounded(v)
 21820  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21821  	for {
 21822  		t := v.Type
 21823  		x := v_0
 21824  		y := v_1
 21825  		if !(!shiftIsBounded(v)) {
 21826  			break
 21827  		}
 21828  		v.reset(OpARM64CSEL)
 21829  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21830  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21831  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21832  		v1.AddArg(x)
 21833  		v0.AddArg2(v1, y)
 21834  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21835  		v2.AuxInt = int64ToAuxInt(0)
 21836  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21837  		v3.AuxInt = int64ToAuxInt(64)
 21838  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21839  		v4.AddArg(y)
 21840  		v3.AddArg(v4)
 21841  		v.AddArg3(v0, v2, v3)
 21842  		return true
 21843  	}
 21844  	return false
 21845  }
 21846  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 21847  	v_1 := v.Args[1]
 21848  	v_0 := v.Args[0]
 21849  	b := v.Block
 21850  	typ := &b.Func.Config.Types
 21851  	// match: (Rsh8x16 <t> x y)
 21852  	// cond: shiftIsBounded(v)
 21853  	// result: (SRA <t> (SignExt8to64 x) y)
 21854  	for {
 21855  		t := v.Type
 21856  		x := v_0
 21857  		y := v_1
 21858  		if !(shiftIsBounded(v)) {
 21859  			break
 21860  		}
 21861  		v.reset(OpARM64SRA)
 21862  		v.Type = t
 21863  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21864  		v0.AddArg(x)
 21865  		v.AddArg2(v0, y)
 21866  		return true
 21867  	}
 21868  	// match: (Rsh8x16 x y)
 21869  	// cond: !shiftIsBounded(v)
 21870  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21871  	for {
 21872  		x := v_0
 21873  		y := v_1
 21874  		if !(!shiftIsBounded(v)) {
 21875  			break
 21876  		}
 21877  		v.reset(OpARM64SRA)
 21878  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21879  		v0.AddArg(x)
 21880  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21881  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21882  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21883  		v2.AuxInt = int64ToAuxInt(63)
 21884  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21885  		v3.AuxInt = int64ToAuxInt(64)
 21886  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21887  		v4.AddArg(y)
 21888  		v3.AddArg(v4)
 21889  		v1.AddArg3(y, v2, v3)
 21890  		v.AddArg2(v0, v1)
 21891  		return true
 21892  	}
 21893  	return false
 21894  }
 21895  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 21896  	v_1 := v.Args[1]
 21897  	v_0 := v.Args[0]
 21898  	b := v.Block
 21899  	typ := &b.Func.Config.Types
 21900  	// match: (Rsh8x32 <t> x y)
 21901  	// cond: shiftIsBounded(v)
 21902  	// result: (SRA <t> (SignExt8to64 x) y)
 21903  	for {
 21904  		t := v.Type
 21905  		x := v_0
 21906  		y := v_1
 21907  		if !(shiftIsBounded(v)) {
 21908  			break
 21909  		}
 21910  		v.reset(OpARM64SRA)
 21911  		v.Type = t
 21912  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21913  		v0.AddArg(x)
 21914  		v.AddArg2(v0, y)
 21915  		return true
 21916  	}
 21917  	// match: (Rsh8x32 x y)
 21918  	// cond: !shiftIsBounded(v)
 21919  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21920  	for {
 21921  		x := v_0
 21922  		y := v_1
 21923  		if !(!shiftIsBounded(v)) {
 21924  			break
 21925  		}
 21926  		v.reset(OpARM64SRA)
 21927  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21928  		v0.AddArg(x)
 21929  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21930  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21931  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21932  		v2.AuxInt = int64ToAuxInt(63)
 21933  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21934  		v3.AuxInt = int64ToAuxInt(64)
 21935  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21936  		v4.AddArg(y)
 21937  		v3.AddArg(v4)
 21938  		v1.AddArg3(y, v2, v3)
 21939  		v.AddArg2(v0, v1)
 21940  		return true
 21941  	}
 21942  	return false
 21943  }
 21944  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 21945  	v_1 := v.Args[1]
 21946  	v_0 := v.Args[0]
 21947  	b := v.Block
 21948  	typ := &b.Func.Config.Types
 21949  	// match: (Rsh8x64 <t> x y)
 21950  	// cond: shiftIsBounded(v)
 21951  	// result: (SRA <t> (SignExt8to64 x) y)
 21952  	for {
 21953  		t := v.Type
 21954  		x := v_0
 21955  		y := v_1
 21956  		if !(shiftIsBounded(v)) {
 21957  			break
 21958  		}
 21959  		v.reset(OpARM64SRA)
 21960  		v.Type = t
 21961  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21962  		v0.AddArg(x)
 21963  		v.AddArg2(v0, y)
 21964  		return true
 21965  	}
 21966  	// match: (Rsh8x64 x y)
 21967  	// cond: !shiftIsBounded(v)
 21968  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21969  	for {
 21970  		x := v_0
 21971  		y := v_1
 21972  		if !(!shiftIsBounded(v)) {
 21973  			break
 21974  		}
 21975  		v.reset(OpARM64SRA)
 21976  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21977  		v0.AddArg(x)
 21978  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21979  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21980  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21981  		v2.AuxInt = int64ToAuxInt(63)
 21982  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21983  		v3.AuxInt = int64ToAuxInt(64)
 21984  		v3.AddArg(y)
 21985  		v1.AddArg3(y, v2, v3)
 21986  		v.AddArg2(v0, v1)
 21987  		return true
 21988  	}
 21989  	return false
 21990  }
 21991  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 21992  	v_1 := v.Args[1]
 21993  	v_0 := v.Args[0]
 21994  	b := v.Block
 21995  	typ := &b.Func.Config.Types
 21996  	// match: (Rsh8x8 <t> x y)
 21997  	// cond: shiftIsBounded(v)
 21998  	// result: (SRA <t> (SignExt8to64 x) y)
 21999  	for {
 22000  		t := v.Type
 22001  		x := v_0
 22002  		y := v_1
 22003  		if !(shiftIsBounded(v)) {
 22004  			break
 22005  		}
 22006  		v.reset(OpARM64SRA)
 22007  		v.Type = t
 22008  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22009  		v0.AddArg(x)
 22010  		v.AddArg2(v0, y)
 22011  		return true
 22012  	}
 22013  	// match: (Rsh8x8 x y)
 22014  	// cond: !shiftIsBounded(v)
 22015  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 22016  	for {
 22017  		x := v_0
 22018  		y := v_1
 22019  		if !(!shiftIsBounded(v)) {
 22020  			break
 22021  		}
 22022  		v.reset(OpARM64SRA)
 22023  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22024  		v0.AddArg(x)
 22025  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22026  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22027  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22028  		v2.AuxInt = int64ToAuxInt(63)
 22029  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22030  		v3.AuxInt = int64ToAuxInt(64)
 22031  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22032  		v4.AddArg(y)
 22033  		v3.AddArg(v4)
 22034  		v1.AddArg3(y, v2, v3)
 22035  		v.AddArg2(v0, v1)
 22036  		return true
 22037  	}
 22038  	return false
 22039  }
 22040  func rewriteValueARM64_OpSelect0(v *Value) bool {
 22041  	v_0 := v.Args[0]
 22042  	b := v.Block
 22043  	typ := &b.Func.Config.Types
 22044  	// match: (Select0 (Mul64uhilo x y))
 22045  	// result: (UMULH x y)
 22046  	for {
 22047  		if v_0.Op != OpMul64uhilo {
 22048  			break
 22049  		}
 22050  		y := v_0.Args[1]
 22051  		x := v_0.Args[0]
 22052  		v.reset(OpARM64UMULH)
 22053  		v.AddArg2(x, y)
 22054  		return true
 22055  	}
 22056  	// match: (Select0 (Add64carry x y c))
 22057  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 22058  	for {
 22059  		if v_0.Op != OpAdd64carry {
 22060  			break
 22061  		}
 22062  		c := v_0.Args[2]
 22063  		x := v_0.Args[0]
 22064  		y := v_0.Args[1]
 22065  		v.reset(OpSelect0)
 22066  		v.Type = typ.UInt64
 22067  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22068  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 22069  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22070  		v2.AuxInt = int64ToAuxInt(-1)
 22071  		v2.AddArg(c)
 22072  		v1.AddArg(v2)
 22073  		v0.AddArg3(x, y, v1)
 22074  		v.AddArg(v0)
 22075  		return true
 22076  	}
 22077  	// match: (Select0 (Sub64borrow x y bo))
 22078  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 22079  	for {
 22080  		if v_0.Op != OpSub64borrow {
 22081  			break
 22082  		}
 22083  		bo := v_0.Args[2]
 22084  		x := v_0.Args[0]
 22085  		y := v_0.Args[1]
 22086  		v.reset(OpSelect0)
 22087  		v.Type = typ.UInt64
 22088  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22089  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 22090  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22091  		v2.AddArg(bo)
 22092  		v1.AddArg(v2)
 22093  		v0.AddArg3(x, y, v1)
 22094  		v.AddArg(v0)
 22095  		return true
 22096  	}
 22097  	// match: (Select0 (Mul64uover x y))
 22098  	// result: (MUL x y)
 22099  	for {
 22100  		if v_0.Op != OpMul64uover {
 22101  			break
 22102  		}
 22103  		y := v_0.Args[1]
 22104  		x := v_0.Args[0]
 22105  		v.reset(OpARM64MUL)
 22106  		v.AddArg2(x, y)
 22107  		return true
 22108  	}
 22109  	return false
 22110  }
 22111  func rewriteValueARM64_OpSelect1(v *Value) bool {
 22112  	v_0 := v.Args[0]
 22113  	b := v.Block
 22114  	typ := &b.Func.Config.Types
 22115  	// match: (Select1 (Mul64uhilo x y))
 22116  	// result: (MUL x y)
 22117  	for {
 22118  		if v_0.Op != OpMul64uhilo {
 22119  			break
 22120  		}
 22121  		y := v_0.Args[1]
 22122  		x := v_0.Args[0]
 22123  		v.reset(OpARM64MUL)
 22124  		v.AddArg2(x, y)
 22125  		return true
 22126  	}
 22127  	// match: (Select1 (Add64carry x y c))
 22128  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 22129  	for {
 22130  		if v_0.Op != OpAdd64carry {
 22131  			break
 22132  		}
 22133  		c := v_0.Args[2]
 22134  		x := v_0.Args[0]
 22135  		y := v_0.Args[1]
 22136  		v.reset(OpARM64ADCzerocarry)
 22137  		v.Type = typ.UInt64
 22138  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 22139  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22140  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 22141  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22142  		v3.AuxInt = int64ToAuxInt(-1)
 22143  		v3.AddArg(c)
 22144  		v2.AddArg(v3)
 22145  		v1.AddArg3(x, y, v2)
 22146  		v0.AddArg(v1)
 22147  		v.AddArg(v0)
 22148  		return true
 22149  	}
 22150  	// match: (Select1 (Sub64borrow x y bo))
 22151  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 22152  	for {
 22153  		if v_0.Op != OpSub64borrow {
 22154  			break
 22155  		}
 22156  		bo := v_0.Args[2]
 22157  		x := v_0.Args[0]
 22158  		y := v_0.Args[1]
 22159  		v.reset(OpARM64NEG)
 22160  		v.Type = typ.UInt64
 22161  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 22162  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 22163  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22164  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 22165  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 22166  		v4.AddArg(bo)
 22167  		v3.AddArg(v4)
 22168  		v2.AddArg3(x, y, v3)
 22169  		v1.AddArg(v2)
 22170  		v0.AddArg(v1)
 22171  		v.AddArg(v0)
 22172  		return true
 22173  	}
 22174  	// match: (Select1 (Mul64uover x y))
 22175  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 22176  	for {
 22177  		if v_0.Op != OpMul64uover {
 22178  			break
 22179  		}
 22180  		y := v_0.Args[1]
 22181  		x := v_0.Args[0]
 22182  		v.reset(OpARM64NotEqual)
 22183  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22184  		v0.AuxInt = int64ToAuxInt(0)
 22185  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 22186  		v1.AddArg2(x, y)
 22187  		v0.AddArg(v1)
 22188  		v.AddArg(v0)
 22189  		return true
 22190  	}
 22191  	return false
 22192  }
 22193  func rewriteValueARM64_OpSelectN(v *Value) bool {
 22194  	v_0 := v.Args[0]
 22195  	b := v.Block
 22196  	config := b.Func.Config
 22197  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 22198  	// 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)
 22199  	// result: (Move [sz] dst src mem)
 22200  	for {
 22201  		if auxIntToInt64(v.AuxInt) != 0 {
 22202  			break
 22203  		}
 22204  		call := v_0
 22205  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 22206  			break
 22207  		}
 22208  		sym := auxToCall(call.Aux)
 22209  		s1 := call.Args[0]
 22210  		if s1.Op != OpARM64MOVDstore {
 22211  			break
 22212  		}
 22213  		_ = s1.Args[2]
 22214  		s1_1 := s1.Args[1]
 22215  		if s1_1.Op != OpARM64MOVDconst {
 22216  			break
 22217  		}
 22218  		sz := auxIntToInt64(s1_1.AuxInt)
 22219  		s2 := s1.Args[2]
 22220  		if s2.Op != OpARM64MOVDstore {
 22221  			break
 22222  		}
 22223  		_ = s2.Args[2]
 22224  		src := s2.Args[1]
 22225  		s3 := s2.Args[2]
 22226  		if s3.Op != OpARM64MOVDstore {
 22227  			break
 22228  		}
 22229  		mem := s3.Args[2]
 22230  		dst := s3.Args[1]
 22231  		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)) {
 22232  			break
 22233  		}
 22234  		v.reset(OpMove)
 22235  		v.AuxInt = int64ToAuxInt(sz)
 22236  		v.AddArg3(dst, src, mem)
 22237  		return true
 22238  	}
 22239  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 22240  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 22241  	// result: (Move [sz] dst src mem)
 22242  	for {
 22243  		if auxIntToInt64(v.AuxInt) != 0 {
 22244  			break
 22245  		}
 22246  		call := v_0
 22247  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 22248  			break
 22249  		}
 22250  		sym := auxToCall(call.Aux)
 22251  		mem := call.Args[3]
 22252  		dst := call.Args[0]
 22253  		src := call.Args[1]
 22254  		call_2 := call.Args[2]
 22255  		if call_2.Op != OpARM64MOVDconst {
 22256  			break
 22257  		}
 22258  		sz := auxIntToInt64(call_2.AuxInt)
 22259  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 22260  			break
 22261  		}
 22262  		v.reset(OpMove)
 22263  		v.AuxInt = int64ToAuxInt(sz)
 22264  		v.AddArg3(dst, src, mem)
 22265  		return true
 22266  	}
 22267  	return false
 22268  }
 22269  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 22270  	v_0 := v.Args[0]
 22271  	b := v.Block
 22272  	// match: (Slicemask <t> x)
 22273  	// result: (SRAconst (NEG <t> x) [63])
 22274  	for {
 22275  		t := v.Type
 22276  		x := v_0
 22277  		v.reset(OpARM64SRAconst)
 22278  		v.AuxInt = int64ToAuxInt(63)
 22279  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 22280  		v0.AddArg(x)
 22281  		v.AddArg(v0)
 22282  		return true
 22283  	}
 22284  }
 22285  func rewriteValueARM64_OpStore(v *Value) bool {
 22286  	v_2 := v.Args[2]
 22287  	v_1 := v.Args[1]
 22288  	v_0 := v.Args[0]
 22289  	// match: (Store {t} ptr val mem)
 22290  	// cond: t.Size() == 1
 22291  	// result: (MOVBstore ptr val mem)
 22292  	for {
 22293  		t := auxToType(v.Aux)
 22294  		ptr := v_0
 22295  		val := v_1
 22296  		mem := v_2
 22297  		if !(t.Size() == 1) {
 22298  			break
 22299  		}
 22300  		v.reset(OpARM64MOVBstore)
 22301  		v.AddArg3(ptr, val, mem)
 22302  		return true
 22303  	}
 22304  	// match: (Store {t} ptr val mem)
 22305  	// cond: t.Size() == 2
 22306  	// result: (MOVHstore ptr val mem)
 22307  	for {
 22308  		t := auxToType(v.Aux)
 22309  		ptr := v_0
 22310  		val := v_1
 22311  		mem := v_2
 22312  		if !(t.Size() == 2) {
 22313  			break
 22314  		}
 22315  		v.reset(OpARM64MOVHstore)
 22316  		v.AddArg3(ptr, val, mem)
 22317  		return true
 22318  	}
 22319  	// match: (Store {t} ptr val mem)
 22320  	// cond: t.Size() == 4 && !t.IsFloat()
 22321  	// result: (MOVWstore ptr val mem)
 22322  	for {
 22323  		t := auxToType(v.Aux)
 22324  		ptr := v_0
 22325  		val := v_1
 22326  		mem := v_2
 22327  		if !(t.Size() == 4 && !t.IsFloat()) {
 22328  			break
 22329  		}
 22330  		v.reset(OpARM64MOVWstore)
 22331  		v.AddArg3(ptr, val, mem)
 22332  		return true
 22333  	}
 22334  	// match: (Store {t} ptr val mem)
 22335  	// cond: t.Size() == 8 && !t.IsFloat()
 22336  	// result: (MOVDstore ptr val mem)
 22337  	for {
 22338  		t := auxToType(v.Aux)
 22339  		ptr := v_0
 22340  		val := v_1
 22341  		mem := v_2
 22342  		if !(t.Size() == 8 && !t.IsFloat()) {
 22343  			break
 22344  		}
 22345  		v.reset(OpARM64MOVDstore)
 22346  		v.AddArg3(ptr, val, mem)
 22347  		return true
 22348  	}
 22349  	// match: (Store {t} ptr val mem)
 22350  	// cond: t.Size() == 4 && t.IsFloat()
 22351  	// result: (FMOVSstore ptr val mem)
 22352  	for {
 22353  		t := auxToType(v.Aux)
 22354  		ptr := v_0
 22355  		val := v_1
 22356  		mem := v_2
 22357  		if !(t.Size() == 4 && t.IsFloat()) {
 22358  			break
 22359  		}
 22360  		v.reset(OpARM64FMOVSstore)
 22361  		v.AddArg3(ptr, val, mem)
 22362  		return true
 22363  	}
 22364  	// match: (Store {t} ptr val mem)
 22365  	// cond: t.Size() == 8 && t.IsFloat()
 22366  	// result: (FMOVDstore ptr val mem)
 22367  	for {
 22368  		t := auxToType(v.Aux)
 22369  		ptr := v_0
 22370  		val := v_1
 22371  		mem := v_2
 22372  		if !(t.Size() == 8 && t.IsFloat()) {
 22373  			break
 22374  		}
 22375  		v.reset(OpARM64FMOVDstore)
 22376  		v.AddArg3(ptr, val, mem)
 22377  		return true
 22378  	}
 22379  	return false
 22380  }
 22381  func rewriteValueARM64_OpZero(v *Value) bool {
 22382  	v_1 := v.Args[1]
 22383  	v_0 := v.Args[0]
 22384  	b := v.Block
 22385  	typ := &b.Func.Config.Types
 22386  	// match: (Zero [0] _ mem)
 22387  	// result: mem
 22388  	for {
 22389  		if auxIntToInt64(v.AuxInt) != 0 {
 22390  			break
 22391  		}
 22392  		mem := v_1
 22393  		v.copyOf(mem)
 22394  		return true
 22395  	}
 22396  	// match: (Zero [1] ptr mem)
 22397  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 22398  	for {
 22399  		if auxIntToInt64(v.AuxInt) != 1 {
 22400  			break
 22401  		}
 22402  		ptr := v_0
 22403  		mem := v_1
 22404  		v.reset(OpARM64MOVBstore)
 22405  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22406  		v0.AuxInt = int64ToAuxInt(0)
 22407  		v.AddArg3(ptr, v0, mem)
 22408  		return true
 22409  	}
 22410  	// match: (Zero [2] ptr mem)
 22411  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 22412  	for {
 22413  		if auxIntToInt64(v.AuxInt) != 2 {
 22414  			break
 22415  		}
 22416  		ptr := v_0
 22417  		mem := v_1
 22418  		v.reset(OpARM64MOVHstore)
 22419  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22420  		v0.AuxInt = int64ToAuxInt(0)
 22421  		v.AddArg3(ptr, v0, mem)
 22422  		return true
 22423  	}
 22424  	// match: (Zero [4] ptr mem)
 22425  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 22426  	for {
 22427  		if auxIntToInt64(v.AuxInt) != 4 {
 22428  			break
 22429  		}
 22430  		ptr := v_0
 22431  		mem := v_1
 22432  		v.reset(OpARM64MOVWstore)
 22433  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22434  		v0.AuxInt = int64ToAuxInt(0)
 22435  		v.AddArg3(ptr, v0, mem)
 22436  		return true
 22437  	}
 22438  	// match: (Zero [3] ptr mem)
 22439  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 22440  	for {
 22441  		if auxIntToInt64(v.AuxInt) != 3 {
 22442  			break
 22443  		}
 22444  		ptr := v_0
 22445  		mem := v_1
 22446  		v.reset(OpARM64MOVBstore)
 22447  		v.AuxInt = int32ToAuxInt(2)
 22448  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22449  		v0.AuxInt = int64ToAuxInt(0)
 22450  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 22451  		v1.AddArg3(ptr, v0, mem)
 22452  		v.AddArg3(ptr, v0, v1)
 22453  		return true
 22454  	}
 22455  	// match: (Zero [5] ptr mem)
 22456  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22457  	for {
 22458  		if auxIntToInt64(v.AuxInt) != 5 {
 22459  			break
 22460  		}
 22461  		ptr := v_0
 22462  		mem := v_1
 22463  		v.reset(OpARM64MOVBstore)
 22464  		v.AuxInt = int32ToAuxInt(4)
 22465  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22466  		v0.AuxInt = int64ToAuxInt(0)
 22467  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22468  		v1.AddArg3(ptr, v0, mem)
 22469  		v.AddArg3(ptr, v0, v1)
 22470  		return true
 22471  	}
 22472  	// match: (Zero [6] ptr mem)
 22473  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22474  	for {
 22475  		if auxIntToInt64(v.AuxInt) != 6 {
 22476  			break
 22477  		}
 22478  		ptr := v_0
 22479  		mem := v_1
 22480  		v.reset(OpARM64MOVHstore)
 22481  		v.AuxInt = int32ToAuxInt(4)
 22482  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22483  		v0.AuxInt = int64ToAuxInt(0)
 22484  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22485  		v1.AddArg3(ptr, v0, mem)
 22486  		v.AddArg3(ptr, v0, v1)
 22487  		return true
 22488  	}
 22489  	// match: (Zero [7] ptr mem)
 22490  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 22491  	for {
 22492  		if auxIntToInt64(v.AuxInt) != 7 {
 22493  			break
 22494  		}
 22495  		ptr := v_0
 22496  		mem := v_1
 22497  		v.reset(OpARM64MOVWstore)
 22498  		v.AuxInt = int32ToAuxInt(3)
 22499  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22500  		v0.AuxInt = int64ToAuxInt(0)
 22501  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 22502  		v1.AddArg3(ptr, v0, mem)
 22503  		v.AddArg3(ptr, v0, v1)
 22504  		return true
 22505  	}
 22506  	// match: (Zero [8] ptr mem)
 22507  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 22508  	for {
 22509  		if auxIntToInt64(v.AuxInt) != 8 {
 22510  			break
 22511  		}
 22512  		ptr := v_0
 22513  		mem := v_1
 22514  		v.reset(OpARM64MOVDstore)
 22515  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22516  		v0.AuxInt = int64ToAuxInt(0)
 22517  		v.AddArg3(ptr, v0, mem)
 22518  		return true
 22519  	}
 22520  	// match: (Zero [9] ptr mem)
 22521  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22522  	for {
 22523  		if auxIntToInt64(v.AuxInt) != 9 {
 22524  			break
 22525  		}
 22526  		ptr := v_0
 22527  		mem := v_1
 22528  		v.reset(OpARM64MOVBstore)
 22529  		v.AuxInt = int32ToAuxInt(8)
 22530  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22531  		v0.AuxInt = int64ToAuxInt(0)
 22532  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22533  		v1.AddArg3(ptr, v0, mem)
 22534  		v.AddArg3(ptr, v0, v1)
 22535  		return true
 22536  	}
 22537  	// match: (Zero [10] ptr mem)
 22538  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22539  	for {
 22540  		if auxIntToInt64(v.AuxInt) != 10 {
 22541  			break
 22542  		}
 22543  		ptr := v_0
 22544  		mem := v_1
 22545  		v.reset(OpARM64MOVHstore)
 22546  		v.AuxInt = int32ToAuxInt(8)
 22547  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22548  		v0.AuxInt = int64ToAuxInt(0)
 22549  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22550  		v1.AddArg3(ptr, v0, mem)
 22551  		v.AddArg3(ptr, v0, v1)
 22552  		return true
 22553  	}
 22554  	// match: (Zero [11] ptr mem)
 22555  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22556  	for {
 22557  		if auxIntToInt64(v.AuxInt) != 11 {
 22558  			break
 22559  		}
 22560  		ptr := v_0
 22561  		mem := v_1
 22562  		v.reset(OpARM64MOVDstore)
 22563  		v.AuxInt = int32ToAuxInt(3)
 22564  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22565  		v0.AuxInt = int64ToAuxInt(0)
 22566  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22567  		v1.AddArg3(ptr, v0, mem)
 22568  		v.AddArg3(ptr, v0, v1)
 22569  		return true
 22570  	}
 22571  	// match: (Zero [12] ptr mem)
 22572  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22573  	for {
 22574  		if auxIntToInt64(v.AuxInt) != 12 {
 22575  			break
 22576  		}
 22577  		ptr := v_0
 22578  		mem := v_1
 22579  		v.reset(OpARM64MOVWstore)
 22580  		v.AuxInt = int32ToAuxInt(8)
 22581  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22582  		v0.AuxInt = int64ToAuxInt(0)
 22583  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22584  		v1.AddArg3(ptr, v0, mem)
 22585  		v.AddArg3(ptr, v0, v1)
 22586  		return true
 22587  	}
 22588  	// match: (Zero [13] ptr mem)
 22589  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22590  	for {
 22591  		if auxIntToInt64(v.AuxInt) != 13 {
 22592  			break
 22593  		}
 22594  		ptr := v_0
 22595  		mem := v_1
 22596  		v.reset(OpARM64MOVDstore)
 22597  		v.AuxInt = int32ToAuxInt(5)
 22598  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22599  		v0.AuxInt = int64ToAuxInt(0)
 22600  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22601  		v1.AddArg3(ptr, v0, mem)
 22602  		v.AddArg3(ptr, v0, v1)
 22603  		return true
 22604  	}
 22605  	// match: (Zero [14] ptr mem)
 22606  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22607  	for {
 22608  		if auxIntToInt64(v.AuxInt) != 14 {
 22609  			break
 22610  		}
 22611  		ptr := v_0
 22612  		mem := v_1
 22613  		v.reset(OpARM64MOVDstore)
 22614  		v.AuxInt = int32ToAuxInt(6)
 22615  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22616  		v0.AuxInt = int64ToAuxInt(0)
 22617  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22618  		v1.AddArg3(ptr, v0, mem)
 22619  		v.AddArg3(ptr, v0, v1)
 22620  		return true
 22621  	}
 22622  	// match: (Zero [15] ptr mem)
 22623  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22624  	for {
 22625  		if auxIntToInt64(v.AuxInt) != 15 {
 22626  			break
 22627  		}
 22628  		ptr := v_0
 22629  		mem := v_1
 22630  		v.reset(OpARM64MOVDstore)
 22631  		v.AuxInt = int32ToAuxInt(7)
 22632  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22633  		v0.AuxInt = int64ToAuxInt(0)
 22634  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22635  		v1.AddArg3(ptr, v0, mem)
 22636  		v.AddArg3(ptr, v0, v1)
 22637  		return true
 22638  	}
 22639  	// match: (Zero [16] ptr mem)
 22640  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 22641  	for {
 22642  		if auxIntToInt64(v.AuxInt) != 16 {
 22643  			break
 22644  		}
 22645  		ptr := v_0
 22646  		mem := v_1
 22647  		v.reset(OpARM64STP)
 22648  		v.AuxInt = int32ToAuxInt(0)
 22649  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22650  		v0.AuxInt = int64ToAuxInt(0)
 22651  		v.AddArg4(ptr, v0, v0, mem)
 22652  		return true
 22653  	}
 22654  	// match: (Zero [s] ptr mem)
 22655  	// cond: s > 16 && s < 192
 22656  	// result: (LoweredZero [s] ptr mem)
 22657  	for {
 22658  		s := auxIntToInt64(v.AuxInt)
 22659  		ptr := v_0
 22660  		mem := v_1
 22661  		if !(s > 16 && s < 192) {
 22662  			break
 22663  		}
 22664  		v.reset(OpARM64LoweredZero)
 22665  		v.AuxInt = int64ToAuxInt(s)
 22666  		v.AddArg2(ptr, mem)
 22667  		return true
 22668  	}
 22669  	// match: (Zero [s] ptr mem)
 22670  	// cond: s >= 192
 22671  	// result: (LoweredZeroLoop [s] ptr mem)
 22672  	for {
 22673  		s := auxIntToInt64(v.AuxInt)
 22674  		ptr := v_0
 22675  		mem := v_1
 22676  		if !(s >= 192) {
 22677  			break
 22678  		}
 22679  		v.reset(OpARM64LoweredZeroLoop)
 22680  		v.AuxInt = int64ToAuxInt(s)
 22681  		v.AddArg2(ptr, mem)
 22682  		return true
 22683  	}
 22684  	return false
 22685  }
 22686  func rewriteBlockARM64(b *Block) bool {
 22687  	typ := &b.Func.Config.Types
 22688  	switch b.Kind {
 22689  	case BlockARM64EQ:
 22690  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 22691  		// cond: z.Uses == 1
 22692  		// result: (EQ (TST x y) yes no)
 22693  		for b.Controls[0].Op == OpARM64CMPconst {
 22694  			v_0 := b.Controls[0]
 22695  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22696  				break
 22697  			}
 22698  			z := v_0.Args[0]
 22699  			if z.Op != OpARM64AND {
 22700  				break
 22701  			}
 22702  			_ = z.Args[1]
 22703  			z_0 := z.Args[0]
 22704  			z_1 := z.Args[1]
 22705  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22706  				x := z_0
 22707  				y := z_1
 22708  				if !(z.Uses == 1) {
 22709  					continue
 22710  				}
 22711  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 22712  				v0.AddArg2(x, y)
 22713  				b.resetWithControl(BlockARM64EQ, v0)
 22714  				return true
 22715  			}
 22716  			break
 22717  		}
 22718  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 22719  		// cond: x.Uses == 1
 22720  		// result: (EQ (TSTconst [c] y) yes no)
 22721  		for b.Controls[0].Op == OpARM64CMPconst {
 22722  			v_0 := b.Controls[0]
 22723  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22724  				break
 22725  			}
 22726  			x := v_0.Args[0]
 22727  			if x.Op != OpARM64ANDconst {
 22728  				break
 22729  			}
 22730  			c := auxIntToInt64(x.AuxInt)
 22731  			y := x.Args[0]
 22732  			if !(x.Uses == 1) {
 22733  				break
 22734  			}
 22735  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 22736  			v0.AuxInt = int64ToAuxInt(c)
 22737  			v0.AddArg(y)
 22738  			b.resetWithControl(BlockARM64EQ, v0)
 22739  			return true
 22740  		}
 22741  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 22742  		// cond: z.Uses == 1
 22743  		// result: (EQ (TSTW x y) yes no)
 22744  		for b.Controls[0].Op == OpARM64CMPWconst {
 22745  			v_0 := b.Controls[0]
 22746  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22747  				break
 22748  			}
 22749  			z := v_0.Args[0]
 22750  			if z.Op != OpARM64AND {
 22751  				break
 22752  			}
 22753  			_ = z.Args[1]
 22754  			z_0 := z.Args[0]
 22755  			z_1 := z.Args[1]
 22756  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22757  				x := z_0
 22758  				y := z_1
 22759  				if !(z.Uses == 1) {
 22760  					continue
 22761  				}
 22762  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 22763  				v0.AddArg2(x, y)
 22764  				b.resetWithControl(BlockARM64EQ, v0)
 22765  				return true
 22766  			}
 22767  			break
 22768  		}
 22769  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 22770  		// cond: x.Uses == 1
 22771  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 22772  		for b.Controls[0].Op == OpARM64CMPWconst {
 22773  			v_0 := b.Controls[0]
 22774  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22775  				break
 22776  			}
 22777  			x := v_0.Args[0]
 22778  			if x.Op != OpARM64ANDconst {
 22779  				break
 22780  			}
 22781  			c := auxIntToInt64(x.AuxInt)
 22782  			y := x.Args[0]
 22783  			if !(x.Uses == 1) {
 22784  				break
 22785  			}
 22786  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 22787  			v0.AuxInt = int32ToAuxInt(int32(c))
 22788  			v0.AddArg(y)
 22789  			b.resetWithControl(BlockARM64EQ, v0)
 22790  			return true
 22791  		}
 22792  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 22793  		// cond: x.Uses == 1
 22794  		// result: (EQ (CMNconst [c] y) yes no)
 22795  		for b.Controls[0].Op == OpARM64CMPconst {
 22796  			v_0 := b.Controls[0]
 22797  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22798  				break
 22799  			}
 22800  			x := v_0.Args[0]
 22801  			if x.Op != OpARM64ADDconst {
 22802  				break
 22803  			}
 22804  			c := auxIntToInt64(x.AuxInt)
 22805  			y := x.Args[0]
 22806  			if !(x.Uses == 1) {
 22807  				break
 22808  			}
 22809  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 22810  			v0.AuxInt = int64ToAuxInt(c)
 22811  			v0.AddArg(y)
 22812  			b.resetWithControl(BlockARM64EQ, v0)
 22813  			return true
 22814  		}
 22815  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 22816  		// cond: x.Uses == 1
 22817  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 22818  		for b.Controls[0].Op == OpARM64CMPWconst {
 22819  			v_0 := b.Controls[0]
 22820  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22821  				break
 22822  			}
 22823  			x := v_0.Args[0]
 22824  			if x.Op != OpARM64ADDconst {
 22825  				break
 22826  			}
 22827  			c := auxIntToInt64(x.AuxInt)
 22828  			y := x.Args[0]
 22829  			if !(x.Uses == 1) {
 22830  				break
 22831  			}
 22832  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 22833  			v0.AuxInt = int32ToAuxInt(int32(c))
 22834  			v0.AddArg(y)
 22835  			b.resetWithControl(BlockARM64EQ, v0)
 22836  			return true
 22837  		}
 22838  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 22839  		// cond: z.Uses == 1
 22840  		// result: (EQ (CMN x y) yes no)
 22841  		for b.Controls[0].Op == OpARM64CMPconst {
 22842  			v_0 := b.Controls[0]
 22843  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22844  				break
 22845  			}
 22846  			z := v_0.Args[0]
 22847  			if z.Op != OpARM64ADD {
 22848  				break
 22849  			}
 22850  			_ = z.Args[1]
 22851  			z_0 := z.Args[0]
 22852  			z_1 := z.Args[1]
 22853  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22854  				x := z_0
 22855  				y := z_1
 22856  				if !(z.Uses == 1) {
 22857  					continue
 22858  				}
 22859  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22860  				v0.AddArg2(x, y)
 22861  				b.resetWithControl(BlockARM64EQ, v0)
 22862  				return true
 22863  			}
 22864  			break
 22865  		}
 22866  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 22867  		// cond: z.Uses == 1
 22868  		// result: (EQ (CMNW x y) yes no)
 22869  		for b.Controls[0].Op == OpARM64CMPWconst {
 22870  			v_0 := b.Controls[0]
 22871  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22872  				break
 22873  			}
 22874  			z := v_0.Args[0]
 22875  			if z.Op != OpARM64ADD {
 22876  				break
 22877  			}
 22878  			_ = z.Args[1]
 22879  			z_0 := z.Args[0]
 22880  			z_1 := z.Args[1]
 22881  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22882  				x := z_0
 22883  				y := z_1
 22884  				if !(z.Uses == 1) {
 22885  					continue
 22886  				}
 22887  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22888  				v0.AddArg2(x, y)
 22889  				b.resetWithControl(BlockARM64EQ, v0)
 22890  				return true
 22891  			}
 22892  			break
 22893  		}
 22894  		// match: (EQ (CMP x z:(NEG y)) yes no)
 22895  		// cond: z.Uses == 1
 22896  		// result: (EQ (CMN x y) yes no)
 22897  		for b.Controls[0].Op == OpARM64CMP {
 22898  			v_0 := b.Controls[0]
 22899  			_ = v_0.Args[1]
 22900  			x := v_0.Args[0]
 22901  			z := v_0.Args[1]
 22902  			if z.Op != OpARM64NEG {
 22903  				break
 22904  			}
 22905  			y := z.Args[0]
 22906  			if !(z.Uses == 1) {
 22907  				break
 22908  			}
 22909  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22910  			v0.AddArg2(x, y)
 22911  			b.resetWithControl(BlockARM64EQ, v0)
 22912  			return true
 22913  		}
 22914  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 22915  		// cond: z.Uses == 1
 22916  		// result: (EQ (CMNW x y) yes no)
 22917  		for b.Controls[0].Op == OpARM64CMPW {
 22918  			v_0 := b.Controls[0]
 22919  			_ = v_0.Args[1]
 22920  			x := v_0.Args[0]
 22921  			z := v_0.Args[1]
 22922  			if z.Op != OpARM64NEG {
 22923  				break
 22924  			}
 22925  			y := z.Args[0]
 22926  			if !(z.Uses == 1) {
 22927  				break
 22928  			}
 22929  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22930  			v0.AddArg2(x, y)
 22931  			b.resetWithControl(BlockARM64EQ, v0)
 22932  			return true
 22933  		}
 22934  		// match: (EQ (CMPconst [0] x) yes no)
 22935  		// result: (Z x yes no)
 22936  		for b.Controls[0].Op == OpARM64CMPconst {
 22937  			v_0 := b.Controls[0]
 22938  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22939  				break
 22940  			}
 22941  			x := v_0.Args[0]
 22942  			b.resetWithControl(BlockARM64Z, x)
 22943  			return true
 22944  		}
 22945  		// match: (EQ (CMPWconst [0] x) yes no)
 22946  		// result: (ZW x yes no)
 22947  		for b.Controls[0].Op == OpARM64CMPWconst {
 22948  			v_0 := b.Controls[0]
 22949  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22950  				break
 22951  			}
 22952  			x := v_0.Args[0]
 22953  			b.resetWithControl(BlockARM64ZW, x)
 22954  			return true
 22955  		}
 22956  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 22957  		// cond: z.Uses==1
 22958  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 22959  		for b.Controls[0].Op == OpARM64CMPconst {
 22960  			v_0 := b.Controls[0]
 22961  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22962  				break
 22963  			}
 22964  			z := v_0.Args[0]
 22965  			if z.Op != OpARM64MADD {
 22966  				break
 22967  			}
 22968  			y := z.Args[2]
 22969  			a := z.Args[0]
 22970  			x := z.Args[1]
 22971  			if !(z.Uses == 1) {
 22972  				break
 22973  			}
 22974  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22975  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22976  			v1.AddArg2(x, y)
 22977  			v0.AddArg2(a, v1)
 22978  			b.resetWithControl(BlockARM64EQ, v0)
 22979  			return true
 22980  		}
 22981  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 22982  		// cond: z.Uses==1
 22983  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 22984  		for b.Controls[0].Op == OpARM64CMPconst {
 22985  			v_0 := b.Controls[0]
 22986  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22987  				break
 22988  			}
 22989  			z := v_0.Args[0]
 22990  			if z.Op != OpARM64MSUB {
 22991  				break
 22992  			}
 22993  			y := z.Args[2]
 22994  			a := z.Args[0]
 22995  			x := z.Args[1]
 22996  			if !(z.Uses == 1) {
 22997  				break
 22998  			}
 22999  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23000  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23001  			v1.AddArg2(x, y)
 23002  			v0.AddArg2(a, v1)
 23003  			b.resetWithControl(BlockARM64EQ, v0)
 23004  			return true
 23005  		}
 23006  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 23007  		// cond: z.Uses==1
 23008  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 23009  		for b.Controls[0].Op == OpARM64CMPWconst {
 23010  			v_0 := b.Controls[0]
 23011  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23012  				break
 23013  			}
 23014  			z := v_0.Args[0]
 23015  			if z.Op != OpARM64MADDW {
 23016  				break
 23017  			}
 23018  			y := z.Args[2]
 23019  			a := z.Args[0]
 23020  			x := z.Args[1]
 23021  			if !(z.Uses == 1) {
 23022  				break
 23023  			}
 23024  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23025  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23026  			v1.AddArg2(x, y)
 23027  			v0.AddArg2(a, v1)
 23028  			b.resetWithControl(BlockARM64EQ, v0)
 23029  			return true
 23030  		}
 23031  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23032  		// cond: z.Uses==1
 23033  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 23034  		for b.Controls[0].Op == OpARM64CMPWconst {
 23035  			v_0 := b.Controls[0]
 23036  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23037  				break
 23038  			}
 23039  			z := v_0.Args[0]
 23040  			if z.Op != OpARM64MSUBW {
 23041  				break
 23042  			}
 23043  			y := z.Args[2]
 23044  			a := z.Args[0]
 23045  			x := z.Args[1]
 23046  			if !(z.Uses == 1) {
 23047  				break
 23048  			}
 23049  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23050  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23051  			v1.AddArg2(x, y)
 23052  			v0.AddArg2(a, v1)
 23053  			b.resetWithControl(BlockARM64EQ, v0)
 23054  			return true
 23055  		}
 23056  		// match: (EQ (TSTconst [c] x) yes no)
 23057  		// cond: oneBit(c)
 23058  		// result: (TBZ [int64(ntz64(c))] x yes no)
 23059  		for b.Controls[0].Op == OpARM64TSTconst {
 23060  			v_0 := b.Controls[0]
 23061  			c := auxIntToInt64(v_0.AuxInt)
 23062  			x := v_0.Args[0]
 23063  			if !(oneBit(c)) {
 23064  				break
 23065  			}
 23066  			b.resetWithControl(BlockARM64TBZ, x)
 23067  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 23068  			return true
 23069  		}
 23070  		// match: (EQ (TSTWconst [c] x) yes no)
 23071  		// cond: oneBit(int64(uint32(c)))
 23072  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 23073  		for b.Controls[0].Op == OpARM64TSTWconst {
 23074  			v_0 := b.Controls[0]
 23075  			c := auxIntToInt32(v_0.AuxInt)
 23076  			x := v_0.Args[0]
 23077  			if !(oneBit(int64(uint32(c)))) {
 23078  				break
 23079  			}
 23080  			b.resetWithControl(BlockARM64TBZ, x)
 23081  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 23082  			return true
 23083  		}
 23084  		// match: (EQ (FlagConstant [fc]) yes no)
 23085  		// cond: fc.eq()
 23086  		// result: (First yes no)
 23087  		for b.Controls[0].Op == OpARM64FlagConstant {
 23088  			v_0 := b.Controls[0]
 23089  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23090  			if !(fc.eq()) {
 23091  				break
 23092  			}
 23093  			b.Reset(BlockFirst)
 23094  			return true
 23095  		}
 23096  		// match: (EQ (FlagConstant [fc]) yes no)
 23097  		// cond: !fc.eq()
 23098  		// result: (First no yes)
 23099  		for b.Controls[0].Op == OpARM64FlagConstant {
 23100  			v_0 := b.Controls[0]
 23101  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23102  			if !(!fc.eq()) {
 23103  				break
 23104  			}
 23105  			b.Reset(BlockFirst)
 23106  			b.swapSuccessors()
 23107  			return true
 23108  		}
 23109  		// match: (EQ (InvertFlags cmp) yes no)
 23110  		// result: (EQ cmp yes no)
 23111  		for b.Controls[0].Op == OpARM64InvertFlags {
 23112  			v_0 := b.Controls[0]
 23113  			cmp := v_0.Args[0]
 23114  			b.resetWithControl(BlockARM64EQ, cmp)
 23115  			return true
 23116  		}
 23117  	case BlockARM64FGE:
 23118  		// match: (FGE (InvertFlags cmp) yes no)
 23119  		// result: (FLE cmp yes no)
 23120  		for b.Controls[0].Op == OpARM64InvertFlags {
 23121  			v_0 := b.Controls[0]
 23122  			cmp := v_0.Args[0]
 23123  			b.resetWithControl(BlockARM64FLE, cmp)
 23124  			return true
 23125  		}
 23126  	case BlockARM64FGT:
 23127  		// match: (FGT (InvertFlags cmp) yes no)
 23128  		// result: (FLT cmp yes no)
 23129  		for b.Controls[0].Op == OpARM64InvertFlags {
 23130  			v_0 := b.Controls[0]
 23131  			cmp := v_0.Args[0]
 23132  			b.resetWithControl(BlockARM64FLT, cmp)
 23133  			return true
 23134  		}
 23135  	case BlockARM64FLE:
 23136  		// match: (FLE (InvertFlags cmp) yes no)
 23137  		// result: (FGE cmp yes no)
 23138  		for b.Controls[0].Op == OpARM64InvertFlags {
 23139  			v_0 := b.Controls[0]
 23140  			cmp := v_0.Args[0]
 23141  			b.resetWithControl(BlockARM64FGE, cmp)
 23142  			return true
 23143  		}
 23144  	case BlockARM64FLT:
 23145  		// match: (FLT (InvertFlags cmp) yes no)
 23146  		// result: (FGT cmp yes no)
 23147  		for b.Controls[0].Op == OpARM64InvertFlags {
 23148  			v_0 := b.Controls[0]
 23149  			cmp := v_0.Args[0]
 23150  			b.resetWithControl(BlockARM64FGT, cmp)
 23151  			return true
 23152  		}
 23153  	case BlockARM64GE:
 23154  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 23155  		// cond: z.Uses == 1
 23156  		// result: (GE (TST x y) yes no)
 23157  		for b.Controls[0].Op == OpARM64CMPconst {
 23158  			v_0 := b.Controls[0]
 23159  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23160  				break
 23161  			}
 23162  			z := v_0.Args[0]
 23163  			if z.Op != OpARM64AND {
 23164  				break
 23165  			}
 23166  			_ = z.Args[1]
 23167  			z_0 := z.Args[0]
 23168  			z_1 := z.Args[1]
 23169  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23170  				x := z_0
 23171  				y := z_1
 23172  				if !(z.Uses == 1) {
 23173  					continue
 23174  				}
 23175  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23176  				v0.AddArg2(x, y)
 23177  				b.resetWithControl(BlockARM64GE, v0)
 23178  				return true
 23179  			}
 23180  			break
 23181  		}
 23182  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23183  		// cond: x.Uses == 1
 23184  		// result: (GE (TSTconst [c] y) yes no)
 23185  		for b.Controls[0].Op == OpARM64CMPconst {
 23186  			v_0 := b.Controls[0]
 23187  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23188  				break
 23189  			}
 23190  			x := v_0.Args[0]
 23191  			if x.Op != OpARM64ANDconst {
 23192  				break
 23193  			}
 23194  			c := auxIntToInt64(x.AuxInt)
 23195  			y := x.Args[0]
 23196  			if !(x.Uses == 1) {
 23197  				break
 23198  			}
 23199  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23200  			v0.AuxInt = int64ToAuxInt(c)
 23201  			v0.AddArg(y)
 23202  			b.resetWithControl(BlockARM64GE, v0)
 23203  			return true
 23204  		}
 23205  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 23206  		// cond: z.Uses == 1
 23207  		// result: (GE (TSTW x y) yes no)
 23208  		for b.Controls[0].Op == OpARM64CMPWconst {
 23209  			v_0 := b.Controls[0]
 23210  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23211  				break
 23212  			}
 23213  			z := v_0.Args[0]
 23214  			if z.Op != OpARM64AND {
 23215  				break
 23216  			}
 23217  			_ = z.Args[1]
 23218  			z_0 := z.Args[0]
 23219  			z_1 := z.Args[1]
 23220  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23221  				x := z_0
 23222  				y := z_1
 23223  				if !(z.Uses == 1) {
 23224  					continue
 23225  				}
 23226  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23227  				v0.AddArg2(x, y)
 23228  				b.resetWithControl(BlockARM64GE, v0)
 23229  				return true
 23230  			}
 23231  			break
 23232  		}
 23233  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23234  		// cond: x.Uses == 1
 23235  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 23236  		for b.Controls[0].Op == OpARM64CMPWconst {
 23237  			v_0 := b.Controls[0]
 23238  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23239  				break
 23240  			}
 23241  			x := v_0.Args[0]
 23242  			if x.Op != OpARM64ANDconst {
 23243  				break
 23244  			}
 23245  			c := auxIntToInt64(x.AuxInt)
 23246  			y := x.Args[0]
 23247  			if !(x.Uses == 1) {
 23248  				break
 23249  			}
 23250  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23251  			v0.AuxInt = int32ToAuxInt(int32(c))
 23252  			v0.AddArg(y)
 23253  			b.resetWithControl(BlockARM64GE, v0)
 23254  			return true
 23255  		}
 23256  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23257  		// cond: x.Uses == 1
 23258  		// result: (GEnoov (CMNconst [c] y) yes no)
 23259  		for b.Controls[0].Op == OpARM64CMPconst {
 23260  			v_0 := b.Controls[0]
 23261  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23262  				break
 23263  			}
 23264  			x := v_0.Args[0]
 23265  			if x.Op != OpARM64ADDconst {
 23266  				break
 23267  			}
 23268  			c := auxIntToInt64(x.AuxInt)
 23269  			y := x.Args[0]
 23270  			if !(x.Uses == 1) {
 23271  				break
 23272  			}
 23273  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23274  			v0.AuxInt = int64ToAuxInt(c)
 23275  			v0.AddArg(y)
 23276  			b.resetWithControl(BlockARM64GEnoov, v0)
 23277  			return true
 23278  		}
 23279  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23280  		// cond: x.Uses == 1
 23281  		// result: (GEnoov (CMNWconst [int32(c)] y) yes no)
 23282  		for b.Controls[0].Op == OpARM64CMPWconst {
 23283  			v_0 := b.Controls[0]
 23284  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23285  				break
 23286  			}
 23287  			x := v_0.Args[0]
 23288  			if x.Op != OpARM64ADDconst {
 23289  				break
 23290  			}
 23291  			c := auxIntToInt64(x.AuxInt)
 23292  			y := x.Args[0]
 23293  			if !(x.Uses == 1) {
 23294  				break
 23295  			}
 23296  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23297  			v0.AuxInt = int32ToAuxInt(int32(c))
 23298  			v0.AddArg(y)
 23299  			b.resetWithControl(BlockARM64GEnoov, v0)
 23300  			return true
 23301  		}
 23302  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 23303  		// cond: z.Uses == 1
 23304  		// result: (GEnoov (CMN x y) yes no)
 23305  		for b.Controls[0].Op == OpARM64CMPconst {
 23306  			v_0 := b.Controls[0]
 23307  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23308  				break
 23309  			}
 23310  			z := v_0.Args[0]
 23311  			if z.Op != OpARM64ADD {
 23312  				break
 23313  			}
 23314  			_ = z.Args[1]
 23315  			z_0 := z.Args[0]
 23316  			z_1 := z.Args[1]
 23317  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23318  				x := z_0
 23319  				y := z_1
 23320  				if !(z.Uses == 1) {
 23321  					continue
 23322  				}
 23323  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23324  				v0.AddArg2(x, y)
 23325  				b.resetWithControl(BlockARM64GEnoov, v0)
 23326  				return true
 23327  			}
 23328  			break
 23329  		}
 23330  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 23331  		// cond: z.Uses == 1
 23332  		// result: (GEnoov (CMNW x y) yes no)
 23333  		for b.Controls[0].Op == OpARM64CMPWconst {
 23334  			v_0 := b.Controls[0]
 23335  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23336  				break
 23337  			}
 23338  			z := v_0.Args[0]
 23339  			if z.Op != OpARM64ADD {
 23340  				break
 23341  			}
 23342  			_ = z.Args[1]
 23343  			z_0 := z.Args[0]
 23344  			z_1 := z.Args[1]
 23345  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23346  				x := z_0
 23347  				y := z_1
 23348  				if !(z.Uses == 1) {
 23349  					continue
 23350  				}
 23351  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23352  				v0.AddArg2(x, y)
 23353  				b.resetWithControl(BlockARM64GEnoov, v0)
 23354  				return true
 23355  			}
 23356  			break
 23357  		}
 23358  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 23359  		// cond: z.Uses==1
 23360  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 23361  		for b.Controls[0].Op == OpARM64CMPconst {
 23362  			v_0 := b.Controls[0]
 23363  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23364  				break
 23365  			}
 23366  			z := v_0.Args[0]
 23367  			if z.Op != OpARM64MADD {
 23368  				break
 23369  			}
 23370  			y := z.Args[2]
 23371  			a := z.Args[0]
 23372  			x := z.Args[1]
 23373  			if !(z.Uses == 1) {
 23374  				break
 23375  			}
 23376  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23377  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23378  			v1.AddArg2(x, y)
 23379  			v0.AddArg2(a, v1)
 23380  			b.resetWithControl(BlockARM64GEnoov, v0)
 23381  			return true
 23382  		}
 23383  		// match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
 23384  		// cond: z.Uses==1
 23385  		// result: (GEnoov (CMP a (MUL <x.Type> x y)) yes no)
 23386  		for b.Controls[0].Op == OpARM64CMPconst {
 23387  			v_0 := b.Controls[0]
 23388  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23389  				break
 23390  			}
 23391  			z := v_0.Args[0]
 23392  			if z.Op != OpARM64MSUB {
 23393  				break
 23394  			}
 23395  			y := z.Args[2]
 23396  			a := z.Args[0]
 23397  			x := z.Args[1]
 23398  			if !(z.Uses == 1) {
 23399  				break
 23400  			}
 23401  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23402  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23403  			v1.AddArg2(x, y)
 23404  			v0.AddArg2(a, v1)
 23405  			b.resetWithControl(BlockARM64GEnoov, v0)
 23406  			return true
 23407  		}
 23408  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 23409  		// cond: z.Uses==1
 23410  		// result: (GEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23411  		for b.Controls[0].Op == OpARM64CMPWconst {
 23412  			v_0 := b.Controls[0]
 23413  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23414  				break
 23415  			}
 23416  			z := v_0.Args[0]
 23417  			if z.Op != OpARM64MADDW {
 23418  				break
 23419  			}
 23420  			y := z.Args[2]
 23421  			a := z.Args[0]
 23422  			x := z.Args[1]
 23423  			if !(z.Uses == 1) {
 23424  				break
 23425  			}
 23426  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23427  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23428  			v1.AddArg2(x, y)
 23429  			v0.AddArg2(a, v1)
 23430  			b.resetWithControl(BlockARM64GEnoov, v0)
 23431  			return true
 23432  		}
 23433  		// match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23434  		// cond: z.Uses==1
 23435  		// result: (GEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23436  		for b.Controls[0].Op == OpARM64CMPWconst {
 23437  			v_0 := b.Controls[0]
 23438  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23439  				break
 23440  			}
 23441  			z := v_0.Args[0]
 23442  			if z.Op != OpARM64MSUBW {
 23443  				break
 23444  			}
 23445  			y := z.Args[2]
 23446  			a := z.Args[0]
 23447  			x := z.Args[1]
 23448  			if !(z.Uses == 1) {
 23449  				break
 23450  			}
 23451  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23452  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23453  			v1.AddArg2(x, y)
 23454  			v0.AddArg2(a, v1)
 23455  			b.resetWithControl(BlockARM64GEnoov, v0)
 23456  			return true
 23457  		}
 23458  		// match: (GE (CMPWconst [0] x) yes no)
 23459  		// result: (TBZ [31] x yes no)
 23460  		for b.Controls[0].Op == OpARM64CMPWconst {
 23461  			v_0 := b.Controls[0]
 23462  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23463  				break
 23464  			}
 23465  			x := v_0.Args[0]
 23466  			b.resetWithControl(BlockARM64TBZ, x)
 23467  			b.AuxInt = int64ToAuxInt(31)
 23468  			return true
 23469  		}
 23470  		// match: (GE (CMPconst [0] x) yes no)
 23471  		// result: (TBZ [63] x yes no)
 23472  		for b.Controls[0].Op == OpARM64CMPconst {
 23473  			v_0 := b.Controls[0]
 23474  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23475  				break
 23476  			}
 23477  			x := v_0.Args[0]
 23478  			b.resetWithControl(BlockARM64TBZ, x)
 23479  			b.AuxInt = int64ToAuxInt(63)
 23480  			return true
 23481  		}
 23482  		// match: (GE (FlagConstant [fc]) yes no)
 23483  		// cond: fc.ge()
 23484  		// result: (First yes no)
 23485  		for b.Controls[0].Op == OpARM64FlagConstant {
 23486  			v_0 := b.Controls[0]
 23487  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23488  			if !(fc.ge()) {
 23489  				break
 23490  			}
 23491  			b.Reset(BlockFirst)
 23492  			return true
 23493  		}
 23494  		// match: (GE (FlagConstant [fc]) yes no)
 23495  		// cond: !fc.ge()
 23496  		// result: (First no yes)
 23497  		for b.Controls[0].Op == OpARM64FlagConstant {
 23498  			v_0 := b.Controls[0]
 23499  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23500  			if !(!fc.ge()) {
 23501  				break
 23502  			}
 23503  			b.Reset(BlockFirst)
 23504  			b.swapSuccessors()
 23505  			return true
 23506  		}
 23507  		// match: (GE (InvertFlags cmp) yes no)
 23508  		// result: (LE cmp yes no)
 23509  		for b.Controls[0].Op == OpARM64InvertFlags {
 23510  			v_0 := b.Controls[0]
 23511  			cmp := v_0.Args[0]
 23512  			b.resetWithControl(BlockARM64LE, cmp)
 23513  			return true
 23514  		}
 23515  	case BlockARM64GEnoov:
 23516  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23517  		// cond: fc.geNoov()
 23518  		// result: (First yes no)
 23519  		for b.Controls[0].Op == OpARM64FlagConstant {
 23520  			v_0 := b.Controls[0]
 23521  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23522  			if !(fc.geNoov()) {
 23523  				break
 23524  			}
 23525  			b.Reset(BlockFirst)
 23526  			return true
 23527  		}
 23528  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23529  		// cond: !fc.geNoov()
 23530  		// result: (First no yes)
 23531  		for b.Controls[0].Op == OpARM64FlagConstant {
 23532  			v_0 := b.Controls[0]
 23533  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23534  			if !(!fc.geNoov()) {
 23535  				break
 23536  			}
 23537  			b.Reset(BlockFirst)
 23538  			b.swapSuccessors()
 23539  			return true
 23540  		}
 23541  		// match: (GEnoov (InvertFlags cmp) yes no)
 23542  		// result: (LEnoov cmp yes no)
 23543  		for b.Controls[0].Op == OpARM64InvertFlags {
 23544  			v_0 := b.Controls[0]
 23545  			cmp := v_0.Args[0]
 23546  			b.resetWithControl(BlockARM64LEnoov, cmp)
 23547  			return true
 23548  		}
 23549  	case BlockARM64GT:
 23550  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 23551  		// cond: z.Uses == 1
 23552  		// result: (GT (TST x y) yes no)
 23553  		for b.Controls[0].Op == OpARM64CMPconst {
 23554  			v_0 := b.Controls[0]
 23555  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23556  				break
 23557  			}
 23558  			z := v_0.Args[0]
 23559  			if z.Op != OpARM64AND {
 23560  				break
 23561  			}
 23562  			_ = z.Args[1]
 23563  			z_0 := z.Args[0]
 23564  			z_1 := z.Args[1]
 23565  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23566  				x := z_0
 23567  				y := z_1
 23568  				if !(z.Uses == 1) {
 23569  					continue
 23570  				}
 23571  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23572  				v0.AddArg2(x, y)
 23573  				b.resetWithControl(BlockARM64GT, v0)
 23574  				return true
 23575  			}
 23576  			break
 23577  		}
 23578  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23579  		// cond: x.Uses == 1
 23580  		// result: (GT (TSTconst [c] y) yes no)
 23581  		for b.Controls[0].Op == OpARM64CMPconst {
 23582  			v_0 := b.Controls[0]
 23583  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23584  				break
 23585  			}
 23586  			x := v_0.Args[0]
 23587  			if x.Op != OpARM64ANDconst {
 23588  				break
 23589  			}
 23590  			c := auxIntToInt64(x.AuxInt)
 23591  			y := x.Args[0]
 23592  			if !(x.Uses == 1) {
 23593  				break
 23594  			}
 23595  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23596  			v0.AuxInt = int64ToAuxInt(c)
 23597  			v0.AddArg(y)
 23598  			b.resetWithControl(BlockARM64GT, v0)
 23599  			return true
 23600  		}
 23601  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 23602  		// cond: z.Uses == 1
 23603  		// result: (GT (TSTW x y) yes no)
 23604  		for b.Controls[0].Op == OpARM64CMPWconst {
 23605  			v_0 := b.Controls[0]
 23606  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23607  				break
 23608  			}
 23609  			z := v_0.Args[0]
 23610  			if z.Op != OpARM64AND {
 23611  				break
 23612  			}
 23613  			_ = z.Args[1]
 23614  			z_0 := z.Args[0]
 23615  			z_1 := z.Args[1]
 23616  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23617  				x := z_0
 23618  				y := z_1
 23619  				if !(z.Uses == 1) {
 23620  					continue
 23621  				}
 23622  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23623  				v0.AddArg2(x, y)
 23624  				b.resetWithControl(BlockARM64GT, v0)
 23625  				return true
 23626  			}
 23627  			break
 23628  		}
 23629  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23630  		// cond: x.Uses == 1
 23631  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 23632  		for b.Controls[0].Op == OpARM64CMPWconst {
 23633  			v_0 := b.Controls[0]
 23634  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23635  				break
 23636  			}
 23637  			x := v_0.Args[0]
 23638  			if x.Op != OpARM64ANDconst {
 23639  				break
 23640  			}
 23641  			c := auxIntToInt64(x.AuxInt)
 23642  			y := x.Args[0]
 23643  			if !(x.Uses == 1) {
 23644  				break
 23645  			}
 23646  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23647  			v0.AuxInt = int32ToAuxInt(int32(c))
 23648  			v0.AddArg(y)
 23649  			b.resetWithControl(BlockARM64GT, v0)
 23650  			return true
 23651  		}
 23652  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23653  		// cond: x.Uses == 1
 23654  		// result: (GTnoov (CMNconst [c] y) yes no)
 23655  		for b.Controls[0].Op == OpARM64CMPconst {
 23656  			v_0 := b.Controls[0]
 23657  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23658  				break
 23659  			}
 23660  			x := v_0.Args[0]
 23661  			if x.Op != OpARM64ADDconst {
 23662  				break
 23663  			}
 23664  			c := auxIntToInt64(x.AuxInt)
 23665  			y := x.Args[0]
 23666  			if !(x.Uses == 1) {
 23667  				break
 23668  			}
 23669  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23670  			v0.AuxInt = int64ToAuxInt(c)
 23671  			v0.AddArg(y)
 23672  			b.resetWithControl(BlockARM64GTnoov, v0)
 23673  			return true
 23674  		}
 23675  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23676  		// cond: x.Uses == 1
 23677  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 23678  		for b.Controls[0].Op == OpARM64CMPWconst {
 23679  			v_0 := b.Controls[0]
 23680  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23681  				break
 23682  			}
 23683  			x := v_0.Args[0]
 23684  			if x.Op != OpARM64ADDconst {
 23685  				break
 23686  			}
 23687  			c := auxIntToInt64(x.AuxInt)
 23688  			y := x.Args[0]
 23689  			if !(x.Uses == 1) {
 23690  				break
 23691  			}
 23692  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23693  			v0.AuxInt = int32ToAuxInt(int32(c))
 23694  			v0.AddArg(y)
 23695  			b.resetWithControl(BlockARM64GTnoov, v0)
 23696  			return true
 23697  		}
 23698  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 23699  		// cond: z.Uses == 1
 23700  		// result: (GTnoov (CMN x y) yes no)
 23701  		for b.Controls[0].Op == OpARM64CMPconst {
 23702  			v_0 := b.Controls[0]
 23703  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23704  				break
 23705  			}
 23706  			z := v_0.Args[0]
 23707  			if z.Op != OpARM64ADD {
 23708  				break
 23709  			}
 23710  			_ = z.Args[1]
 23711  			z_0 := z.Args[0]
 23712  			z_1 := z.Args[1]
 23713  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23714  				x := z_0
 23715  				y := z_1
 23716  				if !(z.Uses == 1) {
 23717  					continue
 23718  				}
 23719  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23720  				v0.AddArg2(x, y)
 23721  				b.resetWithControl(BlockARM64GTnoov, v0)
 23722  				return true
 23723  			}
 23724  			break
 23725  		}
 23726  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 23727  		// cond: z.Uses == 1
 23728  		// result: (GTnoov (CMNW x y) yes no)
 23729  		for b.Controls[0].Op == OpARM64CMPWconst {
 23730  			v_0 := b.Controls[0]
 23731  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23732  				break
 23733  			}
 23734  			z := v_0.Args[0]
 23735  			if z.Op != OpARM64ADD {
 23736  				break
 23737  			}
 23738  			_ = z.Args[1]
 23739  			z_0 := z.Args[0]
 23740  			z_1 := z.Args[1]
 23741  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23742  				x := z_0
 23743  				y := z_1
 23744  				if !(z.Uses == 1) {
 23745  					continue
 23746  				}
 23747  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23748  				v0.AddArg2(x, y)
 23749  				b.resetWithControl(BlockARM64GTnoov, v0)
 23750  				return true
 23751  			}
 23752  			break
 23753  		}
 23754  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 23755  		// cond: z.Uses==1
 23756  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 23757  		for b.Controls[0].Op == OpARM64CMPconst {
 23758  			v_0 := b.Controls[0]
 23759  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23760  				break
 23761  			}
 23762  			z := v_0.Args[0]
 23763  			if z.Op != OpARM64MADD {
 23764  				break
 23765  			}
 23766  			y := z.Args[2]
 23767  			a := z.Args[0]
 23768  			x := z.Args[1]
 23769  			if !(z.Uses == 1) {
 23770  				break
 23771  			}
 23772  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23773  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23774  			v1.AddArg2(x, y)
 23775  			v0.AddArg2(a, v1)
 23776  			b.resetWithControl(BlockARM64GTnoov, v0)
 23777  			return true
 23778  		}
 23779  		// match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
 23780  		// cond: z.Uses==1
 23781  		// result: (GTnoov (CMP a (MUL <x.Type> x y)) yes no)
 23782  		for b.Controls[0].Op == OpARM64CMPconst {
 23783  			v_0 := b.Controls[0]
 23784  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23785  				break
 23786  			}
 23787  			z := v_0.Args[0]
 23788  			if z.Op != OpARM64MSUB {
 23789  				break
 23790  			}
 23791  			y := z.Args[2]
 23792  			a := z.Args[0]
 23793  			x := z.Args[1]
 23794  			if !(z.Uses == 1) {
 23795  				break
 23796  			}
 23797  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23798  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23799  			v1.AddArg2(x, y)
 23800  			v0.AddArg2(a, v1)
 23801  			b.resetWithControl(BlockARM64GTnoov, v0)
 23802  			return true
 23803  		}
 23804  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 23805  		// cond: z.Uses==1
 23806  		// result: (GTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23807  		for b.Controls[0].Op == OpARM64CMPWconst {
 23808  			v_0 := b.Controls[0]
 23809  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23810  				break
 23811  			}
 23812  			z := v_0.Args[0]
 23813  			if z.Op != OpARM64MADDW {
 23814  				break
 23815  			}
 23816  			y := z.Args[2]
 23817  			a := z.Args[0]
 23818  			x := z.Args[1]
 23819  			if !(z.Uses == 1) {
 23820  				break
 23821  			}
 23822  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23823  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23824  			v1.AddArg2(x, y)
 23825  			v0.AddArg2(a, v1)
 23826  			b.resetWithControl(BlockARM64GTnoov, v0)
 23827  			return true
 23828  		}
 23829  		// match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23830  		// cond: z.Uses==1
 23831  		// result: (GTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23832  		for b.Controls[0].Op == OpARM64CMPWconst {
 23833  			v_0 := b.Controls[0]
 23834  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23835  				break
 23836  			}
 23837  			z := v_0.Args[0]
 23838  			if z.Op != OpARM64MSUBW {
 23839  				break
 23840  			}
 23841  			y := z.Args[2]
 23842  			a := z.Args[0]
 23843  			x := z.Args[1]
 23844  			if !(z.Uses == 1) {
 23845  				break
 23846  			}
 23847  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23848  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23849  			v1.AddArg2(x, y)
 23850  			v0.AddArg2(a, v1)
 23851  			b.resetWithControl(BlockARM64GTnoov, v0)
 23852  			return true
 23853  		}
 23854  		// match: (GT (FlagConstant [fc]) yes no)
 23855  		// cond: fc.gt()
 23856  		// result: (First yes no)
 23857  		for b.Controls[0].Op == OpARM64FlagConstant {
 23858  			v_0 := b.Controls[0]
 23859  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23860  			if !(fc.gt()) {
 23861  				break
 23862  			}
 23863  			b.Reset(BlockFirst)
 23864  			return true
 23865  		}
 23866  		// match: (GT (FlagConstant [fc]) yes no)
 23867  		// cond: !fc.gt()
 23868  		// result: (First no yes)
 23869  		for b.Controls[0].Op == OpARM64FlagConstant {
 23870  			v_0 := b.Controls[0]
 23871  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23872  			if !(!fc.gt()) {
 23873  				break
 23874  			}
 23875  			b.Reset(BlockFirst)
 23876  			b.swapSuccessors()
 23877  			return true
 23878  		}
 23879  		// match: (GT (InvertFlags cmp) yes no)
 23880  		// result: (LT cmp yes no)
 23881  		for b.Controls[0].Op == OpARM64InvertFlags {
 23882  			v_0 := b.Controls[0]
 23883  			cmp := v_0.Args[0]
 23884  			b.resetWithControl(BlockARM64LT, cmp)
 23885  			return true
 23886  		}
 23887  	case BlockARM64GTnoov:
 23888  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23889  		// cond: fc.gtNoov()
 23890  		// result: (First yes no)
 23891  		for b.Controls[0].Op == OpARM64FlagConstant {
 23892  			v_0 := b.Controls[0]
 23893  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23894  			if !(fc.gtNoov()) {
 23895  				break
 23896  			}
 23897  			b.Reset(BlockFirst)
 23898  			return true
 23899  		}
 23900  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23901  		// cond: !fc.gtNoov()
 23902  		// result: (First no yes)
 23903  		for b.Controls[0].Op == OpARM64FlagConstant {
 23904  			v_0 := b.Controls[0]
 23905  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23906  			if !(!fc.gtNoov()) {
 23907  				break
 23908  			}
 23909  			b.Reset(BlockFirst)
 23910  			b.swapSuccessors()
 23911  			return true
 23912  		}
 23913  		// match: (GTnoov (InvertFlags cmp) yes no)
 23914  		// result: (LTnoov cmp yes no)
 23915  		for b.Controls[0].Op == OpARM64InvertFlags {
 23916  			v_0 := b.Controls[0]
 23917  			cmp := v_0.Args[0]
 23918  			b.resetWithControl(BlockARM64LTnoov, cmp)
 23919  			return true
 23920  		}
 23921  	case BlockIf:
 23922  		// match: (If (Equal cc) yes no)
 23923  		// result: (EQ cc yes no)
 23924  		for b.Controls[0].Op == OpARM64Equal {
 23925  			v_0 := b.Controls[0]
 23926  			cc := v_0.Args[0]
 23927  			b.resetWithControl(BlockARM64EQ, cc)
 23928  			return true
 23929  		}
 23930  		// match: (If (NotEqual cc) yes no)
 23931  		// result: (NE cc yes no)
 23932  		for b.Controls[0].Op == OpARM64NotEqual {
 23933  			v_0 := b.Controls[0]
 23934  			cc := v_0.Args[0]
 23935  			b.resetWithControl(BlockARM64NE, cc)
 23936  			return true
 23937  		}
 23938  		// match: (If (LessThan cc) yes no)
 23939  		// result: (LT cc yes no)
 23940  		for b.Controls[0].Op == OpARM64LessThan {
 23941  			v_0 := b.Controls[0]
 23942  			cc := v_0.Args[0]
 23943  			b.resetWithControl(BlockARM64LT, cc)
 23944  			return true
 23945  		}
 23946  		// match: (If (LessThanU cc) yes no)
 23947  		// result: (ULT cc yes no)
 23948  		for b.Controls[0].Op == OpARM64LessThanU {
 23949  			v_0 := b.Controls[0]
 23950  			cc := v_0.Args[0]
 23951  			b.resetWithControl(BlockARM64ULT, cc)
 23952  			return true
 23953  		}
 23954  		// match: (If (LessEqual cc) yes no)
 23955  		// result: (LE cc yes no)
 23956  		for b.Controls[0].Op == OpARM64LessEqual {
 23957  			v_0 := b.Controls[0]
 23958  			cc := v_0.Args[0]
 23959  			b.resetWithControl(BlockARM64LE, cc)
 23960  			return true
 23961  		}
 23962  		// match: (If (LessEqualU cc) yes no)
 23963  		// result: (ULE cc yes no)
 23964  		for b.Controls[0].Op == OpARM64LessEqualU {
 23965  			v_0 := b.Controls[0]
 23966  			cc := v_0.Args[0]
 23967  			b.resetWithControl(BlockARM64ULE, cc)
 23968  			return true
 23969  		}
 23970  		// match: (If (GreaterThan cc) yes no)
 23971  		// result: (GT cc yes no)
 23972  		for b.Controls[0].Op == OpARM64GreaterThan {
 23973  			v_0 := b.Controls[0]
 23974  			cc := v_0.Args[0]
 23975  			b.resetWithControl(BlockARM64GT, cc)
 23976  			return true
 23977  		}
 23978  		// match: (If (GreaterThanU cc) yes no)
 23979  		// result: (UGT cc yes no)
 23980  		for b.Controls[0].Op == OpARM64GreaterThanU {
 23981  			v_0 := b.Controls[0]
 23982  			cc := v_0.Args[0]
 23983  			b.resetWithControl(BlockARM64UGT, cc)
 23984  			return true
 23985  		}
 23986  		// match: (If (GreaterEqual cc) yes no)
 23987  		// result: (GE cc yes no)
 23988  		for b.Controls[0].Op == OpARM64GreaterEqual {
 23989  			v_0 := b.Controls[0]
 23990  			cc := v_0.Args[0]
 23991  			b.resetWithControl(BlockARM64GE, cc)
 23992  			return true
 23993  		}
 23994  		// match: (If (GreaterEqualU cc) yes no)
 23995  		// result: (UGE cc yes no)
 23996  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 23997  			v_0 := b.Controls[0]
 23998  			cc := v_0.Args[0]
 23999  			b.resetWithControl(BlockARM64UGE, cc)
 24000  			return true
 24001  		}
 24002  		// match: (If (LessThanF cc) yes no)
 24003  		// result: (FLT cc yes no)
 24004  		for b.Controls[0].Op == OpARM64LessThanF {
 24005  			v_0 := b.Controls[0]
 24006  			cc := v_0.Args[0]
 24007  			b.resetWithControl(BlockARM64FLT, cc)
 24008  			return true
 24009  		}
 24010  		// match: (If (LessEqualF cc) yes no)
 24011  		// result: (FLE cc yes no)
 24012  		for b.Controls[0].Op == OpARM64LessEqualF {
 24013  			v_0 := b.Controls[0]
 24014  			cc := v_0.Args[0]
 24015  			b.resetWithControl(BlockARM64FLE, cc)
 24016  			return true
 24017  		}
 24018  		// match: (If (GreaterThanF cc) yes no)
 24019  		// result: (FGT cc yes no)
 24020  		for b.Controls[0].Op == OpARM64GreaterThanF {
 24021  			v_0 := b.Controls[0]
 24022  			cc := v_0.Args[0]
 24023  			b.resetWithControl(BlockARM64FGT, cc)
 24024  			return true
 24025  		}
 24026  		// match: (If (GreaterEqualF cc) yes no)
 24027  		// result: (FGE cc yes no)
 24028  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 24029  			v_0 := b.Controls[0]
 24030  			cc := v_0.Args[0]
 24031  			b.resetWithControl(BlockARM64FGE, cc)
 24032  			return true
 24033  		}
 24034  		// match: (If cond yes no)
 24035  		// result: (TBNZ [0] cond yes no)
 24036  		for {
 24037  			cond := b.Controls[0]
 24038  			b.resetWithControl(BlockARM64TBNZ, cond)
 24039  			b.AuxInt = int64ToAuxInt(0)
 24040  			return true
 24041  		}
 24042  	case BlockJumpTable:
 24043  		// match: (JumpTable idx)
 24044  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 24045  		for {
 24046  			idx := b.Controls[0]
 24047  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 24048  			v0.Aux = symToAux(makeJumpTableSym(b))
 24049  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 24050  			v0.AddArg(v1)
 24051  			b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
 24052  			b.Aux = symToAux(makeJumpTableSym(b))
 24053  			return true
 24054  		}
 24055  	case BlockARM64LE:
 24056  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 24057  		// cond: z.Uses == 1
 24058  		// result: (LE (TST x y) yes no)
 24059  		for b.Controls[0].Op == OpARM64CMPconst {
 24060  			v_0 := b.Controls[0]
 24061  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24062  				break
 24063  			}
 24064  			z := v_0.Args[0]
 24065  			if z.Op != OpARM64AND {
 24066  				break
 24067  			}
 24068  			_ = z.Args[1]
 24069  			z_0 := z.Args[0]
 24070  			z_1 := z.Args[1]
 24071  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24072  				x := z_0
 24073  				y := z_1
 24074  				if !(z.Uses == 1) {
 24075  					continue
 24076  				}
 24077  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24078  				v0.AddArg2(x, y)
 24079  				b.resetWithControl(BlockARM64LE, v0)
 24080  				return true
 24081  			}
 24082  			break
 24083  		}
 24084  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24085  		// cond: x.Uses == 1
 24086  		// result: (LE (TSTconst [c] y) yes no)
 24087  		for b.Controls[0].Op == OpARM64CMPconst {
 24088  			v_0 := b.Controls[0]
 24089  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24090  				break
 24091  			}
 24092  			x := v_0.Args[0]
 24093  			if x.Op != OpARM64ANDconst {
 24094  				break
 24095  			}
 24096  			c := auxIntToInt64(x.AuxInt)
 24097  			y := x.Args[0]
 24098  			if !(x.Uses == 1) {
 24099  				break
 24100  			}
 24101  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24102  			v0.AuxInt = int64ToAuxInt(c)
 24103  			v0.AddArg(y)
 24104  			b.resetWithControl(BlockARM64LE, v0)
 24105  			return true
 24106  		}
 24107  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 24108  		// cond: z.Uses == 1
 24109  		// result: (LE (TSTW x y) yes no)
 24110  		for b.Controls[0].Op == OpARM64CMPWconst {
 24111  			v_0 := b.Controls[0]
 24112  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24113  				break
 24114  			}
 24115  			z := v_0.Args[0]
 24116  			if z.Op != OpARM64AND {
 24117  				break
 24118  			}
 24119  			_ = z.Args[1]
 24120  			z_0 := z.Args[0]
 24121  			z_1 := z.Args[1]
 24122  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24123  				x := z_0
 24124  				y := z_1
 24125  				if !(z.Uses == 1) {
 24126  					continue
 24127  				}
 24128  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24129  				v0.AddArg2(x, y)
 24130  				b.resetWithControl(BlockARM64LE, v0)
 24131  				return true
 24132  			}
 24133  			break
 24134  		}
 24135  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24136  		// cond: x.Uses == 1
 24137  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 24138  		for b.Controls[0].Op == OpARM64CMPWconst {
 24139  			v_0 := b.Controls[0]
 24140  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24141  				break
 24142  			}
 24143  			x := v_0.Args[0]
 24144  			if x.Op != OpARM64ANDconst {
 24145  				break
 24146  			}
 24147  			c := auxIntToInt64(x.AuxInt)
 24148  			y := x.Args[0]
 24149  			if !(x.Uses == 1) {
 24150  				break
 24151  			}
 24152  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24153  			v0.AuxInt = int32ToAuxInt(int32(c))
 24154  			v0.AddArg(y)
 24155  			b.resetWithControl(BlockARM64LE, v0)
 24156  			return true
 24157  		}
 24158  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24159  		// cond: x.Uses == 1
 24160  		// result: (LEnoov (CMNconst [c] y) yes no)
 24161  		for b.Controls[0].Op == OpARM64CMPconst {
 24162  			v_0 := b.Controls[0]
 24163  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24164  				break
 24165  			}
 24166  			x := v_0.Args[0]
 24167  			if x.Op != OpARM64ADDconst {
 24168  				break
 24169  			}
 24170  			c := auxIntToInt64(x.AuxInt)
 24171  			y := x.Args[0]
 24172  			if !(x.Uses == 1) {
 24173  				break
 24174  			}
 24175  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24176  			v0.AuxInt = int64ToAuxInt(c)
 24177  			v0.AddArg(y)
 24178  			b.resetWithControl(BlockARM64LEnoov, v0)
 24179  			return true
 24180  		}
 24181  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24182  		// cond: x.Uses == 1
 24183  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 24184  		for b.Controls[0].Op == OpARM64CMPWconst {
 24185  			v_0 := b.Controls[0]
 24186  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24187  				break
 24188  			}
 24189  			x := v_0.Args[0]
 24190  			if x.Op != OpARM64ADDconst {
 24191  				break
 24192  			}
 24193  			c := auxIntToInt64(x.AuxInt)
 24194  			y := x.Args[0]
 24195  			if !(x.Uses == 1) {
 24196  				break
 24197  			}
 24198  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24199  			v0.AuxInt = int32ToAuxInt(int32(c))
 24200  			v0.AddArg(y)
 24201  			b.resetWithControl(BlockARM64LEnoov, v0)
 24202  			return true
 24203  		}
 24204  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 24205  		// cond: z.Uses == 1
 24206  		// result: (LEnoov (CMN x y) yes no)
 24207  		for b.Controls[0].Op == OpARM64CMPconst {
 24208  			v_0 := b.Controls[0]
 24209  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24210  				break
 24211  			}
 24212  			z := v_0.Args[0]
 24213  			if z.Op != OpARM64ADD {
 24214  				break
 24215  			}
 24216  			_ = z.Args[1]
 24217  			z_0 := z.Args[0]
 24218  			z_1 := z.Args[1]
 24219  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24220  				x := z_0
 24221  				y := z_1
 24222  				if !(z.Uses == 1) {
 24223  					continue
 24224  				}
 24225  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24226  				v0.AddArg2(x, y)
 24227  				b.resetWithControl(BlockARM64LEnoov, v0)
 24228  				return true
 24229  			}
 24230  			break
 24231  		}
 24232  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 24233  		// cond: z.Uses == 1
 24234  		// result: (LEnoov (CMNW x y) yes no)
 24235  		for b.Controls[0].Op == OpARM64CMPWconst {
 24236  			v_0 := b.Controls[0]
 24237  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24238  				break
 24239  			}
 24240  			z := v_0.Args[0]
 24241  			if z.Op != OpARM64ADD {
 24242  				break
 24243  			}
 24244  			_ = z.Args[1]
 24245  			z_0 := z.Args[0]
 24246  			z_1 := z.Args[1]
 24247  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24248  				x := z_0
 24249  				y := z_1
 24250  				if !(z.Uses == 1) {
 24251  					continue
 24252  				}
 24253  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24254  				v0.AddArg2(x, y)
 24255  				b.resetWithControl(BlockARM64LEnoov, v0)
 24256  				return true
 24257  			}
 24258  			break
 24259  		}
 24260  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 24261  		// cond: z.Uses==1
 24262  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 24263  		for b.Controls[0].Op == OpARM64CMPconst {
 24264  			v_0 := b.Controls[0]
 24265  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24266  				break
 24267  			}
 24268  			z := v_0.Args[0]
 24269  			if z.Op != OpARM64MADD {
 24270  				break
 24271  			}
 24272  			y := z.Args[2]
 24273  			a := z.Args[0]
 24274  			x := z.Args[1]
 24275  			if !(z.Uses == 1) {
 24276  				break
 24277  			}
 24278  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24279  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24280  			v1.AddArg2(x, y)
 24281  			v0.AddArg2(a, v1)
 24282  			b.resetWithControl(BlockARM64LEnoov, v0)
 24283  			return true
 24284  		}
 24285  		// match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
 24286  		// cond: z.Uses==1
 24287  		// result: (LEnoov (CMP a (MUL <x.Type> x y)) yes no)
 24288  		for b.Controls[0].Op == OpARM64CMPconst {
 24289  			v_0 := b.Controls[0]
 24290  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24291  				break
 24292  			}
 24293  			z := v_0.Args[0]
 24294  			if z.Op != OpARM64MSUB {
 24295  				break
 24296  			}
 24297  			y := z.Args[2]
 24298  			a := z.Args[0]
 24299  			x := z.Args[1]
 24300  			if !(z.Uses == 1) {
 24301  				break
 24302  			}
 24303  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24304  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24305  			v1.AddArg2(x, y)
 24306  			v0.AddArg2(a, v1)
 24307  			b.resetWithControl(BlockARM64LEnoov, v0)
 24308  			return true
 24309  		}
 24310  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 24311  		// cond: z.Uses==1
 24312  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 24313  		for b.Controls[0].Op == OpARM64CMPWconst {
 24314  			v_0 := b.Controls[0]
 24315  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24316  				break
 24317  			}
 24318  			z := v_0.Args[0]
 24319  			if z.Op != OpARM64MADDW {
 24320  				break
 24321  			}
 24322  			y := z.Args[2]
 24323  			a := z.Args[0]
 24324  			x := z.Args[1]
 24325  			if !(z.Uses == 1) {
 24326  				break
 24327  			}
 24328  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24329  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24330  			v1.AddArg2(x, y)
 24331  			v0.AddArg2(a, v1)
 24332  			b.resetWithControl(BlockARM64LEnoov, v0)
 24333  			return true
 24334  		}
 24335  		// match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24336  		// cond: z.Uses==1
 24337  		// result: (LEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24338  		for b.Controls[0].Op == OpARM64CMPWconst {
 24339  			v_0 := b.Controls[0]
 24340  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24341  				break
 24342  			}
 24343  			z := v_0.Args[0]
 24344  			if z.Op != OpARM64MSUBW {
 24345  				break
 24346  			}
 24347  			y := z.Args[2]
 24348  			a := z.Args[0]
 24349  			x := z.Args[1]
 24350  			if !(z.Uses == 1) {
 24351  				break
 24352  			}
 24353  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24354  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24355  			v1.AddArg2(x, y)
 24356  			v0.AddArg2(a, v1)
 24357  			b.resetWithControl(BlockARM64LEnoov, v0)
 24358  			return true
 24359  		}
 24360  		// match: (LE (FlagConstant [fc]) yes no)
 24361  		// cond: fc.le()
 24362  		// result: (First yes no)
 24363  		for b.Controls[0].Op == OpARM64FlagConstant {
 24364  			v_0 := b.Controls[0]
 24365  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24366  			if !(fc.le()) {
 24367  				break
 24368  			}
 24369  			b.Reset(BlockFirst)
 24370  			return true
 24371  		}
 24372  		// match: (LE (FlagConstant [fc]) yes no)
 24373  		// cond: !fc.le()
 24374  		// result: (First no yes)
 24375  		for b.Controls[0].Op == OpARM64FlagConstant {
 24376  			v_0 := b.Controls[0]
 24377  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24378  			if !(!fc.le()) {
 24379  				break
 24380  			}
 24381  			b.Reset(BlockFirst)
 24382  			b.swapSuccessors()
 24383  			return true
 24384  		}
 24385  		// match: (LE (InvertFlags cmp) yes no)
 24386  		// result: (GE cmp yes no)
 24387  		for b.Controls[0].Op == OpARM64InvertFlags {
 24388  			v_0 := b.Controls[0]
 24389  			cmp := v_0.Args[0]
 24390  			b.resetWithControl(BlockARM64GE, cmp)
 24391  			return true
 24392  		}
 24393  	case BlockARM64LEnoov:
 24394  		// match: (LEnoov (FlagConstant [fc]) yes no)
 24395  		// cond: fc.leNoov()
 24396  		// result: (First yes no)
 24397  		for b.Controls[0].Op == OpARM64FlagConstant {
 24398  			v_0 := b.Controls[0]
 24399  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24400  			if !(fc.leNoov()) {
 24401  				break
 24402  			}
 24403  			b.Reset(BlockFirst)
 24404  			return true
 24405  		}
 24406  		// match: (LEnoov (FlagConstant [fc]) yes no)
 24407  		// cond: !fc.leNoov()
 24408  		// result: (First no yes)
 24409  		for b.Controls[0].Op == OpARM64FlagConstant {
 24410  			v_0 := b.Controls[0]
 24411  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24412  			if !(!fc.leNoov()) {
 24413  				break
 24414  			}
 24415  			b.Reset(BlockFirst)
 24416  			b.swapSuccessors()
 24417  			return true
 24418  		}
 24419  		// match: (LEnoov (InvertFlags cmp) yes no)
 24420  		// result: (GEnoov cmp yes no)
 24421  		for b.Controls[0].Op == OpARM64InvertFlags {
 24422  			v_0 := b.Controls[0]
 24423  			cmp := v_0.Args[0]
 24424  			b.resetWithControl(BlockARM64GEnoov, cmp)
 24425  			return true
 24426  		}
 24427  	case BlockARM64LT:
 24428  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 24429  		// cond: z.Uses == 1
 24430  		// result: (LT (TST x y) yes no)
 24431  		for b.Controls[0].Op == OpARM64CMPconst {
 24432  			v_0 := b.Controls[0]
 24433  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24434  				break
 24435  			}
 24436  			z := v_0.Args[0]
 24437  			if z.Op != OpARM64AND {
 24438  				break
 24439  			}
 24440  			_ = z.Args[1]
 24441  			z_0 := z.Args[0]
 24442  			z_1 := z.Args[1]
 24443  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24444  				x := z_0
 24445  				y := z_1
 24446  				if !(z.Uses == 1) {
 24447  					continue
 24448  				}
 24449  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24450  				v0.AddArg2(x, y)
 24451  				b.resetWithControl(BlockARM64LT, v0)
 24452  				return true
 24453  			}
 24454  			break
 24455  		}
 24456  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24457  		// cond: x.Uses == 1
 24458  		// result: (LT (TSTconst [c] y) yes no)
 24459  		for b.Controls[0].Op == OpARM64CMPconst {
 24460  			v_0 := b.Controls[0]
 24461  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24462  				break
 24463  			}
 24464  			x := v_0.Args[0]
 24465  			if x.Op != OpARM64ANDconst {
 24466  				break
 24467  			}
 24468  			c := auxIntToInt64(x.AuxInt)
 24469  			y := x.Args[0]
 24470  			if !(x.Uses == 1) {
 24471  				break
 24472  			}
 24473  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24474  			v0.AuxInt = int64ToAuxInt(c)
 24475  			v0.AddArg(y)
 24476  			b.resetWithControl(BlockARM64LT, v0)
 24477  			return true
 24478  		}
 24479  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 24480  		// cond: z.Uses == 1
 24481  		// result: (LT (TSTW x y) yes no)
 24482  		for b.Controls[0].Op == OpARM64CMPWconst {
 24483  			v_0 := b.Controls[0]
 24484  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24485  				break
 24486  			}
 24487  			z := v_0.Args[0]
 24488  			if z.Op != OpARM64AND {
 24489  				break
 24490  			}
 24491  			_ = z.Args[1]
 24492  			z_0 := z.Args[0]
 24493  			z_1 := z.Args[1]
 24494  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24495  				x := z_0
 24496  				y := z_1
 24497  				if !(z.Uses == 1) {
 24498  					continue
 24499  				}
 24500  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24501  				v0.AddArg2(x, y)
 24502  				b.resetWithControl(BlockARM64LT, v0)
 24503  				return true
 24504  			}
 24505  			break
 24506  		}
 24507  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24508  		// cond: x.Uses == 1
 24509  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 24510  		for b.Controls[0].Op == OpARM64CMPWconst {
 24511  			v_0 := b.Controls[0]
 24512  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24513  				break
 24514  			}
 24515  			x := v_0.Args[0]
 24516  			if x.Op != OpARM64ANDconst {
 24517  				break
 24518  			}
 24519  			c := auxIntToInt64(x.AuxInt)
 24520  			y := x.Args[0]
 24521  			if !(x.Uses == 1) {
 24522  				break
 24523  			}
 24524  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24525  			v0.AuxInt = int32ToAuxInt(int32(c))
 24526  			v0.AddArg(y)
 24527  			b.resetWithControl(BlockARM64LT, v0)
 24528  			return true
 24529  		}
 24530  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24531  		// cond: x.Uses == 1
 24532  		// result: (LTnoov (CMNconst [c] y) yes no)
 24533  		for b.Controls[0].Op == OpARM64CMPconst {
 24534  			v_0 := b.Controls[0]
 24535  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24536  				break
 24537  			}
 24538  			x := v_0.Args[0]
 24539  			if x.Op != OpARM64ADDconst {
 24540  				break
 24541  			}
 24542  			c := auxIntToInt64(x.AuxInt)
 24543  			y := x.Args[0]
 24544  			if !(x.Uses == 1) {
 24545  				break
 24546  			}
 24547  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24548  			v0.AuxInt = int64ToAuxInt(c)
 24549  			v0.AddArg(y)
 24550  			b.resetWithControl(BlockARM64LTnoov, v0)
 24551  			return true
 24552  		}
 24553  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24554  		// cond: x.Uses == 1
 24555  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 24556  		for b.Controls[0].Op == OpARM64CMPWconst {
 24557  			v_0 := b.Controls[0]
 24558  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24559  				break
 24560  			}
 24561  			x := v_0.Args[0]
 24562  			if x.Op != OpARM64ADDconst {
 24563  				break
 24564  			}
 24565  			c := auxIntToInt64(x.AuxInt)
 24566  			y := x.Args[0]
 24567  			if !(x.Uses == 1) {
 24568  				break
 24569  			}
 24570  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24571  			v0.AuxInt = int32ToAuxInt(int32(c))
 24572  			v0.AddArg(y)
 24573  			b.resetWithControl(BlockARM64LTnoov, v0)
 24574  			return true
 24575  		}
 24576  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 24577  		// cond: z.Uses == 1
 24578  		// result: (LTnoov (CMN x y) yes no)
 24579  		for b.Controls[0].Op == OpARM64CMPconst {
 24580  			v_0 := b.Controls[0]
 24581  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24582  				break
 24583  			}
 24584  			z := v_0.Args[0]
 24585  			if z.Op != OpARM64ADD {
 24586  				break
 24587  			}
 24588  			_ = z.Args[1]
 24589  			z_0 := z.Args[0]
 24590  			z_1 := z.Args[1]
 24591  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24592  				x := z_0
 24593  				y := z_1
 24594  				if !(z.Uses == 1) {
 24595  					continue
 24596  				}
 24597  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24598  				v0.AddArg2(x, y)
 24599  				b.resetWithControl(BlockARM64LTnoov, v0)
 24600  				return true
 24601  			}
 24602  			break
 24603  		}
 24604  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 24605  		// cond: z.Uses == 1
 24606  		// result: (LTnoov (CMNW x y) yes no)
 24607  		for b.Controls[0].Op == OpARM64CMPWconst {
 24608  			v_0 := b.Controls[0]
 24609  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24610  				break
 24611  			}
 24612  			z := v_0.Args[0]
 24613  			if z.Op != OpARM64ADD {
 24614  				break
 24615  			}
 24616  			_ = z.Args[1]
 24617  			z_0 := z.Args[0]
 24618  			z_1 := z.Args[1]
 24619  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24620  				x := z_0
 24621  				y := z_1
 24622  				if !(z.Uses == 1) {
 24623  					continue
 24624  				}
 24625  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24626  				v0.AddArg2(x, y)
 24627  				b.resetWithControl(BlockARM64LTnoov, v0)
 24628  				return true
 24629  			}
 24630  			break
 24631  		}
 24632  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 24633  		// cond: z.Uses==1
 24634  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 24635  		for b.Controls[0].Op == OpARM64CMPconst {
 24636  			v_0 := b.Controls[0]
 24637  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24638  				break
 24639  			}
 24640  			z := v_0.Args[0]
 24641  			if z.Op != OpARM64MADD {
 24642  				break
 24643  			}
 24644  			y := z.Args[2]
 24645  			a := z.Args[0]
 24646  			x := z.Args[1]
 24647  			if !(z.Uses == 1) {
 24648  				break
 24649  			}
 24650  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24651  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24652  			v1.AddArg2(x, y)
 24653  			v0.AddArg2(a, v1)
 24654  			b.resetWithControl(BlockARM64LTnoov, v0)
 24655  			return true
 24656  		}
 24657  		// match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
 24658  		// cond: z.Uses==1
 24659  		// result: (LTnoov (CMP a (MUL <x.Type> x y)) yes no)
 24660  		for b.Controls[0].Op == OpARM64CMPconst {
 24661  			v_0 := b.Controls[0]
 24662  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24663  				break
 24664  			}
 24665  			z := v_0.Args[0]
 24666  			if z.Op != OpARM64MSUB {
 24667  				break
 24668  			}
 24669  			y := z.Args[2]
 24670  			a := z.Args[0]
 24671  			x := z.Args[1]
 24672  			if !(z.Uses == 1) {
 24673  				break
 24674  			}
 24675  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24676  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24677  			v1.AddArg2(x, y)
 24678  			v0.AddArg2(a, v1)
 24679  			b.resetWithControl(BlockARM64LTnoov, v0)
 24680  			return true
 24681  		}
 24682  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 24683  		// cond: z.Uses==1
 24684  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 24685  		for b.Controls[0].Op == OpARM64CMPWconst {
 24686  			v_0 := b.Controls[0]
 24687  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24688  				break
 24689  			}
 24690  			z := v_0.Args[0]
 24691  			if z.Op != OpARM64MADDW {
 24692  				break
 24693  			}
 24694  			y := z.Args[2]
 24695  			a := z.Args[0]
 24696  			x := z.Args[1]
 24697  			if !(z.Uses == 1) {
 24698  				break
 24699  			}
 24700  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24701  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24702  			v1.AddArg2(x, y)
 24703  			v0.AddArg2(a, v1)
 24704  			b.resetWithControl(BlockARM64LTnoov, v0)
 24705  			return true
 24706  		}
 24707  		// match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24708  		// cond: z.Uses==1
 24709  		// result: (LTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24710  		for b.Controls[0].Op == OpARM64CMPWconst {
 24711  			v_0 := b.Controls[0]
 24712  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24713  				break
 24714  			}
 24715  			z := v_0.Args[0]
 24716  			if z.Op != OpARM64MSUBW {
 24717  				break
 24718  			}
 24719  			y := z.Args[2]
 24720  			a := z.Args[0]
 24721  			x := z.Args[1]
 24722  			if !(z.Uses == 1) {
 24723  				break
 24724  			}
 24725  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24726  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24727  			v1.AddArg2(x, y)
 24728  			v0.AddArg2(a, v1)
 24729  			b.resetWithControl(BlockARM64LTnoov, v0)
 24730  			return true
 24731  		}
 24732  		// match: (LT (CMPWconst [0] x) yes no)
 24733  		// result: (TBNZ [31] x yes no)
 24734  		for b.Controls[0].Op == OpARM64CMPWconst {
 24735  			v_0 := b.Controls[0]
 24736  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24737  				break
 24738  			}
 24739  			x := v_0.Args[0]
 24740  			b.resetWithControl(BlockARM64TBNZ, x)
 24741  			b.AuxInt = int64ToAuxInt(31)
 24742  			return true
 24743  		}
 24744  		// match: (LT (CMPconst [0] x) yes no)
 24745  		// result: (TBNZ [63] x yes no)
 24746  		for b.Controls[0].Op == OpARM64CMPconst {
 24747  			v_0 := b.Controls[0]
 24748  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24749  				break
 24750  			}
 24751  			x := v_0.Args[0]
 24752  			b.resetWithControl(BlockARM64TBNZ, x)
 24753  			b.AuxInt = int64ToAuxInt(63)
 24754  			return true
 24755  		}
 24756  		// match: (LT (FlagConstant [fc]) yes no)
 24757  		// cond: fc.lt()
 24758  		// result: (First yes no)
 24759  		for b.Controls[0].Op == OpARM64FlagConstant {
 24760  			v_0 := b.Controls[0]
 24761  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24762  			if !(fc.lt()) {
 24763  				break
 24764  			}
 24765  			b.Reset(BlockFirst)
 24766  			return true
 24767  		}
 24768  		// match: (LT (FlagConstant [fc]) yes no)
 24769  		// cond: !fc.lt()
 24770  		// result: (First no yes)
 24771  		for b.Controls[0].Op == OpARM64FlagConstant {
 24772  			v_0 := b.Controls[0]
 24773  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24774  			if !(!fc.lt()) {
 24775  				break
 24776  			}
 24777  			b.Reset(BlockFirst)
 24778  			b.swapSuccessors()
 24779  			return true
 24780  		}
 24781  		// match: (LT (InvertFlags cmp) yes no)
 24782  		// result: (GT cmp yes no)
 24783  		for b.Controls[0].Op == OpARM64InvertFlags {
 24784  			v_0 := b.Controls[0]
 24785  			cmp := v_0.Args[0]
 24786  			b.resetWithControl(BlockARM64GT, cmp)
 24787  			return true
 24788  		}
 24789  	case BlockARM64LTnoov:
 24790  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24791  		// cond: fc.ltNoov()
 24792  		// result: (First yes no)
 24793  		for b.Controls[0].Op == OpARM64FlagConstant {
 24794  			v_0 := b.Controls[0]
 24795  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24796  			if !(fc.ltNoov()) {
 24797  				break
 24798  			}
 24799  			b.Reset(BlockFirst)
 24800  			return true
 24801  		}
 24802  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24803  		// cond: !fc.ltNoov()
 24804  		// result: (First no yes)
 24805  		for b.Controls[0].Op == OpARM64FlagConstant {
 24806  			v_0 := b.Controls[0]
 24807  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24808  			if !(!fc.ltNoov()) {
 24809  				break
 24810  			}
 24811  			b.Reset(BlockFirst)
 24812  			b.swapSuccessors()
 24813  			return true
 24814  		}
 24815  		// match: (LTnoov (InvertFlags cmp) yes no)
 24816  		// result: (GTnoov cmp yes no)
 24817  		for b.Controls[0].Op == OpARM64InvertFlags {
 24818  			v_0 := b.Controls[0]
 24819  			cmp := v_0.Args[0]
 24820  			b.resetWithControl(BlockARM64GTnoov, cmp)
 24821  			return true
 24822  		}
 24823  	case BlockARM64NE:
 24824  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 24825  		// cond: z.Uses == 1
 24826  		// result: (NE (TST x y) yes no)
 24827  		for b.Controls[0].Op == OpARM64CMPconst {
 24828  			v_0 := b.Controls[0]
 24829  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24830  				break
 24831  			}
 24832  			z := v_0.Args[0]
 24833  			if z.Op != OpARM64AND {
 24834  				break
 24835  			}
 24836  			_ = z.Args[1]
 24837  			z_0 := z.Args[0]
 24838  			z_1 := z.Args[1]
 24839  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24840  				x := z_0
 24841  				y := z_1
 24842  				if !(z.Uses == 1) {
 24843  					continue
 24844  				}
 24845  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24846  				v0.AddArg2(x, y)
 24847  				b.resetWithControl(BlockARM64NE, v0)
 24848  				return true
 24849  			}
 24850  			break
 24851  		}
 24852  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24853  		// cond: x.Uses == 1
 24854  		// result: (NE (TSTconst [c] y) yes no)
 24855  		for b.Controls[0].Op == OpARM64CMPconst {
 24856  			v_0 := b.Controls[0]
 24857  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24858  				break
 24859  			}
 24860  			x := v_0.Args[0]
 24861  			if x.Op != OpARM64ANDconst {
 24862  				break
 24863  			}
 24864  			c := auxIntToInt64(x.AuxInt)
 24865  			y := x.Args[0]
 24866  			if !(x.Uses == 1) {
 24867  				break
 24868  			}
 24869  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24870  			v0.AuxInt = int64ToAuxInt(c)
 24871  			v0.AddArg(y)
 24872  			b.resetWithControl(BlockARM64NE, v0)
 24873  			return true
 24874  		}
 24875  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 24876  		// cond: z.Uses == 1
 24877  		// result: (NE (TSTW x y) yes no)
 24878  		for b.Controls[0].Op == OpARM64CMPWconst {
 24879  			v_0 := b.Controls[0]
 24880  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24881  				break
 24882  			}
 24883  			z := v_0.Args[0]
 24884  			if z.Op != OpARM64AND {
 24885  				break
 24886  			}
 24887  			_ = z.Args[1]
 24888  			z_0 := z.Args[0]
 24889  			z_1 := z.Args[1]
 24890  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24891  				x := z_0
 24892  				y := z_1
 24893  				if !(z.Uses == 1) {
 24894  					continue
 24895  				}
 24896  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24897  				v0.AddArg2(x, y)
 24898  				b.resetWithControl(BlockARM64NE, v0)
 24899  				return true
 24900  			}
 24901  			break
 24902  		}
 24903  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24904  		// cond: x.Uses == 1
 24905  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 24906  		for b.Controls[0].Op == OpARM64CMPWconst {
 24907  			v_0 := b.Controls[0]
 24908  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24909  				break
 24910  			}
 24911  			x := v_0.Args[0]
 24912  			if x.Op != OpARM64ANDconst {
 24913  				break
 24914  			}
 24915  			c := auxIntToInt64(x.AuxInt)
 24916  			y := x.Args[0]
 24917  			if !(x.Uses == 1) {
 24918  				break
 24919  			}
 24920  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24921  			v0.AuxInt = int32ToAuxInt(int32(c))
 24922  			v0.AddArg(y)
 24923  			b.resetWithControl(BlockARM64NE, v0)
 24924  			return true
 24925  		}
 24926  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24927  		// cond: x.Uses == 1
 24928  		// result: (NE (CMNconst [c] y) yes no)
 24929  		for b.Controls[0].Op == OpARM64CMPconst {
 24930  			v_0 := b.Controls[0]
 24931  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24932  				break
 24933  			}
 24934  			x := v_0.Args[0]
 24935  			if x.Op != OpARM64ADDconst {
 24936  				break
 24937  			}
 24938  			c := auxIntToInt64(x.AuxInt)
 24939  			y := x.Args[0]
 24940  			if !(x.Uses == 1) {
 24941  				break
 24942  			}
 24943  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24944  			v0.AuxInt = int64ToAuxInt(c)
 24945  			v0.AddArg(y)
 24946  			b.resetWithControl(BlockARM64NE, v0)
 24947  			return true
 24948  		}
 24949  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24950  		// cond: x.Uses == 1
 24951  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 24952  		for b.Controls[0].Op == OpARM64CMPWconst {
 24953  			v_0 := b.Controls[0]
 24954  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24955  				break
 24956  			}
 24957  			x := v_0.Args[0]
 24958  			if x.Op != OpARM64ADDconst {
 24959  				break
 24960  			}
 24961  			c := auxIntToInt64(x.AuxInt)
 24962  			y := x.Args[0]
 24963  			if !(x.Uses == 1) {
 24964  				break
 24965  			}
 24966  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24967  			v0.AuxInt = int32ToAuxInt(int32(c))
 24968  			v0.AddArg(y)
 24969  			b.resetWithControl(BlockARM64NE, v0)
 24970  			return true
 24971  		}
 24972  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 24973  		// cond: z.Uses == 1
 24974  		// result: (NE (CMN x y) yes no)
 24975  		for b.Controls[0].Op == OpARM64CMPconst {
 24976  			v_0 := b.Controls[0]
 24977  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24978  				break
 24979  			}
 24980  			z := v_0.Args[0]
 24981  			if z.Op != OpARM64ADD {
 24982  				break
 24983  			}
 24984  			_ = z.Args[1]
 24985  			z_0 := z.Args[0]
 24986  			z_1 := z.Args[1]
 24987  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24988  				x := z_0
 24989  				y := z_1
 24990  				if !(z.Uses == 1) {
 24991  					continue
 24992  				}
 24993  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24994  				v0.AddArg2(x, y)
 24995  				b.resetWithControl(BlockARM64NE, v0)
 24996  				return true
 24997  			}
 24998  			break
 24999  		}
 25000  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 25001  		// cond: z.Uses == 1
 25002  		// result: (NE (CMNW x y) yes no)
 25003  		for b.Controls[0].Op == OpARM64CMPWconst {
 25004  			v_0 := b.Controls[0]
 25005  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25006  				break
 25007  			}
 25008  			z := v_0.Args[0]
 25009  			if z.Op != OpARM64ADD {
 25010  				break
 25011  			}
 25012  			_ = z.Args[1]
 25013  			z_0 := z.Args[0]
 25014  			z_1 := z.Args[1]
 25015  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25016  				x := z_0
 25017  				y := z_1
 25018  				if !(z.Uses == 1) {
 25019  					continue
 25020  				}
 25021  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25022  				v0.AddArg2(x, y)
 25023  				b.resetWithControl(BlockARM64NE, v0)
 25024  				return true
 25025  			}
 25026  			break
 25027  		}
 25028  		// match: (NE (CMP x z:(NEG y)) yes no)
 25029  		// cond: z.Uses == 1
 25030  		// result: (NE (CMN x y) yes no)
 25031  		for b.Controls[0].Op == OpARM64CMP {
 25032  			v_0 := b.Controls[0]
 25033  			_ = v_0.Args[1]
 25034  			x := v_0.Args[0]
 25035  			z := v_0.Args[1]
 25036  			if z.Op != OpARM64NEG {
 25037  				break
 25038  			}
 25039  			y := z.Args[0]
 25040  			if !(z.Uses == 1) {
 25041  				break
 25042  			}
 25043  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25044  			v0.AddArg2(x, y)
 25045  			b.resetWithControl(BlockARM64NE, v0)
 25046  			return true
 25047  		}
 25048  		// match: (NE (CMPW x z:(NEG y)) yes no)
 25049  		// cond: z.Uses == 1
 25050  		// result: (NE (CMNW x y) yes no)
 25051  		for b.Controls[0].Op == OpARM64CMPW {
 25052  			v_0 := b.Controls[0]
 25053  			_ = v_0.Args[1]
 25054  			x := v_0.Args[0]
 25055  			z := v_0.Args[1]
 25056  			if z.Op != OpARM64NEG {
 25057  				break
 25058  			}
 25059  			y := z.Args[0]
 25060  			if !(z.Uses == 1) {
 25061  				break
 25062  			}
 25063  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25064  			v0.AddArg2(x, y)
 25065  			b.resetWithControl(BlockARM64NE, v0)
 25066  			return true
 25067  		}
 25068  		// match: (NE (CMPconst [0] x) yes no)
 25069  		// result: (NZ x yes no)
 25070  		for b.Controls[0].Op == OpARM64CMPconst {
 25071  			v_0 := b.Controls[0]
 25072  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25073  				break
 25074  			}
 25075  			x := v_0.Args[0]
 25076  			b.resetWithControl(BlockARM64NZ, x)
 25077  			return true
 25078  		}
 25079  		// match: (NE (CMPWconst [0] x) yes no)
 25080  		// result: (NZW x yes no)
 25081  		for b.Controls[0].Op == OpARM64CMPWconst {
 25082  			v_0 := b.Controls[0]
 25083  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25084  				break
 25085  			}
 25086  			x := v_0.Args[0]
 25087  			b.resetWithControl(BlockARM64NZW, x)
 25088  			return true
 25089  		}
 25090  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 25091  		// cond: z.Uses==1
 25092  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 25093  		for b.Controls[0].Op == OpARM64CMPconst {
 25094  			v_0 := b.Controls[0]
 25095  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25096  				break
 25097  			}
 25098  			z := v_0.Args[0]
 25099  			if z.Op != OpARM64MADD {
 25100  				break
 25101  			}
 25102  			y := z.Args[2]
 25103  			a := z.Args[0]
 25104  			x := z.Args[1]
 25105  			if !(z.Uses == 1) {
 25106  				break
 25107  			}
 25108  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25109  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25110  			v1.AddArg2(x, y)
 25111  			v0.AddArg2(a, v1)
 25112  			b.resetWithControl(BlockARM64NE, v0)
 25113  			return true
 25114  		}
 25115  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 25116  		// cond: z.Uses==1
 25117  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 25118  		for b.Controls[0].Op == OpARM64CMPconst {
 25119  			v_0 := b.Controls[0]
 25120  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25121  				break
 25122  			}
 25123  			z := v_0.Args[0]
 25124  			if z.Op != OpARM64MSUB {
 25125  				break
 25126  			}
 25127  			y := z.Args[2]
 25128  			a := z.Args[0]
 25129  			x := z.Args[1]
 25130  			if !(z.Uses == 1) {
 25131  				break
 25132  			}
 25133  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 25134  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25135  			v1.AddArg2(x, y)
 25136  			v0.AddArg2(a, v1)
 25137  			b.resetWithControl(BlockARM64NE, v0)
 25138  			return true
 25139  		}
 25140  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25141  		// cond: z.Uses==1
 25142  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 25143  		for b.Controls[0].Op == OpARM64CMPWconst {
 25144  			v_0 := b.Controls[0]
 25145  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25146  				break
 25147  			}
 25148  			z := v_0.Args[0]
 25149  			if z.Op != OpARM64MADDW {
 25150  				break
 25151  			}
 25152  			y := z.Args[2]
 25153  			a := z.Args[0]
 25154  			x := z.Args[1]
 25155  			if !(z.Uses == 1) {
 25156  				break
 25157  			}
 25158  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25159  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25160  			v1.AddArg2(x, y)
 25161  			v0.AddArg2(a, v1)
 25162  			b.resetWithControl(BlockARM64NE, v0)
 25163  			return true
 25164  		}
 25165  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 25166  		// cond: z.Uses==1
 25167  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 25168  		for b.Controls[0].Op == OpARM64CMPWconst {
 25169  			v_0 := b.Controls[0]
 25170  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25171  				break
 25172  			}
 25173  			z := v_0.Args[0]
 25174  			if z.Op != OpARM64MSUBW {
 25175  				break
 25176  			}
 25177  			y := z.Args[2]
 25178  			a := z.Args[0]
 25179  			x := z.Args[1]
 25180  			if !(z.Uses == 1) {
 25181  				break
 25182  			}
 25183  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 25184  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25185  			v1.AddArg2(x, y)
 25186  			v0.AddArg2(a, v1)
 25187  			b.resetWithControl(BlockARM64NE, v0)
 25188  			return true
 25189  		}
 25190  		// match: (NE (TSTconst [c] x) yes no)
 25191  		// cond: oneBit(c)
 25192  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 25193  		for b.Controls[0].Op == OpARM64TSTconst {
 25194  			v_0 := b.Controls[0]
 25195  			c := auxIntToInt64(v_0.AuxInt)
 25196  			x := v_0.Args[0]
 25197  			if !(oneBit(c)) {
 25198  				break
 25199  			}
 25200  			b.resetWithControl(BlockARM64TBNZ, x)
 25201  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25202  			return true
 25203  		}
 25204  		// match: (NE (TSTWconst [c] x) yes no)
 25205  		// cond: oneBit(int64(uint32(c)))
 25206  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25207  		for b.Controls[0].Op == OpARM64TSTWconst {
 25208  			v_0 := b.Controls[0]
 25209  			c := auxIntToInt32(v_0.AuxInt)
 25210  			x := v_0.Args[0]
 25211  			if !(oneBit(int64(uint32(c)))) {
 25212  				break
 25213  			}
 25214  			b.resetWithControl(BlockARM64TBNZ, x)
 25215  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25216  			return true
 25217  		}
 25218  		// match: (NE (FlagConstant [fc]) yes no)
 25219  		// cond: fc.ne()
 25220  		// result: (First yes no)
 25221  		for b.Controls[0].Op == OpARM64FlagConstant {
 25222  			v_0 := b.Controls[0]
 25223  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25224  			if !(fc.ne()) {
 25225  				break
 25226  			}
 25227  			b.Reset(BlockFirst)
 25228  			return true
 25229  		}
 25230  		// match: (NE (FlagConstant [fc]) yes no)
 25231  		// cond: !fc.ne()
 25232  		// result: (First no yes)
 25233  		for b.Controls[0].Op == OpARM64FlagConstant {
 25234  			v_0 := b.Controls[0]
 25235  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25236  			if !(!fc.ne()) {
 25237  				break
 25238  			}
 25239  			b.Reset(BlockFirst)
 25240  			b.swapSuccessors()
 25241  			return true
 25242  		}
 25243  		// match: (NE (InvertFlags cmp) yes no)
 25244  		// result: (NE cmp yes no)
 25245  		for b.Controls[0].Op == OpARM64InvertFlags {
 25246  			v_0 := b.Controls[0]
 25247  			cmp := v_0.Args[0]
 25248  			b.resetWithControl(BlockARM64NE, cmp)
 25249  			return true
 25250  		}
 25251  	case BlockARM64NZ:
 25252  		// match: (NZ (Equal cc) yes no)
 25253  		// result: (EQ cc yes no)
 25254  		for b.Controls[0].Op == OpARM64Equal {
 25255  			v_0 := b.Controls[0]
 25256  			cc := v_0.Args[0]
 25257  			b.resetWithControl(BlockARM64EQ, cc)
 25258  			return true
 25259  		}
 25260  		// match: (NZ (NotEqual cc) yes no)
 25261  		// result: (NE cc yes no)
 25262  		for b.Controls[0].Op == OpARM64NotEqual {
 25263  			v_0 := b.Controls[0]
 25264  			cc := v_0.Args[0]
 25265  			b.resetWithControl(BlockARM64NE, cc)
 25266  			return true
 25267  		}
 25268  		// match: (NZ (LessThan cc) yes no)
 25269  		// result: (LT cc yes no)
 25270  		for b.Controls[0].Op == OpARM64LessThan {
 25271  			v_0 := b.Controls[0]
 25272  			cc := v_0.Args[0]
 25273  			b.resetWithControl(BlockARM64LT, cc)
 25274  			return true
 25275  		}
 25276  		// match: (NZ (LessThanU cc) yes no)
 25277  		// result: (ULT cc yes no)
 25278  		for b.Controls[0].Op == OpARM64LessThanU {
 25279  			v_0 := b.Controls[0]
 25280  			cc := v_0.Args[0]
 25281  			b.resetWithControl(BlockARM64ULT, cc)
 25282  			return true
 25283  		}
 25284  		// match: (NZ (LessEqual cc) yes no)
 25285  		// result: (LE cc yes no)
 25286  		for b.Controls[0].Op == OpARM64LessEqual {
 25287  			v_0 := b.Controls[0]
 25288  			cc := v_0.Args[0]
 25289  			b.resetWithControl(BlockARM64LE, cc)
 25290  			return true
 25291  		}
 25292  		// match: (NZ (LessEqualU cc) yes no)
 25293  		// result: (ULE cc yes no)
 25294  		for b.Controls[0].Op == OpARM64LessEqualU {
 25295  			v_0 := b.Controls[0]
 25296  			cc := v_0.Args[0]
 25297  			b.resetWithControl(BlockARM64ULE, cc)
 25298  			return true
 25299  		}
 25300  		// match: (NZ (GreaterThan cc) yes no)
 25301  		// result: (GT cc yes no)
 25302  		for b.Controls[0].Op == OpARM64GreaterThan {
 25303  			v_0 := b.Controls[0]
 25304  			cc := v_0.Args[0]
 25305  			b.resetWithControl(BlockARM64GT, cc)
 25306  			return true
 25307  		}
 25308  		// match: (NZ (GreaterThanU cc) yes no)
 25309  		// result: (UGT cc yes no)
 25310  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25311  			v_0 := b.Controls[0]
 25312  			cc := v_0.Args[0]
 25313  			b.resetWithControl(BlockARM64UGT, cc)
 25314  			return true
 25315  		}
 25316  		// match: (NZ (GreaterEqual cc) yes no)
 25317  		// result: (GE cc yes no)
 25318  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25319  			v_0 := b.Controls[0]
 25320  			cc := v_0.Args[0]
 25321  			b.resetWithControl(BlockARM64GE, cc)
 25322  			return true
 25323  		}
 25324  		// match: (NZ (GreaterEqualU cc) yes no)
 25325  		// result: (UGE cc yes no)
 25326  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25327  			v_0 := b.Controls[0]
 25328  			cc := v_0.Args[0]
 25329  			b.resetWithControl(BlockARM64UGE, cc)
 25330  			return true
 25331  		}
 25332  		// match: (NZ (LessThanF cc) yes no)
 25333  		// result: (FLT cc yes no)
 25334  		for b.Controls[0].Op == OpARM64LessThanF {
 25335  			v_0 := b.Controls[0]
 25336  			cc := v_0.Args[0]
 25337  			b.resetWithControl(BlockARM64FLT, cc)
 25338  			return true
 25339  		}
 25340  		// match: (NZ (LessEqualF cc) yes no)
 25341  		// result: (FLE cc yes no)
 25342  		for b.Controls[0].Op == OpARM64LessEqualF {
 25343  			v_0 := b.Controls[0]
 25344  			cc := v_0.Args[0]
 25345  			b.resetWithControl(BlockARM64FLE, cc)
 25346  			return true
 25347  		}
 25348  		// match: (NZ (GreaterThanF cc) yes no)
 25349  		// result: (FGT cc yes no)
 25350  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25351  			v_0 := b.Controls[0]
 25352  			cc := v_0.Args[0]
 25353  			b.resetWithControl(BlockARM64FGT, cc)
 25354  			return true
 25355  		}
 25356  		// match: (NZ (GreaterEqualF cc) yes no)
 25357  		// result: (FGE cc yes no)
 25358  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25359  			v_0 := b.Controls[0]
 25360  			cc := v_0.Args[0]
 25361  			b.resetWithControl(BlockARM64FGE, cc)
 25362  			return true
 25363  		}
 25364  		// match: (NZ sub:(SUB x y))
 25365  		// cond: sub.Uses == 1
 25366  		// result: (NE (CMP x y))
 25367  		for b.Controls[0].Op == OpARM64SUB {
 25368  			sub := b.Controls[0]
 25369  			y := sub.Args[1]
 25370  			x := sub.Args[0]
 25371  			if !(sub.Uses == 1) {
 25372  				break
 25373  			}
 25374  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 25375  			v0.AddArg2(x, y)
 25376  			b.resetWithControl(BlockARM64NE, v0)
 25377  			return true
 25378  		}
 25379  		// match: (NZ sub:(SUBconst [c] y))
 25380  		// cond: sub.Uses == 1
 25381  		// result: (NE (CMPconst [c] y))
 25382  		for b.Controls[0].Op == OpARM64SUBconst {
 25383  			sub := b.Controls[0]
 25384  			c := auxIntToInt64(sub.AuxInt)
 25385  			y := sub.Args[0]
 25386  			if !(sub.Uses == 1) {
 25387  				break
 25388  			}
 25389  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 25390  			v0.AuxInt = int64ToAuxInt(c)
 25391  			v0.AddArg(y)
 25392  			b.resetWithControl(BlockARM64NE, v0)
 25393  			return true
 25394  		}
 25395  		// match: (NZ (ANDconst [c] x) yes no)
 25396  		// cond: oneBit(c)
 25397  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 25398  		for b.Controls[0].Op == OpARM64ANDconst {
 25399  			v_0 := b.Controls[0]
 25400  			c := auxIntToInt64(v_0.AuxInt)
 25401  			x := v_0.Args[0]
 25402  			if !(oneBit(c)) {
 25403  				break
 25404  			}
 25405  			b.resetWithControl(BlockARM64TBNZ, x)
 25406  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25407  			return true
 25408  		}
 25409  		// match: (NZ (MOVDconst [0]) yes no)
 25410  		// result: (First no yes)
 25411  		for b.Controls[0].Op == OpARM64MOVDconst {
 25412  			v_0 := b.Controls[0]
 25413  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25414  				break
 25415  			}
 25416  			b.Reset(BlockFirst)
 25417  			b.swapSuccessors()
 25418  			return true
 25419  		}
 25420  		// match: (NZ (MOVDconst [c]) yes no)
 25421  		// cond: c != 0
 25422  		// result: (First yes no)
 25423  		for b.Controls[0].Op == OpARM64MOVDconst {
 25424  			v_0 := b.Controls[0]
 25425  			c := auxIntToInt64(v_0.AuxInt)
 25426  			if !(c != 0) {
 25427  				break
 25428  			}
 25429  			b.Reset(BlockFirst)
 25430  			return true
 25431  		}
 25432  	case BlockARM64NZW:
 25433  		// match: (NZW sub:(SUB x y))
 25434  		// cond: sub.Uses == 1
 25435  		// result: (NE (CMPW x y))
 25436  		for b.Controls[0].Op == OpARM64SUB {
 25437  			sub := b.Controls[0]
 25438  			y := sub.Args[1]
 25439  			x := sub.Args[0]
 25440  			if !(sub.Uses == 1) {
 25441  				break
 25442  			}
 25443  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 25444  			v0.AddArg2(x, y)
 25445  			b.resetWithControl(BlockARM64NE, v0)
 25446  			return true
 25447  		}
 25448  		// match: (NZW sub:(SUBconst [c] y))
 25449  		// cond: sub.Uses == 1
 25450  		// result: (NE (CMPWconst [int32(c)] y))
 25451  		for b.Controls[0].Op == OpARM64SUBconst {
 25452  			sub := b.Controls[0]
 25453  			c := auxIntToInt64(sub.AuxInt)
 25454  			y := sub.Args[0]
 25455  			if !(sub.Uses == 1) {
 25456  				break
 25457  			}
 25458  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 25459  			v0.AuxInt = int32ToAuxInt(int32(c))
 25460  			v0.AddArg(y)
 25461  			b.resetWithControl(BlockARM64NE, v0)
 25462  			return true
 25463  		}
 25464  		// match: (NZW (ANDconst [c] x) yes no)
 25465  		// cond: oneBit(int64(uint32(c)))
 25466  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25467  		for b.Controls[0].Op == OpARM64ANDconst {
 25468  			v_0 := b.Controls[0]
 25469  			c := auxIntToInt64(v_0.AuxInt)
 25470  			x := v_0.Args[0]
 25471  			if !(oneBit(int64(uint32(c)))) {
 25472  				break
 25473  			}
 25474  			b.resetWithControl(BlockARM64TBNZ, x)
 25475  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25476  			return true
 25477  		}
 25478  		// match: (NZW (MOVDconst [c]) yes no)
 25479  		// cond: int32(c) == 0
 25480  		// result: (First no yes)
 25481  		for b.Controls[0].Op == OpARM64MOVDconst {
 25482  			v_0 := b.Controls[0]
 25483  			c := auxIntToInt64(v_0.AuxInt)
 25484  			if !(int32(c) == 0) {
 25485  				break
 25486  			}
 25487  			b.Reset(BlockFirst)
 25488  			b.swapSuccessors()
 25489  			return true
 25490  		}
 25491  		// match: (NZW (MOVDconst [c]) yes no)
 25492  		// cond: int32(c) != 0
 25493  		// result: (First yes no)
 25494  		for b.Controls[0].Op == OpARM64MOVDconst {
 25495  			v_0 := b.Controls[0]
 25496  			c := auxIntToInt64(v_0.AuxInt)
 25497  			if !(int32(c) != 0) {
 25498  				break
 25499  			}
 25500  			b.Reset(BlockFirst)
 25501  			return true
 25502  		}
 25503  	case BlockARM64TBNZ:
 25504  		// match: (TBNZ [0] (Equal cc) yes no)
 25505  		// result: (EQ cc yes no)
 25506  		for b.Controls[0].Op == OpARM64Equal {
 25507  			v_0 := b.Controls[0]
 25508  			cc := v_0.Args[0]
 25509  			if auxIntToInt64(b.AuxInt) != 0 {
 25510  				break
 25511  			}
 25512  			b.resetWithControl(BlockARM64EQ, cc)
 25513  			return true
 25514  		}
 25515  		// match: (TBNZ [0] (NotEqual cc) yes no)
 25516  		// result: (NE cc yes no)
 25517  		for b.Controls[0].Op == OpARM64NotEqual {
 25518  			v_0 := b.Controls[0]
 25519  			cc := v_0.Args[0]
 25520  			if auxIntToInt64(b.AuxInt) != 0 {
 25521  				break
 25522  			}
 25523  			b.resetWithControl(BlockARM64NE, cc)
 25524  			return true
 25525  		}
 25526  		// match: (TBNZ [0] (LessThan cc) yes no)
 25527  		// result: (LT cc yes no)
 25528  		for b.Controls[0].Op == OpARM64LessThan {
 25529  			v_0 := b.Controls[0]
 25530  			cc := v_0.Args[0]
 25531  			if auxIntToInt64(b.AuxInt) != 0 {
 25532  				break
 25533  			}
 25534  			b.resetWithControl(BlockARM64LT, cc)
 25535  			return true
 25536  		}
 25537  		// match: (TBNZ [0] (LessThanU cc) yes no)
 25538  		// result: (ULT cc yes no)
 25539  		for b.Controls[0].Op == OpARM64LessThanU {
 25540  			v_0 := b.Controls[0]
 25541  			cc := v_0.Args[0]
 25542  			if auxIntToInt64(b.AuxInt) != 0 {
 25543  				break
 25544  			}
 25545  			b.resetWithControl(BlockARM64ULT, cc)
 25546  			return true
 25547  		}
 25548  		// match: (TBNZ [0] (LessEqual cc) yes no)
 25549  		// result: (LE cc yes no)
 25550  		for b.Controls[0].Op == OpARM64LessEqual {
 25551  			v_0 := b.Controls[0]
 25552  			cc := v_0.Args[0]
 25553  			if auxIntToInt64(b.AuxInt) != 0 {
 25554  				break
 25555  			}
 25556  			b.resetWithControl(BlockARM64LE, cc)
 25557  			return true
 25558  		}
 25559  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 25560  		// result: (ULE cc yes no)
 25561  		for b.Controls[0].Op == OpARM64LessEqualU {
 25562  			v_0 := b.Controls[0]
 25563  			cc := v_0.Args[0]
 25564  			if auxIntToInt64(b.AuxInt) != 0 {
 25565  				break
 25566  			}
 25567  			b.resetWithControl(BlockARM64ULE, cc)
 25568  			return true
 25569  		}
 25570  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 25571  		// result: (GT cc yes no)
 25572  		for b.Controls[0].Op == OpARM64GreaterThan {
 25573  			v_0 := b.Controls[0]
 25574  			cc := v_0.Args[0]
 25575  			if auxIntToInt64(b.AuxInt) != 0 {
 25576  				break
 25577  			}
 25578  			b.resetWithControl(BlockARM64GT, cc)
 25579  			return true
 25580  		}
 25581  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 25582  		// result: (UGT cc yes no)
 25583  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25584  			v_0 := b.Controls[0]
 25585  			cc := v_0.Args[0]
 25586  			if auxIntToInt64(b.AuxInt) != 0 {
 25587  				break
 25588  			}
 25589  			b.resetWithControl(BlockARM64UGT, cc)
 25590  			return true
 25591  		}
 25592  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 25593  		// result: (GE cc yes no)
 25594  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25595  			v_0 := b.Controls[0]
 25596  			cc := v_0.Args[0]
 25597  			if auxIntToInt64(b.AuxInt) != 0 {
 25598  				break
 25599  			}
 25600  			b.resetWithControl(BlockARM64GE, cc)
 25601  			return true
 25602  		}
 25603  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 25604  		// result: (UGE cc yes no)
 25605  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25606  			v_0 := b.Controls[0]
 25607  			cc := v_0.Args[0]
 25608  			if auxIntToInt64(b.AuxInt) != 0 {
 25609  				break
 25610  			}
 25611  			b.resetWithControl(BlockARM64UGE, cc)
 25612  			return true
 25613  		}
 25614  		// match: (TBNZ [0] (LessThanF cc) yes no)
 25615  		// result: (FLT cc yes no)
 25616  		for b.Controls[0].Op == OpARM64LessThanF {
 25617  			v_0 := b.Controls[0]
 25618  			cc := v_0.Args[0]
 25619  			if auxIntToInt64(b.AuxInt) != 0 {
 25620  				break
 25621  			}
 25622  			b.resetWithControl(BlockARM64FLT, cc)
 25623  			return true
 25624  		}
 25625  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 25626  		// result: (FLE cc yes no)
 25627  		for b.Controls[0].Op == OpARM64LessEqualF {
 25628  			v_0 := b.Controls[0]
 25629  			cc := v_0.Args[0]
 25630  			if auxIntToInt64(b.AuxInt) != 0 {
 25631  				break
 25632  			}
 25633  			b.resetWithControl(BlockARM64FLE, cc)
 25634  			return true
 25635  		}
 25636  		// match: (TBNZ [0] (GreaterThanF cc) yes no)
 25637  		// result: (FGT cc yes no)
 25638  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25639  			v_0 := b.Controls[0]
 25640  			cc := v_0.Args[0]
 25641  			if auxIntToInt64(b.AuxInt) != 0 {
 25642  				break
 25643  			}
 25644  			b.resetWithControl(BlockARM64FGT, cc)
 25645  			return true
 25646  		}
 25647  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 25648  		// result: (FGE cc yes no)
 25649  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25650  			v_0 := b.Controls[0]
 25651  			cc := v_0.Args[0]
 25652  			if auxIntToInt64(b.AuxInt) != 0 {
 25653  				break
 25654  			}
 25655  			b.resetWithControl(BlockARM64FGE, cc)
 25656  			return true
 25657  		}
 25658  		// match: (TBNZ [0] (XORconst [1] x) yes no)
 25659  		// result: (TBZ [0] x yes no)
 25660  		for b.Controls[0].Op == OpARM64XORconst {
 25661  			v_0 := b.Controls[0]
 25662  			if auxIntToInt64(v_0.AuxInt) != 1 {
 25663  				break
 25664  			}
 25665  			x := v_0.Args[0]
 25666  			if auxIntToInt64(b.AuxInt) != 0 {
 25667  				break
 25668  			}
 25669  			b.resetWithControl(BlockARM64TBZ, x)
 25670  			b.AuxInt = int64ToAuxInt(0)
 25671  			return true
 25672  		}
 25673  	case BlockARM64TBZ:
 25674  		// match: (TBZ [0] (XORconst [1] x) yes no)
 25675  		// result: (TBNZ [0] x yes no)
 25676  		for b.Controls[0].Op == OpARM64XORconst {
 25677  			v_0 := b.Controls[0]
 25678  			if auxIntToInt64(v_0.AuxInt) != 1 {
 25679  				break
 25680  			}
 25681  			x := v_0.Args[0]
 25682  			if auxIntToInt64(b.AuxInt) != 0 {
 25683  				break
 25684  			}
 25685  			b.resetWithControl(BlockARM64TBNZ, x)
 25686  			b.AuxInt = int64ToAuxInt(0)
 25687  			return true
 25688  		}
 25689  	case BlockARM64UGE:
 25690  		// match: (UGE (FlagConstant [fc]) yes no)
 25691  		// cond: fc.uge()
 25692  		// result: (First yes no)
 25693  		for b.Controls[0].Op == OpARM64FlagConstant {
 25694  			v_0 := b.Controls[0]
 25695  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25696  			if !(fc.uge()) {
 25697  				break
 25698  			}
 25699  			b.Reset(BlockFirst)
 25700  			return true
 25701  		}
 25702  		// match: (UGE (FlagConstant [fc]) yes no)
 25703  		// cond: !fc.uge()
 25704  		// result: (First no yes)
 25705  		for b.Controls[0].Op == OpARM64FlagConstant {
 25706  			v_0 := b.Controls[0]
 25707  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25708  			if !(!fc.uge()) {
 25709  				break
 25710  			}
 25711  			b.Reset(BlockFirst)
 25712  			b.swapSuccessors()
 25713  			return true
 25714  		}
 25715  		// match: (UGE (InvertFlags cmp) yes no)
 25716  		// result: (ULE cmp yes no)
 25717  		for b.Controls[0].Op == OpARM64InvertFlags {
 25718  			v_0 := b.Controls[0]
 25719  			cmp := v_0.Args[0]
 25720  			b.resetWithControl(BlockARM64ULE, cmp)
 25721  			return true
 25722  		}
 25723  	case BlockARM64UGT:
 25724  		// match: (UGT (CMPconst [0] x))
 25725  		// result: (NE (CMPconst [0] x))
 25726  		for b.Controls[0].Op == OpARM64CMPconst {
 25727  			v_0 := b.Controls[0]
 25728  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25729  				break
 25730  			}
 25731  			x := v_0.Args[0]
 25732  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 25733  			v0.AuxInt = int64ToAuxInt(0)
 25734  			v0.AddArg(x)
 25735  			b.resetWithControl(BlockARM64NE, v0)
 25736  			return true
 25737  		}
 25738  		// match: (UGT (CMPWconst [0] x))
 25739  		// result: (NE (CMPWconst [0] x))
 25740  		for b.Controls[0].Op == OpARM64CMPWconst {
 25741  			v_0 := b.Controls[0]
 25742  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25743  				break
 25744  			}
 25745  			x := v_0.Args[0]
 25746  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 25747  			v0.AuxInt = int32ToAuxInt(0)
 25748  			v0.AddArg(x)
 25749  			b.resetWithControl(BlockARM64NE, v0)
 25750  			return true
 25751  		}
 25752  		// match: (UGT (FlagConstant [fc]) yes no)
 25753  		// cond: fc.ugt()
 25754  		// result: (First yes no)
 25755  		for b.Controls[0].Op == OpARM64FlagConstant {
 25756  			v_0 := b.Controls[0]
 25757  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25758  			if !(fc.ugt()) {
 25759  				break
 25760  			}
 25761  			b.Reset(BlockFirst)
 25762  			return true
 25763  		}
 25764  		// match: (UGT (FlagConstant [fc]) yes no)
 25765  		// cond: !fc.ugt()
 25766  		// result: (First no yes)
 25767  		for b.Controls[0].Op == OpARM64FlagConstant {
 25768  			v_0 := b.Controls[0]
 25769  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25770  			if !(!fc.ugt()) {
 25771  				break
 25772  			}
 25773  			b.Reset(BlockFirst)
 25774  			b.swapSuccessors()
 25775  			return true
 25776  		}
 25777  		// match: (UGT (InvertFlags cmp) yes no)
 25778  		// result: (ULT cmp yes no)
 25779  		for b.Controls[0].Op == OpARM64InvertFlags {
 25780  			v_0 := b.Controls[0]
 25781  			cmp := v_0.Args[0]
 25782  			b.resetWithControl(BlockARM64ULT, cmp)
 25783  			return true
 25784  		}
 25785  	case BlockARM64ULE:
 25786  		// match: (ULE (CMPconst [0] x))
 25787  		// result: (EQ (CMPconst [0] x))
 25788  		for b.Controls[0].Op == OpARM64CMPconst {
 25789  			v_0 := b.Controls[0]
 25790  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25791  				break
 25792  			}
 25793  			x := v_0.Args[0]
 25794  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPconst, types.TypeFlags)
 25795  			v0.AuxInt = int64ToAuxInt(0)
 25796  			v0.AddArg(x)
 25797  			b.resetWithControl(BlockARM64EQ, v0)
 25798  			return true
 25799  		}
 25800  		// match: (ULE (CMPWconst [0] x))
 25801  		// result: (EQ (CMPWconst [0] x))
 25802  		for b.Controls[0].Op == OpARM64CMPWconst {
 25803  			v_0 := b.Controls[0]
 25804  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25805  				break
 25806  			}
 25807  			x := v_0.Args[0]
 25808  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPWconst, types.TypeFlags)
 25809  			v0.AuxInt = int32ToAuxInt(0)
 25810  			v0.AddArg(x)
 25811  			b.resetWithControl(BlockARM64EQ, v0)
 25812  			return true
 25813  		}
 25814  		// match: (ULE (FlagConstant [fc]) yes no)
 25815  		// cond: fc.ule()
 25816  		// result: (First yes no)
 25817  		for b.Controls[0].Op == OpARM64FlagConstant {
 25818  			v_0 := b.Controls[0]
 25819  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25820  			if !(fc.ule()) {
 25821  				break
 25822  			}
 25823  			b.Reset(BlockFirst)
 25824  			return true
 25825  		}
 25826  		// match: (ULE (FlagConstant [fc]) yes no)
 25827  		// cond: !fc.ule()
 25828  		// result: (First no yes)
 25829  		for b.Controls[0].Op == OpARM64FlagConstant {
 25830  			v_0 := b.Controls[0]
 25831  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25832  			if !(!fc.ule()) {
 25833  				break
 25834  			}
 25835  			b.Reset(BlockFirst)
 25836  			b.swapSuccessors()
 25837  			return true
 25838  		}
 25839  		// match: (ULE (InvertFlags cmp) yes no)
 25840  		// result: (UGE cmp yes no)
 25841  		for b.Controls[0].Op == OpARM64InvertFlags {
 25842  			v_0 := b.Controls[0]
 25843  			cmp := v_0.Args[0]
 25844  			b.resetWithControl(BlockARM64UGE, cmp)
 25845  			return true
 25846  		}
 25847  	case BlockARM64ULT:
 25848  		// match: (ULT (FlagConstant [fc]) yes no)
 25849  		// cond: fc.ult()
 25850  		// result: (First yes no)
 25851  		for b.Controls[0].Op == OpARM64FlagConstant {
 25852  			v_0 := b.Controls[0]
 25853  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25854  			if !(fc.ult()) {
 25855  				break
 25856  			}
 25857  			b.Reset(BlockFirst)
 25858  			return true
 25859  		}
 25860  		// match: (ULT (FlagConstant [fc]) yes no)
 25861  		// cond: !fc.ult()
 25862  		// result: (First no yes)
 25863  		for b.Controls[0].Op == OpARM64FlagConstant {
 25864  			v_0 := b.Controls[0]
 25865  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25866  			if !(!fc.ult()) {
 25867  				break
 25868  			}
 25869  			b.Reset(BlockFirst)
 25870  			b.swapSuccessors()
 25871  			return true
 25872  		}
 25873  		// match: (ULT (InvertFlags cmp) yes no)
 25874  		// result: (UGT cmp yes no)
 25875  		for b.Controls[0].Op == OpARM64InvertFlags {
 25876  			v_0 := b.Controls[0]
 25877  			cmp := v_0.Args[0]
 25878  			b.resetWithControl(BlockARM64UGT, cmp)
 25879  			return true
 25880  		}
 25881  	case BlockARM64Z:
 25882  		// match: (Z sub:(SUB x y))
 25883  		// cond: sub.Uses == 1
 25884  		// result: (EQ (CMP x y))
 25885  		for b.Controls[0].Op == OpARM64SUB {
 25886  			sub := b.Controls[0]
 25887  			y := sub.Args[1]
 25888  			x := sub.Args[0]
 25889  			if !(sub.Uses == 1) {
 25890  				break
 25891  			}
 25892  			v0 := b.NewValue0(sub.Pos, OpARM64CMP, types.TypeFlags)
 25893  			v0.AddArg2(x, y)
 25894  			b.resetWithControl(BlockARM64EQ, v0)
 25895  			return true
 25896  		}
 25897  		// match: (Z sub:(SUBconst [c] y))
 25898  		// cond: sub.Uses == 1
 25899  		// result: (EQ (CMPconst [c] y))
 25900  		for b.Controls[0].Op == OpARM64SUBconst {
 25901  			sub := b.Controls[0]
 25902  			c := auxIntToInt64(sub.AuxInt)
 25903  			y := sub.Args[0]
 25904  			if !(sub.Uses == 1) {
 25905  				break
 25906  			}
 25907  			v0 := b.NewValue0(sub.Pos, OpARM64CMPconst, types.TypeFlags)
 25908  			v0.AuxInt = int64ToAuxInt(c)
 25909  			v0.AddArg(y)
 25910  			b.resetWithControl(BlockARM64EQ, v0)
 25911  			return true
 25912  		}
 25913  		// match: (Z (ANDconst [c] x) yes no)
 25914  		// cond: oneBit(c)
 25915  		// result: (TBZ [int64(ntz64(c))] x yes no)
 25916  		for b.Controls[0].Op == OpARM64ANDconst {
 25917  			v_0 := b.Controls[0]
 25918  			c := auxIntToInt64(v_0.AuxInt)
 25919  			x := v_0.Args[0]
 25920  			if !(oneBit(c)) {
 25921  				break
 25922  			}
 25923  			b.resetWithControl(BlockARM64TBZ, x)
 25924  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25925  			return true
 25926  		}
 25927  		// match: (Z (MOVDconst [0]) yes no)
 25928  		// result: (First yes no)
 25929  		for b.Controls[0].Op == OpARM64MOVDconst {
 25930  			v_0 := b.Controls[0]
 25931  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25932  				break
 25933  			}
 25934  			b.Reset(BlockFirst)
 25935  			return true
 25936  		}
 25937  		// match: (Z (MOVDconst [c]) yes no)
 25938  		// cond: c != 0
 25939  		// result: (First no yes)
 25940  		for b.Controls[0].Op == OpARM64MOVDconst {
 25941  			v_0 := b.Controls[0]
 25942  			c := auxIntToInt64(v_0.AuxInt)
 25943  			if !(c != 0) {
 25944  				break
 25945  			}
 25946  			b.Reset(BlockFirst)
 25947  			b.swapSuccessors()
 25948  			return true
 25949  		}
 25950  	case BlockARM64ZW:
 25951  		// match: (ZW sub:(SUB x y))
 25952  		// cond: sub.Uses == 1
 25953  		// result: (EQ (CMPW x y))
 25954  		for b.Controls[0].Op == OpARM64SUB {
 25955  			sub := b.Controls[0]
 25956  			y := sub.Args[1]
 25957  			x := sub.Args[0]
 25958  			if !(sub.Uses == 1) {
 25959  				break
 25960  			}
 25961  			v0 := b.NewValue0(sub.Pos, OpARM64CMPW, types.TypeFlags)
 25962  			v0.AddArg2(x, y)
 25963  			b.resetWithControl(BlockARM64EQ, v0)
 25964  			return true
 25965  		}
 25966  		// match: (ZW sub:(SUBconst [c] y))
 25967  		// cond: sub.Uses == 1
 25968  		// result: (EQ (CMPWconst [int32(c)] y))
 25969  		for b.Controls[0].Op == OpARM64SUBconst {
 25970  			sub := b.Controls[0]
 25971  			c := auxIntToInt64(sub.AuxInt)
 25972  			y := sub.Args[0]
 25973  			if !(sub.Uses == 1) {
 25974  				break
 25975  			}
 25976  			v0 := b.NewValue0(sub.Pos, OpARM64CMPWconst, types.TypeFlags)
 25977  			v0.AuxInt = int32ToAuxInt(int32(c))
 25978  			v0.AddArg(y)
 25979  			b.resetWithControl(BlockARM64EQ, v0)
 25980  			return true
 25981  		}
 25982  		// match: (ZW (ANDconst [c] x) yes no)
 25983  		// cond: oneBit(int64(uint32(c)))
 25984  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25985  		for b.Controls[0].Op == OpARM64ANDconst {
 25986  			v_0 := b.Controls[0]
 25987  			c := auxIntToInt64(v_0.AuxInt)
 25988  			x := v_0.Args[0]
 25989  			if !(oneBit(int64(uint32(c)))) {
 25990  				break
 25991  			}
 25992  			b.resetWithControl(BlockARM64TBZ, x)
 25993  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25994  			return true
 25995  		}
 25996  		// match: (ZW (MOVDconst [c]) yes no)
 25997  		// cond: int32(c) == 0
 25998  		// result: (First yes no)
 25999  		for b.Controls[0].Op == OpARM64MOVDconst {
 26000  			v_0 := b.Controls[0]
 26001  			c := auxIntToInt64(v_0.AuxInt)
 26002  			if !(int32(c) == 0) {
 26003  				break
 26004  			}
 26005  			b.Reset(BlockFirst)
 26006  			return true
 26007  		}
 26008  		// match: (ZW (MOVDconst [c]) yes no)
 26009  		// cond: int32(c) != 0
 26010  		// result: (First no yes)
 26011  		for b.Controls[0].Op == OpARM64MOVDconst {
 26012  			v_0 := b.Controls[0]
 26013  			c := auxIntToInt64(v_0.AuxInt)
 26014  			if !(int32(c) != 0) {
 26015  				break
 26016  			}
 26017  			b.Reset(BlockFirst)
 26018  			b.swapSuccessors()
 26019  			return true
 26020  		}
 26021  	}
 26022  	return false
 26023  }
 26024  

View as plain text