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

     1  // Code generated from _gen/ARM64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "cmd/compile/internal/types"
     6  
     7  func rewriteValueARM64(v *Value) bool {
     8  	switch v.Op {
     9  	case OpARM64ADCSflags:
    10  		return rewriteValueARM64_OpARM64ADCSflags(v)
    11  	case OpARM64ADD:
    12  		return rewriteValueARM64_OpARM64ADD(v)
    13  	case OpARM64ADDSflags:
    14  		return rewriteValueARM64_OpARM64ADDSflags(v)
    15  	case OpARM64ADDconst:
    16  		return rewriteValueARM64_OpARM64ADDconst(v)
    17  	case OpARM64ADDshiftLL:
    18  		return rewriteValueARM64_OpARM64ADDshiftLL(v)
    19  	case OpARM64ADDshiftRA:
    20  		return rewriteValueARM64_OpARM64ADDshiftRA(v)
    21  	case OpARM64ADDshiftRL:
    22  		return rewriteValueARM64_OpARM64ADDshiftRL(v)
    23  	case OpARM64AND:
    24  		return rewriteValueARM64_OpARM64AND(v)
    25  	case OpARM64ANDconst:
    26  		return rewriteValueARM64_OpARM64ANDconst(v)
    27  	case OpARM64ANDshiftLL:
    28  		return rewriteValueARM64_OpARM64ANDshiftLL(v)
    29  	case OpARM64ANDshiftRA:
    30  		return rewriteValueARM64_OpARM64ANDshiftRA(v)
    31  	case OpARM64ANDshiftRL:
    32  		return rewriteValueARM64_OpARM64ANDshiftRL(v)
    33  	case OpARM64ANDshiftRO:
    34  		return rewriteValueARM64_OpARM64ANDshiftRO(v)
    35  	case OpARM64BIC:
    36  		return rewriteValueARM64_OpARM64BIC(v)
    37  	case OpARM64BICshiftLL:
    38  		return rewriteValueARM64_OpARM64BICshiftLL(v)
    39  	case OpARM64BICshiftRA:
    40  		return rewriteValueARM64_OpARM64BICshiftRA(v)
    41  	case OpARM64BICshiftRL:
    42  		return rewriteValueARM64_OpARM64BICshiftRL(v)
    43  	case OpARM64BICshiftRO:
    44  		return rewriteValueARM64_OpARM64BICshiftRO(v)
    45  	case OpARM64CMN:
    46  		return rewriteValueARM64_OpARM64CMN(v)
    47  	case OpARM64CMNW:
    48  		return rewriteValueARM64_OpARM64CMNW(v)
    49  	case OpARM64CMNWconst:
    50  		return rewriteValueARM64_OpARM64CMNWconst(v)
    51  	case OpARM64CMNconst:
    52  		return rewriteValueARM64_OpARM64CMNconst(v)
    53  	case OpARM64CMNshiftLL:
    54  		return rewriteValueARM64_OpARM64CMNshiftLL(v)
    55  	case OpARM64CMNshiftRA:
    56  		return rewriteValueARM64_OpARM64CMNshiftRA(v)
    57  	case OpARM64CMNshiftRL:
    58  		return rewriteValueARM64_OpARM64CMNshiftRL(v)
    59  	case OpARM64CMP:
    60  		return rewriteValueARM64_OpARM64CMP(v)
    61  	case OpARM64CMPW:
    62  		return rewriteValueARM64_OpARM64CMPW(v)
    63  	case OpARM64CMPWconst:
    64  		return rewriteValueARM64_OpARM64CMPWconst(v)
    65  	case OpARM64CMPconst:
    66  		return rewriteValueARM64_OpARM64CMPconst(v)
    67  	case OpARM64CMPshiftLL:
    68  		return rewriteValueARM64_OpARM64CMPshiftLL(v)
    69  	case OpARM64CMPshiftRA:
    70  		return rewriteValueARM64_OpARM64CMPshiftRA(v)
    71  	case OpARM64CMPshiftRL:
    72  		return rewriteValueARM64_OpARM64CMPshiftRL(v)
    73  	case OpARM64CSEL:
    74  		return rewriteValueARM64_OpARM64CSEL(v)
    75  	case OpARM64CSEL0:
    76  		return rewriteValueARM64_OpARM64CSEL0(v)
    77  	case OpARM64CSETM:
    78  		return rewriteValueARM64_OpARM64CSETM(v)
    79  	case OpARM64CSINC:
    80  		return rewriteValueARM64_OpARM64CSINC(v)
    81  	case OpARM64CSINV:
    82  		return rewriteValueARM64_OpARM64CSINV(v)
    83  	case OpARM64CSNEG:
    84  		return rewriteValueARM64_OpARM64CSNEG(v)
    85  	case OpARM64DIV:
    86  		return rewriteValueARM64_OpARM64DIV(v)
    87  	case OpARM64DIVW:
    88  		return rewriteValueARM64_OpARM64DIVW(v)
    89  	case OpARM64EON:
    90  		return rewriteValueARM64_OpARM64EON(v)
    91  	case OpARM64EONshiftLL:
    92  		return rewriteValueARM64_OpARM64EONshiftLL(v)
    93  	case OpARM64EONshiftRA:
    94  		return rewriteValueARM64_OpARM64EONshiftRA(v)
    95  	case OpARM64EONshiftRL:
    96  		return rewriteValueARM64_OpARM64EONshiftRL(v)
    97  	case OpARM64EONshiftRO:
    98  		return rewriteValueARM64_OpARM64EONshiftRO(v)
    99  	case OpARM64Equal:
   100  		return rewriteValueARM64_OpARM64Equal(v)
   101  	case OpARM64FADDD:
   102  		return rewriteValueARM64_OpARM64FADDD(v)
   103  	case OpARM64FADDS:
   104  		return rewriteValueARM64_OpARM64FADDS(v)
   105  	case OpARM64FCMPD:
   106  		return rewriteValueARM64_OpARM64FCMPD(v)
   107  	case OpARM64FCMPS:
   108  		return rewriteValueARM64_OpARM64FCMPS(v)
   109  	case OpARM64FMOVDfpgp:
   110  		return rewriteValueARM64_OpARM64FMOVDfpgp(v)
   111  	case OpARM64FMOVDgpfp:
   112  		return rewriteValueARM64_OpARM64FMOVDgpfp(v)
   113  	case OpARM64FMOVDload:
   114  		return rewriteValueARM64_OpARM64FMOVDload(v)
   115  	case OpARM64FMOVDloadidx:
   116  		return rewriteValueARM64_OpARM64FMOVDloadidx(v)
   117  	case OpARM64FMOVDloadidx8:
   118  		return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
   119  	case OpARM64FMOVDstore:
   120  		return rewriteValueARM64_OpARM64FMOVDstore(v)
   121  	case OpARM64FMOVDstoreidx:
   122  		return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
   123  	case OpARM64FMOVDstoreidx8:
   124  		return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
   125  	case OpARM64FMOVSload:
   126  		return rewriteValueARM64_OpARM64FMOVSload(v)
   127  	case OpARM64FMOVSloadidx:
   128  		return rewriteValueARM64_OpARM64FMOVSloadidx(v)
   129  	case OpARM64FMOVSloadidx4:
   130  		return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
   131  	case OpARM64FMOVSstore:
   132  		return rewriteValueARM64_OpARM64FMOVSstore(v)
   133  	case OpARM64FMOVSstoreidx:
   134  		return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
   135  	case OpARM64FMOVSstoreidx4:
   136  		return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
   137  	case OpARM64FMULD:
   138  		return rewriteValueARM64_OpARM64FMULD(v)
   139  	case OpARM64FMULS:
   140  		return rewriteValueARM64_OpARM64FMULS(v)
   141  	case OpARM64FNEGD:
   142  		return rewriteValueARM64_OpARM64FNEGD(v)
   143  	case OpARM64FNEGS:
   144  		return rewriteValueARM64_OpARM64FNEGS(v)
   145  	case OpARM64FNMULD:
   146  		return rewriteValueARM64_OpARM64FNMULD(v)
   147  	case OpARM64FNMULS:
   148  		return rewriteValueARM64_OpARM64FNMULS(v)
   149  	case OpARM64FSUBD:
   150  		return rewriteValueARM64_OpARM64FSUBD(v)
   151  	case OpARM64FSUBS:
   152  		return rewriteValueARM64_OpARM64FSUBS(v)
   153  	case OpARM64GreaterEqual:
   154  		return rewriteValueARM64_OpARM64GreaterEqual(v)
   155  	case OpARM64GreaterEqualF:
   156  		return rewriteValueARM64_OpARM64GreaterEqualF(v)
   157  	case OpARM64GreaterEqualNoov:
   158  		return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
   159  	case OpARM64GreaterEqualU:
   160  		return rewriteValueARM64_OpARM64GreaterEqualU(v)
   161  	case OpARM64GreaterThan:
   162  		return rewriteValueARM64_OpARM64GreaterThan(v)
   163  	case OpARM64GreaterThanF:
   164  		return rewriteValueARM64_OpARM64GreaterThanF(v)
   165  	case OpARM64GreaterThanU:
   166  		return rewriteValueARM64_OpARM64GreaterThanU(v)
   167  	case OpARM64LDP:
   168  		return rewriteValueARM64_OpARM64LDP(v)
   169  	case OpARM64LessEqual:
   170  		return rewriteValueARM64_OpARM64LessEqual(v)
   171  	case OpARM64LessEqualF:
   172  		return rewriteValueARM64_OpARM64LessEqualF(v)
   173  	case OpARM64LessEqualU:
   174  		return rewriteValueARM64_OpARM64LessEqualU(v)
   175  	case OpARM64LessThan:
   176  		return rewriteValueARM64_OpARM64LessThan(v)
   177  	case OpARM64LessThanF:
   178  		return rewriteValueARM64_OpARM64LessThanF(v)
   179  	case OpARM64LessThanNoov:
   180  		return rewriteValueARM64_OpARM64LessThanNoov(v)
   181  	case OpARM64LessThanU:
   182  		return rewriteValueARM64_OpARM64LessThanU(v)
   183  	case OpARM64MADD:
   184  		return rewriteValueARM64_OpARM64MADD(v)
   185  	case OpARM64MADDW:
   186  		return rewriteValueARM64_OpARM64MADDW(v)
   187  	case OpARM64MNEG:
   188  		return rewriteValueARM64_OpARM64MNEG(v)
   189  	case OpARM64MNEGW:
   190  		return rewriteValueARM64_OpARM64MNEGW(v)
   191  	case OpARM64MOD:
   192  		return rewriteValueARM64_OpARM64MOD(v)
   193  	case OpARM64MODW:
   194  		return rewriteValueARM64_OpARM64MODW(v)
   195  	case OpARM64MOVBUload:
   196  		return rewriteValueARM64_OpARM64MOVBUload(v)
   197  	case OpARM64MOVBUloadidx:
   198  		return rewriteValueARM64_OpARM64MOVBUloadidx(v)
   199  	case OpARM64MOVBUreg:
   200  		return rewriteValueARM64_OpARM64MOVBUreg(v)
   201  	case OpARM64MOVBload:
   202  		return rewriteValueARM64_OpARM64MOVBload(v)
   203  	case OpARM64MOVBloadidx:
   204  		return rewriteValueARM64_OpARM64MOVBloadidx(v)
   205  	case OpARM64MOVBreg:
   206  		return rewriteValueARM64_OpARM64MOVBreg(v)
   207  	case OpARM64MOVBstore:
   208  		return rewriteValueARM64_OpARM64MOVBstore(v)
   209  	case OpARM64MOVBstoreidx:
   210  		return rewriteValueARM64_OpARM64MOVBstoreidx(v)
   211  	case OpARM64MOVBstorezero:
   212  		return rewriteValueARM64_OpARM64MOVBstorezero(v)
   213  	case OpARM64MOVBstorezeroidx:
   214  		return rewriteValueARM64_OpARM64MOVBstorezeroidx(v)
   215  	case OpARM64MOVDload:
   216  		return rewriteValueARM64_OpARM64MOVDload(v)
   217  	case OpARM64MOVDloadidx:
   218  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   219  	case OpARM64MOVDloadidx8:
   220  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   221  	case OpARM64MOVDnop:
   222  		return rewriteValueARM64_OpARM64MOVDnop(v)
   223  	case OpARM64MOVDreg:
   224  		return rewriteValueARM64_OpARM64MOVDreg(v)
   225  	case OpARM64MOVDstore:
   226  		return rewriteValueARM64_OpARM64MOVDstore(v)
   227  	case OpARM64MOVDstoreidx:
   228  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   229  	case OpARM64MOVDstoreidx8:
   230  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   231  	case OpARM64MOVDstorezero:
   232  		return rewriteValueARM64_OpARM64MOVDstorezero(v)
   233  	case OpARM64MOVDstorezeroidx:
   234  		return rewriteValueARM64_OpARM64MOVDstorezeroidx(v)
   235  	case OpARM64MOVDstorezeroidx8:
   236  		return rewriteValueARM64_OpARM64MOVDstorezeroidx8(v)
   237  	case OpARM64MOVHUload:
   238  		return rewriteValueARM64_OpARM64MOVHUload(v)
   239  	case OpARM64MOVHUloadidx:
   240  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   241  	case OpARM64MOVHUloadidx2:
   242  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   243  	case OpARM64MOVHUreg:
   244  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   245  	case OpARM64MOVHload:
   246  		return rewriteValueARM64_OpARM64MOVHload(v)
   247  	case OpARM64MOVHloadidx:
   248  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   249  	case OpARM64MOVHloadidx2:
   250  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   251  	case OpARM64MOVHreg:
   252  		return rewriteValueARM64_OpARM64MOVHreg(v)
   253  	case OpARM64MOVHstore:
   254  		return rewriteValueARM64_OpARM64MOVHstore(v)
   255  	case OpARM64MOVHstoreidx:
   256  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   257  	case OpARM64MOVHstoreidx2:
   258  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   259  	case OpARM64MOVHstorezero:
   260  		return rewriteValueARM64_OpARM64MOVHstorezero(v)
   261  	case OpARM64MOVHstorezeroidx:
   262  		return rewriteValueARM64_OpARM64MOVHstorezeroidx(v)
   263  	case OpARM64MOVHstorezeroidx2:
   264  		return rewriteValueARM64_OpARM64MOVHstorezeroidx2(v)
   265  	case OpARM64MOVQstorezero:
   266  		return rewriteValueARM64_OpARM64MOVQstorezero(v)
   267  	case OpARM64MOVWUload:
   268  		return rewriteValueARM64_OpARM64MOVWUload(v)
   269  	case OpARM64MOVWUloadidx:
   270  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   271  	case OpARM64MOVWUloadidx4:
   272  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   273  	case OpARM64MOVWUreg:
   274  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   275  	case OpARM64MOVWload:
   276  		return rewriteValueARM64_OpARM64MOVWload(v)
   277  	case OpARM64MOVWloadidx:
   278  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   279  	case OpARM64MOVWloadidx4:
   280  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   281  	case OpARM64MOVWreg:
   282  		return rewriteValueARM64_OpARM64MOVWreg(v)
   283  	case OpARM64MOVWstore:
   284  		return rewriteValueARM64_OpARM64MOVWstore(v)
   285  	case OpARM64MOVWstoreidx:
   286  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   287  	case OpARM64MOVWstoreidx4:
   288  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   289  	case OpARM64MOVWstorezero:
   290  		return rewriteValueARM64_OpARM64MOVWstorezero(v)
   291  	case OpARM64MOVWstorezeroidx:
   292  		return rewriteValueARM64_OpARM64MOVWstorezeroidx(v)
   293  	case OpARM64MOVWstorezeroidx4:
   294  		return rewriteValueARM64_OpARM64MOVWstorezeroidx4(v)
   295  	case OpARM64MSUB:
   296  		return rewriteValueARM64_OpARM64MSUB(v)
   297  	case OpARM64MSUBW:
   298  		return rewriteValueARM64_OpARM64MSUBW(v)
   299  	case OpARM64MUL:
   300  		return rewriteValueARM64_OpARM64MUL(v)
   301  	case OpARM64MULW:
   302  		return rewriteValueARM64_OpARM64MULW(v)
   303  	case OpARM64MVN:
   304  		return rewriteValueARM64_OpARM64MVN(v)
   305  	case OpARM64MVNshiftLL:
   306  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   307  	case OpARM64MVNshiftRA:
   308  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   309  	case OpARM64MVNshiftRL:
   310  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   311  	case OpARM64MVNshiftRO:
   312  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   313  	case OpARM64NEG:
   314  		return rewriteValueARM64_OpARM64NEG(v)
   315  	case OpARM64NEGshiftLL:
   316  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   317  	case OpARM64NEGshiftRA:
   318  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   319  	case OpARM64NEGshiftRL:
   320  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   321  	case OpARM64NotEqual:
   322  		return rewriteValueARM64_OpARM64NotEqual(v)
   323  	case OpARM64OR:
   324  		return rewriteValueARM64_OpARM64OR(v)
   325  	case OpARM64ORN:
   326  		return rewriteValueARM64_OpARM64ORN(v)
   327  	case OpARM64ORNshiftLL:
   328  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   329  	case OpARM64ORNshiftRA:
   330  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   331  	case OpARM64ORNshiftRL:
   332  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   333  	case OpARM64ORNshiftRO:
   334  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   335  	case OpARM64ORconst:
   336  		return rewriteValueARM64_OpARM64ORconst(v)
   337  	case OpARM64ORshiftLL:
   338  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   339  	case OpARM64ORshiftRA:
   340  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   341  	case OpARM64ORshiftRL:
   342  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   343  	case OpARM64ORshiftRO:
   344  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   345  	case OpARM64REV:
   346  		return rewriteValueARM64_OpARM64REV(v)
   347  	case OpARM64REVW:
   348  		return rewriteValueARM64_OpARM64REVW(v)
   349  	case OpARM64ROR:
   350  		return rewriteValueARM64_OpARM64ROR(v)
   351  	case OpARM64RORW:
   352  		return rewriteValueARM64_OpARM64RORW(v)
   353  	case OpARM64SBCSflags:
   354  		return rewriteValueARM64_OpARM64SBCSflags(v)
   355  	case OpARM64SBFX:
   356  		return rewriteValueARM64_OpARM64SBFX(v)
   357  	case OpARM64SLL:
   358  		return rewriteValueARM64_OpARM64SLL(v)
   359  	case OpARM64SLLconst:
   360  		return rewriteValueARM64_OpARM64SLLconst(v)
   361  	case OpARM64SRA:
   362  		return rewriteValueARM64_OpARM64SRA(v)
   363  	case OpARM64SRAconst:
   364  		return rewriteValueARM64_OpARM64SRAconst(v)
   365  	case OpARM64SRL:
   366  		return rewriteValueARM64_OpARM64SRL(v)
   367  	case OpARM64SRLconst:
   368  		return rewriteValueARM64_OpARM64SRLconst(v)
   369  	case OpARM64STP:
   370  		return rewriteValueARM64_OpARM64STP(v)
   371  	case OpARM64SUB:
   372  		return rewriteValueARM64_OpARM64SUB(v)
   373  	case OpARM64SUBconst:
   374  		return rewriteValueARM64_OpARM64SUBconst(v)
   375  	case OpARM64SUBshiftLL:
   376  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   377  	case OpARM64SUBshiftRA:
   378  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   379  	case OpARM64SUBshiftRL:
   380  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   381  	case OpARM64TST:
   382  		return rewriteValueARM64_OpARM64TST(v)
   383  	case OpARM64TSTW:
   384  		return rewriteValueARM64_OpARM64TSTW(v)
   385  	case OpARM64TSTWconst:
   386  		return rewriteValueARM64_OpARM64TSTWconst(v)
   387  	case OpARM64TSTconst:
   388  		return rewriteValueARM64_OpARM64TSTconst(v)
   389  	case OpARM64TSTshiftLL:
   390  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   391  	case OpARM64TSTshiftRA:
   392  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   393  	case OpARM64TSTshiftRL:
   394  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   395  	case OpARM64TSTshiftRO:
   396  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   397  	case OpARM64UBFIZ:
   398  		return rewriteValueARM64_OpARM64UBFIZ(v)
   399  	case OpARM64UBFX:
   400  		return rewriteValueARM64_OpARM64UBFX(v)
   401  	case OpARM64UDIV:
   402  		return rewriteValueARM64_OpARM64UDIV(v)
   403  	case OpARM64UDIVW:
   404  		return rewriteValueARM64_OpARM64UDIVW(v)
   405  	case OpARM64UMOD:
   406  		return rewriteValueARM64_OpARM64UMOD(v)
   407  	case OpARM64UMODW:
   408  		return rewriteValueARM64_OpARM64UMODW(v)
   409  	case OpARM64XOR:
   410  		return rewriteValueARM64_OpARM64XOR(v)
   411  	case OpARM64XORconst:
   412  		return rewriteValueARM64_OpARM64XORconst(v)
   413  	case OpARM64XORshiftLL:
   414  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   415  	case OpARM64XORshiftRA:
   416  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   417  	case OpARM64XORshiftRL:
   418  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   419  	case OpARM64XORshiftRO:
   420  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   421  	case OpAbs:
   422  		v.Op = OpARM64FABSD
   423  		return true
   424  	case OpAdd16:
   425  		v.Op = OpARM64ADD
   426  		return true
   427  	case OpAdd32:
   428  		v.Op = OpARM64ADD
   429  		return true
   430  	case OpAdd32F:
   431  		v.Op = OpARM64FADDS
   432  		return true
   433  	case OpAdd64:
   434  		v.Op = OpARM64ADD
   435  		return true
   436  	case OpAdd64F:
   437  		v.Op = OpARM64FADDD
   438  		return true
   439  	case OpAdd8:
   440  		v.Op = OpARM64ADD
   441  		return true
   442  	case OpAddPtr:
   443  		v.Op = OpARM64ADD
   444  		return true
   445  	case OpAddr:
   446  		return rewriteValueARM64_OpAddr(v)
   447  	case OpAnd16:
   448  		v.Op = OpARM64AND
   449  		return true
   450  	case OpAnd32:
   451  		v.Op = OpARM64AND
   452  		return true
   453  	case OpAnd64:
   454  		v.Op = OpARM64AND
   455  		return true
   456  	case OpAnd8:
   457  		v.Op = OpARM64AND
   458  		return true
   459  	case OpAndB:
   460  		v.Op = OpARM64AND
   461  		return true
   462  	case OpAtomicAdd32:
   463  		v.Op = OpARM64LoweredAtomicAdd32
   464  		return true
   465  	case OpAtomicAdd32Variant:
   466  		v.Op = OpARM64LoweredAtomicAdd32Variant
   467  		return true
   468  	case OpAtomicAdd64:
   469  		v.Op = OpARM64LoweredAtomicAdd64
   470  		return true
   471  	case OpAtomicAdd64Variant:
   472  		v.Op = OpARM64LoweredAtomicAdd64Variant
   473  		return true
   474  	case OpAtomicAnd32value:
   475  		v.Op = OpARM64LoweredAtomicAnd32
   476  		return true
   477  	case OpAtomicAnd32valueVariant:
   478  		v.Op = OpARM64LoweredAtomicAnd32Variant
   479  		return true
   480  	case OpAtomicAnd64value:
   481  		v.Op = OpARM64LoweredAtomicAnd64
   482  		return true
   483  	case OpAtomicAnd64valueVariant:
   484  		v.Op = OpARM64LoweredAtomicAnd64Variant
   485  		return true
   486  	case OpAtomicAnd8value:
   487  		v.Op = OpARM64LoweredAtomicAnd8
   488  		return true
   489  	case OpAtomicAnd8valueVariant:
   490  		v.Op = OpARM64LoweredAtomicAnd8Variant
   491  		return true
   492  	case OpAtomicCompareAndSwap32:
   493  		v.Op = OpARM64LoweredAtomicCas32
   494  		return true
   495  	case OpAtomicCompareAndSwap32Variant:
   496  		v.Op = OpARM64LoweredAtomicCas32Variant
   497  		return true
   498  	case OpAtomicCompareAndSwap64:
   499  		v.Op = OpARM64LoweredAtomicCas64
   500  		return true
   501  	case OpAtomicCompareAndSwap64Variant:
   502  		v.Op = OpARM64LoweredAtomicCas64Variant
   503  		return true
   504  	case OpAtomicExchange32:
   505  		v.Op = OpARM64LoweredAtomicExchange32
   506  		return true
   507  	case OpAtomicExchange32Variant:
   508  		v.Op = OpARM64LoweredAtomicExchange32Variant
   509  		return true
   510  	case OpAtomicExchange64:
   511  		v.Op = OpARM64LoweredAtomicExchange64
   512  		return true
   513  	case OpAtomicExchange64Variant:
   514  		v.Op = OpARM64LoweredAtomicExchange64Variant
   515  		return true
   516  	case OpAtomicExchange8:
   517  		v.Op = OpARM64LoweredAtomicExchange8
   518  		return true
   519  	case OpAtomicExchange8Variant:
   520  		v.Op = OpARM64LoweredAtomicExchange8Variant
   521  		return true
   522  	case OpAtomicLoad32:
   523  		v.Op = OpARM64LDARW
   524  		return true
   525  	case OpAtomicLoad64:
   526  		v.Op = OpARM64LDAR
   527  		return true
   528  	case OpAtomicLoad8:
   529  		v.Op = OpARM64LDARB
   530  		return true
   531  	case OpAtomicLoadPtr:
   532  		v.Op = OpARM64LDAR
   533  		return true
   534  	case OpAtomicOr32value:
   535  		v.Op = OpARM64LoweredAtomicOr32
   536  		return true
   537  	case OpAtomicOr32valueVariant:
   538  		v.Op = OpARM64LoweredAtomicOr32Variant
   539  		return true
   540  	case OpAtomicOr64value:
   541  		v.Op = OpARM64LoweredAtomicOr64
   542  		return true
   543  	case OpAtomicOr64valueVariant:
   544  		v.Op = OpARM64LoweredAtomicOr64Variant
   545  		return true
   546  	case OpAtomicOr8value:
   547  		v.Op = OpARM64LoweredAtomicOr8
   548  		return true
   549  	case OpAtomicOr8valueVariant:
   550  		v.Op = OpARM64LoweredAtomicOr8Variant
   551  		return true
   552  	case OpAtomicStore32:
   553  		v.Op = OpARM64STLRW
   554  		return true
   555  	case OpAtomicStore64:
   556  		v.Op = OpARM64STLR
   557  		return true
   558  	case OpAtomicStore8:
   559  		v.Op = OpARM64STLRB
   560  		return true
   561  	case OpAtomicStorePtrNoWB:
   562  		v.Op = OpARM64STLR
   563  		return true
   564  	case OpAvg64u:
   565  		return rewriteValueARM64_OpAvg64u(v)
   566  	case OpBitLen32:
   567  		return rewriteValueARM64_OpBitLen32(v)
   568  	case OpBitLen64:
   569  		return rewriteValueARM64_OpBitLen64(v)
   570  	case OpBitRev16:
   571  		return rewriteValueARM64_OpBitRev16(v)
   572  	case OpBitRev32:
   573  		v.Op = OpARM64RBITW
   574  		return true
   575  	case OpBitRev64:
   576  		v.Op = OpARM64RBIT
   577  		return true
   578  	case OpBitRev8:
   579  		return rewriteValueARM64_OpBitRev8(v)
   580  	case OpBswap16:
   581  		v.Op = OpARM64REV16W
   582  		return true
   583  	case OpBswap32:
   584  		v.Op = OpARM64REVW
   585  		return true
   586  	case OpBswap64:
   587  		v.Op = OpARM64REV
   588  		return true
   589  	case OpCeil:
   590  		v.Op = OpARM64FRINTPD
   591  		return true
   592  	case OpClosureCall:
   593  		v.Op = OpARM64CALLclosure
   594  		return true
   595  	case OpCom16:
   596  		v.Op = OpARM64MVN
   597  		return true
   598  	case OpCom32:
   599  		v.Op = OpARM64MVN
   600  		return true
   601  	case OpCom64:
   602  		v.Op = OpARM64MVN
   603  		return true
   604  	case OpCom8:
   605  		v.Op = OpARM64MVN
   606  		return true
   607  	case OpCondSelect:
   608  		return rewriteValueARM64_OpCondSelect(v)
   609  	case OpConst16:
   610  		return rewriteValueARM64_OpConst16(v)
   611  	case OpConst32:
   612  		return rewriteValueARM64_OpConst32(v)
   613  	case OpConst32F:
   614  		return rewriteValueARM64_OpConst32F(v)
   615  	case OpConst64:
   616  		return rewriteValueARM64_OpConst64(v)
   617  	case OpConst64F:
   618  		return rewriteValueARM64_OpConst64F(v)
   619  	case OpConst8:
   620  		return rewriteValueARM64_OpConst8(v)
   621  	case OpConstBool:
   622  		return rewriteValueARM64_OpConstBool(v)
   623  	case OpConstNil:
   624  		return rewriteValueARM64_OpConstNil(v)
   625  	case OpCtz16:
   626  		return rewriteValueARM64_OpCtz16(v)
   627  	case OpCtz16NonZero:
   628  		v.Op = OpCtz32
   629  		return true
   630  	case OpCtz32:
   631  		return rewriteValueARM64_OpCtz32(v)
   632  	case OpCtz32NonZero:
   633  		v.Op = OpCtz32
   634  		return true
   635  	case OpCtz64:
   636  		return rewriteValueARM64_OpCtz64(v)
   637  	case OpCtz64NonZero:
   638  		v.Op = OpCtz64
   639  		return true
   640  	case OpCtz8:
   641  		return rewriteValueARM64_OpCtz8(v)
   642  	case OpCtz8NonZero:
   643  		v.Op = OpCtz32
   644  		return true
   645  	case OpCvt32Fto32:
   646  		v.Op = OpARM64FCVTZSSW
   647  		return true
   648  	case OpCvt32Fto32U:
   649  		v.Op = OpARM64FCVTZUSW
   650  		return true
   651  	case OpCvt32Fto64:
   652  		v.Op = OpARM64FCVTZSS
   653  		return true
   654  	case OpCvt32Fto64F:
   655  		v.Op = OpARM64FCVTSD
   656  		return true
   657  	case OpCvt32Fto64U:
   658  		v.Op = OpARM64FCVTZUS
   659  		return true
   660  	case OpCvt32Uto32F:
   661  		v.Op = OpARM64UCVTFWS
   662  		return true
   663  	case OpCvt32Uto64F:
   664  		v.Op = OpARM64UCVTFWD
   665  		return true
   666  	case OpCvt32to32F:
   667  		v.Op = OpARM64SCVTFWS
   668  		return true
   669  	case OpCvt32to64F:
   670  		v.Op = OpARM64SCVTFWD
   671  		return true
   672  	case OpCvt64Fto32:
   673  		v.Op = OpARM64FCVTZSDW
   674  		return true
   675  	case OpCvt64Fto32F:
   676  		v.Op = OpARM64FCVTDS
   677  		return true
   678  	case OpCvt64Fto32U:
   679  		v.Op = OpARM64FCVTZUDW
   680  		return true
   681  	case OpCvt64Fto64:
   682  		v.Op = OpARM64FCVTZSD
   683  		return true
   684  	case OpCvt64Fto64U:
   685  		v.Op = OpARM64FCVTZUD
   686  		return true
   687  	case OpCvt64Uto32F:
   688  		v.Op = OpARM64UCVTFS
   689  		return true
   690  	case OpCvt64Uto64F:
   691  		v.Op = OpARM64UCVTFD
   692  		return true
   693  	case OpCvt64to32F:
   694  		v.Op = OpARM64SCVTFS
   695  		return true
   696  	case OpCvt64to64F:
   697  		v.Op = OpARM64SCVTFD
   698  		return true
   699  	case OpCvtBoolToUint8:
   700  		v.Op = OpCopy
   701  		return true
   702  	case OpDiv16:
   703  		return rewriteValueARM64_OpDiv16(v)
   704  	case OpDiv16u:
   705  		return rewriteValueARM64_OpDiv16u(v)
   706  	case OpDiv32:
   707  		return rewriteValueARM64_OpDiv32(v)
   708  	case OpDiv32F:
   709  		v.Op = OpARM64FDIVS
   710  		return true
   711  	case OpDiv32u:
   712  		v.Op = OpARM64UDIVW
   713  		return true
   714  	case OpDiv64:
   715  		return rewriteValueARM64_OpDiv64(v)
   716  	case OpDiv64F:
   717  		v.Op = OpARM64FDIVD
   718  		return true
   719  	case OpDiv64u:
   720  		v.Op = OpARM64UDIV
   721  		return true
   722  	case OpDiv8:
   723  		return rewriteValueARM64_OpDiv8(v)
   724  	case OpDiv8u:
   725  		return rewriteValueARM64_OpDiv8u(v)
   726  	case OpEq16:
   727  		return rewriteValueARM64_OpEq16(v)
   728  	case OpEq32:
   729  		return rewriteValueARM64_OpEq32(v)
   730  	case OpEq32F:
   731  		return rewriteValueARM64_OpEq32F(v)
   732  	case OpEq64:
   733  		return rewriteValueARM64_OpEq64(v)
   734  	case OpEq64F:
   735  		return rewriteValueARM64_OpEq64F(v)
   736  	case OpEq8:
   737  		return rewriteValueARM64_OpEq8(v)
   738  	case OpEqB:
   739  		return rewriteValueARM64_OpEqB(v)
   740  	case OpEqPtr:
   741  		return rewriteValueARM64_OpEqPtr(v)
   742  	case OpFMA:
   743  		return rewriteValueARM64_OpFMA(v)
   744  	case OpFloor:
   745  		v.Op = OpARM64FRINTMD
   746  		return true
   747  	case OpGetCallerPC:
   748  		v.Op = OpARM64LoweredGetCallerPC
   749  		return true
   750  	case OpGetCallerSP:
   751  		v.Op = OpARM64LoweredGetCallerSP
   752  		return true
   753  	case OpGetClosurePtr:
   754  		v.Op = OpARM64LoweredGetClosurePtr
   755  		return true
   756  	case OpHmul32:
   757  		return rewriteValueARM64_OpHmul32(v)
   758  	case OpHmul32u:
   759  		return rewriteValueARM64_OpHmul32u(v)
   760  	case OpHmul64:
   761  		v.Op = OpARM64MULH
   762  		return true
   763  	case OpHmul64u:
   764  		v.Op = OpARM64UMULH
   765  		return true
   766  	case OpInterCall:
   767  		v.Op = OpARM64CALLinter
   768  		return true
   769  	case OpIsInBounds:
   770  		return rewriteValueARM64_OpIsInBounds(v)
   771  	case OpIsNonNil:
   772  		return rewriteValueARM64_OpIsNonNil(v)
   773  	case OpIsSliceInBounds:
   774  		return rewriteValueARM64_OpIsSliceInBounds(v)
   775  	case OpLeq16:
   776  		return rewriteValueARM64_OpLeq16(v)
   777  	case OpLeq16U:
   778  		return rewriteValueARM64_OpLeq16U(v)
   779  	case OpLeq32:
   780  		return rewriteValueARM64_OpLeq32(v)
   781  	case OpLeq32F:
   782  		return rewriteValueARM64_OpLeq32F(v)
   783  	case OpLeq32U:
   784  		return rewriteValueARM64_OpLeq32U(v)
   785  	case OpLeq64:
   786  		return rewriteValueARM64_OpLeq64(v)
   787  	case OpLeq64F:
   788  		return rewriteValueARM64_OpLeq64F(v)
   789  	case OpLeq64U:
   790  		return rewriteValueARM64_OpLeq64U(v)
   791  	case OpLeq8:
   792  		return rewriteValueARM64_OpLeq8(v)
   793  	case OpLeq8U:
   794  		return rewriteValueARM64_OpLeq8U(v)
   795  	case OpLess16:
   796  		return rewriteValueARM64_OpLess16(v)
   797  	case OpLess16U:
   798  		return rewriteValueARM64_OpLess16U(v)
   799  	case OpLess32:
   800  		return rewriteValueARM64_OpLess32(v)
   801  	case OpLess32F:
   802  		return rewriteValueARM64_OpLess32F(v)
   803  	case OpLess32U:
   804  		return rewriteValueARM64_OpLess32U(v)
   805  	case OpLess64:
   806  		return rewriteValueARM64_OpLess64(v)
   807  	case OpLess64F:
   808  		return rewriteValueARM64_OpLess64F(v)
   809  	case OpLess64U:
   810  		return rewriteValueARM64_OpLess64U(v)
   811  	case OpLess8:
   812  		return rewriteValueARM64_OpLess8(v)
   813  	case OpLess8U:
   814  		return rewriteValueARM64_OpLess8U(v)
   815  	case OpLoad:
   816  		return rewriteValueARM64_OpLoad(v)
   817  	case OpLocalAddr:
   818  		return rewriteValueARM64_OpLocalAddr(v)
   819  	case OpLsh16x16:
   820  		return rewriteValueARM64_OpLsh16x16(v)
   821  	case OpLsh16x32:
   822  		return rewriteValueARM64_OpLsh16x32(v)
   823  	case OpLsh16x64:
   824  		return rewriteValueARM64_OpLsh16x64(v)
   825  	case OpLsh16x8:
   826  		return rewriteValueARM64_OpLsh16x8(v)
   827  	case OpLsh32x16:
   828  		return rewriteValueARM64_OpLsh32x16(v)
   829  	case OpLsh32x32:
   830  		return rewriteValueARM64_OpLsh32x32(v)
   831  	case OpLsh32x64:
   832  		return rewriteValueARM64_OpLsh32x64(v)
   833  	case OpLsh32x8:
   834  		return rewriteValueARM64_OpLsh32x8(v)
   835  	case OpLsh64x16:
   836  		return rewriteValueARM64_OpLsh64x16(v)
   837  	case OpLsh64x32:
   838  		return rewriteValueARM64_OpLsh64x32(v)
   839  	case OpLsh64x64:
   840  		return rewriteValueARM64_OpLsh64x64(v)
   841  	case OpLsh64x8:
   842  		return rewriteValueARM64_OpLsh64x8(v)
   843  	case OpLsh8x16:
   844  		return rewriteValueARM64_OpLsh8x16(v)
   845  	case OpLsh8x32:
   846  		return rewriteValueARM64_OpLsh8x32(v)
   847  	case OpLsh8x64:
   848  		return rewriteValueARM64_OpLsh8x64(v)
   849  	case OpLsh8x8:
   850  		return rewriteValueARM64_OpLsh8x8(v)
   851  	case OpMax32F:
   852  		v.Op = OpARM64FMAXS
   853  		return true
   854  	case OpMax64F:
   855  		v.Op = OpARM64FMAXD
   856  		return true
   857  	case OpMin32F:
   858  		v.Op = OpARM64FMINS
   859  		return true
   860  	case OpMin64F:
   861  		v.Op = OpARM64FMIND
   862  		return true
   863  	case OpMod16:
   864  		return rewriteValueARM64_OpMod16(v)
   865  	case OpMod16u:
   866  		return rewriteValueARM64_OpMod16u(v)
   867  	case OpMod32:
   868  		return rewriteValueARM64_OpMod32(v)
   869  	case OpMod32u:
   870  		v.Op = OpARM64UMODW
   871  		return true
   872  	case OpMod64:
   873  		return rewriteValueARM64_OpMod64(v)
   874  	case OpMod64u:
   875  		v.Op = OpARM64UMOD
   876  		return true
   877  	case OpMod8:
   878  		return rewriteValueARM64_OpMod8(v)
   879  	case OpMod8u:
   880  		return rewriteValueARM64_OpMod8u(v)
   881  	case OpMove:
   882  		return rewriteValueARM64_OpMove(v)
   883  	case OpMul16:
   884  		v.Op = OpARM64MULW
   885  		return true
   886  	case OpMul32:
   887  		v.Op = OpARM64MULW
   888  		return true
   889  	case OpMul32F:
   890  		v.Op = OpARM64FMULS
   891  		return true
   892  	case OpMul64:
   893  		v.Op = OpARM64MUL
   894  		return true
   895  	case OpMul64F:
   896  		v.Op = OpARM64FMULD
   897  		return true
   898  	case OpMul8:
   899  		v.Op = OpARM64MULW
   900  		return true
   901  	case OpNeg16:
   902  		v.Op = OpARM64NEG
   903  		return true
   904  	case OpNeg32:
   905  		v.Op = OpARM64NEG
   906  		return true
   907  	case OpNeg32F:
   908  		v.Op = OpARM64FNEGS
   909  		return true
   910  	case OpNeg64:
   911  		v.Op = OpARM64NEG
   912  		return true
   913  	case OpNeg64F:
   914  		v.Op = OpARM64FNEGD
   915  		return true
   916  	case OpNeg8:
   917  		v.Op = OpARM64NEG
   918  		return true
   919  	case OpNeq16:
   920  		return rewriteValueARM64_OpNeq16(v)
   921  	case OpNeq32:
   922  		return rewriteValueARM64_OpNeq32(v)
   923  	case OpNeq32F:
   924  		return rewriteValueARM64_OpNeq32F(v)
   925  	case OpNeq64:
   926  		return rewriteValueARM64_OpNeq64(v)
   927  	case OpNeq64F:
   928  		return rewriteValueARM64_OpNeq64F(v)
   929  	case OpNeq8:
   930  		return rewriteValueARM64_OpNeq8(v)
   931  	case OpNeqB:
   932  		v.Op = OpARM64XOR
   933  		return true
   934  	case OpNeqPtr:
   935  		return rewriteValueARM64_OpNeqPtr(v)
   936  	case OpNilCheck:
   937  		v.Op = OpARM64LoweredNilCheck
   938  		return true
   939  	case OpNot:
   940  		return rewriteValueARM64_OpNot(v)
   941  	case OpOffPtr:
   942  		return rewriteValueARM64_OpOffPtr(v)
   943  	case OpOr16:
   944  		v.Op = OpARM64OR
   945  		return true
   946  	case OpOr32:
   947  		v.Op = OpARM64OR
   948  		return true
   949  	case OpOr64:
   950  		v.Op = OpARM64OR
   951  		return true
   952  	case OpOr8:
   953  		v.Op = OpARM64OR
   954  		return true
   955  	case OpOrB:
   956  		v.Op = OpARM64OR
   957  		return true
   958  	case OpPanicBounds:
   959  		return rewriteValueARM64_OpPanicBounds(v)
   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 OpTrunc:
  1118  		v.Op = OpARM64FRINTZD
  1119  		return true
  1120  	case OpTrunc16to8:
  1121  		v.Op = OpCopy
  1122  		return true
  1123  	case OpTrunc32to16:
  1124  		v.Op = OpCopy
  1125  		return true
  1126  	case OpTrunc32to8:
  1127  		v.Op = OpCopy
  1128  		return true
  1129  	case OpTrunc64to16:
  1130  		v.Op = OpCopy
  1131  		return true
  1132  	case OpTrunc64to32:
  1133  		v.Op = OpCopy
  1134  		return true
  1135  	case OpTrunc64to8:
  1136  		v.Op = OpCopy
  1137  		return true
  1138  	case OpWB:
  1139  		v.Op = OpARM64LoweredWB
  1140  		return true
  1141  	case OpXor16:
  1142  		v.Op = OpARM64XOR
  1143  		return true
  1144  	case OpXor32:
  1145  		v.Op = OpARM64XOR
  1146  		return true
  1147  	case OpXor64:
  1148  		v.Op = OpARM64XOR
  1149  		return true
  1150  	case OpXor8:
  1151  		v.Op = OpARM64XOR
  1152  		return true
  1153  	case OpZero:
  1154  		return rewriteValueARM64_OpZero(v)
  1155  	case OpZeroExt16to32:
  1156  		v.Op = OpARM64MOVHUreg
  1157  		return true
  1158  	case OpZeroExt16to64:
  1159  		v.Op = OpARM64MOVHUreg
  1160  		return true
  1161  	case OpZeroExt32to64:
  1162  		v.Op = OpARM64MOVWUreg
  1163  		return true
  1164  	case OpZeroExt8to16:
  1165  		v.Op = OpARM64MOVBUreg
  1166  		return true
  1167  	case OpZeroExt8to32:
  1168  		v.Op = OpARM64MOVBUreg
  1169  		return true
  1170  	case OpZeroExt8to64:
  1171  		v.Op = OpARM64MOVBUreg
  1172  		return true
  1173  	}
  1174  	return false
  1175  }
  1176  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  1177  	v_2 := v.Args[2]
  1178  	v_1 := v.Args[1]
  1179  	v_0 := v.Args[0]
  1180  	b := v.Block
  1181  	typ := &b.Func.Config.Types
  1182  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  1183  	// result: (ADCSflags x y c)
  1184  	for {
  1185  		x := v_0
  1186  		y := v_1
  1187  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1188  			break
  1189  		}
  1190  		v_2_0 := v_2.Args[0]
  1191  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1192  			break
  1193  		}
  1194  		v_2_0_0 := v_2_0.Args[0]
  1195  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  1196  			break
  1197  		}
  1198  		c := v_2_0_0.Args[0]
  1199  		v.reset(OpARM64ADCSflags)
  1200  		v.AddArg3(x, y, c)
  1201  		return true
  1202  	}
  1203  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  1204  	// result: (ADDSflags x y)
  1205  	for {
  1206  		x := v_0
  1207  		y := v_1
  1208  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1209  			break
  1210  		}
  1211  		v_2_0 := v_2.Args[0]
  1212  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1213  			break
  1214  		}
  1215  		v_2_0_0 := v_2_0.Args[0]
  1216  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  1217  			break
  1218  		}
  1219  		v.reset(OpARM64ADDSflags)
  1220  		v.AddArg2(x, y)
  1221  		return true
  1222  	}
  1223  	return false
  1224  }
  1225  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  1226  	v_1 := v.Args[1]
  1227  	v_0 := v.Args[0]
  1228  	b := v.Block
  1229  	// match: (ADD x (MOVDconst <t> [c]))
  1230  	// cond: !t.IsPtr()
  1231  	// result: (ADDconst [c] x)
  1232  	for {
  1233  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1234  			x := v_0
  1235  			if v_1.Op != OpARM64MOVDconst {
  1236  				continue
  1237  			}
  1238  			t := v_1.Type
  1239  			c := auxIntToInt64(v_1.AuxInt)
  1240  			if !(!t.IsPtr()) {
  1241  				continue
  1242  			}
  1243  			v.reset(OpARM64ADDconst)
  1244  			v.AuxInt = int64ToAuxInt(c)
  1245  			v.AddArg(x)
  1246  			return true
  1247  		}
  1248  		break
  1249  	}
  1250  	// match: (ADD a l:(MUL x y))
  1251  	// cond: l.Uses==1 && clobber(l)
  1252  	// result: (MADD a x y)
  1253  	for {
  1254  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1255  			a := v_0
  1256  			l := v_1
  1257  			if l.Op != OpARM64MUL {
  1258  				continue
  1259  			}
  1260  			y := l.Args[1]
  1261  			x := l.Args[0]
  1262  			if !(l.Uses == 1 && clobber(l)) {
  1263  				continue
  1264  			}
  1265  			v.reset(OpARM64MADD)
  1266  			v.AddArg3(a, x, y)
  1267  			return true
  1268  		}
  1269  		break
  1270  	}
  1271  	// match: (ADD a l:(MNEG x y))
  1272  	// cond: l.Uses==1 && clobber(l)
  1273  	// result: (MSUB a x y)
  1274  	for {
  1275  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1276  			a := v_0
  1277  			l := v_1
  1278  			if l.Op != OpARM64MNEG {
  1279  				continue
  1280  			}
  1281  			y := l.Args[1]
  1282  			x := l.Args[0]
  1283  			if !(l.Uses == 1 && clobber(l)) {
  1284  				continue
  1285  			}
  1286  			v.reset(OpARM64MSUB)
  1287  			v.AddArg3(a, x, y)
  1288  			return true
  1289  		}
  1290  		break
  1291  	}
  1292  	// match: (ADD a l:(MULW x y))
  1293  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1294  	// result: (MADDW a x y)
  1295  	for {
  1296  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1297  			a := v_0
  1298  			l := v_1
  1299  			if l.Op != OpARM64MULW {
  1300  				continue
  1301  			}
  1302  			y := l.Args[1]
  1303  			x := l.Args[0]
  1304  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1305  				continue
  1306  			}
  1307  			v.reset(OpARM64MADDW)
  1308  			v.AddArg3(a, x, y)
  1309  			return true
  1310  		}
  1311  		break
  1312  	}
  1313  	// match: (ADD a l:(MNEGW x y))
  1314  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1315  	// result: (MSUBW a x y)
  1316  	for {
  1317  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1318  			a := v_0
  1319  			l := v_1
  1320  			if l.Op != OpARM64MNEGW {
  1321  				continue
  1322  			}
  1323  			y := l.Args[1]
  1324  			x := l.Args[0]
  1325  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1326  				continue
  1327  			}
  1328  			v.reset(OpARM64MSUBW)
  1329  			v.AddArg3(a, x, y)
  1330  			return true
  1331  		}
  1332  		break
  1333  	}
  1334  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  1335  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1336  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1337  	for {
  1338  		t := v.Type
  1339  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1340  			a := v_0
  1341  			p := v_1
  1342  			if p.Op != OpARM64ADDconst {
  1343  				continue
  1344  			}
  1345  			c := auxIntToInt64(p.AuxInt)
  1346  			m := p.Args[0]
  1347  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1348  				continue
  1349  			}
  1350  			v.reset(OpARM64ADDconst)
  1351  			v.AuxInt = int64ToAuxInt(c)
  1352  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1353  			v0.AddArg2(a, m)
  1354  			v.AddArg(v0)
  1355  			return true
  1356  		}
  1357  		break
  1358  	}
  1359  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  1360  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1361  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1362  	for {
  1363  		t := v.Type
  1364  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1365  			a := v_0
  1366  			p := v_1
  1367  			if p.Op != OpARM64ADDconst {
  1368  				continue
  1369  			}
  1370  			c := auxIntToInt64(p.AuxInt)
  1371  			m := p.Args[0]
  1372  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1373  				continue
  1374  			}
  1375  			v.reset(OpARM64ADDconst)
  1376  			v.AuxInt = int64ToAuxInt(c)
  1377  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1378  			v0.AddArg2(a, m)
  1379  			v.AddArg(v0)
  1380  			return true
  1381  		}
  1382  		break
  1383  	}
  1384  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  1385  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1386  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1387  	for {
  1388  		t := v.Type
  1389  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1390  			a := v_0
  1391  			p := v_1
  1392  			if p.Op != OpARM64ADDconst {
  1393  				continue
  1394  			}
  1395  			c := auxIntToInt64(p.AuxInt)
  1396  			m := p.Args[0]
  1397  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1398  				continue
  1399  			}
  1400  			v.reset(OpARM64ADDconst)
  1401  			v.AuxInt = int64ToAuxInt(c)
  1402  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1403  			v0.AddArg2(a, m)
  1404  			v.AddArg(v0)
  1405  			return true
  1406  		}
  1407  		break
  1408  	}
  1409  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  1410  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1411  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1412  	for {
  1413  		t := v.Type
  1414  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1415  			a := v_0
  1416  			p := v_1
  1417  			if p.Op != OpARM64ADDconst {
  1418  				continue
  1419  			}
  1420  			c := auxIntToInt64(p.AuxInt)
  1421  			m := p.Args[0]
  1422  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1423  				continue
  1424  			}
  1425  			v.reset(OpARM64ADDconst)
  1426  			v.AuxInt = int64ToAuxInt(c)
  1427  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1428  			v0.AddArg2(a, m)
  1429  			v.AddArg(v0)
  1430  			return true
  1431  		}
  1432  		break
  1433  	}
  1434  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  1435  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1436  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1437  	for {
  1438  		t := v.Type
  1439  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1440  			a := v_0
  1441  			p := v_1
  1442  			if p.Op != OpARM64SUBconst {
  1443  				continue
  1444  			}
  1445  			c := auxIntToInt64(p.AuxInt)
  1446  			m := p.Args[0]
  1447  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1448  				continue
  1449  			}
  1450  			v.reset(OpARM64SUBconst)
  1451  			v.AuxInt = int64ToAuxInt(c)
  1452  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1453  			v0.AddArg2(a, m)
  1454  			v.AddArg(v0)
  1455  			return true
  1456  		}
  1457  		break
  1458  	}
  1459  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  1460  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1461  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1462  	for {
  1463  		t := v.Type
  1464  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1465  			a := v_0
  1466  			p := v_1
  1467  			if p.Op != OpARM64SUBconst {
  1468  				continue
  1469  			}
  1470  			c := auxIntToInt64(p.AuxInt)
  1471  			m := p.Args[0]
  1472  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1473  				continue
  1474  			}
  1475  			v.reset(OpARM64SUBconst)
  1476  			v.AuxInt = int64ToAuxInt(c)
  1477  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1478  			v0.AddArg2(a, m)
  1479  			v.AddArg(v0)
  1480  			return true
  1481  		}
  1482  		break
  1483  	}
  1484  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  1485  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1486  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1487  	for {
  1488  		t := v.Type
  1489  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1490  			a := v_0
  1491  			p := v_1
  1492  			if p.Op != OpARM64SUBconst {
  1493  				continue
  1494  			}
  1495  			c := auxIntToInt64(p.AuxInt)
  1496  			m := p.Args[0]
  1497  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1498  				continue
  1499  			}
  1500  			v.reset(OpARM64SUBconst)
  1501  			v.AuxInt = int64ToAuxInt(c)
  1502  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1503  			v0.AddArg2(a, m)
  1504  			v.AddArg(v0)
  1505  			return true
  1506  		}
  1507  		break
  1508  	}
  1509  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  1510  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1511  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1512  	for {
  1513  		t := v.Type
  1514  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1515  			a := v_0
  1516  			p := v_1
  1517  			if p.Op != OpARM64SUBconst {
  1518  				continue
  1519  			}
  1520  			c := auxIntToInt64(p.AuxInt)
  1521  			m := p.Args[0]
  1522  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1523  				continue
  1524  			}
  1525  			v.reset(OpARM64SUBconst)
  1526  			v.AuxInt = int64ToAuxInt(c)
  1527  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1528  			v0.AddArg2(a, m)
  1529  			v.AddArg(v0)
  1530  			return true
  1531  		}
  1532  		break
  1533  	}
  1534  	// match: (ADD x (NEG y))
  1535  	// result: (SUB x y)
  1536  	for {
  1537  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1538  			x := v_0
  1539  			if v_1.Op != OpARM64NEG {
  1540  				continue
  1541  			}
  1542  			y := v_1.Args[0]
  1543  			v.reset(OpARM64SUB)
  1544  			v.AddArg2(x, y)
  1545  			return true
  1546  		}
  1547  		break
  1548  	}
  1549  	// match: (ADD x0 x1:(SLLconst [c] y))
  1550  	// cond: clobberIfDead(x1)
  1551  	// result: (ADDshiftLL x0 y [c])
  1552  	for {
  1553  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1554  			x0 := v_0
  1555  			x1 := v_1
  1556  			if x1.Op != OpARM64SLLconst {
  1557  				continue
  1558  			}
  1559  			c := auxIntToInt64(x1.AuxInt)
  1560  			y := x1.Args[0]
  1561  			if !(clobberIfDead(x1)) {
  1562  				continue
  1563  			}
  1564  			v.reset(OpARM64ADDshiftLL)
  1565  			v.AuxInt = int64ToAuxInt(c)
  1566  			v.AddArg2(x0, y)
  1567  			return true
  1568  		}
  1569  		break
  1570  	}
  1571  	// match: (ADD x0 x1:(SRLconst [c] y))
  1572  	// cond: clobberIfDead(x1)
  1573  	// result: (ADDshiftRL x0 y [c])
  1574  	for {
  1575  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1576  			x0 := v_0
  1577  			x1 := v_1
  1578  			if x1.Op != OpARM64SRLconst {
  1579  				continue
  1580  			}
  1581  			c := auxIntToInt64(x1.AuxInt)
  1582  			y := x1.Args[0]
  1583  			if !(clobberIfDead(x1)) {
  1584  				continue
  1585  			}
  1586  			v.reset(OpARM64ADDshiftRL)
  1587  			v.AuxInt = int64ToAuxInt(c)
  1588  			v.AddArg2(x0, y)
  1589  			return true
  1590  		}
  1591  		break
  1592  	}
  1593  	// match: (ADD x0 x1:(SRAconst [c] y))
  1594  	// cond: clobberIfDead(x1)
  1595  	// result: (ADDshiftRA x0 y [c])
  1596  	for {
  1597  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1598  			x0 := v_0
  1599  			x1 := v_1
  1600  			if x1.Op != OpARM64SRAconst {
  1601  				continue
  1602  			}
  1603  			c := auxIntToInt64(x1.AuxInt)
  1604  			y := x1.Args[0]
  1605  			if !(clobberIfDead(x1)) {
  1606  				continue
  1607  			}
  1608  			v.reset(OpARM64ADDshiftRA)
  1609  			v.AuxInt = int64ToAuxInt(c)
  1610  			v.AddArg2(x0, y)
  1611  			return true
  1612  		}
  1613  		break
  1614  	}
  1615  	return false
  1616  }
  1617  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  1618  	v_1 := v.Args[1]
  1619  	v_0 := v.Args[0]
  1620  	// match: (ADDSflags x (MOVDconst [c]))
  1621  	// result: (ADDSconstflags [c] x)
  1622  	for {
  1623  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1624  			x := v_0
  1625  			if v_1.Op != OpARM64MOVDconst {
  1626  				continue
  1627  			}
  1628  			c := auxIntToInt64(v_1.AuxInt)
  1629  			v.reset(OpARM64ADDSconstflags)
  1630  			v.AuxInt = int64ToAuxInt(c)
  1631  			v.AddArg(x)
  1632  			return true
  1633  		}
  1634  		break
  1635  	}
  1636  	return false
  1637  }
  1638  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  1639  	v_0 := v.Args[0]
  1640  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  1641  	// cond: is32Bit(off1+int64(off2))
  1642  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  1643  	for {
  1644  		off1 := auxIntToInt64(v.AuxInt)
  1645  		if v_0.Op != OpARM64MOVDaddr {
  1646  			break
  1647  		}
  1648  		off2 := auxIntToInt32(v_0.AuxInt)
  1649  		sym := auxToSym(v_0.Aux)
  1650  		ptr := v_0.Args[0]
  1651  		if !(is32Bit(off1 + int64(off2))) {
  1652  			break
  1653  		}
  1654  		v.reset(OpARM64MOVDaddr)
  1655  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  1656  		v.Aux = symToAux(sym)
  1657  		v.AddArg(ptr)
  1658  		return true
  1659  	}
  1660  	// match: (ADDconst [c] y)
  1661  	// cond: c < 0
  1662  	// result: (SUBconst [-c] y)
  1663  	for {
  1664  		c := auxIntToInt64(v.AuxInt)
  1665  		y := v_0
  1666  		if !(c < 0) {
  1667  			break
  1668  		}
  1669  		v.reset(OpARM64SUBconst)
  1670  		v.AuxInt = int64ToAuxInt(-c)
  1671  		v.AddArg(y)
  1672  		return true
  1673  	}
  1674  	// match: (ADDconst [0] x)
  1675  	// result: x
  1676  	for {
  1677  		if auxIntToInt64(v.AuxInt) != 0 {
  1678  			break
  1679  		}
  1680  		x := v_0
  1681  		v.copyOf(x)
  1682  		return true
  1683  	}
  1684  	// match: (ADDconst [c] (MOVDconst [d]))
  1685  	// result: (MOVDconst [c+d])
  1686  	for {
  1687  		c := auxIntToInt64(v.AuxInt)
  1688  		if v_0.Op != OpARM64MOVDconst {
  1689  			break
  1690  		}
  1691  		d := auxIntToInt64(v_0.AuxInt)
  1692  		v.reset(OpARM64MOVDconst)
  1693  		v.AuxInt = int64ToAuxInt(c + d)
  1694  		return true
  1695  	}
  1696  	// match: (ADDconst [c] (ADDconst [d] x))
  1697  	// result: (ADDconst [c+d] x)
  1698  	for {
  1699  		c := auxIntToInt64(v.AuxInt)
  1700  		if v_0.Op != OpARM64ADDconst {
  1701  			break
  1702  		}
  1703  		d := auxIntToInt64(v_0.AuxInt)
  1704  		x := v_0.Args[0]
  1705  		v.reset(OpARM64ADDconst)
  1706  		v.AuxInt = int64ToAuxInt(c + d)
  1707  		v.AddArg(x)
  1708  		return true
  1709  	}
  1710  	// match: (ADDconst [c] (SUBconst [d] x))
  1711  	// result: (ADDconst [c-d] x)
  1712  	for {
  1713  		c := auxIntToInt64(v.AuxInt)
  1714  		if v_0.Op != OpARM64SUBconst {
  1715  			break
  1716  		}
  1717  		d := auxIntToInt64(v_0.AuxInt)
  1718  		x := v_0.Args[0]
  1719  		v.reset(OpARM64ADDconst)
  1720  		v.AuxInt = int64ToAuxInt(c - d)
  1721  		v.AddArg(x)
  1722  		return true
  1723  	}
  1724  	return false
  1725  }
  1726  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  1727  	v_1 := v.Args[1]
  1728  	v_0 := v.Args[0]
  1729  	b := v.Block
  1730  	typ := &b.Func.Config.Types
  1731  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  1732  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  1733  	for {
  1734  		d := auxIntToInt64(v.AuxInt)
  1735  		if v_0.Op != OpARM64MOVDconst {
  1736  			break
  1737  		}
  1738  		c := auxIntToInt64(v_0.AuxInt)
  1739  		x := v_1
  1740  		v.reset(OpARM64ADDconst)
  1741  		v.AuxInt = int64ToAuxInt(c)
  1742  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  1743  		v0.AuxInt = int64ToAuxInt(d)
  1744  		v0.AddArg(x)
  1745  		v.AddArg(v0)
  1746  		return true
  1747  	}
  1748  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  1749  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  1750  	for {
  1751  		d := auxIntToInt64(v.AuxInt)
  1752  		x := v_0
  1753  		if v_1.Op != OpARM64MOVDconst {
  1754  			break
  1755  		}
  1756  		c := auxIntToInt64(v_1.AuxInt)
  1757  		v.reset(OpARM64ADDconst)
  1758  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  1759  		v.AddArg(x)
  1760  		return true
  1761  	}
  1762  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  1763  	// result: (REV16W x)
  1764  	for {
  1765  		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) {
  1766  			break
  1767  		}
  1768  		x := v_0.Args[0]
  1769  		if x != v_1 {
  1770  			break
  1771  		}
  1772  		v.reset(OpARM64REV16W)
  1773  		v.AddArg(x)
  1774  		return true
  1775  	}
  1776  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  1777  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1778  	// result: (REV16W x)
  1779  	for {
  1780  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  1781  			break
  1782  		}
  1783  		v_0_0 := v_0.Args[0]
  1784  		if v_0_0.Op != OpARM64ANDconst {
  1785  			break
  1786  		}
  1787  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1788  		x := v_0_0.Args[0]
  1789  		if v_1.Op != OpARM64ANDconst {
  1790  			break
  1791  		}
  1792  		c2 := auxIntToInt64(v_1.AuxInt)
  1793  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1794  			break
  1795  		}
  1796  		v.reset(OpARM64REV16W)
  1797  		v.AddArg(x)
  1798  		return true
  1799  	}
  1800  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1801  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  1802  	// result: (REV16 x)
  1803  	for {
  1804  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1805  			break
  1806  		}
  1807  		v_0_0 := v_0.Args[0]
  1808  		if v_0_0.Op != OpARM64ANDconst {
  1809  			break
  1810  		}
  1811  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1812  		x := v_0_0.Args[0]
  1813  		if v_1.Op != OpARM64ANDconst {
  1814  			break
  1815  		}
  1816  		c2 := auxIntToInt64(v_1.AuxInt)
  1817  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1818  			break
  1819  		}
  1820  		v.reset(OpARM64REV16)
  1821  		v.AddArg(x)
  1822  		return true
  1823  	}
  1824  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1825  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  1826  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  1827  	for {
  1828  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1829  			break
  1830  		}
  1831  		v_0_0 := v_0.Args[0]
  1832  		if v_0_0.Op != OpARM64ANDconst {
  1833  			break
  1834  		}
  1835  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1836  		x := v_0_0.Args[0]
  1837  		if v_1.Op != OpARM64ANDconst {
  1838  			break
  1839  		}
  1840  		c2 := auxIntToInt64(v_1.AuxInt)
  1841  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1842  			break
  1843  		}
  1844  		v.reset(OpARM64REV16)
  1845  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  1846  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  1847  		v0.AddArg(x)
  1848  		v.AddArg(v0)
  1849  		return true
  1850  	}
  1851  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  1852  	// result: (EXTRconst [64-c] x2 x)
  1853  	for {
  1854  		c := auxIntToInt64(v.AuxInt)
  1855  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  1856  			break
  1857  		}
  1858  		x := v_0.Args[0]
  1859  		x2 := v_1
  1860  		v.reset(OpARM64EXTRconst)
  1861  		v.AuxInt = int64ToAuxInt(64 - c)
  1862  		v.AddArg2(x2, x)
  1863  		return true
  1864  	}
  1865  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  1866  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  1867  	// result: (EXTRWconst [32-c] x2 x)
  1868  	for {
  1869  		t := v.Type
  1870  		c := auxIntToInt64(v.AuxInt)
  1871  		if v_0.Op != OpARM64UBFX {
  1872  			break
  1873  		}
  1874  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  1875  		x := v_0.Args[0]
  1876  		x2 := v_1
  1877  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  1878  			break
  1879  		}
  1880  		v.reset(OpARM64EXTRWconst)
  1881  		v.AuxInt = int64ToAuxInt(32 - c)
  1882  		v.AddArg2(x2, x)
  1883  		return true
  1884  	}
  1885  	return false
  1886  }
  1887  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  1888  	v_1 := v.Args[1]
  1889  	v_0 := v.Args[0]
  1890  	b := v.Block
  1891  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  1892  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  1893  	for {
  1894  		d := auxIntToInt64(v.AuxInt)
  1895  		if v_0.Op != OpARM64MOVDconst {
  1896  			break
  1897  		}
  1898  		c := auxIntToInt64(v_0.AuxInt)
  1899  		x := v_1
  1900  		v.reset(OpARM64ADDconst)
  1901  		v.AuxInt = int64ToAuxInt(c)
  1902  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  1903  		v0.AuxInt = int64ToAuxInt(d)
  1904  		v0.AddArg(x)
  1905  		v.AddArg(v0)
  1906  		return true
  1907  	}
  1908  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  1909  	// result: (ADDconst x [c>>uint64(d)])
  1910  	for {
  1911  		d := auxIntToInt64(v.AuxInt)
  1912  		x := v_0
  1913  		if v_1.Op != OpARM64MOVDconst {
  1914  			break
  1915  		}
  1916  		c := auxIntToInt64(v_1.AuxInt)
  1917  		v.reset(OpARM64ADDconst)
  1918  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  1919  		v.AddArg(x)
  1920  		return true
  1921  	}
  1922  	return false
  1923  }
  1924  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  1925  	v_1 := v.Args[1]
  1926  	v_0 := v.Args[0]
  1927  	b := v.Block
  1928  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  1929  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  1930  	for {
  1931  		d := auxIntToInt64(v.AuxInt)
  1932  		if v_0.Op != OpARM64MOVDconst {
  1933  			break
  1934  		}
  1935  		c := auxIntToInt64(v_0.AuxInt)
  1936  		x := v_1
  1937  		v.reset(OpARM64ADDconst)
  1938  		v.AuxInt = int64ToAuxInt(c)
  1939  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  1940  		v0.AuxInt = int64ToAuxInt(d)
  1941  		v0.AddArg(x)
  1942  		v.AddArg(v0)
  1943  		return true
  1944  	}
  1945  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  1946  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  1947  	for {
  1948  		d := auxIntToInt64(v.AuxInt)
  1949  		x := v_0
  1950  		if v_1.Op != OpARM64MOVDconst {
  1951  			break
  1952  		}
  1953  		c := auxIntToInt64(v_1.AuxInt)
  1954  		v.reset(OpARM64ADDconst)
  1955  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  1956  		v.AddArg(x)
  1957  		return true
  1958  	}
  1959  	return false
  1960  }
  1961  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  1962  	v_1 := v.Args[1]
  1963  	v_0 := v.Args[0]
  1964  	// match: (AND x (MOVDconst [c]))
  1965  	// result: (ANDconst [c] x)
  1966  	for {
  1967  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1968  			x := v_0
  1969  			if v_1.Op != OpARM64MOVDconst {
  1970  				continue
  1971  			}
  1972  			c := auxIntToInt64(v_1.AuxInt)
  1973  			v.reset(OpARM64ANDconst)
  1974  			v.AuxInt = int64ToAuxInt(c)
  1975  			v.AddArg(x)
  1976  			return true
  1977  		}
  1978  		break
  1979  	}
  1980  	// match: (AND x x)
  1981  	// result: x
  1982  	for {
  1983  		x := v_0
  1984  		if x != v_1 {
  1985  			break
  1986  		}
  1987  		v.copyOf(x)
  1988  		return true
  1989  	}
  1990  	// match: (AND x (MVN y))
  1991  	// result: (BIC x y)
  1992  	for {
  1993  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1994  			x := v_0
  1995  			if v_1.Op != OpARM64MVN {
  1996  				continue
  1997  			}
  1998  			y := v_1.Args[0]
  1999  			v.reset(OpARM64BIC)
  2000  			v.AddArg2(x, y)
  2001  			return true
  2002  		}
  2003  		break
  2004  	}
  2005  	// match: (AND x0 x1:(SLLconst [c] y))
  2006  	// cond: clobberIfDead(x1)
  2007  	// result: (ANDshiftLL x0 y [c])
  2008  	for {
  2009  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2010  			x0 := v_0
  2011  			x1 := v_1
  2012  			if x1.Op != OpARM64SLLconst {
  2013  				continue
  2014  			}
  2015  			c := auxIntToInt64(x1.AuxInt)
  2016  			y := x1.Args[0]
  2017  			if !(clobberIfDead(x1)) {
  2018  				continue
  2019  			}
  2020  			v.reset(OpARM64ANDshiftLL)
  2021  			v.AuxInt = int64ToAuxInt(c)
  2022  			v.AddArg2(x0, y)
  2023  			return true
  2024  		}
  2025  		break
  2026  	}
  2027  	// match: (AND x0 x1:(SRLconst [c] y))
  2028  	// cond: clobberIfDead(x1)
  2029  	// result: (ANDshiftRL x0 y [c])
  2030  	for {
  2031  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2032  			x0 := v_0
  2033  			x1 := v_1
  2034  			if x1.Op != OpARM64SRLconst {
  2035  				continue
  2036  			}
  2037  			c := auxIntToInt64(x1.AuxInt)
  2038  			y := x1.Args[0]
  2039  			if !(clobberIfDead(x1)) {
  2040  				continue
  2041  			}
  2042  			v.reset(OpARM64ANDshiftRL)
  2043  			v.AuxInt = int64ToAuxInt(c)
  2044  			v.AddArg2(x0, y)
  2045  			return true
  2046  		}
  2047  		break
  2048  	}
  2049  	// match: (AND x0 x1:(SRAconst [c] y))
  2050  	// cond: clobberIfDead(x1)
  2051  	// result: (ANDshiftRA x0 y [c])
  2052  	for {
  2053  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2054  			x0 := v_0
  2055  			x1 := v_1
  2056  			if x1.Op != OpARM64SRAconst {
  2057  				continue
  2058  			}
  2059  			c := auxIntToInt64(x1.AuxInt)
  2060  			y := x1.Args[0]
  2061  			if !(clobberIfDead(x1)) {
  2062  				continue
  2063  			}
  2064  			v.reset(OpARM64ANDshiftRA)
  2065  			v.AuxInt = int64ToAuxInt(c)
  2066  			v.AddArg2(x0, y)
  2067  			return true
  2068  		}
  2069  		break
  2070  	}
  2071  	// match: (AND x0 x1:(RORconst [c] y))
  2072  	// cond: clobberIfDead(x1)
  2073  	// result: (ANDshiftRO x0 y [c])
  2074  	for {
  2075  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2076  			x0 := v_0
  2077  			x1 := v_1
  2078  			if x1.Op != OpARM64RORconst {
  2079  				continue
  2080  			}
  2081  			c := auxIntToInt64(x1.AuxInt)
  2082  			y := x1.Args[0]
  2083  			if !(clobberIfDead(x1)) {
  2084  				continue
  2085  			}
  2086  			v.reset(OpARM64ANDshiftRO)
  2087  			v.AuxInt = int64ToAuxInt(c)
  2088  			v.AddArg2(x0, y)
  2089  			return true
  2090  		}
  2091  		break
  2092  	}
  2093  	return false
  2094  }
  2095  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  2096  	v_0 := v.Args[0]
  2097  	// match: (ANDconst [0] _)
  2098  	// result: (MOVDconst [0])
  2099  	for {
  2100  		if auxIntToInt64(v.AuxInt) != 0 {
  2101  			break
  2102  		}
  2103  		v.reset(OpARM64MOVDconst)
  2104  		v.AuxInt = int64ToAuxInt(0)
  2105  		return true
  2106  	}
  2107  	// match: (ANDconst [-1] x)
  2108  	// result: x
  2109  	for {
  2110  		if auxIntToInt64(v.AuxInt) != -1 {
  2111  			break
  2112  		}
  2113  		x := v_0
  2114  		v.copyOf(x)
  2115  		return true
  2116  	}
  2117  	// match: (ANDconst [c] (MOVDconst [d]))
  2118  	// result: (MOVDconst [c&d])
  2119  	for {
  2120  		c := auxIntToInt64(v.AuxInt)
  2121  		if v_0.Op != OpARM64MOVDconst {
  2122  			break
  2123  		}
  2124  		d := auxIntToInt64(v_0.AuxInt)
  2125  		v.reset(OpARM64MOVDconst)
  2126  		v.AuxInt = int64ToAuxInt(c & d)
  2127  		return true
  2128  	}
  2129  	// match: (ANDconst [c] (ANDconst [d] x))
  2130  	// result: (ANDconst [c&d] x)
  2131  	for {
  2132  		c := auxIntToInt64(v.AuxInt)
  2133  		if v_0.Op != OpARM64ANDconst {
  2134  			break
  2135  		}
  2136  		d := auxIntToInt64(v_0.AuxInt)
  2137  		x := v_0.Args[0]
  2138  		v.reset(OpARM64ANDconst)
  2139  		v.AuxInt = int64ToAuxInt(c & d)
  2140  		v.AddArg(x)
  2141  		return true
  2142  	}
  2143  	// match: (ANDconst [c] (MOVWUreg x))
  2144  	// result: (ANDconst [c&(1<<32-1)] x)
  2145  	for {
  2146  		c := auxIntToInt64(v.AuxInt)
  2147  		if v_0.Op != OpARM64MOVWUreg {
  2148  			break
  2149  		}
  2150  		x := v_0.Args[0]
  2151  		v.reset(OpARM64ANDconst)
  2152  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  2153  		v.AddArg(x)
  2154  		return true
  2155  	}
  2156  	// match: (ANDconst [c] (MOVHUreg x))
  2157  	// result: (ANDconst [c&(1<<16-1)] x)
  2158  	for {
  2159  		c := auxIntToInt64(v.AuxInt)
  2160  		if v_0.Op != OpARM64MOVHUreg {
  2161  			break
  2162  		}
  2163  		x := v_0.Args[0]
  2164  		v.reset(OpARM64ANDconst)
  2165  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  2166  		v.AddArg(x)
  2167  		return true
  2168  	}
  2169  	// match: (ANDconst [c] (MOVBUreg x))
  2170  	// result: (ANDconst [c&(1<<8-1)] x)
  2171  	for {
  2172  		c := auxIntToInt64(v.AuxInt)
  2173  		if v_0.Op != OpARM64MOVBUreg {
  2174  			break
  2175  		}
  2176  		x := v_0.Args[0]
  2177  		v.reset(OpARM64ANDconst)
  2178  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  2179  		v.AddArg(x)
  2180  		return true
  2181  	}
  2182  	// match: (ANDconst [ac] (SLLconst [sc] x))
  2183  	// cond: isARM64BFMask(sc, ac, sc)
  2184  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  2185  	for {
  2186  		ac := auxIntToInt64(v.AuxInt)
  2187  		if v_0.Op != OpARM64SLLconst {
  2188  			break
  2189  		}
  2190  		sc := auxIntToInt64(v_0.AuxInt)
  2191  		x := v_0.Args[0]
  2192  		if !(isARM64BFMask(sc, ac, sc)) {
  2193  			break
  2194  		}
  2195  		v.reset(OpARM64UBFIZ)
  2196  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  2197  		v.AddArg(x)
  2198  		return true
  2199  	}
  2200  	// match: (ANDconst [ac] (SRLconst [sc] x))
  2201  	// cond: isARM64BFMask(sc, ac, 0)
  2202  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  2203  	for {
  2204  		ac := auxIntToInt64(v.AuxInt)
  2205  		if v_0.Op != OpARM64SRLconst {
  2206  			break
  2207  		}
  2208  		sc := auxIntToInt64(v_0.AuxInt)
  2209  		x := v_0.Args[0]
  2210  		if !(isARM64BFMask(sc, ac, 0)) {
  2211  			break
  2212  		}
  2213  		v.reset(OpARM64UBFX)
  2214  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  2215  		v.AddArg(x)
  2216  		return true
  2217  	}
  2218  	// match: (ANDconst [c] (UBFX [bfc] x))
  2219  	// cond: isARM64BFMask(0, c, 0)
  2220  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  2221  	for {
  2222  		c := auxIntToInt64(v.AuxInt)
  2223  		if v_0.Op != OpARM64UBFX {
  2224  			break
  2225  		}
  2226  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  2227  		x := v_0.Args[0]
  2228  		if !(isARM64BFMask(0, c, 0)) {
  2229  			break
  2230  		}
  2231  		v.reset(OpARM64UBFX)
  2232  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  2233  		v.AddArg(x)
  2234  		return true
  2235  	}
  2236  	return false
  2237  }
  2238  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  2239  	v_1 := v.Args[1]
  2240  	v_0 := v.Args[0]
  2241  	b := v.Block
  2242  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  2243  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  2244  	for {
  2245  		d := auxIntToInt64(v.AuxInt)
  2246  		if v_0.Op != OpARM64MOVDconst {
  2247  			break
  2248  		}
  2249  		c := auxIntToInt64(v_0.AuxInt)
  2250  		x := v_1
  2251  		v.reset(OpARM64ANDconst)
  2252  		v.AuxInt = int64ToAuxInt(c)
  2253  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2254  		v0.AuxInt = int64ToAuxInt(d)
  2255  		v0.AddArg(x)
  2256  		v.AddArg(v0)
  2257  		return true
  2258  	}
  2259  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  2260  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  2261  	for {
  2262  		d := auxIntToInt64(v.AuxInt)
  2263  		x := v_0
  2264  		if v_1.Op != OpARM64MOVDconst {
  2265  			break
  2266  		}
  2267  		c := auxIntToInt64(v_1.AuxInt)
  2268  		v.reset(OpARM64ANDconst)
  2269  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2270  		v.AddArg(x)
  2271  		return true
  2272  	}
  2273  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  2274  	// result: y
  2275  	for {
  2276  		c := auxIntToInt64(v.AuxInt)
  2277  		y := v_0
  2278  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  2279  			break
  2280  		}
  2281  		x := y.Args[0]
  2282  		if x != v_1 {
  2283  			break
  2284  		}
  2285  		v.copyOf(y)
  2286  		return true
  2287  	}
  2288  	return false
  2289  }
  2290  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  2291  	v_1 := v.Args[1]
  2292  	v_0 := v.Args[0]
  2293  	b := v.Block
  2294  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  2295  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  2296  	for {
  2297  		d := auxIntToInt64(v.AuxInt)
  2298  		if v_0.Op != OpARM64MOVDconst {
  2299  			break
  2300  		}
  2301  		c := auxIntToInt64(v_0.AuxInt)
  2302  		x := v_1
  2303  		v.reset(OpARM64ANDconst)
  2304  		v.AuxInt = int64ToAuxInt(c)
  2305  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2306  		v0.AuxInt = int64ToAuxInt(d)
  2307  		v0.AddArg(x)
  2308  		v.AddArg(v0)
  2309  		return true
  2310  	}
  2311  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  2312  	// result: (ANDconst x [c>>uint64(d)])
  2313  	for {
  2314  		d := auxIntToInt64(v.AuxInt)
  2315  		x := v_0
  2316  		if v_1.Op != OpARM64MOVDconst {
  2317  			break
  2318  		}
  2319  		c := auxIntToInt64(v_1.AuxInt)
  2320  		v.reset(OpARM64ANDconst)
  2321  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2322  		v.AddArg(x)
  2323  		return true
  2324  	}
  2325  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  2326  	// result: y
  2327  	for {
  2328  		c := auxIntToInt64(v.AuxInt)
  2329  		y := v_0
  2330  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  2331  			break
  2332  		}
  2333  		x := y.Args[0]
  2334  		if x != v_1 {
  2335  			break
  2336  		}
  2337  		v.copyOf(y)
  2338  		return true
  2339  	}
  2340  	return false
  2341  }
  2342  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  2343  	v_1 := v.Args[1]
  2344  	v_0 := v.Args[0]
  2345  	b := v.Block
  2346  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  2347  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  2348  	for {
  2349  		d := auxIntToInt64(v.AuxInt)
  2350  		if v_0.Op != OpARM64MOVDconst {
  2351  			break
  2352  		}
  2353  		c := auxIntToInt64(v_0.AuxInt)
  2354  		x := v_1
  2355  		v.reset(OpARM64ANDconst)
  2356  		v.AuxInt = int64ToAuxInt(c)
  2357  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2358  		v0.AuxInt = int64ToAuxInt(d)
  2359  		v0.AddArg(x)
  2360  		v.AddArg(v0)
  2361  		return true
  2362  	}
  2363  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  2364  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  2365  	for {
  2366  		d := auxIntToInt64(v.AuxInt)
  2367  		x := v_0
  2368  		if v_1.Op != OpARM64MOVDconst {
  2369  			break
  2370  		}
  2371  		c := auxIntToInt64(v_1.AuxInt)
  2372  		v.reset(OpARM64ANDconst)
  2373  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2374  		v.AddArg(x)
  2375  		return true
  2376  	}
  2377  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  2378  	// result: y
  2379  	for {
  2380  		c := auxIntToInt64(v.AuxInt)
  2381  		y := v_0
  2382  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  2383  			break
  2384  		}
  2385  		x := y.Args[0]
  2386  		if x != v_1 {
  2387  			break
  2388  		}
  2389  		v.copyOf(y)
  2390  		return true
  2391  	}
  2392  	return false
  2393  }
  2394  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  2395  	v_1 := v.Args[1]
  2396  	v_0 := v.Args[0]
  2397  	b := v.Block
  2398  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  2399  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  2400  	for {
  2401  		d := auxIntToInt64(v.AuxInt)
  2402  		if v_0.Op != OpARM64MOVDconst {
  2403  			break
  2404  		}
  2405  		c := auxIntToInt64(v_0.AuxInt)
  2406  		x := v_1
  2407  		v.reset(OpARM64ANDconst)
  2408  		v.AuxInt = int64ToAuxInt(c)
  2409  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  2410  		v0.AuxInt = int64ToAuxInt(d)
  2411  		v0.AddArg(x)
  2412  		v.AddArg(v0)
  2413  		return true
  2414  	}
  2415  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  2416  	// result: (ANDconst x [rotateRight64(c, d)])
  2417  	for {
  2418  		d := auxIntToInt64(v.AuxInt)
  2419  		x := v_0
  2420  		if v_1.Op != OpARM64MOVDconst {
  2421  			break
  2422  		}
  2423  		c := auxIntToInt64(v_1.AuxInt)
  2424  		v.reset(OpARM64ANDconst)
  2425  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  2426  		v.AddArg(x)
  2427  		return true
  2428  	}
  2429  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  2430  	// result: y
  2431  	for {
  2432  		c := auxIntToInt64(v.AuxInt)
  2433  		y := v_0
  2434  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  2435  			break
  2436  		}
  2437  		x := y.Args[0]
  2438  		if x != v_1 {
  2439  			break
  2440  		}
  2441  		v.copyOf(y)
  2442  		return true
  2443  	}
  2444  	return false
  2445  }
  2446  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  2447  	v_1 := v.Args[1]
  2448  	v_0 := v.Args[0]
  2449  	// match: (BIC x (MOVDconst [c]))
  2450  	// result: (ANDconst [^c] x)
  2451  	for {
  2452  		x := v_0
  2453  		if v_1.Op != OpARM64MOVDconst {
  2454  			break
  2455  		}
  2456  		c := auxIntToInt64(v_1.AuxInt)
  2457  		v.reset(OpARM64ANDconst)
  2458  		v.AuxInt = int64ToAuxInt(^c)
  2459  		v.AddArg(x)
  2460  		return true
  2461  	}
  2462  	// match: (BIC x x)
  2463  	// result: (MOVDconst [0])
  2464  	for {
  2465  		x := v_0
  2466  		if x != v_1 {
  2467  			break
  2468  		}
  2469  		v.reset(OpARM64MOVDconst)
  2470  		v.AuxInt = int64ToAuxInt(0)
  2471  		return true
  2472  	}
  2473  	// match: (BIC x0 x1:(SLLconst [c] y))
  2474  	// cond: clobberIfDead(x1)
  2475  	// result: (BICshiftLL x0 y [c])
  2476  	for {
  2477  		x0 := v_0
  2478  		x1 := v_1
  2479  		if x1.Op != OpARM64SLLconst {
  2480  			break
  2481  		}
  2482  		c := auxIntToInt64(x1.AuxInt)
  2483  		y := x1.Args[0]
  2484  		if !(clobberIfDead(x1)) {
  2485  			break
  2486  		}
  2487  		v.reset(OpARM64BICshiftLL)
  2488  		v.AuxInt = int64ToAuxInt(c)
  2489  		v.AddArg2(x0, y)
  2490  		return true
  2491  	}
  2492  	// match: (BIC x0 x1:(SRLconst [c] y))
  2493  	// cond: clobberIfDead(x1)
  2494  	// result: (BICshiftRL x0 y [c])
  2495  	for {
  2496  		x0 := v_0
  2497  		x1 := v_1
  2498  		if x1.Op != OpARM64SRLconst {
  2499  			break
  2500  		}
  2501  		c := auxIntToInt64(x1.AuxInt)
  2502  		y := x1.Args[0]
  2503  		if !(clobberIfDead(x1)) {
  2504  			break
  2505  		}
  2506  		v.reset(OpARM64BICshiftRL)
  2507  		v.AuxInt = int64ToAuxInt(c)
  2508  		v.AddArg2(x0, y)
  2509  		return true
  2510  	}
  2511  	// match: (BIC x0 x1:(SRAconst [c] y))
  2512  	// cond: clobberIfDead(x1)
  2513  	// result: (BICshiftRA x0 y [c])
  2514  	for {
  2515  		x0 := v_0
  2516  		x1 := v_1
  2517  		if x1.Op != OpARM64SRAconst {
  2518  			break
  2519  		}
  2520  		c := auxIntToInt64(x1.AuxInt)
  2521  		y := x1.Args[0]
  2522  		if !(clobberIfDead(x1)) {
  2523  			break
  2524  		}
  2525  		v.reset(OpARM64BICshiftRA)
  2526  		v.AuxInt = int64ToAuxInt(c)
  2527  		v.AddArg2(x0, y)
  2528  		return true
  2529  	}
  2530  	// match: (BIC x0 x1:(RORconst [c] y))
  2531  	// cond: clobberIfDead(x1)
  2532  	// result: (BICshiftRO x0 y [c])
  2533  	for {
  2534  		x0 := v_0
  2535  		x1 := v_1
  2536  		if x1.Op != OpARM64RORconst {
  2537  			break
  2538  		}
  2539  		c := auxIntToInt64(x1.AuxInt)
  2540  		y := x1.Args[0]
  2541  		if !(clobberIfDead(x1)) {
  2542  			break
  2543  		}
  2544  		v.reset(OpARM64BICshiftRO)
  2545  		v.AuxInt = int64ToAuxInt(c)
  2546  		v.AddArg2(x0, y)
  2547  		return true
  2548  	}
  2549  	return false
  2550  }
  2551  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  2552  	v_1 := v.Args[1]
  2553  	v_0 := v.Args[0]
  2554  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  2555  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  2556  	for {
  2557  		d := auxIntToInt64(v.AuxInt)
  2558  		x := v_0
  2559  		if v_1.Op != OpARM64MOVDconst {
  2560  			break
  2561  		}
  2562  		c := auxIntToInt64(v_1.AuxInt)
  2563  		v.reset(OpARM64ANDconst)
  2564  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  2565  		v.AddArg(x)
  2566  		return true
  2567  	}
  2568  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  2569  	// result: (MOVDconst [0])
  2570  	for {
  2571  		c := auxIntToInt64(v.AuxInt)
  2572  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  2573  			break
  2574  		}
  2575  		x := v_0.Args[0]
  2576  		if x != v_1 {
  2577  			break
  2578  		}
  2579  		v.reset(OpARM64MOVDconst)
  2580  		v.AuxInt = int64ToAuxInt(0)
  2581  		return true
  2582  	}
  2583  	return false
  2584  }
  2585  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  2586  	v_1 := v.Args[1]
  2587  	v_0 := v.Args[0]
  2588  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  2589  	// result: (ANDconst x [^(c>>uint64(d))])
  2590  	for {
  2591  		d := auxIntToInt64(v.AuxInt)
  2592  		x := v_0
  2593  		if v_1.Op != OpARM64MOVDconst {
  2594  			break
  2595  		}
  2596  		c := auxIntToInt64(v_1.AuxInt)
  2597  		v.reset(OpARM64ANDconst)
  2598  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  2599  		v.AddArg(x)
  2600  		return true
  2601  	}
  2602  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  2603  	// result: (MOVDconst [0])
  2604  	for {
  2605  		c := auxIntToInt64(v.AuxInt)
  2606  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  2607  			break
  2608  		}
  2609  		x := v_0.Args[0]
  2610  		if x != v_1 {
  2611  			break
  2612  		}
  2613  		v.reset(OpARM64MOVDconst)
  2614  		v.AuxInt = int64ToAuxInt(0)
  2615  		return true
  2616  	}
  2617  	return false
  2618  }
  2619  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  2620  	v_1 := v.Args[1]
  2621  	v_0 := v.Args[0]
  2622  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  2623  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  2624  	for {
  2625  		d := auxIntToInt64(v.AuxInt)
  2626  		x := v_0
  2627  		if v_1.Op != OpARM64MOVDconst {
  2628  			break
  2629  		}
  2630  		c := auxIntToInt64(v_1.AuxInt)
  2631  		v.reset(OpARM64ANDconst)
  2632  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  2633  		v.AddArg(x)
  2634  		return true
  2635  	}
  2636  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  2637  	// result: (MOVDconst [0])
  2638  	for {
  2639  		c := auxIntToInt64(v.AuxInt)
  2640  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  2641  			break
  2642  		}
  2643  		x := v_0.Args[0]
  2644  		if x != v_1 {
  2645  			break
  2646  		}
  2647  		v.reset(OpARM64MOVDconst)
  2648  		v.AuxInt = int64ToAuxInt(0)
  2649  		return true
  2650  	}
  2651  	return false
  2652  }
  2653  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  2654  	v_1 := v.Args[1]
  2655  	v_0 := v.Args[0]
  2656  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  2657  	// result: (ANDconst x [^rotateRight64(c, d)])
  2658  	for {
  2659  		d := auxIntToInt64(v.AuxInt)
  2660  		x := v_0
  2661  		if v_1.Op != OpARM64MOVDconst {
  2662  			break
  2663  		}
  2664  		c := auxIntToInt64(v_1.AuxInt)
  2665  		v.reset(OpARM64ANDconst)
  2666  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  2667  		v.AddArg(x)
  2668  		return true
  2669  	}
  2670  	// match: (BICshiftRO (RORconst x [c]) x [c])
  2671  	// result: (MOVDconst [0])
  2672  	for {
  2673  		c := auxIntToInt64(v.AuxInt)
  2674  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  2675  			break
  2676  		}
  2677  		x := v_0.Args[0]
  2678  		if x != v_1 {
  2679  			break
  2680  		}
  2681  		v.reset(OpARM64MOVDconst)
  2682  		v.AuxInt = int64ToAuxInt(0)
  2683  		return true
  2684  	}
  2685  	return false
  2686  }
  2687  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  2688  	v_1 := v.Args[1]
  2689  	v_0 := v.Args[0]
  2690  	// match: (CMN x (MOVDconst [c]))
  2691  	// result: (CMNconst [c] x)
  2692  	for {
  2693  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2694  			x := v_0
  2695  			if v_1.Op != OpARM64MOVDconst {
  2696  				continue
  2697  			}
  2698  			c := auxIntToInt64(v_1.AuxInt)
  2699  			v.reset(OpARM64CMNconst)
  2700  			v.AuxInt = int64ToAuxInt(c)
  2701  			v.AddArg(x)
  2702  			return true
  2703  		}
  2704  		break
  2705  	}
  2706  	// match: (CMN x0 x1:(SLLconst [c] y))
  2707  	// cond: clobberIfDead(x1)
  2708  	// result: (CMNshiftLL x0 y [c])
  2709  	for {
  2710  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2711  			x0 := v_0
  2712  			x1 := v_1
  2713  			if x1.Op != OpARM64SLLconst {
  2714  				continue
  2715  			}
  2716  			c := auxIntToInt64(x1.AuxInt)
  2717  			y := x1.Args[0]
  2718  			if !(clobberIfDead(x1)) {
  2719  				continue
  2720  			}
  2721  			v.reset(OpARM64CMNshiftLL)
  2722  			v.AuxInt = int64ToAuxInt(c)
  2723  			v.AddArg2(x0, y)
  2724  			return true
  2725  		}
  2726  		break
  2727  	}
  2728  	// match: (CMN x0 x1:(SRLconst [c] y))
  2729  	// cond: clobberIfDead(x1)
  2730  	// result: (CMNshiftRL x0 y [c])
  2731  	for {
  2732  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2733  			x0 := v_0
  2734  			x1 := v_1
  2735  			if x1.Op != OpARM64SRLconst {
  2736  				continue
  2737  			}
  2738  			c := auxIntToInt64(x1.AuxInt)
  2739  			y := x1.Args[0]
  2740  			if !(clobberIfDead(x1)) {
  2741  				continue
  2742  			}
  2743  			v.reset(OpARM64CMNshiftRL)
  2744  			v.AuxInt = int64ToAuxInt(c)
  2745  			v.AddArg2(x0, y)
  2746  			return true
  2747  		}
  2748  		break
  2749  	}
  2750  	// match: (CMN x0 x1:(SRAconst [c] y))
  2751  	// cond: clobberIfDead(x1)
  2752  	// result: (CMNshiftRA x0 y [c])
  2753  	for {
  2754  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2755  			x0 := v_0
  2756  			x1 := v_1
  2757  			if x1.Op != OpARM64SRAconst {
  2758  				continue
  2759  			}
  2760  			c := auxIntToInt64(x1.AuxInt)
  2761  			y := x1.Args[0]
  2762  			if !(clobberIfDead(x1)) {
  2763  				continue
  2764  			}
  2765  			v.reset(OpARM64CMNshiftRA)
  2766  			v.AuxInt = int64ToAuxInt(c)
  2767  			v.AddArg2(x0, y)
  2768  			return true
  2769  		}
  2770  		break
  2771  	}
  2772  	return false
  2773  }
  2774  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  2775  	v_1 := v.Args[1]
  2776  	v_0 := v.Args[0]
  2777  	// match: (CMNW x (MOVDconst [c]))
  2778  	// result: (CMNWconst [int32(c)] x)
  2779  	for {
  2780  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2781  			x := v_0
  2782  			if v_1.Op != OpARM64MOVDconst {
  2783  				continue
  2784  			}
  2785  			c := auxIntToInt64(v_1.AuxInt)
  2786  			v.reset(OpARM64CMNWconst)
  2787  			v.AuxInt = int32ToAuxInt(int32(c))
  2788  			v.AddArg(x)
  2789  			return true
  2790  		}
  2791  		break
  2792  	}
  2793  	return false
  2794  }
  2795  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  2796  	v_0 := v.Args[0]
  2797  	// match: (CMNWconst [c] y)
  2798  	// cond: c < 0 && c != -1<<31
  2799  	// result: (CMPWconst [-c] y)
  2800  	for {
  2801  		c := auxIntToInt32(v.AuxInt)
  2802  		y := v_0
  2803  		if !(c < 0 && c != -1<<31) {
  2804  			break
  2805  		}
  2806  		v.reset(OpARM64CMPWconst)
  2807  		v.AuxInt = int32ToAuxInt(-c)
  2808  		v.AddArg(y)
  2809  		return true
  2810  	}
  2811  	// match: (CMNWconst (MOVDconst [x]) [y])
  2812  	// result: (FlagConstant [addFlags32(int32(x),y)])
  2813  	for {
  2814  		y := auxIntToInt32(v.AuxInt)
  2815  		if v_0.Op != OpARM64MOVDconst {
  2816  			break
  2817  		}
  2818  		x := auxIntToInt64(v_0.AuxInt)
  2819  		v.reset(OpARM64FlagConstant)
  2820  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  2821  		return true
  2822  	}
  2823  	return false
  2824  }
  2825  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  2826  	v_0 := v.Args[0]
  2827  	// match: (CMNconst [c] y)
  2828  	// cond: c < 0 && c != -1<<63
  2829  	// result: (CMPconst [-c] y)
  2830  	for {
  2831  		c := auxIntToInt64(v.AuxInt)
  2832  		y := v_0
  2833  		if !(c < 0 && c != -1<<63) {
  2834  			break
  2835  		}
  2836  		v.reset(OpARM64CMPconst)
  2837  		v.AuxInt = int64ToAuxInt(-c)
  2838  		v.AddArg(y)
  2839  		return true
  2840  	}
  2841  	// match: (CMNconst (MOVDconst [x]) [y])
  2842  	// result: (FlagConstant [addFlags64(x,y)])
  2843  	for {
  2844  		y := auxIntToInt64(v.AuxInt)
  2845  		if v_0.Op != OpARM64MOVDconst {
  2846  			break
  2847  		}
  2848  		x := auxIntToInt64(v_0.AuxInt)
  2849  		v.reset(OpARM64FlagConstant)
  2850  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  2851  		return true
  2852  	}
  2853  	return false
  2854  }
  2855  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  2856  	v_1 := v.Args[1]
  2857  	v_0 := v.Args[0]
  2858  	b := v.Block
  2859  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  2860  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  2861  	for {
  2862  		d := auxIntToInt64(v.AuxInt)
  2863  		if v_0.Op != OpARM64MOVDconst {
  2864  			break
  2865  		}
  2866  		c := auxIntToInt64(v_0.AuxInt)
  2867  		x := v_1
  2868  		v.reset(OpARM64CMNconst)
  2869  		v.AuxInt = int64ToAuxInt(c)
  2870  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2871  		v0.AuxInt = int64ToAuxInt(d)
  2872  		v0.AddArg(x)
  2873  		v.AddArg(v0)
  2874  		return true
  2875  	}
  2876  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  2877  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  2878  	for {
  2879  		d := auxIntToInt64(v.AuxInt)
  2880  		x := v_0
  2881  		if v_1.Op != OpARM64MOVDconst {
  2882  			break
  2883  		}
  2884  		c := auxIntToInt64(v_1.AuxInt)
  2885  		v.reset(OpARM64CMNconst)
  2886  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2887  		v.AddArg(x)
  2888  		return true
  2889  	}
  2890  	return false
  2891  }
  2892  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  2893  	v_1 := v.Args[1]
  2894  	v_0 := v.Args[0]
  2895  	b := v.Block
  2896  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  2897  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  2898  	for {
  2899  		d := auxIntToInt64(v.AuxInt)
  2900  		if v_0.Op != OpARM64MOVDconst {
  2901  			break
  2902  		}
  2903  		c := auxIntToInt64(v_0.AuxInt)
  2904  		x := v_1
  2905  		v.reset(OpARM64CMNconst)
  2906  		v.AuxInt = int64ToAuxInt(c)
  2907  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2908  		v0.AuxInt = int64ToAuxInt(d)
  2909  		v0.AddArg(x)
  2910  		v.AddArg(v0)
  2911  		return true
  2912  	}
  2913  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  2914  	// result: (CMNconst x [c>>uint64(d)])
  2915  	for {
  2916  		d := auxIntToInt64(v.AuxInt)
  2917  		x := v_0
  2918  		if v_1.Op != OpARM64MOVDconst {
  2919  			break
  2920  		}
  2921  		c := auxIntToInt64(v_1.AuxInt)
  2922  		v.reset(OpARM64CMNconst)
  2923  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2924  		v.AddArg(x)
  2925  		return true
  2926  	}
  2927  	return false
  2928  }
  2929  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  2930  	v_1 := v.Args[1]
  2931  	v_0 := v.Args[0]
  2932  	b := v.Block
  2933  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  2934  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  2935  	for {
  2936  		d := auxIntToInt64(v.AuxInt)
  2937  		if v_0.Op != OpARM64MOVDconst {
  2938  			break
  2939  		}
  2940  		c := auxIntToInt64(v_0.AuxInt)
  2941  		x := v_1
  2942  		v.reset(OpARM64CMNconst)
  2943  		v.AuxInt = int64ToAuxInt(c)
  2944  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2945  		v0.AuxInt = int64ToAuxInt(d)
  2946  		v0.AddArg(x)
  2947  		v.AddArg(v0)
  2948  		return true
  2949  	}
  2950  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  2951  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  2952  	for {
  2953  		d := auxIntToInt64(v.AuxInt)
  2954  		x := v_0
  2955  		if v_1.Op != OpARM64MOVDconst {
  2956  			break
  2957  		}
  2958  		c := auxIntToInt64(v_1.AuxInt)
  2959  		v.reset(OpARM64CMNconst)
  2960  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2961  		v.AddArg(x)
  2962  		return true
  2963  	}
  2964  	return false
  2965  }
  2966  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  2967  	v_1 := v.Args[1]
  2968  	v_0 := v.Args[0]
  2969  	b := v.Block
  2970  	// match: (CMP x (MOVDconst [c]))
  2971  	// result: (CMPconst [c] x)
  2972  	for {
  2973  		x := v_0
  2974  		if v_1.Op != OpARM64MOVDconst {
  2975  			break
  2976  		}
  2977  		c := auxIntToInt64(v_1.AuxInt)
  2978  		v.reset(OpARM64CMPconst)
  2979  		v.AuxInt = int64ToAuxInt(c)
  2980  		v.AddArg(x)
  2981  		return true
  2982  	}
  2983  	// match: (CMP (MOVDconst [c]) x)
  2984  	// result: (InvertFlags (CMPconst [c] x))
  2985  	for {
  2986  		if v_0.Op != OpARM64MOVDconst {
  2987  			break
  2988  		}
  2989  		c := auxIntToInt64(v_0.AuxInt)
  2990  		x := v_1
  2991  		v.reset(OpARM64InvertFlags)
  2992  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  2993  		v0.AuxInt = int64ToAuxInt(c)
  2994  		v0.AddArg(x)
  2995  		v.AddArg(v0)
  2996  		return true
  2997  	}
  2998  	// match: (CMP x y)
  2999  	// cond: canonLessThan(x,y)
  3000  	// result: (InvertFlags (CMP y x))
  3001  	for {
  3002  		x := v_0
  3003  		y := v_1
  3004  		if !(canonLessThan(x, y)) {
  3005  			break
  3006  		}
  3007  		v.reset(OpARM64InvertFlags)
  3008  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  3009  		v0.AddArg2(y, x)
  3010  		v.AddArg(v0)
  3011  		return true
  3012  	}
  3013  	// match: (CMP x0 x1:(SLLconst [c] y))
  3014  	// cond: clobberIfDead(x1)
  3015  	// result: (CMPshiftLL x0 y [c])
  3016  	for {
  3017  		x0 := v_0
  3018  		x1 := v_1
  3019  		if x1.Op != OpARM64SLLconst {
  3020  			break
  3021  		}
  3022  		c := auxIntToInt64(x1.AuxInt)
  3023  		y := x1.Args[0]
  3024  		if !(clobberIfDead(x1)) {
  3025  			break
  3026  		}
  3027  		v.reset(OpARM64CMPshiftLL)
  3028  		v.AuxInt = int64ToAuxInt(c)
  3029  		v.AddArg2(x0, y)
  3030  		return true
  3031  	}
  3032  	// match: (CMP x0:(SLLconst [c] y) x1)
  3033  	// cond: clobberIfDead(x0)
  3034  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  3035  	for {
  3036  		x0 := v_0
  3037  		if x0.Op != OpARM64SLLconst {
  3038  			break
  3039  		}
  3040  		c := auxIntToInt64(x0.AuxInt)
  3041  		y := x0.Args[0]
  3042  		x1 := v_1
  3043  		if !(clobberIfDead(x0)) {
  3044  			break
  3045  		}
  3046  		v.reset(OpARM64InvertFlags)
  3047  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  3048  		v0.AuxInt = int64ToAuxInt(c)
  3049  		v0.AddArg2(x1, y)
  3050  		v.AddArg(v0)
  3051  		return true
  3052  	}
  3053  	// match: (CMP x0 x1:(SRLconst [c] y))
  3054  	// cond: clobberIfDead(x1)
  3055  	// result: (CMPshiftRL x0 y [c])
  3056  	for {
  3057  		x0 := v_0
  3058  		x1 := v_1
  3059  		if x1.Op != OpARM64SRLconst {
  3060  			break
  3061  		}
  3062  		c := auxIntToInt64(x1.AuxInt)
  3063  		y := x1.Args[0]
  3064  		if !(clobberIfDead(x1)) {
  3065  			break
  3066  		}
  3067  		v.reset(OpARM64CMPshiftRL)
  3068  		v.AuxInt = int64ToAuxInt(c)
  3069  		v.AddArg2(x0, y)
  3070  		return true
  3071  	}
  3072  	// match: (CMP x0:(SRLconst [c] y) x1)
  3073  	// cond: clobberIfDead(x0)
  3074  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  3075  	for {
  3076  		x0 := v_0
  3077  		if x0.Op != OpARM64SRLconst {
  3078  			break
  3079  		}
  3080  		c := auxIntToInt64(x0.AuxInt)
  3081  		y := x0.Args[0]
  3082  		x1 := v_1
  3083  		if !(clobberIfDead(x0)) {
  3084  			break
  3085  		}
  3086  		v.reset(OpARM64InvertFlags)
  3087  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  3088  		v0.AuxInt = int64ToAuxInt(c)
  3089  		v0.AddArg2(x1, y)
  3090  		v.AddArg(v0)
  3091  		return true
  3092  	}
  3093  	// match: (CMP x0 x1:(SRAconst [c] y))
  3094  	// cond: clobberIfDead(x1)
  3095  	// result: (CMPshiftRA x0 y [c])
  3096  	for {
  3097  		x0 := v_0
  3098  		x1 := v_1
  3099  		if x1.Op != OpARM64SRAconst {
  3100  			break
  3101  		}
  3102  		c := auxIntToInt64(x1.AuxInt)
  3103  		y := x1.Args[0]
  3104  		if !(clobberIfDead(x1)) {
  3105  			break
  3106  		}
  3107  		v.reset(OpARM64CMPshiftRA)
  3108  		v.AuxInt = int64ToAuxInt(c)
  3109  		v.AddArg2(x0, y)
  3110  		return true
  3111  	}
  3112  	// match: (CMP x0:(SRAconst [c] y) x1)
  3113  	// cond: clobberIfDead(x0)
  3114  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  3115  	for {
  3116  		x0 := v_0
  3117  		if x0.Op != OpARM64SRAconst {
  3118  			break
  3119  		}
  3120  		c := auxIntToInt64(x0.AuxInt)
  3121  		y := x0.Args[0]
  3122  		x1 := v_1
  3123  		if !(clobberIfDead(x0)) {
  3124  			break
  3125  		}
  3126  		v.reset(OpARM64InvertFlags)
  3127  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  3128  		v0.AuxInt = int64ToAuxInt(c)
  3129  		v0.AddArg2(x1, y)
  3130  		v.AddArg(v0)
  3131  		return true
  3132  	}
  3133  	return false
  3134  }
  3135  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  3136  	v_1 := v.Args[1]
  3137  	v_0 := v.Args[0]
  3138  	b := v.Block
  3139  	// match: (CMPW x (MOVDconst [c]))
  3140  	// result: (CMPWconst [int32(c)] x)
  3141  	for {
  3142  		x := v_0
  3143  		if v_1.Op != OpARM64MOVDconst {
  3144  			break
  3145  		}
  3146  		c := auxIntToInt64(v_1.AuxInt)
  3147  		v.reset(OpARM64CMPWconst)
  3148  		v.AuxInt = int32ToAuxInt(int32(c))
  3149  		v.AddArg(x)
  3150  		return true
  3151  	}
  3152  	// match: (CMPW (MOVDconst [c]) x)
  3153  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  3154  	for {
  3155  		if v_0.Op != OpARM64MOVDconst {
  3156  			break
  3157  		}
  3158  		c := auxIntToInt64(v_0.AuxInt)
  3159  		x := v_1
  3160  		v.reset(OpARM64InvertFlags)
  3161  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  3162  		v0.AuxInt = int32ToAuxInt(int32(c))
  3163  		v0.AddArg(x)
  3164  		v.AddArg(v0)
  3165  		return true
  3166  	}
  3167  	// match: (CMPW x y)
  3168  	// cond: canonLessThan(x,y)
  3169  	// result: (InvertFlags (CMPW y x))
  3170  	for {
  3171  		x := v_0
  3172  		y := v_1
  3173  		if !(canonLessThan(x, y)) {
  3174  			break
  3175  		}
  3176  		v.reset(OpARM64InvertFlags)
  3177  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  3178  		v0.AddArg2(y, x)
  3179  		v.AddArg(v0)
  3180  		return true
  3181  	}
  3182  	return false
  3183  }
  3184  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  3185  	v_0 := v.Args[0]
  3186  	// match: (CMPWconst [c] y)
  3187  	// cond: c < 0 && c != -1<<31
  3188  	// result: (CMNWconst [-c] y)
  3189  	for {
  3190  		c := auxIntToInt32(v.AuxInt)
  3191  		y := v_0
  3192  		if !(c < 0 && c != -1<<31) {
  3193  			break
  3194  		}
  3195  		v.reset(OpARM64CMNWconst)
  3196  		v.AuxInt = int32ToAuxInt(-c)
  3197  		v.AddArg(y)
  3198  		return true
  3199  	}
  3200  	// match: (CMPWconst (MOVDconst [x]) [y])
  3201  	// result: (FlagConstant [subFlags32(int32(x),y)])
  3202  	for {
  3203  		y := auxIntToInt32(v.AuxInt)
  3204  		if v_0.Op != OpARM64MOVDconst {
  3205  			break
  3206  		}
  3207  		x := auxIntToInt64(v_0.AuxInt)
  3208  		v.reset(OpARM64FlagConstant)
  3209  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  3210  		return true
  3211  	}
  3212  	// match: (CMPWconst (MOVBUreg _) [c])
  3213  	// cond: 0xff < c
  3214  	// result: (FlagConstant [subFlags64(0,1)])
  3215  	for {
  3216  		c := auxIntToInt32(v.AuxInt)
  3217  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3218  			break
  3219  		}
  3220  		v.reset(OpARM64FlagConstant)
  3221  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3222  		return true
  3223  	}
  3224  	// match: (CMPWconst (MOVHUreg _) [c])
  3225  	// cond: 0xffff < c
  3226  	// result: (FlagConstant [subFlags64(0,1)])
  3227  	for {
  3228  		c := auxIntToInt32(v.AuxInt)
  3229  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3230  			break
  3231  		}
  3232  		v.reset(OpARM64FlagConstant)
  3233  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3234  		return true
  3235  	}
  3236  	return false
  3237  }
  3238  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  3239  	v_0 := v.Args[0]
  3240  	// match: (CMPconst [c] y)
  3241  	// cond: c < 0 && c != -1<<63
  3242  	// result: (CMNconst [-c] y)
  3243  	for {
  3244  		c := auxIntToInt64(v.AuxInt)
  3245  		y := v_0
  3246  		if !(c < 0 && c != -1<<63) {
  3247  			break
  3248  		}
  3249  		v.reset(OpARM64CMNconst)
  3250  		v.AuxInt = int64ToAuxInt(-c)
  3251  		v.AddArg(y)
  3252  		return true
  3253  	}
  3254  	// match: (CMPconst (MOVDconst [x]) [y])
  3255  	// result: (FlagConstant [subFlags64(x,y)])
  3256  	for {
  3257  		y := auxIntToInt64(v.AuxInt)
  3258  		if v_0.Op != OpARM64MOVDconst {
  3259  			break
  3260  		}
  3261  		x := auxIntToInt64(v_0.AuxInt)
  3262  		v.reset(OpARM64FlagConstant)
  3263  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  3264  		return true
  3265  	}
  3266  	// match: (CMPconst (MOVBUreg _) [c])
  3267  	// cond: 0xff < c
  3268  	// result: (FlagConstant [subFlags64(0,1)])
  3269  	for {
  3270  		c := auxIntToInt64(v.AuxInt)
  3271  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3272  			break
  3273  		}
  3274  		v.reset(OpARM64FlagConstant)
  3275  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3276  		return true
  3277  	}
  3278  	// match: (CMPconst (MOVHUreg _) [c])
  3279  	// cond: 0xffff < c
  3280  	// result: (FlagConstant [subFlags64(0,1)])
  3281  	for {
  3282  		c := auxIntToInt64(v.AuxInt)
  3283  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3284  			break
  3285  		}
  3286  		v.reset(OpARM64FlagConstant)
  3287  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3288  		return true
  3289  	}
  3290  	// match: (CMPconst (MOVWUreg _) [c])
  3291  	// cond: 0xffffffff < c
  3292  	// result: (FlagConstant [subFlags64(0,1)])
  3293  	for {
  3294  		c := auxIntToInt64(v.AuxInt)
  3295  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  3296  			break
  3297  		}
  3298  		v.reset(OpARM64FlagConstant)
  3299  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3300  		return true
  3301  	}
  3302  	// match: (CMPconst (ANDconst _ [m]) [n])
  3303  	// cond: 0 <= m && m < n
  3304  	// result: (FlagConstant [subFlags64(0,1)])
  3305  	for {
  3306  		n := auxIntToInt64(v.AuxInt)
  3307  		if v_0.Op != OpARM64ANDconst {
  3308  			break
  3309  		}
  3310  		m := auxIntToInt64(v_0.AuxInt)
  3311  		if !(0 <= m && m < n) {
  3312  			break
  3313  		}
  3314  		v.reset(OpARM64FlagConstant)
  3315  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3316  		return true
  3317  	}
  3318  	// match: (CMPconst (SRLconst _ [c]) [n])
  3319  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  3320  	// result: (FlagConstant [subFlags64(0,1)])
  3321  	for {
  3322  		n := auxIntToInt64(v.AuxInt)
  3323  		if v_0.Op != OpARM64SRLconst {
  3324  			break
  3325  		}
  3326  		c := auxIntToInt64(v_0.AuxInt)
  3327  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  3328  			break
  3329  		}
  3330  		v.reset(OpARM64FlagConstant)
  3331  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3332  		return true
  3333  	}
  3334  	return false
  3335  }
  3336  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  3337  	v_1 := v.Args[1]
  3338  	v_0 := v.Args[0]
  3339  	b := v.Block
  3340  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  3341  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  3342  	for {
  3343  		d := auxIntToInt64(v.AuxInt)
  3344  		if v_0.Op != OpARM64MOVDconst {
  3345  			break
  3346  		}
  3347  		c := auxIntToInt64(v_0.AuxInt)
  3348  		x := v_1
  3349  		v.reset(OpARM64InvertFlags)
  3350  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3351  		v0.AuxInt = int64ToAuxInt(c)
  3352  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3353  		v1.AuxInt = int64ToAuxInt(d)
  3354  		v1.AddArg(x)
  3355  		v0.AddArg(v1)
  3356  		v.AddArg(v0)
  3357  		return true
  3358  	}
  3359  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  3360  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  3361  	for {
  3362  		d := auxIntToInt64(v.AuxInt)
  3363  		x := v_0
  3364  		if v_1.Op != OpARM64MOVDconst {
  3365  			break
  3366  		}
  3367  		c := auxIntToInt64(v_1.AuxInt)
  3368  		v.reset(OpARM64CMPconst)
  3369  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3370  		v.AddArg(x)
  3371  		return true
  3372  	}
  3373  	return false
  3374  }
  3375  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  3376  	v_1 := v.Args[1]
  3377  	v_0 := v.Args[0]
  3378  	b := v.Block
  3379  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  3380  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  3381  	for {
  3382  		d := auxIntToInt64(v.AuxInt)
  3383  		if v_0.Op != OpARM64MOVDconst {
  3384  			break
  3385  		}
  3386  		c := auxIntToInt64(v_0.AuxInt)
  3387  		x := v_1
  3388  		v.reset(OpARM64InvertFlags)
  3389  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3390  		v0.AuxInt = int64ToAuxInt(c)
  3391  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3392  		v1.AuxInt = int64ToAuxInt(d)
  3393  		v1.AddArg(x)
  3394  		v0.AddArg(v1)
  3395  		v.AddArg(v0)
  3396  		return true
  3397  	}
  3398  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  3399  	// result: (CMPconst x [c>>uint64(d)])
  3400  	for {
  3401  		d := auxIntToInt64(v.AuxInt)
  3402  		x := v_0
  3403  		if v_1.Op != OpARM64MOVDconst {
  3404  			break
  3405  		}
  3406  		c := auxIntToInt64(v_1.AuxInt)
  3407  		v.reset(OpARM64CMPconst)
  3408  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3409  		v.AddArg(x)
  3410  		return true
  3411  	}
  3412  	return false
  3413  }
  3414  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  3415  	v_1 := v.Args[1]
  3416  	v_0 := v.Args[0]
  3417  	b := v.Block
  3418  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  3419  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  3420  	for {
  3421  		d := auxIntToInt64(v.AuxInt)
  3422  		if v_0.Op != OpARM64MOVDconst {
  3423  			break
  3424  		}
  3425  		c := auxIntToInt64(v_0.AuxInt)
  3426  		x := v_1
  3427  		v.reset(OpARM64InvertFlags)
  3428  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3429  		v0.AuxInt = int64ToAuxInt(c)
  3430  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3431  		v1.AuxInt = int64ToAuxInt(d)
  3432  		v1.AddArg(x)
  3433  		v0.AddArg(v1)
  3434  		v.AddArg(v0)
  3435  		return true
  3436  	}
  3437  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  3438  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  3439  	for {
  3440  		d := auxIntToInt64(v.AuxInt)
  3441  		x := v_0
  3442  		if v_1.Op != OpARM64MOVDconst {
  3443  			break
  3444  		}
  3445  		c := auxIntToInt64(v_1.AuxInt)
  3446  		v.reset(OpARM64CMPconst)
  3447  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3448  		v.AddArg(x)
  3449  		return true
  3450  	}
  3451  	return false
  3452  }
  3453  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  3454  	v_2 := v.Args[2]
  3455  	v_1 := v.Args[1]
  3456  	v_0 := v.Args[0]
  3457  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  3458  	// result: (CSETM [cc] flag)
  3459  	for {
  3460  		cc := auxIntToOp(v.AuxInt)
  3461  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3462  			break
  3463  		}
  3464  		flag := v_2
  3465  		v.reset(OpARM64CSETM)
  3466  		v.AuxInt = opToAuxInt(cc)
  3467  		v.AddArg(flag)
  3468  		return true
  3469  	}
  3470  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  3471  	// result: (CSETM [arm64Negate(cc)] flag)
  3472  	for {
  3473  		cc := auxIntToOp(v.AuxInt)
  3474  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  3475  			break
  3476  		}
  3477  		flag := v_2
  3478  		v.reset(OpARM64CSETM)
  3479  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3480  		v.AddArg(flag)
  3481  		return true
  3482  	}
  3483  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  3484  	// result: (CSEL0 [cc] x flag)
  3485  	for {
  3486  		cc := auxIntToOp(v.AuxInt)
  3487  		x := v_0
  3488  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3489  			break
  3490  		}
  3491  		flag := v_2
  3492  		v.reset(OpARM64CSEL0)
  3493  		v.AuxInt = opToAuxInt(cc)
  3494  		v.AddArg2(x, flag)
  3495  		return true
  3496  	}
  3497  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  3498  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  3499  	for {
  3500  		cc := auxIntToOp(v.AuxInt)
  3501  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  3502  			break
  3503  		}
  3504  		y := v_1
  3505  		flag := v_2
  3506  		v.reset(OpARM64CSEL0)
  3507  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3508  		v.AddArg2(y, flag)
  3509  		return true
  3510  	}
  3511  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  3512  	// result: (CSINC [cc] x a flag)
  3513  	for {
  3514  		cc := auxIntToOp(v.AuxInt)
  3515  		x := v_0
  3516  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  3517  			break
  3518  		}
  3519  		a := v_1.Args[0]
  3520  		flag := v_2
  3521  		v.reset(OpARM64CSINC)
  3522  		v.AuxInt = opToAuxInt(cc)
  3523  		v.AddArg3(x, a, flag)
  3524  		return true
  3525  	}
  3526  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  3527  	// result: (CSINC [arm64Negate(cc)] x a flag)
  3528  	for {
  3529  		cc := auxIntToOp(v.AuxInt)
  3530  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  3531  			break
  3532  		}
  3533  		a := v_0.Args[0]
  3534  		x := v_1
  3535  		flag := v_2
  3536  		v.reset(OpARM64CSINC)
  3537  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3538  		v.AddArg3(x, a, flag)
  3539  		return true
  3540  	}
  3541  	// match: (CSEL [cc] x (MVN a) flag)
  3542  	// result: (CSINV [cc] x a flag)
  3543  	for {
  3544  		cc := auxIntToOp(v.AuxInt)
  3545  		x := v_0
  3546  		if v_1.Op != OpARM64MVN {
  3547  			break
  3548  		}
  3549  		a := v_1.Args[0]
  3550  		flag := v_2
  3551  		v.reset(OpARM64CSINV)
  3552  		v.AuxInt = opToAuxInt(cc)
  3553  		v.AddArg3(x, a, flag)
  3554  		return true
  3555  	}
  3556  	// match: (CSEL [cc] (MVN a) x flag)
  3557  	// result: (CSINV [arm64Negate(cc)] x a flag)
  3558  	for {
  3559  		cc := auxIntToOp(v.AuxInt)
  3560  		if v_0.Op != OpARM64MVN {
  3561  			break
  3562  		}
  3563  		a := v_0.Args[0]
  3564  		x := v_1
  3565  		flag := v_2
  3566  		v.reset(OpARM64CSINV)
  3567  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3568  		v.AddArg3(x, a, flag)
  3569  		return true
  3570  	}
  3571  	// match: (CSEL [cc] x (NEG a) flag)
  3572  	// result: (CSNEG [cc] x a flag)
  3573  	for {
  3574  		cc := auxIntToOp(v.AuxInt)
  3575  		x := v_0
  3576  		if v_1.Op != OpARM64NEG {
  3577  			break
  3578  		}
  3579  		a := v_1.Args[0]
  3580  		flag := v_2
  3581  		v.reset(OpARM64CSNEG)
  3582  		v.AuxInt = opToAuxInt(cc)
  3583  		v.AddArg3(x, a, flag)
  3584  		return true
  3585  	}
  3586  	// match: (CSEL [cc] (NEG a) x flag)
  3587  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  3588  	for {
  3589  		cc := auxIntToOp(v.AuxInt)
  3590  		if v_0.Op != OpARM64NEG {
  3591  			break
  3592  		}
  3593  		a := v_0.Args[0]
  3594  		x := v_1
  3595  		flag := v_2
  3596  		v.reset(OpARM64CSNEG)
  3597  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3598  		v.AddArg3(x, a, flag)
  3599  		return true
  3600  	}
  3601  	// match: (CSEL [cc] x y (InvertFlags cmp))
  3602  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  3603  	for {
  3604  		cc := auxIntToOp(v.AuxInt)
  3605  		x := v_0
  3606  		y := v_1
  3607  		if v_2.Op != OpARM64InvertFlags {
  3608  			break
  3609  		}
  3610  		cmp := v_2.Args[0]
  3611  		v.reset(OpARM64CSEL)
  3612  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3613  		v.AddArg3(x, y, cmp)
  3614  		return true
  3615  	}
  3616  	// match: (CSEL [cc] x _ flag)
  3617  	// cond: ccARM64Eval(cc, flag) > 0
  3618  	// result: x
  3619  	for {
  3620  		cc := auxIntToOp(v.AuxInt)
  3621  		x := v_0
  3622  		flag := v_2
  3623  		if !(ccARM64Eval(cc, flag) > 0) {
  3624  			break
  3625  		}
  3626  		v.copyOf(x)
  3627  		return true
  3628  	}
  3629  	// match: (CSEL [cc] _ y flag)
  3630  	// cond: ccARM64Eval(cc, flag) < 0
  3631  	// result: y
  3632  	for {
  3633  		cc := auxIntToOp(v.AuxInt)
  3634  		y := v_1
  3635  		flag := v_2
  3636  		if !(ccARM64Eval(cc, flag) < 0) {
  3637  			break
  3638  		}
  3639  		v.copyOf(y)
  3640  		return true
  3641  	}
  3642  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3643  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3644  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  3645  	for {
  3646  		cc := auxIntToOp(v.AuxInt)
  3647  		x := v_0
  3648  		y := v_1
  3649  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3650  			break
  3651  		}
  3652  		boolval := v_2.Args[0]
  3653  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3654  			break
  3655  		}
  3656  		v.reset(OpARM64CSEL)
  3657  		v.AuxInt = opToAuxInt(boolval.Op)
  3658  		v.AddArg3(x, y, flagArg(boolval))
  3659  		return true
  3660  	}
  3661  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3662  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3663  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  3664  	for {
  3665  		cc := auxIntToOp(v.AuxInt)
  3666  		x := v_0
  3667  		y := v_1
  3668  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3669  			break
  3670  		}
  3671  		boolval := v_2.Args[0]
  3672  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3673  			break
  3674  		}
  3675  		v.reset(OpARM64CSEL)
  3676  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3677  		v.AddArg3(x, y, flagArg(boolval))
  3678  		return true
  3679  	}
  3680  	return false
  3681  }
  3682  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  3683  	v_1 := v.Args[1]
  3684  	v_0 := v.Args[0]
  3685  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  3686  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  3687  	for {
  3688  		cc := auxIntToOp(v.AuxInt)
  3689  		x := v_0
  3690  		if v_1.Op != OpARM64InvertFlags {
  3691  			break
  3692  		}
  3693  		cmp := v_1.Args[0]
  3694  		v.reset(OpARM64CSEL0)
  3695  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3696  		v.AddArg2(x, cmp)
  3697  		return true
  3698  	}
  3699  	// match: (CSEL0 [cc] x flag)
  3700  	// cond: ccARM64Eval(cc, flag) > 0
  3701  	// result: x
  3702  	for {
  3703  		cc := auxIntToOp(v.AuxInt)
  3704  		x := v_0
  3705  		flag := v_1
  3706  		if !(ccARM64Eval(cc, flag) > 0) {
  3707  			break
  3708  		}
  3709  		v.copyOf(x)
  3710  		return true
  3711  	}
  3712  	// match: (CSEL0 [cc] _ flag)
  3713  	// cond: ccARM64Eval(cc, flag) < 0
  3714  	// result: (MOVDconst [0])
  3715  	for {
  3716  		cc := auxIntToOp(v.AuxInt)
  3717  		flag := v_1
  3718  		if !(ccARM64Eval(cc, flag) < 0) {
  3719  			break
  3720  		}
  3721  		v.reset(OpARM64MOVDconst)
  3722  		v.AuxInt = int64ToAuxInt(0)
  3723  		return true
  3724  	}
  3725  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3726  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3727  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  3728  	for {
  3729  		cc := auxIntToOp(v.AuxInt)
  3730  		x := v_0
  3731  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3732  			break
  3733  		}
  3734  		boolval := v_1.Args[0]
  3735  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3736  			break
  3737  		}
  3738  		v.reset(OpARM64CSEL0)
  3739  		v.AuxInt = opToAuxInt(boolval.Op)
  3740  		v.AddArg2(x, flagArg(boolval))
  3741  		return true
  3742  	}
  3743  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3744  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3745  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  3746  	for {
  3747  		cc := auxIntToOp(v.AuxInt)
  3748  		x := v_0
  3749  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3750  			break
  3751  		}
  3752  		boolval := v_1.Args[0]
  3753  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3754  			break
  3755  		}
  3756  		v.reset(OpARM64CSEL0)
  3757  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3758  		v.AddArg2(x, flagArg(boolval))
  3759  		return true
  3760  	}
  3761  	return false
  3762  }
  3763  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  3764  	v_0 := v.Args[0]
  3765  	// match: (CSETM [cc] (InvertFlags cmp))
  3766  	// result: (CSETM [arm64Invert(cc)] cmp)
  3767  	for {
  3768  		cc := auxIntToOp(v.AuxInt)
  3769  		if v_0.Op != OpARM64InvertFlags {
  3770  			break
  3771  		}
  3772  		cmp := v_0.Args[0]
  3773  		v.reset(OpARM64CSETM)
  3774  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3775  		v.AddArg(cmp)
  3776  		return true
  3777  	}
  3778  	// match: (CSETM [cc] flag)
  3779  	// cond: ccARM64Eval(cc, flag) > 0
  3780  	// result: (MOVDconst [-1])
  3781  	for {
  3782  		cc := auxIntToOp(v.AuxInt)
  3783  		flag := v_0
  3784  		if !(ccARM64Eval(cc, flag) > 0) {
  3785  			break
  3786  		}
  3787  		v.reset(OpARM64MOVDconst)
  3788  		v.AuxInt = int64ToAuxInt(-1)
  3789  		return true
  3790  	}
  3791  	// match: (CSETM [cc] flag)
  3792  	// cond: ccARM64Eval(cc, flag) < 0
  3793  	// result: (MOVDconst [0])
  3794  	for {
  3795  		cc := auxIntToOp(v.AuxInt)
  3796  		flag := v_0
  3797  		if !(ccARM64Eval(cc, flag) < 0) {
  3798  			break
  3799  		}
  3800  		v.reset(OpARM64MOVDconst)
  3801  		v.AuxInt = int64ToAuxInt(0)
  3802  		return true
  3803  	}
  3804  	return false
  3805  }
  3806  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  3807  	v_2 := v.Args[2]
  3808  	v_1 := v.Args[1]
  3809  	v_0 := v.Args[0]
  3810  	// match: (CSINC [cc] x y (InvertFlags cmp))
  3811  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  3812  	for {
  3813  		cc := auxIntToOp(v.AuxInt)
  3814  		x := v_0
  3815  		y := v_1
  3816  		if v_2.Op != OpARM64InvertFlags {
  3817  			break
  3818  		}
  3819  		cmp := v_2.Args[0]
  3820  		v.reset(OpARM64CSINC)
  3821  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3822  		v.AddArg3(x, y, cmp)
  3823  		return true
  3824  	}
  3825  	// match: (CSINC [cc] x _ flag)
  3826  	// cond: ccARM64Eval(cc, flag) > 0
  3827  	// result: x
  3828  	for {
  3829  		cc := auxIntToOp(v.AuxInt)
  3830  		x := v_0
  3831  		flag := v_2
  3832  		if !(ccARM64Eval(cc, flag) > 0) {
  3833  			break
  3834  		}
  3835  		v.copyOf(x)
  3836  		return true
  3837  	}
  3838  	// match: (CSINC [cc] _ y flag)
  3839  	// cond: ccARM64Eval(cc, flag) < 0
  3840  	// result: (ADDconst [1] y)
  3841  	for {
  3842  		cc := auxIntToOp(v.AuxInt)
  3843  		y := v_1
  3844  		flag := v_2
  3845  		if !(ccARM64Eval(cc, flag) < 0) {
  3846  			break
  3847  		}
  3848  		v.reset(OpARM64ADDconst)
  3849  		v.AuxInt = int64ToAuxInt(1)
  3850  		v.AddArg(y)
  3851  		return true
  3852  	}
  3853  	return false
  3854  }
  3855  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  3856  	v_2 := v.Args[2]
  3857  	v_1 := v.Args[1]
  3858  	v_0 := v.Args[0]
  3859  	// match: (CSINV [cc] x y (InvertFlags cmp))
  3860  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  3861  	for {
  3862  		cc := auxIntToOp(v.AuxInt)
  3863  		x := v_0
  3864  		y := v_1
  3865  		if v_2.Op != OpARM64InvertFlags {
  3866  			break
  3867  		}
  3868  		cmp := v_2.Args[0]
  3869  		v.reset(OpARM64CSINV)
  3870  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3871  		v.AddArg3(x, y, cmp)
  3872  		return true
  3873  	}
  3874  	// match: (CSINV [cc] x _ flag)
  3875  	// cond: ccARM64Eval(cc, flag) > 0
  3876  	// result: x
  3877  	for {
  3878  		cc := auxIntToOp(v.AuxInt)
  3879  		x := v_0
  3880  		flag := v_2
  3881  		if !(ccARM64Eval(cc, flag) > 0) {
  3882  			break
  3883  		}
  3884  		v.copyOf(x)
  3885  		return true
  3886  	}
  3887  	// match: (CSINV [cc] _ y flag)
  3888  	// cond: ccARM64Eval(cc, flag) < 0
  3889  	// result: (Not y)
  3890  	for {
  3891  		cc := auxIntToOp(v.AuxInt)
  3892  		y := v_1
  3893  		flag := v_2
  3894  		if !(ccARM64Eval(cc, flag) < 0) {
  3895  			break
  3896  		}
  3897  		v.reset(OpNot)
  3898  		v.AddArg(y)
  3899  		return true
  3900  	}
  3901  	return false
  3902  }
  3903  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  3904  	v_2 := v.Args[2]
  3905  	v_1 := v.Args[1]
  3906  	v_0 := v.Args[0]
  3907  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  3908  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  3909  	for {
  3910  		cc := auxIntToOp(v.AuxInt)
  3911  		x := v_0
  3912  		y := v_1
  3913  		if v_2.Op != OpARM64InvertFlags {
  3914  			break
  3915  		}
  3916  		cmp := v_2.Args[0]
  3917  		v.reset(OpARM64CSNEG)
  3918  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3919  		v.AddArg3(x, y, cmp)
  3920  		return true
  3921  	}
  3922  	// match: (CSNEG [cc] x _ flag)
  3923  	// cond: ccARM64Eval(cc, flag) > 0
  3924  	// result: x
  3925  	for {
  3926  		cc := auxIntToOp(v.AuxInt)
  3927  		x := v_0
  3928  		flag := v_2
  3929  		if !(ccARM64Eval(cc, flag) > 0) {
  3930  			break
  3931  		}
  3932  		v.copyOf(x)
  3933  		return true
  3934  	}
  3935  	// match: (CSNEG [cc] _ y flag)
  3936  	// cond: ccARM64Eval(cc, flag) < 0
  3937  	// result: (NEG y)
  3938  	for {
  3939  		cc := auxIntToOp(v.AuxInt)
  3940  		y := v_1
  3941  		flag := v_2
  3942  		if !(ccARM64Eval(cc, flag) < 0) {
  3943  			break
  3944  		}
  3945  		v.reset(OpARM64NEG)
  3946  		v.AddArg(y)
  3947  		return true
  3948  	}
  3949  	return false
  3950  }
  3951  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  3952  	v_1 := v.Args[1]
  3953  	v_0 := v.Args[0]
  3954  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  3955  	// cond: d != 0
  3956  	// result: (MOVDconst [c/d])
  3957  	for {
  3958  		if v_0.Op != OpARM64MOVDconst {
  3959  			break
  3960  		}
  3961  		c := auxIntToInt64(v_0.AuxInt)
  3962  		if v_1.Op != OpARM64MOVDconst {
  3963  			break
  3964  		}
  3965  		d := auxIntToInt64(v_1.AuxInt)
  3966  		if !(d != 0) {
  3967  			break
  3968  		}
  3969  		v.reset(OpARM64MOVDconst)
  3970  		v.AuxInt = int64ToAuxInt(c / d)
  3971  		return true
  3972  	}
  3973  	return false
  3974  }
  3975  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  3976  	v_1 := v.Args[1]
  3977  	v_0 := v.Args[0]
  3978  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  3979  	// cond: d != 0
  3980  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  3981  	for {
  3982  		if v_0.Op != OpARM64MOVDconst {
  3983  			break
  3984  		}
  3985  		c := auxIntToInt64(v_0.AuxInt)
  3986  		if v_1.Op != OpARM64MOVDconst {
  3987  			break
  3988  		}
  3989  		d := auxIntToInt64(v_1.AuxInt)
  3990  		if !(d != 0) {
  3991  			break
  3992  		}
  3993  		v.reset(OpARM64MOVDconst)
  3994  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  3995  		return true
  3996  	}
  3997  	return false
  3998  }
  3999  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  4000  	v_1 := v.Args[1]
  4001  	v_0 := v.Args[0]
  4002  	// match: (EON x (MOVDconst [c]))
  4003  	// result: (XORconst [^c] x)
  4004  	for {
  4005  		x := v_0
  4006  		if v_1.Op != OpARM64MOVDconst {
  4007  			break
  4008  		}
  4009  		c := auxIntToInt64(v_1.AuxInt)
  4010  		v.reset(OpARM64XORconst)
  4011  		v.AuxInt = int64ToAuxInt(^c)
  4012  		v.AddArg(x)
  4013  		return true
  4014  	}
  4015  	// match: (EON x x)
  4016  	// result: (MOVDconst [-1])
  4017  	for {
  4018  		x := v_0
  4019  		if x != v_1 {
  4020  			break
  4021  		}
  4022  		v.reset(OpARM64MOVDconst)
  4023  		v.AuxInt = int64ToAuxInt(-1)
  4024  		return true
  4025  	}
  4026  	// match: (EON x0 x1:(SLLconst [c] y))
  4027  	// cond: clobberIfDead(x1)
  4028  	// result: (EONshiftLL x0 y [c])
  4029  	for {
  4030  		x0 := v_0
  4031  		x1 := v_1
  4032  		if x1.Op != OpARM64SLLconst {
  4033  			break
  4034  		}
  4035  		c := auxIntToInt64(x1.AuxInt)
  4036  		y := x1.Args[0]
  4037  		if !(clobberIfDead(x1)) {
  4038  			break
  4039  		}
  4040  		v.reset(OpARM64EONshiftLL)
  4041  		v.AuxInt = int64ToAuxInt(c)
  4042  		v.AddArg2(x0, y)
  4043  		return true
  4044  	}
  4045  	// match: (EON x0 x1:(SRLconst [c] y))
  4046  	// cond: clobberIfDead(x1)
  4047  	// result: (EONshiftRL x0 y [c])
  4048  	for {
  4049  		x0 := v_0
  4050  		x1 := v_1
  4051  		if x1.Op != OpARM64SRLconst {
  4052  			break
  4053  		}
  4054  		c := auxIntToInt64(x1.AuxInt)
  4055  		y := x1.Args[0]
  4056  		if !(clobberIfDead(x1)) {
  4057  			break
  4058  		}
  4059  		v.reset(OpARM64EONshiftRL)
  4060  		v.AuxInt = int64ToAuxInt(c)
  4061  		v.AddArg2(x0, y)
  4062  		return true
  4063  	}
  4064  	// match: (EON x0 x1:(SRAconst [c] y))
  4065  	// cond: clobberIfDead(x1)
  4066  	// result: (EONshiftRA x0 y [c])
  4067  	for {
  4068  		x0 := v_0
  4069  		x1 := v_1
  4070  		if x1.Op != OpARM64SRAconst {
  4071  			break
  4072  		}
  4073  		c := auxIntToInt64(x1.AuxInt)
  4074  		y := x1.Args[0]
  4075  		if !(clobberIfDead(x1)) {
  4076  			break
  4077  		}
  4078  		v.reset(OpARM64EONshiftRA)
  4079  		v.AuxInt = int64ToAuxInt(c)
  4080  		v.AddArg2(x0, y)
  4081  		return true
  4082  	}
  4083  	// match: (EON x0 x1:(RORconst [c] y))
  4084  	// cond: clobberIfDead(x1)
  4085  	// result: (EONshiftRO x0 y [c])
  4086  	for {
  4087  		x0 := v_0
  4088  		x1 := v_1
  4089  		if x1.Op != OpARM64RORconst {
  4090  			break
  4091  		}
  4092  		c := auxIntToInt64(x1.AuxInt)
  4093  		y := x1.Args[0]
  4094  		if !(clobberIfDead(x1)) {
  4095  			break
  4096  		}
  4097  		v.reset(OpARM64EONshiftRO)
  4098  		v.AuxInt = int64ToAuxInt(c)
  4099  		v.AddArg2(x0, y)
  4100  		return true
  4101  	}
  4102  	return false
  4103  }
  4104  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  4105  	v_1 := v.Args[1]
  4106  	v_0 := v.Args[0]
  4107  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  4108  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  4109  	for {
  4110  		d := auxIntToInt64(v.AuxInt)
  4111  		x := v_0
  4112  		if v_1.Op != OpARM64MOVDconst {
  4113  			break
  4114  		}
  4115  		c := auxIntToInt64(v_1.AuxInt)
  4116  		v.reset(OpARM64XORconst)
  4117  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  4118  		v.AddArg(x)
  4119  		return true
  4120  	}
  4121  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  4122  	// result: (MOVDconst [-1])
  4123  	for {
  4124  		c := auxIntToInt64(v.AuxInt)
  4125  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  4126  			break
  4127  		}
  4128  		x := v_0.Args[0]
  4129  		if x != v_1 {
  4130  			break
  4131  		}
  4132  		v.reset(OpARM64MOVDconst)
  4133  		v.AuxInt = int64ToAuxInt(-1)
  4134  		return true
  4135  	}
  4136  	return false
  4137  }
  4138  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  4139  	v_1 := v.Args[1]
  4140  	v_0 := v.Args[0]
  4141  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  4142  	// result: (XORconst x [^(c>>uint64(d))])
  4143  	for {
  4144  		d := auxIntToInt64(v.AuxInt)
  4145  		x := v_0
  4146  		if v_1.Op != OpARM64MOVDconst {
  4147  			break
  4148  		}
  4149  		c := auxIntToInt64(v_1.AuxInt)
  4150  		v.reset(OpARM64XORconst)
  4151  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  4152  		v.AddArg(x)
  4153  		return true
  4154  	}
  4155  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  4156  	// result: (MOVDconst [-1])
  4157  	for {
  4158  		c := auxIntToInt64(v.AuxInt)
  4159  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  4160  			break
  4161  		}
  4162  		x := v_0.Args[0]
  4163  		if x != v_1 {
  4164  			break
  4165  		}
  4166  		v.reset(OpARM64MOVDconst)
  4167  		v.AuxInt = int64ToAuxInt(-1)
  4168  		return true
  4169  	}
  4170  	return false
  4171  }
  4172  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  4173  	v_1 := v.Args[1]
  4174  	v_0 := v.Args[0]
  4175  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  4176  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  4177  	for {
  4178  		d := auxIntToInt64(v.AuxInt)
  4179  		x := v_0
  4180  		if v_1.Op != OpARM64MOVDconst {
  4181  			break
  4182  		}
  4183  		c := auxIntToInt64(v_1.AuxInt)
  4184  		v.reset(OpARM64XORconst)
  4185  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  4186  		v.AddArg(x)
  4187  		return true
  4188  	}
  4189  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  4190  	// result: (MOVDconst [-1])
  4191  	for {
  4192  		c := auxIntToInt64(v.AuxInt)
  4193  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  4194  			break
  4195  		}
  4196  		x := v_0.Args[0]
  4197  		if x != v_1 {
  4198  			break
  4199  		}
  4200  		v.reset(OpARM64MOVDconst)
  4201  		v.AuxInt = int64ToAuxInt(-1)
  4202  		return true
  4203  	}
  4204  	return false
  4205  }
  4206  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  4207  	v_1 := v.Args[1]
  4208  	v_0 := v.Args[0]
  4209  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  4210  	// result: (XORconst x [^rotateRight64(c, d)])
  4211  	for {
  4212  		d := auxIntToInt64(v.AuxInt)
  4213  		x := v_0
  4214  		if v_1.Op != OpARM64MOVDconst {
  4215  			break
  4216  		}
  4217  		c := auxIntToInt64(v_1.AuxInt)
  4218  		v.reset(OpARM64XORconst)
  4219  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  4220  		v.AddArg(x)
  4221  		return true
  4222  	}
  4223  	// match: (EONshiftRO (RORconst x [c]) x [c])
  4224  	// result: (MOVDconst [-1])
  4225  	for {
  4226  		c := auxIntToInt64(v.AuxInt)
  4227  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  4228  			break
  4229  		}
  4230  		x := v_0.Args[0]
  4231  		if x != v_1 {
  4232  			break
  4233  		}
  4234  		v.reset(OpARM64MOVDconst)
  4235  		v.AuxInt = int64ToAuxInt(-1)
  4236  		return true
  4237  	}
  4238  	return false
  4239  }
  4240  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  4241  	v_0 := v.Args[0]
  4242  	b := v.Block
  4243  	// match: (Equal (CMPconst [0] z:(AND x y)))
  4244  	// cond: z.Uses == 1
  4245  	// result: (Equal (TST x y))
  4246  	for {
  4247  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4248  			break
  4249  		}
  4250  		z := v_0.Args[0]
  4251  		if z.Op != OpARM64AND {
  4252  			break
  4253  		}
  4254  		y := z.Args[1]
  4255  		x := z.Args[0]
  4256  		if !(z.Uses == 1) {
  4257  			break
  4258  		}
  4259  		v.reset(OpARM64Equal)
  4260  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  4261  		v0.AddArg2(x, y)
  4262  		v.AddArg(v0)
  4263  		return true
  4264  	}
  4265  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  4266  	// cond: x.Uses == 1
  4267  	// result: (Equal (TSTWconst [int32(c)] y))
  4268  	for {
  4269  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4270  			break
  4271  		}
  4272  		x := v_0.Args[0]
  4273  		if x.Op != OpARM64ANDconst {
  4274  			break
  4275  		}
  4276  		c := auxIntToInt64(x.AuxInt)
  4277  		y := x.Args[0]
  4278  		if !(x.Uses == 1) {
  4279  			break
  4280  		}
  4281  		v.reset(OpARM64Equal)
  4282  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  4283  		v0.AuxInt = int32ToAuxInt(int32(c))
  4284  		v0.AddArg(y)
  4285  		v.AddArg(v0)
  4286  		return true
  4287  	}
  4288  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  4289  	// cond: z.Uses == 1
  4290  	// result: (Equal (TSTW x y))
  4291  	for {
  4292  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4293  			break
  4294  		}
  4295  		z := v_0.Args[0]
  4296  		if z.Op != OpARM64AND {
  4297  			break
  4298  		}
  4299  		y := z.Args[1]
  4300  		x := z.Args[0]
  4301  		if !(z.Uses == 1) {
  4302  			break
  4303  		}
  4304  		v.reset(OpARM64Equal)
  4305  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  4306  		v0.AddArg2(x, y)
  4307  		v.AddArg(v0)
  4308  		return true
  4309  	}
  4310  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  4311  	// cond: x.Uses == 1
  4312  	// result: (Equal (TSTconst [c] y))
  4313  	for {
  4314  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4315  			break
  4316  		}
  4317  		x := v_0.Args[0]
  4318  		if x.Op != OpARM64ANDconst {
  4319  			break
  4320  		}
  4321  		c := auxIntToInt64(x.AuxInt)
  4322  		y := x.Args[0]
  4323  		if !(x.Uses == 1) {
  4324  			break
  4325  		}
  4326  		v.reset(OpARM64Equal)
  4327  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  4328  		v0.AuxInt = int64ToAuxInt(c)
  4329  		v0.AddArg(y)
  4330  		v.AddArg(v0)
  4331  		return true
  4332  	}
  4333  	// match: (Equal (CMP x z:(NEG y)))
  4334  	// cond: z.Uses == 1
  4335  	// result: (Equal (CMN x y))
  4336  	for {
  4337  		if v_0.Op != OpARM64CMP {
  4338  			break
  4339  		}
  4340  		_ = v_0.Args[1]
  4341  		x := v_0.Args[0]
  4342  		z := v_0.Args[1]
  4343  		if z.Op != OpARM64NEG {
  4344  			break
  4345  		}
  4346  		y := z.Args[0]
  4347  		if !(z.Uses == 1) {
  4348  			break
  4349  		}
  4350  		v.reset(OpARM64Equal)
  4351  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4352  		v0.AddArg2(x, y)
  4353  		v.AddArg(v0)
  4354  		return true
  4355  	}
  4356  	// match: (Equal (CMPW x z:(NEG y)))
  4357  	// cond: z.Uses == 1
  4358  	// result: (Equal (CMNW x y))
  4359  	for {
  4360  		if v_0.Op != OpARM64CMPW {
  4361  			break
  4362  		}
  4363  		_ = v_0.Args[1]
  4364  		x := v_0.Args[0]
  4365  		z := v_0.Args[1]
  4366  		if z.Op != OpARM64NEG {
  4367  			break
  4368  		}
  4369  		y := z.Args[0]
  4370  		if !(z.Uses == 1) {
  4371  			break
  4372  		}
  4373  		v.reset(OpARM64Equal)
  4374  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4375  		v0.AddArg2(x, y)
  4376  		v.AddArg(v0)
  4377  		return true
  4378  	}
  4379  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  4380  	// cond: x.Uses == 1
  4381  	// result: (Equal (CMNconst [c] y))
  4382  	for {
  4383  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4384  			break
  4385  		}
  4386  		x := v_0.Args[0]
  4387  		if x.Op != OpARM64ADDconst {
  4388  			break
  4389  		}
  4390  		c := auxIntToInt64(x.AuxInt)
  4391  		y := x.Args[0]
  4392  		if !(x.Uses == 1) {
  4393  			break
  4394  		}
  4395  		v.reset(OpARM64Equal)
  4396  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  4397  		v0.AuxInt = int64ToAuxInt(c)
  4398  		v0.AddArg(y)
  4399  		v.AddArg(v0)
  4400  		return true
  4401  	}
  4402  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  4403  	// cond: x.Uses == 1
  4404  	// result: (Equal (CMNWconst [int32(c)] y))
  4405  	for {
  4406  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4407  			break
  4408  		}
  4409  		x := v_0.Args[0]
  4410  		if x.Op != OpARM64ADDconst {
  4411  			break
  4412  		}
  4413  		c := auxIntToInt64(x.AuxInt)
  4414  		y := x.Args[0]
  4415  		if !(x.Uses == 1) {
  4416  			break
  4417  		}
  4418  		v.reset(OpARM64Equal)
  4419  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  4420  		v0.AuxInt = int32ToAuxInt(int32(c))
  4421  		v0.AddArg(y)
  4422  		v.AddArg(v0)
  4423  		return true
  4424  	}
  4425  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  4426  	// cond: z.Uses == 1
  4427  	// result: (Equal (CMN x y))
  4428  	for {
  4429  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4430  			break
  4431  		}
  4432  		z := v_0.Args[0]
  4433  		if z.Op != OpARM64ADD {
  4434  			break
  4435  		}
  4436  		y := z.Args[1]
  4437  		x := z.Args[0]
  4438  		if !(z.Uses == 1) {
  4439  			break
  4440  		}
  4441  		v.reset(OpARM64Equal)
  4442  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4443  		v0.AddArg2(x, y)
  4444  		v.AddArg(v0)
  4445  		return true
  4446  	}
  4447  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  4448  	// cond: z.Uses == 1
  4449  	// result: (Equal (CMNW x y))
  4450  	for {
  4451  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4452  			break
  4453  		}
  4454  		z := v_0.Args[0]
  4455  		if z.Op != OpARM64ADD {
  4456  			break
  4457  		}
  4458  		y := z.Args[1]
  4459  		x := z.Args[0]
  4460  		if !(z.Uses == 1) {
  4461  			break
  4462  		}
  4463  		v.reset(OpARM64Equal)
  4464  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4465  		v0.AddArg2(x, y)
  4466  		v.AddArg(v0)
  4467  		return true
  4468  	}
  4469  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  4470  	// cond: z.Uses == 1
  4471  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  4472  	for {
  4473  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4474  			break
  4475  		}
  4476  		z := v_0.Args[0]
  4477  		if z.Op != OpARM64MADD {
  4478  			break
  4479  		}
  4480  		y := z.Args[2]
  4481  		a := z.Args[0]
  4482  		x := z.Args[1]
  4483  		if !(z.Uses == 1) {
  4484  			break
  4485  		}
  4486  		v.reset(OpARM64Equal)
  4487  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4488  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4489  		v1.AddArg2(x, y)
  4490  		v0.AddArg2(a, v1)
  4491  		v.AddArg(v0)
  4492  		return true
  4493  	}
  4494  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  4495  	// cond: z.Uses == 1
  4496  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  4497  	for {
  4498  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4499  			break
  4500  		}
  4501  		z := v_0.Args[0]
  4502  		if z.Op != OpARM64MSUB {
  4503  			break
  4504  		}
  4505  		y := z.Args[2]
  4506  		a := z.Args[0]
  4507  		x := z.Args[1]
  4508  		if !(z.Uses == 1) {
  4509  			break
  4510  		}
  4511  		v.reset(OpARM64Equal)
  4512  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4513  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4514  		v1.AddArg2(x, y)
  4515  		v0.AddArg2(a, v1)
  4516  		v.AddArg(v0)
  4517  		return true
  4518  	}
  4519  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  4520  	// cond: z.Uses == 1
  4521  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  4522  	for {
  4523  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4524  			break
  4525  		}
  4526  		z := v_0.Args[0]
  4527  		if z.Op != OpARM64MADDW {
  4528  			break
  4529  		}
  4530  		y := z.Args[2]
  4531  		a := z.Args[0]
  4532  		x := z.Args[1]
  4533  		if !(z.Uses == 1) {
  4534  			break
  4535  		}
  4536  		v.reset(OpARM64Equal)
  4537  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4538  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4539  		v1.AddArg2(x, y)
  4540  		v0.AddArg2(a, v1)
  4541  		v.AddArg(v0)
  4542  		return true
  4543  	}
  4544  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  4545  	// cond: z.Uses == 1
  4546  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  4547  	for {
  4548  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4549  			break
  4550  		}
  4551  		z := v_0.Args[0]
  4552  		if z.Op != OpARM64MSUBW {
  4553  			break
  4554  		}
  4555  		y := z.Args[2]
  4556  		a := z.Args[0]
  4557  		x := z.Args[1]
  4558  		if !(z.Uses == 1) {
  4559  			break
  4560  		}
  4561  		v.reset(OpARM64Equal)
  4562  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4563  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4564  		v1.AddArg2(x, y)
  4565  		v0.AddArg2(a, v1)
  4566  		v.AddArg(v0)
  4567  		return true
  4568  	}
  4569  	// match: (Equal (FlagConstant [fc]))
  4570  	// result: (MOVDconst [b2i(fc.eq())])
  4571  	for {
  4572  		if v_0.Op != OpARM64FlagConstant {
  4573  			break
  4574  		}
  4575  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4576  		v.reset(OpARM64MOVDconst)
  4577  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  4578  		return true
  4579  	}
  4580  	// match: (Equal (InvertFlags x))
  4581  	// result: (Equal x)
  4582  	for {
  4583  		if v_0.Op != OpARM64InvertFlags {
  4584  			break
  4585  		}
  4586  		x := v_0.Args[0]
  4587  		v.reset(OpARM64Equal)
  4588  		v.AddArg(x)
  4589  		return true
  4590  	}
  4591  	return false
  4592  }
  4593  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  4594  	v_1 := v.Args[1]
  4595  	v_0 := v.Args[0]
  4596  	// match: (FADDD a (FMULD x y))
  4597  	// cond: a.Block.Func.useFMA(v)
  4598  	// result: (FMADDD a x y)
  4599  	for {
  4600  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4601  			a := v_0
  4602  			if v_1.Op != OpARM64FMULD {
  4603  				continue
  4604  			}
  4605  			y := v_1.Args[1]
  4606  			x := v_1.Args[0]
  4607  			if !(a.Block.Func.useFMA(v)) {
  4608  				continue
  4609  			}
  4610  			v.reset(OpARM64FMADDD)
  4611  			v.AddArg3(a, x, y)
  4612  			return true
  4613  		}
  4614  		break
  4615  	}
  4616  	// match: (FADDD a (FNMULD x y))
  4617  	// cond: a.Block.Func.useFMA(v)
  4618  	// result: (FMSUBD a x y)
  4619  	for {
  4620  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4621  			a := v_0
  4622  			if v_1.Op != OpARM64FNMULD {
  4623  				continue
  4624  			}
  4625  			y := v_1.Args[1]
  4626  			x := v_1.Args[0]
  4627  			if !(a.Block.Func.useFMA(v)) {
  4628  				continue
  4629  			}
  4630  			v.reset(OpARM64FMSUBD)
  4631  			v.AddArg3(a, x, y)
  4632  			return true
  4633  		}
  4634  		break
  4635  	}
  4636  	return false
  4637  }
  4638  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  4639  	v_1 := v.Args[1]
  4640  	v_0 := v.Args[0]
  4641  	// match: (FADDS a (FMULS x y))
  4642  	// cond: a.Block.Func.useFMA(v)
  4643  	// result: (FMADDS a x y)
  4644  	for {
  4645  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4646  			a := v_0
  4647  			if v_1.Op != OpARM64FMULS {
  4648  				continue
  4649  			}
  4650  			y := v_1.Args[1]
  4651  			x := v_1.Args[0]
  4652  			if !(a.Block.Func.useFMA(v)) {
  4653  				continue
  4654  			}
  4655  			v.reset(OpARM64FMADDS)
  4656  			v.AddArg3(a, x, y)
  4657  			return true
  4658  		}
  4659  		break
  4660  	}
  4661  	// match: (FADDS a (FNMULS x y))
  4662  	// cond: a.Block.Func.useFMA(v)
  4663  	// result: (FMSUBS a x y)
  4664  	for {
  4665  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4666  			a := v_0
  4667  			if v_1.Op != OpARM64FNMULS {
  4668  				continue
  4669  			}
  4670  			y := v_1.Args[1]
  4671  			x := v_1.Args[0]
  4672  			if !(a.Block.Func.useFMA(v)) {
  4673  				continue
  4674  			}
  4675  			v.reset(OpARM64FMSUBS)
  4676  			v.AddArg3(a, x, y)
  4677  			return true
  4678  		}
  4679  		break
  4680  	}
  4681  	return false
  4682  }
  4683  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  4684  	v_1 := v.Args[1]
  4685  	v_0 := v.Args[0]
  4686  	b := v.Block
  4687  	// match: (FCMPD x (FMOVDconst [0]))
  4688  	// result: (FCMPD0 x)
  4689  	for {
  4690  		x := v_0
  4691  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4692  			break
  4693  		}
  4694  		v.reset(OpARM64FCMPD0)
  4695  		v.AddArg(x)
  4696  		return true
  4697  	}
  4698  	// match: (FCMPD (FMOVDconst [0]) x)
  4699  	// result: (InvertFlags (FCMPD0 x))
  4700  	for {
  4701  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4702  			break
  4703  		}
  4704  		x := v_1
  4705  		v.reset(OpARM64InvertFlags)
  4706  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  4707  		v0.AddArg(x)
  4708  		v.AddArg(v0)
  4709  		return true
  4710  	}
  4711  	return false
  4712  }
  4713  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  4714  	v_1 := v.Args[1]
  4715  	v_0 := v.Args[0]
  4716  	b := v.Block
  4717  	// match: (FCMPS x (FMOVSconst [0]))
  4718  	// result: (FCMPS0 x)
  4719  	for {
  4720  		x := v_0
  4721  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4722  			break
  4723  		}
  4724  		v.reset(OpARM64FCMPS0)
  4725  		v.AddArg(x)
  4726  		return true
  4727  	}
  4728  	// match: (FCMPS (FMOVSconst [0]) x)
  4729  	// result: (InvertFlags (FCMPS0 x))
  4730  	for {
  4731  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4732  			break
  4733  		}
  4734  		x := v_1
  4735  		v.reset(OpARM64InvertFlags)
  4736  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  4737  		v0.AddArg(x)
  4738  		v.AddArg(v0)
  4739  		return true
  4740  	}
  4741  	return false
  4742  }
  4743  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  4744  	v_0 := v.Args[0]
  4745  	b := v.Block
  4746  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  4747  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4748  	for {
  4749  		t := v.Type
  4750  		if v_0.Op != OpArg {
  4751  			break
  4752  		}
  4753  		off := auxIntToInt32(v_0.AuxInt)
  4754  		sym := auxToSym(v_0.Aux)
  4755  		b = b.Func.Entry
  4756  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4757  		v.copyOf(v0)
  4758  		v0.AuxInt = int32ToAuxInt(off)
  4759  		v0.Aux = symToAux(sym)
  4760  		return true
  4761  	}
  4762  	return false
  4763  }
  4764  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  4765  	v_0 := v.Args[0]
  4766  	b := v.Block
  4767  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  4768  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4769  	for {
  4770  		t := v.Type
  4771  		if v_0.Op != OpArg {
  4772  			break
  4773  		}
  4774  		off := auxIntToInt32(v_0.AuxInt)
  4775  		sym := auxToSym(v_0.Aux)
  4776  		b = b.Func.Entry
  4777  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4778  		v.copyOf(v0)
  4779  		v0.AuxInt = int32ToAuxInt(off)
  4780  		v0.Aux = symToAux(sym)
  4781  		return true
  4782  	}
  4783  	return false
  4784  }
  4785  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  4786  	v_1 := v.Args[1]
  4787  	v_0 := v.Args[0]
  4788  	b := v.Block
  4789  	config := b.Func.Config
  4790  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4791  	// result: (FMOVDgpfp val)
  4792  	for {
  4793  		off := auxIntToInt32(v.AuxInt)
  4794  		sym := auxToSym(v.Aux)
  4795  		ptr := v_0
  4796  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4797  			break
  4798  		}
  4799  		val := v_1.Args[1]
  4800  		if ptr != v_1.Args[0] {
  4801  			break
  4802  		}
  4803  		v.reset(OpARM64FMOVDgpfp)
  4804  		v.AddArg(val)
  4805  		return true
  4806  	}
  4807  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  4808  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4809  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  4810  	for {
  4811  		off1 := auxIntToInt32(v.AuxInt)
  4812  		sym := auxToSym(v.Aux)
  4813  		if v_0.Op != OpARM64ADDconst {
  4814  			break
  4815  		}
  4816  		off2 := auxIntToInt64(v_0.AuxInt)
  4817  		ptr := v_0.Args[0]
  4818  		mem := v_1
  4819  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4820  			break
  4821  		}
  4822  		v.reset(OpARM64FMOVDload)
  4823  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4824  		v.Aux = symToAux(sym)
  4825  		v.AddArg2(ptr, mem)
  4826  		return true
  4827  	}
  4828  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  4829  	// cond: off == 0 && sym == nil
  4830  	// result: (FMOVDloadidx ptr idx mem)
  4831  	for {
  4832  		off := auxIntToInt32(v.AuxInt)
  4833  		sym := auxToSym(v.Aux)
  4834  		if v_0.Op != OpARM64ADD {
  4835  			break
  4836  		}
  4837  		idx := v_0.Args[1]
  4838  		ptr := v_0.Args[0]
  4839  		mem := v_1
  4840  		if !(off == 0 && sym == nil) {
  4841  			break
  4842  		}
  4843  		v.reset(OpARM64FMOVDloadidx)
  4844  		v.AddArg3(ptr, idx, mem)
  4845  		return true
  4846  	}
  4847  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  4848  	// cond: off == 0 && sym == nil
  4849  	// result: (FMOVDloadidx8 ptr idx mem)
  4850  	for {
  4851  		off := auxIntToInt32(v.AuxInt)
  4852  		sym := auxToSym(v.Aux)
  4853  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  4854  			break
  4855  		}
  4856  		idx := v_0.Args[1]
  4857  		ptr := v_0.Args[0]
  4858  		mem := v_1
  4859  		if !(off == 0 && sym == nil) {
  4860  			break
  4861  		}
  4862  		v.reset(OpARM64FMOVDloadidx8)
  4863  		v.AddArg3(ptr, idx, mem)
  4864  		return true
  4865  	}
  4866  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  4867  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4868  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  4869  	for {
  4870  		off1 := auxIntToInt32(v.AuxInt)
  4871  		sym1 := auxToSym(v.Aux)
  4872  		if v_0.Op != OpARM64MOVDaddr {
  4873  			break
  4874  		}
  4875  		off2 := auxIntToInt32(v_0.AuxInt)
  4876  		sym2 := auxToSym(v_0.Aux)
  4877  		ptr := v_0.Args[0]
  4878  		mem := v_1
  4879  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4880  			break
  4881  		}
  4882  		v.reset(OpARM64FMOVDload)
  4883  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4884  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4885  		v.AddArg2(ptr, mem)
  4886  		return true
  4887  	}
  4888  	return false
  4889  }
  4890  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  4891  	v_2 := v.Args[2]
  4892  	v_1 := v.Args[1]
  4893  	v_0 := v.Args[0]
  4894  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  4895  	// cond: is32Bit(c)
  4896  	// result: (FMOVDload [int32(c)] ptr mem)
  4897  	for {
  4898  		ptr := v_0
  4899  		if v_1.Op != OpARM64MOVDconst {
  4900  			break
  4901  		}
  4902  		c := auxIntToInt64(v_1.AuxInt)
  4903  		mem := v_2
  4904  		if !(is32Bit(c)) {
  4905  			break
  4906  		}
  4907  		v.reset(OpARM64FMOVDload)
  4908  		v.AuxInt = int32ToAuxInt(int32(c))
  4909  		v.AddArg2(ptr, mem)
  4910  		return true
  4911  	}
  4912  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  4913  	// cond: is32Bit(c)
  4914  	// result: (FMOVDload [int32(c)] ptr mem)
  4915  	for {
  4916  		if v_0.Op != OpARM64MOVDconst {
  4917  			break
  4918  		}
  4919  		c := auxIntToInt64(v_0.AuxInt)
  4920  		ptr := v_1
  4921  		mem := v_2
  4922  		if !(is32Bit(c)) {
  4923  			break
  4924  		}
  4925  		v.reset(OpARM64FMOVDload)
  4926  		v.AuxInt = int32ToAuxInt(int32(c))
  4927  		v.AddArg2(ptr, mem)
  4928  		return true
  4929  	}
  4930  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  4931  	// result: (FMOVDloadidx8 ptr idx mem)
  4932  	for {
  4933  		ptr := v_0
  4934  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  4935  			break
  4936  		}
  4937  		idx := v_1.Args[0]
  4938  		mem := v_2
  4939  		v.reset(OpARM64FMOVDloadidx8)
  4940  		v.AddArg3(ptr, idx, mem)
  4941  		return true
  4942  	}
  4943  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  4944  	// result: (FMOVDloadidx8 ptr idx mem)
  4945  	for {
  4946  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  4947  			break
  4948  		}
  4949  		idx := v_0.Args[0]
  4950  		ptr := v_1
  4951  		mem := v_2
  4952  		v.reset(OpARM64FMOVDloadidx8)
  4953  		v.AddArg3(ptr, idx, mem)
  4954  		return true
  4955  	}
  4956  	return false
  4957  }
  4958  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  4959  	v_2 := v.Args[2]
  4960  	v_1 := v.Args[1]
  4961  	v_0 := v.Args[0]
  4962  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  4963  	// cond: is32Bit(c<<3)
  4964  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  4965  	for {
  4966  		ptr := v_0
  4967  		if v_1.Op != OpARM64MOVDconst {
  4968  			break
  4969  		}
  4970  		c := auxIntToInt64(v_1.AuxInt)
  4971  		mem := v_2
  4972  		if !(is32Bit(c << 3)) {
  4973  			break
  4974  		}
  4975  		v.reset(OpARM64FMOVDload)
  4976  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  4977  		v.AddArg2(ptr, mem)
  4978  		return true
  4979  	}
  4980  	return false
  4981  }
  4982  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  4983  	v_2 := v.Args[2]
  4984  	v_1 := v.Args[1]
  4985  	v_0 := v.Args[0]
  4986  	b := v.Block
  4987  	config := b.Func.Config
  4988  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  4989  	// result: (MOVDstore [off] {sym} ptr val mem)
  4990  	for {
  4991  		off := auxIntToInt32(v.AuxInt)
  4992  		sym := auxToSym(v.Aux)
  4993  		ptr := v_0
  4994  		if v_1.Op != OpARM64FMOVDgpfp {
  4995  			break
  4996  		}
  4997  		val := v_1.Args[0]
  4998  		mem := v_2
  4999  		v.reset(OpARM64MOVDstore)
  5000  		v.AuxInt = int32ToAuxInt(off)
  5001  		v.Aux = symToAux(sym)
  5002  		v.AddArg3(ptr, val, mem)
  5003  		return true
  5004  	}
  5005  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5006  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5007  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  5008  	for {
  5009  		off1 := auxIntToInt32(v.AuxInt)
  5010  		sym := auxToSym(v.Aux)
  5011  		if v_0.Op != OpARM64ADDconst {
  5012  			break
  5013  		}
  5014  		off2 := auxIntToInt64(v_0.AuxInt)
  5015  		ptr := v_0.Args[0]
  5016  		val := v_1
  5017  		mem := v_2
  5018  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5019  			break
  5020  		}
  5021  		v.reset(OpARM64FMOVDstore)
  5022  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5023  		v.Aux = symToAux(sym)
  5024  		v.AddArg3(ptr, val, mem)
  5025  		return true
  5026  	}
  5027  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  5028  	// cond: off == 0 && sym == nil
  5029  	// result: (FMOVDstoreidx ptr idx val mem)
  5030  	for {
  5031  		off := auxIntToInt32(v.AuxInt)
  5032  		sym := auxToSym(v.Aux)
  5033  		if v_0.Op != OpARM64ADD {
  5034  			break
  5035  		}
  5036  		idx := v_0.Args[1]
  5037  		ptr := v_0.Args[0]
  5038  		val := v_1
  5039  		mem := v_2
  5040  		if !(off == 0 && sym == nil) {
  5041  			break
  5042  		}
  5043  		v.reset(OpARM64FMOVDstoreidx)
  5044  		v.AddArg4(ptr, idx, val, mem)
  5045  		return true
  5046  	}
  5047  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  5048  	// cond: off == 0 && sym == nil
  5049  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5050  	for {
  5051  		off := auxIntToInt32(v.AuxInt)
  5052  		sym := auxToSym(v.Aux)
  5053  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  5054  			break
  5055  		}
  5056  		idx := v_0.Args[1]
  5057  		ptr := v_0.Args[0]
  5058  		val := v_1
  5059  		mem := v_2
  5060  		if !(off == 0 && sym == nil) {
  5061  			break
  5062  		}
  5063  		v.reset(OpARM64FMOVDstoreidx8)
  5064  		v.AddArg4(ptr, idx, val, mem)
  5065  		return true
  5066  	}
  5067  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5068  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5069  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5070  	for {
  5071  		off1 := auxIntToInt32(v.AuxInt)
  5072  		sym1 := auxToSym(v.Aux)
  5073  		if v_0.Op != OpARM64MOVDaddr {
  5074  			break
  5075  		}
  5076  		off2 := auxIntToInt32(v_0.AuxInt)
  5077  		sym2 := auxToSym(v_0.Aux)
  5078  		ptr := v_0.Args[0]
  5079  		val := v_1
  5080  		mem := v_2
  5081  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5082  			break
  5083  		}
  5084  		v.reset(OpARM64FMOVDstore)
  5085  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5086  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5087  		v.AddArg3(ptr, val, mem)
  5088  		return true
  5089  	}
  5090  	return false
  5091  }
  5092  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  5093  	v_3 := v.Args[3]
  5094  	v_2 := v.Args[2]
  5095  	v_1 := v.Args[1]
  5096  	v_0 := v.Args[0]
  5097  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  5098  	// cond: is32Bit(c)
  5099  	// result: (FMOVDstore [int32(c)] ptr val mem)
  5100  	for {
  5101  		ptr := v_0
  5102  		if v_1.Op != OpARM64MOVDconst {
  5103  			break
  5104  		}
  5105  		c := auxIntToInt64(v_1.AuxInt)
  5106  		val := v_2
  5107  		mem := v_3
  5108  		if !(is32Bit(c)) {
  5109  			break
  5110  		}
  5111  		v.reset(OpARM64FMOVDstore)
  5112  		v.AuxInt = int32ToAuxInt(int32(c))
  5113  		v.AddArg3(ptr, val, mem)
  5114  		return true
  5115  	}
  5116  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  5117  	// cond: is32Bit(c)
  5118  	// result: (FMOVDstore [int32(c)] idx val mem)
  5119  	for {
  5120  		if v_0.Op != OpARM64MOVDconst {
  5121  			break
  5122  		}
  5123  		c := auxIntToInt64(v_0.AuxInt)
  5124  		idx := v_1
  5125  		val := v_2
  5126  		mem := v_3
  5127  		if !(is32Bit(c)) {
  5128  			break
  5129  		}
  5130  		v.reset(OpARM64FMOVDstore)
  5131  		v.AuxInt = int32ToAuxInt(int32(c))
  5132  		v.AddArg3(idx, val, mem)
  5133  		return true
  5134  	}
  5135  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  5136  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5137  	for {
  5138  		ptr := v_0
  5139  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  5140  			break
  5141  		}
  5142  		idx := v_1.Args[0]
  5143  		val := v_2
  5144  		mem := v_3
  5145  		v.reset(OpARM64FMOVDstoreidx8)
  5146  		v.AddArg4(ptr, idx, val, mem)
  5147  		return true
  5148  	}
  5149  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  5150  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5151  	for {
  5152  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  5153  			break
  5154  		}
  5155  		idx := v_0.Args[0]
  5156  		ptr := v_1
  5157  		val := v_2
  5158  		mem := v_3
  5159  		v.reset(OpARM64FMOVDstoreidx8)
  5160  		v.AddArg4(ptr, idx, val, mem)
  5161  		return true
  5162  	}
  5163  	return false
  5164  }
  5165  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  5166  	v_3 := v.Args[3]
  5167  	v_2 := v.Args[2]
  5168  	v_1 := v.Args[1]
  5169  	v_0 := v.Args[0]
  5170  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  5171  	// cond: is32Bit(c<<3)
  5172  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  5173  	for {
  5174  		ptr := v_0
  5175  		if v_1.Op != OpARM64MOVDconst {
  5176  			break
  5177  		}
  5178  		c := auxIntToInt64(v_1.AuxInt)
  5179  		val := v_2
  5180  		mem := v_3
  5181  		if !(is32Bit(c << 3)) {
  5182  			break
  5183  		}
  5184  		v.reset(OpARM64FMOVDstore)
  5185  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  5186  		v.AddArg3(ptr, val, mem)
  5187  		return true
  5188  	}
  5189  	return false
  5190  }
  5191  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  5192  	v_1 := v.Args[1]
  5193  	v_0 := v.Args[0]
  5194  	b := v.Block
  5195  	config := b.Func.Config
  5196  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  5197  	// result: (FMOVSgpfp val)
  5198  	for {
  5199  		off := auxIntToInt32(v.AuxInt)
  5200  		sym := auxToSym(v.Aux)
  5201  		ptr := v_0
  5202  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5203  			break
  5204  		}
  5205  		val := v_1.Args[1]
  5206  		if ptr != v_1.Args[0] {
  5207  			break
  5208  		}
  5209  		v.reset(OpARM64FMOVSgpfp)
  5210  		v.AddArg(val)
  5211  		return true
  5212  	}
  5213  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  5214  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5215  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  5216  	for {
  5217  		off1 := auxIntToInt32(v.AuxInt)
  5218  		sym := auxToSym(v.Aux)
  5219  		if v_0.Op != OpARM64ADDconst {
  5220  			break
  5221  		}
  5222  		off2 := auxIntToInt64(v_0.AuxInt)
  5223  		ptr := v_0.Args[0]
  5224  		mem := v_1
  5225  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5226  			break
  5227  		}
  5228  		v.reset(OpARM64FMOVSload)
  5229  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5230  		v.Aux = symToAux(sym)
  5231  		v.AddArg2(ptr, mem)
  5232  		return true
  5233  	}
  5234  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  5235  	// cond: off == 0 && sym == nil
  5236  	// result: (FMOVSloadidx ptr idx mem)
  5237  	for {
  5238  		off := auxIntToInt32(v.AuxInt)
  5239  		sym := auxToSym(v.Aux)
  5240  		if v_0.Op != OpARM64ADD {
  5241  			break
  5242  		}
  5243  		idx := v_0.Args[1]
  5244  		ptr := v_0.Args[0]
  5245  		mem := v_1
  5246  		if !(off == 0 && sym == nil) {
  5247  			break
  5248  		}
  5249  		v.reset(OpARM64FMOVSloadidx)
  5250  		v.AddArg3(ptr, idx, mem)
  5251  		return true
  5252  	}
  5253  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  5254  	// cond: off == 0 && sym == nil
  5255  	// result: (FMOVSloadidx4 ptr idx mem)
  5256  	for {
  5257  		off := auxIntToInt32(v.AuxInt)
  5258  		sym := auxToSym(v.Aux)
  5259  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5260  			break
  5261  		}
  5262  		idx := v_0.Args[1]
  5263  		ptr := v_0.Args[0]
  5264  		mem := v_1
  5265  		if !(off == 0 && sym == nil) {
  5266  			break
  5267  		}
  5268  		v.reset(OpARM64FMOVSloadidx4)
  5269  		v.AddArg3(ptr, idx, mem)
  5270  		return true
  5271  	}
  5272  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  5273  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5274  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5275  	for {
  5276  		off1 := auxIntToInt32(v.AuxInt)
  5277  		sym1 := auxToSym(v.Aux)
  5278  		if v_0.Op != OpARM64MOVDaddr {
  5279  			break
  5280  		}
  5281  		off2 := auxIntToInt32(v_0.AuxInt)
  5282  		sym2 := auxToSym(v_0.Aux)
  5283  		ptr := v_0.Args[0]
  5284  		mem := v_1
  5285  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5286  			break
  5287  		}
  5288  		v.reset(OpARM64FMOVSload)
  5289  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5290  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5291  		v.AddArg2(ptr, mem)
  5292  		return true
  5293  	}
  5294  	return false
  5295  }
  5296  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  5297  	v_2 := v.Args[2]
  5298  	v_1 := v.Args[1]
  5299  	v_0 := v.Args[0]
  5300  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  5301  	// cond: is32Bit(c)
  5302  	// result: (FMOVSload [int32(c)] ptr mem)
  5303  	for {
  5304  		ptr := v_0
  5305  		if v_1.Op != OpARM64MOVDconst {
  5306  			break
  5307  		}
  5308  		c := auxIntToInt64(v_1.AuxInt)
  5309  		mem := v_2
  5310  		if !(is32Bit(c)) {
  5311  			break
  5312  		}
  5313  		v.reset(OpARM64FMOVSload)
  5314  		v.AuxInt = int32ToAuxInt(int32(c))
  5315  		v.AddArg2(ptr, mem)
  5316  		return true
  5317  	}
  5318  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  5319  	// cond: is32Bit(c)
  5320  	// result: (FMOVSload [int32(c)] ptr mem)
  5321  	for {
  5322  		if v_0.Op != OpARM64MOVDconst {
  5323  			break
  5324  		}
  5325  		c := auxIntToInt64(v_0.AuxInt)
  5326  		ptr := v_1
  5327  		mem := v_2
  5328  		if !(is32Bit(c)) {
  5329  			break
  5330  		}
  5331  		v.reset(OpARM64FMOVSload)
  5332  		v.AuxInt = int32ToAuxInt(int32(c))
  5333  		v.AddArg2(ptr, mem)
  5334  		return true
  5335  	}
  5336  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  5337  	// result: (FMOVSloadidx4 ptr idx mem)
  5338  	for {
  5339  		ptr := v_0
  5340  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5341  			break
  5342  		}
  5343  		idx := v_1.Args[0]
  5344  		mem := v_2
  5345  		v.reset(OpARM64FMOVSloadidx4)
  5346  		v.AddArg3(ptr, idx, mem)
  5347  		return true
  5348  	}
  5349  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  5350  	// result: (FMOVSloadidx4 ptr idx mem)
  5351  	for {
  5352  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5353  			break
  5354  		}
  5355  		idx := v_0.Args[0]
  5356  		ptr := v_1
  5357  		mem := v_2
  5358  		v.reset(OpARM64FMOVSloadidx4)
  5359  		v.AddArg3(ptr, idx, mem)
  5360  		return true
  5361  	}
  5362  	return false
  5363  }
  5364  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  5365  	v_2 := v.Args[2]
  5366  	v_1 := v.Args[1]
  5367  	v_0 := v.Args[0]
  5368  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  5369  	// cond: is32Bit(c<<2)
  5370  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  5371  	for {
  5372  		ptr := v_0
  5373  		if v_1.Op != OpARM64MOVDconst {
  5374  			break
  5375  		}
  5376  		c := auxIntToInt64(v_1.AuxInt)
  5377  		mem := v_2
  5378  		if !(is32Bit(c << 2)) {
  5379  			break
  5380  		}
  5381  		v.reset(OpARM64FMOVSload)
  5382  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5383  		v.AddArg2(ptr, mem)
  5384  		return true
  5385  	}
  5386  	return false
  5387  }
  5388  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  5389  	v_2 := v.Args[2]
  5390  	v_1 := v.Args[1]
  5391  	v_0 := v.Args[0]
  5392  	b := v.Block
  5393  	config := b.Func.Config
  5394  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  5395  	// result: (MOVWstore [off] {sym} ptr val mem)
  5396  	for {
  5397  		off := auxIntToInt32(v.AuxInt)
  5398  		sym := auxToSym(v.Aux)
  5399  		ptr := v_0
  5400  		if v_1.Op != OpARM64FMOVSgpfp {
  5401  			break
  5402  		}
  5403  		val := v_1.Args[0]
  5404  		mem := v_2
  5405  		v.reset(OpARM64MOVWstore)
  5406  		v.AuxInt = int32ToAuxInt(off)
  5407  		v.Aux = symToAux(sym)
  5408  		v.AddArg3(ptr, val, mem)
  5409  		return true
  5410  	}
  5411  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5412  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5413  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  5414  	for {
  5415  		off1 := auxIntToInt32(v.AuxInt)
  5416  		sym := auxToSym(v.Aux)
  5417  		if v_0.Op != OpARM64ADDconst {
  5418  			break
  5419  		}
  5420  		off2 := auxIntToInt64(v_0.AuxInt)
  5421  		ptr := v_0.Args[0]
  5422  		val := v_1
  5423  		mem := v_2
  5424  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5425  			break
  5426  		}
  5427  		v.reset(OpARM64FMOVSstore)
  5428  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5429  		v.Aux = symToAux(sym)
  5430  		v.AddArg3(ptr, val, mem)
  5431  		return true
  5432  	}
  5433  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  5434  	// cond: off == 0 && sym == nil
  5435  	// result: (FMOVSstoreidx ptr idx val mem)
  5436  	for {
  5437  		off := auxIntToInt32(v.AuxInt)
  5438  		sym := auxToSym(v.Aux)
  5439  		if v_0.Op != OpARM64ADD {
  5440  			break
  5441  		}
  5442  		idx := v_0.Args[1]
  5443  		ptr := v_0.Args[0]
  5444  		val := v_1
  5445  		mem := v_2
  5446  		if !(off == 0 && sym == nil) {
  5447  			break
  5448  		}
  5449  		v.reset(OpARM64FMOVSstoreidx)
  5450  		v.AddArg4(ptr, idx, val, mem)
  5451  		return true
  5452  	}
  5453  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  5454  	// cond: off == 0 && sym == nil
  5455  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5456  	for {
  5457  		off := auxIntToInt32(v.AuxInt)
  5458  		sym := auxToSym(v.Aux)
  5459  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5460  			break
  5461  		}
  5462  		idx := v_0.Args[1]
  5463  		ptr := v_0.Args[0]
  5464  		val := v_1
  5465  		mem := v_2
  5466  		if !(off == 0 && sym == nil) {
  5467  			break
  5468  		}
  5469  		v.reset(OpARM64FMOVSstoreidx4)
  5470  		v.AddArg4(ptr, idx, val, mem)
  5471  		return true
  5472  	}
  5473  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5474  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5475  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5476  	for {
  5477  		off1 := auxIntToInt32(v.AuxInt)
  5478  		sym1 := auxToSym(v.Aux)
  5479  		if v_0.Op != OpARM64MOVDaddr {
  5480  			break
  5481  		}
  5482  		off2 := auxIntToInt32(v_0.AuxInt)
  5483  		sym2 := auxToSym(v_0.Aux)
  5484  		ptr := v_0.Args[0]
  5485  		val := v_1
  5486  		mem := v_2
  5487  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5488  			break
  5489  		}
  5490  		v.reset(OpARM64FMOVSstore)
  5491  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5492  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5493  		v.AddArg3(ptr, val, mem)
  5494  		return true
  5495  	}
  5496  	return false
  5497  }
  5498  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  5499  	v_3 := v.Args[3]
  5500  	v_2 := v.Args[2]
  5501  	v_1 := v.Args[1]
  5502  	v_0 := v.Args[0]
  5503  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  5504  	// cond: is32Bit(c)
  5505  	// result: (FMOVSstore [int32(c)] ptr val mem)
  5506  	for {
  5507  		ptr := v_0
  5508  		if v_1.Op != OpARM64MOVDconst {
  5509  			break
  5510  		}
  5511  		c := auxIntToInt64(v_1.AuxInt)
  5512  		val := v_2
  5513  		mem := v_3
  5514  		if !(is32Bit(c)) {
  5515  			break
  5516  		}
  5517  		v.reset(OpARM64FMOVSstore)
  5518  		v.AuxInt = int32ToAuxInt(int32(c))
  5519  		v.AddArg3(ptr, val, mem)
  5520  		return true
  5521  	}
  5522  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  5523  	// cond: is32Bit(c)
  5524  	// result: (FMOVSstore [int32(c)] idx val mem)
  5525  	for {
  5526  		if v_0.Op != OpARM64MOVDconst {
  5527  			break
  5528  		}
  5529  		c := auxIntToInt64(v_0.AuxInt)
  5530  		idx := v_1
  5531  		val := v_2
  5532  		mem := v_3
  5533  		if !(is32Bit(c)) {
  5534  			break
  5535  		}
  5536  		v.reset(OpARM64FMOVSstore)
  5537  		v.AuxInt = int32ToAuxInt(int32(c))
  5538  		v.AddArg3(idx, val, mem)
  5539  		return true
  5540  	}
  5541  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  5542  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5543  	for {
  5544  		ptr := v_0
  5545  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5546  			break
  5547  		}
  5548  		idx := v_1.Args[0]
  5549  		val := v_2
  5550  		mem := v_3
  5551  		v.reset(OpARM64FMOVSstoreidx4)
  5552  		v.AddArg4(ptr, idx, val, mem)
  5553  		return true
  5554  	}
  5555  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  5556  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5557  	for {
  5558  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5559  			break
  5560  		}
  5561  		idx := v_0.Args[0]
  5562  		ptr := v_1
  5563  		val := v_2
  5564  		mem := v_3
  5565  		v.reset(OpARM64FMOVSstoreidx4)
  5566  		v.AddArg4(ptr, idx, val, mem)
  5567  		return true
  5568  	}
  5569  	return false
  5570  }
  5571  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  5572  	v_3 := v.Args[3]
  5573  	v_2 := v.Args[2]
  5574  	v_1 := v.Args[1]
  5575  	v_0 := v.Args[0]
  5576  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  5577  	// cond: is32Bit(c<<2)
  5578  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  5579  	for {
  5580  		ptr := v_0
  5581  		if v_1.Op != OpARM64MOVDconst {
  5582  			break
  5583  		}
  5584  		c := auxIntToInt64(v_1.AuxInt)
  5585  		val := v_2
  5586  		mem := v_3
  5587  		if !(is32Bit(c << 2)) {
  5588  			break
  5589  		}
  5590  		v.reset(OpARM64FMOVSstore)
  5591  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5592  		v.AddArg3(ptr, val, mem)
  5593  		return true
  5594  	}
  5595  	return false
  5596  }
  5597  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  5598  	v_1 := v.Args[1]
  5599  	v_0 := v.Args[0]
  5600  	// match: (FMULD (FNEGD x) y)
  5601  	// result: (FNMULD x y)
  5602  	for {
  5603  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5604  			if v_0.Op != OpARM64FNEGD {
  5605  				continue
  5606  			}
  5607  			x := v_0.Args[0]
  5608  			y := v_1
  5609  			v.reset(OpARM64FNMULD)
  5610  			v.AddArg2(x, y)
  5611  			return true
  5612  		}
  5613  		break
  5614  	}
  5615  	return false
  5616  }
  5617  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  5618  	v_1 := v.Args[1]
  5619  	v_0 := v.Args[0]
  5620  	// match: (FMULS (FNEGS x) y)
  5621  	// result: (FNMULS x y)
  5622  	for {
  5623  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5624  			if v_0.Op != OpARM64FNEGS {
  5625  				continue
  5626  			}
  5627  			x := v_0.Args[0]
  5628  			y := v_1
  5629  			v.reset(OpARM64FNMULS)
  5630  			v.AddArg2(x, y)
  5631  			return true
  5632  		}
  5633  		break
  5634  	}
  5635  	return false
  5636  }
  5637  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  5638  	v_0 := v.Args[0]
  5639  	// match: (FNEGD (FMULD x y))
  5640  	// result: (FNMULD x y)
  5641  	for {
  5642  		if v_0.Op != OpARM64FMULD {
  5643  			break
  5644  		}
  5645  		y := v_0.Args[1]
  5646  		x := v_0.Args[0]
  5647  		v.reset(OpARM64FNMULD)
  5648  		v.AddArg2(x, y)
  5649  		return true
  5650  	}
  5651  	// match: (FNEGD (FNMULD x y))
  5652  	// result: (FMULD x y)
  5653  	for {
  5654  		if v_0.Op != OpARM64FNMULD {
  5655  			break
  5656  		}
  5657  		y := v_0.Args[1]
  5658  		x := v_0.Args[0]
  5659  		v.reset(OpARM64FMULD)
  5660  		v.AddArg2(x, y)
  5661  		return true
  5662  	}
  5663  	return false
  5664  }
  5665  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  5666  	v_0 := v.Args[0]
  5667  	// match: (FNEGS (FMULS x y))
  5668  	// result: (FNMULS x y)
  5669  	for {
  5670  		if v_0.Op != OpARM64FMULS {
  5671  			break
  5672  		}
  5673  		y := v_0.Args[1]
  5674  		x := v_0.Args[0]
  5675  		v.reset(OpARM64FNMULS)
  5676  		v.AddArg2(x, y)
  5677  		return true
  5678  	}
  5679  	// match: (FNEGS (FNMULS x y))
  5680  	// result: (FMULS x y)
  5681  	for {
  5682  		if v_0.Op != OpARM64FNMULS {
  5683  			break
  5684  		}
  5685  		y := v_0.Args[1]
  5686  		x := v_0.Args[0]
  5687  		v.reset(OpARM64FMULS)
  5688  		v.AddArg2(x, y)
  5689  		return true
  5690  	}
  5691  	return false
  5692  }
  5693  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  5694  	v_1 := v.Args[1]
  5695  	v_0 := v.Args[0]
  5696  	// match: (FNMULD (FNEGD x) y)
  5697  	// result: (FMULD x y)
  5698  	for {
  5699  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5700  			if v_0.Op != OpARM64FNEGD {
  5701  				continue
  5702  			}
  5703  			x := v_0.Args[0]
  5704  			y := v_1
  5705  			v.reset(OpARM64FMULD)
  5706  			v.AddArg2(x, y)
  5707  			return true
  5708  		}
  5709  		break
  5710  	}
  5711  	return false
  5712  }
  5713  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  5714  	v_1 := v.Args[1]
  5715  	v_0 := v.Args[0]
  5716  	// match: (FNMULS (FNEGS x) y)
  5717  	// result: (FMULS x y)
  5718  	for {
  5719  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5720  			if v_0.Op != OpARM64FNEGS {
  5721  				continue
  5722  			}
  5723  			x := v_0.Args[0]
  5724  			y := v_1
  5725  			v.reset(OpARM64FMULS)
  5726  			v.AddArg2(x, y)
  5727  			return true
  5728  		}
  5729  		break
  5730  	}
  5731  	return false
  5732  }
  5733  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  5734  	v_1 := v.Args[1]
  5735  	v_0 := v.Args[0]
  5736  	// match: (FSUBD a (FMULD x y))
  5737  	// cond: a.Block.Func.useFMA(v)
  5738  	// result: (FMSUBD a x y)
  5739  	for {
  5740  		a := v_0
  5741  		if v_1.Op != OpARM64FMULD {
  5742  			break
  5743  		}
  5744  		y := v_1.Args[1]
  5745  		x := v_1.Args[0]
  5746  		if !(a.Block.Func.useFMA(v)) {
  5747  			break
  5748  		}
  5749  		v.reset(OpARM64FMSUBD)
  5750  		v.AddArg3(a, x, y)
  5751  		return true
  5752  	}
  5753  	// match: (FSUBD (FMULD x y) a)
  5754  	// cond: a.Block.Func.useFMA(v)
  5755  	// result: (FNMSUBD a x y)
  5756  	for {
  5757  		if v_0.Op != OpARM64FMULD {
  5758  			break
  5759  		}
  5760  		y := v_0.Args[1]
  5761  		x := v_0.Args[0]
  5762  		a := v_1
  5763  		if !(a.Block.Func.useFMA(v)) {
  5764  			break
  5765  		}
  5766  		v.reset(OpARM64FNMSUBD)
  5767  		v.AddArg3(a, x, y)
  5768  		return true
  5769  	}
  5770  	// match: (FSUBD a (FNMULD x y))
  5771  	// cond: a.Block.Func.useFMA(v)
  5772  	// result: (FMADDD a x y)
  5773  	for {
  5774  		a := v_0
  5775  		if v_1.Op != OpARM64FNMULD {
  5776  			break
  5777  		}
  5778  		y := v_1.Args[1]
  5779  		x := v_1.Args[0]
  5780  		if !(a.Block.Func.useFMA(v)) {
  5781  			break
  5782  		}
  5783  		v.reset(OpARM64FMADDD)
  5784  		v.AddArg3(a, x, y)
  5785  		return true
  5786  	}
  5787  	// match: (FSUBD (FNMULD x y) a)
  5788  	// cond: a.Block.Func.useFMA(v)
  5789  	// result: (FNMADDD a x y)
  5790  	for {
  5791  		if v_0.Op != OpARM64FNMULD {
  5792  			break
  5793  		}
  5794  		y := v_0.Args[1]
  5795  		x := v_0.Args[0]
  5796  		a := v_1
  5797  		if !(a.Block.Func.useFMA(v)) {
  5798  			break
  5799  		}
  5800  		v.reset(OpARM64FNMADDD)
  5801  		v.AddArg3(a, x, y)
  5802  		return true
  5803  	}
  5804  	return false
  5805  }
  5806  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  5807  	v_1 := v.Args[1]
  5808  	v_0 := v.Args[0]
  5809  	// match: (FSUBS a (FMULS x y))
  5810  	// cond: a.Block.Func.useFMA(v)
  5811  	// result: (FMSUBS a x y)
  5812  	for {
  5813  		a := v_0
  5814  		if v_1.Op != OpARM64FMULS {
  5815  			break
  5816  		}
  5817  		y := v_1.Args[1]
  5818  		x := v_1.Args[0]
  5819  		if !(a.Block.Func.useFMA(v)) {
  5820  			break
  5821  		}
  5822  		v.reset(OpARM64FMSUBS)
  5823  		v.AddArg3(a, x, y)
  5824  		return true
  5825  	}
  5826  	// match: (FSUBS (FMULS x y) a)
  5827  	// cond: a.Block.Func.useFMA(v)
  5828  	// result: (FNMSUBS a x y)
  5829  	for {
  5830  		if v_0.Op != OpARM64FMULS {
  5831  			break
  5832  		}
  5833  		y := v_0.Args[1]
  5834  		x := v_0.Args[0]
  5835  		a := v_1
  5836  		if !(a.Block.Func.useFMA(v)) {
  5837  			break
  5838  		}
  5839  		v.reset(OpARM64FNMSUBS)
  5840  		v.AddArg3(a, x, y)
  5841  		return true
  5842  	}
  5843  	// match: (FSUBS a (FNMULS x y))
  5844  	// cond: a.Block.Func.useFMA(v)
  5845  	// result: (FMADDS a x y)
  5846  	for {
  5847  		a := v_0
  5848  		if v_1.Op != OpARM64FNMULS {
  5849  			break
  5850  		}
  5851  		y := v_1.Args[1]
  5852  		x := v_1.Args[0]
  5853  		if !(a.Block.Func.useFMA(v)) {
  5854  			break
  5855  		}
  5856  		v.reset(OpARM64FMADDS)
  5857  		v.AddArg3(a, x, y)
  5858  		return true
  5859  	}
  5860  	// match: (FSUBS (FNMULS x y) a)
  5861  	// cond: a.Block.Func.useFMA(v)
  5862  	// result: (FNMADDS a x y)
  5863  	for {
  5864  		if v_0.Op != OpARM64FNMULS {
  5865  			break
  5866  		}
  5867  		y := v_0.Args[1]
  5868  		x := v_0.Args[0]
  5869  		a := v_1
  5870  		if !(a.Block.Func.useFMA(v)) {
  5871  			break
  5872  		}
  5873  		v.reset(OpARM64FNMADDS)
  5874  		v.AddArg3(a, x, y)
  5875  		return true
  5876  	}
  5877  	return false
  5878  }
  5879  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  5880  	v_0 := v.Args[0]
  5881  	b := v.Block
  5882  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  5883  	// cond: z.Uses == 1
  5884  	// result: (GreaterEqual (TST x y))
  5885  	for {
  5886  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5887  			break
  5888  		}
  5889  		z := v_0.Args[0]
  5890  		if z.Op != OpARM64AND {
  5891  			break
  5892  		}
  5893  		y := z.Args[1]
  5894  		x := z.Args[0]
  5895  		if !(z.Uses == 1) {
  5896  			break
  5897  		}
  5898  		v.reset(OpARM64GreaterEqual)
  5899  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  5900  		v0.AddArg2(x, y)
  5901  		v.AddArg(v0)
  5902  		return true
  5903  	}
  5904  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  5905  	// cond: x.Uses == 1
  5906  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  5907  	for {
  5908  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5909  			break
  5910  		}
  5911  		x := v_0.Args[0]
  5912  		if x.Op != OpARM64ANDconst {
  5913  			break
  5914  		}
  5915  		c := auxIntToInt64(x.AuxInt)
  5916  		y := x.Args[0]
  5917  		if !(x.Uses == 1) {
  5918  			break
  5919  		}
  5920  		v.reset(OpARM64GreaterEqual)
  5921  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  5922  		v0.AuxInt = int32ToAuxInt(int32(c))
  5923  		v0.AddArg(y)
  5924  		v.AddArg(v0)
  5925  		return true
  5926  	}
  5927  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  5928  	// cond: z.Uses == 1
  5929  	// result: (GreaterEqual (TSTW x y))
  5930  	for {
  5931  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5932  			break
  5933  		}
  5934  		z := v_0.Args[0]
  5935  		if z.Op != OpARM64AND {
  5936  			break
  5937  		}
  5938  		y := z.Args[1]
  5939  		x := z.Args[0]
  5940  		if !(z.Uses == 1) {
  5941  			break
  5942  		}
  5943  		v.reset(OpARM64GreaterEqual)
  5944  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  5945  		v0.AddArg2(x, y)
  5946  		v.AddArg(v0)
  5947  		return true
  5948  	}
  5949  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  5950  	// cond: x.Uses == 1
  5951  	// result: (GreaterEqual (TSTconst [c] y))
  5952  	for {
  5953  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5954  			break
  5955  		}
  5956  		x := v_0.Args[0]
  5957  		if x.Op != OpARM64ANDconst {
  5958  			break
  5959  		}
  5960  		c := auxIntToInt64(x.AuxInt)
  5961  		y := x.Args[0]
  5962  		if !(x.Uses == 1) {
  5963  			break
  5964  		}
  5965  		v.reset(OpARM64GreaterEqual)
  5966  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  5967  		v0.AuxInt = int64ToAuxInt(c)
  5968  		v0.AddArg(y)
  5969  		v.AddArg(v0)
  5970  		return true
  5971  	}
  5972  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  5973  	// cond: x.Uses == 1
  5974  	// result: (GreaterEqualNoov (CMNconst [c] y))
  5975  	for {
  5976  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5977  			break
  5978  		}
  5979  		x := v_0.Args[0]
  5980  		if x.Op != OpARM64ADDconst {
  5981  			break
  5982  		}
  5983  		c := auxIntToInt64(x.AuxInt)
  5984  		y := x.Args[0]
  5985  		if !(x.Uses == 1) {
  5986  			break
  5987  		}
  5988  		v.reset(OpARM64GreaterEqualNoov)
  5989  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  5990  		v0.AuxInt = int64ToAuxInt(c)
  5991  		v0.AddArg(y)
  5992  		v.AddArg(v0)
  5993  		return true
  5994  	}
  5995  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  5996  	// cond: x.Uses == 1
  5997  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  5998  	for {
  5999  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6000  			break
  6001  		}
  6002  		x := v_0.Args[0]
  6003  		if x.Op != OpARM64ADDconst {
  6004  			break
  6005  		}
  6006  		c := auxIntToInt64(x.AuxInt)
  6007  		y := x.Args[0]
  6008  		if !(x.Uses == 1) {
  6009  			break
  6010  		}
  6011  		v.reset(OpARM64GreaterEqualNoov)
  6012  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  6013  		v0.AuxInt = int32ToAuxInt(int32(c))
  6014  		v0.AddArg(y)
  6015  		v.AddArg(v0)
  6016  		return true
  6017  	}
  6018  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  6019  	// cond: z.Uses == 1
  6020  	// result: (GreaterEqualNoov (CMN x y))
  6021  	for {
  6022  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6023  			break
  6024  		}
  6025  		z := v_0.Args[0]
  6026  		if z.Op != OpARM64ADD {
  6027  			break
  6028  		}
  6029  		y := z.Args[1]
  6030  		x := z.Args[0]
  6031  		if !(z.Uses == 1) {
  6032  			break
  6033  		}
  6034  		v.reset(OpARM64GreaterEqualNoov)
  6035  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6036  		v0.AddArg2(x, y)
  6037  		v.AddArg(v0)
  6038  		return true
  6039  	}
  6040  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  6041  	// cond: z.Uses == 1
  6042  	// result: (GreaterEqualNoov (CMNW x y))
  6043  	for {
  6044  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6045  			break
  6046  		}
  6047  		z := v_0.Args[0]
  6048  		if z.Op != OpARM64ADD {
  6049  			break
  6050  		}
  6051  		y := z.Args[1]
  6052  		x := z.Args[0]
  6053  		if !(z.Uses == 1) {
  6054  			break
  6055  		}
  6056  		v.reset(OpARM64GreaterEqualNoov)
  6057  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6058  		v0.AddArg2(x, y)
  6059  		v.AddArg(v0)
  6060  		return true
  6061  	}
  6062  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  6063  	// cond: z.Uses == 1
  6064  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  6065  	for {
  6066  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6067  			break
  6068  		}
  6069  		z := v_0.Args[0]
  6070  		if z.Op != OpARM64MADD {
  6071  			break
  6072  		}
  6073  		y := z.Args[2]
  6074  		a := z.Args[0]
  6075  		x := z.Args[1]
  6076  		if !(z.Uses == 1) {
  6077  			break
  6078  		}
  6079  		v.reset(OpARM64GreaterEqualNoov)
  6080  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6081  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6082  		v1.AddArg2(x, y)
  6083  		v0.AddArg2(a, v1)
  6084  		v.AddArg(v0)
  6085  		return true
  6086  	}
  6087  	// match: (GreaterEqual (CMPconst [0] z:(MSUB a x y)))
  6088  	// cond: z.Uses == 1
  6089  	// result: (GreaterEqualNoov (CMP a (MUL <x.Type> x y)))
  6090  	for {
  6091  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6092  			break
  6093  		}
  6094  		z := v_0.Args[0]
  6095  		if z.Op != OpARM64MSUB {
  6096  			break
  6097  		}
  6098  		y := z.Args[2]
  6099  		a := z.Args[0]
  6100  		x := z.Args[1]
  6101  		if !(z.Uses == 1) {
  6102  			break
  6103  		}
  6104  		v.reset(OpARM64GreaterEqualNoov)
  6105  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6106  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6107  		v1.AddArg2(x, y)
  6108  		v0.AddArg2(a, v1)
  6109  		v.AddArg(v0)
  6110  		return true
  6111  	}
  6112  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  6113  	// cond: z.Uses == 1
  6114  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  6115  	for {
  6116  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6117  			break
  6118  		}
  6119  		z := v_0.Args[0]
  6120  		if z.Op != OpARM64MADDW {
  6121  			break
  6122  		}
  6123  		y := z.Args[2]
  6124  		a := z.Args[0]
  6125  		x := z.Args[1]
  6126  		if !(z.Uses == 1) {
  6127  			break
  6128  		}
  6129  		v.reset(OpARM64GreaterEqualNoov)
  6130  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6131  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6132  		v1.AddArg2(x, y)
  6133  		v0.AddArg2(a, v1)
  6134  		v.AddArg(v0)
  6135  		return true
  6136  	}
  6137  	// match: (GreaterEqual (CMPWconst [0] z:(MSUBW a x y)))
  6138  	// cond: z.Uses == 1
  6139  	// result: (GreaterEqualNoov (CMPW a (MULW <x.Type> x y)))
  6140  	for {
  6141  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6142  			break
  6143  		}
  6144  		z := v_0.Args[0]
  6145  		if z.Op != OpARM64MSUBW {
  6146  			break
  6147  		}
  6148  		y := z.Args[2]
  6149  		a := z.Args[0]
  6150  		x := z.Args[1]
  6151  		if !(z.Uses == 1) {
  6152  			break
  6153  		}
  6154  		v.reset(OpARM64GreaterEqualNoov)
  6155  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6156  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6157  		v1.AddArg2(x, y)
  6158  		v0.AddArg2(a, v1)
  6159  		v.AddArg(v0)
  6160  		return true
  6161  	}
  6162  	// match: (GreaterEqual (FlagConstant [fc]))
  6163  	// result: (MOVDconst [b2i(fc.ge())])
  6164  	for {
  6165  		if v_0.Op != OpARM64FlagConstant {
  6166  			break
  6167  		}
  6168  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6169  		v.reset(OpARM64MOVDconst)
  6170  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  6171  		return true
  6172  	}
  6173  	// match: (GreaterEqual (InvertFlags x))
  6174  	// result: (LessEqual x)
  6175  	for {
  6176  		if v_0.Op != OpARM64InvertFlags {
  6177  			break
  6178  		}
  6179  		x := v_0.Args[0]
  6180  		v.reset(OpARM64LessEqual)
  6181  		v.AddArg(x)
  6182  		return true
  6183  	}
  6184  	return false
  6185  }
  6186  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  6187  	v_0 := v.Args[0]
  6188  	// match: (GreaterEqualF (InvertFlags x))
  6189  	// result: (LessEqualF x)
  6190  	for {
  6191  		if v_0.Op != OpARM64InvertFlags {
  6192  			break
  6193  		}
  6194  		x := v_0.Args[0]
  6195  		v.reset(OpARM64LessEqualF)
  6196  		v.AddArg(x)
  6197  		return true
  6198  	}
  6199  	return false
  6200  }
  6201  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  6202  	v_0 := v.Args[0]
  6203  	b := v.Block
  6204  	typ := &b.Func.Config.Types
  6205  	// match: (GreaterEqualNoov (InvertFlags x))
  6206  	// result: (CSINC [OpARM64NotEqual] (LessThanNoov <typ.Bool> x) (MOVDconst [0]) x)
  6207  	for {
  6208  		if v_0.Op != OpARM64InvertFlags {
  6209  			break
  6210  		}
  6211  		x := v_0.Args[0]
  6212  		v.reset(OpARM64CSINC)
  6213  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6214  		v0 := b.NewValue0(v.Pos, OpARM64LessThanNoov, typ.Bool)
  6215  		v0.AddArg(x)
  6216  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
  6217  		v1.AuxInt = int64ToAuxInt(0)
  6218  		v.AddArg3(v0, v1, x)
  6219  		return true
  6220  	}
  6221  	return false
  6222  }
  6223  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  6224  	v_0 := v.Args[0]
  6225  	// match: (GreaterEqualU (FlagConstant [fc]))
  6226  	// result: (MOVDconst [b2i(fc.uge())])
  6227  	for {
  6228  		if v_0.Op != OpARM64FlagConstant {
  6229  			break
  6230  		}
  6231  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6232  		v.reset(OpARM64MOVDconst)
  6233  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  6234  		return true
  6235  	}
  6236  	// match: (GreaterEqualU (InvertFlags x))
  6237  	// result: (LessEqualU x)
  6238  	for {
  6239  		if v_0.Op != OpARM64InvertFlags {
  6240  			break
  6241  		}
  6242  		x := v_0.Args[0]
  6243  		v.reset(OpARM64LessEqualU)
  6244  		v.AddArg(x)
  6245  		return true
  6246  	}
  6247  	return false
  6248  }
  6249  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  6250  	v_0 := v.Args[0]
  6251  	b := v.Block
  6252  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  6253  	// cond: z.Uses == 1
  6254  	// result: (GreaterThan (TST x y))
  6255  	for {
  6256  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6257  			break
  6258  		}
  6259  		z := v_0.Args[0]
  6260  		if z.Op != OpARM64AND {
  6261  			break
  6262  		}
  6263  		y := z.Args[1]
  6264  		x := z.Args[0]
  6265  		if !(z.Uses == 1) {
  6266  			break
  6267  		}
  6268  		v.reset(OpARM64GreaterThan)
  6269  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6270  		v0.AddArg2(x, y)
  6271  		v.AddArg(v0)
  6272  		return true
  6273  	}
  6274  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  6275  	// cond: x.Uses == 1
  6276  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  6277  	for {
  6278  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6279  			break
  6280  		}
  6281  		x := v_0.Args[0]
  6282  		if x.Op != OpARM64ANDconst {
  6283  			break
  6284  		}
  6285  		c := auxIntToInt64(x.AuxInt)
  6286  		y := x.Args[0]
  6287  		if !(x.Uses == 1) {
  6288  			break
  6289  		}
  6290  		v.reset(OpARM64GreaterThan)
  6291  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6292  		v0.AuxInt = int32ToAuxInt(int32(c))
  6293  		v0.AddArg(y)
  6294  		v.AddArg(v0)
  6295  		return true
  6296  	}
  6297  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  6298  	// cond: z.Uses == 1
  6299  	// result: (GreaterThan (TSTW x y))
  6300  	for {
  6301  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6302  			break
  6303  		}
  6304  		z := v_0.Args[0]
  6305  		if z.Op != OpARM64AND {
  6306  			break
  6307  		}
  6308  		y := z.Args[1]
  6309  		x := z.Args[0]
  6310  		if !(z.Uses == 1) {
  6311  			break
  6312  		}
  6313  		v.reset(OpARM64GreaterThan)
  6314  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6315  		v0.AddArg2(x, y)
  6316  		v.AddArg(v0)
  6317  		return true
  6318  	}
  6319  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  6320  	// cond: x.Uses == 1
  6321  	// result: (GreaterThan (TSTconst [c] y))
  6322  	for {
  6323  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6324  			break
  6325  		}
  6326  		x := v_0.Args[0]
  6327  		if x.Op != OpARM64ANDconst {
  6328  			break
  6329  		}
  6330  		c := auxIntToInt64(x.AuxInt)
  6331  		y := x.Args[0]
  6332  		if !(x.Uses == 1) {
  6333  			break
  6334  		}
  6335  		v.reset(OpARM64GreaterThan)
  6336  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6337  		v0.AuxInt = int64ToAuxInt(c)
  6338  		v0.AddArg(y)
  6339  		v.AddArg(v0)
  6340  		return true
  6341  	}
  6342  	// match: (GreaterThan (FlagConstant [fc]))
  6343  	// result: (MOVDconst [b2i(fc.gt())])
  6344  	for {
  6345  		if v_0.Op != OpARM64FlagConstant {
  6346  			break
  6347  		}
  6348  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6349  		v.reset(OpARM64MOVDconst)
  6350  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  6351  		return true
  6352  	}
  6353  	// match: (GreaterThan (InvertFlags x))
  6354  	// result: (LessThan x)
  6355  	for {
  6356  		if v_0.Op != OpARM64InvertFlags {
  6357  			break
  6358  		}
  6359  		x := v_0.Args[0]
  6360  		v.reset(OpARM64LessThan)
  6361  		v.AddArg(x)
  6362  		return true
  6363  	}
  6364  	return false
  6365  }
  6366  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  6367  	v_0 := v.Args[0]
  6368  	// match: (GreaterThanF (InvertFlags x))
  6369  	// result: (LessThanF x)
  6370  	for {
  6371  		if v_0.Op != OpARM64InvertFlags {
  6372  			break
  6373  		}
  6374  		x := v_0.Args[0]
  6375  		v.reset(OpARM64LessThanF)
  6376  		v.AddArg(x)
  6377  		return true
  6378  	}
  6379  	return false
  6380  }
  6381  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  6382  	v_0 := v.Args[0]
  6383  	// match: (GreaterThanU (FlagConstant [fc]))
  6384  	// result: (MOVDconst [b2i(fc.ugt())])
  6385  	for {
  6386  		if v_0.Op != OpARM64FlagConstant {
  6387  			break
  6388  		}
  6389  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6390  		v.reset(OpARM64MOVDconst)
  6391  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  6392  		return true
  6393  	}
  6394  	// match: (GreaterThanU (InvertFlags x))
  6395  	// result: (LessThanU x)
  6396  	for {
  6397  		if v_0.Op != OpARM64InvertFlags {
  6398  			break
  6399  		}
  6400  		x := v_0.Args[0]
  6401  		v.reset(OpARM64LessThanU)
  6402  		v.AddArg(x)
  6403  		return true
  6404  	}
  6405  	return false
  6406  }
  6407  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  6408  	v_1 := v.Args[1]
  6409  	v_0 := v.Args[0]
  6410  	b := v.Block
  6411  	config := b.Func.Config
  6412  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  6413  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6414  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  6415  	for {
  6416  		off1 := auxIntToInt32(v.AuxInt)
  6417  		sym := auxToSym(v.Aux)
  6418  		if v_0.Op != OpARM64ADDconst {
  6419  			break
  6420  		}
  6421  		off2 := auxIntToInt64(v_0.AuxInt)
  6422  		ptr := v_0.Args[0]
  6423  		mem := v_1
  6424  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6425  			break
  6426  		}
  6427  		v.reset(OpARM64LDP)
  6428  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6429  		v.Aux = symToAux(sym)
  6430  		v.AddArg2(ptr, mem)
  6431  		return true
  6432  	}
  6433  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6434  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6435  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6436  	for {
  6437  		off1 := auxIntToInt32(v.AuxInt)
  6438  		sym1 := auxToSym(v.Aux)
  6439  		if v_0.Op != OpARM64MOVDaddr {
  6440  			break
  6441  		}
  6442  		off2 := auxIntToInt32(v_0.AuxInt)
  6443  		sym2 := auxToSym(v_0.Aux)
  6444  		ptr := v_0.Args[0]
  6445  		mem := v_1
  6446  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6447  			break
  6448  		}
  6449  		v.reset(OpARM64LDP)
  6450  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6451  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6452  		v.AddArg2(ptr, mem)
  6453  		return true
  6454  	}
  6455  	return false
  6456  }
  6457  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  6458  	v_0 := v.Args[0]
  6459  	b := v.Block
  6460  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  6461  	// cond: z.Uses == 1
  6462  	// result: (LessEqual (TST x y))
  6463  	for {
  6464  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6465  			break
  6466  		}
  6467  		z := v_0.Args[0]
  6468  		if z.Op != OpARM64AND {
  6469  			break
  6470  		}
  6471  		y := z.Args[1]
  6472  		x := z.Args[0]
  6473  		if !(z.Uses == 1) {
  6474  			break
  6475  		}
  6476  		v.reset(OpARM64LessEqual)
  6477  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6478  		v0.AddArg2(x, y)
  6479  		v.AddArg(v0)
  6480  		return true
  6481  	}
  6482  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  6483  	// cond: x.Uses == 1
  6484  	// result: (LessEqual (TSTWconst [int32(c)] y))
  6485  	for {
  6486  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6487  			break
  6488  		}
  6489  		x := v_0.Args[0]
  6490  		if x.Op != OpARM64ANDconst {
  6491  			break
  6492  		}
  6493  		c := auxIntToInt64(x.AuxInt)
  6494  		y := x.Args[0]
  6495  		if !(x.Uses == 1) {
  6496  			break
  6497  		}
  6498  		v.reset(OpARM64LessEqual)
  6499  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6500  		v0.AuxInt = int32ToAuxInt(int32(c))
  6501  		v0.AddArg(y)
  6502  		v.AddArg(v0)
  6503  		return true
  6504  	}
  6505  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  6506  	// cond: z.Uses == 1
  6507  	// result: (LessEqual (TSTW x y))
  6508  	for {
  6509  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6510  			break
  6511  		}
  6512  		z := v_0.Args[0]
  6513  		if z.Op != OpARM64AND {
  6514  			break
  6515  		}
  6516  		y := z.Args[1]
  6517  		x := z.Args[0]
  6518  		if !(z.Uses == 1) {
  6519  			break
  6520  		}
  6521  		v.reset(OpARM64LessEqual)
  6522  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6523  		v0.AddArg2(x, y)
  6524  		v.AddArg(v0)
  6525  		return true
  6526  	}
  6527  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  6528  	// cond: x.Uses == 1
  6529  	// result: (LessEqual (TSTconst [c] y))
  6530  	for {
  6531  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6532  			break
  6533  		}
  6534  		x := v_0.Args[0]
  6535  		if x.Op != OpARM64ANDconst {
  6536  			break
  6537  		}
  6538  		c := auxIntToInt64(x.AuxInt)
  6539  		y := x.Args[0]
  6540  		if !(x.Uses == 1) {
  6541  			break
  6542  		}
  6543  		v.reset(OpARM64LessEqual)
  6544  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6545  		v0.AuxInt = int64ToAuxInt(c)
  6546  		v0.AddArg(y)
  6547  		v.AddArg(v0)
  6548  		return true
  6549  	}
  6550  	// match: (LessEqual (FlagConstant [fc]))
  6551  	// result: (MOVDconst [b2i(fc.le())])
  6552  	for {
  6553  		if v_0.Op != OpARM64FlagConstant {
  6554  			break
  6555  		}
  6556  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6557  		v.reset(OpARM64MOVDconst)
  6558  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  6559  		return true
  6560  	}
  6561  	// match: (LessEqual (InvertFlags x))
  6562  	// result: (GreaterEqual x)
  6563  	for {
  6564  		if v_0.Op != OpARM64InvertFlags {
  6565  			break
  6566  		}
  6567  		x := v_0.Args[0]
  6568  		v.reset(OpARM64GreaterEqual)
  6569  		v.AddArg(x)
  6570  		return true
  6571  	}
  6572  	return false
  6573  }
  6574  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  6575  	v_0 := v.Args[0]
  6576  	// match: (LessEqualF (InvertFlags x))
  6577  	// result: (GreaterEqualF x)
  6578  	for {
  6579  		if v_0.Op != OpARM64InvertFlags {
  6580  			break
  6581  		}
  6582  		x := v_0.Args[0]
  6583  		v.reset(OpARM64GreaterEqualF)
  6584  		v.AddArg(x)
  6585  		return true
  6586  	}
  6587  	return false
  6588  }
  6589  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  6590  	v_0 := v.Args[0]
  6591  	// match: (LessEqualU (FlagConstant [fc]))
  6592  	// result: (MOVDconst [b2i(fc.ule())])
  6593  	for {
  6594  		if v_0.Op != OpARM64FlagConstant {
  6595  			break
  6596  		}
  6597  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6598  		v.reset(OpARM64MOVDconst)
  6599  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  6600  		return true
  6601  	}
  6602  	// match: (LessEqualU (InvertFlags x))
  6603  	// result: (GreaterEqualU x)
  6604  	for {
  6605  		if v_0.Op != OpARM64InvertFlags {
  6606  			break
  6607  		}
  6608  		x := v_0.Args[0]
  6609  		v.reset(OpARM64GreaterEqualU)
  6610  		v.AddArg(x)
  6611  		return true
  6612  	}
  6613  	return false
  6614  }
  6615  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  6616  	v_0 := v.Args[0]
  6617  	b := v.Block
  6618  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  6619  	// cond: z.Uses == 1
  6620  	// result: (LessThan (TST x y))
  6621  	for {
  6622  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6623  			break
  6624  		}
  6625  		z := v_0.Args[0]
  6626  		if z.Op != OpARM64AND {
  6627  			break
  6628  		}
  6629  		y := z.Args[1]
  6630  		x := z.Args[0]
  6631  		if !(z.Uses == 1) {
  6632  			break
  6633  		}
  6634  		v.reset(OpARM64LessThan)
  6635  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6636  		v0.AddArg2(x, y)
  6637  		v.AddArg(v0)
  6638  		return true
  6639  	}
  6640  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  6641  	// cond: x.Uses == 1
  6642  	// result: (LessThan (TSTWconst [int32(c)] y))
  6643  	for {
  6644  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6645  			break
  6646  		}
  6647  		x := v_0.Args[0]
  6648  		if x.Op != OpARM64ANDconst {
  6649  			break
  6650  		}
  6651  		c := auxIntToInt64(x.AuxInt)
  6652  		y := x.Args[0]
  6653  		if !(x.Uses == 1) {
  6654  			break
  6655  		}
  6656  		v.reset(OpARM64LessThan)
  6657  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6658  		v0.AuxInt = int32ToAuxInt(int32(c))
  6659  		v0.AddArg(y)
  6660  		v.AddArg(v0)
  6661  		return true
  6662  	}
  6663  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  6664  	// cond: z.Uses == 1
  6665  	// result: (LessThan (TSTW x y))
  6666  	for {
  6667  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6668  			break
  6669  		}
  6670  		z := v_0.Args[0]
  6671  		if z.Op != OpARM64AND {
  6672  			break
  6673  		}
  6674  		y := z.Args[1]
  6675  		x := z.Args[0]
  6676  		if !(z.Uses == 1) {
  6677  			break
  6678  		}
  6679  		v.reset(OpARM64LessThan)
  6680  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6681  		v0.AddArg2(x, y)
  6682  		v.AddArg(v0)
  6683  		return true
  6684  	}
  6685  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  6686  	// cond: x.Uses == 1
  6687  	// result: (LessThan (TSTconst [c] y))
  6688  	for {
  6689  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6690  			break
  6691  		}
  6692  		x := v_0.Args[0]
  6693  		if x.Op != OpARM64ANDconst {
  6694  			break
  6695  		}
  6696  		c := auxIntToInt64(x.AuxInt)
  6697  		y := x.Args[0]
  6698  		if !(x.Uses == 1) {
  6699  			break
  6700  		}
  6701  		v.reset(OpARM64LessThan)
  6702  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6703  		v0.AuxInt = int64ToAuxInt(c)
  6704  		v0.AddArg(y)
  6705  		v.AddArg(v0)
  6706  		return true
  6707  	}
  6708  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  6709  	// cond: x.Uses == 1
  6710  	// result: (LessThanNoov (CMNconst [c] y))
  6711  	for {
  6712  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6713  			break
  6714  		}
  6715  		x := v_0.Args[0]
  6716  		if x.Op != OpARM64ADDconst {
  6717  			break
  6718  		}
  6719  		c := auxIntToInt64(x.AuxInt)
  6720  		y := x.Args[0]
  6721  		if !(x.Uses == 1) {
  6722  			break
  6723  		}
  6724  		v.reset(OpARM64LessThanNoov)
  6725  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  6726  		v0.AuxInt = int64ToAuxInt(c)
  6727  		v0.AddArg(y)
  6728  		v.AddArg(v0)
  6729  		return true
  6730  	}
  6731  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  6732  	// cond: x.Uses == 1
  6733  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  6734  	for {
  6735  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6736  			break
  6737  		}
  6738  		x := v_0.Args[0]
  6739  		if x.Op != OpARM64ADDconst {
  6740  			break
  6741  		}
  6742  		c := auxIntToInt64(x.AuxInt)
  6743  		y := x.Args[0]
  6744  		if !(x.Uses == 1) {
  6745  			break
  6746  		}
  6747  		v.reset(OpARM64LessThanNoov)
  6748  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  6749  		v0.AuxInt = int32ToAuxInt(int32(c))
  6750  		v0.AddArg(y)
  6751  		v.AddArg(v0)
  6752  		return true
  6753  	}
  6754  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  6755  	// cond: z.Uses == 1
  6756  	// result: (LessThanNoov (CMN x y))
  6757  	for {
  6758  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6759  			break
  6760  		}
  6761  		z := v_0.Args[0]
  6762  		if z.Op != OpARM64ADD {
  6763  			break
  6764  		}
  6765  		y := z.Args[1]
  6766  		x := z.Args[0]
  6767  		if !(z.Uses == 1) {
  6768  			break
  6769  		}
  6770  		v.reset(OpARM64LessThanNoov)
  6771  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6772  		v0.AddArg2(x, y)
  6773  		v.AddArg(v0)
  6774  		return true
  6775  	}
  6776  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  6777  	// cond: z.Uses == 1
  6778  	// result: (LessThanNoov (CMNW x y))
  6779  	for {
  6780  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6781  			break
  6782  		}
  6783  		z := v_0.Args[0]
  6784  		if z.Op != OpARM64ADD {
  6785  			break
  6786  		}
  6787  		y := z.Args[1]
  6788  		x := z.Args[0]
  6789  		if !(z.Uses == 1) {
  6790  			break
  6791  		}
  6792  		v.reset(OpARM64LessThanNoov)
  6793  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6794  		v0.AddArg2(x, y)
  6795  		v.AddArg(v0)
  6796  		return true
  6797  	}
  6798  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  6799  	// cond: z.Uses == 1
  6800  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  6801  	for {
  6802  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6803  			break
  6804  		}
  6805  		z := v_0.Args[0]
  6806  		if z.Op != OpARM64MADD {
  6807  			break
  6808  		}
  6809  		y := z.Args[2]
  6810  		a := z.Args[0]
  6811  		x := z.Args[1]
  6812  		if !(z.Uses == 1) {
  6813  			break
  6814  		}
  6815  		v.reset(OpARM64LessThanNoov)
  6816  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6817  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6818  		v1.AddArg2(x, y)
  6819  		v0.AddArg2(a, v1)
  6820  		v.AddArg(v0)
  6821  		return true
  6822  	}
  6823  	// match: (LessThan (CMPconst [0] z:(MSUB a x y)))
  6824  	// cond: z.Uses == 1
  6825  	// result: (LessThanNoov (CMP a (MUL <x.Type> x y)))
  6826  	for {
  6827  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6828  			break
  6829  		}
  6830  		z := v_0.Args[0]
  6831  		if z.Op != OpARM64MSUB {
  6832  			break
  6833  		}
  6834  		y := z.Args[2]
  6835  		a := z.Args[0]
  6836  		x := z.Args[1]
  6837  		if !(z.Uses == 1) {
  6838  			break
  6839  		}
  6840  		v.reset(OpARM64LessThanNoov)
  6841  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6842  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6843  		v1.AddArg2(x, y)
  6844  		v0.AddArg2(a, v1)
  6845  		v.AddArg(v0)
  6846  		return true
  6847  	}
  6848  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  6849  	// cond: z.Uses == 1
  6850  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  6851  	for {
  6852  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6853  			break
  6854  		}
  6855  		z := v_0.Args[0]
  6856  		if z.Op != OpARM64MADDW {
  6857  			break
  6858  		}
  6859  		y := z.Args[2]
  6860  		a := z.Args[0]
  6861  		x := z.Args[1]
  6862  		if !(z.Uses == 1) {
  6863  			break
  6864  		}
  6865  		v.reset(OpARM64LessThanNoov)
  6866  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6867  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6868  		v1.AddArg2(x, y)
  6869  		v0.AddArg2(a, v1)
  6870  		v.AddArg(v0)
  6871  		return true
  6872  	}
  6873  	// match: (LessThan (CMPWconst [0] z:(MSUBW a x y)))
  6874  	// cond: z.Uses == 1
  6875  	// result: (LessThanNoov (CMPW a (MULW <x.Type> x y)))
  6876  	for {
  6877  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6878  			break
  6879  		}
  6880  		z := v_0.Args[0]
  6881  		if z.Op != OpARM64MSUBW {
  6882  			break
  6883  		}
  6884  		y := z.Args[2]
  6885  		a := z.Args[0]
  6886  		x := z.Args[1]
  6887  		if !(z.Uses == 1) {
  6888  			break
  6889  		}
  6890  		v.reset(OpARM64LessThanNoov)
  6891  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6892  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6893  		v1.AddArg2(x, y)
  6894  		v0.AddArg2(a, v1)
  6895  		v.AddArg(v0)
  6896  		return true
  6897  	}
  6898  	// match: (LessThan (FlagConstant [fc]))
  6899  	// result: (MOVDconst [b2i(fc.lt())])
  6900  	for {
  6901  		if v_0.Op != OpARM64FlagConstant {
  6902  			break
  6903  		}
  6904  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6905  		v.reset(OpARM64MOVDconst)
  6906  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  6907  		return true
  6908  	}
  6909  	// match: (LessThan (InvertFlags x))
  6910  	// result: (GreaterThan x)
  6911  	for {
  6912  		if v_0.Op != OpARM64InvertFlags {
  6913  			break
  6914  		}
  6915  		x := v_0.Args[0]
  6916  		v.reset(OpARM64GreaterThan)
  6917  		v.AddArg(x)
  6918  		return true
  6919  	}
  6920  	return false
  6921  }
  6922  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  6923  	v_0 := v.Args[0]
  6924  	// match: (LessThanF (InvertFlags x))
  6925  	// result: (GreaterThanF x)
  6926  	for {
  6927  		if v_0.Op != OpARM64InvertFlags {
  6928  			break
  6929  		}
  6930  		x := v_0.Args[0]
  6931  		v.reset(OpARM64GreaterThanF)
  6932  		v.AddArg(x)
  6933  		return true
  6934  	}
  6935  	return false
  6936  }
  6937  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  6938  	v_0 := v.Args[0]
  6939  	b := v.Block
  6940  	typ := &b.Func.Config.Types
  6941  	// match: (LessThanNoov (InvertFlags x))
  6942  	// result: (CSEL0 [OpARM64NotEqual] (GreaterEqualNoov <typ.Bool> x) x)
  6943  	for {
  6944  		if v_0.Op != OpARM64InvertFlags {
  6945  			break
  6946  		}
  6947  		x := v_0.Args[0]
  6948  		v.reset(OpARM64CSEL0)
  6949  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6950  		v0 := b.NewValue0(v.Pos, OpARM64GreaterEqualNoov, typ.Bool)
  6951  		v0.AddArg(x)
  6952  		v.AddArg2(v0, x)
  6953  		return true
  6954  	}
  6955  	return false
  6956  }
  6957  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  6958  	v_0 := v.Args[0]
  6959  	// match: (LessThanU (FlagConstant [fc]))
  6960  	// result: (MOVDconst [b2i(fc.ult())])
  6961  	for {
  6962  		if v_0.Op != OpARM64FlagConstant {
  6963  			break
  6964  		}
  6965  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6966  		v.reset(OpARM64MOVDconst)
  6967  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  6968  		return true
  6969  	}
  6970  	// match: (LessThanU (InvertFlags x))
  6971  	// result: (GreaterThanU x)
  6972  	for {
  6973  		if v_0.Op != OpARM64InvertFlags {
  6974  			break
  6975  		}
  6976  		x := v_0.Args[0]
  6977  		v.reset(OpARM64GreaterThanU)
  6978  		v.AddArg(x)
  6979  		return true
  6980  	}
  6981  	return false
  6982  }
  6983  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  6984  	v_2 := v.Args[2]
  6985  	v_1 := v.Args[1]
  6986  	v_0 := v.Args[0]
  6987  	b := v.Block
  6988  	// match: (MADD a x (MOVDconst [-1]))
  6989  	// result: (SUB a x)
  6990  	for {
  6991  		a := v_0
  6992  		x := v_1
  6993  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  6994  			break
  6995  		}
  6996  		v.reset(OpARM64SUB)
  6997  		v.AddArg2(a, x)
  6998  		return true
  6999  	}
  7000  	// match: (MADD a _ (MOVDconst [0]))
  7001  	// result: a
  7002  	for {
  7003  		a := v_0
  7004  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  7005  			break
  7006  		}
  7007  		v.copyOf(a)
  7008  		return true
  7009  	}
  7010  	// match: (MADD a x (MOVDconst [1]))
  7011  	// result: (ADD a x)
  7012  	for {
  7013  		a := v_0
  7014  		x := v_1
  7015  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  7016  			break
  7017  		}
  7018  		v.reset(OpARM64ADD)
  7019  		v.AddArg2(a, x)
  7020  		return true
  7021  	}
  7022  	// match: (MADD a x (MOVDconst [c]))
  7023  	// cond: isPowerOfTwo(c)
  7024  	// result: (ADDshiftLL a x [log64(c)])
  7025  	for {
  7026  		a := v_0
  7027  		x := v_1
  7028  		if v_2.Op != OpARM64MOVDconst {
  7029  			break
  7030  		}
  7031  		c := auxIntToInt64(v_2.AuxInt)
  7032  		if !(isPowerOfTwo(c)) {
  7033  			break
  7034  		}
  7035  		v.reset(OpARM64ADDshiftLL)
  7036  		v.AuxInt = int64ToAuxInt(log64(c))
  7037  		v.AddArg2(a, x)
  7038  		return true
  7039  	}
  7040  	// match: (MADD a x (MOVDconst [c]))
  7041  	// cond: isPowerOfTwo(c-1) && c>=3
  7042  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7043  	for {
  7044  		a := v_0
  7045  		x := v_1
  7046  		if v_2.Op != OpARM64MOVDconst {
  7047  			break
  7048  		}
  7049  		c := auxIntToInt64(v_2.AuxInt)
  7050  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7051  			break
  7052  		}
  7053  		v.reset(OpARM64ADD)
  7054  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7055  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7056  		v0.AddArg2(x, x)
  7057  		v.AddArg2(a, v0)
  7058  		return true
  7059  	}
  7060  	// match: (MADD a x (MOVDconst [c]))
  7061  	// cond: isPowerOfTwo(c+1) && c>=7
  7062  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7063  	for {
  7064  		a := v_0
  7065  		x := v_1
  7066  		if v_2.Op != OpARM64MOVDconst {
  7067  			break
  7068  		}
  7069  		c := auxIntToInt64(v_2.AuxInt)
  7070  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7071  			break
  7072  		}
  7073  		v.reset(OpARM64SUB)
  7074  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7075  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7076  		v0.AddArg2(x, x)
  7077  		v.AddArg2(a, v0)
  7078  		return true
  7079  	}
  7080  	// match: (MADD a x (MOVDconst [c]))
  7081  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7082  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7083  	for {
  7084  		a := v_0
  7085  		x := v_1
  7086  		if v_2.Op != OpARM64MOVDconst {
  7087  			break
  7088  		}
  7089  		c := auxIntToInt64(v_2.AuxInt)
  7090  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7091  			break
  7092  		}
  7093  		v.reset(OpARM64SUBshiftLL)
  7094  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7095  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7096  		v0.AuxInt = int64ToAuxInt(2)
  7097  		v0.AddArg2(x, x)
  7098  		v.AddArg2(a, v0)
  7099  		return true
  7100  	}
  7101  	// match: (MADD a x (MOVDconst [c]))
  7102  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7103  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7104  	for {
  7105  		a := v_0
  7106  		x := v_1
  7107  		if v_2.Op != OpARM64MOVDconst {
  7108  			break
  7109  		}
  7110  		c := auxIntToInt64(v_2.AuxInt)
  7111  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7112  			break
  7113  		}
  7114  		v.reset(OpARM64ADDshiftLL)
  7115  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7116  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7117  		v0.AuxInt = int64ToAuxInt(2)
  7118  		v0.AddArg2(x, x)
  7119  		v.AddArg2(a, v0)
  7120  		return true
  7121  	}
  7122  	// match: (MADD a x (MOVDconst [c]))
  7123  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7124  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7125  	for {
  7126  		a := v_0
  7127  		x := v_1
  7128  		if v_2.Op != OpARM64MOVDconst {
  7129  			break
  7130  		}
  7131  		c := auxIntToInt64(v_2.AuxInt)
  7132  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7133  			break
  7134  		}
  7135  		v.reset(OpARM64SUBshiftLL)
  7136  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7137  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7138  		v0.AuxInt = int64ToAuxInt(3)
  7139  		v0.AddArg2(x, x)
  7140  		v.AddArg2(a, v0)
  7141  		return true
  7142  	}
  7143  	// match: (MADD a x (MOVDconst [c]))
  7144  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7145  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7146  	for {
  7147  		a := v_0
  7148  		x := v_1
  7149  		if v_2.Op != OpARM64MOVDconst {
  7150  			break
  7151  		}
  7152  		c := auxIntToInt64(v_2.AuxInt)
  7153  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7154  			break
  7155  		}
  7156  		v.reset(OpARM64ADDshiftLL)
  7157  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7158  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7159  		v0.AuxInt = int64ToAuxInt(3)
  7160  		v0.AddArg2(x, x)
  7161  		v.AddArg2(a, v0)
  7162  		return true
  7163  	}
  7164  	// match: (MADD a (MOVDconst [-1]) x)
  7165  	// result: (SUB a x)
  7166  	for {
  7167  		a := v_0
  7168  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7169  			break
  7170  		}
  7171  		x := v_2
  7172  		v.reset(OpARM64SUB)
  7173  		v.AddArg2(a, x)
  7174  		return true
  7175  	}
  7176  	// match: (MADD a (MOVDconst [0]) _)
  7177  	// result: a
  7178  	for {
  7179  		a := v_0
  7180  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7181  			break
  7182  		}
  7183  		v.copyOf(a)
  7184  		return true
  7185  	}
  7186  	// match: (MADD a (MOVDconst [1]) x)
  7187  	// result: (ADD a x)
  7188  	for {
  7189  		a := v_0
  7190  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7191  			break
  7192  		}
  7193  		x := v_2
  7194  		v.reset(OpARM64ADD)
  7195  		v.AddArg2(a, x)
  7196  		return true
  7197  	}
  7198  	// match: (MADD a (MOVDconst [c]) x)
  7199  	// cond: isPowerOfTwo(c)
  7200  	// result: (ADDshiftLL a x [log64(c)])
  7201  	for {
  7202  		a := v_0
  7203  		if v_1.Op != OpARM64MOVDconst {
  7204  			break
  7205  		}
  7206  		c := auxIntToInt64(v_1.AuxInt)
  7207  		x := v_2
  7208  		if !(isPowerOfTwo(c)) {
  7209  			break
  7210  		}
  7211  		v.reset(OpARM64ADDshiftLL)
  7212  		v.AuxInt = int64ToAuxInt(log64(c))
  7213  		v.AddArg2(a, x)
  7214  		return true
  7215  	}
  7216  	// match: (MADD a (MOVDconst [c]) x)
  7217  	// cond: isPowerOfTwo(c-1) && c>=3
  7218  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7219  	for {
  7220  		a := v_0
  7221  		if v_1.Op != OpARM64MOVDconst {
  7222  			break
  7223  		}
  7224  		c := auxIntToInt64(v_1.AuxInt)
  7225  		x := v_2
  7226  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7227  			break
  7228  		}
  7229  		v.reset(OpARM64ADD)
  7230  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7231  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7232  		v0.AddArg2(x, x)
  7233  		v.AddArg2(a, v0)
  7234  		return true
  7235  	}
  7236  	// match: (MADD a (MOVDconst [c]) x)
  7237  	// cond: isPowerOfTwo(c+1) && c>=7
  7238  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7239  	for {
  7240  		a := v_0
  7241  		if v_1.Op != OpARM64MOVDconst {
  7242  			break
  7243  		}
  7244  		c := auxIntToInt64(v_1.AuxInt)
  7245  		x := v_2
  7246  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7247  			break
  7248  		}
  7249  		v.reset(OpARM64SUB)
  7250  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7251  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7252  		v0.AddArg2(x, x)
  7253  		v.AddArg2(a, v0)
  7254  		return true
  7255  	}
  7256  	// match: (MADD a (MOVDconst [c]) x)
  7257  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7258  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7259  	for {
  7260  		a := v_0
  7261  		if v_1.Op != OpARM64MOVDconst {
  7262  			break
  7263  		}
  7264  		c := auxIntToInt64(v_1.AuxInt)
  7265  		x := v_2
  7266  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7267  			break
  7268  		}
  7269  		v.reset(OpARM64SUBshiftLL)
  7270  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7271  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7272  		v0.AuxInt = int64ToAuxInt(2)
  7273  		v0.AddArg2(x, x)
  7274  		v.AddArg2(a, v0)
  7275  		return true
  7276  	}
  7277  	// match: (MADD a (MOVDconst [c]) x)
  7278  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7279  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7280  	for {
  7281  		a := v_0
  7282  		if v_1.Op != OpARM64MOVDconst {
  7283  			break
  7284  		}
  7285  		c := auxIntToInt64(v_1.AuxInt)
  7286  		x := v_2
  7287  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7288  			break
  7289  		}
  7290  		v.reset(OpARM64ADDshiftLL)
  7291  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7292  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7293  		v0.AuxInt = int64ToAuxInt(2)
  7294  		v0.AddArg2(x, x)
  7295  		v.AddArg2(a, v0)
  7296  		return true
  7297  	}
  7298  	// match: (MADD a (MOVDconst [c]) x)
  7299  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7300  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7301  	for {
  7302  		a := v_0
  7303  		if v_1.Op != OpARM64MOVDconst {
  7304  			break
  7305  		}
  7306  		c := auxIntToInt64(v_1.AuxInt)
  7307  		x := v_2
  7308  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7309  			break
  7310  		}
  7311  		v.reset(OpARM64SUBshiftLL)
  7312  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7313  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7314  		v0.AuxInt = int64ToAuxInt(3)
  7315  		v0.AddArg2(x, x)
  7316  		v.AddArg2(a, v0)
  7317  		return true
  7318  	}
  7319  	// match: (MADD a (MOVDconst [c]) x)
  7320  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7321  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7322  	for {
  7323  		a := v_0
  7324  		if v_1.Op != OpARM64MOVDconst {
  7325  			break
  7326  		}
  7327  		c := auxIntToInt64(v_1.AuxInt)
  7328  		x := v_2
  7329  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7330  			break
  7331  		}
  7332  		v.reset(OpARM64ADDshiftLL)
  7333  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7334  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7335  		v0.AuxInt = int64ToAuxInt(3)
  7336  		v0.AddArg2(x, x)
  7337  		v.AddArg2(a, v0)
  7338  		return true
  7339  	}
  7340  	// match: (MADD (MOVDconst [c]) x y)
  7341  	// result: (ADDconst [c] (MUL <x.Type> x y))
  7342  	for {
  7343  		if v_0.Op != OpARM64MOVDconst {
  7344  			break
  7345  		}
  7346  		c := auxIntToInt64(v_0.AuxInt)
  7347  		x := v_1
  7348  		y := v_2
  7349  		v.reset(OpARM64ADDconst)
  7350  		v.AuxInt = int64ToAuxInt(c)
  7351  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7352  		v0.AddArg2(x, y)
  7353  		v.AddArg(v0)
  7354  		return true
  7355  	}
  7356  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  7357  	// result: (ADDconst [c*d] a)
  7358  	for {
  7359  		a := v_0
  7360  		if v_1.Op != OpARM64MOVDconst {
  7361  			break
  7362  		}
  7363  		c := auxIntToInt64(v_1.AuxInt)
  7364  		if v_2.Op != OpARM64MOVDconst {
  7365  			break
  7366  		}
  7367  		d := auxIntToInt64(v_2.AuxInt)
  7368  		v.reset(OpARM64ADDconst)
  7369  		v.AuxInt = int64ToAuxInt(c * d)
  7370  		v.AddArg(a)
  7371  		return true
  7372  	}
  7373  	return false
  7374  }
  7375  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  7376  	v_2 := v.Args[2]
  7377  	v_1 := v.Args[1]
  7378  	v_0 := v.Args[0]
  7379  	b := v.Block
  7380  	// match: (MADDW a x (MOVDconst [c]))
  7381  	// cond: int32(c)==-1
  7382  	// result: (MOVWUreg (SUB <a.Type> a x))
  7383  	for {
  7384  		a := v_0
  7385  		x := v_1
  7386  		if v_2.Op != OpARM64MOVDconst {
  7387  			break
  7388  		}
  7389  		c := auxIntToInt64(v_2.AuxInt)
  7390  		if !(int32(c) == -1) {
  7391  			break
  7392  		}
  7393  		v.reset(OpARM64MOVWUreg)
  7394  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7395  		v0.AddArg2(a, x)
  7396  		v.AddArg(v0)
  7397  		return true
  7398  	}
  7399  	// match: (MADDW a _ (MOVDconst [c]))
  7400  	// cond: int32(c)==0
  7401  	// result: (MOVWUreg a)
  7402  	for {
  7403  		a := v_0
  7404  		if v_2.Op != OpARM64MOVDconst {
  7405  			break
  7406  		}
  7407  		c := auxIntToInt64(v_2.AuxInt)
  7408  		if !(int32(c) == 0) {
  7409  			break
  7410  		}
  7411  		v.reset(OpARM64MOVWUreg)
  7412  		v.AddArg(a)
  7413  		return true
  7414  	}
  7415  	// match: (MADDW a x (MOVDconst [c]))
  7416  	// cond: int32(c)==1
  7417  	// result: (MOVWUreg (ADD <a.Type> a x))
  7418  	for {
  7419  		a := v_0
  7420  		x := v_1
  7421  		if v_2.Op != OpARM64MOVDconst {
  7422  			break
  7423  		}
  7424  		c := auxIntToInt64(v_2.AuxInt)
  7425  		if !(int32(c) == 1) {
  7426  			break
  7427  		}
  7428  		v.reset(OpARM64MOVWUreg)
  7429  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7430  		v0.AddArg2(a, x)
  7431  		v.AddArg(v0)
  7432  		return true
  7433  	}
  7434  	// match: (MADDW a x (MOVDconst [c]))
  7435  	// cond: isPowerOfTwo(c)
  7436  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7437  	for {
  7438  		a := v_0
  7439  		x := v_1
  7440  		if v_2.Op != OpARM64MOVDconst {
  7441  			break
  7442  		}
  7443  		c := auxIntToInt64(v_2.AuxInt)
  7444  		if !(isPowerOfTwo(c)) {
  7445  			break
  7446  		}
  7447  		v.reset(OpARM64MOVWUreg)
  7448  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7449  		v0.AuxInt = int64ToAuxInt(log64(c))
  7450  		v0.AddArg2(a, x)
  7451  		v.AddArg(v0)
  7452  		return true
  7453  	}
  7454  	// match: (MADDW a x (MOVDconst [c]))
  7455  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7456  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7457  	for {
  7458  		a := v_0
  7459  		x := v_1
  7460  		if v_2.Op != OpARM64MOVDconst {
  7461  			break
  7462  		}
  7463  		c := auxIntToInt64(v_2.AuxInt)
  7464  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7465  			break
  7466  		}
  7467  		v.reset(OpARM64MOVWUreg)
  7468  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7469  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7470  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7471  		v1.AddArg2(x, x)
  7472  		v0.AddArg2(a, v1)
  7473  		v.AddArg(v0)
  7474  		return true
  7475  	}
  7476  	// match: (MADDW a x (MOVDconst [c]))
  7477  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7478  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7479  	for {
  7480  		a := v_0
  7481  		x := v_1
  7482  		if v_2.Op != OpARM64MOVDconst {
  7483  			break
  7484  		}
  7485  		c := auxIntToInt64(v_2.AuxInt)
  7486  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7487  			break
  7488  		}
  7489  		v.reset(OpARM64MOVWUreg)
  7490  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7491  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7492  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7493  		v1.AddArg2(x, x)
  7494  		v0.AddArg2(a, v1)
  7495  		v.AddArg(v0)
  7496  		return true
  7497  	}
  7498  	// match: (MADDW a x (MOVDconst [c]))
  7499  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7500  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7501  	for {
  7502  		a := v_0
  7503  		x := v_1
  7504  		if v_2.Op != OpARM64MOVDconst {
  7505  			break
  7506  		}
  7507  		c := auxIntToInt64(v_2.AuxInt)
  7508  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7509  			break
  7510  		}
  7511  		v.reset(OpARM64MOVWUreg)
  7512  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7513  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7514  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7515  		v1.AuxInt = int64ToAuxInt(2)
  7516  		v1.AddArg2(x, x)
  7517  		v0.AddArg2(a, v1)
  7518  		v.AddArg(v0)
  7519  		return true
  7520  	}
  7521  	// match: (MADDW a x (MOVDconst [c]))
  7522  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7523  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7524  	for {
  7525  		a := v_0
  7526  		x := v_1
  7527  		if v_2.Op != OpARM64MOVDconst {
  7528  			break
  7529  		}
  7530  		c := auxIntToInt64(v_2.AuxInt)
  7531  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7532  			break
  7533  		}
  7534  		v.reset(OpARM64MOVWUreg)
  7535  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7536  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7537  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7538  		v1.AuxInt = int64ToAuxInt(2)
  7539  		v1.AddArg2(x, x)
  7540  		v0.AddArg2(a, v1)
  7541  		v.AddArg(v0)
  7542  		return true
  7543  	}
  7544  	// match: (MADDW a x (MOVDconst [c]))
  7545  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7546  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7547  	for {
  7548  		a := v_0
  7549  		x := v_1
  7550  		if v_2.Op != OpARM64MOVDconst {
  7551  			break
  7552  		}
  7553  		c := auxIntToInt64(v_2.AuxInt)
  7554  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7555  			break
  7556  		}
  7557  		v.reset(OpARM64MOVWUreg)
  7558  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7559  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7560  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7561  		v1.AuxInt = int64ToAuxInt(3)
  7562  		v1.AddArg2(x, x)
  7563  		v0.AddArg2(a, v1)
  7564  		v.AddArg(v0)
  7565  		return true
  7566  	}
  7567  	// match: (MADDW a x (MOVDconst [c]))
  7568  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7569  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7570  	for {
  7571  		a := v_0
  7572  		x := v_1
  7573  		if v_2.Op != OpARM64MOVDconst {
  7574  			break
  7575  		}
  7576  		c := auxIntToInt64(v_2.AuxInt)
  7577  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7578  			break
  7579  		}
  7580  		v.reset(OpARM64MOVWUreg)
  7581  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7582  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7583  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7584  		v1.AuxInt = int64ToAuxInt(3)
  7585  		v1.AddArg2(x, x)
  7586  		v0.AddArg2(a, v1)
  7587  		v.AddArg(v0)
  7588  		return true
  7589  	}
  7590  	// match: (MADDW a (MOVDconst [c]) x)
  7591  	// cond: int32(c)==-1
  7592  	// result: (MOVWUreg (SUB <a.Type> a x))
  7593  	for {
  7594  		a := v_0
  7595  		if v_1.Op != OpARM64MOVDconst {
  7596  			break
  7597  		}
  7598  		c := auxIntToInt64(v_1.AuxInt)
  7599  		x := v_2
  7600  		if !(int32(c) == -1) {
  7601  			break
  7602  		}
  7603  		v.reset(OpARM64MOVWUreg)
  7604  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7605  		v0.AddArg2(a, x)
  7606  		v.AddArg(v0)
  7607  		return true
  7608  	}
  7609  	// match: (MADDW a (MOVDconst [c]) _)
  7610  	// cond: int32(c)==0
  7611  	// result: (MOVWUreg a)
  7612  	for {
  7613  		a := v_0
  7614  		if v_1.Op != OpARM64MOVDconst {
  7615  			break
  7616  		}
  7617  		c := auxIntToInt64(v_1.AuxInt)
  7618  		if !(int32(c) == 0) {
  7619  			break
  7620  		}
  7621  		v.reset(OpARM64MOVWUreg)
  7622  		v.AddArg(a)
  7623  		return true
  7624  	}
  7625  	// match: (MADDW a (MOVDconst [c]) x)
  7626  	// cond: int32(c)==1
  7627  	// result: (MOVWUreg (ADD <a.Type> a x))
  7628  	for {
  7629  		a := v_0
  7630  		if v_1.Op != OpARM64MOVDconst {
  7631  			break
  7632  		}
  7633  		c := auxIntToInt64(v_1.AuxInt)
  7634  		x := v_2
  7635  		if !(int32(c) == 1) {
  7636  			break
  7637  		}
  7638  		v.reset(OpARM64MOVWUreg)
  7639  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7640  		v0.AddArg2(a, x)
  7641  		v.AddArg(v0)
  7642  		return true
  7643  	}
  7644  	// match: (MADDW a (MOVDconst [c]) x)
  7645  	// cond: isPowerOfTwo(c)
  7646  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7647  	for {
  7648  		a := v_0
  7649  		if v_1.Op != OpARM64MOVDconst {
  7650  			break
  7651  		}
  7652  		c := auxIntToInt64(v_1.AuxInt)
  7653  		x := v_2
  7654  		if !(isPowerOfTwo(c)) {
  7655  			break
  7656  		}
  7657  		v.reset(OpARM64MOVWUreg)
  7658  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7659  		v0.AuxInt = int64ToAuxInt(log64(c))
  7660  		v0.AddArg2(a, x)
  7661  		v.AddArg(v0)
  7662  		return true
  7663  	}
  7664  	// match: (MADDW a (MOVDconst [c]) x)
  7665  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7666  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7667  	for {
  7668  		a := v_0
  7669  		if v_1.Op != OpARM64MOVDconst {
  7670  			break
  7671  		}
  7672  		c := auxIntToInt64(v_1.AuxInt)
  7673  		x := v_2
  7674  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7675  			break
  7676  		}
  7677  		v.reset(OpARM64MOVWUreg)
  7678  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7679  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7680  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7681  		v1.AddArg2(x, x)
  7682  		v0.AddArg2(a, v1)
  7683  		v.AddArg(v0)
  7684  		return true
  7685  	}
  7686  	// match: (MADDW a (MOVDconst [c]) x)
  7687  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7688  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7689  	for {
  7690  		a := v_0
  7691  		if v_1.Op != OpARM64MOVDconst {
  7692  			break
  7693  		}
  7694  		c := auxIntToInt64(v_1.AuxInt)
  7695  		x := v_2
  7696  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7697  			break
  7698  		}
  7699  		v.reset(OpARM64MOVWUreg)
  7700  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7701  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7702  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7703  		v1.AddArg2(x, x)
  7704  		v0.AddArg2(a, v1)
  7705  		v.AddArg(v0)
  7706  		return true
  7707  	}
  7708  	// match: (MADDW a (MOVDconst [c]) x)
  7709  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7710  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7711  	for {
  7712  		a := v_0
  7713  		if v_1.Op != OpARM64MOVDconst {
  7714  			break
  7715  		}
  7716  		c := auxIntToInt64(v_1.AuxInt)
  7717  		x := v_2
  7718  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7719  			break
  7720  		}
  7721  		v.reset(OpARM64MOVWUreg)
  7722  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7723  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7724  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7725  		v1.AuxInt = int64ToAuxInt(2)
  7726  		v1.AddArg2(x, x)
  7727  		v0.AddArg2(a, v1)
  7728  		v.AddArg(v0)
  7729  		return true
  7730  	}
  7731  	// match: (MADDW a (MOVDconst [c]) x)
  7732  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7733  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7734  	for {
  7735  		a := v_0
  7736  		if v_1.Op != OpARM64MOVDconst {
  7737  			break
  7738  		}
  7739  		c := auxIntToInt64(v_1.AuxInt)
  7740  		x := v_2
  7741  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7742  			break
  7743  		}
  7744  		v.reset(OpARM64MOVWUreg)
  7745  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7746  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7747  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7748  		v1.AuxInt = int64ToAuxInt(2)
  7749  		v1.AddArg2(x, x)
  7750  		v0.AddArg2(a, v1)
  7751  		v.AddArg(v0)
  7752  		return true
  7753  	}
  7754  	// match: (MADDW a (MOVDconst [c]) x)
  7755  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7756  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7757  	for {
  7758  		a := v_0
  7759  		if v_1.Op != OpARM64MOVDconst {
  7760  			break
  7761  		}
  7762  		c := auxIntToInt64(v_1.AuxInt)
  7763  		x := v_2
  7764  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7765  			break
  7766  		}
  7767  		v.reset(OpARM64MOVWUreg)
  7768  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7769  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7770  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7771  		v1.AuxInt = int64ToAuxInt(3)
  7772  		v1.AddArg2(x, x)
  7773  		v0.AddArg2(a, v1)
  7774  		v.AddArg(v0)
  7775  		return true
  7776  	}
  7777  	// match: (MADDW a (MOVDconst [c]) x)
  7778  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7779  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7780  	for {
  7781  		a := v_0
  7782  		if v_1.Op != OpARM64MOVDconst {
  7783  			break
  7784  		}
  7785  		c := auxIntToInt64(v_1.AuxInt)
  7786  		x := v_2
  7787  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7788  			break
  7789  		}
  7790  		v.reset(OpARM64MOVWUreg)
  7791  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7792  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7793  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7794  		v1.AuxInt = int64ToAuxInt(3)
  7795  		v1.AddArg2(x, x)
  7796  		v0.AddArg2(a, v1)
  7797  		v.AddArg(v0)
  7798  		return true
  7799  	}
  7800  	// match: (MADDW (MOVDconst [c]) x y)
  7801  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  7802  	for {
  7803  		if v_0.Op != OpARM64MOVDconst {
  7804  			break
  7805  		}
  7806  		c := auxIntToInt64(v_0.AuxInt)
  7807  		x := v_1
  7808  		y := v_2
  7809  		v.reset(OpARM64MOVWUreg)
  7810  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  7811  		v0.AuxInt = int64ToAuxInt(c)
  7812  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7813  		v1.AddArg2(x, y)
  7814  		v0.AddArg(v1)
  7815  		v.AddArg(v0)
  7816  		return true
  7817  	}
  7818  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  7819  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  7820  	for {
  7821  		a := v_0
  7822  		if v_1.Op != OpARM64MOVDconst {
  7823  			break
  7824  		}
  7825  		c := auxIntToInt64(v_1.AuxInt)
  7826  		if v_2.Op != OpARM64MOVDconst {
  7827  			break
  7828  		}
  7829  		d := auxIntToInt64(v_2.AuxInt)
  7830  		v.reset(OpARM64MOVWUreg)
  7831  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  7832  		v0.AuxInt = int64ToAuxInt(c * d)
  7833  		v0.AddArg(a)
  7834  		v.AddArg(v0)
  7835  		return true
  7836  	}
  7837  	return false
  7838  }
  7839  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  7840  	v_1 := v.Args[1]
  7841  	v_0 := v.Args[0]
  7842  	b := v.Block
  7843  	// match: (MNEG x (MOVDconst [-1]))
  7844  	// result: x
  7845  	for {
  7846  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7847  			x := v_0
  7848  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7849  				continue
  7850  			}
  7851  			v.copyOf(x)
  7852  			return true
  7853  		}
  7854  		break
  7855  	}
  7856  	// match: (MNEG _ (MOVDconst [0]))
  7857  	// result: (MOVDconst [0])
  7858  	for {
  7859  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7860  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7861  				continue
  7862  			}
  7863  			v.reset(OpARM64MOVDconst)
  7864  			v.AuxInt = int64ToAuxInt(0)
  7865  			return true
  7866  		}
  7867  		break
  7868  	}
  7869  	// match: (MNEG x (MOVDconst [1]))
  7870  	// result: (NEG x)
  7871  	for {
  7872  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7873  			x := v_0
  7874  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7875  				continue
  7876  			}
  7877  			v.reset(OpARM64NEG)
  7878  			v.AddArg(x)
  7879  			return true
  7880  		}
  7881  		break
  7882  	}
  7883  	// match: (MNEG x (MOVDconst [c]))
  7884  	// cond: isPowerOfTwo(c)
  7885  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  7886  	for {
  7887  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7888  			x := v_0
  7889  			if v_1.Op != OpARM64MOVDconst {
  7890  				continue
  7891  			}
  7892  			c := auxIntToInt64(v_1.AuxInt)
  7893  			if !(isPowerOfTwo(c)) {
  7894  				continue
  7895  			}
  7896  			v.reset(OpARM64NEG)
  7897  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  7898  			v0.AuxInt = int64ToAuxInt(log64(c))
  7899  			v0.AddArg(x)
  7900  			v.AddArg(v0)
  7901  			return true
  7902  		}
  7903  		break
  7904  	}
  7905  	// match: (MNEG x (MOVDconst [c]))
  7906  	// cond: isPowerOfTwo(c-1) && c >= 3
  7907  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7908  	for {
  7909  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7910  			x := v_0
  7911  			if v_1.Op != OpARM64MOVDconst {
  7912  				continue
  7913  			}
  7914  			c := auxIntToInt64(v_1.AuxInt)
  7915  			if !(isPowerOfTwo(c-1) && c >= 3) {
  7916  				continue
  7917  			}
  7918  			v.reset(OpARM64NEG)
  7919  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7920  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7921  			v0.AddArg2(x, x)
  7922  			v.AddArg(v0)
  7923  			return true
  7924  		}
  7925  		break
  7926  	}
  7927  	// match: (MNEG x (MOVDconst [c]))
  7928  	// cond: isPowerOfTwo(c+1) && c >= 7
  7929  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  7930  	for {
  7931  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7932  			x := v_0
  7933  			if v_1.Op != OpARM64MOVDconst {
  7934  				continue
  7935  			}
  7936  			c := auxIntToInt64(v_1.AuxInt)
  7937  			if !(isPowerOfTwo(c+1) && c >= 7) {
  7938  				continue
  7939  			}
  7940  			v.reset(OpARM64NEG)
  7941  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7942  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7943  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  7944  			v1.AddArg(x)
  7945  			v0.AddArg2(v1, x)
  7946  			v.AddArg(v0)
  7947  			return true
  7948  		}
  7949  		break
  7950  	}
  7951  	// match: (MNEG x (MOVDconst [c]))
  7952  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7953  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  7954  	for {
  7955  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7956  			x := v_0
  7957  			if v_1.Op != OpARM64MOVDconst {
  7958  				continue
  7959  			}
  7960  			c := auxIntToInt64(v_1.AuxInt)
  7961  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7962  				continue
  7963  			}
  7964  			v.reset(OpARM64SLLconst)
  7965  			v.Type = x.Type
  7966  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  7967  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7968  			v0.AuxInt = int64ToAuxInt(2)
  7969  			v0.AddArg2(x, x)
  7970  			v.AddArg(v0)
  7971  			return true
  7972  		}
  7973  		break
  7974  	}
  7975  	// match: (MNEG x (MOVDconst [c]))
  7976  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7977  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  7978  	for {
  7979  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7980  			x := v_0
  7981  			if v_1.Op != OpARM64MOVDconst {
  7982  				continue
  7983  			}
  7984  			c := auxIntToInt64(v_1.AuxInt)
  7985  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7986  				continue
  7987  			}
  7988  			v.reset(OpARM64NEG)
  7989  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  7990  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7991  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7992  			v1.AuxInt = int64ToAuxInt(2)
  7993  			v1.AddArg2(x, x)
  7994  			v0.AddArg(v1)
  7995  			v.AddArg(v0)
  7996  			return true
  7997  		}
  7998  		break
  7999  	}
  8000  	// match: (MNEG x (MOVDconst [c]))
  8001  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8002  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  8003  	for {
  8004  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8005  			x := v_0
  8006  			if v_1.Op != OpARM64MOVDconst {
  8007  				continue
  8008  			}
  8009  			c := auxIntToInt64(v_1.AuxInt)
  8010  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8011  				continue
  8012  			}
  8013  			v.reset(OpARM64SLLconst)
  8014  			v.Type = x.Type
  8015  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  8016  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8017  			v0.AuxInt = int64ToAuxInt(3)
  8018  			v0.AddArg2(x, x)
  8019  			v.AddArg(v0)
  8020  			return true
  8021  		}
  8022  		break
  8023  	}
  8024  	// match: (MNEG x (MOVDconst [c]))
  8025  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8026  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  8027  	for {
  8028  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8029  			x := v_0
  8030  			if v_1.Op != OpARM64MOVDconst {
  8031  				continue
  8032  			}
  8033  			c := auxIntToInt64(v_1.AuxInt)
  8034  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8035  				continue
  8036  			}
  8037  			v.reset(OpARM64NEG)
  8038  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8039  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  8040  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8041  			v1.AuxInt = int64ToAuxInt(3)
  8042  			v1.AddArg2(x, x)
  8043  			v0.AddArg(v1)
  8044  			v.AddArg(v0)
  8045  			return true
  8046  		}
  8047  		break
  8048  	}
  8049  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  8050  	// result: (MOVDconst [-c*d])
  8051  	for {
  8052  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8053  			if v_0.Op != OpARM64MOVDconst {
  8054  				continue
  8055  			}
  8056  			c := auxIntToInt64(v_0.AuxInt)
  8057  			if v_1.Op != OpARM64MOVDconst {
  8058  				continue
  8059  			}
  8060  			d := auxIntToInt64(v_1.AuxInt)
  8061  			v.reset(OpARM64MOVDconst)
  8062  			v.AuxInt = int64ToAuxInt(-c * d)
  8063  			return true
  8064  		}
  8065  		break
  8066  	}
  8067  	return false
  8068  }
  8069  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  8070  	v_1 := v.Args[1]
  8071  	v_0 := v.Args[0]
  8072  	b := v.Block
  8073  	// match: (MNEGW x (MOVDconst [c]))
  8074  	// cond: int32(c)==-1
  8075  	// result: (MOVWUreg x)
  8076  	for {
  8077  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8078  			x := v_0
  8079  			if v_1.Op != OpARM64MOVDconst {
  8080  				continue
  8081  			}
  8082  			c := auxIntToInt64(v_1.AuxInt)
  8083  			if !(int32(c) == -1) {
  8084  				continue
  8085  			}
  8086  			v.reset(OpARM64MOVWUreg)
  8087  			v.AddArg(x)
  8088  			return true
  8089  		}
  8090  		break
  8091  	}
  8092  	// match: (MNEGW _ (MOVDconst [c]))
  8093  	// cond: int32(c)==0
  8094  	// result: (MOVDconst [0])
  8095  	for {
  8096  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8097  			if v_1.Op != OpARM64MOVDconst {
  8098  				continue
  8099  			}
  8100  			c := auxIntToInt64(v_1.AuxInt)
  8101  			if !(int32(c) == 0) {
  8102  				continue
  8103  			}
  8104  			v.reset(OpARM64MOVDconst)
  8105  			v.AuxInt = int64ToAuxInt(0)
  8106  			return true
  8107  		}
  8108  		break
  8109  	}
  8110  	// match: (MNEGW x (MOVDconst [c]))
  8111  	// cond: int32(c)==1
  8112  	// result: (MOVWUreg (NEG <x.Type> x))
  8113  	for {
  8114  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8115  			x := v_0
  8116  			if v_1.Op != OpARM64MOVDconst {
  8117  				continue
  8118  			}
  8119  			c := auxIntToInt64(v_1.AuxInt)
  8120  			if !(int32(c) == 1) {
  8121  				continue
  8122  			}
  8123  			v.reset(OpARM64MOVWUreg)
  8124  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8125  			v0.AddArg(x)
  8126  			v.AddArg(v0)
  8127  			return true
  8128  		}
  8129  		break
  8130  	}
  8131  	// match: (MNEGW x (MOVDconst [c]))
  8132  	// cond: isPowerOfTwo(c)
  8133  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  8134  	for {
  8135  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8136  			x := v_0
  8137  			if v_1.Op != OpARM64MOVDconst {
  8138  				continue
  8139  			}
  8140  			c := auxIntToInt64(v_1.AuxInt)
  8141  			if !(isPowerOfTwo(c)) {
  8142  				continue
  8143  			}
  8144  			v.reset(OpARM64NEG)
  8145  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8146  			v0.AuxInt = int64ToAuxInt(log64(c))
  8147  			v0.AddArg(x)
  8148  			v.AddArg(v0)
  8149  			return true
  8150  		}
  8151  		break
  8152  	}
  8153  	// match: (MNEGW x (MOVDconst [c]))
  8154  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  8155  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  8156  	for {
  8157  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8158  			x := v_0
  8159  			if v_1.Op != OpARM64MOVDconst {
  8160  				continue
  8161  			}
  8162  			c := auxIntToInt64(v_1.AuxInt)
  8163  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  8164  				continue
  8165  			}
  8166  			v.reset(OpARM64MOVWUreg)
  8167  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8168  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8169  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  8170  			v1.AddArg2(x, x)
  8171  			v0.AddArg(v1)
  8172  			v.AddArg(v0)
  8173  			return true
  8174  		}
  8175  		break
  8176  	}
  8177  	// match: (MNEGW x (MOVDconst [c]))
  8178  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  8179  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  8180  	for {
  8181  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8182  			x := v_0
  8183  			if v_1.Op != OpARM64MOVDconst {
  8184  				continue
  8185  			}
  8186  			c := auxIntToInt64(v_1.AuxInt)
  8187  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  8188  				continue
  8189  			}
  8190  			v.reset(OpARM64MOVWUreg)
  8191  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8192  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8193  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  8194  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8195  			v2.AddArg(x)
  8196  			v1.AddArg2(v2, x)
  8197  			v0.AddArg(v1)
  8198  			v.AddArg(v0)
  8199  			return true
  8200  		}
  8201  		break
  8202  	}
  8203  	// match: (MNEGW x (MOVDconst [c]))
  8204  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  8205  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  8206  	for {
  8207  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8208  			x := v_0
  8209  			if v_1.Op != OpARM64MOVDconst {
  8210  				continue
  8211  			}
  8212  			c := auxIntToInt64(v_1.AuxInt)
  8213  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  8214  				continue
  8215  			}
  8216  			v.reset(OpARM64MOVWUreg)
  8217  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8218  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  8219  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8220  			v1.AuxInt = int64ToAuxInt(2)
  8221  			v1.AddArg2(x, x)
  8222  			v0.AddArg(v1)
  8223  			v.AddArg(v0)
  8224  			return true
  8225  		}
  8226  		break
  8227  	}
  8228  	// match: (MNEGW x (MOVDconst [c]))
  8229  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  8230  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  8231  	for {
  8232  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8233  			x := v_0
  8234  			if v_1.Op != OpARM64MOVDconst {
  8235  				continue
  8236  			}
  8237  			c := auxIntToInt64(v_1.AuxInt)
  8238  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  8239  				continue
  8240  			}
  8241  			v.reset(OpARM64MOVWUreg)
  8242  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8243  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8244  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  8245  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8246  			v2.AuxInt = int64ToAuxInt(2)
  8247  			v2.AddArg2(x, x)
  8248  			v1.AddArg(v2)
  8249  			v0.AddArg(v1)
  8250  			v.AddArg(v0)
  8251  			return true
  8252  		}
  8253  		break
  8254  	}
  8255  	// match: (MNEGW x (MOVDconst [c]))
  8256  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  8257  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  8258  	for {
  8259  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8260  			x := v_0
  8261  			if v_1.Op != OpARM64MOVDconst {
  8262  				continue
  8263  			}
  8264  			c := auxIntToInt64(v_1.AuxInt)
  8265  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  8266  				continue
  8267  			}
  8268  			v.reset(OpARM64MOVWUreg)
  8269  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8270  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  8271  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8272  			v1.AuxInt = int64ToAuxInt(3)
  8273  			v1.AddArg2(x, x)
  8274  			v0.AddArg(v1)
  8275  			v.AddArg(v0)
  8276  			return true
  8277  		}
  8278  		break
  8279  	}
  8280  	// match: (MNEGW x (MOVDconst [c]))
  8281  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  8282  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  8283  	for {
  8284  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8285  			x := v_0
  8286  			if v_1.Op != OpARM64MOVDconst {
  8287  				continue
  8288  			}
  8289  			c := auxIntToInt64(v_1.AuxInt)
  8290  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  8291  				continue
  8292  			}
  8293  			v.reset(OpARM64MOVWUreg)
  8294  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8295  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8296  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
  8297  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8298  			v2.AuxInt = int64ToAuxInt(3)
  8299  			v2.AddArg2(x, x)
  8300  			v1.AddArg(v2)
  8301  			v0.AddArg(v1)
  8302  			v.AddArg(v0)
  8303  			return true
  8304  		}
  8305  		break
  8306  	}
  8307  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
  8308  	// result: (MOVDconst [int64(uint32(-c*d))])
  8309  	for {
  8310  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8311  			if v_0.Op != OpARM64MOVDconst {
  8312  				continue
  8313  			}
  8314  			c := auxIntToInt64(v_0.AuxInt)
  8315  			if v_1.Op != OpARM64MOVDconst {
  8316  				continue
  8317  			}
  8318  			d := auxIntToInt64(v_1.AuxInt)
  8319  			v.reset(OpARM64MOVDconst)
  8320  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
  8321  			return true
  8322  		}
  8323  		break
  8324  	}
  8325  	return false
  8326  }
  8327  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
  8328  	v_1 := v.Args[1]
  8329  	v_0 := v.Args[0]
  8330  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
  8331  	// cond: d != 0
  8332  	// result: (MOVDconst [c%d])
  8333  	for {
  8334  		if v_0.Op != OpARM64MOVDconst {
  8335  			break
  8336  		}
  8337  		c := auxIntToInt64(v_0.AuxInt)
  8338  		if v_1.Op != OpARM64MOVDconst {
  8339  			break
  8340  		}
  8341  		d := auxIntToInt64(v_1.AuxInt)
  8342  		if !(d != 0) {
  8343  			break
  8344  		}
  8345  		v.reset(OpARM64MOVDconst)
  8346  		v.AuxInt = int64ToAuxInt(c % d)
  8347  		return true
  8348  	}
  8349  	return false
  8350  }
  8351  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
  8352  	v_1 := v.Args[1]
  8353  	v_0 := v.Args[0]
  8354  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
  8355  	// cond: d != 0
  8356  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
  8357  	for {
  8358  		if v_0.Op != OpARM64MOVDconst {
  8359  			break
  8360  		}
  8361  		c := auxIntToInt64(v_0.AuxInt)
  8362  		if v_1.Op != OpARM64MOVDconst {
  8363  			break
  8364  		}
  8365  		d := auxIntToInt64(v_1.AuxInt)
  8366  		if !(d != 0) {
  8367  			break
  8368  		}
  8369  		v.reset(OpARM64MOVDconst)
  8370  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
  8371  		return true
  8372  	}
  8373  	return false
  8374  }
  8375  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
  8376  	v_1 := v.Args[1]
  8377  	v_0 := v.Args[0]
  8378  	b := v.Block
  8379  	config := b.Func.Config
  8380  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  8381  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8382  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  8383  	for {
  8384  		off1 := auxIntToInt32(v.AuxInt)
  8385  		sym := auxToSym(v.Aux)
  8386  		if v_0.Op != OpARM64ADDconst {
  8387  			break
  8388  		}
  8389  		off2 := auxIntToInt64(v_0.AuxInt)
  8390  		ptr := v_0.Args[0]
  8391  		mem := v_1
  8392  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8393  			break
  8394  		}
  8395  		v.reset(OpARM64MOVBUload)
  8396  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8397  		v.Aux = symToAux(sym)
  8398  		v.AddArg2(ptr, mem)
  8399  		return true
  8400  	}
  8401  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
  8402  	// cond: off == 0 && sym == nil
  8403  	// result: (MOVBUloadidx ptr idx mem)
  8404  	for {
  8405  		off := auxIntToInt32(v.AuxInt)
  8406  		sym := auxToSym(v.Aux)
  8407  		if v_0.Op != OpARM64ADD {
  8408  			break
  8409  		}
  8410  		idx := v_0.Args[1]
  8411  		ptr := v_0.Args[0]
  8412  		mem := v_1
  8413  		if !(off == 0 && sym == nil) {
  8414  			break
  8415  		}
  8416  		v.reset(OpARM64MOVBUloadidx)
  8417  		v.AddArg3(ptr, idx, mem)
  8418  		return true
  8419  	}
  8420  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8421  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8422  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8423  	for {
  8424  		off1 := auxIntToInt32(v.AuxInt)
  8425  		sym1 := auxToSym(v.Aux)
  8426  		if v_0.Op != OpARM64MOVDaddr {
  8427  			break
  8428  		}
  8429  		off2 := auxIntToInt32(v_0.AuxInt)
  8430  		sym2 := auxToSym(v_0.Aux)
  8431  		ptr := v_0.Args[0]
  8432  		mem := v_1
  8433  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8434  			break
  8435  		}
  8436  		v.reset(OpARM64MOVBUload)
  8437  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8438  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8439  		v.AddArg2(ptr, mem)
  8440  		return true
  8441  	}
  8442  	// match: (MOVBUload [off] {sym} ptr (MOVBstorezero [off2] {sym2} ptr2 _))
  8443  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  8444  	// result: (MOVDconst [0])
  8445  	for {
  8446  		off := auxIntToInt32(v.AuxInt)
  8447  		sym := auxToSym(v.Aux)
  8448  		ptr := v_0
  8449  		if v_1.Op != OpARM64MOVBstorezero {
  8450  			break
  8451  		}
  8452  		off2 := auxIntToInt32(v_1.AuxInt)
  8453  		sym2 := auxToSym(v_1.Aux)
  8454  		ptr2 := v_1.Args[0]
  8455  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  8456  			break
  8457  		}
  8458  		v.reset(OpARM64MOVDconst)
  8459  		v.AuxInt = int64ToAuxInt(0)
  8460  		return true
  8461  	}
  8462  	// match: (MOVBUload [off] {sym} (SB) _)
  8463  	// cond: symIsRO(sym)
  8464  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
  8465  	for {
  8466  		off := auxIntToInt32(v.AuxInt)
  8467  		sym := auxToSym(v.Aux)
  8468  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8469  			break
  8470  		}
  8471  		v.reset(OpARM64MOVDconst)
  8472  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
  8473  		return true
  8474  	}
  8475  	return false
  8476  }
  8477  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
  8478  	v_2 := v.Args[2]
  8479  	v_1 := v.Args[1]
  8480  	v_0 := v.Args[0]
  8481  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
  8482  	// cond: is32Bit(c)
  8483  	// result: (MOVBUload [int32(c)] ptr mem)
  8484  	for {
  8485  		ptr := v_0
  8486  		if v_1.Op != OpARM64MOVDconst {
  8487  			break
  8488  		}
  8489  		c := auxIntToInt64(v_1.AuxInt)
  8490  		mem := v_2
  8491  		if !(is32Bit(c)) {
  8492  			break
  8493  		}
  8494  		v.reset(OpARM64MOVBUload)
  8495  		v.AuxInt = int32ToAuxInt(int32(c))
  8496  		v.AddArg2(ptr, mem)
  8497  		return true
  8498  	}
  8499  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
  8500  	// cond: is32Bit(c)
  8501  	// result: (MOVBUload [int32(c)] ptr mem)
  8502  	for {
  8503  		if v_0.Op != OpARM64MOVDconst {
  8504  			break
  8505  		}
  8506  		c := auxIntToInt64(v_0.AuxInt)
  8507  		ptr := v_1
  8508  		mem := v_2
  8509  		if !(is32Bit(c)) {
  8510  			break
  8511  		}
  8512  		v.reset(OpARM64MOVBUload)
  8513  		v.AuxInt = int32ToAuxInt(int32(c))
  8514  		v.AddArg2(ptr, mem)
  8515  		return true
  8516  	}
  8517  	// match: (MOVBUloadidx ptr idx (MOVBstorezeroidx ptr2 idx2 _))
  8518  	// cond: (isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2))
  8519  	// result: (MOVDconst [0])
  8520  	for {
  8521  		ptr := v_0
  8522  		idx := v_1
  8523  		if v_2.Op != OpARM64MOVBstorezeroidx {
  8524  			break
  8525  		}
  8526  		idx2 := v_2.Args[1]
  8527  		ptr2 := v_2.Args[0]
  8528  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
  8529  			break
  8530  		}
  8531  		v.reset(OpARM64MOVDconst)
  8532  		v.AuxInt = int64ToAuxInt(0)
  8533  		return true
  8534  	}
  8535  	return false
  8536  }
  8537  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
  8538  	v_0 := v.Args[0]
  8539  	// match: (MOVBUreg (ANDconst [c] x))
  8540  	// result: (ANDconst [c&(1<<8-1)] x)
  8541  	for {
  8542  		if v_0.Op != OpARM64ANDconst {
  8543  			break
  8544  		}
  8545  		c := auxIntToInt64(v_0.AuxInt)
  8546  		x := v_0.Args[0]
  8547  		v.reset(OpARM64ANDconst)
  8548  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  8549  		v.AddArg(x)
  8550  		return true
  8551  	}
  8552  	// match: (MOVBUreg (MOVDconst [c]))
  8553  	// result: (MOVDconst [int64(uint8(c))])
  8554  	for {
  8555  		if v_0.Op != OpARM64MOVDconst {
  8556  			break
  8557  		}
  8558  		c := auxIntToInt64(v_0.AuxInt)
  8559  		v.reset(OpARM64MOVDconst)
  8560  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8561  		return true
  8562  	}
  8563  	// match: (MOVBUreg x)
  8564  	// cond: v.Type.Size() <= 1
  8565  	// result: x
  8566  	for {
  8567  		x := v_0
  8568  		if !(v.Type.Size() <= 1) {
  8569  			break
  8570  		}
  8571  		v.copyOf(x)
  8572  		return true
  8573  	}
  8574  	// match: (MOVBUreg (SLLconst [lc] x))
  8575  	// cond: lc >= 8
  8576  	// result: (MOVDconst [0])
  8577  	for {
  8578  		if v_0.Op != OpARM64SLLconst {
  8579  			break
  8580  		}
  8581  		lc := auxIntToInt64(v_0.AuxInt)
  8582  		if !(lc >= 8) {
  8583  			break
  8584  		}
  8585  		v.reset(OpARM64MOVDconst)
  8586  		v.AuxInt = int64ToAuxInt(0)
  8587  		return true
  8588  	}
  8589  	// match: (MOVBUreg (SLLconst [lc] x))
  8590  	// cond: lc < 8
  8591  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8592  	for {
  8593  		if v_0.Op != OpARM64SLLconst {
  8594  			break
  8595  		}
  8596  		lc := auxIntToInt64(v_0.AuxInt)
  8597  		x := v_0.Args[0]
  8598  		if !(lc < 8) {
  8599  			break
  8600  		}
  8601  		v.reset(OpARM64UBFIZ)
  8602  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8603  		v.AddArg(x)
  8604  		return true
  8605  	}
  8606  	// match: (MOVBUreg (SRLconst [rc] x))
  8607  	// cond: rc < 8
  8608  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
  8609  	for {
  8610  		if v_0.Op != OpARM64SRLconst {
  8611  			break
  8612  		}
  8613  		rc := auxIntToInt64(v_0.AuxInt)
  8614  		x := v_0.Args[0]
  8615  		if !(rc < 8) {
  8616  			break
  8617  		}
  8618  		v.reset(OpARM64UBFX)
  8619  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
  8620  		v.AddArg(x)
  8621  		return true
  8622  	}
  8623  	// match: (MOVBUreg (UBFX [bfc] x))
  8624  	// cond: bfc.width() <= 8
  8625  	// result: (UBFX [bfc] x)
  8626  	for {
  8627  		if v_0.Op != OpARM64UBFX {
  8628  			break
  8629  		}
  8630  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8631  		x := v_0.Args[0]
  8632  		if !(bfc.width() <= 8) {
  8633  			break
  8634  		}
  8635  		v.reset(OpARM64UBFX)
  8636  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8637  		v.AddArg(x)
  8638  		return true
  8639  	}
  8640  	return false
  8641  }
  8642  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
  8643  	v_1 := v.Args[1]
  8644  	v_0 := v.Args[0]
  8645  	b := v.Block
  8646  	config := b.Func.Config
  8647  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8648  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8649  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  8650  	for {
  8651  		off1 := auxIntToInt32(v.AuxInt)
  8652  		sym := auxToSym(v.Aux)
  8653  		if v_0.Op != OpARM64ADDconst {
  8654  			break
  8655  		}
  8656  		off2 := auxIntToInt64(v_0.AuxInt)
  8657  		ptr := v_0.Args[0]
  8658  		mem := v_1
  8659  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8660  			break
  8661  		}
  8662  		v.reset(OpARM64MOVBload)
  8663  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8664  		v.Aux = symToAux(sym)
  8665  		v.AddArg2(ptr, mem)
  8666  		return true
  8667  	}
  8668  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
  8669  	// cond: off == 0 && sym == nil
  8670  	// result: (MOVBloadidx ptr idx mem)
  8671  	for {
  8672  		off := auxIntToInt32(v.AuxInt)
  8673  		sym := auxToSym(v.Aux)
  8674  		if v_0.Op != OpARM64ADD {
  8675  			break
  8676  		}
  8677  		idx := v_0.Args[1]
  8678  		ptr := v_0.Args[0]
  8679  		mem := v_1
  8680  		if !(off == 0 && sym == nil) {
  8681  			break
  8682  		}
  8683  		v.reset(OpARM64MOVBloadidx)
  8684  		v.AddArg3(ptr, idx, mem)
  8685  		return true
  8686  	}
  8687  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8688  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8689  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8690  	for {
  8691  		off1 := auxIntToInt32(v.AuxInt)
  8692  		sym1 := auxToSym(v.Aux)
  8693  		if v_0.Op != OpARM64MOVDaddr {
  8694  			break
  8695  		}
  8696  		off2 := auxIntToInt32(v_0.AuxInt)
  8697  		sym2 := auxToSym(v_0.Aux)
  8698  		ptr := v_0.Args[0]
  8699  		mem := v_1
  8700  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8701  			break
  8702  		}
  8703  		v.reset(OpARM64MOVBload)
  8704  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8705  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8706  		v.AddArg2(ptr, mem)
  8707  		return true
  8708  	}
  8709  	// match: (MOVBload [off] {sym} ptr (MOVBstorezero [off2] {sym2} ptr2 _))
  8710  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  8711  	// result: (MOVDconst [0])
  8712  	for {
  8713  		off := auxIntToInt32(v.AuxInt)
  8714  		sym := auxToSym(v.Aux)
  8715  		ptr := v_0
  8716  		if v_1.Op != OpARM64MOVBstorezero {
  8717  			break
  8718  		}
  8719  		off2 := auxIntToInt32(v_1.AuxInt)
  8720  		sym2 := auxToSym(v_1.Aux)
  8721  		ptr2 := v_1.Args[0]
  8722  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  8723  			break
  8724  		}
  8725  		v.reset(OpARM64MOVDconst)
  8726  		v.AuxInt = int64ToAuxInt(0)
  8727  		return true
  8728  	}
  8729  	return false
  8730  }
  8731  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
  8732  	v_2 := v.Args[2]
  8733  	v_1 := v.Args[1]
  8734  	v_0 := v.Args[0]
  8735  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
  8736  	// cond: is32Bit(c)
  8737  	// result: (MOVBload [int32(c)] ptr mem)
  8738  	for {
  8739  		ptr := v_0
  8740  		if v_1.Op != OpARM64MOVDconst {
  8741  			break
  8742  		}
  8743  		c := auxIntToInt64(v_1.AuxInt)
  8744  		mem := v_2
  8745  		if !(is32Bit(c)) {
  8746  			break
  8747  		}
  8748  		v.reset(OpARM64MOVBload)
  8749  		v.AuxInt = int32ToAuxInt(int32(c))
  8750  		v.AddArg2(ptr, mem)
  8751  		return true
  8752  	}
  8753  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
  8754  	// cond: is32Bit(c)
  8755  	// result: (MOVBload [int32(c)] ptr mem)
  8756  	for {
  8757  		if v_0.Op != OpARM64MOVDconst {
  8758  			break
  8759  		}
  8760  		c := auxIntToInt64(v_0.AuxInt)
  8761  		ptr := v_1
  8762  		mem := v_2
  8763  		if !(is32Bit(c)) {
  8764  			break
  8765  		}
  8766  		v.reset(OpARM64MOVBload)
  8767  		v.AuxInt = int32ToAuxInt(int32(c))
  8768  		v.AddArg2(ptr, mem)
  8769  		return true
  8770  	}
  8771  	// match: (MOVBloadidx ptr idx (MOVBstorezeroidx ptr2 idx2 _))
  8772  	// cond: (isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2))
  8773  	// result: (MOVDconst [0])
  8774  	for {
  8775  		ptr := v_0
  8776  		idx := v_1
  8777  		if v_2.Op != OpARM64MOVBstorezeroidx {
  8778  			break
  8779  		}
  8780  		idx2 := v_2.Args[1]
  8781  		ptr2 := v_2.Args[0]
  8782  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
  8783  			break
  8784  		}
  8785  		v.reset(OpARM64MOVDconst)
  8786  		v.AuxInt = int64ToAuxInt(0)
  8787  		return true
  8788  	}
  8789  	return false
  8790  }
  8791  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
  8792  	v_0 := v.Args[0]
  8793  	// match: (MOVBreg (MOVDconst [c]))
  8794  	// result: (MOVDconst [int64(int8(c))])
  8795  	for {
  8796  		if v_0.Op != OpARM64MOVDconst {
  8797  			break
  8798  		}
  8799  		c := auxIntToInt64(v_0.AuxInt)
  8800  		v.reset(OpARM64MOVDconst)
  8801  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8802  		return true
  8803  	}
  8804  	// match: (MOVBreg x)
  8805  	// cond: v.Type.Size() <= 1
  8806  	// result: x
  8807  	for {
  8808  		x := v_0
  8809  		if !(v.Type.Size() <= 1) {
  8810  			break
  8811  		}
  8812  		v.copyOf(x)
  8813  		return true
  8814  	}
  8815  	// match: (MOVBreg <t> (ANDconst x [c]))
  8816  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
  8817  	// result: (ANDconst <t> x [c])
  8818  	for {
  8819  		t := v.Type
  8820  		if v_0.Op != OpARM64ANDconst {
  8821  			break
  8822  		}
  8823  		c := auxIntToInt64(v_0.AuxInt)
  8824  		x := v_0.Args[0]
  8825  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
  8826  			break
  8827  		}
  8828  		v.reset(OpARM64ANDconst)
  8829  		v.Type = t
  8830  		v.AuxInt = int64ToAuxInt(c)
  8831  		v.AddArg(x)
  8832  		return true
  8833  	}
  8834  	// match: (MOVBreg (SLLconst [lc] x))
  8835  	// cond: lc < 8
  8836  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8837  	for {
  8838  		if v_0.Op != OpARM64SLLconst {
  8839  			break
  8840  		}
  8841  		lc := auxIntToInt64(v_0.AuxInt)
  8842  		x := v_0.Args[0]
  8843  		if !(lc < 8) {
  8844  			break
  8845  		}
  8846  		v.reset(OpARM64SBFIZ)
  8847  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8848  		v.AddArg(x)
  8849  		return true
  8850  	}
  8851  	// match: (MOVBreg (SBFX [bfc] x))
  8852  	// cond: bfc.width() <= 8
  8853  	// result: (SBFX [bfc] x)
  8854  	for {
  8855  		if v_0.Op != OpARM64SBFX {
  8856  			break
  8857  		}
  8858  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8859  		x := v_0.Args[0]
  8860  		if !(bfc.width() <= 8) {
  8861  			break
  8862  		}
  8863  		v.reset(OpARM64SBFX)
  8864  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8865  		v.AddArg(x)
  8866  		return true
  8867  	}
  8868  	return false
  8869  }
  8870  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
  8871  	v_2 := v.Args[2]
  8872  	v_1 := v.Args[1]
  8873  	v_0 := v.Args[0]
  8874  	b := v.Block
  8875  	config := b.Func.Config
  8876  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8877  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8878  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  8879  	for {
  8880  		off1 := auxIntToInt32(v.AuxInt)
  8881  		sym := auxToSym(v.Aux)
  8882  		if v_0.Op != OpARM64ADDconst {
  8883  			break
  8884  		}
  8885  		off2 := auxIntToInt64(v_0.AuxInt)
  8886  		ptr := v_0.Args[0]
  8887  		val := v_1
  8888  		mem := v_2
  8889  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8890  			break
  8891  		}
  8892  		v.reset(OpARM64MOVBstore)
  8893  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8894  		v.Aux = symToAux(sym)
  8895  		v.AddArg3(ptr, val, mem)
  8896  		return true
  8897  	}
  8898  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
  8899  	// cond: off == 0 && sym == nil
  8900  	// result: (MOVBstoreidx ptr idx val mem)
  8901  	for {
  8902  		off := auxIntToInt32(v.AuxInt)
  8903  		sym := auxToSym(v.Aux)
  8904  		if v_0.Op != OpARM64ADD {
  8905  			break
  8906  		}
  8907  		idx := v_0.Args[1]
  8908  		ptr := v_0.Args[0]
  8909  		val := v_1
  8910  		mem := v_2
  8911  		if !(off == 0 && sym == nil) {
  8912  			break
  8913  		}
  8914  		v.reset(OpARM64MOVBstoreidx)
  8915  		v.AddArg4(ptr, idx, val, mem)
  8916  		return true
  8917  	}
  8918  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  8919  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8920  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8921  	for {
  8922  		off1 := auxIntToInt32(v.AuxInt)
  8923  		sym1 := auxToSym(v.Aux)
  8924  		if v_0.Op != OpARM64MOVDaddr {
  8925  			break
  8926  		}
  8927  		off2 := auxIntToInt32(v_0.AuxInt)
  8928  		sym2 := auxToSym(v_0.Aux)
  8929  		ptr := v_0.Args[0]
  8930  		val := v_1
  8931  		mem := v_2
  8932  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8933  			break
  8934  		}
  8935  		v.reset(OpARM64MOVBstore)
  8936  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8937  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8938  		v.AddArg3(ptr, val, mem)
  8939  		return true
  8940  	}
  8941  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [0]) mem)
  8942  	// result: (MOVBstorezero [off] {sym} ptr mem)
  8943  	for {
  8944  		off := auxIntToInt32(v.AuxInt)
  8945  		sym := auxToSym(v.Aux)
  8946  		ptr := v_0
  8947  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  8948  			break
  8949  		}
  8950  		mem := v_2
  8951  		v.reset(OpARM64MOVBstorezero)
  8952  		v.AuxInt = int32ToAuxInt(off)
  8953  		v.Aux = symToAux(sym)
  8954  		v.AddArg2(ptr, mem)
  8955  		return true
  8956  	}
  8957  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8958  	// result: (MOVBstore [off] {sym} ptr x mem)
  8959  	for {
  8960  		off := auxIntToInt32(v.AuxInt)
  8961  		sym := auxToSym(v.Aux)
  8962  		ptr := v_0
  8963  		if v_1.Op != OpARM64MOVBreg {
  8964  			break
  8965  		}
  8966  		x := v_1.Args[0]
  8967  		mem := v_2
  8968  		v.reset(OpARM64MOVBstore)
  8969  		v.AuxInt = int32ToAuxInt(off)
  8970  		v.Aux = symToAux(sym)
  8971  		v.AddArg3(ptr, x, mem)
  8972  		return true
  8973  	}
  8974  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  8975  	// result: (MOVBstore [off] {sym} ptr x mem)
  8976  	for {
  8977  		off := auxIntToInt32(v.AuxInt)
  8978  		sym := auxToSym(v.Aux)
  8979  		ptr := v_0
  8980  		if v_1.Op != OpARM64MOVBUreg {
  8981  			break
  8982  		}
  8983  		x := v_1.Args[0]
  8984  		mem := v_2
  8985  		v.reset(OpARM64MOVBstore)
  8986  		v.AuxInt = int32ToAuxInt(off)
  8987  		v.Aux = symToAux(sym)
  8988  		v.AddArg3(ptr, x, mem)
  8989  		return true
  8990  	}
  8991  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  8992  	// result: (MOVBstore [off] {sym} ptr x mem)
  8993  	for {
  8994  		off := auxIntToInt32(v.AuxInt)
  8995  		sym := auxToSym(v.Aux)
  8996  		ptr := v_0
  8997  		if v_1.Op != OpARM64MOVHreg {
  8998  			break
  8999  		}
  9000  		x := v_1.Args[0]
  9001  		mem := v_2
  9002  		v.reset(OpARM64MOVBstore)
  9003  		v.AuxInt = int32ToAuxInt(off)
  9004  		v.Aux = symToAux(sym)
  9005  		v.AddArg3(ptr, x, mem)
  9006  		return true
  9007  	}
  9008  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  9009  	// result: (MOVBstore [off] {sym} ptr x mem)
  9010  	for {
  9011  		off := auxIntToInt32(v.AuxInt)
  9012  		sym := auxToSym(v.Aux)
  9013  		ptr := v_0
  9014  		if v_1.Op != OpARM64MOVHUreg {
  9015  			break
  9016  		}
  9017  		x := v_1.Args[0]
  9018  		mem := v_2
  9019  		v.reset(OpARM64MOVBstore)
  9020  		v.AuxInt = int32ToAuxInt(off)
  9021  		v.Aux = symToAux(sym)
  9022  		v.AddArg3(ptr, x, mem)
  9023  		return true
  9024  	}
  9025  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  9026  	// result: (MOVBstore [off] {sym} ptr x mem)
  9027  	for {
  9028  		off := auxIntToInt32(v.AuxInt)
  9029  		sym := auxToSym(v.Aux)
  9030  		ptr := v_0
  9031  		if v_1.Op != OpARM64MOVWreg {
  9032  			break
  9033  		}
  9034  		x := v_1.Args[0]
  9035  		mem := v_2
  9036  		v.reset(OpARM64MOVBstore)
  9037  		v.AuxInt = int32ToAuxInt(off)
  9038  		v.Aux = symToAux(sym)
  9039  		v.AddArg3(ptr, x, mem)
  9040  		return true
  9041  	}
  9042  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  9043  	// result: (MOVBstore [off] {sym} ptr x mem)
  9044  	for {
  9045  		off := auxIntToInt32(v.AuxInt)
  9046  		sym := auxToSym(v.Aux)
  9047  		ptr := v_0
  9048  		if v_1.Op != OpARM64MOVWUreg {
  9049  			break
  9050  		}
  9051  		x := v_1.Args[0]
  9052  		mem := v_2
  9053  		v.reset(OpARM64MOVBstore)
  9054  		v.AuxInt = int32ToAuxInt(off)
  9055  		v.Aux = symToAux(sym)
  9056  		v.AddArg3(ptr, x, mem)
  9057  		return true
  9058  	}
  9059  	return false
  9060  }
  9061  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
  9062  	v_3 := v.Args[3]
  9063  	v_2 := v.Args[2]
  9064  	v_1 := v.Args[1]
  9065  	v_0 := v.Args[0]
  9066  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  9067  	// cond: is32Bit(c)
  9068  	// result: (MOVBstore [int32(c)] ptr val mem)
  9069  	for {
  9070  		ptr := v_0
  9071  		if v_1.Op != OpARM64MOVDconst {
  9072  			break
  9073  		}
  9074  		c := auxIntToInt64(v_1.AuxInt)
  9075  		val := v_2
  9076  		mem := v_3
  9077  		if !(is32Bit(c)) {
  9078  			break
  9079  		}
  9080  		v.reset(OpARM64MOVBstore)
  9081  		v.AuxInt = int32ToAuxInt(int32(c))
  9082  		v.AddArg3(ptr, val, mem)
  9083  		return true
  9084  	}
  9085  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
  9086  	// cond: is32Bit(c)
  9087  	// result: (MOVBstore [int32(c)] idx val mem)
  9088  	for {
  9089  		if v_0.Op != OpARM64MOVDconst {
  9090  			break
  9091  		}
  9092  		c := auxIntToInt64(v_0.AuxInt)
  9093  		idx := v_1
  9094  		val := v_2
  9095  		mem := v_3
  9096  		if !(is32Bit(c)) {
  9097  			break
  9098  		}
  9099  		v.reset(OpARM64MOVBstore)
  9100  		v.AuxInt = int32ToAuxInt(int32(c))
  9101  		v.AddArg3(idx, val, mem)
  9102  		return true
  9103  	}
  9104  	// match: (MOVBstoreidx ptr idx (MOVDconst [0]) mem)
  9105  	// result: (MOVBstorezeroidx ptr idx mem)
  9106  	for {
  9107  		ptr := v_0
  9108  		idx := v_1
  9109  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  9110  			break
  9111  		}
  9112  		mem := v_3
  9113  		v.reset(OpARM64MOVBstorezeroidx)
  9114  		v.AddArg3(ptr, idx, mem)
  9115  		return true
  9116  	}
  9117  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
  9118  	// result: (MOVBstoreidx ptr idx x mem)
  9119  	for {
  9120  		ptr := v_0
  9121  		idx := v_1
  9122  		if v_2.Op != OpARM64MOVBreg {
  9123  			break
  9124  		}
  9125  		x := v_2.Args[0]
  9126  		mem := v_3
  9127  		v.reset(OpARM64MOVBstoreidx)
  9128  		v.AddArg4(ptr, idx, x, mem)
  9129  		return true
  9130  	}
  9131  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
  9132  	// result: (MOVBstoreidx ptr idx x mem)
  9133  	for {
  9134  		ptr := v_0
  9135  		idx := v_1
  9136  		if v_2.Op != OpARM64MOVBUreg {
  9137  			break
  9138  		}
  9139  		x := v_2.Args[0]
  9140  		mem := v_3
  9141  		v.reset(OpARM64MOVBstoreidx)
  9142  		v.AddArg4(ptr, idx, x, mem)
  9143  		return true
  9144  	}
  9145  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
  9146  	// result: (MOVBstoreidx ptr idx x mem)
  9147  	for {
  9148  		ptr := v_0
  9149  		idx := v_1
  9150  		if v_2.Op != OpARM64MOVHreg {
  9151  			break
  9152  		}
  9153  		x := v_2.Args[0]
  9154  		mem := v_3
  9155  		v.reset(OpARM64MOVBstoreidx)
  9156  		v.AddArg4(ptr, idx, x, mem)
  9157  		return true
  9158  	}
  9159  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
  9160  	// result: (MOVBstoreidx ptr idx x mem)
  9161  	for {
  9162  		ptr := v_0
  9163  		idx := v_1
  9164  		if v_2.Op != OpARM64MOVHUreg {
  9165  			break
  9166  		}
  9167  		x := v_2.Args[0]
  9168  		mem := v_3
  9169  		v.reset(OpARM64MOVBstoreidx)
  9170  		v.AddArg4(ptr, idx, x, mem)
  9171  		return true
  9172  	}
  9173  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
  9174  	// result: (MOVBstoreidx ptr idx x mem)
  9175  	for {
  9176  		ptr := v_0
  9177  		idx := v_1
  9178  		if v_2.Op != OpARM64MOVWreg {
  9179  			break
  9180  		}
  9181  		x := v_2.Args[0]
  9182  		mem := v_3
  9183  		v.reset(OpARM64MOVBstoreidx)
  9184  		v.AddArg4(ptr, idx, x, mem)
  9185  		return true
  9186  	}
  9187  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
  9188  	// result: (MOVBstoreidx ptr idx x mem)
  9189  	for {
  9190  		ptr := v_0
  9191  		idx := v_1
  9192  		if v_2.Op != OpARM64MOVWUreg {
  9193  			break
  9194  		}
  9195  		x := v_2.Args[0]
  9196  		mem := v_3
  9197  		v.reset(OpARM64MOVBstoreidx)
  9198  		v.AddArg4(ptr, idx, x, mem)
  9199  		return true
  9200  	}
  9201  	return false
  9202  }
  9203  func rewriteValueARM64_OpARM64MOVBstorezero(v *Value) bool {
  9204  	v_1 := v.Args[1]
  9205  	v_0 := v.Args[0]
  9206  	b := v.Block
  9207  	config := b.Func.Config
  9208  	// match: (MOVBstorezero [off1] {sym} (ADDconst [off2] ptr) mem)
  9209  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9210  	// result: (MOVBstorezero [off1+int32(off2)] {sym} ptr mem)
  9211  	for {
  9212  		off1 := auxIntToInt32(v.AuxInt)
  9213  		sym := auxToSym(v.Aux)
  9214  		if v_0.Op != OpARM64ADDconst {
  9215  			break
  9216  		}
  9217  		off2 := auxIntToInt64(v_0.AuxInt)
  9218  		ptr := v_0.Args[0]
  9219  		mem := v_1
  9220  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9221  			break
  9222  		}
  9223  		v.reset(OpARM64MOVBstorezero)
  9224  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9225  		v.Aux = symToAux(sym)
  9226  		v.AddArg2(ptr, mem)
  9227  		return true
  9228  	}
  9229  	// match: (MOVBstorezero [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9230  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9231  	// result: (MOVBstorezero [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9232  	for {
  9233  		off1 := auxIntToInt32(v.AuxInt)
  9234  		sym1 := auxToSym(v.Aux)
  9235  		if v_0.Op != OpARM64MOVDaddr {
  9236  			break
  9237  		}
  9238  		off2 := auxIntToInt32(v_0.AuxInt)
  9239  		sym2 := auxToSym(v_0.Aux)
  9240  		ptr := v_0.Args[0]
  9241  		mem := v_1
  9242  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9243  			break
  9244  		}
  9245  		v.reset(OpARM64MOVBstorezero)
  9246  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9247  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9248  		v.AddArg2(ptr, mem)
  9249  		return true
  9250  	}
  9251  	// match: (MOVBstorezero [off] {sym} (ADD ptr idx) mem)
  9252  	// cond: off == 0 && sym == nil
  9253  	// result: (MOVBstorezeroidx ptr idx mem)
  9254  	for {
  9255  		off := auxIntToInt32(v.AuxInt)
  9256  		sym := auxToSym(v.Aux)
  9257  		if v_0.Op != OpARM64ADD {
  9258  			break
  9259  		}
  9260  		idx := v_0.Args[1]
  9261  		ptr := v_0.Args[0]
  9262  		mem := v_1
  9263  		if !(off == 0 && sym == nil) {
  9264  			break
  9265  		}
  9266  		v.reset(OpARM64MOVBstorezeroidx)
  9267  		v.AddArg3(ptr, idx, mem)
  9268  		return true
  9269  	}
  9270  	return false
  9271  }
  9272  func rewriteValueARM64_OpARM64MOVBstorezeroidx(v *Value) bool {
  9273  	v_2 := v.Args[2]
  9274  	v_1 := v.Args[1]
  9275  	v_0 := v.Args[0]
  9276  	// match: (MOVBstorezeroidx ptr (MOVDconst [c]) mem)
  9277  	// cond: is32Bit(c)
  9278  	// result: (MOVBstorezero [int32(c)] ptr mem)
  9279  	for {
  9280  		ptr := v_0
  9281  		if v_1.Op != OpARM64MOVDconst {
  9282  			break
  9283  		}
  9284  		c := auxIntToInt64(v_1.AuxInt)
  9285  		mem := v_2
  9286  		if !(is32Bit(c)) {
  9287  			break
  9288  		}
  9289  		v.reset(OpARM64MOVBstorezero)
  9290  		v.AuxInt = int32ToAuxInt(int32(c))
  9291  		v.AddArg2(ptr, mem)
  9292  		return true
  9293  	}
  9294  	// match: (MOVBstorezeroidx (MOVDconst [c]) idx mem)
  9295  	// cond: is32Bit(c)
  9296  	// result: (MOVBstorezero [int32(c)] idx mem)
  9297  	for {
  9298  		if v_0.Op != OpARM64MOVDconst {
  9299  			break
  9300  		}
  9301  		c := auxIntToInt64(v_0.AuxInt)
  9302  		idx := v_1
  9303  		mem := v_2
  9304  		if !(is32Bit(c)) {
  9305  			break
  9306  		}
  9307  		v.reset(OpARM64MOVBstorezero)
  9308  		v.AuxInt = int32ToAuxInt(int32(c))
  9309  		v.AddArg2(idx, mem)
  9310  		return true
  9311  	}
  9312  	return false
  9313  }
  9314  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
  9315  	v_1 := v.Args[1]
  9316  	v_0 := v.Args[0]
  9317  	b := v.Block
  9318  	config := b.Func.Config
  9319  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
  9320  	// result: (FMOVDfpgp val)
  9321  	for {
  9322  		off := auxIntToInt32(v.AuxInt)
  9323  		sym := auxToSym(v.Aux)
  9324  		ptr := v_0
  9325  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9326  			break
  9327  		}
  9328  		val := v_1.Args[1]
  9329  		if ptr != v_1.Args[0] {
  9330  			break
  9331  		}
  9332  		v.reset(OpARM64FMOVDfpgp)
  9333  		v.AddArg(val)
  9334  		return true
  9335  	}
  9336  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9337  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9338  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  9339  	for {
  9340  		off1 := auxIntToInt32(v.AuxInt)
  9341  		sym := auxToSym(v.Aux)
  9342  		if v_0.Op != OpARM64ADDconst {
  9343  			break
  9344  		}
  9345  		off2 := auxIntToInt64(v_0.AuxInt)
  9346  		ptr := v_0.Args[0]
  9347  		mem := v_1
  9348  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9349  			break
  9350  		}
  9351  		v.reset(OpARM64MOVDload)
  9352  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9353  		v.Aux = symToAux(sym)
  9354  		v.AddArg2(ptr, mem)
  9355  		return true
  9356  	}
  9357  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
  9358  	// cond: off == 0 && sym == nil
  9359  	// result: (MOVDloadidx ptr idx mem)
  9360  	for {
  9361  		off := auxIntToInt32(v.AuxInt)
  9362  		sym := auxToSym(v.Aux)
  9363  		if v_0.Op != OpARM64ADD {
  9364  			break
  9365  		}
  9366  		idx := v_0.Args[1]
  9367  		ptr := v_0.Args[0]
  9368  		mem := v_1
  9369  		if !(off == 0 && sym == nil) {
  9370  			break
  9371  		}
  9372  		v.reset(OpARM64MOVDloadidx)
  9373  		v.AddArg3(ptr, idx, mem)
  9374  		return true
  9375  	}
  9376  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  9377  	// cond: off == 0 && sym == nil
  9378  	// result: (MOVDloadidx8 ptr idx mem)
  9379  	for {
  9380  		off := auxIntToInt32(v.AuxInt)
  9381  		sym := auxToSym(v.Aux)
  9382  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9383  			break
  9384  		}
  9385  		idx := v_0.Args[1]
  9386  		ptr := v_0.Args[0]
  9387  		mem := v_1
  9388  		if !(off == 0 && sym == nil) {
  9389  			break
  9390  		}
  9391  		v.reset(OpARM64MOVDloadidx8)
  9392  		v.AddArg3(ptr, idx, mem)
  9393  		return true
  9394  	}
  9395  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9396  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9397  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9398  	for {
  9399  		off1 := auxIntToInt32(v.AuxInt)
  9400  		sym1 := auxToSym(v.Aux)
  9401  		if v_0.Op != OpARM64MOVDaddr {
  9402  			break
  9403  		}
  9404  		off2 := auxIntToInt32(v_0.AuxInt)
  9405  		sym2 := auxToSym(v_0.Aux)
  9406  		ptr := v_0.Args[0]
  9407  		mem := v_1
  9408  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9409  			break
  9410  		}
  9411  		v.reset(OpARM64MOVDload)
  9412  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9413  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9414  		v.AddArg2(ptr, mem)
  9415  		return true
  9416  	}
  9417  	// match: (MOVDload [off] {sym} ptr (MOVDstorezero [off2] {sym2} ptr2 _))
  9418  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  9419  	// result: (MOVDconst [0])
  9420  	for {
  9421  		off := auxIntToInt32(v.AuxInt)
  9422  		sym := auxToSym(v.Aux)
  9423  		ptr := v_0
  9424  		if v_1.Op != OpARM64MOVDstorezero {
  9425  			break
  9426  		}
  9427  		off2 := auxIntToInt32(v_1.AuxInt)
  9428  		sym2 := auxToSym(v_1.Aux)
  9429  		ptr2 := v_1.Args[0]
  9430  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  9431  			break
  9432  		}
  9433  		v.reset(OpARM64MOVDconst)
  9434  		v.AuxInt = int64ToAuxInt(0)
  9435  		return true
  9436  	}
  9437  	// match: (MOVDload [off] {sym} (SB) _)
  9438  	// cond: symIsRO(sym)
  9439  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9440  	for {
  9441  		off := auxIntToInt32(v.AuxInt)
  9442  		sym := auxToSym(v.Aux)
  9443  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9444  			break
  9445  		}
  9446  		v.reset(OpARM64MOVDconst)
  9447  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9448  		return true
  9449  	}
  9450  	return false
  9451  }
  9452  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
  9453  	v_2 := v.Args[2]
  9454  	v_1 := v.Args[1]
  9455  	v_0 := v.Args[0]
  9456  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  9457  	// cond: is32Bit(c)
  9458  	// result: (MOVDload [int32(c)] ptr mem)
  9459  	for {
  9460  		ptr := v_0
  9461  		if v_1.Op != OpARM64MOVDconst {
  9462  			break
  9463  		}
  9464  		c := auxIntToInt64(v_1.AuxInt)
  9465  		mem := v_2
  9466  		if !(is32Bit(c)) {
  9467  			break
  9468  		}
  9469  		v.reset(OpARM64MOVDload)
  9470  		v.AuxInt = int32ToAuxInt(int32(c))
  9471  		v.AddArg2(ptr, mem)
  9472  		return true
  9473  	}
  9474  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  9475  	// cond: is32Bit(c)
  9476  	// result: (MOVDload [int32(c)] ptr mem)
  9477  	for {
  9478  		if v_0.Op != OpARM64MOVDconst {
  9479  			break
  9480  		}
  9481  		c := auxIntToInt64(v_0.AuxInt)
  9482  		ptr := v_1
  9483  		mem := v_2
  9484  		if !(is32Bit(c)) {
  9485  			break
  9486  		}
  9487  		v.reset(OpARM64MOVDload)
  9488  		v.AuxInt = int32ToAuxInt(int32(c))
  9489  		v.AddArg2(ptr, mem)
  9490  		return true
  9491  	}
  9492  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
  9493  	// result: (MOVDloadidx8 ptr idx mem)
  9494  	for {
  9495  		ptr := v_0
  9496  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9497  			break
  9498  		}
  9499  		idx := v_1.Args[0]
  9500  		mem := v_2
  9501  		v.reset(OpARM64MOVDloadidx8)
  9502  		v.AddArg3(ptr, idx, mem)
  9503  		return true
  9504  	}
  9505  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
  9506  	// result: (MOVDloadidx8 ptr idx mem)
  9507  	for {
  9508  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9509  			break
  9510  		}
  9511  		idx := v_0.Args[0]
  9512  		ptr := v_1
  9513  		mem := v_2
  9514  		v.reset(OpARM64MOVDloadidx8)
  9515  		v.AddArg3(ptr, idx, mem)
  9516  		return true
  9517  	}
  9518  	// match: (MOVDloadidx ptr idx (MOVDstorezeroidx ptr2 idx2 _))
  9519  	// cond: (isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2))
  9520  	// result: (MOVDconst [0])
  9521  	for {
  9522  		ptr := v_0
  9523  		idx := v_1
  9524  		if v_2.Op != OpARM64MOVDstorezeroidx {
  9525  			break
  9526  		}
  9527  		idx2 := v_2.Args[1]
  9528  		ptr2 := v_2.Args[0]
  9529  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
  9530  			break
  9531  		}
  9532  		v.reset(OpARM64MOVDconst)
  9533  		v.AuxInt = int64ToAuxInt(0)
  9534  		return true
  9535  	}
  9536  	return false
  9537  }
  9538  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
  9539  	v_2 := v.Args[2]
  9540  	v_1 := v.Args[1]
  9541  	v_0 := v.Args[0]
  9542  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
  9543  	// cond: is32Bit(c<<3)
  9544  	// result: (MOVDload [int32(c)<<3] ptr mem)
  9545  	for {
  9546  		ptr := v_0
  9547  		if v_1.Op != OpARM64MOVDconst {
  9548  			break
  9549  		}
  9550  		c := auxIntToInt64(v_1.AuxInt)
  9551  		mem := v_2
  9552  		if !(is32Bit(c << 3)) {
  9553  			break
  9554  		}
  9555  		v.reset(OpARM64MOVDload)
  9556  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9557  		v.AddArg2(ptr, mem)
  9558  		return true
  9559  	}
  9560  	// match: (MOVDloadidx8 ptr idx (MOVDstorezeroidx8 ptr2 idx2 _))
  9561  	// cond: isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)
  9562  	// result: (MOVDconst [0])
  9563  	for {
  9564  		ptr := v_0
  9565  		idx := v_1
  9566  		if v_2.Op != OpARM64MOVDstorezeroidx8 {
  9567  			break
  9568  		}
  9569  		idx2 := v_2.Args[1]
  9570  		ptr2 := v_2.Args[0]
  9571  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
  9572  			break
  9573  		}
  9574  		v.reset(OpARM64MOVDconst)
  9575  		v.AuxInt = int64ToAuxInt(0)
  9576  		return true
  9577  	}
  9578  	return false
  9579  }
  9580  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
  9581  	v_0 := v.Args[0]
  9582  	// match: (MOVDnop (MOVDconst [c]))
  9583  	// result: (MOVDconst [c])
  9584  	for {
  9585  		if v_0.Op != OpARM64MOVDconst {
  9586  			break
  9587  		}
  9588  		c := auxIntToInt64(v_0.AuxInt)
  9589  		v.reset(OpARM64MOVDconst)
  9590  		v.AuxInt = int64ToAuxInt(c)
  9591  		return true
  9592  	}
  9593  	return false
  9594  }
  9595  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
  9596  	v_0 := v.Args[0]
  9597  	// match: (MOVDreg x)
  9598  	// cond: x.Uses == 1
  9599  	// result: (MOVDnop x)
  9600  	for {
  9601  		x := v_0
  9602  		if !(x.Uses == 1) {
  9603  			break
  9604  		}
  9605  		v.reset(OpARM64MOVDnop)
  9606  		v.AddArg(x)
  9607  		return true
  9608  	}
  9609  	// match: (MOVDreg (MOVDconst [c]))
  9610  	// result: (MOVDconst [c])
  9611  	for {
  9612  		if v_0.Op != OpARM64MOVDconst {
  9613  			break
  9614  		}
  9615  		c := auxIntToInt64(v_0.AuxInt)
  9616  		v.reset(OpARM64MOVDconst)
  9617  		v.AuxInt = int64ToAuxInt(c)
  9618  		return true
  9619  	}
  9620  	return false
  9621  }
  9622  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
  9623  	v_2 := v.Args[2]
  9624  	v_1 := v.Args[1]
  9625  	v_0 := v.Args[0]
  9626  	b := v.Block
  9627  	config := b.Func.Config
  9628  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
  9629  	// result: (FMOVDstore [off] {sym} ptr val mem)
  9630  	for {
  9631  		off := auxIntToInt32(v.AuxInt)
  9632  		sym := auxToSym(v.Aux)
  9633  		ptr := v_0
  9634  		if v_1.Op != OpARM64FMOVDfpgp {
  9635  			break
  9636  		}
  9637  		val := v_1.Args[0]
  9638  		mem := v_2
  9639  		v.reset(OpARM64FMOVDstore)
  9640  		v.AuxInt = int32ToAuxInt(off)
  9641  		v.Aux = symToAux(sym)
  9642  		v.AddArg3(ptr, val, mem)
  9643  		return true
  9644  	}
  9645  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9646  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9647  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  9648  	for {
  9649  		off1 := auxIntToInt32(v.AuxInt)
  9650  		sym := auxToSym(v.Aux)
  9651  		if v_0.Op != OpARM64ADDconst {
  9652  			break
  9653  		}
  9654  		off2 := auxIntToInt64(v_0.AuxInt)
  9655  		ptr := v_0.Args[0]
  9656  		val := v_1
  9657  		mem := v_2
  9658  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9659  			break
  9660  		}
  9661  		v.reset(OpARM64MOVDstore)
  9662  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9663  		v.Aux = symToAux(sym)
  9664  		v.AddArg3(ptr, val, mem)
  9665  		return true
  9666  	}
  9667  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
  9668  	// cond: off == 0 && sym == nil
  9669  	// result: (MOVDstoreidx ptr idx val mem)
  9670  	for {
  9671  		off := auxIntToInt32(v.AuxInt)
  9672  		sym := auxToSym(v.Aux)
  9673  		if v_0.Op != OpARM64ADD {
  9674  			break
  9675  		}
  9676  		idx := v_0.Args[1]
  9677  		ptr := v_0.Args[0]
  9678  		val := v_1
  9679  		mem := v_2
  9680  		if !(off == 0 && sym == nil) {
  9681  			break
  9682  		}
  9683  		v.reset(OpARM64MOVDstoreidx)
  9684  		v.AddArg4(ptr, idx, val, mem)
  9685  		return true
  9686  	}
  9687  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  9688  	// cond: off == 0 && sym == nil
  9689  	// result: (MOVDstoreidx8 ptr idx val mem)
  9690  	for {
  9691  		off := auxIntToInt32(v.AuxInt)
  9692  		sym := auxToSym(v.Aux)
  9693  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9694  			break
  9695  		}
  9696  		idx := v_0.Args[1]
  9697  		ptr := v_0.Args[0]
  9698  		val := v_1
  9699  		mem := v_2
  9700  		if !(off == 0 && sym == nil) {
  9701  			break
  9702  		}
  9703  		v.reset(OpARM64MOVDstoreidx8)
  9704  		v.AddArg4(ptr, idx, val, mem)
  9705  		return true
  9706  	}
  9707  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  9708  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9709  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9710  	for {
  9711  		off1 := auxIntToInt32(v.AuxInt)
  9712  		sym1 := auxToSym(v.Aux)
  9713  		if v_0.Op != OpARM64MOVDaddr {
  9714  			break
  9715  		}
  9716  		off2 := auxIntToInt32(v_0.AuxInt)
  9717  		sym2 := auxToSym(v_0.Aux)
  9718  		ptr := v_0.Args[0]
  9719  		val := v_1
  9720  		mem := v_2
  9721  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9722  			break
  9723  		}
  9724  		v.reset(OpARM64MOVDstore)
  9725  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9726  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9727  		v.AddArg3(ptr, val, mem)
  9728  		return true
  9729  	}
  9730  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [0]) mem)
  9731  	// result: (MOVDstorezero [off] {sym} ptr mem)
  9732  	for {
  9733  		off := auxIntToInt32(v.AuxInt)
  9734  		sym := auxToSym(v.Aux)
  9735  		ptr := v_0
  9736  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  9737  			break
  9738  		}
  9739  		mem := v_2
  9740  		v.reset(OpARM64MOVDstorezero)
  9741  		v.AuxInt = int32ToAuxInt(off)
  9742  		v.Aux = symToAux(sym)
  9743  		v.AddArg2(ptr, mem)
  9744  		return true
  9745  	}
  9746  	return false
  9747  }
  9748  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
  9749  	v_3 := v.Args[3]
  9750  	v_2 := v.Args[2]
  9751  	v_1 := v.Args[1]
  9752  	v_0 := v.Args[0]
  9753  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  9754  	// cond: is32Bit(c)
  9755  	// result: (MOVDstore [int32(c)] ptr val mem)
  9756  	for {
  9757  		ptr := v_0
  9758  		if v_1.Op != OpARM64MOVDconst {
  9759  			break
  9760  		}
  9761  		c := auxIntToInt64(v_1.AuxInt)
  9762  		val := v_2
  9763  		mem := v_3
  9764  		if !(is32Bit(c)) {
  9765  			break
  9766  		}
  9767  		v.reset(OpARM64MOVDstore)
  9768  		v.AuxInt = int32ToAuxInt(int32(c))
  9769  		v.AddArg3(ptr, val, mem)
  9770  		return true
  9771  	}
  9772  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
  9773  	// cond: is32Bit(c)
  9774  	// result: (MOVDstore [int32(c)] idx val mem)
  9775  	for {
  9776  		if v_0.Op != OpARM64MOVDconst {
  9777  			break
  9778  		}
  9779  		c := auxIntToInt64(v_0.AuxInt)
  9780  		idx := v_1
  9781  		val := v_2
  9782  		mem := v_3
  9783  		if !(is32Bit(c)) {
  9784  			break
  9785  		}
  9786  		v.reset(OpARM64MOVDstore)
  9787  		v.AuxInt = int32ToAuxInt(int32(c))
  9788  		v.AddArg3(idx, val, mem)
  9789  		return true
  9790  	}
  9791  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
  9792  	// result: (MOVDstoreidx8 ptr idx val mem)
  9793  	for {
  9794  		ptr := v_0
  9795  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9796  			break
  9797  		}
  9798  		idx := v_1.Args[0]
  9799  		val := v_2
  9800  		mem := v_3
  9801  		v.reset(OpARM64MOVDstoreidx8)
  9802  		v.AddArg4(ptr, idx, val, mem)
  9803  		return true
  9804  	}
  9805  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
  9806  	// result: (MOVDstoreidx8 ptr idx val mem)
  9807  	for {
  9808  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9809  			break
  9810  		}
  9811  		idx := v_0.Args[0]
  9812  		ptr := v_1
  9813  		val := v_2
  9814  		mem := v_3
  9815  		v.reset(OpARM64MOVDstoreidx8)
  9816  		v.AddArg4(ptr, idx, val, mem)
  9817  		return true
  9818  	}
  9819  	// match: (MOVDstoreidx ptr idx (MOVDconst [0]) mem)
  9820  	// result: (MOVDstorezeroidx ptr idx mem)
  9821  	for {
  9822  		ptr := v_0
  9823  		idx := v_1
  9824  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  9825  			break
  9826  		}
  9827  		mem := v_3
  9828  		v.reset(OpARM64MOVDstorezeroidx)
  9829  		v.AddArg3(ptr, idx, mem)
  9830  		return true
  9831  	}
  9832  	return false
  9833  }
  9834  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
  9835  	v_3 := v.Args[3]
  9836  	v_2 := v.Args[2]
  9837  	v_1 := v.Args[1]
  9838  	v_0 := v.Args[0]
  9839  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  9840  	// cond: is32Bit(c<<3)
  9841  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
  9842  	for {
  9843  		ptr := v_0
  9844  		if v_1.Op != OpARM64MOVDconst {
  9845  			break
  9846  		}
  9847  		c := auxIntToInt64(v_1.AuxInt)
  9848  		val := v_2
  9849  		mem := v_3
  9850  		if !(is32Bit(c << 3)) {
  9851  			break
  9852  		}
  9853  		v.reset(OpARM64MOVDstore)
  9854  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9855  		v.AddArg3(ptr, val, mem)
  9856  		return true
  9857  	}
  9858  	// match: (MOVDstoreidx8 ptr idx (MOVDconst [0]) mem)
  9859  	// result: (MOVDstorezeroidx8 ptr idx mem)
  9860  	for {
  9861  		ptr := v_0
  9862  		idx := v_1
  9863  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  9864  			break
  9865  		}
  9866  		mem := v_3
  9867  		v.reset(OpARM64MOVDstorezeroidx8)
  9868  		v.AddArg3(ptr, idx, mem)
  9869  		return true
  9870  	}
  9871  	return false
  9872  }
  9873  func rewriteValueARM64_OpARM64MOVDstorezero(v *Value) bool {
  9874  	v_1 := v.Args[1]
  9875  	v_0 := v.Args[0]
  9876  	b := v.Block
  9877  	config := b.Func.Config
  9878  	// match: (MOVDstorezero {s} [i] ptr x:(MOVDstorezero {s} [i+8] ptr mem))
  9879  	// cond: x.Uses == 1 && setPos(v, x.Pos) && clobber(x)
  9880  	// result: (MOVQstorezero {s} [i] ptr mem)
  9881  	for {
  9882  		i := auxIntToInt32(v.AuxInt)
  9883  		s := auxToSym(v.Aux)
  9884  		ptr := v_0
  9885  		x := v_1
  9886  		if x.Op != OpARM64MOVDstorezero || auxIntToInt32(x.AuxInt) != i+8 || auxToSym(x.Aux) != s {
  9887  			break
  9888  		}
  9889  		mem := x.Args[1]
  9890  		if ptr != x.Args[0] || !(x.Uses == 1 && setPos(v, x.Pos) && clobber(x)) {
  9891  			break
  9892  		}
  9893  		v.reset(OpARM64MOVQstorezero)
  9894  		v.AuxInt = int32ToAuxInt(i)
  9895  		v.Aux = symToAux(s)
  9896  		v.AddArg2(ptr, mem)
  9897  		return true
  9898  	}
  9899  	// match: (MOVDstorezero {s} [i] ptr x:(MOVDstorezero {s} [i-8] ptr mem))
  9900  	// cond: x.Uses == 1 && setPos(v, x.Pos) && clobber(x)
  9901  	// result: (MOVQstorezero {s} [i-8] ptr mem)
  9902  	for {
  9903  		i := auxIntToInt32(v.AuxInt)
  9904  		s := auxToSym(v.Aux)
  9905  		ptr := v_0
  9906  		x := v_1
  9907  		if x.Op != OpARM64MOVDstorezero || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
  9908  			break
  9909  		}
  9910  		mem := x.Args[1]
  9911  		if ptr != x.Args[0] || !(x.Uses == 1 && setPos(v, x.Pos) && clobber(x)) {
  9912  			break
  9913  		}
  9914  		v.reset(OpARM64MOVQstorezero)
  9915  		v.AuxInt = int32ToAuxInt(i - 8)
  9916  		v.Aux = symToAux(s)
  9917  		v.AddArg2(ptr, mem)
  9918  		return true
  9919  	}
  9920  	// match: (MOVDstorezero [off1] {sym} (ADDconst [off2] ptr) mem)
  9921  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9922  	// result: (MOVDstorezero [off1+int32(off2)] {sym} ptr mem)
  9923  	for {
  9924  		off1 := auxIntToInt32(v.AuxInt)
  9925  		sym := auxToSym(v.Aux)
  9926  		if v_0.Op != OpARM64ADDconst {
  9927  			break
  9928  		}
  9929  		off2 := auxIntToInt64(v_0.AuxInt)
  9930  		ptr := v_0.Args[0]
  9931  		mem := v_1
  9932  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9933  			break
  9934  		}
  9935  		v.reset(OpARM64MOVDstorezero)
  9936  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9937  		v.Aux = symToAux(sym)
  9938  		v.AddArg2(ptr, mem)
  9939  		return true
  9940  	}
  9941  	// match: (MOVDstorezero [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9942  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9943  	// result: (MOVDstorezero [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9944  	for {
  9945  		off1 := auxIntToInt32(v.AuxInt)
  9946  		sym1 := auxToSym(v.Aux)
  9947  		if v_0.Op != OpARM64MOVDaddr {
  9948  			break
  9949  		}
  9950  		off2 := auxIntToInt32(v_0.AuxInt)
  9951  		sym2 := auxToSym(v_0.Aux)
  9952  		ptr := v_0.Args[0]
  9953  		mem := v_1
  9954  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9955  			break
  9956  		}
  9957  		v.reset(OpARM64MOVDstorezero)
  9958  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9959  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9960  		v.AddArg2(ptr, mem)
  9961  		return true
  9962  	}
  9963  	// match: (MOVDstorezero [off] {sym} (ADD ptr idx) mem)
  9964  	// cond: off == 0 && sym == nil
  9965  	// result: (MOVDstorezeroidx ptr idx mem)
  9966  	for {
  9967  		off := auxIntToInt32(v.AuxInt)
  9968  		sym := auxToSym(v.Aux)
  9969  		if v_0.Op != OpARM64ADD {
  9970  			break
  9971  		}
  9972  		idx := v_0.Args[1]
  9973  		ptr := v_0.Args[0]
  9974  		mem := v_1
  9975  		if !(off == 0 && sym == nil) {
  9976  			break
  9977  		}
  9978  		v.reset(OpARM64MOVDstorezeroidx)
  9979  		v.AddArg3(ptr, idx, mem)
  9980  		return true
  9981  	}
  9982  	// match: (MOVDstorezero [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  9983  	// cond: off == 0 && sym == nil
  9984  	// result: (MOVDstorezeroidx8 ptr idx mem)
  9985  	for {
  9986  		off := auxIntToInt32(v.AuxInt)
  9987  		sym := auxToSym(v.Aux)
  9988  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9989  			break
  9990  		}
  9991  		idx := v_0.Args[1]
  9992  		ptr := v_0.Args[0]
  9993  		mem := v_1
  9994  		if !(off == 0 && sym == nil) {
  9995  			break
  9996  		}
  9997  		v.reset(OpARM64MOVDstorezeroidx8)
  9998  		v.AddArg3(ptr, idx, mem)
  9999  		return true
 10000  	}
 10001  	return false
 10002  }
 10003  func rewriteValueARM64_OpARM64MOVDstorezeroidx(v *Value) bool {
 10004  	v_2 := v.Args[2]
 10005  	v_1 := v.Args[1]
 10006  	v_0 := v.Args[0]
 10007  	// match: (MOVDstorezeroidx ptr (MOVDconst [c]) mem)
 10008  	// cond: is32Bit(c)
 10009  	// result: (MOVDstorezero [int32(c)] ptr mem)
 10010  	for {
 10011  		ptr := v_0
 10012  		if v_1.Op != OpARM64MOVDconst {
 10013  			break
 10014  		}
 10015  		c := auxIntToInt64(v_1.AuxInt)
 10016  		mem := v_2
 10017  		if !(is32Bit(c)) {
 10018  			break
 10019  		}
 10020  		v.reset(OpARM64MOVDstorezero)
 10021  		v.AuxInt = int32ToAuxInt(int32(c))
 10022  		v.AddArg2(ptr, mem)
 10023  		return true
 10024  	}
 10025  	// match: (MOVDstorezeroidx (MOVDconst [c]) idx mem)
 10026  	// cond: is32Bit(c)
 10027  	// result: (MOVDstorezero [int32(c)] idx mem)
 10028  	for {
 10029  		if v_0.Op != OpARM64MOVDconst {
 10030  			break
 10031  		}
 10032  		c := auxIntToInt64(v_0.AuxInt)
 10033  		idx := v_1
 10034  		mem := v_2
 10035  		if !(is32Bit(c)) {
 10036  			break
 10037  		}
 10038  		v.reset(OpARM64MOVDstorezero)
 10039  		v.AuxInt = int32ToAuxInt(int32(c))
 10040  		v.AddArg2(idx, mem)
 10041  		return true
 10042  	}
 10043  	// match: (MOVDstorezeroidx ptr (SLLconst [3] idx) mem)
 10044  	// result: (MOVDstorezeroidx8 ptr idx mem)
 10045  	for {
 10046  		ptr := v_0
 10047  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
 10048  			break
 10049  		}
 10050  		idx := v_1.Args[0]
 10051  		mem := v_2
 10052  		v.reset(OpARM64MOVDstorezeroidx8)
 10053  		v.AddArg3(ptr, idx, mem)
 10054  		return true
 10055  	}
 10056  	// match: (MOVDstorezeroidx (SLLconst [3] idx) ptr mem)
 10057  	// result: (MOVDstorezeroidx8 ptr idx mem)
 10058  	for {
 10059  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
 10060  			break
 10061  		}
 10062  		idx := v_0.Args[0]
 10063  		ptr := v_1
 10064  		mem := v_2
 10065  		v.reset(OpARM64MOVDstorezeroidx8)
 10066  		v.AddArg3(ptr, idx, mem)
 10067  		return true
 10068  	}
 10069  	return false
 10070  }
 10071  func rewriteValueARM64_OpARM64MOVDstorezeroidx8(v *Value) bool {
 10072  	v_2 := v.Args[2]
 10073  	v_1 := v.Args[1]
 10074  	v_0 := v.Args[0]
 10075  	// match: (MOVDstorezeroidx8 ptr (MOVDconst [c]) mem)
 10076  	// cond: is32Bit(c<<3)
 10077  	// result: (MOVDstorezero [int32(c<<3)] ptr mem)
 10078  	for {
 10079  		ptr := v_0
 10080  		if v_1.Op != OpARM64MOVDconst {
 10081  			break
 10082  		}
 10083  		c := auxIntToInt64(v_1.AuxInt)
 10084  		mem := v_2
 10085  		if !(is32Bit(c << 3)) {
 10086  			break
 10087  		}
 10088  		v.reset(OpARM64MOVDstorezero)
 10089  		v.AuxInt = int32ToAuxInt(int32(c << 3))
 10090  		v.AddArg2(ptr, mem)
 10091  		return true
 10092  	}
 10093  	return false
 10094  }
 10095  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
 10096  	v_1 := v.Args[1]
 10097  	v_0 := v.Args[0]
 10098  	b := v.Block
 10099  	config := b.Func.Config
 10100  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10101  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10102  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
 10103  	for {
 10104  		off1 := auxIntToInt32(v.AuxInt)
 10105  		sym := auxToSym(v.Aux)
 10106  		if v_0.Op != OpARM64ADDconst {
 10107  			break
 10108  		}
 10109  		off2 := auxIntToInt64(v_0.AuxInt)
 10110  		ptr := v_0.Args[0]
 10111  		mem := v_1
 10112  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10113  			break
 10114  		}
 10115  		v.reset(OpARM64MOVHUload)
 10116  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10117  		v.Aux = symToAux(sym)
 10118  		v.AddArg2(ptr, mem)
 10119  		return true
 10120  	}
 10121  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
 10122  	// cond: off == 0 && sym == nil
 10123  	// result: (MOVHUloadidx ptr idx mem)
 10124  	for {
 10125  		off := auxIntToInt32(v.AuxInt)
 10126  		sym := auxToSym(v.Aux)
 10127  		if v_0.Op != OpARM64ADD {
 10128  			break
 10129  		}
 10130  		idx := v_0.Args[1]
 10131  		ptr := v_0.Args[0]
 10132  		mem := v_1
 10133  		if !(off == 0 && sym == nil) {
 10134  			break
 10135  		}
 10136  		v.reset(OpARM64MOVHUloadidx)
 10137  		v.AddArg3(ptr, idx, mem)
 10138  		return true
 10139  	}
 10140  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 10141  	// cond: off == 0 && sym == nil
 10142  	// result: (MOVHUloadidx2 ptr idx mem)
 10143  	for {
 10144  		off := auxIntToInt32(v.AuxInt)
 10145  		sym := auxToSym(v.Aux)
 10146  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10147  			break
 10148  		}
 10149  		idx := v_0.Args[1]
 10150  		ptr := v_0.Args[0]
 10151  		mem := v_1
 10152  		if !(off == 0 && sym == nil) {
 10153  			break
 10154  		}
 10155  		v.reset(OpARM64MOVHUloadidx2)
 10156  		v.AddArg3(ptr, idx, mem)
 10157  		return true
 10158  	}
 10159  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10160  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10161  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10162  	for {
 10163  		off1 := auxIntToInt32(v.AuxInt)
 10164  		sym1 := auxToSym(v.Aux)
 10165  		if v_0.Op != OpARM64MOVDaddr {
 10166  			break
 10167  		}
 10168  		off2 := auxIntToInt32(v_0.AuxInt)
 10169  		sym2 := auxToSym(v_0.Aux)
 10170  		ptr := v_0.Args[0]
 10171  		mem := v_1
 10172  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10173  			break
 10174  		}
 10175  		v.reset(OpARM64MOVHUload)
 10176  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10177  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10178  		v.AddArg2(ptr, mem)
 10179  		return true
 10180  	}
 10181  	// match: (MOVHUload [off] {sym} ptr (MOVHstorezero [off2] {sym2} ptr2 _))
 10182  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
 10183  	// result: (MOVDconst [0])
 10184  	for {
 10185  		off := auxIntToInt32(v.AuxInt)
 10186  		sym := auxToSym(v.Aux)
 10187  		ptr := v_0
 10188  		if v_1.Op != OpARM64MOVHstorezero {
 10189  			break
 10190  		}
 10191  		off2 := auxIntToInt32(v_1.AuxInt)
 10192  		sym2 := auxToSym(v_1.Aux)
 10193  		ptr2 := v_1.Args[0]
 10194  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
 10195  			break
 10196  		}
 10197  		v.reset(OpARM64MOVDconst)
 10198  		v.AuxInt = int64ToAuxInt(0)
 10199  		return true
 10200  	}
 10201  	// match: (MOVHUload [off] {sym} (SB) _)
 10202  	// cond: symIsRO(sym)
 10203  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10204  	for {
 10205  		off := auxIntToInt32(v.AuxInt)
 10206  		sym := auxToSym(v.Aux)
 10207  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10208  			break
 10209  		}
 10210  		v.reset(OpARM64MOVDconst)
 10211  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10212  		return true
 10213  	}
 10214  	return false
 10215  }
 10216  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
 10217  	v_2 := v.Args[2]
 10218  	v_1 := v.Args[1]
 10219  	v_0 := v.Args[0]
 10220  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
 10221  	// cond: is32Bit(c)
 10222  	// result: (MOVHUload [int32(c)] ptr mem)
 10223  	for {
 10224  		ptr := v_0
 10225  		if v_1.Op != OpARM64MOVDconst {
 10226  			break
 10227  		}
 10228  		c := auxIntToInt64(v_1.AuxInt)
 10229  		mem := v_2
 10230  		if !(is32Bit(c)) {
 10231  			break
 10232  		}
 10233  		v.reset(OpARM64MOVHUload)
 10234  		v.AuxInt = int32ToAuxInt(int32(c))
 10235  		v.AddArg2(ptr, mem)
 10236  		return true
 10237  	}
 10238  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
 10239  	// cond: is32Bit(c)
 10240  	// result: (MOVHUload [int32(c)] ptr mem)
 10241  	for {
 10242  		if v_0.Op != OpARM64MOVDconst {
 10243  			break
 10244  		}
 10245  		c := auxIntToInt64(v_0.AuxInt)
 10246  		ptr := v_1
 10247  		mem := v_2
 10248  		if !(is32Bit(c)) {
 10249  			break
 10250  		}
 10251  		v.reset(OpARM64MOVHUload)
 10252  		v.AuxInt = int32ToAuxInt(int32(c))
 10253  		v.AddArg2(ptr, mem)
 10254  		return true
 10255  	}
 10256  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
 10257  	// result: (MOVHUloadidx2 ptr idx mem)
 10258  	for {
 10259  		ptr := v_0
 10260  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10261  			break
 10262  		}
 10263  		idx := v_1.Args[0]
 10264  		mem := v_2
 10265  		v.reset(OpARM64MOVHUloadidx2)
 10266  		v.AddArg3(ptr, idx, mem)
 10267  		return true
 10268  	}
 10269  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
 10270  	// result: (MOVHUloadidx2 ptr idx mem)
 10271  	for {
 10272  		ptr := v_0
 10273  		if v_1.Op != OpARM64ADD {
 10274  			break
 10275  		}
 10276  		idx := v_1.Args[1]
 10277  		if idx != v_1.Args[0] {
 10278  			break
 10279  		}
 10280  		mem := v_2
 10281  		v.reset(OpARM64MOVHUloadidx2)
 10282  		v.AddArg3(ptr, idx, mem)
 10283  		return true
 10284  	}
 10285  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
 10286  	// result: (MOVHUloadidx2 ptr idx mem)
 10287  	for {
 10288  		if v_0.Op != OpARM64ADD {
 10289  			break
 10290  		}
 10291  		idx := v_0.Args[1]
 10292  		if idx != v_0.Args[0] {
 10293  			break
 10294  		}
 10295  		ptr := v_1
 10296  		mem := v_2
 10297  		v.reset(OpARM64MOVHUloadidx2)
 10298  		v.AddArg3(ptr, idx, mem)
 10299  		return true
 10300  	}
 10301  	// match: (MOVHUloadidx ptr idx (MOVHstorezeroidx ptr2 idx2 _))
 10302  	// cond: (isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2))
 10303  	// result: (MOVDconst [0])
 10304  	for {
 10305  		ptr := v_0
 10306  		idx := v_1
 10307  		if v_2.Op != OpARM64MOVHstorezeroidx {
 10308  			break
 10309  		}
 10310  		idx2 := v_2.Args[1]
 10311  		ptr2 := v_2.Args[0]
 10312  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
 10313  			break
 10314  		}
 10315  		v.reset(OpARM64MOVDconst)
 10316  		v.AuxInt = int64ToAuxInt(0)
 10317  		return true
 10318  	}
 10319  	return false
 10320  }
 10321  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
 10322  	v_2 := v.Args[2]
 10323  	v_1 := v.Args[1]
 10324  	v_0 := v.Args[0]
 10325  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
 10326  	// cond: is32Bit(c<<1)
 10327  	// result: (MOVHUload [int32(c)<<1] ptr mem)
 10328  	for {
 10329  		ptr := v_0
 10330  		if v_1.Op != OpARM64MOVDconst {
 10331  			break
 10332  		}
 10333  		c := auxIntToInt64(v_1.AuxInt)
 10334  		mem := v_2
 10335  		if !(is32Bit(c << 1)) {
 10336  			break
 10337  		}
 10338  		v.reset(OpARM64MOVHUload)
 10339  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10340  		v.AddArg2(ptr, mem)
 10341  		return true
 10342  	}
 10343  	// match: (MOVHUloadidx2 ptr idx (MOVHstorezeroidx2 ptr2 idx2 _))
 10344  	// cond: isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)
 10345  	// result: (MOVDconst [0])
 10346  	for {
 10347  		ptr := v_0
 10348  		idx := v_1
 10349  		if v_2.Op != OpARM64MOVHstorezeroidx2 {
 10350  			break
 10351  		}
 10352  		idx2 := v_2.Args[1]
 10353  		ptr2 := v_2.Args[0]
 10354  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
 10355  			break
 10356  		}
 10357  		v.reset(OpARM64MOVDconst)
 10358  		v.AuxInt = int64ToAuxInt(0)
 10359  		return true
 10360  	}
 10361  	return false
 10362  }
 10363  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
 10364  	v_0 := v.Args[0]
 10365  	// match: (MOVHUreg (ANDconst [c] x))
 10366  	// result: (ANDconst [c&(1<<16-1)] x)
 10367  	for {
 10368  		if v_0.Op != OpARM64ANDconst {
 10369  			break
 10370  		}
 10371  		c := auxIntToInt64(v_0.AuxInt)
 10372  		x := v_0.Args[0]
 10373  		v.reset(OpARM64ANDconst)
 10374  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
 10375  		v.AddArg(x)
 10376  		return true
 10377  	}
 10378  	// match: (MOVHUreg (MOVDconst [c]))
 10379  	// result: (MOVDconst [int64(uint16(c))])
 10380  	for {
 10381  		if v_0.Op != OpARM64MOVDconst {
 10382  			break
 10383  		}
 10384  		c := auxIntToInt64(v_0.AuxInt)
 10385  		v.reset(OpARM64MOVDconst)
 10386  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
 10387  		return true
 10388  	}
 10389  	// match: (MOVHUreg x)
 10390  	// cond: v.Type.Size() <= 2
 10391  	// result: x
 10392  	for {
 10393  		x := v_0
 10394  		if !(v.Type.Size() <= 2) {
 10395  			break
 10396  		}
 10397  		v.copyOf(x)
 10398  		return true
 10399  	}
 10400  	// match: (MOVHUreg (SLLconst [lc] x))
 10401  	// cond: lc >= 16
 10402  	// result: (MOVDconst [0])
 10403  	for {
 10404  		if v_0.Op != OpARM64SLLconst {
 10405  			break
 10406  		}
 10407  		lc := auxIntToInt64(v_0.AuxInt)
 10408  		if !(lc >= 16) {
 10409  			break
 10410  		}
 10411  		v.reset(OpARM64MOVDconst)
 10412  		v.AuxInt = int64ToAuxInt(0)
 10413  		return true
 10414  	}
 10415  	// match: (MOVHUreg (SLLconst [lc] x))
 10416  	// cond: lc < 16
 10417  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
 10418  	for {
 10419  		if v_0.Op != OpARM64SLLconst {
 10420  			break
 10421  		}
 10422  		lc := auxIntToInt64(v_0.AuxInt)
 10423  		x := v_0.Args[0]
 10424  		if !(lc < 16) {
 10425  			break
 10426  		}
 10427  		v.reset(OpARM64UBFIZ)
 10428  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 10429  		v.AddArg(x)
 10430  		return true
 10431  	}
 10432  	// match: (MOVHUreg (SRLconst [rc] x))
 10433  	// cond: rc < 16
 10434  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
 10435  	for {
 10436  		if v_0.Op != OpARM64SRLconst {
 10437  			break
 10438  		}
 10439  		rc := auxIntToInt64(v_0.AuxInt)
 10440  		x := v_0.Args[0]
 10441  		if !(rc < 16) {
 10442  			break
 10443  		}
 10444  		v.reset(OpARM64UBFX)
 10445  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
 10446  		v.AddArg(x)
 10447  		return true
 10448  	}
 10449  	// match: (MOVHUreg (UBFX [bfc] x))
 10450  	// cond: bfc.width() <= 16
 10451  	// result: (UBFX [bfc] x)
 10452  	for {
 10453  		if v_0.Op != OpARM64UBFX {
 10454  			break
 10455  		}
 10456  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10457  		x := v_0.Args[0]
 10458  		if !(bfc.width() <= 16) {
 10459  			break
 10460  		}
 10461  		v.reset(OpARM64UBFX)
 10462  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10463  		v.AddArg(x)
 10464  		return true
 10465  	}
 10466  	return false
 10467  }
 10468  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
 10469  	v_1 := v.Args[1]
 10470  	v_0 := v.Args[0]
 10471  	b := v.Block
 10472  	config := b.Func.Config
 10473  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
 10474  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10475  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
 10476  	for {
 10477  		off1 := auxIntToInt32(v.AuxInt)
 10478  		sym := auxToSym(v.Aux)
 10479  		if v_0.Op != OpARM64ADDconst {
 10480  			break
 10481  		}
 10482  		off2 := auxIntToInt64(v_0.AuxInt)
 10483  		ptr := v_0.Args[0]
 10484  		mem := v_1
 10485  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10486  			break
 10487  		}
 10488  		v.reset(OpARM64MOVHload)
 10489  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10490  		v.Aux = symToAux(sym)
 10491  		v.AddArg2(ptr, mem)
 10492  		return true
 10493  	}
 10494  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
 10495  	// cond: off == 0 && sym == nil
 10496  	// result: (MOVHloadidx ptr idx mem)
 10497  	for {
 10498  		off := auxIntToInt32(v.AuxInt)
 10499  		sym := auxToSym(v.Aux)
 10500  		if v_0.Op != OpARM64ADD {
 10501  			break
 10502  		}
 10503  		idx := v_0.Args[1]
 10504  		ptr := v_0.Args[0]
 10505  		mem := v_1
 10506  		if !(off == 0 && sym == nil) {
 10507  			break
 10508  		}
 10509  		v.reset(OpARM64MOVHloadidx)
 10510  		v.AddArg3(ptr, idx, mem)
 10511  		return true
 10512  	}
 10513  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 10514  	// cond: off == 0 && sym == nil
 10515  	// result: (MOVHloadidx2 ptr idx mem)
 10516  	for {
 10517  		off := auxIntToInt32(v.AuxInt)
 10518  		sym := auxToSym(v.Aux)
 10519  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10520  			break
 10521  		}
 10522  		idx := v_0.Args[1]
 10523  		ptr := v_0.Args[0]
 10524  		mem := v_1
 10525  		if !(off == 0 && sym == nil) {
 10526  			break
 10527  		}
 10528  		v.reset(OpARM64MOVHloadidx2)
 10529  		v.AddArg3(ptr, idx, mem)
 10530  		return true
 10531  	}
 10532  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10533  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10534  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10535  	for {
 10536  		off1 := auxIntToInt32(v.AuxInt)
 10537  		sym1 := auxToSym(v.Aux)
 10538  		if v_0.Op != OpARM64MOVDaddr {
 10539  			break
 10540  		}
 10541  		off2 := auxIntToInt32(v_0.AuxInt)
 10542  		sym2 := auxToSym(v_0.Aux)
 10543  		ptr := v_0.Args[0]
 10544  		mem := v_1
 10545  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10546  			break
 10547  		}
 10548  		v.reset(OpARM64MOVHload)
 10549  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10550  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10551  		v.AddArg2(ptr, mem)
 10552  		return true
 10553  	}
 10554  	// match: (MOVHload [off] {sym} ptr (MOVHstorezero [off2] {sym2} ptr2 _))
 10555  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
 10556  	// result: (MOVDconst [0])
 10557  	for {
 10558  		off := auxIntToInt32(v.AuxInt)
 10559  		sym := auxToSym(v.Aux)
 10560  		ptr := v_0
 10561  		if v_1.Op != OpARM64MOVHstorezero {
 10562  			break
 10563  		}
 10564  		off2 := auxIntToInt32(v_1.AuxInt)
 10565  		sym2 := auxToSym(v_1.Aux)
 10566  		ptr2 := v_1.Args[0]
 10567  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
 10568  			break
 10569  		}
 10570  		v.reset(OpARM64MOVDconst)
 10571  		v.AuxInt = int64ToAuxInt(0)
 10572  		return true
 10573  	}
 10574  	return false
 10575  }
 10576  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
 10577  	v_2 := v.Args[2]
 10578  	v_1 := v.Args[1]
 10579  	v_0 := v.Args[0]
 10580  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 10581  	// cond: is32Bit(c)
 10582  	// result: (MOVHload [int32(c)] ptr mem)
 10583  	for {
 10584  		ptr := v_0
 10585  		if v_1.Op != OpARM64MOVDconst {
 10586  			break
 10587  		}
 10588  		c := auxIntToInt64(v_1.AuxInt)
 10589  		mem := v_2
 10590  		if !(is32Bit(c)) {
 10591  			break
 10592  		}
 10593  		v.reset(OpARM64MOVHload)
 10594  		v.AuxInt = int32ToAuxInt(int32(c))
 10595  		v.AddArg2(ptr, mem)
 10596  		return true
 10597  	}
 10598  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 10599  	// cond: is32Bit(c)
 10600  	// result: (MOVHload [int32(c)] ptr mem)
 10601  	for {
 10602  		if v_0.Op != OpARM64MOVDconst {
 10603  			break
 10604  		}
 10605  		c := auxIntToInt64(v_0.AuxInt)
 10606  		ptr := v_1
 10607  		mem := v_2
 10608  		if !(is32Bit(c)) {
 10609  			break
 10610  		}
 10611  		v.reset(OpARM64MOVHload)
 10612  		v.AuxInt = int32ToAuxInt(int32(c))
 10613  		v.AddArg2(ptr, mem)
 10614  		return true
 10615  	}
 10616  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 10617  	// result: (MOVHloadidx2 ptr idx mem)
 10618  	for {
 10619  		ptr := v_0
 10620  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10621  			break
 10622  		}
 10623  		idx := v_1.Args[0]
 10624  		mem := v_2
 10625  		v.reset(OpARM64MOVHloadidx2)
 10626  		v.AddArg3(ptr, idx, mem)
 10627  		return true
 10628  	}
 10629  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 10630  	// result: (MOVHloadidx2 ptr idx mem)
 10631  	for {
 10632  		ptr := v_0
 10633  		if v_1.Op != OpARM64ADD {
 10634  			break
 10635  		}
 10636  		idx := v_1.Args[1]
 10637  		if idx != v_1.Args[0] {
 10638  			break
 10639  		}
 10640  		mem := v_2
 10641  		v.reset(OpARM64MOVHloadidx2)
 10642  		v.AddArg3(ptr, idx, mem)
 10643  		return true
 10644  	}
 10645  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 10646  	// result: (MOVHloadidx2 ptr idx mem)
 10647  	for {
 10648  		if v_0.Op != OpARM64ADD {
 10649  			break
 10650  		}
 10651  		idx := v_0.Args[1]
 10652  		if idx != v_0.Args[0] {
 10653  			break
 10654  		}
 10655  		ptr := v_1
 10656  		mem := v_2
 10657  		v.reset(OpARM64MOVHloadidx2)
 10658  		v.AddArg3(ptr, idx, mem)
 10659  		return true
 10660  	}
 10661  	// match: (MOVHloadidx ptr idx (MOVHstorezeroidx ptr2 idx2 _))
 10662  	// cond: (isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2))
 10663  	// result: (MOVDconst [0])
 10664  	for {
 10665  		ptr := v_0
 10666  		idx := v_1
 10667  		if v_2.Op != OpARM64MOVHstorezeroidx {
 10668  			break
 10669  		}
 10670  		idx2 := v_2.Args[1]
 10671  		ptr2 := v_2.Args[0]
 10672  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
 10673  			break
 10674  		}
 10675  		v.reset(OpARM64MOVDconst)
 10676  		v.AuxInt = int64ToAuxInt(0)
 10677  		return true
 10678  	}
 10679  	return false
 10680  }
 10681  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 10682  	v_2 := v.Args[2]
 10683  	v_1 := v.Args[1]
 10684  	v_0 := v.Args[0]
 10685  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 10686  	// cond: is32Bit(c<<1)
 10687  	// result: (MOVHload [int32(c)<<1] ptr mem)
 10688  	for {
 10689  		ptr := v_0
 10690  		if v_1.Op != OpARM64MOVDconst {
 10691  			break
 10692  		}
 10693  		c := auxIntToInt64(v_1.AuxInt)
 10694  		mem := v_2
 10695  		if !(is32Bit(c << 1)) {
 10696  			break
 10697  		}
 10698  		v.reset(OpARM64MOVHload)
 10699  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10700  		v.AddArg2(ptr, mem)
 10701  		return true
 10702  	}
 10703  	// match: (MOVHloadidx2 ptr idx (MOVHstorezeroidx2 ptr2 idx2 _))
 10704  	// cond: isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)
 10705  	// result: (MOVDconst [0])
 10706  	for {
 10707  		ptr := v_0
 10708  		idx := v_1
 10709  		if v_2.Op != OpARM64MOVHstorezeroidx2 {
 10710  			break
 10711  		}
 10712  		idx2 := v_2.Args[1]
 10713  		ptr2 := v_2.Args[0]
 10714  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
 10715  			break
 10716  		}
 10717  		v.reset(OpARM64MOVDconst)
 10718  		v.AuxInt = int64ToAuxInt(0)
 10719  		return true
 10720  	}
 10721  	return false
 10722  }
 10723  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 10724  	v_0 := v.Args[0]
 10725  	// match: (MOVHreg (MOVDconst [c]))
 10726  	// result: (MOVDconst [int64(int16(c))])
 10727  	for {
 10728  		if v_0.Op != OpARM64MOVDconst {
 10729  			break
 10730  		}
 10731  		c := auxIntToInt64(v_0.AuxInt)
 10732  		v.reset(OpARM64MOVDconst)
 10733  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 10734  		return true
 10735  	}
 10736  	// match: (MOVHreg x)
 10737  	// cond: v.Type.Size() <= 2
 10738  	// result: x
 10739  	for {
 10740  		x := v_0
 10741  		if !(v.Type.Size() <= 2) {
 10742  			break
 10743  		}
 10744  		v.copyOf(x)
 10745  		return true
 10746  	}
 10747  	// match: (MOVHreg <t> (ANDconst x [c]))
 10748  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 10749  	// result: (ANDconst <t> x [c])
 10750  	for {
 10751  		t := v.Type
 10752  		if v_0.Op != OpARM64ANDconst {
 10753  			break
 10754  		}
 10755  		c := auxIntToInt64(v_0.AuxInt)
 10756  		x := v_0.Args[0]
 10757  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 10758  			break
 10759  		}
 10760  		v.reset(OpARM64ANDconst)
 10761  		v.Type = t
 10762  		v.AuxInt = int64ToAuxInt(c)
 10763  		v.AddArg(x)
 10764  		return true
 10765  	}
 10766  	// match: (MOVHreg (SLLconst [lc] x))
 10767  	// cond: lc < 16
 10768  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 10769  	for {
 10770  		if v_0.Op != OpARM64SLLconst {
 10771  			break
 10772  		}
 10773  		lc := auxIntToInt64(v_0.AuxInt)
 10774  		x := v_0.Args[0]
 10775  		if !(lc < 16) {
 10776  			break
 10777  		}
 10778  		v.reset(OpARM64SBFIZ)
 10779  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 10780  		v.AddArg(x)
 10781  		return true
 10782  	}
 10783  	// match: (MOVHreg (SBFX [bfc] x))
 10784  	// cond: bfc.width() <= 16
 10785  	// result: (SBFX [bfc] x)
 10786  	for {
 10787  		if v_0.Op != OpARM64SBFX {
 10788  			break
 10789  		}
 10790  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10791  		x := v_0.Args[0]
 10792  		if !(bfc.width() <= 16) {
 10793  			break
 10794  		}
 10795  		v.reset(OpARM64SBFX)
 10796  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10797  		v.AddArg(x)
 10798  		return true
 10799  	}
 10800  	return false
 10801  }
 10802  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 10803  	v_2 := v.Args[2]
 10804  	v_1 := v.Args[1]
 10805  	v_0 := v.Args[0]
 10806  	b := v.Block
 10807  	config := b.Func.Config
 10808  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10809  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10810  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 10811  	for {
 10812  		off1 := auxIntToInt32(v.AuxInt)
 10813  		sym := auxToSym(v.Aux)
 10814  		if v_0.Op != OpARM64ADDconst {
 10815  			break
 10816  		}
 10817  		off2 := auxIntToInt64(v_0.AuxInt)
 10818  		ptr := v_0.Args[0]
 10819  		val := v_1
 10820  		mem := v_2
 10821  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10822  			break
 10823  		}
 10824  		v.reset(OpARM64MOVHstore)
 10825  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10826  		v.Aux = symToAux(sym)
 10827  		v.AddArg3(ptr, val, mem)
 10828  		return true
 10829  	}
 10830  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 10831  	// cond: off == 0 && sym == nil
 10832  	// result: (MOVHstoreidx ptr idx val mem)
 10833  	for {
 10834  		off := auxIntToInt32(v.AuxInt)
 10835  		sym := auxToSym(v.Aux)
 10836  		if v_0.Op != OpARM64ADD {
 10837  			break
 10838  		}
 10839  		idx := v_0.Args[1]
 10840  		ptr := v_0.Args[0]
 10841  		val := v_1
 10842  		mem := v_2
 10843  		if !(off == 0 && sym == nil) {
 10844  			break
 10845  		}
 10846  		v.reset(OpARM64MOVHstoreidx)
 10847  		v.AddArg4(ptr, idx, val, mem)
 10848  		return true
 10849  	}
 10850  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 10851  	// cond: off == 0 && sym == nil
 10852  	// result: (MOVHstoreidx2 ptr idx val mem)
 10853  	for {
 10854  		off := auxIntToInt32(v.AuxInt)
 10855  		sym := auxToSym(v.Aux)
 10856  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10857  			break
 10858  		}
 10859  		idx := v_0.Args[1]
 10860  		ptr := v_0.Args[0]
 10861  		val := v_1
 10862  		mem := v_2
 10863  		if !(off == 0 && sym == nil) {
 10864  			break
 10865  		}
 10866  		v.reset(OpARM64MOVHstoreidx2)
 10867  		v.AddArg4(ptr, idx, val, mem)
 10868  		return true
 10869  	}
 10870  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10871  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10872  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10873  	for {
 10874  		off1 := auxIntToInt32(v.AuxInt)
 10875  		sym1 := auxToSym(v.Aux)
 10876  		if v_0.Op != OpARM64MOVDaddr {
 10877  			break
 10878  		}
 10879  		off2 := auxIntToInt32(v_0.AuxInt)
 10880  		sym2 := auxToSym(v_0.Aux)
 10881  		ptr := v_0.Args[0]
 10882  		val := v_1
 10883  		mem := v_2
 10884  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10885  			break
 10886  		}
 10887  		v.reset(OpARM64MOVHstore)
 10888  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10889  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10890  		v.AddArg3(ptr, val, mem)
 10891  		return true
 10892  	}
 10893  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [0]) mem)
 10894  	// result: (MOVHstorezero [off] {sym} ptr mem)
 10895  	for {
 10896  		off := auxIntToInt32(v.AuxInt)
 10897  		sym := auxToSym(v.Aux)
 10898  		ptr := v_0
 10899  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 10900  			break
 10901  		}
 10902  		mem := v_2
 10903  		v.reset(OpARM64MOVHstorezero)
 10904  		v.AuxInt = int32ToAuxInt(off)
 10905  		v.Aux = symToAux(sym)
 10906  		v.AddArg2(ptr, mem)
 10907  		return true
 10908  	}
 10909  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10910  	// result: (MOVHstore [off] {sym} ptr x mem)
 10911  	for {
 10912  		off := auxIntToInt32(v.AuxInt)
 10913  		sym := auxToSym(v.Aux)
 10914  		ptr := v_0
 10915  		if v_1.Op != OpARM64MOVHreg {
 10916  			break
 10917  		}
 10918  		x := v_1.Args[0]
 10919  		mem := v_2
 10920  		v.reset(OpARM64MOVHstore)
 10921  		v.AuxInt = int32ToAuxInt(off)
 10922  		v.Aux = symToAux(sym)
 10923  		v.AddArg3(ptr, x, mem)
 10924  		return true
 10925  	}
 10926  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 10927  	// result: (MOVHstore [off] {sym} ptr x mem)
 10928  	for {
 10929  		off := auxIntToInt32(v.AuxInt)
 10930  		sym := auxToSym(v.Aux)
 10931  		ptr := v_0
 10932  		if v_1.Op != OpARM64MOVHUreg {
 10933  			break
 10934  		}
 10935  		x := v_1.Args[0]
 10936  		mem := v_2
 10937  		v.reset(OpARM64MOVHstore)
 10938  		v.AuxInt = int32ToAuxInt(off)
 10939  		v.Aux = symToAux(sym)
 10940  		v.AddArg3(ptr, x, mem)
 10941  		return true
 10942  	}
 10943  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 10944  	// result: (MOVHstore [off] {sym} ptr x mem)
 10945  	for {
 10946  		off := auxIntToInt32(v.AuxInt)
 10947  		sym := auxToSym(v.Aux)
 10948  		ptr := v_0
 10949  		if v_1.Op != OpARM64MOVWreg {
 10950  			break
 10951  		}
 10952  		x := v_1.Args[0]
 10953  		mem := v_2
 10954  		v.reset(OpARM64MOVHstore)
 10955  		v.AuxInt = int32ToAuxInt(off)
 10956  		v.Aux = symToAux(sym)
 10957  		v.AddArg3(ptr, x, mem)
 10958  		return true
 10959  	}
 10960  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 10961  	// result: (MOVHstore [off] {sym} ptr x mem)
 10962  	for {
 10963  		off := auxIntToInt32(v.AuxInt)
 10964  		sym := auxToSym(v.Aux)
 10965  		ptr := v_0
 10966  		if v_1.Op != OpARM64MOVWUreg {
 10967  			break
 10968  		}
 10969  		x := v_1.Args[0]
 10970  		mem := v_2
 10971  		v.reset(OpARM64MOVHstore)
 10972  		v.AuxInt = int32ToAuxInt(off)
 10973  		v.Aux = symToAux(sym)
 10974  		v.AddArg3(ptr, x, mem)
 10975  		return true
 10976  	}
 10977  	return false
 10978  }
 10979  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 10980  	v_3 := v.Args[3]
 10981  	v_2 := v.Args[2]
 10982  	v_1 := v.Args[1]
 10983  	v_0 := v.Args[0]
 10984  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10985  	// cond: is32Bit(c)
 10986  	// result: (MOVHstore [int32(c)] ptr val mem)
 10987  	for {
 10988  		ptr := v_0
 10989  		if v_1.Op != OpARM64MOVDconst {
 10990  			break
 10991  		}
 10992  		c := auxIntToInt64(v_1.AuxInt)
 10993  		val := v_2
 10994  		mem := v_3
 10995  		if !(is32Bit(c)) {
 10996  			break
 10997  		}
 10998  		v.reset(OpARM64MOVHstore)
 10999  		v.AuxInt = int32ToAuxInt(int32(c))
 11000  		v.AddArg3(ptr, val, mem)
 11001  		return true
 11002  	}
 11003  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 11004  	// cond: is32Bit(c)
 11005  	// result: (MOVHstore [int32(c)] idx val mem)
 11006  	for {
 11007  		if v_0.Op != OpARM64MOVDconst {
 11008  			break
 11009  		}
 11010  		c := auxIntToInt64(v_0.AuxInt)
 11011  		idx := v_1
 11012  		val := v_2
 11013  		mem := v_3
 11014  		if !(is32Bit(c)) {
 11015  			break
 11016  		}
 11017  		v.reset(OpARM64MOVHstore)
 11018  		v.AuxInt = int32ToAuxInt(int32(c))
 11019  		v.AddArg3(idx, val, mem)
 11020  		return true
 11021  	}
 11022  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 11023  	// result: (MOVHstoreidx2 ptr idx val mem)
 11024  	for {
 11025  		ptr := v_0
 11026  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11027  			break
 11028  		}
 11029  		idx := v_1.Args[0]
 11030  		val := v_2
 11031  		mem := v_3
 11032  		v.reset(OpARM64MOVHstoreidx2)
 11033  		v.AddArg4(ptr, idx, val, mem)
 11034  		return true
 11035  	}
 11036  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 11037  	// result: (MOVHstoreidx2 ptr idx val mem)
 11038  	for {
 11039  		ptr := v_0
 11040  		if v_1.Op != OpARM64ADD {
 11041  			break
 11042  		}
 11043  		idx := v_1.Args[1]
 11044  		if idx != v_1.Args[0] {
 11045  			break
 11046  		}
 11047  		val := v_2
 11048  		mem := v_3
 11049  		v.reset(OpARM64MOVHstoreidx2)
 11050  		v.AddArg4(ptr, idx, val, mem)
 11051  		return true
 11052  	}
 11053  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 11054  	// result: (MOVHstoreidx2 ptr idx val mem)
 11055  	for {
 11056  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 11057  			break
 11058  		}
 11059  		idx := v_0.Args[0]
 11060  		ptr := v_1
 11061  		val := v_2
 11062  		mem := v_3
 11063  		v.reset(OpARM64MOVHstoreidx2)
 11064  		v.AddArg4(ptr, idx, val, mem)
 11065  		return true
 11066  	}
 11067  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 11068  	// result: (MOVHstoreidx2 ptr idx val mem)
 11069  	for {
 11070  		if v_0.Op != OpARM64ADD {
 11071  			break
 11072  		}
 11073  		idx := v_0.Args[1]
 11074  		if idx != v_0.Args[0] {
 11075  			break
 11076  		}
 11077  		ptr := v_1
 11078  		val := v_2
 11079  		mem := v_3
 11080  		v.reset(OpARM64MOVHstoreidx2)
 11081  		v.AddArg4(ptr, idx, val, mem)
 11082  		return true
 11083  	}
 11084  	// match: (MOVHstoreidx ptr idx (MOVDconst [0]) mem)
 11085  	// result: (MOVHstorezeroidx ptr idx mem)
 11086  	for {
 11087  		ptr := v_0
 11088  		idx := v_1
 11089  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 11090  			break
 11091  		}
 11092  		mem := v_3
 11093  		v.reset(OpARM64MOVHstorezeroidx)
 11094  		v.AddArg3(ptr, idx, mem)
 11095  		return true
 11096  	}
 11097  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 11098  	// result: (MOVHstoreidx ptr idx x mem)
 11099  	for {
 11100  		ptr := v_0
 11101  		idx := v_1
 11102  		if v_2.Op != OpARM64MOVHreg {
 11103  			break
 11104  		}
 11105  		x := v_2.Args[0]
 11106  		mem := v_3
 11107  		v.reset(OpARM64MOVHstoreidx)
 11108  		v.AddArg4(ptr, idx, x, mem)
 11109  		return true
 11110  	}
 11111  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 11112  	// result: (MOVHstoreidx ptr idx x mem)
 11113  	for {
 11114  		ptr := v_0
 11115  		idx := v_1
 11116  		if v_2.Op != OpARM64MOVHUreg {
 11117  			break
 11118  		}
 11119  		x := v_2.Args[0]
 11120  		mem := v_3
 11121  		v.reset(OpARM64MOVHstoreidx)
 11122  		v.AddArg4(ptr, idx, x, mem)
 11123  		return true
 11124  	}
 11125  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 11126  	// result: (MOVHstoreidx ptr idx x mem)
 11127  	for {
 11128  		ptr := v_0
 11129  		idx := v_1
 11130  		if v_2.Op != OpARM64MOVWreg {
 11131  			break
 11132  		}
 11133  		x := v_2.Args[0]
 11134  		mem := v_3
 11135  		v.reset(OpARM64MOVHstoreidx)
 11136  		v.AddArg4(ptr, idx, x, mem)
 11137  		return true
 11138  	}
 11139  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 11140  	// result: (MOVHstoreidx ptr idx x mem)
 11141  	for {
 11142  		ptr := v_0
 11143  		idx := v_1
 11144  		if v_2.Op != OpARM64MOVWUreg {
 11145  			break
 11146  		}
 11147  		x := v_2.Args[0]
 11148  		mem := v_3
 11149  		v.reset(OpARM64MOVHstoreidx)
 11150  		v.AddArg4(ptr, idx, x, mem)
 11151  		return true
 11152  	}
 11153  	return false
 11154  }
 11155  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 11156  	v_3 := v.Args[3]
 11157  	v_2 := v.Args[2]
 11158  	v_1 := v.Args[1]
 11159  	v_0 := v.Args[0]
 11160  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 11161  	// cond: is32Bit(c<<1)
 11162  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 11163  	for {
 11164  		ptr := v_0
 11165  		if v_1.Op != OpARM64MOVDconst {
 11166  			break
 11167  		}
 11168  		c := auxIntToInt64(v_1.AuxInt)
 11169  		val := v_2
 11170  		mem := v_3
 11171  		if !(is32Bit(c << 1)) {
 11172  			break
 11173  		}
 11174  		v.reset(OpARM64MOVHstore)
 11175  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 11176  		v.AddArg3(ptr, val, mem)
 11177  		return true
 11178  	}
 11179  	// match: (MOVHstoreidx2 ptr idx (MOVDconst [0]) mem)
 11180  	// result: (MOVHstorezeroidx2 ptr idx mem)
 11181  	for {
 11182  		ptr := v_0
 11183  		idx := v_1
 11184  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 11185  			break
 11186  		}
 11187  		mem := v_3
 11188  		v.reset(OpARM64MOVHstorezeroidx2)
 11189  		v.AddArg3(ptr, idx, mem)
 11190  		return true
 11191  	}
 11192  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 11193  	// result: (MOVHstoreidx2 ptr idx x mem)
 11194  	for {
 11195  		ptr := v_0
 11196  		idx := v_1
 11197  		if v_2.Op != OpARM64MOVHreg {
 11198  			break
 11199  		}
 11200  		x := v_2.Args[0]
 11201  		mem := v_3
 11202  		v.reset(OpARM64MOVHstoreidx2)
 11203  		v.AddArg4(ptr, idx, x, mem)
 11204  		return true
 11205  	}
 11206  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 11207  	// result: (MOVHstoreidx2 ptr idx x mem)
 11208  	for {
 11209  		ptr := v_0
 11210  		idx := v_1
 11211  		if v_2.Op != OpARM64MOVHUreg {
 11212  			break
 11213  		}
 11214  		x := v_2.Args[0]
 11215  		mem := v_3
 11216  		v.reset(OpARM64MOVHstoreidx2)
 11217  		v.AddArg4(ptr, idx, x, mem)
 11218  		return true
 11219  	}
 11220  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 11221  	// result: (MOVHstoreidx2 ptr idx x mem)
 11222  	for {
 11223  		ptr := v_0
 11224  		idx := v_1
 11225  		if v_2.Op != OpARM64MOVWreg {
 11226  			break
 11227  		}
 11228  		x := v_2.Args[0]
 11229  		mem := v_3
 11230  		v.reset(OpARM64MOVHstoreidx2)
 11231  		v.AddArg4(ptr, idx, x, mem)
 11232  		return true
 11233  	}
 11234  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 11235  	// result: (MOVHstoreidx2 ptr idx x mem)
 11236  	for {
 11237  		ptr := v_0
 11238  		idx := v_1
 11239  		if v_2.Op != OpARM64MOVWUreg {
 11240  			break
 11241  		}
 11242  		x := v_2.Args[0]
 11243  		mem := v_3
 11244  		v.reset(OpARM64MOVHstoreidx2)
 11245  		v.AddArg4(ptr, idx, x, mem)
 11246  		return true
 11247  	}
 11248  	return false
 11249  }
 11250  func rewriteValueARM64_OpARM64MOVHstorezero(v *Value) bool {
 11251  	v_1 := v.Args[1]
 11252  	v_0 := v.Args[0]
 11253  	b := v.Block
 11254  	config := b.Func.Config
 11255  	// match: (MOVHstorezero [off1] {sym} (ADDconst [off2] ptr) mem)
 11256  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11257  	// result: (MOVHstorezero [off1+int32(off2)] {sym} ptr mem)
 11258  	for {
 11259  		off1 := auxIntToInt32(v.AuxInt)
 11260  		sym := auxToSym(v.Aux)
 11261  		if v_0.Op != OpARM64ADDconst {
 11262  			break
 11263  		}
 11264  		off2 := auxIntToInt64(v_0.AuxInt)
 11265  		ptr := v_0.Args[0]
 11266  		mem := v_1
 11267  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11268  			break
 11269  		}
 11270  		v.reset(OpARM64MOVHstorezero)
 11271  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11272  		v.Aux = symToAux(sym)
 11273  		v.AddArg2(ptr, mem)
 11274  		return true
 11275  	}
 11276  	// match: (MOVHstorezero [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11277  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11278  	// result: (MOVHstorezero [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11279  	for {
 11280  		off1 := auxIntToInt32(v.AuxInt)
 11281  		sym1 := auxToSym(v.Aux)
 11282  		if v_0.Op != OpARM64MOVDaddr {
 11283  			break
 11284  		}
 11285  		off2 := auxIntToInt32(v_0.AuxInt)
 11286  		sym2 := auxToSym(v_0.Aux)
 11287  		ptr := v_0.Args[0]
 11288  		mem := v_1
 11289  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11290  			break
 11291  		}
 11292  		v.reset(OpARM64MOVHstorezero)
 11293  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11294  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11295  		v.AddArg2(ptr, mem)
 11296  		return true
 11297  	}
 11298  	// match: (MOVHstorezero [off] {sym} (ADD ptr idx) mem)
 11299  	// cond: off == 0 && sym == nil
 11300  	// result: (MOVHstorezeroidx ptr idx mem)
 11301  	for {
 11302  		off := auxIntToInt32(v.AuxInt)
 11303  		sym := auxToSym(v.Aux)
 11304  		if v_0.Op != OpARM64ADD {
 11305  			break
 11306  		}
 11307  		idx := v_0.Args[1]
 11308  		ptr := v_0.Args[0]
 11309  		mem := v_1
 11310  		if !(off == 0 && sym == nil) {
 11311  			break
 11312  		}
 11313  		v.reset(OpARM64MOVHstorezeroidx)
 11314  		v.AddArg3(ptr, idx, mem)
 11315  		return true
 11316  	}
 11317  	// match: (MOVHstorezero [off] {sym} (ADDshiftLL [1] ptr idx) mem)
 11318  	// cond: off == 0 && sym == nil
 11319  	// result: (MOVHstorezeroidx2 ptr idx mem)
 11320  	for {
 11321  		off := auxIntToInt32(v.AuxInt)
 11322  		sym := auxToSym(v.Aux)
 11323  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 11324  			break
 11325  		}
 11326  		idx := v_0.Args[1]
 11327  		ptr := v_0.Args[0]
 11328  		mem := v_1
 11329  		if !(off == 0 && sym == nil) {
 11330  			break
 11331  		}
 11332  		v.reset(OpARM64MOVHstorezeroidx2)
 11333  		v.AddArg3(ptr, idx, mem)
 11334  		return true
 11335  	}
 11336  	return false
 11337  }
 11338  func rewriteValueARM64_OpARM64MOVHstorezeroidx(v *Value) bool {
 11339  	v_2 := v.Args[2]
 11340  	v_1 := v.Args[1]
 11341  	v_0 := v.Args[0]
 11342  	// match: (MOVHstorezeroidx ptr (MOVDconst [c]) mem)
 11343  	// cond: is32Bit(c)
 11344  	// result: (MOVHstorezero [int32(c)] ptr mem)
 11345  	for {
 11346  		ptr := v_0
 11347  		if v_1.Op != OpARM64MOVDconst {
 11348  			break
 11349  		}
 11350  		c := auxIntToInt64(v_1.AuxInt)
 11351  		mem := v_2
 11352  		if !(is32Bit(c)) {
 11353  			break
 11354  		}
 11355  		v.reset(OpARM64MOVHstorezero)
 11356  		v.AuxInt = int32ToAuxInt(int32(c))
 11357  		v.AddArg2(ptr, mem)
 11358  		return true
 11359  	}
 11360  	// match: (MOVHstorezeroidx (MOVDconst [c]) idx mem)
 11361  	// cond: is32Bit(c)
 11362  	// result: (MOVHstorezero [int32(c)] idx mem)
 11363  	for {
 11364  		if v_0.Op != OpARM64MOVDconst {
 11365  			break
 11366  		}
 11367  		c := auxIntToInt64(v_0.AuxInt)
 11368  		idx := v_1
 11369  		mem := v_2
 11370  		if !(is32Bit(c)) {
 11371  			break
 11372  		}
 11373  		v.reset(OpARM64MOVHstorezero)
 11374  		v.AuxInt = int32ToAuxInt(int32(c))
 11375  		v.AddArg2(idx, mem)
 11376  		return true
 11377  	}
 11378  	// match: (MOVHstorezeroidx ptr (SLLconst [1] idx) mem)
 11379  	// result: (MOVHstorezeroidx2 ptr idx mem)
 11380  	for {
 11381  		ptr := v_0
 11382  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11383  			break
 11384  		}
 11385  		idx := v_1.Args[0]
 11386  		mem := v_2
 11387  		v.reset(OpARM64MOVHstorezeroidx2)
 11388  		v.AddArg3(ptr, idx, mem)
 11389  		return true
 11390  	}
 11391  	// match: (MOVHstorezeroidx ptr (ADD idx idx) mem)
 11392  	// result: (MOVHstorezeroidx2 ptr idx mem)
 11393  	for {
 11394  		ptr := v_0
 11395  		if v_1.Op != OpARM64ADD {
 11396  			break
 11397  		}
 11398  		idx := v_1.Args[1]
 11399  		if idx != v_1.Args[0] {
 11400  			break
 11401  		}
 11402  		mem := v_2
 11403  		v.reset(OpARM64MOVHstorezeroidx2)
 11404  		v.AddArg3(ptr, idx, mem)
 11405  		return true
 11406  	}
 11407  	// match: (MOVHstorezeroidx (SLLconst [1] idx) ptr mem)
 11408  	// result: (MOVHstorezeroidx2 ptr idx mem)
 11409  	for {
 11410  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 11411  			break
 11412  		}
 11413  		idx := v_0.Args[0]
 11414  		ptr := v_1
 11415  		mem := v_2
 11416  		v.reset(OpARM64MOVHstorezeroidx2)
 11417  		v.AddArg3(ptr, idx, mem)
 11418  		return true
 11419  	}
 11420  	// match: (MOVHstorezeroidx (ADD idx idx) ptr mem)
 11421  	// result: (MOVHstorezeroidx2 ptr idx mem)
 11422  	for {
 11423  		if v_0.Op != OpARM64ADD {
 11424  			break
 11425  		}
 11426  		idx := v_0.Args[1]
 11427  		if idx != v_0.Args[0] {
 11428  			break
 11429  		}
 11430  		ptr := v_1
 11431  		mem := v_2
 11432  		v.reset(OpARM64MOVHstorezeroidx2)
 11433  		v.AddArg3(ptr, idx, mem)
 11434  		return true
 11435  	}
 11436  	return false
 11437  }
 11438  func rewriteValueARM64_OpARM64MOVHstorezeroidx2(v *Value) bool {
 11439  	v_2 := v.Args[2]
 11440  	v_1 := v.Args[1]
 11441  	v_0 := v.Args[0]
 11442  	// match: (MOVHstorezeroidx2 ptr (MOVDconst [c]) mem)
 11443  	// cond: is32Bit(c<<1)
 11444  	// result: (MOVHstorezero [int32(c<<1)] ptr mem)
 11445  	for {
 11446  		ptr := v_0
 11447  		if v_1.Op != OpARM64MOVDconst {
 11448  			break
 11449  		}
 11450  		c := auxIntToInt64(v_1.AuxInt)
 11451  		mem := v_2
 11452  		if !(is32Bit(c << 1)) {
 11453  			break
 11454  		}
 11455  		v.reset(OpARM64MOVHstorezero)
 11456  		v.AuxInt = int32ToAuxInt(int32(c << 1))
 11457  		v.AddArg2(ptr, mem)
 11458  		return true
 11459  	}
 11460  	return false
 11461  }
 11462  func rewriteValueARM64_OpARM64MOVQstorezero(v *Value) bool {
 11463  	v_1 := v.Args[1]
 11464  	v_0 := v.Args[0]
 11465  	b := v.Block
 11466  	config := b.Func.Config
 11467  	// match: (MOVQstorezero [off1] {sym} (ADDconst [off2] ptr) mem)
 11468  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11469  	// result: (MOVQstorezero [off1+int32(off2)] {sym} ptr mem)
 11470  	for {
 11471  		off1 := auxIntToInt32(v.AuxInt)
 11472  		sym := auxToSym(v.Aux)
 11473  		if v_0.Op != OpARM64ADDconst {
 11474  			break
 11475  		}
 11476  		off2 := auxIntToInt64(v_0.AuxInt)
 11477  		ptr := v_0.Args[0]
 11478  		mem := v_1
 11479  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11480  			break
 11481  		}
 11482  		v.reset(OpARM64MOVQstorezero)
 11483  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11484  		v.Aux = symToAux(sym)
 11485  		v.AddArg2(ptr, mem)
 11486  		return true
 11487  	}
 11488  	// match: (MOVQstorezero [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11489  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11490  	// result: (MOVQstorezero [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11491  	for {
 11492  		off1 := auxIntToInt32(v.AuxInt)
 11493  		sym1 := auxToSym(v.Aux)
 11494  		if v_0.Op != OpARM64MOVDaddr {
 11495  			break
 11496  		}
 11497  		off2 := auxIntToInt32(v_0.AuxInt)
 11498  		sym2 := auxToSym(v_0.Aux)
 11499  		ptr := v_0.Args[0]
 11500  		mem := v_1
 11501  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11502  			break
 11503  		}
 11504  		v.reset(OpARM64MOVQstorezero)
 11505  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11506  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11507  		v.AddArg2(ptr, mem)
 11508  		return true
 11509  	}
 11510  	return false
 11511  }
 11512  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 11513  	v_1 := v.Args[1]
 11514  	v_0 := v.Args[0]
 11515  	b := v.Block
 11516  	config := b.Func.Config
 11517  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 11518  	// result: (FMOVSfpgp val)
 11519  	for {
 11520  		off := auxIntToInt32(v.AuxInt)
 11521  		sym := auxToSym(v.Aux)
 11522  		ptr := v_0
 11523  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 11524  			break
 11525  		}
 11526  		val := v_1.Args[1]
 11527  		if ptr != v_1.Args[0] {
 11528  			break
 11529  		}
 11530  		v.reset(OpARM64FMOVSfpgp)
 11531  		v.AddArg(val)
 11532  		return true
 11533  	}
 11534  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 11535  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11536  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 11537  	for {
 11538  		off1 := auxIntToInt32(v.AuxInt)
 11539  		sym := auxToSym(v.Aux)
 11540  		if v_0.Op != OpARM64ADDconst {
 11541  			break
 11542  		}
 11543  		off2 := auxIntToInt64(v_0.AuxInt)
 11544  		ptr := v_0.Args[0]
 11545  		mem := v_1
 11546  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11547  			break
 11548  		}
 11549  		v.reset(OpARM64MOVWUload)
 11550  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11551  		v.Aux = symToAux(sym)
 11552  		v.AddArg2(ptr, mem)
 11553  		return true
 11554  	}
 11555  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 11556  	// cond: off == 0 && sym == nil
 11557  	// result: (MOVWUloadidx ptr idx mem)
 11558  	for {
 11559  		off := auxIntToInt32(v.AuxInt)
 11560  		sym := auxToSym(v.Aux)
 11561  		if v_0.Op != OpARM64ADD {
 11562  			break
 11563  		}
 11564  		idx := v_0.Args[1]
 11565  		ptr := v_0.Args[0]
 11566  		mem := v_1
 11567  		if !(off == 0 && sym == nil) {
 11568  			break
 11569  		}
 11570  		v.reset(OpARM64MOVWUloadidx)
 11571  		v.AddArg3(ptr, idx, mem)
 11572  		return true
 11573  	}
 11574  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 11575  	// cond: off == 0 && sym == nil
 11576  	// result: (MOVWUloadidx4 ptr idx mem)
 11577  	for {
 11578  		off := auxIntToInt32(v.AuxInt)
 11579  		sym := auxToSym(v.Aux)
 11580  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11581  			break
 11582  		}
 11583  		idx := v_0.Args[1]
 11584  		ptr := v_0.Args[0]
 11585  		mem := v_1
 11586  		if !(off == 0 && sym == nil) {
 11587  			break
 11588  		}
 11589  		v.reset(OpARM64MOVWUloadidx4)
 11590  		v.AddArg3(ptr, idx, mem)
 11591  		return true
 11592  	}
 11593  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11594  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11595  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11596  	for {
 11597  		off1 := auxIntToInt32(v.AuxInt)
 11598  		sym1 := auxToSym(v.Aux)
 11599  		if v_0.Op != OpARM64MOVDaddr {
 11600  			break
 11601  		}
 11602  		off2 := auxIntToInt32(v_0.AuxInt)
 11603  		sym2 := auxToSym(v_0.Aux)
 11604  		ptr := v_0.Args[0]
 11605  		mem := v_1
 11606  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11607  			break
 11608  		}
 11609  		v.reset(OpARM64MOVWUload)
 11610  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11611  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11612  		v.AddArg2(ptr, mem)
 11613  		return true
 11614  	}
 11615  	// match: (MOVWUload [off] {sym} ptr (MOVWstorezero [off2] {sym2} ptr2 _))
 11616  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
 11617  	// result: (MOVDconst [0])
 11618  	for {
 11619  		off := auxIntToInt32(v.AuxInt)
 11620  		sym := auxToSym(v.Aux)
 11621  		ptr := v_0
 11622  		if v_1.Op != OpARM64MOVWstorezero {
 11623  			break
 11624  		}
 11625  		off2 := auxIntToInt32(v_1.AuxInt)
 11626  		sym2 := auxToSym(v_1.Aux)
 11627  		ptr2 := v_1.Args[0]
 11628  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
 11629  			break
 11630  		}
 11631  		v.reset(OpARM64MOVDconst)
 11632  		v.AuxInt = int64ToAuxInt(0)
 11633  		return true
 11634  	}
 11635  	// match: (MOVWUload [off] {sym} (SB) _)
 11636  	// cond: symIsRO(sym)
 11637  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 11638  	for {
 11639  		off := auxIntToInt32(v.AuxInt)
 11640  		sym := auxToSym(v.Aux)
 11641  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 11642  			break
 11643  		}
 11644  		v.reset(OpARM64MOVDconst)
 11645  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 11646  		return true
 11647  	}
 11648  	return false
 11649  }
 11650  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 11651  	v_2 := v.Args[2]
 11652  	v_1 := v.Args[1]
 11653  	v_0 := v.Args[0]
 11654  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 11655  	// cond: is32Bit(c)
 11656  	// result: (MOVWUload [int32(c)] ptr mem)
 11657  	for {
 11658  		ptr := v_0
 11659  		if v_1.Op != OpARM64MOVDconst {
 11660  			break
 11661  		}
 11662  		c := auxIntToInt64(v_1.AuxInt)
 11663  		mem := v_2
 11664  		if !(is32Bit(c)) {
 11665  			break
 11666  		}
 11667  		v.reset(OpARM64MOVWUload)
 11668  		v.AuxInt = int32ToAuxInt(int32(c))
 11669  		v.AddArg2(ptr, mem)
 11670  		return true
 11671  	}
 11672  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 11673  	// cond: is32Bit(c)
 11674  	// result: (MOVWUload [int32(c)] ptr mem)
 11675  	for {
 11676  		if v_0.Op != OpARM64MOVDconst {
 11677  			break
 11678  		}
 11679  		c := auxIntToInt64(v_0.AuxInt)
 11680  		ptr := v_1
 11681  		mem := v_2
 11682  		if !(is32Bit(c)) {
 11683  			break
 11684  		}
 11685  		v.reset(OpARM64MOVWUload)
 11686  		v.AuxInt = int32ToAuxInt(int32(c))
 11687  		v.AddArg2(ptr, mem)
 11688  		return true
 11689  	}
 11690  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 11691  	// result: (MOVWUloadidx4 ptr idx mem)
 11692  	for {
 11693  		ptr := v_0
 11694  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11695  			break
 11696  		}
 11697  		idx := v_1.Args[0]
 11698  		mem := v_2
 11699  		v.reset(OpARM64MOVWUloadidx4)
 11700  		v.AddArg3(ptr, idx, mem)
 11701  		return true
 11702  	}
 11703  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 11704  	// result: (MOVWUloadidx4 ptr idx mem)
 11705  	for {
 11706  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11707  			break
 11708  		}
 11709  		idx := v_0.Args[0]
 11710  		ptr := v_1
 11711  		mem := v_2
 11712  		v.reset(OpARM64MOVWUloadidx4)
 11713  		v.AddArg3(ptr, idx, mem)
 11714  		return true
 11715  	}
 11716  	// match: (MOVWUloadidx ptr idx (MOVWstorezeroidx ptr2 idx2 _))
 11717  	// cond: (isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2))
 11718  	// result: (MOVDconst [0])
 11719  	for {
 11720  		ptr := v_0
 11721  		idx := v_1
 11722  		if v_2.Op != OpARM64MOVWstorezeroidx {
 11723  			break
 11724  		}
 11725  		idx2 := v_2.Args[1]
 11726  		ptr2 := v_2.Args[0]
 11727  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
 11728  			break
 11729  		}
 11730  		v.reset(OpARM64MOVDconst)
 11731  		v.AuxInt = int64ToAuxInt(0)
 11732  		return true
 11733  	}
 11734  	return false
 11735  }
 11736  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 11737  	v_2 := v.Args[2]
 11738  	v_1 := v.Args[1]
 11739  	v_0 := v.Args[0]
 11740  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 11741  	// cond: is32Bit(c<<2)
 11742  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 11743  	for {
 11744  		ptr := v_0
 11745  		if v_1.Op != OpARM64MOVDconst {
 11746  			break
 11747  		}
 11748  		c := auxIntToInt64(v_1.AuxInt)
 11749  		mem := v_2
 11750  		if !(is32Bit(c << 2)) {
 11751  			break
 11752  		}
 11753  		v.reset(OpARM64MOVWUload)
 11754  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11755  		v.AddArg2(ptr, mem)
 11756  		return true
 11757  	}
 11758  	// match: (MOVWUloadidx4 ptr idx (MOVWstorezeroidx4 ptr2 idx2 _))
 11759  	// cond: isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)
 11760  	// result: (MOVDconst [0])
 11761  	for {
 11762  		ptr := v_0
 11763  		idx := v_1
 11764  		if v_2.Op != OpARM64MOVWstorezeroidx4 {
 11765  			break
 11766  		}
 11767  		idx2 := v_2.Args[1]
 11768  		ptr2 := v_2.Args[0]
 11769  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
 11770  			break
 11771  		}
 11772  		v.reset(OpARM64MOVDconst)
 11773  		v.AuxInt = int64ToAuxInt(0)
 11774  		return true
 11775  	}
 11776  	return false
 11777  }
 11778  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 11779  	v_0 := v.Args[0]
 11780  	// match: (MOVWUreg (ANDconst [c] x))
 11781  	// result: (ANDconst [c&(1<<32-1)] x)
 11782  	for {
 11783  		if v_0.Op != OpARM64ANDconst {
 11784  			break
 11785  		}
 11786  		c := auxIntToInt64(v_0.AuxInt)
 11787  		x := v_0.Args[0]
 11788  		v.reset(OpARM64ANDconst)
 11789  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 11790  		v.AddArg(x)
 11791  		return true
 11792  	}
 11793  	// match: (MOVWUreg (MOVDconst [c]))
 11794  	// result: (MOVDconst [int64(uint32(c))])
 11795  	for {
 11796  		if v_0.Op != OpARM64MOVDconst {
 11797  			break
 11798  		}
 11799  		c := auxIntToInt64(v_0.AuxInt)
 11800  		v.reset(OpARM64MOVDconst)
 11801  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 11802  		return true
 11803  	}
 11804  	// match: (MOVWUreg x)
 11805  	// cond: v.Type.Size() <= 4
 11806  	// result: x
 11807  	for {
 11808  		x := v_0
 11809  		if !(v.Type.Size() <= 4) {
 11810  			break
 11811  		}
 11812  		v.copyOf(x)
 11813  		return true
 11814  	}
 11815  	// match: (MOVWUreg (SLLconst [lc] x))
 11816  	// cond: lc >= 32
 11817  	// result: (MOVDconst [0])
 11818  	for {
 11819  		if v_0.Op != OpARM64SLLconst {
 11820  			break
 11821  		}
 11822  		lc := auxIntToInt64(v_0.AuxInt)
 11823  		if !(lc >= 32) {
 11824  			break
 11825  		}
 11826  		v.reset(OpARM64MOVDconst)
 11827  		v.AuxInt = int64ToAuxInt(0)
 11828  		return true
 11829  	}
 11830  	// match: (MOVWUreg (SLLconst [lc] x))
 11831  	// cond: lc < 32
 11832  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 11833  	for {
 11834  		if v_0.Op != OpARM64SLLconst {
 11835  			break
 11836  		}
 11837  		lc := auxIntToInt64(v_0.AuxInt)
 11838  		x := v_0.Args[0]
 11839  		if !(lc < 32) {
 11840  			break
 11841  		}
 11842  		v.reset(OpARM64UBFIZ)
 11843  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 11844  		v.AddArg(x)
 11845  		return true
 11846  	}
 11847  	// match: (MOVWUreg (SRLconst [rc] x))
 11848  	// cond: rc < 32
 11849  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 11850  	for {
 11851  		if v_0.Op != OpARM64SRLconst {
 11852  			break
 11853  		}
 11854  		rc := auxIntToInt64(v_0.AuxInt)
 11855  		x := v_0.Args[0]
 11856  		if !(rc < 32) {
 11857  			break
 11858  		}
 11859  		v.reset(OpARM64UBFX)
 11860  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 11861  		v.AddArg(x)
 11862  		return true
 11863  	}
 11864  	// match: (MOVWUreg (UBFX [bfc] x))
 11865  	// cond: bfc.width() <= 32
 11866  	// result: (UBFX [bfc] x)
 11867  	for {
 11868  		if v_0.Op != OpARM64UBFX {
 11869  			break
 11870  		}
 11871  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11872  		x := v_0.Args[0]
 11873  		if !(bfc.width() <= 32) {
 11874  			break
 11875  		}
 11876  		v.reset(OpARM64UBFX)
 11877  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11878  		v.AddArg(x)
 11879  		return true
 11880  	}
 11881  	return false
 11882  }
 11883  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 11884  	v_1 := v.Args[1]
 11885  	v_0 := v.Args[0]
 11886  	b := v.Block
 11887  	config := b.Func.Config
 11888  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 11889  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11890  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 11891  	for {
 11892  		off1 := auxIntToInt32(v.AuxInt)
 11893  		sym := auxToSym(v.Aux)
 11894  		if v_0.Op != OpARM64ADDconst {
 11895  			break
 11896  		}
 11897  		off2 := auxIntToInt64(v_0.AuxInt)
 11898  		ptr := v_0.Args[0]
 11899  		mem := v_1
 11900  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11901  			break
 11902  		}
 11903  		v.reset(OpARM64MOVWload)
 11904  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11905  		v.Aux = symToAux(sym)
 11906  		v.AddArg2(ptr, mem)
 11907  		return true
 11908  	}
 11909  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 11910  	// cond: off == 0 && sym == nil
 11911  	// result: (MOVWloadidx ptr idx mem)
 11912  	for {
 11913  		off := auxIntToInt32(v.AuxInt)
 11914  		sym := auxToSym(v.Aux)
 11915  		if v_0.Op != OpARM64ADD {
 11916  			break
 11917  		}
 11918  		idx := v_0.Args[1]
 11919  		ptr := v_0.Args[0]
 11920  		mem := v_1
 11921  		if !(off == 0 && sym == nil) {
 11922  			break
 11923  		}
 11924  		v.reset(OpARM64MOVWloadidx)
 11925  		v.AddArg3(ptr, idx, mem)
 11926  		return true
 11927  	}
 11928  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 11929  	// cond: off == 0 && sym == nil
 11930  	// result: (MOVWloadidx4 ptr idx mem)
 11931  	for {
 11932  		off := auxIntToInt32(v.AuxInt)
 11933  		sym := auxToSym(v.Aux)
 11934  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11935  			break
 11936  		}
 11937  		idx := v_0.Args[1]
 11938  		ptr := v_0.Args[0]
 11939  		mem := v_1
 11940  		if !(off == 0 && sym == nil) {
 11941  			break
 11942  		}
 11943  		v.reset(OpARM64MOVWloadidx4)
 11944  		v.AddArg3(ptr, idx, mem)
 11945  		return true
 11946  	}
 11947  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 11948  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11949  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11950  	for {
 11951  		off1 := auxIntToInt32(v.AuxInt)
 11952  		sym1 := auxToSym(v.Aux)
 11953  		if v_0.Op != OpARM64MOVDaddr {
 11954  			break
 11955  		}
 11956  		off2 := auxIntToInt32(v_0.AuxInt)
 11957  		sym2 := auxToSym(v_0.Aux)
 11958  		ptr := v_0.Args[0]
 11959  		mem := v_1
 11960  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11961  			break
 11962  		}
 11963  		v.reset(OpARM64MOVWload)
 11964  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11965  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11966  		v.AddArg2(ptr, mem)
 11967  		return true
 11968  	}
 11969  	// match: (MOVWload [off] {sym} ptr (MOVWstorezero [off2] {sym2} ptr2 _))
 11970  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
 11971  	// result: (MOVDconst [0])
 11972  	for {
 11973  		off := auxIntToInt32(v.AuxInt)
 11974  		sym := auxToSym(v.Aux)
 11975  		ptr := v_0
 11976  		if v_1.Op != OpARM64MOVWstorezero {
 11977  			break
 11978  		}
 11979  		off2 := auxIntToInt32(v_1.AuxInt)
 11980  		sym2 := auxToSym(v_1.Aux)
 11981  		ptr2 := v_1.Args[0]
 11982  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
 11983  			break
 11984  		}
 11985  		v.reset(OpARM64MOVDconst)
 11986  		v.AuxInt = int64ToAuxInt(0)
 11987  		return true
 11988  	}
 11989  	return false
 11990  }
 11991  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 11992  	v_2 := v.Args[2]
 11993  	v_1 := v.Args[1]
 11994  	v_0 := v.Args[0]
 11995  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 11996  	// cond: is32Bit(c)
 11997  	// result: (MOVWload [int32(c)] ptr mem)
 11998  	for {
 11999  		ptr := v_0
 12000  		if v_1.Op != OpARM64MOVDconst {
 12001  			break
 12002  		}
 12003  		c := auxIntToInt64(v_1.AuxInt)
 12004  		mem := v_2
 12005  		if !(is32Bit(c)) {
 12006  			break
 12007  		}
 12008  		v.reset(OpARM64MOVWload)
 12009  		v.AuxInt = int32ToAuxInt(int32(c))
 12010  		v.AddArg2(ptr, mem)
 12011  		return true
 12012  	}
 12013  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 12014  	// cond: is32Bit(c)
 12015  	// result: (MOVWload [int32(c)] ptr mem)
 12016  	for {
 12017  		if v_0.Op != OpARM64MOVDconst {
 12018  			break
 12019  		}
 12020  		c := auxIntToInt64(v_0.AuxInt)
 12021  		ptr := v_1
 12022  		mem := v_2
 12023  		if !(is32Bit(c)) {
 12024  			break
 12025  		}
 12026  		v.reset(OpARM64MOVWload)
 12027  		v.AuxInt = int32ToAuxInt(int32(c))
 12028  		v.AddArg2(ptr, mem)
 12029  		return true
 12030  	}
 12031  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 12032  	// result: (MOVWloadidx4 ptr idx mem)
 12033  	for {
 12034  		ptr := v_0
 12035  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12036  			break
 12037  		}
 12038  		idx := v_1.Args[0]
 12039  		mem := v_2
 12040  		v.reset(OpARM64MOVWloadidx4)
 12041  		v.AddArg3(ptr, idx, mem)
 12042  		return true
 12043  	}
 12044  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 12045  	// result: (MOVWloadidx4 ptr idx mem)
 12046  	for {
 12047  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12048  			break
 12049  		}
 12050  		idx := v_0.Args[0]
 12051  		ptr := v_1
 12052  		mem := v_2
 12053  		v.reset(OpARM64MOVWloadidx4)
 12054  		v.AddArg3(ptr, idx, mem)
 12055  		return true
 12056  	}
 12057  	// match: (MOVWloadidx ptr idx (MOVWstorezeroidx ptr2 idx2 _))
 12058  	// cond: (isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2))
 12059  	// result: (MOVDconst [0])
 12060  	for {
 12061  		ptr := v_0
 12062  		idx := v_1
 12063  		if v_2.Op != OpARM64MOVWstorezeroidx {
 12064  			break
 12065  		}
 12066  		idx2 := v_2.Args[1]
 12067  		ptr2 := v_2.Args[0]
 12068  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
 12069  			break
 12070  		}
 12071  		v.reset(OpARM64MOVDconst)
 12072  		v.AuxInt = int64ToAuxInt(0)
 12073  		return true
 12074  	}
 12075  	return false
 12076  }
 12077  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 12078  	v_2 := v.Args[2]
 12079  	v_1 := v.Args[1]
 12080  	v_0 := v.Args[0]
 12081  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 12082  	// cond: is32Bit(c<<2)
 12083  	// result: (MOVWload [int32(c)<<2] ptr mem)
 12084  	for {
 12085  		ptr := v_0
 12086  		if v_1.Op != OpARM64MOVDconst {
 12087  			break
 12088  		}
 12089  		c := auxIntToInt64(v_1.AuxInt)
 12090  		mem := v_2
 12091  		if !(is32Bit(c << 2)) {
 12092  			break
 12093  		}
 12094  		v.reset(OpARM64MOVWload)
 12095  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12096  		v.AddArg2(ptr, mem)
 12097  		return true
 12098  	}
 12099  	// match: (MOVWloadidx4 ptr idx (MOVWstorezeroidx4 ptr2 idx2 _))
 12100  	// cond: isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)
 12101  	// result: (MOVDconst [0])
 12102  	for {
 12103  		ptr := v_0
 12104  		idx := v_1
 12105  		if v_2.Op != OpARM64MOVWstorezeroidx4 {
 12106  			break
 12107  		}
 12108  		idx2 := v_2.Args[1]
 12109  		ptr2 := v_2.Args[0]
 12110  		if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
 12111  			break
 12112  		}
 12113  		v.reset(OpARM64MOVDconst)
 12114  		v.AuxInt = int64ToAuxInt(0)
 12115  		return true
 12116  	}
 12117  	return false
 12118  }
 12119  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 12120  	v_0 := v.Args[0]
 12121  	// match: (MOVWreg (MOVDconst [c]))
 12122  	// result: (MOVDconst [int64(int32(c))])
 12123  	for {
 12124  		if v_0.Op != OpARM64MOVDconst {
 12125  			break
 12126  		}
 12127  		c := auxIntToInt64(v_0.AuxInt)
 12128  		v.reset(OpARM64MOVDconst)
 12129  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 12130  		return true
 12131  	}
 12132  	// match: (MOVWreg x)
 12133  	// cond: v.Type.Size() <= 4
 12134  	// result: x
 12135  	for {
 12136  		x := v_0
 12137  		if !(v.Type.Size() <= 4) {
 12138  			break
 12139  		}
 12140  		v.copyOf(x)
 12141  		return true
 12142  	}
 12143  	// match: (MOVWreg <t> (ANDconst x [c]))
 12144  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 12145  	// result: (ANDconst <t> x [c])
 12146  	for {
 12147  		t := v.Type
 12148  		if v_0.Op != OpARM64ANDconst {
 12149  			break
 12150  		}
 12151  		c := auxIntToInt64(v_0.AuxInt)
 12152  		x := v_0.Args[0]
 12153  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 12154  			break
 12155  		}
 12156  		v.reset(OpARM64ANDconst)
 12157  		v.Type = t
 12158  		v.AuxInt = int64ToAuxInt(c)
 12159  		v.AddArg(x)
 12160  		return true
 12161  	}
 12162  	// match: (MOVWreg (SLLconst [lc] x))
 12163  	// cond: lc < 32
 12164  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 12165  	for {
 12166  		if v_0.Op != OpARM64SLLconst {
 12167  			break
 12168  		}
 12169  		lc := auxIntToInt64(v_0.AuxInt)
 12170  		x := v_0.Args[0]
 12171  		if !(lc < 32) {
 12172  			break
 12173  		}
 12174  		v.reset(OpARM64SBFIZ)
 12175  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 12176  		v.AddArg(x)
 12177  		return true
 12178  	}
 12179  	// match: (MOVWreg (SBFX [bfc] x))
 12180  	// cond: bfc.width() <= 32
 12181  	// result: (SBFX [bfc] x)
 12182  	for {
 12183  		if v_0.Op != OpARM64SBFX {
 12184  			break
 12185  		}
 12186  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 12187  		x := v_0.Args[0]
 12188  		if !(bfc.width() <= 32) {
 12189  			break
 12190  		}
 12191  		v.reset(OpARM64SBFX)
 12192  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 12193  		v.AddArg(x)
 12194  		return true
 12195  	}
 12196  	return false
 12197  }
 12198  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 12199  	v_2 := v.Args[2]
 12200  	v_1 := v.Args[1]
 12201  	v_0 := v.Args[0]
 12202  	b := v.Block
 12203  	config := b.Func.Config
 12204  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 12205  	// result: (FMOVSstore [off] {sym} ptr val mem)
 12206  	for {
 12207  		off := auxIntToInt32(v.AuxInt)
 12208  		sym := auxToSym(v.Aux)
 12209  		ptr := v_0
 12210  		if v_1.Op != OpARM64FMOVSfpgp {
 12211  			break
 12212  		}
 12213  		val := v_1.Args[0]
 12214  		mem := v_2
 12215  		v.reset(OpARM64FMOVSstore)
 12216  		v.AuxInt = int32ToAuxInt(off)
 12217  		v.Aux = symToAux(sym)
 12218  		v.AddArg3(ptr, val, mem)
 12219  		return true
 12220  	}
 12221  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 12222  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12223  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 12224  	for {
 12225  		off1 := auxIntToInt32(v.AuxInt)
 12226  		sym := auxToSym(v.Aux)
 12227  		if v_0.Op != OpARM64ADDconst {
 12228  			break
 12229  		}
 12230  		off2 := auxIntToInt64(v_0.AuxInt)
 12231  		ptr := v_0.Args[0]
 12232  		val := v_1
 12233  		mem := v_2
 12234  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12235  			break
 12236  		}
 12237  		v.reset(OpARM64MOVWstore)
 12238  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12239  		v.Aux = symToAux(sym)
 12240  		v.AddArg3(ptr, val, mem)
 12241  		return true
 12242  	}
 12243  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 12244  	// cond: off == 0 && sym == nil
 12245  	// result: (MOVWstoreidx ptr idx val mem)
 12246  	for {
 12247  		off := auxIntToInt32(v.AuxInt)
 12248  		sym := auxToSym(v.Aux)
 12249  		if v_0.Op != OpARM64ADD {
 12250  			break
 12251  		}
 12252  		idx := v_0.Args[1]
 12253  		ptr := v_0.Args[0]
 12254  		val := v_1
 12255  		mem := v_2
 12256  		if !(off == 0 && sym == nil) {
 12257  			break
 12258  		}
 12259  		v.reset(OpARM64MOVWstoreidx)
 12260  		v.AddArg4(ptr, idx, val, mem)
 12261  		return true
 12262  	}
 12263  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 12264  	// cond: off == 0 && sym == nil
 12265  	// result: (MOVWstoreidx4 ptr idx val mem)
 12266  	for {
 12267  		off := auxIntToInt32(v.AuxInt)
 12268  		sym := auxToSym(v.Aux)
 12269  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12270  			break
 12271  		}
 12272  		idx := v_0.Args[1]
 12273  		ptr := v_0.Args[0]
 12274  		val := v_1
 12275  		mem := v_2
 12276  		if !(off == 0 && sym == nil) {
 12277  			break
 12278  		}
 12279  		v.reset(OpARM64MOVWstoreidx4)
 12280  		v.AddArg4(ptr, idx, val, mem)
 12281  		return true
 12282  	}
 12283  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 12284  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12285  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 12286  	for {
 12287  		off1 := auxIntToInt32(v.AuxInt)
 12288  		sym1 := auxToSym(v.Aux)
 12289  		if v_0.Op != OpARM64MOVDaddr {
 12290  			break
 12291  		}
 12292  		off2 := auxIntToInt32(v_0.AuxInt)
 12293  		sym2 := auxToSym(v_0.Aux)
 12294  		ptr := v_0.Args[0]
 12295  		val := v_1
 12296  		mem := v_2
 12297  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12298  			break
 12299  		}
 12300  		v.reset(OpARM64MOVWstore)
 12301  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12302  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12303  		v.AddArg3(ptr, val, mem)
 12304  		return true
 12305  	}
 12306  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [0]) mem)
 12307  	// result: (MOVWstorezero [off] {sym} ptr mem)
 12308  	for {
 12309  		off := auxIntToInt32(v.AuxInt)
 12310  		sym := auxToSym(v.Aux)
 12311  		ptr := v_0
 12312  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 12313  			break
 12314  		}
 12315  		mem := v_2
 12316  		v.reset(OpARM64MOVWstorezero)
 12317  		v.AuxInt = int32ToAuxInt(off)
 12318  		v.Aux = symToAux(sym)
 12319  		v.AddArg2(ptr, mem)
 12320  		return true
 12321  	}
 12322  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 12323  	// result: (MOVWstore [off] {sym} ptr x mem)
 12324  	for {
 12325  		off := auxIntToInt32(v.AuxInt)
 12326  		sym := auxToSym(v.Aux)
 12327  		ptr := v_0
 12328  		if v_1.Op != OpARM64MOVWreg {
 12329  			break
 12330  		}
 12331  		x := v_1.Args[0]
 12332  		mem := v_2
 12333  		v.reset(OpARM64MOVWstore)
 12334  		v.AuxInt = int32ToAuxInt(off)
 12335  		v.Aux = symToAux(sym)
 12336  		v.AddArg3(ptr, x, mem)
 12337  		return true
 12338  	}
 12339  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 12340  	// result: (MOVWstore [off] {sym} ptr x mem)
 12341  	for {
 12342  		off := auxIntToInt32(v.AuxInt)
 12343  		sym := auxToSym(v.Aux)
 12344  		ptr := v_0
 12345  		if v_1.Op != OpARM64MOVWUreg {
 12346  			break
 12347  		}
 12348  		x := v_1.Args[0]
 12349  		mem := v_2
 12350  		v.reset(OpARM64MOVWstore)
 12351  		v.AuxInt = int32ToAuxInt(off)
 12352  		v.Aux = symToAux(sym)
 12353  		v.AddArg3(ptr, x, mem)
 12354  		return true
 12355  	}
 12356  	return false
 12357  }
 12358  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 12359  	v_3 := v.Args[3]
 12360  	v_2 := v.Args[2]
 12361  	v_1 := v.Args[1]
 12362  	v_0 := v.Args[0]
 12363  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 12364  	// cond: is32Bit(c)
 12365  	// result: (MOVWstore [int32(c)] ptr val mem)
 12366  	for {
 12367  		ptr := v_0
 12368  		if v_1.Op != OpARM64MOVDconst {
 12369  			break
 12370  		}
 12371  		c := auxIntToInt64(v_1.AuxInt)
 12372  		val := v_2
 12373  		mem := v_3
 12374  		if !(is32Bit(c)) {
 12375  			break
 12376  		}
 12377  		v.reset(OpARM64MOVWstore)
 12378  		v.AuxInt = int32ToAuxInt(int32(c))
 12379  		v.AddArg3(ptr, val, mem)
 12380  		return true
 12381  	}
 12382  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 12383  	// cond: is32Bit(c)
 12384  	// result: (MOVWstore [int32(c)] idx val mem)
 12385  	for {
 12386  		if v_0.Op != OpARM64MOVDconst {
 12387  			break
 12388  		}
 12389  		c := auxIntToInt64(v_0.AuxInt)
 12390  		idx := v_1
 12391  		val := v_2
 12392  		mem := v_3
 12393  		if !(is32Bit(c)) {
 12394  			break
 12395  		}
 12396  		v.reset(OpARM64MOVWstore)
 12397  		v.AuxInt = int32ToAuxInt(int32(c))
 12398  		v.AddArg3(idx, val, mem)
 12399  		return true
 12400  	}
 12401  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 12402  	// result: (MOVWstoreidx4 ptr idx val mem)
 12403  	for {
 12404  		ptr := v_0
 12405  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12406  			break
 12407  		}
 12408  		idx := v_1.Args[0]
 12409  		val := v_2
 12410  		mem := v_3
 12411  		v.reset(OpARM64MOVWstoreidx4)
 12412  		v.AddArg4(ptr, idx, val, mem)
 12413  		return true
 12414  	}
 12415  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 12416  	// result: (MOVWstoreidx4 ptr idx val mem)
 12417  	for {
 12418  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12419  			break
 12420  		}
 12421  		idx := v_0.Args[0]
 12422  		ptr := v_1
 12423  		val := v_2
 12424  		mem := v_3
 12425  		v.reset(OpARM64MOVWstoreidx4)
 12426  		v.AddArg4(ptr, idx, val, mem)
 12427  		return true
 12428  	}
 12429  	// match: (MOVWstoreidx ptr idx (MOVDconst [0]) mem)
 12430  	// result: (MOVWstorezeroidx ptr idx mem)
 12431  	for {
 12432  		ptr := v_0
 12433  		idx := v_1
 12434  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 12435  			break
 12436  		}
 12437  		mem := v_3
 12438  		v.reset(OpARM64MOVWstorezeroidx)
 12439  		v.AddArg3(ptr, idx, mem)
 12440  		return true
 12441  	}
 12442  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 12443  	// result: (MOVWstoreidx ptr idx x mem)
 12444  	for {
 12445  		ptr := v_0
 12446  		idx := v_1
 12447  		if v_2.Op != OpARM64MOVWreg {
 12448  			break
 12449  		}
 12450  		x := v_2.Args[0]
 12451  		mem := v_3
 12452  		v.reset(OpARM64MOVWstoreidx)
 12453  		v.AddArg4(ptr, idx, x, mem)
 12454  		return true
 12455  	}
 12456  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 12457  	// result: (MOVWstoreidx ptr idx x mem)
 12458  	for {
 12459  		ptr := v_0
 12460  		idx := v_1
 12461  		if v_2.Op != OpARM64MOVWUreg {
 12462  			break
 12463  		}
 12464  		x := v_2.Args[0]
 12465  		mem := v_3
 12466  		v.reset(OpARM64MOVWstoreidx)
 12467  		v.AddArg4(ptr, idx, x, mem)
 12468  		return true
 12469  	}
 12470  	return false
 12471  }
 12472  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 12473  	v_3 := v.Args[3]
 12474  	v_2 := v.Args[2]
 12475  	v_1 := v.Args[1]
 12476  	v_0 := v.Args[0]
 12477  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 12478  	// cond: is32Bit(c<<2)
 12479  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 12480  	for {
 12481  		ptr := v_0
 12482  		if v_1.Op != OpARM64MOVDconst {
 12483  			break
 12484  		}
 12485  		c := auxIntToInt64(v_1.AuxInt)
 12486  		val := v_2
 12487  		mem := v_3
 12488  		if !(is32Bit(c << 2)) {
 12489  			break
 12490  		}
 12491  		v.reset(OpARM64MOVWstore)
 12492  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 12493  		v.AddArg3(ptr, val, mem)
 12494  		return true
 12495  	}
 12496  	// match: (MOVWstoreidx4 ptr idx (MOVDconst [0]) mem)
 12497  	// result: (MOVWstorezeroidx4 ptr idx mem)
 12498  	for {
 12499  		ptr := v_0
 12500  		idx := v_1
 12501  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 12502  			break
 12503  		}
 12504  		mem := v_3
 12505  		v.reset(OpARM64MOVWstorezeroidx4)
 12506  		v.AddArg3(ptr, idx, mem)
 12507  		return true
 12508  	}
 12509  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 12510  	// result: (MOVWstoreidx4 ptr idx x mem)
 12511  	for {
 12512  		ptr := v_0
 12513  		idx := v_1
 12514  		if v_2.Op != OpARM64MOVWreg {
 12515  			break
 12516  		}
 12517  		x := v_2.Args[0]
 12518  		mem := v_3
 12519  		v.reset(OpARM64MOVWstoreidx4)
 12520  		v.AddArg4(ptr, idx, x, mem)
 12521  		return true
 12522  	}
 12523  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 12524  	// result: (MOVWstoreidx4 ptr idx x mem)
 12525  	for {
 12526  		ptr := v_0
 12527  		idx := v_1
 12528  		if v_2.Op != OpARM64MOVWUreg {
 12529  			break
 12530  		}
 12531  		x := v_2.Args[0]
 12532  		mem := v_3
 12533  		v.reset(OpARM64MOVWstoreidx4)
 12534  		v.AddArg4(ptr, idx, x, mem)
 12535  		return true
 12536  	}
 12537  	return false
 12538  }
 12539  func rewriteValueARM64_OpARM64MOVWstorezero(v *Value) bool {
 12540  	v_1 := v.Args[1]
 12541  	v_0 := v.Args[0]
 12542  	b := v.Block
 12543  	config := b.Func.Config
 12544  	// match: (MOVWstorezero [off1] {sym} (ADDconst [off2] ptr) mem)
 12545  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12546  	// result: (MOVWstorezero [off1+int32(off2)] {sym} ptr mem)
 12547  	for {
 12548  		off1 := auxIntToInt32(v.AuxInt)
 12549  		sym := auxToSym(v.Aux)
 12550  		if v_0.Op != OpARM64ADDconst {
 12551  			break
 12552  		}
 12553  		off2 := auxIntToInt64(v_0.AuxInt)
 12554  		ptr := v_0.Args[0]
 12555  		mem := v_1
 12556  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12557  			break
 12558  		}
 12559  		v.reset(OpARM64MOVWstorezero)
 12560  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 12561  		v.Aux = symToAux(sym)
 12562  		v.AddArg2(ptr, mem)
 12563  		return true
 12564  	}
 12565  	// match: (MOVWstorezero [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 12566  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 12567  	// result: (MOVWstorezero [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 12568  	for {
 12569  		off1 := auxIntToInt32(v.AuxInt)
 12570  		sym1 := auxToSym(v.Aux)
 12571  		if v_0.Op != OpARM64MOVDaddr {
 12572  			break
 12573  		}
 12574  		off2 := auxIntToInt32(v_0.AuxInt)
 12575  		sym2 := auxToSym(v_0.Aux)
 12576  		ptr := v_0.Args[0]
 12577  		mem := v_1
 12578  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 12579  			break
 12580  		}
 12581  		v.reset(OpARM64MOVWstorezero)
 12582  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12583  		v.Aux = symToAux(mergeSym(sym1, sym2))
 12584  		v.AddArg2(ptr, mem)
 12585  		return true
 12586  	}
 12587  	// match: (MOVWstorezero [off] {sym} (ADD ptr idx) mem)
 12588  	// cond: off == 0 && sym == nil
 12589  	// result: (MOVWstorezeroidx ptr idx mem)
 12590  	for {
 12591  		off := auxIntToInt32(v.AuxInt)
 12592  		sym := auxToSym(v.Aux)
 12593  		if v_0.Op != OpARM64ADD {
 12594  			break
 12595  		}
 12596  		idx := v_0.Args[1]
 12597  		ptr := v_0.Args[0]
 12598  		mem := v_1
 12599  		if !(off == 0 && sym == nil) {
 12600  			break
 12601  		}
 12602  		v.reset(OpARM64MOVWstorezeroidx)
 12603  		v.AddArg3(ptr, idx, mem)
 12604  		return true
 12605  	}
 12606  	// match: (MOVWstorezero [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 12607  	// cond: off == 0 && sym == nil
 12608  	// result: (MOVWstorezeroidx4 ptr idx mem)
 12609  	for {
 12610  		off := auxIntToInt32(v.AuxInt)
 12611  		sym := auxToSym(v.Aux)
 12612  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 12613  			break
 12614  		}
 12615  		idx := v_0.Args[1]
 12616  		ptr := v_0.Args[0]
 12617  		mem := v_1
 12618  		if !(off == 0 && sym == nil) {
 12619  			break
 12620  		}
 12621  		v.reset(OpARM64MOVWstorezeroidx4)
 12622  		v.AddArg3(ptr, idx, mem)
 12623  		return true
 12624  	}
 12625  	return false
 12626  }
 12627  func rewriteValueARM64_OpARM64MOVWstorezeroidx(v *Value) bool {
 12628  	v_2 := v.Args[2]
 12629  	v_1 := v.Args[1]
 12630  	v_0 := v.Args[0]
 12631  	// match: (MOVWstorezeroidx ptr (MOVDconst [c]) mem)
 12632  	// cond: is32Bit(c)
 12633  	// result: (MOVWstorezero [int32(c)] ptr mem)
 12634  	for {
 12635  		ptr := v_0
 12636  		if v_1.Op != OpARM64MOVDconst {
 12637  			break
 12638  		}
 12639  		c := auxIntToInt64(v_1.AuxInt)
 12640  		mem := v_2
 12641  		if !(is32Bit(c)) {
 12642  			break
 12643  		}
 12644  		v.reset(OpARM64MOVWstorezero)
 12645  		v.AuxInt = int32ToAuxInt(int32(c))
 12646  		v.AddArg2(ptr, mem)
 12647  		return true
 12648  	}
 12649  	// match: (MOVWstorezeroidx (MOVDconst [c]) idx mem)
 12650  	// cond: is32Bit(c)
 12651  	// result: (MOVWstorezero [int32(c)] idx mem)
 12652  	for {
 12653  		if v_0.Op != OpARM64MOVDconst {
 12654  			break
 12655  		}
 12656  		c := auxIntToInt64(v_0.AuxInt)
 12657  		idx := v_1
 12658  		mem := v_2
 12659  		if !(is32Bit(c)) {
 12660  			break
 12661  		}
 12662  		v.reset(OpARM64MOVWstorezero)
 12663  		v.AuxInt = int32ToAuxInt(int32(c))
 12664  		v.AddArg2(idx, mem)
 12665  		return true
 12666  	}
 12667  	// match: (MOVWstorezeroidx ptr (SLLconst [2] idx) mem)
 12668  	// result: (MOVWstorezeroidx4 ptr idx mem)
 12669  	for {
 12670  		ptr := v_0
 12671  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 12672  			break
 12673  		}
 12674  		idx := v_1.Args[0]
 12675  		mem := v_2
 12676  		v.reset(OpARM64MOVWstorezeroidx4)
 12677  		v.AddArg3(ptr, idx, mem)
 12678  		return true
 12679  	}
 12680  	// match: (MOVWstorezeroidx (SLLconst [2] idx) ptr mem)
 12681  	// result: (MOVWstorezeroidx4 ptr idx mem)
 12682  	for {
 12683  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 12684  			break
 12685  		}
 12686  		idx := v_0.Args[0]
 12687  		ptr := v_1
 12688  		mem := v_2
 12689  		v.reset(OpARM64MOVWstorezeroidx4)
 12690  		v.AddArg3(ptr, idx, mem)
 12691  		return true
 12692  	}
 12693  	return false
 12694  }
 12695  func rewriteValueARM64_OpARM64MOVWstorezeroidx4(v *Value) bool {
 12696  	v_2 := v.Args[2]
 12697  	v_1 := v.Args[1]
 12698  	v_0 := v.Args[0]
 12699  	// match: (MOVWstorezeroidx4 ptr (MOVDconst [c]) mem)
 12700  	// cond: is32Bit(c<<2)
 12701  	// result: (MOVWstorezero [int32(c<<2)] ptr mem)
 12702  	for {
 12703  		ptr := v_0
 12704  		if v_1.Op != OpARM64MOVDconst {
 12705  			break
 12706  		}
 12707  		c := auxIntToInt64(v_1.AuxInt)
 12708  		mem := v_2
 12709  		if !(is32Bit(c << 2)) {
 12710  			break
 12711  		}
 12712  		v.reset(OpARM64MOVWstorezero)
 12713  		v.AuxInt = int32ToAuxInt(int32(c << 2))
 12714  		v.AddArg2(ptr, mem)
 12715  		return true
 12716  	}
 12717  	return false
 12718  }
 12719  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 12720  	v_2 := v.Args[2]
 12721  	v_1 := v.Args[1]
 12722  	v_0 := v.Args[0]
 12723  	b := v.Block
 12724  	// match: (MSUB a x (MOVDconst [-1]))
 12725  	// result: (ADD a x)
 12726  	for {
 12727  		a := v_0
 12728  		x := v_1
 12729  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 12730  			break
 12731  		}
 12732  		v.reset(OpARM64ADD)
 12733  		v.AddArg2(a, x)
 12734  		return true
 12735  	}
 12736  	// match: (MSUB a _ (MOVDconst [0]))
 12737  	// result: a
 12738  	for {
 12739  		a := v_0
 12740  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 12741  			break
 12742  		}
 12743  		v.copyOf(a)
 12744  		return true
 12745  	}
 12746  	// match: (MSUB a x (MOVDconst [1]))
 12747  	// result: (SUB a x)
 12748  	for {
 12749  		a := v_0
 12750  		x := v_1
 12751  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 12752  			break
 12753  		}
 12754  		v.reset(OpARM64SUB)
 12755  		v.AddArg2(a, x)
 12756  		return true
 12757  	}
 12758  	// match: (MSUB a x (MOVDconst [c]))
 12759  	// cond: isPowerOfTwo(c)
 12760  	// result: (SUBshiftLL a x [log64(c)])
 12761  	for {
 12762  		a := v_0
 12763  		x := v_1
 12764  		if v_2.Op != OpARM64MOVDconst {
 12765  			break
 12766  		}
 12767  		c := auxIntToInt64(v_2.AuxInt)
 12768  		if !(isPowerOfTwo(c)) {
 12769  			break
 12770  		}
 12771  		v.reset(OpARM64SUBshiftLL)
 12772  		v.AuxInt = int64ToAuxInt(log64(c))
 12773  		v.AddArg2(a, x)
 12774  		return true
 12775  	}
 12776  	// match: (MSUB a x (MOVDconst [c]))
 12777  	// cond: isPowerOfTwo(c-1) && c>=3
 12778  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 12779  	for {
 12780  		a := v_0
 12781  		x := v_1
 12782  		if v_2.Op != OpARM64MOVDconst {
 12783  			break
 12784  		}
 12785  		c := auxIntToInt64(v_2.AuxInt)
 12786  		if !(isPowerOfTwo(c-1) && c >= 3) {
 12787  			break
 12788  		}
 12789  		v.reset(OpARM64SUB)
 12790  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12791  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 12792  		v0.AddArg2(x, x)
 12793  		v.AddArg2(a, v0)
 12794  		return true
 12795  	}
 12796  	// match: (MSUB a x (MOVDconst [c]))
 12797  	// cond: isPowerOfTwo(c+1) && c>=7
 12798  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 12799  	for {
 12800  		a := v_0
 12801  		x := v_1
 12802  		if v_2.Op != OpARM64MOVDconst {
 12803  			break
 12804  		}
 12805  		c := auxIntToInt64(v_2.AuxInt)
 12806  		if !(isPowerOfTwo(c+1) && c >= 7) {
 12807  			break
 12808  		}
 12809  		v.reset(OpARM64ADD)
 12810  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12811  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 12812  		v0.AddArg2(x, x)
 12813  		v.AddArg2(a, v0)
 12814  		return true
 12815  	}
 12816  	// match: (MSUB a x (MOVDconst [c]))
 12817  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 12818  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 12819  	for {
 12820  		a := v_0
 12821  		x := v_1
 12822  		if v_2.Op != OpARM64MOVDconst {
 12823  			break
 12824  		}
 12825  		c := auxIntToInt64(v_2.AuxInt)
 12826  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 12827  			break
 12828  		}
 12829  		v.reset(OpARM64ADDshiftLL)
 12830  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 12831  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12832  		v0.AuxInt = int64ToAuxInt(2)
 12833  		v0.AddArg2(x, x)
 12834  		v.AddArg2(a, v0)
 12835  		return true
 12836  	}
 12837  	// match: (MSUB a x (MOVDconst [c]))
 12838  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 12839  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 12840  	for {
 12841  		a := v_0
 12842  		x := v_1
 12843  		if v_2.Op != OpARM64MOVDconst {
 12844  			break
 12845  		}
 12846  		c := auxIntToInt64(v_2.AuxInt)
 12847  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 12848  			break
 12849  		}
 12850  		v.reset(OpARM64SUBshiftLL)
 12851  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 12852  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12853  		v0.AuxInt = int64ToAuxInt(2)
 12854  		v0.AddArg2(x, x)
 12855  		v.AddArg2(a, v0)
 12856  		return true
 12857  	}
 12858  	// match: (MSUB a x (MOVDconst [c]))
 12859  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 12860  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 12861  	for {
 12862  		a := v_0
 12863  		x := v_1
 12864  		if v_2.Op != OpARM64MOVDconst {
 12865  			break
 12866  		}
 12867  		c := auxIntToInt64(v_2.AuxInt)
 12868  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 12869  			break
 12870  		}
 12871  		v.reset(OpARM64ADDshiftLL)
 12872  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 12873  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12874  		v0.AuxInt = int64ToAuxInt(3)
 12875  		v0.AddArg2(x, x)
 12876  		v.AddArg2(a, v0)
 12877  		return true
 12878  	}
 12879  	// match: (MSUB a x (MOVDconst [c]))
 12880  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 12881  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 12882  	for {
 12883  		a := v_0
 12884  		x := v_1
 12885  		if v_2.Op != OpARM64MOVDconst {
 12886  			break
 12887  		}
 12888  		c := auxIntToInt64(v_2.AuxInt)
 12889  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 12890  			break
 12891  		}
 12892  		v.reset(OpARM64SUBshiftLL)
 12893  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 12894  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12895  		v0.AuxInt = int64ToAuxInt(3)
 12896  		v0.AddArg2(x, x)
 12897  		v.AddArg2(a, v0)
 12898  		return true
 12899  	}
 12900  	// match: (MSUB a (MOVDconst [-1]) x)
 12901  	// result: (ADD a x)
 12902  	for {
 12903  		a := v_0
 12904  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 12905  			break
 12906  		}
 12907  		x := v_2
 12908  		v.reset(OpARM64ADD)
 12909  		v.AddArg2(a, x)
 12910  		return true
 12911  	}
 12912  	// match: (MSUB a (MOVDconst [0]) _)
 12913  	// result: a
 12914  	for {
 12915  		a := v_0
 12916  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 12917  			break
 12918  		}
 12919  		v.copyOf(a)
 12920  		return true
 12921  	}
 12922  	// match: (MSUB a (MOVDconst [1]) x)
 12923  	// result: (SUB a x)
 12924  	for {
 12925  		a := v_0
 12926  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12927  			break
 12928  		}
 12929  		x := v_2
 12930  		v.reset(OpARM64SUB)
 12931  		v.AddArg2(a, x)
 12932  		return true
 12933  	}
 12934  	// match: (MSUB a (MOVDconst [c]) x)
 12935  	// cond: isPowerOfTwo(c)
 12936  	// result: (SUBshiftLL a x [log64(c)])
 12937  	for {
 12938  		a := v_0
 12939  		if v_1.Op != OpARM64MOVDconst {
 12940  			break
 12941  		}
 12942  		c := auxIntToInt64(v_1.AuxInt)
 12943  		x := v_2
 12944  		if !(isPowerOfTwo(c)) {
 12945  			break
 12946  		}
 12947  		v.reset(OpARM64SUBshiftLL)
 12948  		v.AuxInt = int64ToAuxInt(log64(c))
 12949  		v.AddArg2(a, x)
 12950  		return true
 12951  	}
 12952  	// match: (MSUB a (MOVDconst [c]) x)
 12953  	// cond: isPowerOfTwo(c-1) && c>=3
 12954  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 12955  	for {
 12956  		a := v_0
 12957  		if v_1.Op != OpARM64MOVDconst {
 12958  			break
 12959  		}
 12960  		c := auxIntToInt64(v_1.AuxInt)
 12961  		x := v_2
 12962  		if !(isPowerOfTwo(c-1) && c >= 3) {
 12963  			break
 12964  		}
 12965  		v.reset(OpARM64SUB)
 12966  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12967  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 12968  		v0.AddArg2(x, x)
 12969  		v.AddArg2(a, v0)
 12970  		return true
 12971  	}
 12972  	// match: (MSUB a (MOVDconst [c]) x)
 12973  	// cond: isPowerOfTwo(c+1) && c>=7
 12974  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 12975  	for {
 12976  		a := v_0
 12977  		if v_1.Op != OpARM64MOVDconst {
 12978  			break
 12979  		}
 12980  		c := auxIntToInt64(v_1.AuxInt)
 12981  		x := v_2
 12982  		if !(isPowerOfTwo(c+1) && c >= 7) {
 12983  			break
 12984  		}
 12985  		v.reset(OpARM64ADD)
 12986  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12987  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 12988  		v0.AddArg2(x, x)
 12989  		v.AddArg2(a, v0)
 12990  		return true
 12991  	}
 12992  	// match: (MSUB a (MOVDconst [c]) x)
 12993  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 12994  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 12995  	for {
 12996  		a := v_0
 12997  		if v_1.Op != OpARM64MOVDconst {
 12998  			break
 12999  		}
 13000  		c := auxIntToInt64(v_1.AuxInt)
 13001  		x := v_2
 13002  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13003  			break
 13004  		}
 13005  		v.reset(OpARM64ADDshiftLL)
 13006  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 13007  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13008  		v0.AuxInt = int64ToAuxInt(2)
 13009  		v0.AddArg2(x, x)
 13010  		v.AddArg2(a, v0)
 13011  		return true
 13012  	}
 13013  	// match: (MSUB a (MOVDconst [c]) x)
 13014  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13015  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 13016  	for {
 13017  		a := v_0
 13018  		if v_1.Op != OpARM64MOVDconst {
 13019  			break
 13020  		}
 13021  		c := auxIntToInt64(v_1.AuxInt)
 13022  		x := v_2
 13023  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13024  			break
 13025  		}
 13026  		v.reset(OpARM64SUBshiftLL)
 13027  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 13028  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13029  		v0.AuxInt = int64ToAuxInt(2)
 13030  		v0.AddArg2(x, x)
 13031  		v.AddArg2(a, v0)
 13032  		return true
 13033  	}
 13034  	// match: (MSUB a (MOVDconst [c]) x)
 13035  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13036  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 13037  	for {
 13038  		a := v_0
 13039  		if v_1.Op != OpARM64MOVDconst {
 13040  			break
 13041  		}
 13042  		c := auxIntToInt64(v_1.AuxInt)
 13043  		x := v_2
 13044  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13045  			break
 13046  		}
 13047  		v.reset(OpARM64ADDshiftLL)
 13048  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 13049  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13050  		v0.AuxInt = int64ToAuxInt(3)
 13051  		v0.AddArg2(x, x)
 13052  		v.AddArg2(a, v0)
 13053  		return true
 13054  	}
 13055  	// match: (MSUB a (MOVDconst [c]) x)
 13056  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13057  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 13058  	for {
 13059  		a := v_0
 13060  		if v_1.Op != OpARM64MOVDconst {
 13061  			break
 13062  		}
 13063  		c := auxIntToInt64(v_1.AuxInt)
 13064  		x := v_2
 13065  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13066  			break
 13067  		}
 13068  		v.reset(OpARM64SUBshiftLL)
 13069  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 13070  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13071  		v0.AuxInt = int64ToAuxInt(3)
 13072  		v0.AddArg2(x, x)
 13073  		v.AddArg2(a, v0)
 13074  		return true
 13075  	}
 13076  	// match: (MSUB (MOVDconst [c]) x y)
 13077  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 13078  	for {
 13079  		if v_0.Op != OpARM64MOVDconst {
 13080  			break
 13081  		}
 13082  		c := auxIntToInt64(v_0.AuxInt)
 13083  		x := v_1
 13084  		y := v_2
 13085  		v.reset(OpARM64ADDconst)
 13086  		v.AuxInt = int64ToAuxInt(c)
 13087  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 13088  		v0.AddArg2(x, y)
 13089  		v.AddArg(v0)
 13090  		return true
 13091  	}
 13092  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 13093  	// result: (SUBconst [c*d] a)
 13094  	for {
 13095  		a := v_0
 13096  		if v_1.Op != OpARM64MOVDconst {
 13097  			break
 13098  		}
 13099  		c := auxIntToInt64(v_1.AuxInt)
 13100  		if v_2.Op != OpARM64MOVDconst {
 13101  			break
 13102  		}
 13103  		d := auxIntToInt64(v_2.AuxInt)
 13104  		v.reset(OpARM64SUBconst)
 13105  		v.AuxInt = int64ToAuxInt(c * d)
 13106  		v.AddArg(a)
 13107  		return true
 13108  	}
 13109  	return false
 13110  }
 13111  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 13112  	v_2 := v.Args[2]
 13113  	v_1 := v.Args[1]
 13114  	v_0 := v.Args[0]
 13115  	b := v.Block
 13116  	// match: (MSUBW a x (MOVDconst [c]))
 13117  	// cond: int32(c)==-1
 13118  	// result: (MOVWUreg (ADD <a.Type> a x))
 13119  	for {
 13120  		a := v_0
 13121  		x := v_1
 13122  		if v_2.Op != OpARM64MOVDconst {
 13123  			break
 13124  		}
 13125  		c := auxIntToInt64(v_2.AuxInt)
 13126  		if !(int32(c) == -1) {
 13127  			break
 13128  		}
 13129  		v.reset(OpARM64MOVWUreg)
 13130  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13131  		v0.AddArg2(a, x)
 13132  		v.AddArg(v0)
 13133  		return true
 13134  	}
 13135  	// match: (MSUBW a _ (MOVDconst [c]))
 13136  	// cond: int32(c)==0
 13137  	// result: (MOVWUreg a)
 13138  	for {
 13139  		a := v_0
 13140  		if v_2.Op != OpARM64MOVDconst {
 13141  			break
 13142  		}
 13143  		c := auxIntToInt64(v_2.AuxInt)
 13144  		if !(int32(c) == 0) {
 13145  			break
 13146  		}
 13147  		v.reset(OpARM64MOVWUreg)
 13148  		v.AddArg(a)
 13149  		return true
 13150  	}
 13151  	// match: (MSUBW a x (MOVDconst [c]))
 13152  	// cond: int32(c)==1
 13153  	// result: (MOVWUreg (SUB <a.Type> a x))
 13154  	for {
 13155  		a := v_0
 13156  		x := v_1
 13157  		if v_2.Op != OpARM64MOVDconst {
 13158  			break
 13159  		}
 13160  		c := auxIntToInt64(v_2.AuxInt)
 13161  		if !(int32(c) == 1) {
 13162  			break
 13163  		}
 13164  		v.reset(OpARM64MOVWUreg)
 13165  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13166  		v0.AddArg2(a, x)
 13167  		v.AddArg(v0)
 13168  		return true
 13169  	}
 13170  	// match: (MSUBW a x (MOVDconst [c]))
 13171  	// cond: isPowerOfTwo(c)
 13172  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13173  	for {
 13174  		a := v_0
 13175  		x := v_1
 13176  		if v_2.Op != OpARM64MOVDconst {
 13177  			break
 13178  		}
 13179  		c := auxIntToInt64(v_2.AuxInt)
 13180  		if !(isPowerOfTwo(c)) {
 13181  			break
 13182  		}
 13183  		v.reset(OpARM64MOVWUreg)
 13184  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13185  		v0.AuxInt = int64ToAuxInt(log64(c))
 13186  		v0.AddArg2(a, x)
 13187  		v.AddArg(v0)
 13188  		return true
 13189  	}
 13190  	// match: (MSUBW a x (MOVDconst [c]))
 13191  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13192  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13193  	for {
 13194  		a := v_0
 13195  		x := v_1
 13196  		if v_2.Op != OpARM64MOVDconst {
 13197  			break
 13198  		}
 13199  		c := auxIntToInt64(v_2.AuxInt)
 13200  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13201  			break
 13202  		}
 13203  		v.reset(OpARM64MOVWUreg)
 13204  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13205  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13206  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13207  		v1.AddArg2(x, x)
 13208  		v0.AddArg2(a, v1)
 13209  		v.AddArg(v0)
 13210  		return true
 13211  	}
 13212  	// match: (MSUBW a x (MOVDconst [c]))
 13213  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13214  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13215  	for {
 13216  		a := v_0
 13217  		x := v_1
 13218  		if v_2.Op != OpARM64MOVDconst {
 13219  			break
 13220  		}
 13221  		c := auxIntToInt64(v_2.AuxInt)
 13222  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13223  			break
 13224  		}
 13225  		v.reset(OpARM64MOVWUreg)
 13226  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13227  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13228  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13229  		v1.AddArg2(x, x)
 13230  		v0.AddArg2(a, v1)
 13231  		v.AddArg(v0)
 13232  		return true
 13233  	}
 13234  	// match: (MSUBW a x (MOVDconst [c]))
 13235  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13236  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13237  	for {
 13238  		a := v_0
 13239  		x := v_1
 13240  		if v_2.Op != OpARM64MOVDconst {
 13241  			break
 13242  		}
 13243  		c := auxIntToInt64(v_2.AuxInt)
 13244  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13245  			break
 13246  		}
 13247  		v.reset(OpARM64MOVWUreg)
 13248  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13249  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13250  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13251  		v1.AuxInt = int64ToAuxInt(2)
 13252  		v1.AddArg2(x, x)
 13253  		v0.AddArg2(a, v1)
 13254  		v.AddArg(v0)
 13255  		return true
 13256  	}
 13257  	// match: (MSUBW a x (MOVDconst [c]))
 13258  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13259  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13260  	for {
 13261  		a := v_0
 13262  		x := v_1
 13263  		if v_2.Op != OpARM64MOVDconst {
 13264  			break
 13265  		}
 13266  		c := auxIntToInt64(v_2.AuxInt)
 13267  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13268  			break
 13269  		}
 13270  		v.reset(OpARM64MOVWUreg)
 13271  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13272  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13273  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13274  		v1.AuxInt = int64ToAuxInt(2)
 13275  		v1.AddArg2(x, x)
 13276  		v0.AddArg2(a, v1)
 13277  		v.AddArg(v0)
 13278  		return true
 13279  	}
 13280  	// match: (MSUBW a x (MOVDconst [c]))
 13281  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13282  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13283  	for {
 13284  		a := v_0
 13285  		x := v_1
 13286  		if v_2.Op != OpARM64MOVDconst {
 13287  			break
 13288  		}
 13289  		c := auxIntToInt64(v_2.AuxInt)
 13290  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13291  			break
 13292  		}
 13293  		v.reset(OpARM64MOVWUreg)
 13294  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13295  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13296  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13297  		v1.AuxInt = int64ToAuxInt(3)
 13298  		v1.AddArg2(x, x)
 13299  		v0.AddArg2(a, v1)
 13300  		v.AddArg(v0)
 13301  		return true
 13302  	}
 13303  	// match: (MSUBW a x (MOVDconst [c]))
 13304  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13305  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13306  	for {
 13307  		a := v_0
 13308  		x := v_1
 13309  		if v_2.Op != OpARM64MOVDconst {
 13310  			break
 13311  		}
 13312  		c := auxIntToInt64(v_2.AuxInt)
 13313  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13314  			break
 13315  		}
 13316  		v.reset(OpARM64MOVWUreg)
 13317  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13318  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13319  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13320  		v1.AuxInt = int64ToAuxInt(3)
 13321  		v1.AddArg2(x, x)
 13322  		v0.AddArg2(a, v1)
 13323  		v.AddArg(v0)
 13324  		return true
 13325  	}
 13326  	// match: (MSUBW a (MOVDconst [c]) x)
 13327  	// cond: int32(c)==-1
 13328  	// result: (MOVWUreg (ADD <a.Type> a x))
 13329  	for {
 13330  		a := v_0
 13331  		if v_1.Op != OpARM64MOVDconst {
 13332  			break
 13333  		}
 13334  		c := auxIntToInt64(v_1.AuxInt)
 13335  		x := v_2
 13336  		if !(int32(c) == -1) {
 13337  			break
 13338  		}
 13339  		v.reset(OpARM64MOVWUreg)
 13340  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13341  		v0.AddArg2(a, x)
 13342  		v.AddArg(v0)
 13343  		return true
 13344  	}
 13345  	// match: (MSUBW a (MOVDconst [c]) _)
 13346  	// cond: int32(c)==0
 13347  	// result: (MOVWUreg a)
 13348  	for {
 13349  		a := v_0
 13350  		if v_1.Op != OpARM64MOVDconst {
 13351  			break
 13352  		}
 13353  		c := auxIntToInt64(v_1.AuxInt)
 13354  		if !(int32(c) == 0) {
 13355  			break
 13356  		}
 13357  		v.reset(OpARM64MOVWUreg)
 13358  		v.AddArg(a)
 13359  		return true
 13360  	}
 13361  	// match: (MSUBW a (MOVDconst [c]) x)
 13362  	// cond: int32(c)==1
 13363  	// result: (MOVWUreg (SUB <a.Type> a x))
 13364  	for {
 13365  		a := v_0
 13366  		if v_1.Op != OpARM64MOVDconst {
 13367  			break
 13368  		}
 13369  		c := auxIntToInt64(v_1.AuxInt)
 13370  		x := v_2
 13371  		if !(int32(c) == 1) {
 13372  			break
 13373  		}
 13374  		v.reset(OpARM64MOVWUreg)
 13375  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13376  		v0.AddArg2(a, x)
 13377  		v.AddArg(v0)
 13378  		return true
 13379  	}
 13380  	// match: (MSUBW a (MOVDconst [c]) x)
 13381  	// cond: isPowerOfTwo(c)
 13382  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 13383  	for {
 13384  		a := v_0
 13385  		if v_1.Op != OpARM64MOVDconst {
 13386  			break
 13387  		}
 13388  		c := auxIntToInt64(v_1.AuxInt)
 13389  		x := v_2
 13390  		if !(isPowerOfTwo(c)) {
 13391  			break
 13392  		}
 13393  		v.reset(OpARM64MOVWUreg)
 13394  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13395  		v0.AuxInt = int64ToAuxInt(log64(c))
 13396  		v0.AddArg2(a, x)
 13397  		v.AddArg(v0)
 13398  		return true
 13399  	}
 13400  	// match: (MSUBW a (MOVDconst [c]) x)
 13401  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 13402  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 13403  	for {
 13404  		a := v_0
 13405  		if v_1.Op != OpARM64MOVDconst {
 13406  			break
 13407  		}
 13408  		c := auxIntToInt64(v_1.AuxInt)
 13409  		x := v_2
 13410  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13411  			break
 13412  		}
 13413  		v.reset(OpARM64MOVWUreg)
 13414  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 13415  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13416  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 13417  		v1.AddArg2(x, x)
 13418  		v0.AddArg2(a, v1)
 13419  		v.AddArg(v0)
 13420  		return true
 13421  	}
 13422  	// match: (MSUBW a (MOVDconst [c]) x)
 13423  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 13424  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 13425  	for {
 13426  		a := v_0
 13427  		if v_1.Op != OpARM64MOVDconst {
 13428  			break
 13429  		}
 13430  		c := auxIntToInt64(v_1.AuxInt)
 13431  		x := v_2
 13432  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13433  			break
 13434  		}
 13435  		v.reset(OpARM64MOVWUreg)
 13436  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 13437  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13438  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 13439  		v1.AddArg2(x, x)
 13440  		v0.AddArg2(a, v1)
 13441  		v.AddArg(v0)
 13442  		return true
 13443  	}
 13444  	// match: (MSUBW a (MOVDconst [c]) x)
 13445  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13446  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 13447  	for {
 13448  		a := v_0
 13449  		if v_1.Op != OpARM64MOVDconst {
 13450  			break
 13451  		}
 13452  		c := auxIntToInt64(v_1.AuxInt)
 13453  		x := v_2
 13454  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13455  			break
 13456  		}
 13457  		v.reset(OpARM64MOVWUreg)
 13458  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13459  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13460  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13461  		v1.AuxInt = int64ToAuxInt(2)
 13462  		v1.AddArg2(x, x)
 13463  		v0.AddArg2(a, v1)
 13464  		v.AddArg(v0)
 13465  		return true
 13466  	}
 13467  	// match: (MSUBW a (MOVDconst [c]) x)
 13468  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13469  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 13470  	for {
 13471  		a := v_0
 13472  		if v_1.Op != OpARM64MOVDconst {
 13473  			break
 13474  		}
 13475  		c := auxIntToInt64(v_1.AuxInt)
 13476  		x := v_2
 13477  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13478  			break
 13479  		}
 13480  		v.reset(OpARM64MOVWUreg)
 13481  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13482  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13483  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13484  		v1.AuxInt = int64ToAuxInt(2)
 13485  		v1.AddArg2(x, x)
 13486  		v0.AddArg2(a, v1)
 13487  		v.AddArg(v0)
 13488  		return true
 13489  	}
 13490  	// match: (MSUBW a (MOVDconst [c]) x)
 13491  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 13492  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 13493  	for {
 13494  		a := v_0
 13495  		if v_1.Op != OpARM64MOVDconst {
 13496  			break
 13497  		}
 13498  		c := auxIntToInt64(v_1.AuxInt)
 13499  		x := v_2
 13500  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 13501  			break
 13502  		}
 13503  		v.reset(OpARM64MOVWUreg)
 13504  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 13505  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 13506  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 13507  		v1.AuxInt = int64ToAuxInt(3)
 13508  		v1.AddArg2(x, x)
 13509  		v0.AddArg2(a, v1)
 13510  		v.AddArg(v0)
 13511  		return true
 13512  	}
 13513  	// match: (MSUBW a (MOVDconst [c]) x)
 13514  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 13515  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 13516  	for {
 13517  		a := v_0
 13518  		if v_1.Op != OpARM64MOVDconst {
 13519  			break
 13520  		}
 13521  		c := auxIntToInt64(v_1.AuxInt)
 13522  		x := v_2
 13523  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 13524  			break
 13525  		}
 13526  		v.reset(OpARM64MOVWUreg)
 13527  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 13528  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 13529  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13530  		v1.AuxInt = int64ToAuxInt(3)
 13531  		v1.AddArg2(x, x)
 13532  		v0.AddArg2(a, v1)
 13533  		v.AddArg(v0)
 13534  		return true
 13535  	}
 13536  	// match: (MSUBW (MOVDconst [c]) x y)
 13537  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 13538  	for {
 13539  		if v_0.Op != OpARM64MOVDconst {
 13540  			break
 13541  		}
 13542  		c := auxIntToInt64(v_0.AuxInt)
 13543  		x := v_1
 13544  		y := v_2
 13545  		v.reset(OpARM64MOVWUreg)
 13546  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 13547  		v0.AuxInt = int64ToAuxInt(c)
 13548  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 13549  		v1.AddArg2(x, y)
 13550  		v0.AddArg(v1)
 13551  		v.AddArg(v0)
 13552  		return true
 13553  	}
 13554  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 13555  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 13556  	for {
 13557  		a := v_0
 13558  		if v_1.Op != OpARM64MOVDconst {
 13559  			break
 13560  		}
 13561  		c := auxIntToInt64(v_1.AuxInt)
 13562  		if v_2.Op != OpARM64MOVDconst {
 13563  			break
 13564  		}
 13565  		d := auxIntToInt64(v_2.AuxInt)
 13566  		v.reset(OpARM64MOVWUreg)
 13567  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 13568  		v0.AuxInt = int64ToAuxInt(c * d)
 13569  		v0.AddArg(a)
 13570  		v.AddArg(v0)
 13571  		return true
 13572  	}
 13573  	return false
 13574  }
 13575  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 13576  	v_1 := v.Args[1]
 13577  	v_0 := v.Args[0]
 13578  	b := v.Block
 13579  	// match: (MUL (NEG x) y)
 13580  	// result: (MNEG x y)
 13581  	for {
 13582  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13583  			if v_0.Op != OpARM64NEG {
 13584  				continue
 13585  			}
 13586  			x := v_0.Args[0]
 13587  			y := v_1
 13588  			v.reset(OpARM64MNEG)
 13589  			v.AddArg2(x, y)
 13590  			return true
 13591  		}
 13592  		break
 13593  	}
 13594  	// match: (MUL x (MOVDconst [-1]))
 13595  	// result: (NEG x)
 13596  	for {
 13597  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13598  			x := v_0
 13599  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 13600  				continue
 13601  			}
 13602  			v.reset(OpARM64NEG)
 13603  			v.AddArg(x)
 13604  			return true
 13605  		}
 13606  		break
 13607  	}
 13608  	// match: (MUL _ (MOVDconst [0]))
 13609  	// result: (MOVDconst [0])
 13610  	for {
 13611  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13612  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 13613  				continue
 13614  			}
 13615  			v.reset(OpARM64MOVDconst)
 13616  			v.AuxInt = int64ToAuxInt(0)
 13617  			return true
 13618  		}
 13619  		break
 13620  	}
 13621  	// match: (MUL x (MOVDconst [1]))
 13622  	// result: x
 13623  	for {
 13624  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13625  			x := v_0
 13626  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 13627  				continue
 13628  			}
 13629  			v.copyOf(x)
 13630  			return true
 13631  		}
 13632  		break
 13633  	}
 13634  	// match: (MUL x (MOVDconst [c]))
 13635  	// cond: isPowerOfTwo(c)
 13636  	// result: (SLLconst [log64(c)] x)
 13637  	for {
 13638  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13639  			x := v_0
 13640  			if v_1.Op != OpARM64MOVDconst {
 13641  				continue
 13642  			}
 13643  			c := auxIntToInt64(v_1.AuxInt)
 13644  			if !(isPowerOfTwo(c)) {
 13645  				continue
 13646  			}
 13647  			v.reset(OpARM64SLLconst)
 13648  			v.AuxInt = int64ToAuxInt(log64(c))
 13649  			v.AddArg(x)
 13650  			return true
 13651  		}
 13652  		break
 13653  	}
 13654  	// match: (MUL x (MOVDconst [c]))
 13655  	// cond: isPowerOfTwo(c-1) && c >= 3
 13656  	// result: (ADDshiftLL x x [log64(c-1)])
 13657  	for {
 13658  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13659  			x := v_0
 13660  			if v_1.Op != OpARM64MOVDconst {
 13661  				continue
 13662  			}
 13663  			c := auxIntToInt64(v_1.AuxInt)
 13664  			if !(isPowerOfTwo(c-1) && c >= 3) {
 13665  				continue
 13666  			}
 13667  			v.reset(OpARM64ADDshiftLL)
 13668  			v.AuxInt = int64ToAuxInt(log64(c - 1))
 13669  			v.AddArg2(x, x)
 13670  			return true
 13671  		}
 13672  		break
 13673  	}
 13674  	// match: (MUL x (MOVDconst [c]))
 13675  	// cond: isPowerOfTwo(c+1) && c >= 7
 13676  	// result: (ADDshiftLL (NEG <x.Type> x) x [log64(c+1)])
 13677  	for {
 13678  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13679  			x := v_0
 13680  			if v_1.Op != OpARM64MOVDconst {
 13681  				continue
 13682  			}
 13683  			c := auxIntToInt64(v_1.AuxInt)
 13684  			if !(isPowerOfTwo(c+1) && c >= 7) {
 13685  				continue
 13686  			}
 13687  			v.reset(OpARM64ADDshiftLL)
 13688  			v.AuxInt = int64ToAuxInt(log64(c + 1))
 13689  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 13690  			v0.AddArg(x)
 13691  			v.AddArg2(v0, x)
 13692  			return true
 13693  		}
 13694  		break
 13695  	}
 13696  	// match: (MUL x (MOVDconst [c]))
 13697  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 13698  	// result: (SLLconst [log64(c/3)] (ADDshiftLL <x.Type> x x [1]))
 13699  	for {
 13700  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13701  			x := v_0
 13702  			if v_1.Op != OpARM64MOVDconst {
 13703  				continue
 13704  			}
 13705  			c := auxIntToInt64(v_1.AuxInt)
 13706  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 13707  				continue
 13708  			}
 13709  			v.reset(OpARM64SLLconst)
 13710  			v.AuxInt = int64ToAuxInt(log64(c / 3))
 13711  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13712  			v0.AuxInt = int64ToAuxInt(1)
 13713  			v0.AddArg2(x, x)
 13714  			v.AddArg(v0)
 13715  			return true
 13716  		}
 13717  		break
 13718  	}
 13719  	// match: (MUL x (MOVDconst [c]))
 13720  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 13721  	// result: (SLLconst [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))
 13722  	for {
 13723  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13724  			x := v_0
 13725  			if v_1.Op != OpARM64MOVDconst {
 13726  				continue
 13727  			}
 13728  			c := auxIntToInt64(v_1.AuxInt)
 13729  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 13730  				continue
 13731  			}
 13732  			v.reset(OpARM64SLLconst)
 13733  			v.AuxInt = int64ToAuxInt(log64(c / 5))
 13734  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13735  			v0.AuxInt = int64ToAuxInt(2)
 13736  			v0.AddArg2(x, x)
 13737  			v.AddArg(v0)
 13738  			return true
 13739  		}
 13740  		break
 13741  	}
 13742  	// match: (MUL x (MOVDconst [c]))
 13743  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 13744  	// result: (SLLconst [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3]))
 13745  	for {
 13746  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13747  			x := v_0
 13748  			if v_1.Op != OpARM64MOVDconst {
 13749  				continue
 13750  			}
 13751  			c := auxIntToInt64(v_1.AuxInt)
 13752  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 13753  				continue
 13754  			}
 13755  			v.reset(OpARM64SLLconst)
 13756  			v.AuxInt = int64ToAuxInt(log64(c / 7))
 13757  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13758  			v0.AuxInt = int64ToAuxInt(3)
 13759  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 13760  			v1.AddArg(x)
 13761  			v0.AddArg2(v1, x)
 13762  			v.AddArg(v0)
 13763  			return true
 13764  		}
 13765  		break
 13766  	}
 13767  	// match: (MUL x (MOVDconst [c]))
 13768  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 13769  	// result: (SLLconst [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))
 13770  	for {
 13771  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13772  			x := v_0
 13773  			if v_1.Op != OpARM64MOVDconst {
 13774  				continue
 13775  			}
 13776  			c := auxIntToInt64(v_1.AuxInt)
 13777  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 13778  				continue
 13779  			}
 13780  			v.reset(OpARM64SLLconst)
 13781  			v.AuxInt = int64ToAuxInt(log64(c / 9))
 13782  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13783  			v0.AuxInt = int64ToAuxInt(3)
 13784  			v0.AddArg2(x, x)
 13785  			v.AddArg(v0)
 13786  			return true
 13787  		}
 13788  		break
 13789  	}
 13790  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 13791  	// result: (MOVDconst [c*d])
 13792  	for {
 13793  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13794  			if v_0.Op != OpARM64MOVDconst {
 13795  				continue
 13796  			}
 13797  			c := auxIntToInt64(v_0.AuxInt)
 13798  			if v_1.Op != OpARM64MOVDconst {
 13799  				continue
 13800  			}
 13801  			d := auxIntToInt64(v_1.AuxInt)
 13802  			v.reset(OpARM64MOVDconst)
 13803  			v.AuxInt = int64ToAuxInt(c * d)
 13804  			return true
 13805  		}
 13806  		break
 13807  	}
 13808  	return false
 13809  }
 13810  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 13811  	v_1 := v.Args[1]
 13812  	v_0 := v.Args[0]
 13813  	b := v.Block
 13814  	// match: (MULW (NEG x) y)
 13815  	// result: (MNEGW x y)
 13816  	for {
 13817  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13818  			if v_0.Op != OpARM64NEG {
 13819  				continue
 13820  			}
 13821  			x := v_0.Args[0]
 13822  			y := v_1
 13823  			v.reset(OpARM64MNEGW)
 13824  			v.AddArg2(x, y)
 13825  			return true
 13826  		}
 13827  		break
 13828  	}
 13829  	// match: (MULW x (MOVDconst [c]))
 13830  	// cond: int32(c)==-1
 13831  	// result: (MOVWUreg (NEG <x.Type> x))
 13832  	for {
 13833  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13834  			x := v_0
 13835  			if v_1.Op != OpARM64MOVDconst {
 13836  				continue
 13837  			}
 13838  			c := auxIntToInt64(v_1.AuxInt)
 13839  			if !(int32(c) == -1) {
 13840  				continue
 13841  			}
 13842  			v.reset(OpARM64MOVWUreg)
 13843  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 13844  			v0.AddArg(x)
 13845  			v.AddArg(v0)
 13846  			return true
 13847  		}
 13848  		break
 13849  	}
 13850  	// match: (MULW _ (MOVDconst [c]))
 13851  	// cond: int32(c)==0
 13852  	// result: (MOVDconst [0])
 13853  	for {
 13854  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13855  			if v_1.Op != OpARM64MOVDconst {
 13856  				continue
 13857  			}
 13858  			c := auxIntToInt64(v_1.AuxInt)
 13859  			if !(int32(c) == 0) {
 13860  				continue
 13861  			}
 13862  			v.reset(OpARM64MOVDconst)
 13863  			v.AuxInt = int64ToAuxInt(0)
 13864  			return true
 13865  		}
 13866  		break
 13867  	}
 13868  	// match: (MULW x (MOVDconst [c]))
 13869  	// cond: int32(c)==1
 13870  	// result: (MOVWUreg x)
 13871  	for {
 13872  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13873  			x := v_0
 13874  			if v_1.Op != OpARM64MOVDconst {
 13875  				continue
 13876  			}
 13877  			c := auxIntToInt64(v_1.AuxInt)
 13878  			if !(int32(c) == 1) {
 13879  				continue
 13880  			}
 13881  			v.reset(OpARM64MOVWUreg)
 13882  			v.AddArg(x)
 13883  			return true
 13884  		}
 13885  		break
 13886  	}
 13887  	// match: (MULW x (MOVDconst [c]))
 13888  	// cond: isPowerOfTwo(c)
 13889  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c)] x))
 13890  	for {
 13891  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13892  			x := v_0
 13893  			if v_1.Op != OpARM64MOVDconst {
 13894  				continue
 13895  			}
 13896  			c := auxIntToInt64(v_1.AuxInt)
 13897  			if !(isPowerOfTwo(c)) {
 13898  				continue
 13899  			}
 13900  			v.reset(OpARM64MOVWUreg)
 13901  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 13902  			v0.AuxInt = int64ToAuxInt(log64(c))
 13903  			v0.AddArg(x)
 13904  			v.AddArg(v0)
 13905  			return true
 13906  		}
 13907  		break
 13908  	}
 13909  	// match: (MULW x (MOVDconst [c]))
 13910  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
 13911  	// result: (MOVWUreg (ADDshiftLL <x.Type> x x [log64(c-1)]))
 13912  	for {
 13913  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13914  			x := v_0
 13915  			if v_1.Op != OpARM64MOVDconst {
 13916  				continue
 13917  			}
 13918  			c := auxIntToInt64(v_1.AuxInt)
 13919  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 13920  				continue
 13921  			}
 13922  			v.reset(OpARM64MOVWUreg)
 13923  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13924  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
 13925  			v0.AddArg2(x, x)
 13926  			v.AddArg(v0)
 13927  			return true
 13928  		}
 13929  		break
 13930  	}
 13931  	// match: (MULW x (MOVDconst [c]))
 13932  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
 13933  	// result: (MOVWUreg (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
 13934  	for {
 13935  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13936  			x := v_0
 13937  			if v_1.Op != OpARM64MOVDconst {
 13938  				continue
 13939  			}
 13940  			c := auxIntToInt64(v_1.AuxInt)
 13941  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 13942  				continue
 13943  			}
 13944  			v.reset(OpARM64MOVWUreg)
 13945  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13946  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
 13947  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 13948  			v1.AddArg(x)
 13949  			v0.AddArg2(v1, x)
 13950  			v.AddArg(v0)
 13951  			return true
 13952  		}
 13953  		break
 13954  	}
 13955  	// match: (MULW x (MOVDconst [c]))
 13956  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 13957  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (ADDshiftLL <x.Type> x x [1])))
 13958  	for {
 13959  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13960  			x := v_0
 13961  			if v_1.Op != OpARM64MOVDconst {
 13962  				continue
 13963  			}
 13964  			c := auxIntToInt64(v_1.AuxInt)
 13965  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 13966  				continue
 13967  			}
 13968  			v.reset(OpARM64MOVWUreg)
 13969  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 13970  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
 13971  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13972  			v1.AuxInt = int64ToAuxInt(1)
 13973  			v1.AddArg2(x, x)
 13974  			v0.AddArg(v1)
 13975  			v.AddArg(v0)
 13976  			return true
 13977  		}
 13978  		break
 13979  	}
 13980  	// match: (MULW x (MOVDconst [c]))
 13981  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 13982  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
 13983  	for {
 13984  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13985  			x := v_0
 13986  			if v_1.Op != OpARM64MOVDconst {
 13987  				continue
 13988  			}
 13989  			c := auxIntToInt64(v_1.AuxInt)
 13990  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 13991  				continue
 13992  			}
 13993  			v.reset(OpARM64MOVWUreg)
 13994  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 13995  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
 13996  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 13997  			v1.AuxInt = int64ToAuxInt(2)
 13998  			v1.AddArg2(x, x)
 13999  			v0.AddArg(v1)
 14000  			v.AddArg(v0)
 14001  			return true
 14002  		}
 14003  		break
 14004  	}
 14005  	// match: (MULW x (MOVDconst [c]))
 14006  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 14007  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (ADDshiftLL <x.Type> (NEG <x.Type> x) x [3])))
 14008  	for {
 14009  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14010  			x := v_0
 14011  			if v_1.Op != OpARM64MOVDconst {
 14012  				continue
 14013  			}
 14014  			c := auxIntToInt64(v_1.AuxInt)
 14015  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 14016  				continue
 14017  			}
 14018  			v.reset(OpARM64MOVWUreg)
 14019  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 14020  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
 14021  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 14022  			v1.AuxInt = int64ToAuxInt(3)
 14023  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
 14024  			v2.AddArg(x)
 14025  			v1.AddArg2(v2, x)
 14026  			v0.AddArg(v1)
 14027  			v.AddArg(v0)
 14028  			return true
 14029  		}
 14030  		break
 14031  	}
 14032  	// match: (MULW x (MOVDconst [c]))
 14033  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 14034  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
 14035  	for {
 14036  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14037  			x := v_0
 14038  			if v_1.Op != OpARM64MOVDconst {
 14039  				continue
 14040  			}
 14041  			c := auxIntToInt64(v_1.AuxInt)
 14042  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 14043  				continue
 14044  			}
 14045  			v.reset(OpARM64MOVWUreg)
 14046  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 14047  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
 14048  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 14049  			v1.AuxInt = int64ToAuxInt(3)
 14050  			v1.AddArg2(x, x)
 14051  			v0.AddArg(v1)
 14052  			v.AddArg(v0)
 14053  			return true
 14054  		}
 14055  		break
 14056  	}
 14057  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 14058  	// result: (MOVDconst [int64(uint32(c*d))])
 14059  	for {
 14060  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14061  			if v_0.Op != OpARM64MOVDconst {
 14062  				continue
 14063  			}
 14064  			c := auxIntToInt64(v_0.AuxInt)
 14065  			if v_1.Op != OpARM64MOVDconst {
 14066  				continue
 14067  			}
 14068  			d := auxIntToInt64(v_1.AuxInt)
 14069  			v.reset(OpARM64MOVDconst)
 14070  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 14071  			return true
 14072  		}
 14073  		break
 14074  	}
 14075  	return false
 14076  }
 14077  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 14078  	v_0 := v.Args[0]
 14079  	// match: (MVN (XOR x y))
 14080  	// result: (EON x y)
 14081  	for {
 14082  		if v_0.Op != OpARM64XOR {
 14083  			break
 14084  		}
 14085  		y := v_0.Args[1]
 14086  		x := v_0.Args[0]
 14087  		v.reset(OpARM64EON)
 14088  		v.AddArg2(x, y)
 14089  		return true
 14090  	}
 14091  	// match: (MVN (MOVDconst [c]))
 14092  	// result: (MOVDconst [^c])
 14093  	for {
 14094  		if v_0.Op != OpARM64MOVDconst {
 14095  			break
 14096  		}
 14097  		c := auxIntToInt64(v_0.AuxInt)
 14098  		v.reset(OpARM64MOVDconst)
 14099  		v.AuxInt = int64ToAuxInt(^c)
 14100  		return true
 14101  	}
 14102  	// match: (MVN x:(SLLconst [c] y))
 14103  	// cond: clobberIfDead(x)
 14104  	// result: (MVNshiftLL [c] y)
 14105  	for {
 14106  		x := v_0
 14107  		if x.Op != OpARM64SLLconst {
 14108  			break
 14109  		}
 14110  		c := auxIntToInt64(x.AuxInt)
 14111  		y := x.Args[0]
 14112  		if !(clobberIfDead(x)) {
 14113  			break
 14114  		}
 14115  		v.reset(OpARM64MVNshiftLL)
 14116  		v.AuxInt = int64ToAuxInt(c)
 14117  		v.AddArg(y)
 14118  		return true
 14119  	}
 14120  	// match: (MVN x:(SRLconst [c] y))
 14121  	// cond: clobberIfDead(x)
 14122  	// result: (MVNshiftRL [c] y)
 14123  	for {
 14124  		x := v_0
 14125  		if x.Op != OpARM64SRLconst {
 14126  			break
 14127  		}
 14128  		c := auxIntToInt64(x.AuxInt)
 14129  		y := x.Args[0]
 14130  		if !(clobberIfDead(x)) {
 14131  			break
 14132  		}
 14133  		v.reset(OpARM64MVNshiftRL)
 14134  		v.AuxInt = int64ToAuxInt(c)
 14135  		v.AddArg(y)
 14136  		return true
 14137  	}
 14138  	// match: (MVN x:(SRAconst [c] y))
 14139  	// cond: clobberIfDead(x)
 14140  	// result: (MVNshiftRA [c] y)
 14141  	for {
 14142  		x := v_0
 14143  		if x.Op != OpARM64SRAconst {
 14144  			break
 14145  		}
 14146  		c := auxIntToInt64(x.AuxInt)
 14147  		y := x.Args[0]
 14148  		if !(clobberIfDead(x)) {
 14149  			break
 14150  		}
 14151  		v.reset(OpARM64MVNshiftRA)
 14152  		v.AuxInt = int64ToAuxInt(c)
 14153  		v.AddArg(y)
 14154  		return true
 14155  	}
 14156  	// match: (MVN x:(RORconst [c] y))
 14157  	// cond: clobberIfDead(x)
 14158  	// result: (MVNshiftRO [c] y)
 14159  	for {
 14160  		x := v_0
 14161  		if x.Op != OpARM64RORconst {
 14162  			break
 14163  		}
 14164  		c := auxIntToInt64(x.AuxInt)
 14165  		y := x.Args[0]
 14166  		if !(clobberIfDead(x)) {
 14167  			break
 14168  		}
 14169  		v.reset(OpARM64MVNshiftRO)
 14170  		v.AuxInt = int64ToAuxInt(c)
 14171  		v.AddArg(y)
 14172  		return true
 14173  	}
 14174  	return false
 14175  }
 14176  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 14177  	v_0 := v.Args[0]
 14178  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 14179  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 14180  	for {
 14181  		d := auxIntToInt64(v.AuxInt)
 14182  		if v_0.Op != OpARM64MOVDconst {
 14183  			break
 14184  		}
 14185  		c := auxIntToInt64(v_0.AuxInt)
 14186  		v.reset(OpARM64MOVDconst)
 14187  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 14188  		return true
 14189  	}
 14190  	return false
 14191  }
 14192  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 14193  	v_0 := v.Args[0]
 14194  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 14195  	// result: (MOVDconst [^(c>>uint64(d))])
 14196  	for {
 14197  		d := auxIntToInt64(v.AuxInt)
 14198  		if v_0.Op != OpARM64MOVDconst {
 14199  			break
 14200  		}
 14201  		c := auxIntToInt64(v_0.AuxInt)
 14202  		v.reset(OpARM64MOVDconst)
 14203  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 14204  		return true
 14205  	}
 14206  	return false
 14207  }
 14208  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 14209  	v_0 := v.Args[0]
 14210  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 14211  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 14212  	for {
 14213  		d := auxIntToInt64(v.AuxInt)
 14214  		if v_0.Op != OpARM64MOVDconst {
 14215  			break
 14216  		}
 14217  		c := auxIntToInt64(v_0.AuxInt)
 14218  		v.reset(OpARM64MOVDconst)
 14219  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 14220  		return true
 14221  	}
 14222  	return false
 14223  }
 14224  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 14225  	v_0 := v.Args[0]
 14226  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 14227  	// result: (MOVDconst [^rotateRight64(c, d)])
 14228  	for {
 14229  		d := auxIntToInt64(v.AuxInt)
 14230  		if v_0.Op != OpARM64MOVDconst {
 14231  			break
 14232  		}
 14233  		c := auxIntToInt64(v_0.AuxInt)
 14234  		v.reset(OpARM64MOVDconst)
 14235  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 14236  		return true
 14237  	}
 14238  	return false
 14239  }
 14240  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 14241  	v_0 := v.Args[0]
 14242  	// match: (NEG (MUL x y))
 14243  	// result: (MNEG x y)
 14244  	for {
 14245  		if v_0.Op != OpARM64MUL {
 14246  			break
 14247  		}
 14248  		y := v_0.Args[1]
 14249  		x := v_0.Args[0]
 14250  		v.reset(OpARM64MNEG)
 14251  		v.AddArg2(x, y)
 14252  		return true
 14253  	}
 14254  	// match: (NEG (MULW x y))
 14255  	// cond: v.Type.Size() <= 4
 14256  	// result: (MNEGW x y)
 14257  	for {
 14258  		if v_0.Op != OpARM64MULW {
 14259  			break
 14260  		}
 14261  		y := v_0.Args[1]
 14262  		x := v_0.Args[0]
 14263  		if !(v.Type.Size() <= 4) {
 14264  			break
 14265  		}
 14266  		v.reset(OpARM64MNEGW)
 14267  		v.AddArg2(x, y)
 14268  		return true
 14269  	}
 14270  	// match: (NEG (NEG x))
 14271  	// result: x
 14272  	for {
 14273  		if v_0.Op != OpARM64NEG {
 14274  			break
 14275  		}
 14276  		x := v_0.Args[0]
 14277  		v.copyOf(x)
 14278  		return true
 14279  	}
 14280  	// match: (NEG (MOVDconst [c]))
 14281  	// result: (MOVDconst [-c])
 14282  	for {
 14283  		if v_0.Op != OpARM64MOVDconst {
 14284  			break
 14285  		}
 14286  		c := auxIntToInt64(v_0.AuxInt)
 14287  		v.reset(OpARM64MOVDconst)
 14288  		v.AuxInt = int64ToAuxInt(-c)
 14289  		return true
 14290  	}
 14291  	// match: (NEG x:(SLLconst [c] y))
 14292  	// cond: clobberIfDead(x)
 14293  	// result: (NEGshiftLL [c] y)
 14294  	for {
 14295  		x := v_0
 14296  		if x.Op != OpARM64SLLconst {
 14297  			break
 14298  		}
 14299  		c := auxIntToInt64(x.AuxInt)
 14300  		y := x.Args[0]
 14301  		if !(clobberIfDead(x)) {
 14302  			break
 14303  		}
 14304  		v.reset(OpARM64NEGshiftLL)
 14305  		v.AuxInt = int64ToAuxInt(c)
 14306  		v.AddArg(y)
 14307  		return true
 14308  	}
 14309  	// match: (NEG x:(SRLconst [c] y))
 14310  	// cond: clobberIfDead(x)
 14311  	// result: (NEGshiftRL [c] y)
 14312  	for {
 14313  		x := v_0
 14314  		if x.Op != OpARM64SRLconst {
 14315  			break
 14316  		}
 14317  		c := auxIntToInt64(x.AuxInt)
 14318  		y := x.Args[0]
 14319  		if !(clobberIfDead(x)) {
 14320  			break
 14321  		}
 14322  		v.reset(OpARM64NEGshiftRL)
 14323  		v.AuxInt = int64ToAuxInt(c)
 14324  		v.AddArg(y)
 14325  		return true
 14326  	}
 14327  	// match: (NEG x:(SRAconst [c] y))
 14328  	// cond: clobberIfDead(x)
 14329  	// result: (NEGshiftRA [c] y)
 14330  	for {
 14331  		x := v_0
 14332  		if x.Op != OpARM64SRAconst {
 14333  			break
 14334  		}
 14335  		c := auxIntToInt64(x.AuxInt)
 14336  		y := x.Args[0]
 14337  		if !(clobberIfDead(x)) {
 14338  			break
 14339  		}
 14340  		v.reset(OpARM64NEGshiftRA)
 14341  		v.AuxInt = int64ToAuxInt(c)
 14342  		v.AddArg(y)
 14343  		return true
 14344  	}
 14345  	return false
 14346  }
 14347  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 14348  	v_0 := v.Args[0]
 14349  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 14350  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 14351  	for {
 14352  		d := auxIntToInt64(v.AuxInt)
 14353  		if v_0.Op != OpARM64MOVDconst {
 14354  			break
 14355  		}
 14356  		c := auxIntToInt64(v_0.AuxInt)
 14357  		v.reset(OpARM64MOVDconst)
 14358  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 14359  		return true
 14360  	}
 14361  	return false
 14362  }
 14363  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 14364  	v_0 := v.Args[0]
 14365  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 14366  	// result: (MOVDconst [-(c>>uint64(d))])
 14367  	for {
 14368  		d := auxIntToInt64(v.AuxInt)
 14369  		if v_0.Op != OpARM64MOVDconst {
 14370  			break
 14371  		}
 14372  		c := auxIntToInt64(v_0.AuxInt)
 14373  		v.reset(OpARM64MOVDconst)
 14374  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 14375  		return true
 14376  	}
 14377  	return false
 14378  }
 14379  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 14380  	v_0 := v.Args[0]
 14381  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 14382  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 14383  	for {
 14384  		d := auxIntToInt64(v.AuxInt)
 14385  		if v_0.Op != OpARM64MOVDconst {
 14386  			break
 14387  		}
 14388  		c := auxIntToInt64(v_0.AuxInt)
 14389  		v.reset(OpARM64MOVDconst)
 14390  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 14391  		return true
 14392  	}
 14393  	return false
 14394  }
 14395  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 14396  	v_0 := v.Args[0]
 14397  	b := v.Block
 14398  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 14399  	// cond: z.Uses == 1
 14400  	// result: (NotEqual (TST x y))
 14401  	for {
 14402  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14403  			break
 14404  		}
 14405  		z := v_0.Args[0]
 14406  		if z.Op != OpARM64AND {
 14407  			break
 14408  		}
 14409  		y := z.Args[1]
 14410  		x := z.Args[0]
 14411  		if !(z.Uses == 1) {
 14412  			break
 14413  		}
 14414  		v.reset(OpARM64NotEqual)
 14415  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 14416  		v0.AddArg2(x, y)
 14417  		v.AddArg(v0)
 14418  		return true
 14419  	}
 14420  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 14421  	// cond: x.Uses == 1
 14422  	// result: (NotEqual (TSTWconst [int32(c)] y))
 14423  	for {
 14424  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14425  			break
 14426  		}
 14427  		x := v_0.Args[0]
 14428  		if x.Op != OpARM64ANDconst {
 14429  			break
 14430  		}
 14431  		c := auxIntToInt64(x.AuxInt)
 14432  		y := x.Args[0]
 14433  		if !(x.Uses == 1) {
 14434  			break
 14435  		}
 14436  		v.reset(OpARM64NotEqual)
 14437  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 14438  		v0.AuxInt = int32ToAuxInt(int32(c))
 14439  		v0.AddArg(y)
 14440  		v.AddArg(v0)
 14441  		return true
 14442  	}
 14443  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 14444  	// cond: z.Uses == 1
 14445  	// result: (NotEqual (TSTW x y))
 14446  	for {
 14447  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14448  			break
 14449  		}
 14450  		z := v_0.Args[0]
 14451  		if z.Op != OpARM64AND {
 14452  			break
 14453  		}
 14454  		y := z.Args[1]
 14455  		x := z.Args[0]
 14456  		if !(z.Uses == 1) {
 14457  			break
 14458  		}
 14459  		v.reset(OpARM64NotEqual)
 14460  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 14461  		v0.AddArg2(x, y)
 14462  		v.AddArg(v0)
 14463  		return true
 14464  	}
 14465  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 14466  	// cond: x.Uses == 1
 14467  	// result: (NotEqual (TSTconst [c] y))
 14468  	for {
 14469  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14470  			break
 14471  		}
 14472  		x := v_0.Args[0]
 14473  		if x.Op != OpARM64ANDconst {
 14474  			break
 14475  		}
 14476  		c := auxIntToInt64(x.AuxInt)
 14477  		y := x.Args[0]
 14478  		if !(x.Uses == 1) {
 14479  			break
 14480  		}
 14481  		v.reset(OpARM64NotEqual)
 14482  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 14483  		v0.AuxInt = int64ToAuxInt(c)
 14484  		v0.AddArg(y)
 14485  		v.AddArg(v0)
 14486  		return true
 14487  	}
 14488  	// match: (NotEqual (CMP x z:(NEG y)))
 14489  	// cond: z.Uses == 1
 14490  	// result: (NotEqual (CMN x y))
 14491  	for {
 14492  		if v_0.Op != OpARM64CMP {
 14493  			break
 14494  		}
 14495  		_ = v_0.Args[1]
 14496  		x := v_0.Args[0]
 14497  		z := v_0.Args[1]
 14498  		if z.Op != OpARM64NEG {
 14499  			break
 14500  		}
 14501  		y := z.Args[0]
 14502  		if !(z.Uses == 1) {
 14503  			break
 14504  		}
 14505  		v.reset(OpARM64NotEqual)
 14506  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14507  		v0.AddArg2(x, y)
 14508  		v.AddArg(v0)
 14509  		return true
 14510  	}
 14511  	// match: (NotEqual (CMPW x z:(NEG y)))
 14512  	// cond: z.Uses == 1
 14513  	// result: (NotEqual (CMNW x y))
 14514  	for {
 14515  		if v_0.Op != OpARM64CMPW {
 14516  			break
 14517  		}
 14518  		_ = v_0.Args[1]
 14519  		x := v_0.Args[0]
 14520  		z := v_0.Args[1]
 14521  		if z.Op != OpARM64NEG {
 14522  			break
 14523  		}
 14524  		y := z.Args[0]
 14525  		if !(z.Uses == 1) {
 14526  			break
 14527  		}
 14528  		v.reset(OpARM64NotEqual)
 14529  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14530  		v0.AddArg2(x, y)
 14531  		v.AddArg(v0)
 14532  		return true
 14533  	}
 14534  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 14535  	// cond: x.Uses == 1
 14536  	// result: (NotEqual (CMNconst [c] y))
 14537  	for {
 14538  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14539  			break
 14540  		}
 14541  		x := v_0.Args[0]
 14542  		if x.Op != OpARM64ADDconst {
 14543  			break
 14544  		}
 14545  		c := auxIntToInt64(x.AuxInt)
 14546  		y := x.Args[0]
 14547  		if !(x.Uses == 1) {
 14548  			break
 14549  		}
 14550  		v.reset(OpARM64NotEqual)
 14551  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 14552  		v0.AuxInt = int64ToAuxInt(c)
 14553  		v0.AddArg(y)
 14554  		v.AddArg(v0)
 14555  		return true
 14556  	}
 14557  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 14558  	// cond: x.Uses == 1
 14559  	// result: (NotEqual (CMNWconst [int32(c)] y))
 14560  	for {
 14561  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14562  			break
 14563  		}
 14564  		x := v_0.Args[0]
 14565  		if x.Op != OpARM64ADDconst {
 14566  			break
 14567  		}
 14568  		c := auxIntToInt64(x.AuxInt)
 14569  		y := x.Args[0]
 14570  		if !(x.Uses == 1) {
 14571  			break
 14572  		}
 14573  		v.reset(OpARM64NotEqual)
 14574  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 14575  		v0.AuxInt = int32ToAuxInt(int32(c))
 14576  		v0.AddArg(y)
 14577  		v.AddArg(v0)
 14578  		return true
 14579  	}
 14580  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 14581  	// cond: z.Uses == 1
 14582  	// result: (NotEqual (CMN x y))
 14583  	for {
 14584  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14585  			break
 14586  		}
 14587  		z := v_0.Args[0]
 14588  		if z.Op != OpARM64ADD {
 14589  			break
 14590  		}
 14591  		y := z.Args[1]
 14592  		x := z.Args[0]
 14593  		if !(z.Uses == 1) {
 14594  			break
 14595  		}
 14596  		v.reset(OpARM64NotEqual)
 14597  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14598  		v0.AddArg2(x, y)
 14599  		v.AddArg(v0)
 14600  		return true
 14601  	}
 14602  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 14603  	// cond: z.Uses == 1
 14604  	// result: (NotEqual (CMNW x y))
 14605  	for {
 14606  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14607  			break
 14608  		}
 14609  		z := v_0.Args[0]
 14610  		if z.Op != OpARM64ADD {
 14611  			break
 14612  		}
 14613  		y := z.Args[1]
 14614  		x := z.Args[0]
 14615  		if !(z.Uses == 1) {
 14616  			break
 14617  		}
 14618  		v.reset(OpARM64NotEqual)
 14619  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14620  		v0.AddArg2(x, y)
 14621  		v.AddArg(v0)
 14622  		return true
 14623  	}
 14624  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 14625  	// cond: z.Uses == 1
 14626  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 14627  	for {
 14628  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14629  			break
 14630  		}
 14631  		z := v_0.Args[0]
 14632  		if z.Op != OpARM64MADD {
 14633  			break
 14634  		}
 14635  		y := z.Args[2]
 14636  		a := z.Args[0]
 14637  		x := z.Args[1]
 14638  		if !(z.Uses == 1) {
 14639  			break
 14640  		}
 14641  		v.reset(OpARM64NotEqual)
 14642  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 14643  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14644  		v1.AddArg2(x, y)
 14645  		v0.AddArg2(a, v1)
 14646  		v.AddArg(v0)
 14647  		return true
 14648  	}
 14649  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 14650  	// cond: z.Uses == 1
 14651  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 14652  	for {
 14653  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 14654  			break
 14655  		}
 14656  		z := v_0.Args[0]
 14657  		if z.Op != OpARM64MSUB {
 14658  			break
 14659  		}
 14660  		y := z.Args[2]
 14661  		a := z.Args[0]
 14662  		x := z.Args[1]
 14663  		if !(z.Uses == 1) {
 14664  			break
 14665  		}
 14666  		v.reset(OpARM64NotEqual)
 14667  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 14668  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 14669  		v1.AddArg2(x, y)
 14670  		v0.AddArg2(a, v1)
 14671  		v.AddArg(v0)
 14672  		return true
 14673  	}
 14674  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 14675  	// cond: z.Uses == 1
 14676  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 14677  	for {
 14678  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14679  			break
 14680  		}
 14681  		z := v_0.Args[0]
 14682  		if z.Op != OpARM64MADDW {
 14683  			break
 14684  		}
 14685  		y := z.Args[2]
 14686  		a := z.Args[0]
 14687  		x := z.Args[1]
 14688  		if !(z.Uses == 1) {
 14689  			break
 14690  		}
 14691  		v.reset(OpARM64NotEqual)
 14692  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 14693  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14694  		v1.AddArg2(x, y)
 14695  		v0.AddArg2(a, v1)
 14696  		v.AddArg(v0)
 14697  		return true
 14698  	}
 14699  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 14700  	// cond: z.Uses == 1
 14701  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 14702  	for {
 14703  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 14704  			break
 14705  		}
 14706  		z := v_0.Args[0]
 14707  		if z.Op != OpARM64MSUBW {
 14708  			break
 14709  		}
 14710  		y := z.Args[2]
 14711  		a := z.Args[0]
 14712  		x := z.Args[1]
 14713  		if !(z.Uses == 1) {
 14714  			break
 14715  		}
 14716  		v.reset(OpARM64NotEqual)
 14717  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 14718  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 14719  		v1.AddArg2(x, y)
 14720  		v0.AddArg2(a, v1)
 14721  		v.AddArg(v0)
 14722  		return true
 14723  	}
 14724  	// match: (NotEqual (FlagConstant [fc]))
 14725  	// result: (MOVDconst [b2i(fc.ne())])
 14726  	for {
 14727  		if v_0.Op != OpARM64FlagConstant {
 14728  			break
 14729  		}
 14730  		fc := auxIntToFlagConstant(v_0.AuxInt)
 14731  		v.reset(OpARM64MOVDconst)
 14732  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 14733  		return true
 14734  	}
 14735  	// match: (NotEqual (InvertFlags x))
 14736  	// result: (NotEqual x)
 14737  	for {
 14738  		if v_0.Op != OpARM64InvertFlags {
 14739  			break
 14740  		}
 14741  		x := v_0.Args[0]
 14742  		v.reset(OpARM64NotEqual)
 14743  		v.AddArg(x)
 14744  		return true
 14745  	}
 14746  	return false
 14747  }
 14748  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 14749  	v_1 := v.Args[1]
 14750  	v_0 := v.Args[0]
 14751  	// match: (OR x (MOVDconst [c]))
 14752  	// result: (ORconst [c] x)
 14753  	for {
 14754  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14755  			x := v_0
 14756  			if v_1.Op != OpARM64MOVDconst {
 14757  				continue
 14758  			}
 14759  			c := auxIntToInt64(v_1.AuxInt)
 14760  			v.reset(OpARM64ORconst)
 14761  			v.AuxInt = int64ToAuxInt(c)
 14762  			v.AddArg(x)
 14763  			return true
 14764  		}
 14765  		break
 14766  	}
 14767  	// match: (OR x x)
 14768  	// result: x
 14769  	for {
 14770  		x := v_0
 14771  		if x != v_1 {
 14772  			break
 14773  		}
 14774  		v.copyOf(x)
 14775  		return true
 14776  	}
 14777  	// match: (OR x (MVN y))
 14778  	// result: (ORN x y)
 14779  	for {
 14780  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14781  			x := v_0
 14782  			if v_1.Op != OpARM64MVN {
 14783  				continue
 14784  			}
 14785  			y := v_1.Args[0]
 14786  			v.reset(OpARM64ORN)
 14787  			v.AddArg2(x, y)
 14788  			return true
 14789  		}
 14790  		break
 14791  	}
 14792  	// match: (OR x0 x1:(SLLconst [c] y))
 14793  	// cond: clobberIfDead(x1)
 14794  	// result: (ORshiftLL x0 y [c])
 14795  	for {
 14796  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14797  			x0 := v_0
 14798  			x1 := v_1
 14799  			if x1.Op != OpARM64SLLconst {
 14800  				continue
 14801  			}
 14802  			c := auxIntToInt64(x1.AuxInt)
 14803  			y := x1.Args[0]
 14804  			if !(clobberIfDead(x1)) {
 14805  				continue
 14806  			}
 14807  			v.reset(OpARM64ORshiftLL)
 14808  			v.AuxInt = int64ToAuxInt(c)
 14809  			v.AddArg2(x0, y)
 14810  			return true
 14811  		}
 14812  		break
 14813  	}
 14814  	// match: (OR x0 x1:(SRLconst [c] y))
 14815  	// cond: clobberIfDead(x1)
 14816  	// result: (ORshiftRL x0 y [c])
 14817  	for {
 14818  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14819  			x0 := v_0
 14820  			x1 := v_1
 14821  			if x1.Op != OpARM64SRLconst {
 14822  				continue
 14823  			}
 14824  			c := auxIntToInt64(x1.AuxInt)
 14825  			y := x1.Args[0]
 14826  			if !(clobberIfDead(x1)) {
 14827  				continue
 14828  			}
 14829  			v.reset(OpARM64ORshiftRL)
 14830  			v.AuxInt = int64ToAuxInt(c)
 14831  			v.AddArg2(x0, y)
 14832  			return true
 14833  		}
 14834  		break
 14835  	}
 14836  	// match: (OR x0 x1:(SRAconst [c] y))
 14837  	// cond: clobberIfDead(x1)
 14838  	// result: (ORshiftRA x0 y [c])
 14839  	for {
 14840  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14841  			x0 := v_0
 14842  			x1 := v_1
 14843  			if x1.Op != OpARM64SRAconst {
 14844  				continue
 14845  			}
 14846  			c := auxIntToInt64(x1.AuxInt)
 14847  			y := x1.Args[0]
 14848  			if !(clobberIfDead(x1)) {
 14849  				continue
 14850  			}
 14851  			v.reset(OpARM64ORshiftRA)
 14852  			v.AuxInt = int64ToAuxInt(c)
 14853  			v.AddArg2(x0, y)
 14854  			return true
 14855  		}
 14856  		break
 14857  	}
 14858  	// match: (OR x0 x1:(RORconst [c] y))
 14859  	// cond: clobberIfDead(x1)
 14860  	// result: (ORshiftRO x0 y [c])
 14861  	for {
 14862  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14863  			x0 := v_0
 14864  			x1 := v_1
 14865  			if x1.Op != OpARM64RORconst {
 14866  				continue
 14867  			}
 14868  			c := auxIntToInt64(x1.AuxInt)
 14869  			y := x1.Args[0]
 14870  			if !(clobberIfDead(x1)) {
 14871  				continue
 14872  			}
 14873  			v.reset(OpARM64ORshiftRO)
 14874  			v.AuxInt = int64ToAuxInt(c)
 14875  			v.AddArg2(x0, y)
 14876  			return true
 14877  		}
 14878  		break
 14879  	}
 14880  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 14881  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 14882  	// result: (BFI [bfc] y x)
 14883  	for {
 14884  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14885  			if v_0.Op != OpARM64UBFIZ {
 14886  				continue
 14887  			}
 14888  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 14889  			x := v_0.Args[0]
 14890  			if v_1.Op != OpARM64ANDconst {
 14891  				continue
 14892  			}
 14893  			ac := auxIntToInt64(v_1.AuxInt)
 14894  			y := v_1.Args[0]
 14895  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 14896  				continue
 14897  			}
 14898  			v.reset(OpARM64BFI)
 14899  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 14900  			v.AddArg2(y, x)
 14901  			return true
 14902  		}
 14903  		break
 14904  	}
 14905  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 14906  	// cond: ac == ^(1<<uint(bfc.width())-1)
 14907  	// result: (BFXIL [bfc] y x)
 14908  	for {
 14909  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14910  			if v_0.Op != OpARM64UBFX {
 14911  				continue
 14912  			}
 14913  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 14914  			x := v_0.Args[0]
 14915  			if v_1.Op != OpARM64ANDconst {
 14916  				continue
 14917  			}
 14918  			ac := auxIntToInt64(v_1.AuxInt)
 14919  			y := v_1.Args[0]
 14920  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 14921  				continue
 14922  			}
 14923  			v.reset(OpARM64BFXIL)
 14924  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 14925  			v.AddArg2(y, x)
 14926  			return true
 14927  		}
 14928  		break
 14929  	}
 14930  	return false
 14931  }
 14932  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 14933  	v_1 := v.Args[1]
 14934  	v_0 := v.Args[0]
 14935  	// match: (ORN x (MOVDconst [c]))
 14936  	// result: (ORconst [^c] x)
 14937  	for {
 14938  		x := v_0
 14939  		if v_1.Op != OpARM64MOVDconst {
 14940  			break
 14941  		}
 14942  		c := auxIntToInt64(v_1.AuxInt)
 14943  		v.reset(OpARM64ORconst)
 14944  		v.AuxInt = int64ToAuxInt(^c)
 14945  		v.AddArg(x)
 14946  		return true
 14947  	}
 14948  	// match: (ORN x x)
 14949  	// result: (MOVDconst [-1])
 14950  	for {
 14951  		x := v_0
 14952  		if x != v_1 {
 14953  			break
 14954  		}
 14955  		v.reset(OpARM64MOVDconst)
 14956  		v.AuxInt = int64ToAuxInt(-1)
 14957  		return true
 14958  	}
 14959  	// match: (ORN x0 x1:(SLLconst [c] y))
 14960  	// cond: clobberIfDead(x1)
 14961  	// result: (ORNshiftLL x0 y [c])
 14962  	for {
 14963  		x0 := v_0
 14964  		x1 := v_1
 14965  		if x1.Op != OpARM64SLLconst {
 14966  			break
 14967  		}
 14968  		c := auxIntToInt64(x1.AuxInt)
 14969  		y := x1.Args[0]
 14970  		if !(clobberIfDead(x1)) {
 14971  			break
 14972  		}
 14973  		v.reset(OpARM64ORNshiftLL)
 14974  		v.AuxInt = int64ToAuxInt(c)
 14975  		v.AddArg2(x0, y)
 14976  		return true
 14977  	}
 14978  	// match: (ORN x0 x1:(SRLconst [c] y))
 14979  	// cond: clobberIfDead(x1)
 14980  	// result: (ORNshiftRL x0 y [c])
 14981  	for {
 14982  		x0 := v_0
 14983  		x1 := v_1
 14984  		if x1.Op != OpARM64SRLconst {
 14985  			break
 14986  		}
 14987  		c := auxIntToInt64(x1.AuxInt)
 14988  		y := x1.Args[0]
 14989  		if !(clobberIfDead(x1)) {
 14990  			break
 14991  		}
 14992  		v.reset(OpARM64ORNshiftRL)
 14993  		v.AuxInt = int64ToAuxInt(c)
 14994  		v.AddArg2(x0, y)
 14995  		return true
 14996  	}
 14997  	// match: (ORN x0 x1:(SRAconst [c] y))
 14998  	// cond: clobberIfDead(x1)
 14999  	// result: (ORNshiftRA x0 y [c])
 15000  	for {
 15001  		x0 := v_0
 15002  		x1 := v_1
 15003  		if x1.Op != OpARM64SRAconst {
 15004  			break
 15005  		}
 15006  		c := auxIntToInt64(x1.AuxInt)
 15007  		y := x1.Args[0]
 15008  		if !(clobberIfDead(x1)) {
 15009  			break
 15010  		}
 15011  		v.reset(OpARM64ORNshiftRA)
 15012  		v.AuxInt = int64ToAuxInt(c)
 15013  		v.AddArg2(x0, y)
 15014  		return true
 15015  	}
 15016  	// match: (ORN x0 x1:(RORconst [c] y))
 15017  	// cond: clobberIfDead(x1)
 15018  	// result: (ORNshiftRO x0 y [c])
 15019  	for {
 15020  		x0 := v_0
 15021  		x1 := v_1
 15022  		if x1.Op != OpARM64RORconst {
 15023  			break
 15024  		}
 15025  		c := auxIntToInt64(x1.AuxInt)
 15026  		y := x1.Args[0]
 15027  		if !(clobberIfDead(x1)) {
 15028  			break
 15029  		}
 15030  		v.reset(OpARM64ORNshiftRO)
 15031  		v.AuxInt = int64ToAuxInt(c)
 15032  		v.AddArg2(x0, y)
 15033  		return true
 15034  	}
 15035  	return false
 15036  }
 15037  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 15038  	v_1 := v.Args[1]
 15039  	v_0 := v.Args[0]
 15040  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 15041  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 15042  	for {
 15043  		d := auxIntToInt64(v.AuxInt)
 15044  		x := v_0
 15045  		if v_1.Op != OpARM64MOVDconst {
 15046  			break
 15047  		}
 15048  		c := auxIntToInt64(v_1.AuxInt)
 15049  		v.reset(OpARM64ORconst)
 15050  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 15051  		v.AddArg(x)
 15052  		return true
 15053  	}
 15054  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 15055  	// result: (MOVDconst [-1])
 15056  	for {
 15057  		c := auxIntToInt64(v.AuxInt)
 15058  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15059  			break
 15060  		}
 15061  		x := v_0.Args[0]
 15062  		if x != v_1 {
 15063  			break
 15064  		}
 15065  		v.reset(OpARM64MOVDconst)
 15066  		v.AuxInt = int64ToAuxInt(-1)
 15067  		return true
 15068  	}
 15069  	return false
 15070  }
 15071  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 15072  	v_1 := v.Args[1]
 15073  	v_0 := v.Args[0]
 15074  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 15075  	// result: (ORconst x [^(c>>uint64(d))])
 15076  	for {
 15077  		d := auxIntToInt64(v.AuxInt)
 15078  		x := v_0
 15079  		if v_1.Op != OpARM64MOVDconst {
 15080  			break
 15081  		}
 15082  		c := auxIntToInt64(v_1.AuxInt)
 15083  		v.reset(OpARM64ORconst)
 15084  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 15085  		v.AddArg(x)
 15086  		return true
 15087  	}
 15088  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 15089  	// result: (MOVDconst [-1])
 15090  	for {
 15091  		c := auxIntToInt64(v.AuxInt)
 15092  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15093  			break
 15094  		}
 15095  		x := v_0.Args[0]
 15096  		if x != v_1 {
 15097  			break
 15098  		}
 15099  		v.reset(OpARM64MOVDconst)
 15100  		v.AuxInt = int64ToAuxInt(-1)
 15101  		return true
 15102  	}
 15103  	return false
 15104  }
 15105  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 15106  	v_1 := v.Args[1]
 15107  	v_0 := v.Args[0]
 15108  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 15109  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 15110  	for {
 15111  		d := auxIntToInt64(v.AuxInt)
 15112  		x := v_0
 15113  		if v_1.Op != OpARM64MOVDconst {
 15114  			break
 15115  		}
 15116  		c := auxIntToInt64(v_1.AuxInt)
 15117  		v.reset(OpARM64ORconst)
 15118  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 15119  		v.AddArg(x)
 15120  		return true
 15121  	}
 15122  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 15123  	// result: (MOVDconst [-1])
 15124  	for {
 15125  		c := auxIntToInt64(v.AuxInt)
 15126  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15127  			break
 15128  		}
 15129  		x := v_0.Args[0]
 15130  		if x != v_1 {
 15131  			break
 15132  		}
 15133  		v.reset(OpARM64MOVDconst)
 15134  		v.AuxInt = int64ToAuxInt(-1)
 15135  		return true
 15136  	}
 15137  	return false
 15138  }
 15139  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 15140  	v_1 := v.Args[1]
 15141  	v_0 := v.Args[0]
 15142  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 15143  	// result: (ORconst x [^rotateRight64(c, d)])
 15144  	for {
 15145  		d := auxIntToInt64(v.AuxInt)
 15146  		x := v_0
 15147  		if v_1.Op != OpARM64MOVDconst {
 15148  			break
 15149  		}
 15150  		c := auxIntToInt64(v_1.AuxInt)
 15151  		v.reset(OpARM64ORconst)
 15152  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 15153  		v.AddArg(x)
 15154  		return true
 15155  	}
 15156  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 15157  	// result: (MOVDconst [-1])
 15158  	for {
 15159  		c := auxIntToInt64(v.AuxInt)
 15160  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 15161  			break
 15162  		}
 15163  		x := v_0.Args[0]
 15164  		if x != v_1 {
 15165  			break
 15166  		}
 15167  		v.reset(OpARM64MOVDconst)
 15168  		v.AuxInt = int64ToAuxInt(-1)
 15169  		return true
 15170  	}
 15171  	return false
 15172  }
 15173  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 15174  	v_0 := v.Args[0]
 15175  	// match: (ORconst [0] x)
 15176  	// result: x
 15177  	for {
 15178  		if auxIntToInt64(v.AuxInt) != 0 {
 15179  			break
 15180  		}
 15181  		x := v_0
 15182  		v.copyOf(x)
 15183  		return true
 15184  	}
 15185  	// match: (ORconst [-1] _)
 15186  	// result: (MOVDconst [-1])
 15187  	for {
 15188  		if auxIntToInt64(v.AuxInt) != -1 {
 15189  			break
 15190  		}
 15191  		v.reset(OpARM64MOVDconst)
 15192  		v.AuxInt = int64ToAuxInt(-1)
 15193  		return true
 15194  	}
 15195  	// match: (ORconst [c] (MOVDconst [d]))
 15196  	// result: (MOVDconst [c|d])
 15197  	for {
 15198  		c := auxIntToInt64(v.AuxInt)
 15199  		if v_0.Op != OpARM64MOVDconst {
 15200  			break
 15201  		}
 15202  		d := auxIntToInt64(v_0.AuxInt)
 15203  		v.reset(OpARM64MOVDconst)
 15204  		v.AuxInt = int64ToAuxInt(c | d)
 15205  		return true
 15206  	}
 15207  	// match: (ORconst [c] (ORconst [d] x))
 15208  	// result: (ORconst [c|d] x)
 15209  	for {
 15210  		c := auxIntToInt64(v.AuxInt)
 15211  		if v_0.Op != OpARM64ORconst {
 15212  			break
 15213  		}
 15214  		d := auxIntToInt64(v_0.AuxInt)
 15215  		x := v_0.Args[0]
 15216  		v.reset(OpARM64ORconst)
 15217  		v.AuxInt = int64ToAuxInt(c | d)
 15218  		v.AddArg(x)
 15219  		return true
 15220  	}
 15221  	// match: (ORconst [c1] (ANDconst [c2] x))
 15222  	// cond: c2|c1 == ^0
 15223  	// result: (ORconst [c1] x)
 15224  	for {
 15225  		c1 := auxIntToInt64(v.AuxInt)
 15226  		if v_0.Op != OpARM64ANDconst {
 15227  			break
 15228  		}
 15229  		c2 := auxIntToInt64(v_0.AuxInt)
 15230  		x := v_0.Args[0]
 15231  		if !(c2|c1 == ^0) {
 15232  			break
 15233  		}
 15234  		v.reset(OpARM64ORconst)
 15235  		v.AuxInt = int64ToAuxInt(c1)
 15236  		v.AddArg(x)
 15237  		return true
 15238  	}
 15239  	return false
 15240  }
 15241  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 15242  	v_1 := v.Args[1]
 15243  	v_0 := v.Args[0]
 15244  	b := v.Block
 15245  	typ := &b.Func.Config.Types
 15246  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 15247  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 15248  	for {
 15249  		d := auxIntToInt64(v.AuxInt)
 15250  		if v_0.Op != OpARM64MOVDconst {
 15251  			break
 15252  		}
 15253  		c := auxIntToInt64(v_0.AuxInt)
 15254  		x := v_1
 15255  		v.reset(OpARM64ORconst)
 15256  		v.AuxInt = int64ToAuxInt(c)
 15257  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 15258  		v0.AuxInt = int64ToAuxInt(d)
 15259  		v0.AddArg(x)
 15260  		v.AddArg(v0)
 15261  		return true
 15262  	}
 15263  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 15264  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 15265  	for {
 15266  		d := auxIntToInt64(v.AuxInt)
 15267  		x := v_0
 15268  		if v_1.Op != OpARM64MOVDconst {
 15269  			break
 15270  		}
 15271  		c := auxIntToInt64(v_1.AuxInt)
 15272  		v.reset(OpARM64ORconst)
 15273  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15274  		v.AddArg(x)
 15275  		return true
 15276  	}
 15277  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 15278  	// result: y
 15279  	for {
 15280  		c := auxIntToInt64(v.AuxInt)
 15281  		y := v_0
 15282  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 15283  			break
 15284  		}
 15285  		x := y.Args[0]
 15286  		if x != v_1 {
 15287  			break
 15288  		}
 15289  		v.copyOf(y)
 15290  		return true
 15291  	}
 15292  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 15293  	// result: (REV16W x)
 15294  	for {
 15295  		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) {
 15296  			break
 15297  		}
 15298  		x := v_0.Args[0]
 15299  		if x != v_1 {
 15300  			break
 15301  		}
 15302  		v.reset(OpARM64REV16W)
 15303  		v.AddArg(x)
 15304  		return true
 15305  	}
 15306  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 15307  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 15308  	// result: (REV16W x)
 15309  	for {
 15310  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 15311  			break
 15312  		}
 15313  		v_0_0 := v_0.Args[0]
 15314  		if v_0_0.Op != OpARM64ANDconst {
 15315  			break
 15316  		}
 15317  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15318  		x := v_0_0.Args[0]
 15319  		if v_1.Op != OpARM64ANDconst {
 15320  			break
 15321  		}
 15322  		c2 := auxIntToInt64(v_1.AuxInt)
 15323  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 15324  			break
 15325  		}
 15326  		v.reset(OpARM64REV16W)
 15327  		v.AddArg(x)
 15328  		return true
 15329  	}
 15330  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15331  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 15332  	// result: (REV16 x)
 15333  	for {
 15334  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15335  			break
 15336  		}
 15337  		v_0_0 := v_0.Args[0]
 15338  		if v_0_0.Op != OpARM64ANDconst {
 15339  			break
 15340  		}
 15341  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15342  		x := v_0_0.Args[0]
 15343  		if v_1.Op != OpARM64ANDconst {
 15344  			break
 15345  		}
 15346  		c2 := auxIntToInt64(v_1.AuxInt)
 15347  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 15348  			break
 15349  		}
 15350  		v.reset(OpARM64REV16)
 15351  		v.AddArg(x)
 15352  		return true
 15353  	}
 15354  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 15355  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 15356  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 15357  	for {
 15358  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 15359  			break
 15360  		}
 15361  		v_0_0 := v_0.Args[0]
 15362  		if v_0_0.Op != OpARM64ANDconst {
 15363  			break
 15364  		}
 15365  		c1 := auxIntToInt64(v_0_0.AuxInt)
 15366  		x := v_0_0.Args[0]
 15367  		if v_1.Op != OpARM64ANDconst {
 15368  			break
 15369  		}
 15370  		c2 := auxIntToInt64(v_1.AuxInt)
 15371  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 15372  			break
 15373  		}
 15374  		v.reset(OpARM64REV16)
 15375  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 15376  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 15377  		v0.AddArg(x)
 15378  		v.AddArg(v0)
 15379  		return true
 15380  	}
 15381  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 15382  	// result: (EXTRconst [64-c] x2 x)
 15383  	for {
 15384  		c := auxIntToInt64(v.AuxInt)
 15385  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 15386  			break
 15387  		}
 15388  		x := v_0.Args[0]
 15389  		x2 := v_1
 15390  		v.reset(OpARM64EXTRconst)
 15391  		v.AuxInt = int64ToAuxInt(64 - c)
 15392  		v.AddArg2(x2, x)
 15393  		return true
 15394  	}
 15395  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 15396  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 15397  	// result: (EXTRWconst [32-c] x2 x)
 15398  	for {
 15399  		t := v.Type
 15400  		c := auxIntToInt64(v.AuxInt)
 15401  		if v_0.Op != OpARM64UBFX {
 15402  			break
 15403  		}
 15404  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15405  		x := v_0.Args[0]
 15406  		x2 := v_1
 15407  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 15408  			break
 15409  		}
 15410  		v.reset(OpARM64EXTRWconst)
 15411  		v.AuxInt = int64ToAuxInt(32 - c)
 15412  		v.AddArg2(x2, x)
 15413  		return true
 15414  	}
 15415  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 15416  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 15417  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 15418  	for {
 15419  		s := auxIntToInt64(v.AuxInt)
 15420  		if v_0.Op != OpARM64ANDconst {
 15421  			break
 15422  		}
 15423  		xc := auxIntToInt64(v_0.AuxInt)
 15424  		x := v_0.Args[0]
 15425  		if v_1.Op != OpARM64ANDconst {
 15426  			break
 15427  		}
 15428  		yc := auxIntToInt64(v_1.AuxInt)
 15429  		y := v_1.Args[0]
 15430  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 15431  			break
 15432  		}
 15433  		v.reset(OpARM64BFI)
 15434  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 15435  		v.AddArg2(x, y)
 15436  		return true
 15437  	}
 15438  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 15439  	// cond: sc == bfc.width()
 15440  	// result: (BFXIL [bfc] y x)
 15441  	for {
 15442  		sc := auxIntToInt64(v.AuxInt)
 15443  		if v_0.Op != OpARM64UBFX {
 15444  			break
 15445  		}
 15446  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15447  		x := v_0.Args[0]
 15448  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 15449  			break
 15450  		}
 15451  		y := v_1.Args[0]
 15452  		if !(sc == bfc.width()) {
 15453  			break
 15454  		}
 15455  		v.reset(OpARM64BFXIL)
 15456  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15457  		v.AddArg2(y, x)
 15458  		return true
 15459  	}
 15460  	return false
 15461  }
 15462  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 15463  	v_1 := v.Args[1]
 15464  	v_0 := v.Args[0]
 15465  	b := v.Block
 15466  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 15467  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 15468  	for {
 15469  		d := auxIntToInt64(v.AuxInt)
 15470  		if v_0.Op != OpARM64MOVDconst {
 15471  			break
 15472  		}
 15473  		c := auxIntToInt64(v_0.AuxInt)
 15474  		x := v_1
 15475  		v.reset(OpARM64ORconst)
 15476  		v.AuxInt = int64ToAuxInt(c)
 15477  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 15478  		v0.AuxInt = int64ToAuxInt(d)
 15479  		v0.AddArg(x)
 15480  		v.AddArg(v0)
 15481  		return true
 15482  	}
 15483  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 15484  	// result: (ORconst x [c>>uint64(d)])
 15485  	for {
 15486  		d := auxIntToInt64(v.AuxInt)
 15487  		x := v_0
 15488  		if v_1.Op != OpARM64MOVDconst {
 15489  			break
 15490  		}
 15491  		c := auxIntToInt64(v_1.AuxInt)
 15492  		v.reset(OpARM64ORconst)
 15493  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15494  		v.AddArg(x)
 15495  		return true
 15496  	}
 15497  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 15498  	// result: y
 15499  	for {
 15500  		c := auxIntToInt64(v.AuxInt)
 15501  		y := v_0
 15502  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 15503  			break
 15504  		}
 15505  		x := y.Args[0]
 15506  		if x != v_1 {
 15507  			break
 15508  		}
 15509  		v.copyOf(y)
 15510  		return true
 15511  	}
 15512  	return false
 15513  }
 15514  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 15515  	v_1 := v.Args[1]
 15516  	v_0 := v.Args[0]
 15517  	b := v.Block
 15518  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 15519  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 15520  	for {
 15521  		d := auxIntToInt64(v.AuxInt)
 15522  		if v_0.Op != OpARM64MOVDconst {
 15523  			break
 15524  		}
 15525  		c := auxIntToInt64(v_0.AuxInt)
 15526  		x := v_1
 15527  		v.reset(OpARM64ORconst)
 15528  		v.AuxInt = int64ToAuxInt(c)
 15529  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 15530  		v0.AuxInt = int64ToAuxInt(d)
 15531  		v0.AddArg(x)
 15532  		v.AddArg(v0)
 15533  		return true
 15534  	}
 15535  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 15536  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 15537  	for {
 15538  		d := auxIntToInt64(v.AuxInt)
 15539  		x := v_0
 15540  		if v_1.Op != OpARM64MOVDconst {
 15541  			break
 15542  		}
 15543  		c := auxIntToInt64(v_1.AuxInt)
 15544  		v.reset(OpARM64ORconst)
 15545  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15546  		v.AddArg(x)
 15547  		return true
 15548  	}
 15549  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 15550  	// result: y
 15551  	for {
 15552  		c := auxIntToInt64(v.AuxInt)
 15553  		y := v_0
 15554  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 15555  			break
 15556  		}
 15557  		x := y.Args[0]
 15558  		if x != v_1 {
 15559  			break
 15560  		}
 15561  		v.copyOf(y)
 15562  		return true
 15563  	}
 15564  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 15565  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 15566  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 15567  	for {
 15568  		rc := auxIntToInt64(v.AuxInt)
 15569  		if v_0.Op != OpARM64ANDconst {
 15570  			break
 15571  		}
 15572  		ac := auxIntToInt64(v_0.AuxInt)
 15573  		x := v_0.Args[0]
 15574  		if v_1.Op != OpARM64SLLconst {
 15575  			break
 15576  		}
 15577  		lc := auxIntToInt64(v_1.AuxInt)
 15578  		y := v_1.Args[0]
 15579  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 15580  			break
 15581  		}
 15582  		v.reset(OpARM64BFI)
 15583  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 15584  		v.AddArg2(x, y)
 15585  		return true
 15586  	}
 15587  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 15588  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 15589  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 15590  	for {
 15591  		rc := auxIntToInt64(v.AuxInt)
 15592  		if v_0.Op != OpARM64ANDconst {
 15593  			break
 15594  		}
 15595  		ac := auxIntToInt64(v_0.AuxInt)
 15596  		y := v_0.Args[0]
 15597  		if v_1.Op != OpARM64SLLconst {
 15598  			break
 15599  		}
 15600  		lc := auxIntToInt64(v_1.AuxInt)
 15601  		x := v_1.Args[0]
 15602  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 15603  			break
 15604  		}
 15605  		v.reset(OpARM64BFXIL)
 15606  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 15607  		v.AddArg2(y, x)
 15608  		return true
 15609  	}
 15610  	return false
 15611  }
 15612  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 15613  	v_1 := v.Args[1]
 15614  	v_0 := v.Args[0]
 15615  	b := v.Block
 15616  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 15617  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 15618  	for {
 15619  		d := auxIntToInt64(v.AuxInt)
 15620  		if v_0.Op != OpARM64MOVDconst {
 15621  			break
 15622  		}
 15623  		c := auxIntToInt64(v_0.AuxInt)
 15624  		x := v_1
 15625  		v.reset(OpARM64ORconst)
 15626  		v.AuxInt = int64ToAuxInt(c)
 15627  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 15628  		v0.AuxInt = int64ToAuxInt(d)
 15629  		v0.AddArg(x)
 15630  		v.AddArg(v0)
 15631  		return true
 15632  	}
 15633  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 15634  	// result: (ORconst x [rotateRight64(c, d)])
 15635  	for {
 15636  		d := auxIntToInt64(v.AuxInt)
 15637  		x := v_0
 15638  		if v_1.Op != OpARM64MOVDconst {
 15639  			break
 15640  		}
 15641  		c := auxIntToInt64(v_1.AuxInt)
 15642  		v.reset(OpARM64ORconst)
 15643  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 15644  		v.AddArg(x)
 15645  		return true
 15646  	}
 15647  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 15648  	// result: y
 15649  	for {
 15650  		c := auxIntToInt64(v.AuxInt)
 15651  		y := v_0
 15652  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 15653  			break
 15654  		}
 15655  		x := y.Args[0]
 15656  		if x != v_1 {
 15657  			break
 15658  		}
 15659  		v.copyOf(y)
 15660  		return true
 15661  	}
 15662  	return false
 15663  }
 15664  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 15665  	v_0 := v.Args[0]
 15666  	// match: (REV (REV p))
 15667  	// result: p
 15668  	for {
 15669  		if v_0.Op != OpARM64REV {
 15670  			break
 15671  		}
 15672  		p := v_0.Args[0]
 15673  		v.copyOf(p)
 15674  		return true
 15675  	}
 15676  	return false
 15677  }
 15678  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 15679  	v_0 := v.Args[0]
 15680  	// match: (REVW (REVW p))
 15681  	// result: p
 15682  	for {
 15683  		if v_0.Op != OpARM64REVW {
 15684  			break
 15685  		}
 15686  		p := v_0.Args[0]
 15687  		v.copyOf(p)
 15688  		return true
 15689  	}
 15690  	return false
 15691  }
 15692  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 15693  	v_1 := v.Args[1]
 15694  	v_0 := v.Args[0]
 15695  	// match: (ROR x (MOVDconst [c]))
 15696  	// result: (RORconst x [c&63])
 15697  	for {
 15698  		x := v_0
 15699  		if v_1.Op != OpARM64MOVDconst {
 15700  			break
 15701  		}
 15702  		c := auxIntToInt64(v_1.AuxInt)
 15703  		v.reset(OpARM64RORconst)
 15704  		v.AuxInt = int64ToAuxInt(c & 63)
 15705  		v.AddArg(x)
 15706  		return true
 15707  	}
 15708  	return false
 15709  }
 15710  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 15711  	v_1 := v.Args[1]
 15712  	v_0 := v.Args[0]
 15713  	// match: (RORW x (MOVDconst [c]))
 15714  	// result: (RORWconst x [c&31])
 15715  	for {
 15716  		x := v_0
 15717  		if v_1.Op != OpARM64MOVDconst {
 15718  			break
 15719  		}
 15720  		c := auxIntToInt64(v_1.AuxInt)
 15721  		v.reset(OpARM64RORWconst)
 15722  		v.AuxInt = int64ToAuxInt(c & 31)
 15723  		v.AddArg(x)
 15724  		return true
 15725  	}
 15726  	return false
 15727  }
 15728  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 15729  	v_2 := v.Args[2]
 15730  	v_1 := v.Args[1]
 15731  	v_0 := v.Args[0]
 15732  	b := v.Block
 15733  	typ := &b.Func.Config.Types
 15734  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 15735  	// result: (SBCSflags x y bo)
 15736  	for {
 15737  		x := v_0
 15738  		y := v_1
 15739  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15740  			break
 15741  		}
 15742  		v_2_0 := v_2.Args[0]
 15743  		if v_2_0.Op != OpARM64NEGSflags {
 15744  			break
 15745  		}
 15746  		v_2_0_0 := v_2_0.Args[0]
 15747  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 15748  			break
 15749  		}
 15750  		v_2_0_0_0 := v_2_0_0.Args[0]
 15751  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 15752  			break
 15753  		}
 15754  		bo := v_2_0_0_0.Args[0]
 15755  		v.reset(OpARM64SBCSflags)
 15756  		v.AddArg3(x, y, bo)
 15757  		return true
 15758  	}
 15759  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 15760  	// result: (SUBSflags x y)
 15761  	for {
 15762  		x := v_0
 15763  		y := v_1
 15764  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 15765  			break
 15766  		}
 15767  		v_2_0 := v_2.Args[0]
 15768  		if v_2_0.Op != OpARM64NEGSflags {
 15769  			break
 15770  		}
 15771  		v_2_0_0 := v_2_0.Args[0]
 15772  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 15773  			break
 15774  		}
 15775  		v.reset(OpARM64SUBSflags)
 15776  		v.AddArg2(x, y)
 15777  		return true
 15778  	}
 15779  	return false
 15780  }
 15781  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 15782  	v_0 := v.Args[0]
 15783  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 15784  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 15785  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 15786  	for {
 15787  		bfc := auxIntToArm64BitField(v.AuxInt)
 15788  		s := v_0
 15789  		if s.Op != OpARM64SLLconst {
 15790  			break
 15791  		}
 15792  		sc := auxIntToInt64(s.AuxInt)
 15793  		x := s.Args[0]
 15794  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 15795  			break
 15796  		}
 15797  		v.reset(OpARM64SBFX)
 15798  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15799  		v.AddArg(x)
 15800  		return true
 15801  	}
 15802  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 15803  	// cond: s.Uses == 1 && sc > bfc.lsb()
 15804  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 15805  	for {
 15806  		bfc := auxIntToArm64BitField(v.AuxInt)
 15807  		s := v_0
 15808  		if s.Op != OpARM64SLLconst {
 15809  			break
 15810  		}
 15811  		sc := auxIntToInt64(s.AuxInt)
 15812  		x := s.Args[0]
 15813  		if !(s.Uses == 1 && sc > bfc.lsb()) {
 15814  			break
 15815  		}
 15816  		v.reset(OpARM64SBFIZ)
 15817  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 15818  		v.AddArg(x)
 15819  		return true
 15820  	}
 15821  	return false
 15822  }
 15823  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 15824  	v_1 := v.Args[1]
 15825  	v_0 := v.Args[0]
 15826  	// match: (SLL x (MOVDconst [c]))
 15827  	// result: (SLLconst x [c&63])
 15828  	for {
 15829  		x := v_0
 15830  		if v_1.Op != OpARM64MOVDconst {
 15831  			break
 15832  		}
 15833  		c := auxIntToInt64(v_1.AuxInt)
 15834  		v.reset(OpARM64SLLconst)
 15835  		v.AuxInt = int64ToAuxInt(c & 63)
 15836  		v.AddArg(x)
 15837  		return true
 15838  	}
 15839  	// match: (SLL x (ANDconst [63] y))
 15840  	// result: (SLL x y)
 15841  	for {
 15842  		x := v_0
 15843  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 15844  			break
 15845  		}
 15846  		y := v_1.Args[0]
 15847  		v.reset(OpARM64SLL)
 15848  		v.AddArg2(x, y)
 15849  		return true
 15850  	}
 15851  	return false
 15852  }
 15853  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 15854  	v_0 := v.Args[0]
 15855  	// match: (SLLconst [c] (MOVDconst [d]))
 15856  	// result: (MOVDconst [d<<uint64(c)])
 15857  	for {
 15858  		c := auxIntToInt64(v.AuxInt)
 15859  		if v_0.Op != OpARM64MOVDconst {
 15860  			break
 15861  		}
 15862  		d := auxIntToInt64(v_0.AuxInt)
 15863  		v.reset(OpARM64MOVDconst)
 15864  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 15865  		return true
 15866  	}
 15867  	// match: (SLLconst [c] (SRLconst [c] x))
 15868  	// cond: 0 < c && c < 64
 15869  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 15870  	for {
 15871  		c := auxIntToInt64(v.AuxInt)
 15872  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15873  			break
 15874  		}
 15875  		x := v_0.Args[0]
 15876  		if !(0 < c && c < 64) {
 15877  			break
 15878  		}
 15879  		v.reset(OpARM64ANDconst)
 15880  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 15881  		v.AddArg(x)
 15882  		return true
 15883  	}
 15884  	// match: (SLLconst [lc] (MOVWreg x))
 15885  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 15886  	for {
 15887  		lc := auxIntToInt64(v.AuxInt)
 15888  		if v_0.Op != OpARM64MOVWreg {
 15889  			break
 15890  		}
 15891  		x := v_0.Args[0]
 15892  		v.reset(OpARM64SBFIZ)
 15893  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 15894  		v.AddArg(x)
 15895  		return true
 15896  	}
 15897  	// match: (SLLconst [lc] (MOVHreg x))
 15898  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 15899  	for {
 15900  		lc := auxIntToInt64(v.AuxInt)
 15901  		if v_0.Op != OpARM64MOVHreg {
 15902  			break
 15903  		}
 15904  		x := v_0.Args[0]
 15905  		v.reset(OpARM64SBFIZ)
 15906  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 15907  		v.AddArg(x)
 15908  		return true
 15909  	}
 15910  	// match: (SLLconst [lc] (MOVBreg x))
 15911  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 15912  	for {
 15913  		lc := auxIntToInt64(v.AuxInt)
 15914  		if v_0.Op != OpARM64MOVBreg {
 15915  			break
 15916  		}
 15917  		x := v_0.Args[0]
 15918  		v.reset(OpARM64SBFIZ)
 15919  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 15920  		v.AddArg(x)
 15921  		return true
 15922  	}
 15923  	// match: (SLLconst [lc] (MOVWUreg x))
 15924  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 15925  	for {
 15926  		lc := auxIntToInt64(v.AuxInt)
 15927  		if v_0.Op != OpARM64MOVWUreg {
 15928  			break
 15929  		}
 15930  		x := v_0.Args[0]
 15931  		v.reset(OpARM64UBFIZ)
 15932  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 15933  		v.AddArg(x)
 15934  		return true
 15935  	}
 15936  	// match: (SLLconst [lc] (MOVHUreg x))
 15937  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 15938  	for {
 15939  		lc := auxIntToInt64(v.AuxInt)
 15940  		if v_0.Op != OpARM64MOVHUreg {
 15941  			break
 15942  		}
 15943  		x := v_0.Args[0]
 15944  		v.reset(OpARM64UBFIZ)
 15945  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 15946  		v.AddArg(x)
 15947  		return true
 15948  	}
 15949  	// match: (SLLconst [lc] (MOVBUreg x))
 15950  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 15951  	for {
 15952  		lc := auxIntToInt64(v.AuxInt)
 15953  		if v_0.Op != OpARM64MOVBUreg {
 15954  			break
 15955  		}
 15956  		x := v_0.Args[0]
 15957  		v.reset(OpARM64UBFIZ)
 15958  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 15959  		v.AddArg(x)
 15960  		return true
 15961  	}
 15962  	// match: (SLLconst [sc] (ANDconst [ac] x))
 15963  	// cond: isARM64BFMask(sc, ac, 0)
 15964  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 15965  	for {
 15966  		sc := auxIntToInt64(v.AuxInt)
 15967  		if v_0.Op != OpARM64ANDconst {
 15968  			break
 15969  		}
 15970  		ac := auxIntToInt64(v_0.AuxInt)
 15971  		x := v_0.Args[0]
 15972  		if !(isARM64BFMask(sc, ac, 0)) {
 15973  			break
 15974  		}
 15975  		v.reset(OpARM64UBFIZ)
 15976  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 15977  		v.AddArg(x)
 15978  		return true
 15979  	}
 15980  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 15981  	// cond: sc+bfc.width()+bfc.lsb() < 64
 15982  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 15983  	for {
 15984  		sc := auxIntToInt64(v.AuxInt)
 15985  		if v_0.Op != OpARM64UBFIZ {
 15986  			break
 15987  		}
 15988  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 15989  		x := v_0.Args[0]
 15990  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 15991  			break
 15992  		}
 15993  		v.reset(OpARM64UBFIZ)
 15994  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 15995  		v.AddArg(x)
 15996  		return true
 15997  	}
 15998  	return false
 15999  }
 16000  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 16001  	v_1 := v.Args[1]
 16002  	v_0 := v.Args[0]
 16003  	// match: (SRA x (MOVDconst [c]))
 16004  	// result: (SRAconst x [c&63])
 16005  	for {
 16006  		x := v_0
 16007  		if v_1.Op != OpARM64MOVDconst {
 16008  			break
 16009  		}
 16010  		c := auxIntToInt64(v_1.AuxInt)
 16011  		v.reset(OpARM64SRAconst)
 16012  		v.AuxInt = int64ToAuxInt(c & 63)
 16013  		v.AddArg(x)
 16014  		return true
 16015  	}
 16016  	// match: (SRA x (ANDconst [63] y))
 16017  	// result: (SRA x y)
 16018  	for {
 16019  		x := v_0
 16020  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16021  			break
 16022  		}
 16023  		y := v_1.Args[0]
 16024  		v.reset(OpARM64SRA)
 16025  		v.AddArg2(x, y)
 16026  		return true
 16027  	}
 16028  	return false
 16029  }
 16030  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 16031  	v_0 := v.Args[0]
 16032  	// match: (SRAconst [c] (MOVDconst [d]))
 16033  	// result: (MOVDconst [d>>uint64(c)])
 16034  	for {
 16035  		c := auxIntToInt64(v.AuxInt)
 16036  		if v_0.Op != OpARM64MOVDconst {
 16037  			break
 16038  		}
 16039  		d := auxIntToInt64(v_0.AuxInt)
 16040  		v.reset(OpARM64MOVDconst)
 16041  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 16042  		return true
 16043  	}
 16044  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16045  	// cond: lc > rc
 16046  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16047  	for {
 16048  		rc := auxIntToInt64(v.AuxInt)
 16049  		if v_0.Op != OpARM64SLLconst {
 16050  			break
 16051  		}
 16052  		lc := auxIntToInt64(v_0.AuxInt)
 16053  		x := v_0.Args[0]
 16054  		if !(lc > rc) {
 16055  			break
 16056  		}
 16057  		v.reset(OpARM64SBFIZ)
 16058  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16059  		v.AddArg(x)
 16060  		return true
 16061  	}
 16062  	// match: (SRAconst [rc] (SLLconst [lc] x))
 16063  	// cond: lc <= rc
 16064  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16065  	for {
 16066  		rc := auxIntToInt64(v.AuxInt)
 16067  		if v_0.Op != OpARM64SLLconst {
 16068  			break
 16069  		}
 16070  		lc := auxIntToInt64(v_0.AuxInt)
 16071  		x := v_0.Args[0]
 16072  		if !(lc <= rc) {
 16073  			break
 16074  		}
 16075  		v.reset(OpARM64SBFX)
 16076  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16077  		v.AddArg(x)
 16078  		return true
 16079  	}
 16080  	// match: (SRAconst [rc] (MOVWreg x))
 16081  	// cond: rc < 32
 16082  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 16083  	for {
 16084  		rc := auxIntToInt64(v.AuxInt)
 16085  		if v_0.Op != OpARM64MOVWreg {
 16086  			break
 16087  		}
 16088  		x := v_0.Args[0]
 16089  		if !(rc < 32) {
 16090  			break
 16091  		}
 16092  		v.reset(OpARM64SBFX)
 16093  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16094  		v.AddArg(x)
 16095  		return true
 16096  	}
 16097  	// match: (SRAconst [rc] (MOVHreg x))
 16098  	// cond: rc < 16
 16099  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 16100  	for {
 16101  		rc := auxIntToInt64(v.AuxInt)
 16102  		if v_0.Op != OpARM64MOVHreg {
 16103  			break
 16104  		}
 16105  		x := v_0.Args[0]
 16106  		if !(rc < 16) {
 16107  			break
 16108  		}
 16109  		v.reset(OpARM64SBFX)
 16110  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16111  		v.AddArg(x)
 16112  		return true
 16113  	}
 16114  	// match: (SRAconst [rc] (MOVBreg x))
 16115  	// cond: rc < 8
 16116  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 16117  	for {
 16118  		rc := auxIntToInt64(v.AuxInt)
 16119  		if v_0.Op != OpARM64MOVBreg {
 16120  			break
 16121  		}
 16122  		x := v_0.Args[0]
 16123  		if !(rc < 8) {
 16124  			break
 16125  		}
 16126  		v.reset(OpARM64SBFX)
 16127  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16128  		v.AddArg(x)
 16129  		return true
 16130  	}
 16131  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16132  	// cond: sc < bfc.lsb()
 16133  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16134  	for {
 16135  		sc := auxIntToInt64(v.AuxInt)
 16136  		if v_0.Op != OpARM64SBFIZ {
 16137  			break
 16138  		}
 16139  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16140  		x := v_0.Args[0]
 16141  		if !(sc < bfc.lsb()) {
 16142  			break
 16143  		}
 16144  		v.reset(OpARM64SBFIZ)
 16145  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16146  		v.AddArg(x)
 16147  		return true
 16148  	}
 16149  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 16150  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16151  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16152  	for {
 16153  		sc := auxIntToInt64(v.AuxInt)
 16154  		if v_0.Op != OpARM64SBFIZ {
 16155  			break
 16156  		}
 16157  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16158  		x := v_0.Args[0]
 16159  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16160  			break
 16161  		}
 16162  		v.reset(OpARM64SBFX)
 16163  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16164  		v.AddArg(x)
 16165  		return true
 16166  	}
 16167  	return false
 16168  }
 16169  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 16170  	v_1 := v.Args[1]
 16171  	v_0 := v.Args[0]
 16172  	// match: (SRL x (MOVDconst [c]))
 16173  	// result: (SRLconst x [c&63])
 16174  	for {
 16175  		x := v_0
 16176  		if v_1.Op != OpARM64MOVDconst {
 16177  			break
 16178  		}
 16179  		c := auxIntToInt64(v_1.AuxInt)
 16180  		v.reset(OpARM64SRLconst)
 16181  		v.AuxInt = int64ToAuxInt(c & 63)
 16182  		v.AddArg(x)
 16183  		return true
 16184  	}
 16185  	// match: (SRL x (ANDconst [63] y))
 16186  	// result: (SRL x y)
 16187  	for {
 16188  		x := v_0
 16189  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 16190  			break
 16191  		}
 16192  		y := v_1.Args[0]
 16193  		v.reset(OpARM64SRL)
 16194  		v.AddArg2(x, y)
 16195  		return true
 16196  	}
 16197  	return false
 16198  }
 16199  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 16200  	v_0 := v.Args[0]
 16201  	// match: (SRLconst [c] (MOVDconst [d]))
 16202  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 16203  	for {
 16204  		c := auxIntToInt64(v.AuxInt)
 16205  		if v_0.Op != OpARM64MOVDconst {
 16206  			break
 16207  		}
 16208  		d := auxIntToInt64(v_0.AuxInt)
 16209  		v.reset(OpARM64MOVDconst)
 16210  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 16211  		return true
 16212  	}
 16213  	// match: (SRLconst [c] (SLLconst [c] x))
 16214  	// cond: 0 < c && c < 64
 16215  	// result: (ANDconst [1<<uint(64-c)-1] x)
 16216  	for {
 16217  		c := auxIntToInt64(v.AuxInt)
 16218  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16219  			break
 16220  		}
 16221  		x := v_0.Args[0]
 16222  		if !(0 < c && c < 64) {
 16223  			break
 16224  		}
 16225  		v.reset(OpARM64ANDconst)
 16226  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 16227  		v.AddArg(x)
 16228  		return true
 16229  	}
 16230  	// match: (SRLconst [rc] (MOVWUreg x))
 16231  	// cond: rc >= 32
 16232  	// result: (MOVDconst [0])
 16233  	for {
 16234  		rc := auxIntToInt64(v.AuxInt)
 16235  		if v_0.Op != OpARM64MOVWUreg {
 16236  			break
 16237  		}
 16238  		if !(rc >= 32) {
 16239  			break
 16240  		}
 16241  		v.reset(OpARM64MOVDconst)
 16242  		v.AuxInt = int64ToAuxInt(0)
 16243  		return true
 16244  	}
 16245  	// match: (SRLconst [rc] (MOVHUreg x))
 16246  	// cond: rc >= 16
 16247  	// result: (MOVDconst [0])
 16248  	for {
 16249  		rc := auxIntToInt64(v.AuxInt)
 16250  		if v_0.Op != OpARM64MOVHUreg {
 16251  			break
 16252  		}
 16253  		if !(rc >= 16) {
 16254  			break
 16255  		}
 16256  		v.reset(OpARM64MOVDconst)
 16257  		v.AuxInt = int64ToAuxInt(0)
 16258  		return true
 16259  	}
 16260  	// match: (SRLconst [rc] (MOVBUreg x))
 16261  	// cond: rc >= 8
 16262  	// result: (MOVDconst [0])
 16263  	for {
 16264  		rc := auxIntToInt64(v.AuxInt)
 16265  		if v_0.Op != OpARM64MOVBUreg {
 16266  			break
 16267  		}
 16268  		if !(rc >= 8) {
 16269  			break
 16270  		}
 16271  		v.reset(OpARM64MOVDconst)
 16272  		v.AuxInt = int64ToAuxInt(0)
 16273  		return true
 16274  	}
 16275  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16276  	// cond: lc > rc
 16277  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 16278  	for {
 16279  		rc := auxIntToInt64(v.AuxInt)
 16280  		if v_0.Op != OpARM64SLLconst {
 16281  			break
 16282  		}
 16283  		lc := auxIntToInt64(v_0.AuxInt)
 16284  		x := v_0.Args[0]
 16285  		if !(lc > rc) {
 16286  			break
 16287  		}
 16288  		v.reset(OpARM64UBFIZ)
 16289  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 16290  		v.AddArg(x)
 16291  		return true
 16292  	}
 16293  	// match: (SRLconst [rc] (SLLconst [lc] x))
 16294  	// cond: lc < rc
 16295  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 16296  	for {
 16297  		rc := auxIntToInt64(v.AuxInt)
 16298  		if v_0.Op != OpARM64SLLconst {
 16299  			break
 16300  		}
 16301  		lc := auxIntToInt64(v_0.AuxInt)
 16302  		x := v_0.Args[0]
 16303  		if !(lc < rc) {
 16304  			break
 16305  		}
 16306  		v.reset(OpARM64UBFX)
 16307  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 16308  		v.AddArg(x)
 16309  		return true
 16310  	}
 16311  	// match: (SRLconst [rc] (MOVWUreg x))
 16312  	// cond: rc < 32
 16313  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 16314  	for {
 16315  		rc := auxIntToInt64(v.AuxInt)
 16316  		if v_0.Op != OpARM64MOVWUreg {
 16317  			break
 16318  		}
 16319  		x := v_0.Args[0]
 16320  		if !(rc < 32) {
 16321  			break
 16322  		}
 16323  		v.reset(OpARM64UBFX)
 16324  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 16325  		v.AddArg(x)
 16326  		return true
 16327  	}
 16328  	// match: (SRLconst [rc] (MOVHUreg x))
 16329  	// cond: rc < 16
 16330  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 16331  	for {
 16332  		rc := auxIntToInt64(v.AuxInt)
 16333  		if v_0.Op != OpARM64MOVHUreg {
 16334  			break
 16335  		}
 16336  		x := v_0.Args[0]
 16337  		if !(rc < 16) {
 16338  			break
 16339  		}
 16340  		v.reset(OpARM64UBFX)
 16341  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 16342  		v.AddArg(x)
 16343  		return true
 16344  	}
 16345  	// match: (SRLconst [rc] (MOVBUreg x))
 16346  	// cond: rc < 8
 16347  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 16348  	for {
 16349  		rc := auxIntToInt64(v.AuxInt)
 16350  		if v_0.Op != OpARM64MOVBUreg {
 16351  			break
 16352  		}
 16353  		x := v_0.Args[0]
 16354  		if !(rc < 8) {
 16355  			break
 16356  		}
 16357  		v.reset(OpARM64UBFX)
 16358  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 16359  		v.AddArg(x)
 16360  		return true
 16361  	}
 16362  	// match: (SRLconst [sc] (ANDconst [ac] x))
 16363  	// cond: isARM64BFMask(sc, ac, sc)
 16364  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 16365  	for {
 16366  		sc := auxIntToInt64(v.AuxInt)
 16367  		if v_0.Op != OpARM64ANDconst {
 16368  			break
 16369  		}
 16370  		ac := auxIntToInt64(v_0.AuxInt)
 16371  		x := v_0.Args[0]
 16372  		if !(isARM64BFMask(sc, ac, sc)) {
 16373  			break
 16374  		}
 16375  		v.reset(OpARM64UBFX)
 16376  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 16377  		v.AddArg(x)
 16378  		return true
 16379  	}
 16380  	// match: (SRLconst [sc] (UBFX [bfc] x))
 16381  	// cond: sc < bfc.width()
 16382  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 16383  	for {
 16384  		sc := auxIntToInt64(v.AuxInt)
 16385  		if v_0.Op != OpARM64UBFX {
 16386  			break
 16387  		}
 16388  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16389  		x := v_0.Args[0]
 16390  		if !(sc < bfc.width()) {
 16391  			break
 16392  		}
 16393  		v.reset(OpARM64UBFX)
 16394  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 16395  		v.AddArg(x)
 16396  		return true
 16397  	}
 16398  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16399  	// cond: sc == bfc.lsb()
 16400  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 16401  	for {
 16402  		sc := auxIntToInt64(v.AuxInt)
 16403  		if v_0.Op != OpARM64UBFIZ {
 16404  			break
 16405  		}
 16406  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16407  		x := v_0.Args[0]
 16408  		if !(sc == bfc.lsb()) {
 16409  			break
 16410  		}
 16411  		v.reset(OpARM64ANDconst)
 16412  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 16413  		v.AddArg(x)
 16414  		return true
 16415  	}
 16416  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16417  	// cond: sc < bfc.lsb()
 16418  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 16419  	for {
 16420  		sc := auxIntToInt64(v.AuxInt)
 16421  		if v_0.Op != OpARM64UBFIZ {
 16422  			break
 16423  		}
 16424  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16425  		x := v_0.Args[0]
 16426  		if !(sc < bfc.lsb()) {
 16427  			break
 16428  		}
 16429  		v.reset(OpARM64UBFIZ)
 16430  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 16431  		v.AddArg(x)
 16432  		return true
 16433  	}
 16434  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 16435  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 16436  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 16437  	for {
 16438  		sc := auxIntToInt64(v.AuxInt)
 16439  		if v_0.Op != OpARM64UBFIZ {
 16440  			break
 16441  		}
 16442  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16443  		x := v_0.Args[0]
 16444  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 16445  			break
 16446  		}
 16447  		v.reset(OpARM64UBFX)
 16448  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 16449  		v.AddArg(x)
 16450  		return true
 16451  	}
 16452  	return false
 16453  }
 16454  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 16455  	v_3 := v.Args[3]
 16456  	v_2 := v.Args[2]
 16457  	v_1 := v.Args[1]
 16458  	v_0 := v.Args[0]
 16459  	b := v.Block
 16460  	config := b.Func.Config
 16461  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 16462  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16463  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 16464  	for {
 16465  		off1 := auxIntToInt32(v.AuxInt)
 16466  		sym := auxToSym(v.Aux)
 16467  		if v_0.Op != OpARM64ADDconst {
 16468  			break
 16469  		}
 16470  		off2 := auxIntToInt64(v_0.AuxInt)
 16471  		ptr := v_0.Args[0]
 16472  		val1 := v_1
 16473  		val2 := v_2
 16474  		mem := v_3
 16475  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16476  			break
 16477  		}
 16478  		v.reset(OpARM64STP)
 16479  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 16480  		v.Aux = symToAux(sym)
 16481  		v.AddArg4(ptr, val1, val2, mem)
 16482  		return true
 16483  	}
 16484  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 16485  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 16486  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 16487  	for {
 16488  		off1 := auxIntToInt32(v.AuxInt)
 16489  		sym1 := auxToSym(v.Aux)
 16490  		if v_0.Op != OpARM64MOVDaddr {
 16491  			break
 16492  		}
 16493  		off2 := auxIntToInt32(v_0.AuxInt)
 16494  		sym2 := auxToSym(v_0.Aux)
 16495  		ptr := v_0.Args[0]
 16496  		val1 := v_1
 16497  		val2 := v_2
 16498  		mem := v_3
 16499  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 16500  			break
 16501  		}
 16502  		v.reset(OpARM64STP)
 16503  		v.AuxInt = int32ToAuxInt(off1 + off2)
 16504  		v.Aux = symToAux(mergeSym(sym1, sym2))
 16505  		v.AddArg4(ptr, val1, val2, mem)
 16506  		return true
 16507  	}
 16508  	// match: (STP [off] {sym} ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 16509  	// result: (MOVQstorezero [off] {sym} ptr mem)
 16510  	for {
 16511  		off := auxIntToInt32(v.AuxInt)
 16512  		sym := auxToSym(v.Aux)
 16513  		ptr := v_0
 16514  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 || v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 16515  			break
 16516  		}
 16517  		mem := v_3
 16518  		v.reset(OpARM64MOVQstorezero)
 16519  		v.AuxInt = int32ToAuxInt(off)
 16520  		v.Aux = symToAux(sym)
 16521  		v.AddArg2(ptr, mem)
 16522  		return true
 16523  	}
 16524  	return false
 16525  }
 16526  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 16527  	v_1 := v.Args[1]
 16528  	v_0 := v.Args[0]
 16529  	b := v.Block
 16530  	// match: (SUB x (MOVDconst [c]))
 16531  	// result: (SUBconst [c] x)
 16532  	for {
 16533  		x := v_0
 16534  		if v_1.Op != OpARM64MOVDconst {
 16535  			break
 16536  		}
 16537  		c := auxIntToInt64(v_1.AuxInt)
 16538  		v.reset(OpARM64SUBconst)
 16539  		v.AuxInt = int64ToAuxInt(c)
 16540  		v.AddArg(x)
 16541  		return true
 16542  	}
 16543  	// match: (SUB a l:(MUL x y))
 16544  	// cond: l.Uses==1 && clobber(l)
 16545  	// result: (MSUB a x y)
 16546  	for {
 16547  		a := v_0
 16548  		l := v_1
 16549  		if l.Op != OpARM64MUL {
 16550  			break
 16551  		}
 16552  		y := l.Args[1]
 16553  		x := l.Args[0]
 16554  		if !(l.Uses == 1 && clobber(l)) {
 16555  			break
 16556  		}
 16557  		v.reset(OpARM64MSUB)
 16558  		v.AddArg3(a, x, y)
 16559  		return true
 16560  	}
 16561  	// match: (SUB a l:(MNEG x y))
 16562  	// cond: l.Uses==1 && clobber(l)
 16563  	// result: (MADD a x y)
 16564  	for {
 16565  		a := v_0
 16566  		l := v_1
 16567  		if l.Op != OpARM64MNEG {
 16568  			break
 16569  		}
 16570  		y := l.Args[1]
 16571  		x := l.Args[0]
 16572  		if !(l.Uses == 1 && clobber(l)) {
 16573  			break
 16574  		}
 16575  		v.reset(OpARM64MADD)
 16576  		v.AddArg3(a, x, y)
 16577  		return true
 16578  	}
 16579  	// match: (SUB a l:(MULW x y))
 16580  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16581  	// result: (MSUBW a x y)
 16582  	for {
 16583  		a := v_0
 16584  		l := v_1
 16585  		if l.Op != OpARM64MULW {
 16586  			break
 16587  		}
 16588  		y := l.Args[1]
 16589  		x := l.Args[0]
 16590  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16591  			break
 16592  		}
 16593  		v.reset(OpARM64MSUBW)
 16594  		v.AddArg3(a, x, y)
 16595  		return true
 16596  	}
 16597  	// match: (SUB a l:(MNEGW x y))
 16598  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 16599  	// result: (MADDW a x y)
 16600  	for {
 16601  		a := v_0
 16602  		l := v_1
 16603  		if l.Op != OpARM64MNEGW {
 16604  			break
 16605  		}
 16606  		y := l.Args[1]
 16607  		x := l.Args[0]
 16608  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 16609  			break
 16610  		}
 16611  		v.reset(OpARM64MADDW)
 16612  		v.AddArg3(a, x, y)
 16613  		return true
 16614  	}
 16615  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 16616  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16617  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16618  	for {
 16619  		t := v.Type
 16620  		a := v_0
 16621  		p := v_1
 16622  		if p.Op != OpARM64ADDconst {
 16623  			break
 16624  		}
 16625  		c := auxIntToInt64(p.AuxInt)
 16626  		m := p.Args[0]
 16627  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16628  			break
 16629  		}
 16630  		v.reset(OpARM64SUBconst)
 16631  		v.AuxInt = int64ToAuxInt(c)
 16632  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16633  		v0.AddArg2(a, m)
 16634  		v.AddArg(v0)
 16635  		return true
 16636  	}
 16637  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 16638  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16639  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16640  	for {
 16641  		t := v.Type
 16642  		a := v_0
 16643  		p := v_1
 16644  		if p.Op != OpARM64ADDconst {
 16645  			break
 16646  		}
 16647  		c := auxIntToInt64(p.AuxInt)
 16648  		m := p.Args[0]
 16649  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16650  			break
 16651  		}
 16652  		v.reset(OpARM64SUBconst)
 16653  		v.AuxInt = int64ToAuxInt(c)
 16654  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16655  		v0.AddArg2(a, m)
 16656  		v.AddArg(v0)
 16657  		return true
 16658  	}
 16659  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 16660  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16661  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16662  	for {
 16663  		t := v.Type
 16664  		a := v_0
 16665  		p := v_1
 16666  		if p.Op != OpARM64ADDconst {
 16667  			break
 16668  		}
 16669  		c := auxIntToInt64(p.AuxInt)
 16670  		m := p.Args[0]
 16671  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16672  			break
 16673  		}
 16674  		v.reset(OpARM64SUBconst)
 16675  		v.AuxInt = int64ToAuxInt(c)
 16676  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16677  		v0.AddArg2(a, m)
 16678  		v.AddArg(v0)
 16679  		return true
 16680  	}
 16681  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 16682  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16683  	// result: (SUBconst [c] (SUB <v.Type> a m))
 16684  	for {
 16685  		t := v.Type
 16686  		a := v_0
 16687  		p := v_1
 16688  		if p.Op != OpARM64ADDconst {
 16689  			break
 16690  		}
 16691  		c := auxIntToInt64(p.AuxInt)
 16692  		m := p.Args[0]
 16693  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16694  			break
 16695  		}
 16696  		v.reset(OpARM64SUBconst)
 16697  		v.AuxInt = int64ToAuxInt(c)
 16698  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16699  		v0.AddArg2(a, m)
 16700  		v.AddArg(v0)
 16701  		return true
 16702  	}
 16703  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 16704  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16705  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16706  	for {
 16707  		t := v.Type
 16708  		a := v_0
 16709  		p := v_1
 16710  		if p.Op != OpARM64SUBconst {
 16711  			break
 16712  		}
 16713  		c := auxIntToInt64(p.AuxInt)
 16714  		m := p.Args[0]
 16715  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16716  			break
 16717  		}
 16718  		v.reset(OpARM64ADDconst)
 16719  		v.AuxInt = int64ToAuxInt(c)
 16720  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16721  		v0.AddArg2(a, m)
 16722  		v.AddArg(v0)
 16723  		return true
 16724  	}
 16725  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 16726  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16727  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16728  	for {
 16729  		t := v.Type
 16730  		a := v_0
 16731  		p := v_1
 16732  		if p.Op != OpARM64SUBconst {
 16733  			break
 16734  		}
 16735  		c := auxIntToInt64(p.AuxInt)
 16736  		m := p.Args[0]
 16737  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16738  			break
 16739  		}
 16740  		v.reset(OpARM64ADDconst)
 16741  		v.AuxInt = int64ToAuxInt(c)
 16742  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16743  		v0.AddArg2(a, m)
 16744  		v.AddArg(v0)
 16745  		return true
 16746  	}
 16747  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 16748  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16749  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16750  	for {
 16751  		t := v.Type
 16752  		a := v_0
 16753  		p := v_1
 16754  		if p.Op != OpARM64SUBconst {
 16755  			break
 16756  		}
 16757  		c := auxIntToInt64(p.AuxInt)
 16758  		m := p.Args[0]
 16759  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16760  			break
 16761  		}
 16762  		v.reset(OpARM64ADDconst)
 16763  		v.AuxInt = int64ToAuxInt(c)
 16764  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16765  		v0.AddArg2(a, m)
 16766  		v.AddArg(v0)
 16767  		return true
 16768  	}
 16769  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 16770  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 16771  	// result: (ADDconst [c] (SUB <v.Type> a m))
 16772  	for {
 16773  		t := v.Type
 16774  		a := v_0
 16775  		p := v_1
 16776  		if p.Op != OpARM64SUBconst {
 16777  			break
 16778  		}
 16779  		c := auxIntToInt64(p.AuxInt)
 16780  		m := p.Args[0]
 16781  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 16782  			break
 16783  		}
 16784  		v.reset(OpARM64ADDconst)
 16785  		v.AuxInt = int64ToAuxInt(c)
 16786  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 16787  		v0.AddArg2(a, m)
 16788  		v.AddArg(v0)
 16789  		return true
 16790  	}
 16791  	// match: (SUB x x)
 16792  	// result: (MOVDconst [0])
 16793  	for {
 16794  		x := v_0
 16795  		if x != v_1 {
 16796  			break
 16797  		}
 16798  		v.reset(OpARM64MOVDconst)
 16799  		v.AuxInt = int64ToAuxInt(0)
 16800  		return true
 16801  	}
 16802  	// match: (SUB x (SUB y z))
 16803  	// result: (SUB (ADD <v.Type> x z) y)
 16804  	for {
 16805  		x := v_0
 16806  		if v_1.Op != OpARM64SUB {
 16807  			break
 16808  		}
 16809  		z := v_1.Args[1]
 16810  		y := v_1.Args[0]
 16811  		v.reset(OpARM64SUB)
 16812  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 16813  		v0.AddArg2(x, z)
 16814  		v.AddArg2(v0, y)
 16815  		return true
 16816  	}
 16817  	// match: (SUB (SUB x y) z)
 16818  	// result: (SUB x (ADD <y.Type> y z))
 16819  	for {
 16820  		if v_0.Op != OpARM64SUB {
 16821  			break
 16822  		}
 16823  		y := v_0.Args[1]
 16824  		x := v_0.Args[0]
 16825  		z := v_1
 16826  		v.reset(OpARM64SUB)
 16827  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 16828  		v0.AddArg2(y, z)
 16829  		v.AddArg2(x, v0)
 16830  		return true
 16831  	}
 16832  	// match: (SUB x0 x1:(SLLconst [c] y))
 16833  	// cond: clobberIfDead(x1)
 16834  	// result: (SUBshiftLL x0 y [c])
 16835  	for {
 16836  		x0 := v_0
 16837  		x1 := v_1
 16838  		if x1.Op != OpARM64SLLconst {
 16839  			break
 16840  		}
 16841  		c := auxIntToInt64(x1.AuxInt)
 16842  		y := x1.Args[0]
 16843  		if !(clobberIfDead(x1)) {
 16844  			break
 16845  		}
 16846  		v.reset(OpARM64SUBshiftLL)
 16847  		v.AuxInt = int64ToAuxInt(c)
 16848  		v.AddArg2(x0, y)
 16849  		return true
 16850  	}
 16851  	// match: (SUB x0 x1:(SRLconst [c] y))
 16852  	// cond: clobberIfDead(x1)
 16853  	// result: (SUBshiftRL x0 y [c])
 16854  	for {
 16855  		x0 := v_0
 16856  		x1 := v_1
 16857  		if x1.Op != OpARM64SRLconst {
 16858  			break
 16859  		}
 16860  		c := auxIntToInt64(x1.AuxInt)
 16861  		y := x1.Args[0]
 16862  		if !(clobberIfDead(x1)) {
 16863  			break
 16864  		}
 16865  		v.reset(OpARM64SUBshiftRL)
 16866  		v.AuxInt = int64ToAuxInt(c)
 16867  		v.AddArg2(x0, y)
 16868  		return true
 16869  	}
 16870  	// match: (SUB x0 x1:(SRAconst [c] y))
 16871  	// cond: clobberIfDead(x1)
 16872  	// result: (SUBshiftRA x0 y [c])
 16873  	for {
 16874  		x0 := v_0
 16875  		x1 := v_1
 16876  		if x1.Op != OpARM64SRAconst {
 16877  			break
 16878  		}
 16879  		c := auxIntToInt64(x1.AuxInt)
 16880  		y := x1.Args[0]
 16881  		if !(clobberIfDead(x1)) {
 16882  			break
 16883  		}
 16884  		v.reset(OpARM64SUBshiftRA)
 16885  		v.AuxInt = int64ToAuxInt(c)
 16886  		v.AddArg2(x0, y)
 16887  		return true
 16888  	}
 16889  	return false
 16890  }
 16891  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 16892  	v_0 := v.Args[0]
 16893  	// match: (SUBconst [0] x)
 16894  	// result: x
 16895  	for {
 16896  		if auxIntToInt64(v.AuxInt) != 0 {
 16897  			break
 16898  		}
 16899  		x := v_0
 16900  		v.copyOf(x)
 16901  		return true
 16902  	}
 16903  	// match: (SUBconst [c] (MOVDconst [d]))
 16904  	// result: (MOVDconst [d-c])
 16905  	for {
 16906  		c := auxIntToInt64(v.AuxInt)
 16907  		if v_0.Op != OpARM64MOVDconst {
 16908  			break
 16909  		}
 16910  		d := auxIntToInt64(v_0.AuxInt)
 16911  		v.reset(OpARM64MOVDconst)
 16912  		v.AuxInt = int64ToAuxInt(d - c)
 16913  		return true
 16914  	}
 16915  	// match: (SUBconst [c] (SUBconst [d] x))
 16916  	// result: (ADDconst [-c-d] x)
 16917  	for {
 16918  		c := auxIntToInt64(v.AuxInt)
 16919  		if v_0.Op != OpARM64SUBconst {
 16920  			break
 16921  		}
 16922  		d := auxIntToInt64(v_0.AuxInt)
 16923  		x := v_0.Args[0]
 16924  		v.reset(OpARM64ADDconst)
 16925  		v.AuxInt = int64ToAuxInt(-c - d)
 16926  		v.AddArg(x)
 16927  		return true
 16928  	}
 16929  	// match: (SUBconst [c] (ADDconst [d] x))
 16930  	// result: (ADDconst [-c+d] x)
 16931  	for {
 16932  		c := auxIntToInt64(v.AuxInt)
 16933  		if v_0.Op != OpARM64ADDconst {
 16934  			break
 16935  		}
 16936  		d := auxIntToInt64(v_0.AuxInt)
 16937  		x := v_0.Args[0]
 16938  		v.reset(OpARM64ADDconst)
 16939  		v.AuxInt = int64ToAuxInt(-c + d)
 16940  		v.AddArg(x)
 16941  		return true
 16942  	}
 16943  	return false
 16944  }
 16945  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 16946  	v_1 := v.Args[1]
 16947  	v_0 := v.Args[0]
 16948  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 16949  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 16950  	for {
 16951  		d := auxIntToInt64(v.AuxInt)
 16952  		x := v_0
 16953  		if v_1.Op != OpARM64MOVDconst {
 16954  			break
 16955  		}
 16956  		c := auxIntToInt64(v_1.AuxInt)
 16957  		v.reset(OpARM64SUBconst)
 16958  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 16959  		v.AddArg(x)
 16960  		return true
 16961  	}
 16962  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 16963  	// result: (MOVDconst [0])
 16964  	for {
 16965  		c := auxIntToInt64(v.AuxInt)
 16966  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16967  			break
 16968  		}
 16969  		x := v_0.Args[0]
 16970  		if x != v_1 {
 16971  			break
 16972  		}
 16973  		v.reset(OpARM64MOVDconst)
 16974  		v.AuxInt = int64ToAuxInt(0)
 16975  		return true
 16976  	}
 16977  	return false
 16978  }
 16979  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 16980  	v_1 := v.Args[1]
 16981  	v_0 := v.Args[0]
 16982  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 16983  	// result: (SUBconst x [c>>uint64(d)])
 16984  	for {
 16985  		d := auxIntToInt64(v.AuxInt)
 16986  		x := v_0
 16987  		if v_1.Op != OpARM64MOVDconst {
 16988  			break
 16989  		}
 16990  		c := auxIntToInt64(v_1.AuxInt)
 16991  		v.reset(OpARM64SUBconst)
 16992  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 16993  		v.AddArg(x)
 16994  		return true
 16995  	}
 16996  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 16997  	// result: (MOVDconst [0])
 16998  	for {
 16999  		c := auxIntToInt64(v.AuxInt)
 17000  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 17001  			break
 17002  		}
 17003  		x := v_0.Args[0]
 17004  		if x != v_1 {
 17005  			break
 17006  		}
 17007  		v.reset(OpARM64MOVDconst)
 17008  		v.AuxInt = int64ToAuxInt(0)
 17009  		return true
 17010  	}
 17011  	return false
 17012  }
 17013  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 17014  	v_1 := v.Args[1]
 17015  	v_0 := v.Args[0]
 17016  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 17017  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 17018  	for {
 17019  		d := auxIntToInt64(v.AuxInt)
 17020  		x := v_0
 17021  		if v_1.Op != OpARM64MOVDconst {
 17022  			break
 17023  		}
 17024  		c := auxIntToInt64(v_1.AuxInt)
 17025  		v.reset(OpARM64SUBconst)
 17026  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17027  		v.AddArg(x)
 17028  		return true
 17029  	}
 17030  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 17031  	// result: (MOVDconst [0])
 17032  	for {
 17033  		c := auxIntToInt64(v.AuxInt)
 17034  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 17035  			break
 17036  		}
 17037  		x := v_0.Args[0]
 17038  		if x != v_1 {
 17039  			break
 17040  		}
 17041  		v.reset(OpARM64MOVDconst)
 17042  		v.AuxInt = int64ToAuxInt(0)
 17043  		return true
 17044  	}
 17045  	return false
 17046  }
 17047  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 17048  	v_1 := v.Args[1]
 17049  	v_0 := v.Args[0]
 17050  	// match: (TST x (MOVDconst [c]))
 17051  	// result: (TSTconst [c] x)
 17052  	for {
 17053  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17054  			x := v_0
 17055  			if v_1.Op != OpARM64MOVDconst {
 17056  				continue
 17057  			}
 17058  			c := auxIntToInt64(v_1.AuxInt)
 17059  			v.reset(OpARM64TSTconst)
 17060  			v.AuxInt = int64ToAuxInt(c)
 17061  			v.AddArg(x)
 17062  			return true
 17063  		}
 17064  		break
 17065  	}
 17066  	// match: (TST x0 x1:(SLLconst [c] y))
 17067  	// cond: clobberIfDead(x1)
 17068  	// result: (TSTshiftLL x0 y [c])
 17069  	for {
 17070  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17071  			x0 := v_0
 17072  			x1 := v_1
 17073  			if x1.Op != OpARM64SLLconst {
 17074  				continue
 17075  			}
 17076  			c := auxIntToInt64(x1.AuxInt)
 17077  			y := x1.Args[0]
 17078  			if !(clobberIfDead(x1)) {
 17079  				continue
 17080  			}
 17081  			v.reset(OpARM64TSTshiftLL)
 17082  			v.AuxInt = int64ToAuxInt(c)
 17083  			v.AddArg2(x0, y)
 17084  			return true
 17085  		}
 17086  		break
 17087  	}
 17088  	// match: (TST x0 x1:(SRLconst [c] y))
 17089  	// cond: clobberIfDead(x1)
 17090  	// result: (TSTshiftRL x0 y [c])
 17091  	for {
 17092  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17093  			x0 := v_0
 17094  			x1 := v_1
 17095  			if x1.Op != OpARM64SRLconst {
 17096  				continue
 17097  			}
 17098  			c := auxIntToInt64(x1.AuxInt)
 17099  			y := x1.Args[0]
 17100  			if !(clobberIfDead(x1)) {
 17101  				continue
 17102  			}
 17103  			v.reset(OpARM64TSTshiftRL)
 17104  			v.AuxInt = int64ToAuxInt(c)
 17105  			v.AddArg2(x0, y)
 17106  			return true
 17107  		}
 17108  		break
 17109  	}
 17110  	// match: (TST x0 x1:(SRAconst [c] y))
 17111  	// cond: clobberIfDead(x1)
 17112  	// result: (TSTshiftRA x0 y [c])
 17113  	for {
 17114  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17115  			x0 := v_0
 17116  			x1 := v_1
 17117  			if x1.Op != OpARM64SRAconst {
 17118  				continue
 17119  			}
 17120  			c := auxIntToInt64(x1.AuxInt)
 17121  			y := x1.Args[0]
 17122  			if !(clobberIfDead(x1)) {
 17123  				continue
 17124  			}
 17125  			v.reset(OpARM64TSTshiftRA)
 17126  			v.AuxInt = int64ToAuxInt(c)
 17127  			v.AddArg2(x0, y)
 17128  			return true
 17129  		}
 17130  		break
 17131  	}
 17132  	// match: (TST x0 x1:(RORconst [c] y))
 17133  	// cond: clobberIfDead(x1)
 17134  	// result: (TSTshiftRO x0 y [c])
 17135  	for {
 17136  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17137  			x0 := v_0
 17138  			x1 := v_1
 17139  			if x1.Op != OpARM64RORconst {
 17140  				continue
 17141  			}
 17142  			c := auxIntToInt64(x1.AuxInt)
 17143  			y := x1.Args[0]
 17144  			if !(clobberIfDead(x1)) {
 17145  				continue
 17146  			}
 17147  			v.reset(OpARM64TSTshiftRO)
 17148  			v.AuxInt = int64ToAuxInt(c)
 17149  			v.AddArg2(x0, y)
 17150  			return true
 17151  		}
 17152  		break
 17153  	}
 17154  	return false
 17155  }
 17156  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 17157  	v_1 := v.Args[1]
 17158  	v_0 := v.Args[0]
 17159  	// match: (TSTW x (MOVDconst [c]))
 17160  	// result: (TSTWconst [int32(c)] x)
 17161  	for {
 17162  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17163  			x := v_0
 17164  			if v_1.Op != OpARM64MOVDconst {
 17165  				continue
 17166  			}
 17167  			c := auxIntToInt64(v_1.AuxInt)
 17168  			v.reset(OpARM64TSTWconst)
 17169  			v.AuxInt = int32ToAuxInt(int32(c))
 17170  			v.AddArg(x)
 17171  			return true
 17172  		}
 17173  		break
 17174  	}
 17175  	return false
 17176  }
 17177  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 17178  	v_0 := v.Args[0]
 17179  	// match: (TSTWconst (MOVDconst [x]) [y])
 17180  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 17181  	for {
 17182  		y := auxIntToInt32(v.AuxInt)
 17183  		if v_0.Op != OpARM64MOVDconst {
 17184  			break
 17185  		}
 17186  		x := auxIntToInt64(v_0.AuxInt)
 17187  		v.reset(OpARM64FlagConstant)
 17188  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 17189  		return true
 17190  	}
 17191  	return false
 17192  }
 17193  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 17194  	v_0 := v.Args[0]
 17195  	// match: (TSTconst (MOVDconst [x]) [y])
 17196  	// result: (FlagConstant [logicFlags64(x&y)])
 17197  	for {
 17198  		y := auxIntToInt64(v.AuxInt)
 17199  		if v_0.Op != OpARM64MOVDconst {
 17200  			break
 17201  		}
 17202  		x := auxIntToInt64(v_0.AuxInt)
 17203  		v.reset(OpARM64FlagConstant)
 17204  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 17205  		return true
 17206  	}
 17207  	return false
 17208  }
 17209  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 17210  	v_1 := v.Args[1]
 17211  	v_0 := v.Args[0]
 17212  	b := v.Block
 17213  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 17214  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 17215  	for {
 17216  		d := auxIntToInt64(v.AuxInt)
 17217  		if v_0.Op != OpARM64MOVDconst {
 17218  			break
 17219  		}
 17220  		c := auxIntToInt64(v_0.AuxInt)
 17221  		x := v_1
 17222  		v.reset(OpARM64TSTconst)
 17223  		v.AuxInt = int64ToAuxInt(c)
 17224  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 17225  		v0.AuxInt = int64ToAuxInt(d)
 17226  		v0.AddArg(x)
 17227  		v.AddArg(v0)
 17228  		return true
 17229  	}
 17230  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 17231  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 17232  	for {
 17233  		d := auxIntToInt64(v.AuxInt)
 17234  		x := v_0
 17235  		if v_1.Op != OpARM64MOVDconst {
 17236  			break
 17237  		}
 17238  		c := auxIntToInt64(v_1.AuxInt)
 17239  		v.reset(OpARM64TSTconst)
 17240  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17241  		v.AddArg(x)
 17242  		return true
 17243  	}
 17244  	return false
 17245  }
 17246  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 17247  	v_1 := v.Args[1]
 17248  	v_0 := v.Args[0]
 17249  	b := v.Block
 17250  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 17251  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 17252  	for {
 17253  		d := auxIntToInt64(v.AuxInt)
 17254  		if v_0.Op != OpARM64MOVDconst {
 17255  			break
 17256  		}
 17257  		c := auxIntToInt64(v_0.AuxInt)
 17258  		x := v_1
 17259  		v.reset(OpARM64TSTconst)
 17260  		v.AuxInt = int64ToAuxInt(c)
 17261  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 17262  		v0.AuxInt = int64ToAuxInt(d)
 17263  		v0.AddArg(x)
 17264  		v.AddArg(v0)
 17265  		return true
 17266  	}
 17267  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 17268  	// result: (TSTconst x [c>>uint64(d)])
 17269  	for {
 17270  		d := auxIntToInt64(v.AuxInt)
 17271  		x := v_0
 17272  		if v_1.Op != OpARM64MOVDconst {
 17273  			break
 17274  		}
 17275  		c := auxIntToInt64(v_1.AuxInt)
 17276  		v.reset(OpARM64TSTconst)
 17277  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 17278  		v.AddArg(x)
 17279  		return true
 17280  	}
 17281  	return false
 17282  }
 17283  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 17284  	v_1 := v.Args[1]
 17285  	v_0 := v.Args[0]
 17286  	b := v.Block
 17287  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 17288  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 17289  	for {
 17290  		d := auxIntToInt64(v.AuxInt)
 17291  		if v_0.Op != OpARM64MOVDconst {
 17292  			break
 17293  		}
 17294  		c := auxIntToInt64(v_0.AuxInt)
 17295  		x := v_1
 17296  		v.reset(OpARM64TSTconst)
 17297  		v.AuxInt = int64ToAuxInt(c)
 17298  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 17299  		v0.AuxInt = int64ToAuxInt(d)
 17300  		v0.AddArg(x)
 17301  		v.AddArg(v0)
 17302  		return true
 17303  	}
 17304  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 17305  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 17306  	for {
 17307  		d := auxIntToInt64(v.AuxInt)
 17308  		x := v_0
 17309  		if v_1.Op != OpARM64MOVDconst {
 17310  			break
 17311  		}
 17312  		c := auxIntToInt64(v_1.AuxInt)
 17313  		v.reset(OpARM64TSTconst)
 17314  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 17315  		v.AddArg(x)
 17316  		return true
 17317  	}
 17318  	return false
 17319  }
 17320  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 17321  	v_1 := v.Args[1]
 17322  	v_0 := v.Args[0]
 17323  	b := v.Block
 17324  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 17325  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 17326  	for {
 17327  		d := auxIntToInt64(v.AuxInt)
 17328  		if v_0.Op != OpARM64MOVDconst {
 17329  			break
 17330  		}
 17331  		c := auxIntToInt64(v_0.AuxInt)
 17332  		x := v_1
 17333  		v.reset(OpARM64TSTconst)
 17334  		v.AuxInt = int64ToAuxInt(c)
 17335  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 17336  		v0.AuxInt = int64ToAuxInt(d)
 17337  		v0.AddArg(x)
 17338  		v.AddArg(v0)
 17339  		return true
 17340  	}
 17341  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 17342  	// result: (TSTconst x [rotateRight64(c, d)])
 17343  	for {
 17344  		d := auxIntToInt64(v.AuxInt)
 17345  		x := v_0
 17346  		if v_1.Op != OpARM64MOVDconst {
 17347  			break
 17348  		}
 17349  		c := auxIntToInt64(v_1.AuxInt)
 17350  		v.reset(OpARM64TSTconst)
 17351  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 17352  		v.AddArg(x)
 17353  		return true
 17354  	}
 17355  	return false
 17356  }
 17357  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 17358  	v_0 := v.Args[0]
 17359  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 17360  	// cond: sc < bfc.width()
 17361  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 17362  	for {
 17363  		bfc := auxIntToArm64BitField(v.AuxInt)
 17364  		if v_0.Op != OpARM64SLLconst {
 17365  			break
 17366  		}
 17367  		sc := auxIntToInt64(v_0.AuxInt)
 17368  		x := v_0.Args[0]
 17369  		if !(sc < bfc.width()) {
 17370  			break
 17371  		}
 17372  		v.reset(OpARM64UBFIZ)
 17373  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 17374  		v.AddArg(x)
 17375  		return true
 17376  	}
 17377  	return false
 17378  }
 17379  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 17380  	v_0 := v.Args[0]
 17381  	// match: (UBFX [bfc] (ANDconst [c] x))
 17382  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 17383  	// result: (UBFX [bfc] x)
 17384  	for {
 17385  		bfc := auxIntToArm64BitField(v.AuxInt)
 17386  		if v_0.Op != OpARM64ANDconst {
 17387  			break
 17388  		}
 17389  		c := auxIntToInt64(v_0.AuxInt)
 17390  		x := v_0.Args[0]
 17391  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 17392  			break
 17393  		}
 17394  		v.reset(OpARM64UBFX)
 17395  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 17396  		v.AddArg(x)
 17397  		return true
 17398  	}
 17399  	// match: (UBFX [bfc] e:(MOVWUreg x))
 17400  	// cond: e.Uses == 1 && bfc.lsb() < 32
 17401  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 17402  	for {
 17403  		bfc := auxIntToArm64BitField(v.AuxInt)
 17404  		e := v_0
 17405  		if e.Op != OpARM64MOVWUreg {
 17406  			break
 17407  		}
 17408  		x := e.Args[0]
 17409  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 17410  			break
 17411  		}
 17412  		v.reset(OpARM64UBFX)
 17413  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 17414  		v.AddArg(x)
 17415  		return true
 17416  	}
 17417  	// match: (UBFX [bfc] e:(MOVHUreg x))
 17418  	// cond: e.Uses == 1 && bfc.lsb() < 16
 17419  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 17420  	for {
 17421  		bfc := auxIntToArm64BitField(v.AuxInt)
 17422  		e := v_0
 17423  		if e.Op != OpARM64MOVHUreg {
 17424  			break
 17425  		}
 17426  		x := e.Args[0]
 17427  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 17428  			break
 17429  		}
 17430  		v.reset(OpARM64UBFX)
 17431  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 17432  		v.AddArg(x)
 17433  		return true
 17434  	}
 17435  	// match: (UBFX [bfc] e:(MOVBUreg x))
 17436  	// cond: e.Uses == 1 && bfc.lsb() < 8
 17437  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 17438  	for {
 17439  		bfc := auxIntToArm64BitField(v.AuxInt)
 17440  		e := v_0
 17441  		if e.Op != OpARM64MOVBUreg {
 17442  			break
 17443  		}
 17444  		x := e.Args[0]
 17445  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 17446  			break
 17447  		}
 17448  		v.reset(OpARM64UBFX)
 17449  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 17450  		v.AddArg(x)
 17451  		return true
 17452  	}
 17453  	// match: (UBFX [bfc] (SRLconst [sc] x))
 17454  	// cond: sc+bfc.width()+bfc.lsb() < 64
 17455  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 17456  	for {
 17457  		bfc := auxIntToArm64BitField(v.AuxInt)
 17458  		if v_0.Op != OpARM64SRLconst {
 17459  			break
 17460  		}
 17461  		sc := auxIntToInt64(v_0.AuxInt)
 17462  		x := v_0.Args[0]
 17463  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 17464  			break
 17465  		}
 17466  		v.reset(OpARM64UBFX)
 17467  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 17468  		v.AddArg(x)
 17469  		return true
 17470  	}
 17471  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17472  	// cond: sc == bfc.lsb()
 17473  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 17474  	for {
 17475  		bfc := auxIntToArm64BitField(v.AuxInt)
 17476  		if v_0.Op != OpARM64SLLconst {
 17477  			break
 17478  		}
 17479  		sc := auxIntToInt64(v_0.AuxInt)
 17480  		x := v_0.Args[0]
 17481  		if !(sc == bfc.lsb()) {
 17482  			break
 17483  		}
 17484  		v.reset(OpARM64ANDconst)
 17485  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 17486  		v.AddArg(x)
 17487  		return true
 17488  	}
 17489  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17490  	// cond: sc < bfc.lsb()
 17491  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 17492  	for {
 17493  		bfc := auxIntToArm64BitField(v.AuxInt)
 17494  		if v_0.Op != OpARM64SLLconst {
 17495  			break
 17496  		}
 17497  		sc := auxIntToInt64(v_0.AuxInt)
 17498  		x := v_0.Args[0]
 17499  		if !(sc < bfc.lsb()) {
 17500  			break
 17501  		}
 17502  		v.reset(OpARM64UBFX)
 17503  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 17504  		v.AddArg(x)
 17505  		return true
 17506  	}
 17507  	// match: (UBFX [bfc] (SLLconst [sc] x))
 17508  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 17509  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 17510  	for {
 17511  		bfc := auxIntToArm64BitField(v.AuxInt)
 17512  		if v_0.Op != OpARM64SLLconst {
 17513  			break
 17514  		}
 17515  		sc := auxIntToInt64(v_0.AuxInt)
 17516  		x := v_0.Args[0]
 17517  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 17518  			break
 17519  		}
 17520  		v.reset(OpARM64UBFIZ)
 17521  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 17522  		v.AddArg(x)
 17523  		return true
 17524  	}
 17525  	return false
 17526  }
 17527  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 17528  	v_1 := v.Args[1]
 17529  	v_0 := v.Args[0]
 17530  	// match: (UDIV x (MOVDconst [1]))
 17531  	// result: x
 17532  	for {
 17533  		x := v_0
 17534  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17535  			break
 17536  		}
 17537  		v.copyOf(x)
 17538  		return true
 17539  	}
 17540  	// match: (UDIV x (MOVDconst [c]))
 17541  	// cond: isPowerOfTwo(c)
 17542  	// result: (SRLconst [log64(c)] x)
 17543  	for {
 17544  		x := v_0
 17545  		if v_1.Op != OpARM64MOVDconst {
 17546  			break
 17547  		}
 17548  		c := auxIntToInt64(v_1.AuxInt)
 17549  		if !(isPowerOfTwo(c)) {
 17550  			break
 17551  		}
 17552  		v.reset(OpARM64SRLconst)
 17553  		v.AuxInt = int64ToAuxInt(log64(c))
 17554  		v.AddArg(x)
 17555  		return true
 17556  	}
 17557  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 17558  	// cond: d != 0
 17559  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 17560  	for {
 17561  		if v_0.Op != OpARM64MOVDconst {
 17562  			break
 17563  		}
 17564  		c := auxIntToInt64(v_0.AuxInt)
 17565  		if v_1.Op != OpARM64MOVDconst {
 17566  			break
 17567  		}
 17568  		d := auxIntToInt64(v_1.AuxInt)
 17569  		if !(d != 0) {
 17570  			break
 17571  		}
 17572  		v.reset(OpARM64MOVDconst)
 17573  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 17574  		return true
 17575  	}
 17576  	return false
 17577  }
 17578  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 17579  	v_1 := v.Args[1]
 17580  	v_0 := v.Args[0]
 17581  	b := v.Block
 17582  	// match: (UDIVW x (MOVDconst [c]))
 17583  	// cond: uint32(c)==1
 17584  	// result: (MOVWUreg x)
 17585  	for {
 17586  		x := v_0
 17587  		if v_1.Op != OpARM64MOVDconst {
 17588  			break
 17589  		}
 17590  		c := auxIntToInt64(v_1.AuxInt)
 17591  		if !(uint32(c) == 1) {
 17592  			break
 17593  		}
 17594  		v.reset(OpARM64MOVWUreg)
 17595  		v.AddArg(x)
 17596  		return true
 17597  	}
 17598  	// match: (UDIVW x (MOVDconst [c]))
 17599  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17600  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 17601  	for {
 17602  		x := v_0
 17603  		if v_1.Op != OpARM64MOVDconst {
 17604  			break
 17605  		}
 17606  		c := auxIntToInt64(v_1.AuxInt)
 17607  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17608  			break
 17609  		}
 17610  		v.reset(OpARM64SRLconst)
 17611  		v.AuxInt = int64ToAuxInt(log64(c))
 17612  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 17613  		v0.AddArg(x)
 17614  		v.AddArg(v0)
 17615  		return true
 17616  	}
 17617  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 17618  	// cond: d != 0
 17619  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 17620  	for {
 17621  		if v_0.Op != OpARM64MOVDconst {
 17622  			break
 17623  		}
 17624  		c := auxIntToInt64(v_0.AuxInt)
 17625  		if v_1.Op != OpARM64MOVDconst {
 17626  			break
 17627  		}
 17628  		d := auxIntToInt64(v_1.AuxInt)
 17629  		if !(d != 0) {
 17630  			break
 17631  		}
 17632  		v.reset(OpARM64MOVDconst)
 17633  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 17634  		return true
 17635  	}
 17636  	return false
 17637  }
 17638  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 17639  	v_1 := v.Args[1]
 17640  	v_0 := v.Args[0]
 17641  	b := v.Block
 17642  	typ := &b.Func.Config.Types
 17643  	// match: (UMOD <typ.UInt64> x y)
 17644  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 17645  	for {
 17646  		if v.Type != typ.UInt64 {
 17647  			break
 17648  		}
 17649  		x := v_0
 17650  		y := v_1
 17651  		v.reset(OpARM64MSUB)
 17652  		v.Type = typ.UInt64
 17653  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 17654  		v0.AddArg2(x, y)
 17655  		v.AddArg3(x, y, v0)
 17656  		return true
 17657  	}
 17658  	// match: (UMOD _ (MOVDconst [1]))
 17659  	// result: (MOVDconst [0])
 17660  	for {
 17661  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17662  			break
 17663  		}
 17664  		v.reset(OpARM64MOVDconst)
 17665  		v.AuxInt = int64ToAuxInt(0)
 17666  		return true
 17667  	}
 17668  	// match: (UMOD x (MOVDconst [c]))
 17669  	// cond: isPowerOfTwo(c)
 17670  	// result: (ANDconst [c-1] x)
 17671  	for {
 17672  		x := v_0
 17673  		if v_1.Op != OpARM64MOVDconst {
 17674  			break
 17675  		}
 17676  		c := auxIntToInt64(v_1.AuxInt)
 17677  		if !(isPowerOfTwo(c)) {
 17678  			break
 17679  		}
 17680  		v.reset(OpARM64ANDconst)
 17681  		v.AuxInt = int64ToAuxInt(c - 1)
 17682  		v.AddArg(x)
 17683  		return true
 17684  	}
 17685  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 17686  	// cond: d != 0
 17687  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 17688  	for {
 17689  		if v_0.Op != OpARM64MOVDconst {
 17690  			break
 17691  		}
 17692  		c := auxIntToInt64(v_0.AuxInt)
 17693  		if v_1.Op != OpARM64MOVDconst {
 17694  			break
 17695  		}
 17696  		d := auxIntToInt64(v_1.AuxInt)
 17697  		if !(d != 0) {
 17698  			break
 17699  		}
 17700  		v.reset(OpARM64MOVDconst)
 17701  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 17702  		return true
 17703  	}
 17704  	return false
 17705  }
 17706  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 17707  	v_1 := v.Args[1]
 17708  	v_0 := v.Args[0]
 17709  	b := v.Block
 17710  	typ := &b.Func.Config.Types
 17711  	// match: (UMODW <typ.UInt32> x y)
 17712  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 17713  	for {
 17714  		if v.Type != typ.UInt32 {
 17715  			break
 17716  		}
 17717  		x := v_0
 17718  		y := v_1
 17719  		v.reset(OpARM64MSUBW)
 17720  		v.Type = typ.UInt32
 17721  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 17722  		v0.AddArg2(x, y)
 17723  		v.AddArg3(x, y, v0)
 17724  		return true
 17725  	}
 17726  	// match: (UMODW _ (MOVDconst [c]))
 17727  	// cond: uint32(c)==1
 17728  	// result: (MOVDconst [0])
 17729  	for {
 17730  		if v_1.Op != OpARM64MOVDconst {
 17731  			break
 17732  		}
 17733  		c := auxIntToInt64(v_1.AuxInt)
 17734  		if !(uint32(c) == 1) {
 17735  			break
 17736  		}
 17737  		v.reset(OpARM64MOVDconst)
 17738  		v.AuxInt = int64ToAuxInt(0)
 17739  		return true
 17740  	}
 17741  	// match: (UMODW x (MOVDconst [c]))
 17742  	// cond: isPowerOfTwo(c) && is32Bit(c)
 17743  	// result: (ANDconst [c-1] x)
 17744  	for {
 17745  		x := v_0
 17746  		if v_1.Op != OpARM64MOVDconst {
 17747  			break
 17748  		}
 17749  		c := auxIntToInt64(v_1.AuxInt)
 17750  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 17751  			break
 17752  		}
 17753  		v.reset(OpARM64ANDconst)
 17754  		v.AuxInt = int64ToAuxInt(c - 1)
 17755  		v.AddArg(x)
 17756  		return true
 17757  	}
 17758  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 17759  	// cond: d != 0
 17760  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 17761  	for {
 17762  		if v_0.Op != OpARM64MOVDconst {
 17763  			break
 17764  		}
 17765  		c := auxIntToInt64(v_0.AuxInt)
 17766  		if v_1.Op != OpARM64MOVDconst {
 17767  			break
 17768  		}
 17769  		d := auxIntToInt64(v_1.AuxInt)
 17770  		if !(d != 0) {
 17771  			break
 17772  		}
 17773  		v.reset(OpARM64MOVDconst)
 17774  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 17775  		return true
 17776  	}
 17777  	return false
 17778  }
 17779  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 17780  	v_1 := v.Args[1]
 17781  	v_0 := v.Args[0]
 17782  	// match: (XOR x (MOVDconst [c]))
 17783  	// result: (XORconst [c] x)
 17784  	for {
 17785  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17786  			x := v_0
 17787  			if v_1.Op != OpARM64MOVDconst {
 17788  				continue
 17789  			}
 17790  			c := auxIntToInt64(v_1.AuxInt)
 17791  			v.reset(OpARM64XORconst)
 17792  			v.AuxInt = int64ToAuxInt(c)
 17793  			v.AddArg(x)
 17794  			return true
 17795  		}
 17796  		break
 17797  	}
 17798  	// match: (XOR x x)
 17799  	// result: (MOVDconst [0])
 17800  	for {
 17801  		x := v_0
 17802  		if x != v_1 {
 17803  			break
 17804  		}
 17805  		v.reset(OpARM64MOVDconst)
 17806  		v.AuxInt = int64ToAuxInt(0)
 17807  		return true
 17808  	}
 17809  	// match: (XOR x (MVN y))
 17810  	// result: (EON x y)
 17811  	for {
 17812  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17813  			x := v_0
 17814  			if v_1.Op != OpARM64MVN {
 17815  				continue
 17816  			}
 17817  			y := v_1.Args[0]
 17818  			v.reset(OpARM64EON)
 17819  			v.AddArg2(x, y)
 17820  			return true
 17821  		}
 17822  		break
 17823  	}
 17824  	// match: (XOR x0 x1:(SLLconst [c] y))
 17825  	// cond: clobberIfDead(x1)
 17826  	// result: (XORshiftLL x0 y [c])
 17827  	for {
 17828  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17829  			x0 := v_0
 17830  			x1 := v_1
 17831  			if x1.Op != OpARM64SLLconst {
 17832  				continue
 17833  			}
 17834  			c := auxIntToInt64(x1.AuxInt)
 17835  			y := x1.Args[0]
 17836  			if !(clobberIfDead(x1)) {
 17837  				continue
 17838  			}
 17839  			v.reset(OpARM64XORshiftLL)
 17840  			v.AuxInt = int64ToAuxInt(c)
 17841  			v.AddArg2(x0, y)
 17842  			return true
 17843  		}
 17844  		break
 17845  	}
 17846  	// match: (XOR x0 x1:(SRLconst [c] y))
 17847  	// cond: clobberIfDead(x1)
 17848  	// result: (XORshiftRL x0 y [c])
 17849  	for {
 17850  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17851  			x0 := v_0
 17852  			x1 := v_1
 17853  			if x1.Op != OpARM64SRLconst {
 17854  				continue
 17855  			}
 17856  			c := auxIntToInt64(x1.AuxInt)
 17857  			y := x1.Args[0]
 17858  			if !(clobberIfDead(x1)) {
 17859  				continue
 17860  			}
 17861  			v.reset(OpARM64XORshiftRL)
 17862  			v.AuxInt = int64ToAuxInt(c)
 17863  			v.AddArg2(x0, y)
 17864  			return true
 17865  		}
 17866  		break
 17867  	}
 17868  	// match: (XOR x0 x1:(SRAconst [c] y))
 17869  	// cond: clobberIfDead(x1)
 17870  	// result: (XORshiftRA x0 y [c])
 17871  	for {
 17872  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17873  			x0 := v_0
 17874  			x1 := v_1
 17875  			if x1.Op != OpARM64SRAconst {
 17876  				continue
 17877  			}
 17878  			c := auxIntToInt64(x1.AuxInt)
 17879  			y := x1.Args[0]
 17880  			if !(clobberIfDead(x1)) {
 17881  				continue
 17882  			}
 17883  			v.reset(OpARM64XORshiftRA)
 17884  			v.AuxInt = int64ToAuxInt(c)
 17885  			v.AddArg2(x0, y)
 17886  			return true
 17887  		}
 17888  		break
 17889  	}
 17890  	// match: (XOR x0 x1:(RORconst [c] y))
 17891  	// cond: clobberIfDead(x1)
 17892  	// result: (XORshiftRO x0 y [c])
 17893  	for {
 17894  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 17895  			x0 := v_0
 17896  			x1 := v_1
 17897  			if x1.Op != OpARM64RORconst {
 17898  				continue
 17899  			}
 17900  			c := auxIntToInt64(x1.AuxInt)
 17901  			y := x1.Args[0]
 17902  			if !(clobberIfDead(x1)) {
 17903  				continue
 17904  			}
 17905  			v.reset(OpARM64XORshiftRO)
 17906  			v.AuxInt = int64ToAuxInt(c)
 17907  			v.AddArg2(x0, y)
 17908  			return true
 17909  		}
 17910  		break
 17911  	}
 17912  	return false
 17913  }
 17914  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 17915  	v_0 := v.Args[0]
 17916  	// match: (XORconst [0] x)
 17917  	// result: x
 17918  	for {
 17919  		if auxIntToInt64(v.AuxInt) != 0 {
 17920  			break
 17921  		}
 17922  		x := v_0
 17923  		v.copyOf(x)
 17924  		return true
 17925  	}
 17926  	// match: (XORconst [-1] x)
 17927  	// result: (MVN x)
 17928  	for {
 17929  		if auxIntToInt64(v.AuxInt) != -1 {
 17930  			break
 17931  		}
 17932  		x := v_0
 17933  		v.reset(OpARM64MVN)
 17934  		v.AddArg(x)
 17935  		return true
 17936  	}
 17937  	// match: (XORconst [c] (MOVDconst [d]))
 17938  	// result: (MOVDconst [c^d])
 17939  	for {
 17940  		c := auxIntToInt64(v.AuxInt)
 17941  		if v_0.Op != OpARM64MOVDconst {
 17942  			break
 17943  		}
 17944  		d := auxIntToInt64(v_0.AuxInt)
 17945  		v.reset(OpARM64MOVDconst)
 17946  		v.AuxInt = int64ToAuxInt(c ^ d)
 17947  		return true
 17948  	}
 17949  	// match: (XORconst [c] (XORconst [d] x))
 17950  	// result: (XORconst [c^d] x)
 17951  	for {
 17952  		c := auxIntToInt64(v.AuxInt)
 17953  		if v_0.Op != OpARM64XORconst {
 17954  			break
 17955  		}
 17956  		d := auxIntToInt64(v_0.AuxInt)
 17957  		x := v_0.Args[0]
 17958  		v.reset(OpARM64XORconst)
 17959  		v.AuxInt = int64ToAuxInt(c ^ d)
 17960  		v.AddArg(x)
 17961  		return true
 17962  	}
 17963  	return false
 17964  }
 17965  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 17966  	v_1 := v.Args[1]
 17967  	v_0 := v.Args[0]
 17968  	b := v.Block
 17969  	typ := &b.Func.Config.Types
 17970  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 17971  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 17972  	for {
 17973  		d := auxIntToInt64(v.AuxInt)
 17974  		if v_0.Op != OpARM64MOVDconst {
 17975  			break
 17976  		}
 17977  		c := auxIntToInt64(v_0.AuxInt)
 17978  		x := v_1
 17979  		v.reset(OpARM64XORconst)
 17980  		v.AuxInt = int64ToAuxInt(c)
 17981  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 17982  		v0.AuxInt = int64ToAuxInt(d)
 17983  		v0.AddArg(x)
 17984  		v.AddArg(v0)
 17985  		return true
 17986  	}
 17987  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 17988  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 17989  	for {
 17990  		d := auxIntToInt64(v.AuxInt)
 17991  		x := v_0
 17992  		if v_1.Op != OpARM64MOVDconst {
 17993  			break
 17994  		}
 17995  		c := auxIntToInt64(v_1.AuxInt)
 17996  		v.reset(OpARM64XORconst)
 17997  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 17998  		v.AddArg(x)
 17999  		return true
 18000  	}
 18001  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 18002  	// result: (MOVDconst [0])
 18003  	for {
 18004  		c := auxIntToInt64(v.AuxInt)
 18005  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 18006  			break
 18007  		}
 18008  		x := v_0.Args[0]
 18009  		if x != v_1 {
 18010  			break
 18011  		}
 18012  		v.reset(OpARM64MOVDconst)
 18013  		v.AuxInt = int64ToAuxInt(0)
 18014  		return true
 18015  	}
 18016  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 18017  	// result: (REV16W x)
 18018  	for {
 18019  		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) {
 18020  			break
 18021  		}
 18022  		x := v_0.Args[0]
 18023  		if x != v_1 {
 18024  			break
 18025  		}
 18026  		v.reset(OpARM64REV16W)
 18027  		v.AddArg(x)
 18028  		return true
 18029  	}
 18030  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 18031  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 18032  	// result: (REV16W x)
 18033  	for {
 18034  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 18035  			break
 18036  		}
 18037  		v_0_0 := v_0.Args[0]
 18038  		if v_0_0.Op != OpARM64ANDconst {
 18039  			break
 18040  		}
 18041  		c1 := auxIntToInt64(v_0_0.AuxInt)
 18042  		x := v_0_0.Args[0]
 18043  		if v_1.Op != OpARM64ANDconst {
 18044  			break
 18045  		}
 18046  		c2 := auxIntToInt64(v_1.AuxInt)
 18047  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 18048  			break
 18049  		}
 18050  		v.reset(OpARM64REV16W)
 18051  		v.AddArg(x)
 18052  		return true
 18053  	}
 18054  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 18055  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 18056  	// result: (REV16 x)
 18057  	for {
 18058  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 18059  			break
 18060  		}
 18061  		v_0_0 := v_0.Args[0]
 18062  		if v_0_0.Op != OpARM64ANDconst {
 18063  			break
 18064  		}
 18065  		c1 := auxIntToInt64(v_0_0.AuxInt)
 18066  		x := v_0_0.Args[0]
 18067  		if v_1.Op != OpARM64ANDconst {
 18068  			break
 18069  		}
 18070  		c2 := auxIntToInt64(v_1.AuxInt)
 18071  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 18072  			break
 18073  		}
 18074  		v.reset(OpARM64REV16)
 18075  		v.AddArg(x)
 18076  		return true
 18077  	}
 18078  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 18079  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 18080  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 18081  	for {
 18082  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 18083  			break
 18084  		}
 18085  		v_0_0 := v_0.Args[0]
 18086  		if v_0_0.Op != OpARM64ANDconst {
 18087  			break
 18088  		}
 18089  		c1 := auxIntToInt64(v_0_0.AuxInt)
 18090  		x := v_0_0.Args[0]
 18091  		if v_1.Op != OpARM64ANDconst {
 18092  			break
 18093  		}
 18094  		c2 := auxIntToInt64(v_1.AuxInt)
 18095  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 18096  			break
 18097  		}
 18098  		v.reset(OpARM64REV16)
 18099  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 18100  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 18101  		v0.AddArg(x)
 18102  		v.AddArg(v0)
 18103  		return true
 18104  	}
 18105  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 18106  	// result: (EXTRconst [64-c] x2 x)
 18107  	for {
 18108  		c := auxIntToInt64(v.AuxInt)
 18109  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 18110  			break
 18111  		}
 18112  		x := v_0.Args[0]
 18113  		x2 := v_1
 18114  		v.reset(OpARM64EXTRconst)
 18115  		v.AuxInt = int64ToAuxInt(64 - c)
 18116  		v.AddArg2(x2, x)
 18117  		return true
 18118  	}
 18119  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 18120  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 18121  	// result: (EXTRWconst [32-c] x2 x)
 18122  	for {
 18123  		t := v.Type
 18124  		c := auxIntToInt64(v.AuxInt)
 18125  		if v_0.Op != OpARM64UBFX {
 18126  			break
 18127  		}
 18128  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 18129  		x := v_0.Args[0]
 18130  		x2 := v_1
 18131  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 18132  			break
 18133  		}
 18134  		v.reset(OpARM64EXTRWconst)
 18135  		v.AuxInt = int64ToAuxInt(32 - c)
 18136  		v.AddArg2(x2, x)
 18137  		return true
 18138  	}
 18139  	return false
 18140  }
 18141  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 18142  	v_1 := v.Args[1]
 18143  	v_0 := v.Args[0]
 18144  	b := v.Block
 18145  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 18146  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 18147  	for {
 18148  		d := auxIntToInt64(v.AuxInt)
 18149  		if v_0.Op != OpARM64MOVDconst {
 18150  			break
 18151  		}
 18152  		c := auxIntToInt64(v_0.AuxInt)
 18153  		x := v_1
 18154  		v.reset(OpARM64XORconst)
 18155  		v.AuxInt = int64ToAuxInt(c)
 18156  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 18157  		v0.AuxInt = int64ToAuxInt(d)
 18158  		v0.AddArg(x)
 18159  		v.AddArg(v0)
 18160  		return true
 18161  	}
 18162  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 18163  	// result: (XORconst x [c>>uint64(d)])
 18164  	for {
 18165  		d := auxIntToInt64(v.AuxInt)
 18166  		x := v_0
 18167  		if v_1.Op != OpARM64MOVDconst {
 18168  			break
 18169  		}
 18170  		c := auxIntToInt64(v_1.AuxInt)
 18171  		v.reset(OpARM64XORconst)
 18172  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 18173  		v.AddArg(x)
 18174  		return true
 18175  	}
 18176  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 18177  	// result: (MOVDconst [0])
 18178  	for {
 18179  		c := auxIntToInt64(v.AuxInt)
 18180  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 18181  			break
 18182  		}
 18183  		x := v_0.Args[0]
 18184  		if x != v_1 {
 18185  			break
 18186  		}
 18187  		v.reset(OpARM64MOVDconst)
 18188  		v.AuxInt = int64ToAuxInt(0)
 18189  		return true
 18190  	}
 18191  	return false
 18192  }
 18193  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 18194  	v_1 := v.Args[1]
 18195  	v_0 := v.Args[0]
 18196  	b := v.Block
 18197  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 18198  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 18199  	for {
 18200  		d := auxIntToInt64(v.AuxInt)
 18201  		if v_0.Op != OpARM64MOVDconst {
 18202  			break
 18203  		}
 18204  		c := auxIntToInt64(v_0.AuxInt)
 18205  		x := v_1
 18206  		v.reset(OpARM64XORconst)
 18207  		v.AuxInt = int64ToAuxInt(c)
 18208  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 18209  		v0.AuxInt = int64ToAuxInt(d)
 18210  		v0.AddArg(x)
 18211  		v.AddArg(v0)
 18212  		return true
 18213  	}
 18214  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 18215  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 18216  	for {
 18217  		d := auxIntToInt64(v.AuxInt)
 18218  		x := v_0
 18219  		if v_1.Op != OpARM64MOVDconst {
 18220  			break
 18221  		}
 18222  		c := auxIntToInt64(v_1.AuxInt)
 18223  		v.reset(OpARM64XORconst)
 18224  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 18225  		v.AddArg(x)
 18226  		return true
 18227  	}
 18228  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 18229  	// result: (MOVDconst [0])
 18230  	for {
 18231  		c := auxIntToInt64(v.AuxInt)
 18232  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 18233  			break
 18234  		}
 18235  		x := v_0.Args[0]
 18236  		if x != v_1 {
 18237  			break
 18238  		}
 18239  		v.reset(OpARM64MOVDconst)
 18240  		v.AuxInt = int64ToAuxInt(0)
 18241  		return true
 18242  	}
 18243  	return false
 18244  }
 18245  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 18246  	v_1 := v.Args[1]
 18247  	v_0 := v.Args[0]
 18248  	b := v.Block
 18249  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 18250  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 18251  	for {
 18252  		d := auxIntToInt64(v.AuxInt)
 18253  		if v_0.Op != OpARM64MOVDconst {
 18254  			break
 18255  		}
 18256  		c := auxIntToInt64(v_0.AuxInt)
 18257  		x := v_1
 18258  		v.reset(OpARM64XORconst)
 18259  		v.AuxInt = int64ToAuxInt(c)
 18260  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 18261  		v0.AuxInt = int64ToAuxInt(d)
 18262  		v0.AddArg(x)
 18263  		v.AddArg(v0)
 18264  		return true
 18265  	}
 18266  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 18267  	// result: (XORconst x [rotateRight64(c, d)])
 18268  	for {
 18269  		d := auxIntToInt64(v.AuxInt)
 18270  		x := v_0
 18271  		if v_1.Op != OpARM64MOVDconst {
 18272  			break
 18273  		}
 18274  		c := auxIntToInt64(v_1.AuxInt)
 18275  		v.reset(OpARM64XORconst)
 18276  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 18277  		v.AddArg(x)
 18278  		return true
 18279  	}
 18280  	// match: (XORshiftRO (RORconst x [c]) x [c])
 18281  	// result: (MOVDconst [0])
 18282  	for {
 18283  		c := auxIntToInt64(v.AuxInt)
 18284  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 18285  			break
 18286  		}
 18287  		x := v_0.Args[0]
 18288  		if x != v_1 {
 18289  			break
 18290  		}
 18291  		v.reset(OpARM64MOVDconst)
 18292  		v.AuxInt = int64ToAuxInt(0)
 18293  		return true
 18294  	}
 18295  	return false
 18296  }
 18297  func rewriteValueARM64_OpAddr(v *Value) bool {
 18298  	v_0 := v.Args[0]
 18299  	// match: (Addr {sym} base)
 18300  	// result: (MOVDaddr {sym} base)
 18301  	for {
 18302  		sym := auxToSym(v.Aux)
 18303  		base := v_0
 18304  		v.reset(OpARM64MOVDaddr)
 18305  		v.Aux = symToAux(sym)
 18306  		v.AddArg(base)
 18307  		return true
 18308  	}
 18309  }
 18310  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 18311  	v_1 := v.Args[1]
 18312  	v_0 := v.Args[0]
 18313  	b := v.Block
 18314  	// match: (Avg64u <t> x y)
 18315  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 18316  	for {
 18317  		t := v.Type
 18318  		x := v_0
 18319  		y := v_1
 18320  		v.reset(OpARM64ADD)
 18321  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 18322  		v0.AuxInt = int64ToAuxInt(1)
 18323  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 18324  		v1.AddArg2(x, y)
 18325  		v0.AddArg(v1)
 18326  		v.AddArg2(v0, y)
 18327  		return true
 18328  	}
 18329  }
 18330  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 18331  	v_0 := v.Args[0]
 18332  	b := v.Block
 18333  	typ := &b.Func.Config.Types
 18334  	// match: (BitLen32 x)
 18335  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 18336  	for {
 18337  		x := v_0
 18338  		v.reset(OpARM64SUB)
 18339  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18340  		v0.AuxInt = int64ToAuxInt(32)
 18341  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 18342  		v1.AddArg(x)
 18343  		v.AddArg2(v0, v1)
 18344  		return true
 18345  	}
 18346  }
 18347  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 18348  	v_0 := v.Args[0]
 18349  	b := v.Block
 18350  	typ := &b.Func.Config.Types
 18351  	// match: (BitLen64 x)
 18352  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 18353  	for {
 18354  		x := v_0
 18355  		v.reset(OpARM64SUB)
 18356  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18357  		v0.AuxInt = int64ToAuxInt(64)
 18358  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 18359  		v1.AddArg(x)
 18360  		v.AddArg2(v0, v1)
 18361  		return true
 18362  	}
 18363  }
 18364  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 18365  	v_0 := v.Args[0]
 18366  	b := v.Block
 18367  	typ := &b.Func.Config.Types
 18368  	// match: (BitRev16 x)
 18369  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 18370  	for {
 18371  		x := v_0
 18372  		v.reset(OpARM64SRLconst)
 18373  		v.AuxInt = int64ToAuxInt(48)
 18374  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 18375  		v0.AddArg(x)
 18376  		v.AddArg(v0)
 18377  		return true
 18378  	}
 18379  }
 18380  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 18381  	v_0 := v.Args[0]
 18382  	b := v.Block
 18383  	typ := &b.Func.Config.Types
 18384  	// match: (BitRev8 x)
 18385  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 18386  	for {
 18387  		x := v_0
 18388  		v.reset(OpARM64SRLconst)
 18389  		v.AuxInt = int64ToAuxInt(56)
 18390  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 18391  		v0.AddArg(x)
 18392  		v.AddArg(v0)
 18393  		return true
 18394  	}
 18395  }
 18396  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 18397  	v_2 := v.Args[2]
 18398  	v_1 := v.Args[1]
 18399  	v_0 := v.Args[0]
 18400  	b := v.Block
 18401  	// match: (CondSelect x y boolval)
 18402  	// cond: flagArg(boolval) != nil
 18403  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 18404  	for {
 18405  		x := v_0
 18406  		y := v_1
 18407  		boolval := v_2
 18408  		if !(flagArg(boolval) != nil) {
 18409  			break
 18410  		}
 18411  		v.reset(OpARM64CSEL)
 18412  		v.AuxInt = opToAuxInt(boolval.Op)
 18413  		v.AddArg3(x, y, flagArg(boolval))
 18414  		return true
 18415  	}
 18416  	// match: (CondSelect x y boolval)
 18417  	// cond: flagArg(boolval) == nil
 18418  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 18419  	for {
 18420  		x := v_0
 18421  		y := v_1
 18422  		boolval := v_2
 18423  		if !(flagArg(boolval) == nil) {
 18424  			break
 18425  		}
 18426  		v.reset(OpARM64CSEL)
 18427  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 18428  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 18429  		v0.AuxInt = int32ToAuxInt(1)
 18430  		v0.AddArg(boolval)
 18431  		v.AddArg3(x, y, v0)
 18432  		return true
 18433  	}
 18434  	return false
 18435  }
 18436  func rewriteValueARM64_OpConst16(v *Value) bool {
 18437  	// match: (Const16 [val])
 18438  	// result: (MOVDconst [int64(val)])
 18439  	for {
 18440  		val := auxIntToInt16(v.AuxInt)
 18441  		v.reset(OpARM64MOVDconst)
 18442  		v.AuxInt = int64ToAuxInt(int64(val))
 18443  		return true
 18444  	}
 18445  }
 18446  func rewriteValueARM64_OpConst32(v *Value) bool {
 18447  	// match: (Const32 [val])
 18448  	// result: (MOVDconst [int64(val)])
 18449  	for {
 18450  		val := auxIntToInt32(v.AuxInt)
 18451  		v.reset(OpARM64MOVDconst)
 18452  		v.AuxInt = int64ToAuxInt(int64(val))
 18453  		return true
 18454  	}
 18455  }
 18456  func rewriteValueARM64_OpConst32F(v *Value) bool {
 18457  	// match: (Const32F [val])
 18458  	// result: (FMOVSconst [float64(val)])
 18459  	for {
 18460  		val := auxIntToFloat32(v.AuxInt)
 18461  		v.reset(OpARM64FMOVSconst)
 18462  		v.AuxInt = float64ToAuxInt(float64(val))
 18463  		return true
 18464  	}
 18465  }
 18466  func rewriteValueARM64_OpConst64(v *Value) bool {
 18467  	// match: (Const64 [val])
 18468  	// result: (MOVDconst [int64(val)])
 18469  	for {
 18470  		val := auxIntToInt64(v.AuxInt)
 18471  		v.reset(OpARM64MOVDconst)
 18472  		v.AuxInt = int64ToAuxInt(int64(val))
 18473  		return true
 18474  	}
 18475  }
 18476  func rewriteValueARM64_OpConst64F(v *Value) bool {
 18477  	// match: (Const64F [val])
 18478  	// result: (FMOVDconst [float64(val)])
 18479  	for {
 18480  		val := auxIntToFloat64(v.AuxInt)
 18481  		v.reset(OpARM64FMOVDconst)
 18482  		v.AuxInt = float64ToAuxInt(float64(val))
 18483  		return true
 18484  	}
 18485  }
 18486  func rewriteValueARM64_OpConst8(v *Value) bool {
 18487  	// match: (Const8 [val])
 18488  	// result: (MOVDconst [int64(val)])
 18489  	for {
 18490  		val := auxIntToInt8(v.AuxInt)
 18491  		v.reset(OpARM64MOVDconst)
 18492  		v.AuxInt = int64ToAuxInt(int64(val))
 18493  		return true
 18494  	}
 18495  }
 18496  func rewriteValueARM64_OpConstBool(v *Value) bool {
 18497  	// match: (ConstBool [t])
 18498  	// result: (MOVDconst [b2i(t)])
 18499  	for {
 18500  		t := auxIntToBool(v.AuxInt)
 18501  		v.reset(OpARM64MOVDconst)
 18502  		v.AuxInt = int64ToAuxInt(b2i(t))
 18503  		return true
 18504  	}
 18505  }
 18506  func rewriteValueARM64_OpConstNil(v *Value) bool {
 18507  	// match: (ConstNil)
 18508  	// result: (MOVDconst [0])
 18509  	for {
 18510  		v.reset(OpARM64MOVDconst)
 18511  		v.AuxInt = int64ToAuxInt(0)
 18512  		return true
 18513  	}
 18514  }
 18515  func rewriteValueARM64_OpCtz16(v *Value) bool {
 18516  	v_0 := v.Args[0]
 18517  	b := v.Block
 18518  	typ := &b.Func.Config.Types
 18519  	// match: (Ctz16 <t> x)
 18520  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 18521  	for {
 18522  		t := v.Type
 18523  		x := v_0
 18524  		v.reset(OpARM64CLZW)
 18525  		v.Type = t
 18526  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 18527  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 18528  		v1.AuxInt = int64ToAuxInt(0x10000)
 18529  		v1.AddArg(x)
 18530  		v0.AddArg(v1)
 18531  		v.AddArg(v0)
 18532  		return true
 18533  	}
 18534  }
 18535  func rewriteValueARM64_OpCtz32(v *Value) bool {
 18536  	v_0 := v.Args[0]
 18537  	b := v.Block
 18538  	// match: (Ctz32 <t> x)
 18539  	// result: (CLZW (RBITW <t> x))
 18540  	for {
 18541  		t := v.Type
 18542  		x := v_0
 18543  		v.reset(OpARM64CLZW)
 18544  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 18545  		v0.AddArg(x)
 18546  		v.AddArg(v0)
 18547  		return true
 18548  	}
 18549  }
 18550  func rewriteValueARM64_OpCtz64(v *Value) bool {
 18551  	v_0 := v.Args[0]
 18552  	b := v.Block
 18553  	// match: (Ctz64 <t> x)
 18554  	// result: (CLZ (RBIT <t> x))
 18555  	for {
 18556  		t := v.Type
 18557  		x := v_0
 18558  		v.reset(OpARM64CLZ)
 18559  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 18560  		v0.AddArg(x)
 18561  		v.AddArg(v0)
 18562  		return true
 18563  	}
 18564  }
 18565  func rewriteValueARM64_OpCtz8(v *Value) bool {
 18566  	v_0 := v.Args[0]
 18567  	b := v.Block
 18568  	typ := &b.Func.Config.Types
 18569  	// match: (Ctz8 <t> x)
 18570  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 18571  	for {
 18572  		t := v.Type
 18573  		x := v_0
 18574  		v.reset(OpARM64CLZW)
 18575  		v.Type = t
 18576  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 18577  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 18578  		v1.AuxInt = int64ToAuxInt(0x100)
 18579  		v1.AddArg(x)
 18580  		v0.AddArg(v1)
 18581  		v.AddArg(v0)
 18582  		return true
 18583  	}
 18584  }
 18585  func rewriteValueARM64_OpDiv16(v *Value) bool {
 18586  	v_1 := v.Args[1]
 18587  	v_0 := v.Args[0]
 18588  	b := v.Block
 18589  	typ := &b.Func.Config.Types
 18590  	// match: (Div16 [false] x y)
 18591  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 18592  	for {
 18593  		if auxIntToBool(v.AuxInt) != false {
 18594  			break
 18595  		}
 18596  		x := v_0
 18597  		y := v_1
 18598  		v.reset(OpARM64DIVW)
 18599  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18600  		v0.AddArg(x)
 18601  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18602  		v1.AddArg(y)
 18603  		v.AddArg2(v0, v1)
 18604  		return true
 18605  	}
 18606  	return false
 18607  }
 18608  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 18609  	v_1 := v.Args[1]
 18610  	v_0 := v.Args[0]
 18611  	b := v.Block
 18612  	typ := &b.Func.Config.Types
 18613  	// match: (Div16u x y)
 18614  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 18615  	for {
 18616  		x := v_0
 18617  		y := v_1
 18618  		v.reset(OpARM64UDIVW)
 18619  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18620  		v0.AddArg(x)
 18621  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18622  		v1.AddArg(y)
 18623  		v.AddArg2(v0, v1)
 18624  		return true
 18625  	}
 18626  }
 18627  func rewriteValueARM64_OpDiv32(v *Value) bool {
 18628  	v_1 := v.Args[1]
 18629  	v_0 := v.Args[0]
 18630  	// match: (Div32 [false] x y)
 18631  	// result: (DIVW x y)
 18632  	for {
 18633  		if auxIntToBool(v.AuxInt) != false {
 18634  			break
 18635  		}
 18636  		x := v_0
 18637  		y := v_1
 18638  		v.reset(OpARM64DIVW)
 18639  		v.AddArg2(x, y)
 18640  		return true
 18641  	}
 18642  	return false
 18643  }
 18644  func rewriteValueARM64_OpDiv64(v *Value) bool {
 18645  	v_1 := v.Args[1]
 18646  	v_0 := v.Args[0]
 18647  	// match: (Div64 [false] x y)
 18648  	// result: (DIV x y)
 18649  	for {
 18650  		if auxIntToBool(v.AuxInt) != false {
 18651  			break
 18652  		}
 18653  		x := v_0
 18654  		y := v_1
 18655  		v.reset(OpARM64DIV)
 18656  		v.AddArg2(x, y)
 18657  		return true
 18658  	}
 18659  	return false
 18660  }
 18661  func rewriteValueARM64_OpDiv8(v *Value) bool {
 18662  	v_1 := v.Args[1]
 18663  	v_0 := v.Args[0]
 18664  	b := v.Block
 18665  	typ := &b.Func.Config.Types
 18666  	// match: (Div8 x y)
 18667  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 18668  	for {
 18669  		x := v_0
 18670  		y := v_1
 18671  		v.reset(OpARM64DIVW)
 18672  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18673  		v0.AddArg(x)
 18674  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18675  		v1.AddArg(y)
 18676  		v.AddArg2(v0, v1)
 18677  		return true
 18678  	}
 18679  }
 18680  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 18681  	v_1 := v.Args[1]
 18682  	v_0 := v.Args[0]
 18683  	b := v.Block
 18684  	typ := &b.Func.Config.Types
 18685  	// match: (Div8u x y)
 18686  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 18687  	for {
 18688  		x := v_0
 18689  		y := v_1
 18690  		v.reset(OpARM64UDIVW)
 18691  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18692  		v0.AddArg(x)
 18693  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18694  		v1.AddArg(y)
 18695  		v.AddArg2(v0, v1)
 18696  		return true
 18697  	}
 18698  }
 18699  func rewriteValueARM64_OpEq16(v *Value) bool {
 18700  	v_1 := v.Args[1]
 18701  	v_0 := v.Args[0]
 18702  	b := v.Block
 18703  	typ := &b.Func.Config.Types
 18704  	// match: (Eq16 x y)
 18705  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 18706  	for {
 18707  		x := v_0
 18708  		y := v_1
 18709  		v.reset(OpARM64Equal)
 18710  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18711  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18712  		v1.AddArg(x)
 18713  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18714  		v2.AddArg(y)
 18715  		v0.AddArg2(v1, v2)
 18716  		v.AddArg(v0)
 18717  		return true
 18718  	}
 18719  }
 18720  func rewriteValueARM64_OpEq32(v *Value) bool {
 18721  	v_1 := v.Args[1]
 18722  	v_0 := v.Args[0]
 18723  	b := v.Block
 18724  	// match: (Eq32 x y)
 18725  	// result: (Equal (CMPW x y))
 18726  	for {
 18727  		x := v_0
 18728  		y := v_1
 18729  		v.reset(OpARM64Equal)
 18730  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18731  		v0.AddArg2(x, y)
 18732  		v.AddArg(v0)
 18733  		return true
 18734  	}
 18735  }
 18736  func rewriteValueARM64_OpEq32F(v *Value) bool {
 18737  	v_1 := v.Args[1]
 18738  	v_0 := v.Args[0]
 18739  	b := v.Block
 18740  	// match: (Eq32F x y)
 18741  	// result: (Equal (FCMPS x y))
 18742  	for {
 18743  		x := v_0
 18744  		y := v_1
 18745  		v.reset(OpARM64Equal)
 18746  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 18747  		v0.AddArg2(x, y)
 18748  		v.AddArg(v0)
 18749  		return true
 18750  	}
 18751  }
 18752  func rewriteValueARM64_OpEq64(v *Value) bool {
 18753  	v_1 := v.Args[1]
 18754  	v_0 := v.Args[0]
 18755  	b := v.Block
 18756  	// match: (Eq64 x y)
 18757  	// result: (Equal (CMP x y))
 18758  	for {
 18759  		x := v_0
 18760  		y := v_1
 18761  		v.reset(OpARM64Equal)
 18762  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18763  		v0.AddArg2(x, y)
 18764  		v.AddArg(v0)
 18765  		return true
 18766  	}
 18767  }
 18768  func rewriteValueARM64_OpEq64F(v *Value) bool {
 18769  	v_1 := v.Args[1]
 18770  	v_0 := v.Args[0]
 18771  	b := v.Block
 18772  	// match: (Eq64F x y)
 18773  	// result: (Equal (FCMPD x y))
 18774  	for {
 18775  		x := v_0
 18776  		y := v_1
 18777  		v.reset(OpARM64Equal)
 18778  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 18779  		v0.AddArg2(x, y)
 18780  		v.AddArg(v0)
 18781  		return true
 18782  	}
 18783  }
 18784  func rewriteValueARM64_OpEq8(v *Value) bool {
 18785  	v_1 := v.Args[1]
 18786  	v_0 := v.Args[0]
 18787  	b := v.Block
 18788  	typ := &b.Func.Config.Types
 18789  	// match: (Eq8 x y)
 18790  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 18791  	for {
 18792  		x := v_0
 18793  		y := v_1
 18794  		v.reset(OpARM64Equal)
 18795  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18796  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18797  		v1.AddArg(x)
 18798  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18799  		v2.AddArg(y)
 18800  		v0.AddArg2(v1, v2)
 18801  		v.AddArg(v0)
 18802  		return true
 18803  	}
 18804  }
 18805  func rewriteValueARM64_OpEqB(v *Value) bool {
 18806  	v_1 := v.Args[1]
 18807  	v_0 := v.Args[0]
 18808  	b := v.Block
 18809  	typ := &b.Func.Config.Types
 18810  	// match: (EqB x y)
 18811  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 18812  	for {
 18813  		x := v_0
 18814  		y := v_1
 18815  		v.reset(OpARM64XOR)
 18816  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18817  		v0.AuxInt = int64ToAuxInt(1)
 18818  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 18819  		v1.AddArg2(x, y)
 18820  		v.AddArg2(v0, v1)
 18821  		return true
 18822  	}
 18823  }
 18824  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 18825  	v_1 := v.Args[1]
 18826  	v_0 := v.Args[0]
 18827  	b := v.Block
 18828  	// match: (EqPtr x y)
 18829  	// result: (Equal (CMP x y))
 18830  	for {
 18831  		x := v_0
 18832  		y := v_1
 18833  		v.reset(OpARM64Equal)
 18834  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18835  		v0.AddArg2(x, y)
 18836  		v.AddArg(v0)
 18837  		return true
 18838  	}
 18839  }
 18840  func rewriteValueARM64_OpFMA(v *Value) bool {
 18841  	v_2 := v.Args[2]
 18842  	v_1 := v.Args[1]
 18843  	v_0 := v.Args[0]
 18844  	// match: (FMA x y z)
 18845  	// result: (FMADDD z x y)
 18846  	for {
 18847  		x := v_0
 18848  		y := v_1
 18849  		z := v_2
 18850  		v.reset(OpARM64FMADDD)
 18851  		v.AddArg3(z, x, y)
 18852  		return true
 18853  	}
 18854  }
 18855  func rewriteValueARM64_OpHmul32(v *Value) bool {
 18856  	v_1 := v.Args[1]
 18857  	v_0 := v.Args[0]
 18858  	b := v.Block
 18859  	typ := &b.Func.Config.Types
 18860  	// match: (Hmul32 x y)
 18861  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 18862  	for {
 18863  		x := v_0
 18864  		y := v_1
 18865  		v.reset(OpARM64SRAconst)
 18866  		v.AuxInt = int64ToAuxInt(32)
 18867  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 18868  		v0.AddArg2(x, y)
 18869  		v.AddArg(v0)
 18870  		return true
 18871  	}
 18872  }
 18873  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 18874  	v_1 := v.Args[1]
 18875  	v_0 := v.Args[0]
 18876  	b := v.Block
 18877  	typ := &b.Func.Config.Types
 18878  	// match: (Hmul32u x y)
 18879  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 18880  	for {
 18881  		x := v_0
 18882  		y := v_1
 18883  		v.reset(OpARM64SRAconst)
 18884  		v.AuxInt = int64ToAuxInt(32)
 18885  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 18886  		v0.AddArg2(x, y)
 18887  		v.AddArg(v0)
 18888  		return true
 18889  	}
 18890  }
 18891  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 18892  	v_1 := v.Args[1]
 18893  	v_0 := v.Args[0]
 18894  	b := v.Block
 18895  	// match: (IsInBounds idx len)
 18896  	// result: (LessThanU (CMP idx len))
 18897  	for {
 18898  		idx := v_0
 18899  		len := v_1
 18900  		v.reset(OpARM64LessThanU)
 18901  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18902  		v0.AddArg2(idx, len)
 18903  		v.AddArg(v0)
 18904  		return true
 18905  	}
 18906  }
 18907  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 18908  	v_0 := v.Args[0]
 18909  	b := v.Block
 18910  	// match: (IsNonNil ptr)
 18911  	// result: (NotEqual (CMPconst [0] ptr))
 18912  	for {
 18913  		ptr := v_0
 18914  		v.reset(OpARM64NotEqual)
 18915  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18916  		v0.AuxInt = int64ToAuxInt(0)
 18917  		v0.AddArg(ptr)
 18918  		v.AddArg(v0)
 18919  		return true
 18920  	}
 18921  }
 18922  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 18923  	v_1 := v.Args[1]
 18924  	v_0 := v.Args[0]
 18925  	b := v.Block
 18926  	// match: (IsSliceInBounds idx len)
 18927  	// result: (LessEqualU (CMP idx len))
 18928  	for {
 18929  		idx := v_0
 18930  		len := v_1
 18931  		v.reset(OpARM64LessEqualU)
 18932  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 18933  		v0.AddArg2(idx, len)
 18934  		v.AddArg(v0)
 18935  		return true
 18936  	}
 18937  }
 18938  func rewriteValueARM64_OpLeq16(v *Value) bool {
 18939  	v_1 := v.Args[1]
 18940  	v_0 := v.Args[0]
 18941  	b := v.Block
 18942  	typ := &b.Func.Config.Types
 18943  	// match: (Leq16 x y)
 18944  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 18945  	for {
 18946  		x := v_0
 18947  		y := v_1
 18948  		v.reset(OpARM64LessEqual)
 18949  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18950  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18951  		v1.AddArg(x)
 18952  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18953  		v2.AddArg(y)
 18954  		v0.AddArg2(v1, v2)
 18955  		v.AddArg(v0)
 18956  		return true
 18957  	}
 18958  }
 18959  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 18960  	v_1 := v.Args[1]
 18961  	v_0 := v.Args[0]
 18962  	b := v.Block
 18963  	typ := &b.Func.Config.Types
 18964  	// match: (Leq16U x zero:(MOVDconst [0]))
 18965  	// result: (Eq16 x zero)
 18966  	for {
 18967  		x := v_0
 18968  		zero := v_1
 18969  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 18970  			break
 18971  		}
 18972  		v.reset(OpEq16)
 18973  		v.AddArg2(x, zero)
 18974  		return true
 18975  	}
 18976  	// match: (Leq16U (MOVDconst [1]) x)
 18977  	// result: (Neq16 (MOVDconst [0]) x)
 18978  	for {
 18979  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 18980  			break
 18981  		}
 18982  		x := v_1
 18983  		v.reset(OpNeq16)
 18984  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 18985  		v0.AuxInt = int64ToAuxInt(0)
 18986  		v.AddArg2(v0, x)
 18987  		return true
 18988  	}
 18989  	// match: (Leq16U x y)
 18990  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 18991  	for {
 18992  		x := v_0
 18993  		y := v_1
 18994  		v.reset(OpARM64LessEqualU)
 18995  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 18996  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18997  		v1.AddArg(x)
 18998  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18999  		v2.AddArg(y)
 19000  		v0.AddArg2(v1, v2)
 19001  		v.AddArg(v0)
 19002  		return true
 19003  	}
 19004  }
 19005  func rewriteValueARM64_OpLeq32(v *Value) bool {
 19006  	v_1 := v.Args[1]
 19007  	v_0 := v.Args[0]
 19008  	b := v.Block
 19009  	// match: (Leq32 x y)
 19010  	// result: (LessEqual (CMPW x y))
 19011  	for {
 19012  		x := v_0
 19013  		y := v_1
 19014  		v.reset(OpARM64LessEqual)
 19015  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19016  		v0.AddArg2(x, y)
 19017  		v.AddArg(v0)
 19018  		return true
 19019  	}
 19020  }
 19021  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 19022  	v_1 := v.Args[1]
 19023  	v_0 := v.Args[0]
 19024  	b := v.Block
 19025  	// match: (Leq32F x y)
 19026  	// result: (LessEqualF (FCMPS x y))
 19027  	for {
 19028  		x := v_0
 19029  		y := v_1
 19030  		v.reset(OpARM64LessEqualF)
 19031  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 19032  		v0.AddArg2(x, y)
 19033  		v.AddArg(v0)
 19034  		return true
 19035  	}
 19036  }
 19037  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 19038  	v_1 := v.Args[1]
 19039  	v_0 := v.Args[0]
 19040  	b := v.Block
 19041  	typ := &b.Func.Config.Types
 19042  	// match: (Leq32U x zero:(MOVDconst [0]))
 19043  	// result: (Eq32 x zero)
 19044  	for {
 19045  		x := v_0
 19046  		zero := v_1
 19047  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 19048  			break
 19049  		}
 19050  		v.reset(OpEq32)
 19051  		v.AddArg2(x, zero)
 19052  		return true
 19053  	}
 19054  	// match: (Leq32U (MOVDconst [1]) x)
 19055  	// result: (Neq32 (MOVDconst [0]) x)
 19056  	for {
 19057  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 19058  			break
 19059  		}
 19060  		x := v_1
 19061  		v.reset(OpNeq32)
 19062  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19063  		v0.AuxInt = int64ToAuxInt(0)
 19064  		v.AddArg2(v0, x)
 19065  		return true
 19066  	}
 19067  	// match: (Leq32U x y)
 19068  	// result: (LessEqualU (CMPW x y))
 19069  	for {
 19070  		x := v_0
 19071  		y := v_1
 19072  		v.reset(OpARM64LessEqualU)
 19073  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19074  		v0.AddArg2(x, y)
 19075  		v.AddArg(v0)
 19076  		return true
 19077  	}
 19078  }
 19079  func rewriteValueARM64_OpLeq64(v *Value) bool {
 19080  	v_1 := v.Args[1]
 19081  	v_0 := v.Args[0]
 19082  	b := v.Block
 19083  	// match: (Leq64 x y)
 19084  	// result: (LessEqual (CMP x y))
 19085  	for {
 19086  		x := v_0
 19087  		y := v_1
 19088  		v.reset(OpARM64LessEqual)
 19089  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19090  		v0.AddArg2(x, y)
 19091  		v.AddArg(v0)
 19092  		return true
 19093  	}
 19094  }
 19095  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 19096  	v_1 := v.Args[1]
 19097  	v_0 := v.Args[0]
 19098  	b := v.Block
 19099  	// match: (Leq64F x y)
 19100  	// result: (LessEqualF (FCMPD x y))
 19101  	for {
 19102  		x := v_0
 19103  		y := v_1
 19104  		v.reset(OpARM64LessEqualF)
 19105  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 19106  		v0.AddArg2(x, y)
 19107  		v.AddArg(v0)
 19108  		return true
 19109  	}
 19110  }
 19111  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 19112  	v_1 := v.Args[1]
 19113  	v_0 := v.Args[0]
 19114  	b := v.Block
 19115  	typ := &b.Func.Config.Types
 19116  	// match: (Leq64U x zero:(MOVDconst [0]))
 19117  	// result: (Eq64 x zero)
 19118  	for {
 19119  		x := v_0
 19120  		zero := v_1
 19121  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 19122  			break
 19123  		}
 19124  		v.reset(OpEq64)
 19125  		v.AddArg2(x, zero)
 19126  		return true
 19127  	}
 19128  	// match: (Leq64U (MOVDconst [1]) x)
 19129  	// result: (Neq64 (MOVDconst [0]) x)
 19130  	for {
 19131  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 19132  			break
 19133  		}
 19134  		x := v_1
 19135  		v.reset(OpNeq64)
 19136  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19137  		v0.AuxInt = int64ToAuxInt(0)
 19138  		v.AddArg2(v0, x)
 19139  		return true
 19140  	}
 19141  	// match: (Leq64U x y)
 19142  	// result: (LessEqualU (CMP x y))
 19143  	for {
 19144  		x := v_0
 19145  		y := v_1
 19146  		v.reset(OpARM64LessEqualU)
 19147  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19148  		v0.AddArg2(x, y)
 19149  		v.AddArg(v0)
 19150  		return true
 19151  	}
 19152  }
 19153  func rewriteValueARM64_OpLeq8(v *Value) bool {
 19154  	v_1 := v.Args[1]
 19155  	v_0 := v.Args[0]
 19156  	b := v.Block
 19157  	typ := &b.Func.Config.Types
 19158  	// match: (Leq8 x y)
 19159  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 19160  	for {
 19161  		x := v_0
 19162  		y := v_1
 19163  		v.reset(OpARM64LessEqual)
 19164  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19165  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19166  		v1.AddArg(x)
 19167  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19168  		v2.AddArg(y)
 19169  		v0.AddArg2(v1, v2)
 19170  		v.AddArg(v0)
 19171  		return true
 19172  	}
 19173  }
 19174  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 19175  	v_1 := v.Args[1]
 19176  	v_0 := v.Args[0]
 19177  	b := v.Block
 19178  	typ := &b.Func.Config.Types
 19179  	// match: (Leq8U x zero:(MOVDconst [0]))
 19180  	// result: (Eq8 x zero)
 19181  	for {
 19182  		x := v_0
 19183  		zero := v_1
 19184  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 19185  			break
 19186  		}
 19187  		v.reset(OpEq8)
 19188  		v.AddArg2(x, zero)
 19189  		return true
 19190  	}
 19191  	// match: (Leq8U (MOVDconst [1]) x)
 19192  	// result: (Neq8 (MOVDconst [0]) x)
 19193  	for {
 19194  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 19195  			break
 19196  		}
 19197  		x := v_1
 19198  		v.reset(OpNeq8)
 19199  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19200  		v0.AuxInt = int64ToAuxInt(0)
 19201  		v.AddArg2(v0, x)
 19202  		return true
 19203  	}
 19204  	// match: (Leq8U x y)
 19205  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 19206  	for {
 19207  		x := v_0
 19208  		y := v_1
 19209  		v.reset(OpARM64LessEqualU)
 19210  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19211  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19212  		v1.AddArg(x)
 19213  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19214  		v2.AddArg(y)
 19215  		v0.AddArg2(v1, v2)
 19216  		v.AddArg(v0)
 19217  		return true
 19218  	}
 19219  }
 19220  func rewriteValueARM64_OpLess16(v *Value) bool {
 19221  	v_1 := v.Args[1]
 19222  	v_0 := v.Args[0]
 19223  	b := v.Block
 19224  	typ := &b.Func.Config.Types
 19225  	// match: (Less16 x y)
 19226  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 19227  	for {
 19228  		x := v_0
 19229  		y := v_1
 19230  		v.reset(OpARM64LessThan)
 19231  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19232  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19233  		v1.AddArg(x)
 19234  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 19235  		v2.AddArg(y)
 19236  		v0.AddArg2(v1, v2)
 19237  		v.AddArg(v0)
 19238  		return true
 19239  	}
 19240  }
 19241  func rewriteValueARM64_OpLess16U(v *Value) bool {
 19242  	v_1 := v.Args[1]
 19243  	v_0 := v.Args[0]
 19244  	b := v.Block
 19245  	typ := &b.Func.Config.Types
 19246  	// match: (Less16U zero:(MOVDconst [0]) x)
 19247  	// result: (Neq16 zero x)
 19248  	for {
 19249  		zero := v_0
 19250  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 19251  			break
 19252  		}
 19253  		x := v_1
 19254  		v.reset(OpNeq16)
 19255  		v.AddArg2(zero, x)
 19256  		return true
 19257  	}
 19258  	// match: (Less16U x (MOVDconst [1]))
 19259  	// result: (Eq16 x (MOVDconst [0]))
 19260  	for {
 19261  		x := v_0
 19262  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 19263  			break
 19264  		}
 19265  		v.reset(OpEq16)
 19266  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19267  		v0.AuxInt = int64ToAuxInt(0)
 19268  		v.AddArg2(x, v0)
 19269  		return true
 19270  	}
 19271  	// match: (Less16U x y)
 19272  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 19273  	for {
 19274  		x := v_0
 19275  		y := v_1
 19276  		v.reset(OpARM64LessThanU)
 19277  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19278  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19279  		v1.AddArg(x)
 19280  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19281  		v2.AddArg(y)
 19282  		v0.AddArg2(v1, v2)
 19283  		v.AddArg(v0)
 19284  		return true
 19285  	}
 19286  }
 19287  func rewriteValueARM64_OpLess32(v *Value) bool {
 19288  	v_1 := v.Args[1]
 19289  	v_0 := v.Args[0]
 19290  	b := v.Block
 19291  	// match: (Less32 x y)
 19292  	// result: (LessThan (CMPW x y))
 19293  	for {
 19294  		x := v_0
 19295  		y := v_1
 19296  		v.reset(OpARM64LessThan)
 19297  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19298  		v0.AddArg2(x, y)
 19299  		v.AddArg(v0)
 19300  		return true
 19301  	}
 19302  }
 19303  func rewriteValueARM64_OpLess32F(v *Value) bool {
 19304  	v_1 := v.Args[1]
 19305  	v_0 := v.Args[0]
 19306  	b := v.Block
 19307  	// match: (Less32F x y)
 19308  	// result: (LessThanF (FCMPS x y))
 19309  	for {
 19310  		x := v_0
 19311  		y := v_1
 19312  		v.reset(OpARM64LessThanF)
 19313  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 19314  		v0.AddArg2(x, y)
 19315  		v.AddArg(v0)
 19316  		return true
 19317  	}
 19318  }
 19319  func rewriteValueARM64_OpLess32U(v *Value) bool {
 19320  	v_1 := v.Args[1]
 19321  	v_0 := v.Args[0]
 19322  	b := v.Block
 19323  	typ := &b.Func.Config.Types
 19324  	// match: (Less32U zero:(MOVDconst [0]) x)
 19325  	// result: (Neq32 zero x)
 19326  	for {
 19327  		zero := v_0
 19328  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 19329  			break
 19330  		}
 19331  		x := v_1
 19332  		v.reset(OpNeq32)
 19333  		v.AddArg2(zero, x)
 19334  		return true
 19335  	}
 19336  	// match: (Less32U x (MOVDconst [1]))
 19337  	// result: (Eq32 x (MOVDconst [0]))
 19338  	for {
 19339  		x := v_0
 19340  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 19341  			break
 19342  		}
 19343  		v.reset(OpEq32)
 19344  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19345  		v0.AuxInt = int64ToAuxInt(0)
 19346  		v.AddArg2(x, v0)
 19347  		return true
 19348  	}
 19349  	// match: (Less32U x y)
 19350  	// result: (LessThanU (CMPW x y))
 19351  	for {
 19352  		x := v_0
 19353  		y := v_1
 19354  		v.reset(OpARM64LessThanU)
 19355  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19356  		v0.AddArg2(x, y)
 19357  		v.AddArg(v0)
 19358  		return true
 19359  	}
 19360  }
 19361  func rewriteValueARM64_OpLess64(v *Value) bool {
 19362  	v_1 := v.Args[1]
 19363  	v_0 := v.Args[0]
 19364  	b := v.Block
 19365  	// match: (Less64 x y)
 19366  	// result: (LessThan (CMP x y))
 19367  	for {
 19368  		x := v_0
 19369  		y := v_1
 19370  		v.reset(OpARM64LessThan)
 19371  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19372  		v0.AddArg2(x, y)
 19373  		v.AddArg(v0)
 19374  		return true
 19375  	}
 19376  }
 19377  func rewriteValueARM64_OpLess64F(v *Value) bool {
 19378  	v_1 := v.Args[1]
 19379  	v_0 := v.Args[0]
 19380  	b := v.Block
 19381  	// match: (Less64F x y)
 19382  	// result: (LessThanF (FCMPD x y))
 19383  	for {
 19384  		x := v_0
 19385  		y := v_1
 19386  		v.reset(OpARM64LessThanF)
 19387  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 19388  		v0.AddArg2(x, y)
 19389  		v.AddArg(v0)
 19390  		return true
 19391  	}
 19392  }
 19393  func rewriteValueARM64_OpLess64U(v *Value) bool {
 19394  	v_1 := v.Args[1]
 19395  	v_0 := v.Args[0]
 19396  	b := v.Block
 19397  	typ := &b.Func.Config.Types
 19398  	// match: (Less64U zero:(MOVDconst [0]) x)
 19399  	// result: (Neq64 zero x)
 19400  	for {
 19401  		zero := v_0
 19402  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 19403  			break
 19404  		}
 19405  		x := v_1
 19406  		v.reset(OpNeq64)
 19407  		v.AddArg2(zero, x)
 19408  		return true
 19409  	}
 19410  	// match: (Less64U x (MOVDconst [1]))
 19411  	// result: (Eq64 x (MOVDconst [0]))
 19412  	for {
 19413  		x := v_0
 19414  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 19415  			break
 19416  		}
 19417  		v.reset(OpEq64)
 19418  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19419  		v0.AuxInt = int64ToAuxInt(0)
 19420  		v.AddArg2(x, v0)
 19421  		return true
 19422  	}
 19423  	// match: (Less64U x y)
 19424  	// result: (LessThanU (CMP x y))
 19425  	for {
 19426  		x := v_0
 19427  		y := v_1
 19428  		v.reset(OpARM64LessThanU)
 19429  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19430  		v0.AddArg2(x, y)
 19431  		v.AddArg(v0)
 19432  		return true
 19433  	}
 19434  }
 19435  func rewriteValueARM64_OpLess8(v *Value) bool {
 19436  	v_1 := v.Args[1]
 19437  	v_0 := v.Args[0]
 19438  	b := v.Block
 19439  	typ := &b.Func.Config.Types
 19440  	// match: (Less8 x y)
 19441  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 19442  	for {
 19443  		x := v_0
 19444  		y := v_1
 19445  		v.reset(OpARM64LessThan)
 19446  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19447  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19448  		v1.AddArg(x)
 19449  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 19450  		v2.AddArg(y)
 19451  		v0.AddArg2(v1, v2)
 19452  		v.AddArg(v0)
 19453  		return true
 19454  	}
 19455  }
 19456  func rewriteValueARM64_OpLess8U(v *Value) bool {
 19457  	v_1 := v.Args[1]
 19458  	v_0 := v.Args[0]
 19459  	b := v.Block
 19460  	typ := &b.Func.Config.Types
 19461  	// match: (Less8U zero:(MOVDconst [0]) x)
 19462  	// result: (Neq8 zero x)
 19463  	for {
 19464  		zero := v_0
 19465  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 19466  			break
 19467  		}
 19468  		x := v_1
 19469  		v.reset(OpNeq8)
 19470  		v.AddArg2(zero, x)
 19471  		return true
 19472  	}
 19473  	// match: (Less8U x (MOVDconst [1]))
 19474  	// result: (Eq8 x (MOVDconst [0]))
 19475  	for {
 19476  		x := v_0
 19477  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 19478  			break
 19479  		}
 19480  		v.reset(OpEq8)
 19481  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19482  		v0.AuxInt = int64ToAuxInt(0)
 19483  		v.AddArg2(x, v0)
 19484  		return true
 19485  	}
 19486  	// match: (Less8U x y)
 19487  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 19488  	for {
 19489  		x := v_0
 19490  		y := v_1
 19491  		v.reset(OpARM64LessThanU)
 19492  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19493  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19494  		v1.AddArg(x)
 19495  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19496  		v2.AddArg(y)
 19497  		v0.AddArg2(v1, v2)
 19498  		v.AddArg(v0)
 19499  		return true
 19500  	}
 19501  }
 19502  func rewriteValueARM64_OpLoad(v *Value) bool {
 19503  	v_1 := v.Args[1]
 19504  	v_0 := v.Args[0]
 19505  	// match: (Load <t> ptr mem)
 19506  	// cond: t.IsBoolean()
 19507  	// result: (MOVBUload ptr mem)
 19508  	for {
 19509  		t := v.Type
 19510  		ptr := v_0
 19511  		mem := v_1
 19512  		if !(t.IsBoolean()) {
 19513  			break
 19514  		}
 19515  		v.reset(OpARM64MOVBUload)
 19516  		v.AddArg2(ptr, mem)
 19517  		return true
 19518  	}
 19519  	// match: (Load <t> ptr mem)
 19520  	// cond: (is8BitInt(t) && t.IsSigned())
 19521  	// result: (MOVBload ptr mem)
 19522  	for {
 19523  		t := v.Type
 19524  		ptr := v_0
 19525  		mem := v_1
 19526  		if !(is8BitInt(t) && t.IsSigned()) {
 19527  			break
 19528  		}
 19529  		v.reset(OpARM64MOVBload)
 19530  		v.AddArg2(ptr, mem)
 19531  		return true
 19532  	}
 19533  	// match: (Load <t> ptr mem)
 19534  	// cond: (is8BitInt(t) && !t.IsSigned())
 19535  	// result: (MOVBUload ptr mem)
 19536  	for {
 19537  		t := v.Type
 19538  		ptr := v_0
 19539  		mem := v_1
 19540  		if !(is8BitInt(t) && !t.IsSigned()) {
 19541  			break
 19542  		}
 19543  		v.reset(OpARM64MOVBUload)
 19544  		v.AddArg2(ptr, mem)
 19545  		return true
 19546  	}
 19547  	// match: (Load <t> ptr mem)
 19548  	// cond: (is16BitInt(t) && t.IsSigned())
 19549  	// result: (MOVHload ptr mem)
 19550  	for {
 19551  		t := v.Type
 19552  		ptr := v_0
 19553  		mem := v_1
 19554  		if !(is16BitInt(t) && t.IsSigned()) {
 19555  			break
 19556  		}
 19557  		v.reset(OpARM64MOVHload)
 19558  		v.AddArg2(ptr, mem)
 19559  		return true
 19560  	}
 19561  	// match: (Load <t> ptr mem)
 19562  	// cond: (is16BitInt(t) && !t.IsSigned())
 19563  	// result: (MOVHUload ptr mem)
 19564  	for {
 19565  		t := v.Type
 19566  		ptr := v_0
 19567  		mem := v_1
 19568  		if !(is16BitInt(t) && !t.IsSigned()) {
 19569  			break
 19570  		}
 19571  		v.reset(OpARM64MOVHUload)
 19572  		v.AddArg2(ptr, mem)
 19573  		return true
 19574  	}
 19575  	// match: (Load <t> ptr mem)
 19576  	// cond: (is32BitInt(t) && t.IsSigned())
 19577  	// result: (MOVWload ptr mem)
 19578  	for {
 19579  		t := v.Type
 19580  		ptr := v_0
 19581  		mem := v_1
 19582  		if !(is32BitInt(t) && t.IsSigned()) {
 19583  			break
 19584  		}
 19585  		v.reset(OpARM64MOVWload)
 19586  		v.AddArg2(ptr, mem)
 19587  		return true
 19588  	}
 19589  	// match: (Load <t> ptr mem)
 19590  	// cond: (is32BitInt(t) && !t.IsSigned())
 19591  	// result: (MOVWUload ptr mem)
 19592  	for {
 19593  		t := v.Type
 19594  		ptr := v_0
 19595  		mem := v_1
 19596  		if !(is32BitInt(t) && !t.IsSigned()) {
 19597  			break
 19598  		}
 19599  		v.reset(OpARM64MOVWUload)
 19600  		v.AddArg2(ptr, mem)
 19601  		return true
 19602  	}
 19603  	// match: (Load <t> ptr mem)
 19604  	// cond: (is64BitInt(t) || isPtr(t))
 19605  	// result: (MOVDload ptr mem)
 19606  	for {
 19607  		t := v.Type
 19608  		ptr := v_0
 19609  		mem := v_1
 19610  		if !(is64BitInt(t) || isPtr(t)) {
 19611  			break
 19612  		}
 19613  		v.reset(OpARM64MOVDload)
 19614  		v.AddArg2(ptr, mem)
 19615  		return true
 19616  	}
 19617  	// match: (Load <t> ptr mem)
 19618  	// cond: is32BitFloat(t)
 19619  	// result: (FMOVSload ptr mem)
 19620  	for {
 19621  		t := v.Type
 19622  		ptr := v_0
 19623  		mem := v_1
 19624  		if !(is32BitFloat(t)) {
 19625  			break
 19626  		}
 19627  		v.reset(OpARM64FMOVSload)
 19628  		v.AddArg2(ptr, mem)
 19629  		return true
 19630  	}
 19631  	// match: (Load <t> ptr mem)
 19632  	// cond: is64BitFloat(t)
 19633  	// result: (FMOVDload ptr mem)
 19634  	for {
 19635  		t := v.Type
 19636  		ptr := v_0
 19637  		mem := v_1
 19638  		if !(is64BitFloat(t)) {
 19639  			break
 19640  		}
 19641  		v.reset(OpARM64FMOVDload)
 19642  		v.AddArg2(ptr, mem)
 19643  		return true
 19644  	}
 19645  	return false
 19646  }
 19647  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 19648  	v_1 := v.Args[1]
 19649  	v_0 := v.Args[0]
 19650  	b := v.Block
 19651  	typ := &b.Func.Config.Types
 19652  	// match: (LocalAddr <t> {sym} base mem)
 19653  	// cond: t.Elem().HasPointers()
 19654  	// result: (MOVDaddr {sym} (SPanchored base mem))
 19655  	for {
 19656  		t := v.Type
 19657  		sym := auxToSym(v.Aux)
 19658  		base := v_0
 19659  		mem := v_1
 19660  		if !(t.Elem().HasPointers()) {
 19661  			break
 19662  		}
 19663  		v.reset(OpARM64MOVDaddr)
 19664  		v.Aux = symToAux(sym)
 19665  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 19666  		v0.AddArg2(base, mem)
 19667  		v.AddArg(v0)
 19668  		return true
 19669  	}
 19670  	// match: (LocalAddr <t> {sym} base _)
 19671  	// cond: !t.Elem().HasPointers()
 19672  	// result: (MOVDaddr {sym} base)
 19673  	for {
 19674  		t := v.Type
 19675  		sym := auxToSym(v.Aux)
 19676  		base := v_0
 19677  		if !(!t.Elem().HasPointers()) {
 19678  			break
 19679  		}
 19680  		v.reset(OpARM64MOVDaddr)
 19681  		v.Aux = symToAux(sym)
 19682  		v.AddArg(base)
 19683  		return true
 19684  	}
 19685  	return false
 19686  }
 19687  func rewriteValueARM64_OpLsh16x16(v *Value) bool {
 19688  	v_1 := v.Args[1]
 19689  	v_0 := v.Args[0]
 19690  	b := v.Block
 19691  	typ := &b.Func.Config.Types
 19692  	// match: (Lsh16x16 <t> x y)
 19693  	// cond: shiftIsBounded(v)
 19694  	// result: (SLL <t> x y)
 19695  	for {
 19696  		t := v.Type
 19697  		x := v_0
 19698  		y := v_1
 19699  		if !(shiftIsBounded(v)) {
 19700  			break
 19701  		}
 19702  		v.reset(OpARM64SLL)
 19703  		v.Type = t
 19704  		v.AddArg2(x, y)
 19705  		return true
 19706  	}
 19707  	// match: (Lsh16x16 <t> x y)
 19708  	// cond: !shiftIsBounded(v)
 19709  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 19710  	for {
 19711  		t := v.Type
 19712  		x := v_0
 19713  		y := v_1
 19714  		if !(!shiftIsBounded(v)) {
 19715  			break
 19716  		}
 19717  		v.reset(OpARM64CSEL)
 19718  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19719  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19720  		v0.AddArg2(x, y)
 19721  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19722  		v1.AuxInt = int64ToAuxInt(0)
 19723  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19724  		v2.AuxInt = int64ToAuxInt(64)
 19725  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19726  		v3.AddArg(y)
 19727  		v2.AddArg(v3)
 19728  		v.AddArg3(v0, v1, v2)
 19729  		return true
 19730  	}
 19731  	return false
 19732  }
 19733  func rewriteValueARM64_OpLsh16x32(v *Value) bool {
 19734  	v_1 := v.Args[1]
 19735  	v_0 := v.Args[0]
 19736  	b := v.Block
 19737  	typ := &b.Func.Config.Types
 19738  	// match: (Lsh16x32 <t> x y)
 19739  	// cond: shiftIsBounded(v)
 19740  	// result: (SLL <t> x y)
 19741  	for {
 19742  		t := v.Type
 19743  		x := v_0
 19744  		y := v_1
 19745  		if !(shiftIsBounded(v)) {
 19746  			break
 19747  		}
 19748  		v.reset(OpARM64SLL)
 19749  		v.Type = t
 19750  		v.AddArg2(x, y)
 19751  		return true
 19752  	}
 19753  	// match: (Lsh16x32 <t> x y)
 19754  	// cond: !shiftIsBounded(v)
 19755  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 19756  	for {
 19757  		t := v.Type
 19758  		x := v_0
 19759  		y := v_1
 19760  		if !(!shiftIsBounded(v)) {
 19761  			break
 19762  		}
 19763  		v.reset(OpARM64CSEL)
 19764  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19765  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19766  		v0.AddArg2(x, y)
 19767  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19768  		v1.AuxInt = int64ToAuxInt(0)
 19769  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19770  		v2.AuxInt = int64ToAuxInt(64)
 19771  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 19772  		v3.AddArg(y)
 19773  		v2.AddArg(v3)
 19774  		v.AddArg3(v0, v1, v2)
 19775  		return true
 19776  	}
 19777  	return false
 19778  }
 19779  func rewriteValueARM64_OpLsh16x64(v *Value) bool {
 19780  	v_1 := v.Args[1]
 19781  	v_0 := v.Args[0]
 19782  	b := v.Block
 19783  	// match: (Lsh16x64 <t> x y)
 19784  	// cond: shiftIsBounded(v)
 19785  	// result: (SLL <t> x y)
 19786  	for {
 19787  		t := v.Type
 19788  		x := v_0
 19789  		y := v_1
 19790  		if !(shiftIsBounded(v)) {
 19791  			break
 19792  		}
 19793  		v.reset(OpARM64SLL)
 19794  		v.Type = t
 19795  		v.AddArg2(x, y)
 19796  		return true
 19797  	}
 19798  	// match: (Lsh16x64 <t> x y)
 19799  	// cond: !shiftIsBounded(v)
 19800  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 19801  	for {
 19802  		t := v.Type
 19803  		x := v_0
 19804  		y := v_1
 19805  		if !(!shiftIsBounded(v)) {
 19806  			break
 19807  		}
 19808  		v.reset(OpARM64CSEL)
 19809  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19810  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19811  		v0.AddArg2(x, y)
 19812  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19813  		v1.AuxInt = int64ToAuxInt(0)
 19814  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19815  		v2.AuxInt = int64ToAuxInt(64)
 19816  		v2.AddArg(y)
 19817  		v.AddArg3(v0, v1, v2)
 19818  		return true
 19819  	}
 19820  	return false
 19821  }
 19822  func rewriteValueARM64_OpLsh16x8(v *Value) bool {
 19823  	v_1 := v.Args[1]
 19824  	v_0 := v.Args[0]
 19825  	b := v.Block
 19826  	typ := &b.Func.Config.Types
 19827  	// match: (Lsh16x8 <t> x y)
 19828  	// cond: shiftIsBounded(v)
 19829  	// result: (SLL <t> x y)
 19830  	for {
 19831  		t := v.Type
 19832  		x := v_0
 19833  		y := v_1
 19834  		if !(shiftIsBounded(v)) {
 19835  			break
 19836  		}
 19837  		v.reset(OpARM64SLL)
 19838  		v.Type = t
 19839  		v.AddArg2(x, y)
 19840  		return true
 19841  	}
 19842  	// match: (Lsh16x8 <t> x y)
 19843  	// cond: !shiftIsBounded(v)
 19844  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 19845  	for {
 19846  		t := v.Type
 19847  		x := v_0
 19848  		y := v_1
 19849  		if !(!shiftIsBounded(v)) {
 19850  			break
 19851  		}
 19852  		v.reset(OpARM64CSEL)
 19853  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19854  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19855  		v0.AddArg2(x, y)
 19856  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19857  		v1.AuxInt = int64ToAuxInt(0)
 19858  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19859  		v2.AuxInt = int64ToAuxInt(64)
 19860  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19861  		v3.AddArg(y)
 19862  		v2.AddArg(v3)
 19863  		v.AddArg3(v0, v1, v2)
 19864  		return true
 19865  	}
 19866  	return false
 19867  }
 19868  func rewriteValueARM64_OpLsh32x16(v *Value) bool {
 19869  	v_1 := v.Args[1]
 19870  	v_0 := v.Args[0]
 19871  	b := v.Block
 19872  	typ := &b.Func.Config.Types
 19873  	// match: (Lsh32x16 <t> x y)
 19874  	// cond: shiftIsBounded(v)
 19875  	// result: (SLL <t> x y)
 19876  	for {
 19877  		t := v.Type
 19878  		x := v_0
 19879  		y := v_1
 19880  		if !(shiftIsBounded(v)) {
 19881  			break
 19882  		}
 19883  		v.reset(OpARM64SLL)
 19884  		v.Type = t
 19885  		v.AddArg2(x, y)
 19886  		return true
 19887  	}
 19888  	// match: (Lsh32x16 <t> x y)
 19889  	// cond: !shiftIsBounded(v)
 19890  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 19891  	for {
 19892  		t := v.Type
 19893  		x := v_0
 19894  		y := v_1
 19895  		if !(!shiftIsBounded(v)) {
 19896  			break
 19897  		}
 19898  		v.reset(OpARM64CSEL)
 19899  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19900  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19901  		v0.AddArg2(x, y)
 19902  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19903  		v1.AuxInt = int64ToAuxInt(0)
 19904  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19905  		v2.AuxInt = int64ToAuxInt(64)
 19906  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19907  		v3.AddArg(y)
 19908  		v2.AddArg(v3)
 19909  		v.AddArg3(v0, v1, v2)
 19910  		return true
 19911  	}
 19912  	return false
 19913  }
 19914  func rewriteValueARM64_OpLsh32x32(v *Value) bool {
 19915  	v_1 := v.Args[1]
 19916  	v_0 := v.Args[0]
 19917  	b := v.Block
 19918  	typ := &b.Func.Config.Types
 19919  	// match: (Lsh32x32 <t> x y)
 19920  	// cond: shiftIsBounded(v)
 19921  	// result: (SLL <t> x y)
 19922  	for {
 19923  		t := v.Type
 19924  		x := v_0
 19925  		y := v_1
 19926  		if !(shiftIsBounded(v)) {
 19927  			break
 19928  		}
 19929  		v.reset(OpARM64SLL)
 19930  		v.Type = t
 19931  		v.AddArg2(x, y)
 19932  		return true
 19933  	}
 19934  	// match: (Lsh32x32 <t> x y)
 19935  	// cond: !shiftIsBounded(v)
 19936  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 19937  	for {
 19938  		t := v.Type
 19939  		x := v_0
 19940  		y := v_1
 19941  		if !(!shiftIsBounded(v)) {
 19942  			break
 19943  		}
 19944  		v.reset(OpARM64CSEL)
 19945  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19946  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19947  		v0.AddArg2(x, y)
 19948  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19949  		v1.AuxInt = int64ToAuxInt(0)
 19950  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19951  		v2.AuxInt = int64ToAuxInt(64)
 19952  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 19953  		v3.AddArg(y)
 19954  		v2.AddArg(v3)
 19955  		v.AddArg3(v0, v1, v2)
 19956  		return true
 19957  	}
 19958  	return false
 19959  }
 19960  func rewriteValueARM64_OpLsh32x64(v *Value) bool {
 19961  	v_1 := v.Args[1]
 19962  	v_0 := v.Args[0]
 19963  	b := v.Block
 19964  	// match: (Lsh32x64 <t> x y)
 19965  	// cond: shiftIsBounded(v)
 19966  	// result: (SLL <t> x y)
 19967  	for {
 19968  		t := v.Type
 19969  		x := v_0
 19970  		y := v_1
 19971  		if !(shiftIsBounded(v)) {
 19972  			break
 19973  		}
 19974  		v.reset(OpARM64SLL)
 19975  		v.Type = t
 19976  		v.AddArg2(x, y)
 19977  		return true
 19978  	}
 19979  	// match: (Lsh32x64 <t> x y)
 19980  	// cond: !shiftIsBounded(v)
 19981  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 19982  	for {
 19983  		t := v.Type
 19984  		x := v_0
 19985  		y := v_1
 19986  		if !(!shiftIsBounded(v)) {
 19987  			break
 19988  		}
 19989  		v.reset(OpARM64CSEL)
 19990  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19991  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19992  		v0.AddArg2(x, y)
 19993  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 19994  		v1.AuxInt = int64ToAuxInt(0)
 19995  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19996  		v2.AuxInt = int64ToAuxInt(64)
 19997  		v2.AddArg(y)
 19998  		v.AddArg3(v0, v1, v2)
 19999  		return true
 20000  	}
 20001  	return false
 20002  }
 20003  func rewriteValueARM64_OpLsh32x8(v *Value) bool {
 20004  	v_1 := v.Args[1]
 20005  	v_0 := v.Args[0]
 20006  	b := v.Block
 20007  	typ := &b.Func.Config.Types
 20008  	// match: (Lsh32x8 <t> x y)
 20009  	// cond: shiftIsBounded(v)
 20010  	// result: (SLL <t> x y)
 20011  	for {
 20012  		t := v.Type
 20013  		x := v_0
 20014  		y := v_1
 20015  		if !(shiftIsBounded(v)) {
 20016  			break
 20017  		}
 20018  		v.reset(OpARM64SLL)
 20019  		v.Type = t
 20020  		v.AddArg2(x, y)
 20021  		return true
 20022  	}
 20023  	// match: (Lsh32x8 <t> x y)
 20024  	// cond: !shiftIsBounded(v)
 20025  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20026  	for {
 20027  		t := v.Type
 20028  		x := v_0
 20029  		y := v_1
 20030  		if !(!shiftIsBounded(v)) {
 20031  			break
 20032  		}
 20033  		v.reset(OpARM64CSEL)
 20034  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20035  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20036  		v0.AddArg2(x, y)
 20037  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20038  		v1.AuxInt = int64ToAuxInt(0)
 20039  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20040  		v2.AuxInt = int64ToAuxInt(64)
 20041  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20042  		v3.AddArg(y)
 20043  		v2.AddArg(v3)
 20044  		v.AddArg3(v0, v1, v2)
 20045  		return true
 20046  	}
 20047  	return false
 20048  }
 20049  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 20050  	v_1 := v.Args[1]
 20051  	v_0 := v.Args[0]
 20052  	b := v.Block
 20053  	typ := &b.Func.Config.Types
 20054  	// match: (Lsh64x16 <t> x y)
 20055  	// cond: shiftIsBounded(v)
 20056  	// result: (SLL <t> x y)
 20057  	for {
 20058  		t := v.Type
 20059  		x := v_0
 20060  		y := v_1
 20061  		if !(shiftIsBounded(v)) {
 20062  			break
 20063  		}
 20064  		v.reset(OpARM64SLL)
 20065  		v.Type = t
 20066  		v.AddArg2(x, y)
 20067  		return true
 20068  	}
 20069  	// match: (Lsh64x16 <t> x y)
 20070  	// cond: !shiftIsBounded(v)
 20071  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20072  	for {
 20073  		t := v.Type
 20074  		x := v_0
 20075  		y := v_1
 20076  		if !(!shiftIsBounded(v)) {
 20077  			break
 20078  		}
 20079  		v.reset(OpARM64CSEL)
 20080  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20081  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20082  		v0.AddArg2(x, y)
 20083  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20084  		v1.AuxInt = int64ToAuxInt(0)
 20085  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20086  		v2.AuxInt = int64ToAuxInt(64)
 20087  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20088  		v3.AddArg(y)
 20089  		v2.AddArg(v3)
 20090  		v.AddArg3(v0, v1, v2)
 20091  		return true
 20092  	}
 20093  	return false
 20094  }
 20095  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 20096  	v_1 := v.Args[1]
 20097  	v_0 := v.Args[0]
 20098  	b := v.Block
 20099  	typ := &b.Func.Config.Types
 20100  	// match: (Lsh64x32 <t> x y)
 20101  	// cond: shiftIsBounded(v)
 20102  	// result: (SLL <t> x y)
 20103  	for {
 20104  		t := v.Type
 20105  		x := v_0
 20106  		y := v_1
 20107  		if !(shiftIsBounded(v)) {
 20108  			break
 20109  		}
 20110  		v.reset(OpARM64SLL)
 20111  		v.Type = t
 20112  		v.AddArg2(x, y)
 20113  		return true
 20114  	}
 20115  	// match: (Lsh64x32 <t> x y)
 20116  	// cond: !shiftIsBounded(v)
 20117  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20118  	for {
 20119  		t := v.Type
 20120  		x := v_0
 20121  		y := v_1
 20122  		if !(!shiftIsBounded(v)) {
 20123  			break
 20124  		}
 20125  		v.reset(OpARM64CSEL)
 20126  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20127  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20128  		v0.AddArg2(x, y)
 20129  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20130  		v1.AuxInt = int64ToAuxInt(0)
 20131  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20132  		v2.AuxInt = int64ToAuxInt(64)
 20133  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20134  		v3.AddArg(y)
 20135  		v2.AddArg(v3)
 20136  		v.AddArg3(v0, v1, v2)
 20137  		return true
 20138  	}
 20139  	return false
 20140  }
 20141  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 20142  	v_1 := v.Args[1]
 20143  	v_0 := v.Args[0]
 20144  	b := v.Block
 20145  	// match: (Lsh64x64 <t> x y)
 20146  	// cond: shiftIsBounded(v)
 20147  	// result: (SLL <t> x y)
 20148  	for {
 20149  		t := v.Type
 20150  		x := v_0
 20151  		y := v_1
 20152  		if !(shiftIsBounded(v)) {
 20153  			break
 20154  		}
 20155  		v.reset(OpARM64SLL)
 20156  		v.Type = t
 20157  		v.AddArg2(x, y)
 20158  		return true
 20159  	}
 20160  	// match: (Lsh64x64 <t> x y)
 20161  	// cond: !shiftIsBounded(v)
 20162  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 20163  	for {
 20164  		t := v.Type
 20165  		x := v_0
 20166  		y := v_1
 20167  		if !(!shiftIsBounded(v)) {
 20168  			break
 20169  		}
 20170  		v.reset(OpARM64CSEL)
 20171  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20172  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20173  		v0.AddArg2(x, y)
 20174  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20175  		v1.AuxInt = int64ToAuxInt(0)
 20176  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20177  		v2.AuxInt = int64ToAuxInt(64)
 20178  		v2.AddArg(y)
 20179  		v.AddArg3(v0, v1, v2)
 20180  		return true
 20181  	}
 20182  	return false
 20183  }
 20184  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 20185  	v_1 := v.Args[1]
 20186  	v_0 := v.Args[0]
 20187  	b := v.Block
 20188  	typ := &b.Func.Config.Types
 20189  	// match: (Lsh64x8 <t> x y)
 20190  	// cond: shiftIsBounded(v)
 20191  	// result: (SLL <t> x y)
 20192  	for {
 20193  		t := v.Type
 20194  		x := v_0
 20195  		y := v_1
 20196  		if !(shiftIsBounded(v)) {
 20197  			break
 20198  		}
 20199  		v.reset(OpARM64SLL)
 20200  		v.Type = t
 20201  		v.AddArg2(x, y)
 20202  		return true
 20203  	}
 20204  	// match: (Lsh64x8 <t> x y)
 20205  	// cond: !shiftIsBounded(v)
 20206  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20207  	for {
 20208  		t := v.Type
 20209  		x := v_0
 20210  		y := v_1
 20211  		if !(!shiftIsBounded(v)) {
 20212  			break
 20213  		}
 20214  		v.reset(OpARM64CSEL)
 20215  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20216  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20217  		v0.AddArg2(x, y)
 20218  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20219  		v1.AuxInt = int64ToAuxInt(0)
 20220  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20221  		v2.AuxInt = int64ToAuxInt(64)
 20222  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20223  		v3.AddArg(y)
 20224  		v2.AddArg(v3)
 20225  		v.AddArg3(v0, v1, v2)
 20226  		return true
 20227  	}
 20228  	return false
 20229  }
 20230  func rewriteValueARM64_OpLsh8x16(v *Value) bool {
 20231  	v_1 := v.Args[1]
 20232  	v_0 := v.Args[0]
 20233  	b := v.Block
 20234  	typ := &b.Func.Config.Types
 20235  	// match: (Lsh8x16 <t> x y)
 20236  	// cond: shiftIsBounded(v)
 20237  	// result: (SLL <t> x y)
 20238  	for {
 20239  		t := v.Type
 20240  		x := v_0
 20241  		y := v_1
 20242  		if !(shiftIsBounded(v)) {
 20243  			break
 20244  		}
 20245  		v.reset(OpARM64SLL)
 20246  		v.Type = t
 20247  		v.AddArg2(x, y)
 20248  		return true
 20249  	}
 20250  	// match: (Lsh8x16 <t> x y)
 20251  	// cond: !shiftIsBounded(v)
 20252  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20253  	for {
 20254  		t := v.Type
 20255  		x := v_0
 20256  		y := v_1
 20257  		if !(!shiftIsBounded(v)) {
 20258  			break
 20259  		}
 20260  		v.reset(OpARM64CSEL)
 20261  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20262  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20263  		v0.AddArg2(x, y)
 20264  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20265  		v1.AuxInt = int64ToAuxInt(0)
 20266  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20267  		v2.AuxInt = int64ToAuxInt(64)
 20268  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20269  		v3.AddArg(y)
 20270  		v2.AddArg(v3)
 20271  		v.AddArg3(v0, v1, v2)
 20272  		return true
 20273  	}
 20274  	return false
 20275  }
 20276  func rewriteValueARM64_OpLsh8x32(v *Value) bool {
 20277  	v_1 := v.Args[1]
 20278  	v_0 := v.Args[0]
 20279  	b := v.Block
 20280  	typ := &b.Func.Config.Types
 20281  	// match: (Lsh8x32 <t> x y)
 20282  	// cond: shiftIsBounded(v)
 20283  	// result: (SLL <t> x y)
 20284  	for {
 20285  		t := v.Type
 20286  		x := v_0
 20287  		y := v_1
 20288  		if !(shiftIsBounded(v)) {
 20289  			break
 20290  		}
 20291  		v.reset(OpARM64SLL)
 20292  		v.Type = t
 20293  		v.AddArg2(x, y)
 20294  		return true
 20295  	}
 20296  	// match: (Lsh8x32 <t> x y)
 20297  	// cond: !shiftIsBounded(v)
 20298  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20299  	for {
 20300  		t := v.Type
 20301  		x := v_0
 20302  		y := v_1
 20303  		if !(!shiftIsBounded(v)) {
 20304  			break
 20305  		}
 20306  		v.reset(OpARM64CSEL)
 20307  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20308  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20309  		v0.AddArg2(x, y)
 20310  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20311  		v1.AuxInt = int64ToAuxInt(0)
 20312  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20313  		v2.AuxInt = int64ToAuxInt(64)
 20314  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20315  		v3.AddArg(y)
 20316  		v2.AddArg(v3)
 20317  		v.AddArg3(v0, v1, v2)
 20318  		return true
 20319  	}
 20320  	return false
 20321  }
 20322  func rewriteValueARM64_OpLsh8x64(v *Value) bool {
 20323  	v_1 := v.Args[1]
 20324  	v_0 := v.Args[0]
 20325  	b := v.Block
 20326  	// match: (Lsh8x64 <t> x y)
 20327  	// cond: shiftIsBounded(v)
 20328  	// result: (SLL <t> x y)
 20329  	for {
 20330  		t := v.Type
 20331  		x := v_0
 20332  		y := v_1
 20333  		if !(shiftIsBounded(v)) {
 20334  			break
 20335  		}
 20336  		v.reset(OpARM64SLL)
 20337  		v.Type = t
 20338  		v.AddArg2(x, y)
 20339  		return true
 20340  	}
 20341  	// match: (Lsh8x64 <t> x y)
 20342  	// cond: !shiftIsBounded(v)
 20343  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 20344  	for {
 20345  		t := v.Type
 20346  		x := v_0
 20347  		y := v_1
 20348  		if !(!shiftIsBounded(v)) {
 20349  			break
 20350  		}
 20351  		v.reset(OpARM64CSEL)
 20352  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20353  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20354  		v0.AddArg2(x, y)
 20355  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20356  		v1.AuxInt = int64ToAuxInt(0)
 20357  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20358  		v2.AuxInt = int64ToAuxInt(64)
 20359  		v2.AddArg(y)
 20360  		v.AddArg3(v0, v1, v2)
 20361  		return true
 20362  	}
 20363  	return false
 20364  }
 20365  func rewriteValueARM64_OpLsh8x8(v *Value) bool {
 20366  	v_1 := v.Args[1]
 20367  	v_0 := v.Args[0]
 20368  	b := v.Block
 20369  	typ := &b.Func.Config.Types
 20370  	// match: (Lsh8x8 <t> x y)
 20371  	// cond: shiftIsBounded(v)
 20372  	// result: (SLL <t> x y)
 20373  	for {
 20374  		t := v.Type
 20375  		x := v_0
 20376  		y := v_1
 20377  		if !(shiftIsBounded(v)) {
 20378  			break
 20379  		}
 20380  		v.reset(OpARM64SLL)
 20381  		v.Type = t
 20382  		v.AddArg2(x, y)
 20383  		return true
 20384  	}
 20385  	// match: (Lsh8x8 <t> x y)
 20386  	// cond: !shiftIsBounded(v)
 20387  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20388  	for {
 20389  		t := v.Type
 20390  		x := v_0
 20391  		y := v_1
 20392  		if !(!shiftIsBounded(v)) {
 20393  			break
 20394  		}
 20395  		v.reset(OpARM64CSEL)
 20396  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20397  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 20398  		v0.AddArg2(x, y)
 20399  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20400  		v1.AuxInt = int64ToAuxInt(0)
 20401  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20402  		v2.AuxInt = int64ToAuxInt(64)
 20403  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20404  		v3.AddArg(y)
 20405  		v2.AddArg(v3)
 20406  		v.AddArg3(v0, v1, v2)
 20407  		return true
 20408  	}
 20409  	return false
 20410  }
 20411  func rewriteValueARM64_OpMod16(v *Value) bool {
 20412  	v_1 := v.Args[1]
 20413  	v_0 := v.Args[0]
 20414  	b := v.Block
 20415  	typ := &b.Func.Config.Types
 20416  	// match: (Mod16 x y)
 20417  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 20418  	for {
 20419  		x := v_0
 20420  		y := v_1
 20421  		v.reset(OpARM64MODW)
 20422  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20423  		v0.AddArg(x)
 20424  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 20425  		v1.AddArg(y)
 20426  		v.AddArg2(v0, v1)
 20427  		return true
 20428  	}
 20429  }
 20430  func rewriteValueARM64_OpMod16u(v *Value) bool {
 20431  	v_1 := v.Args[1]
 20432  	v_0 := v.Args[0]
 20433  	b := v.Block
 20434  	typ := &b.Func.Config.Types
 20435  	// match: (Mod16u x y)
 20436  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 20437  	for {
 20438  		x := v_0
 20439  		y := v_1
 20440  		v.reset(OpARM64UMODW)
 20441  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20442  		v0.AddArg(x)
 20443  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 20444  		v1.AddArg(y)
 20445  		v.AddArg2(v0, v1)
 20446  		return true
 20447  	}
 20448  }
 20449  func rewriteValueARM64_OpMod32(v *Value) bool {
 20450  	v_1 := v.Args[1]
 20451  	v_0 := v.Args[0]
 20452  	// match: (Mod32 x y)
 20453  	// result: (MODW x y)
 20454  	for {
 20455  		x := v_0
 20456  		y := v_1
 20457  		v.reset(OpARM64MODW)
 20458  		v.AddArg2(x, y)
 20459  		return true
 20460  	}
 20461  }
 20462  func rewriteValueARM64_OpMod64(v *Value) bool {
 20463  	v_1 := v.Args[1]
 20464  	v_0 := v.Args[0]
 20465  	// match: (Mod64 x y)
 20466  	// result: (MOD x y)
 20467  	for {
 20468  		x := v_0
 20469  		y := v_1
 20470  		v.reset(OpARM64MOD)
 20471  		v.AddArg2(x, y)
 20472  		return true
 20473  	}
 20474  }
 20475  func rewriteValueARM64_OpMod8(v *Value) bool {
 20476  	v_1 := v.Args[1]
 20477  	v_0 := v.Args[0]
 20478  	b := v.Block
 20479  	typ := &b.Func.Config.Types
 20480  	// match: (Mod8 x y)
 20481  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 20482  	for {
 20483  		x := v_0
 20484  		y := v_1
 20485  		v.reset(OpARM64MODW)
 20486  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20487  		v0.AddArg(x)
 20488  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 20489  		v1.AddArg(y)
 20490  		v.AddArg2(v0, v1)
 20491  		return true
 20492  	}
 20493  }
 20494  func rewriteValueARM64_OpMod8u(v *Value) bool {
 20495  	v_1 := v.Args[1]
 20496  	v_0 := v.Args[0]
 20497  	b := v.Block
 20498  	typ := &b.Func.Config.Types
 20499  	// match: (Mod8u x y)
 20500  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 20501  	for {
 20502  		x := v_0
 20503  		y := v_1
 20504  		v.reset(OpARM64UMODW)
 20505  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20506  		v0.AddArg(x)
 20507  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 20508  		v1.AddArg(y)
 20509  		v.AddArg2(v0, v1)
 20510  		return true
 20511  	}
 20512  }
 20513  func rewriteValueARM64_OpMove(v *Value) bool {
 20514  	v_2 := v.Args[2]
 20515  	v_1 := v.Args[1]
 20516  	v_0 := v.Args[0]
 20517  	b := v.Block
 20518  	config := b.Func.Config
 20519  	typ := &b.Func.Config.Types
 20520  	// match: (Move [0] _ _ mem)
 20521  	// result: mem
 20522  	for {
 20523  		if auxIntToInt64(v.AuxInt) != 0 {
 20524  			break
 20525  		}
 20526  		mem := v_2
 20527  		v.copyOf(mem)
 20528  		return true
 20529  	}
 20530  	// match: (Move [1] dst src mem)
 20531  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 20532  	for {
 20533  		if auxIntToInt64(v.AuxInt) != 1 {
 20534  			break
 20535  		}
 20536  		dst := v_0
 20537  		src := v_1
 20538  		mem := v_2
 20539  		v.reset(OpARM64MOVBstore)
 20540  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 20541  		v0.AddArg2(src, mem)
 20542  		v.AddArg3(dst, v0, mem)
 20543  		return true
 20544  	}
 20545  	// match: (Move [2] dst src mem)
 20546  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 20547  	for {
 20548  		if auxIntToInt64(v.AuxInt) != 2 {
 20549  			break
 20550  		}
 20551  		dst := v_0
 20552  		src := v_1
 20553  		mem := v_2
 20554  		v.reset(OpARM64MOVHstore)
 20555  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 20556  		v0.AddArg2(src, mem)
 20557  		v.AddArg3(dst, v0, mem)
 20558  		return true
 20559  	}
 20560  	// match: (Move [3] dst src mem)
 20561  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 20562  	for {
 20563  		if auxIntToInt64(v.AuxInt) != 3 {
 20564  			break
 20565  		}
 20566  		dst := v_0
 20567  		src := v_1
 20568  		mem := v_2
 20569  		v.reset(OpARM64MOVBstore)
 20570  		v.AuxInt = int32ToAuxInt(2)
 20571  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 20572  		v0.AuxInt = int32ToAuxInt(2)
 20573  		v0.AddArg2(src, mem)
 20574  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 20575  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 20576  		v2.AddArg2(src, mem)
 20577  		v1.AddArg3(dst, v2, mem)
 20578  		v.AddArg3(dst, v0, v1)
 20579  		return true
 20580  	}
 20581  	// match: (Move [4] dst src mem)
 20582  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 20583  	for {
 20584  		if auxIntToInt64(v.AuxInt) != 4 {
 20585  			break
 20586  		}
 20587  		dst := v_0
 20588  		src := v_1
 20589  		mem := v_2
 20590  		v.reset(OpARM64MOVWstore)
 20591  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 20592  		v0.AddArg2(src, mem)
 20593  		v.AddArg3(dst, v0, mem)
 20594  		return true
 20595  	}
 20596  	// match: (Move [5] dst src mem)
 20597  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 20598  	for {
 20599  		if auxIntToInt64(v.AuxInt) != 5 {
 20600  			break
 20601  		}
 20602  		dst := v_0
 20603  		src := v_1
 20604  		mem := v_2
 20605  		v.reset(OpARM64MOVBstore)
 20606  		v.AuxInt = int32ToAuxInt(4)
 20607  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 20608  		v0.AuxInt = int32ToAuxInt(4)
 20609  		v0.AddArg2(src, mem)
 20610  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 20611  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 20612  		v2.AddArg2(src, mem)
 20613  		v1.AddArg3(dst, v2, mem)
 20614  		v.AddArg3(dst, v0, v1)
 20615  		return true
 20616  	}
 20617  	// match: (Move [6] dst src mem)
 20618  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 20619  	for {
 20620  		if auxIntToInt64(v.AuxInt) != 6 {
 20621  			break
 20622  		}
 20623  		dst := v_0
 20624  		src := v_1
 20625  		mem := v_2
 20626  		v.reset(OpARM64MOVHstore)
 20627  		v.AuxInt = int32ToAuxInt(4)
 20628  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 20629  		v0.AuxInt = int32ToAuxInt(4)
 20630  		v0.AddArg2(src, mem)
 20631  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 20632  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 20633  		v2.AddArg2(src, mem)
 20634  		v1.AddArg3(dst, v2, mem)
 20635  		v.AddArg3(dst, v0, v1)
 20636  		return true
 20637  	}
 20638  	// match: (Move [7] dst src mem)
 20639  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 20640  	for {
 20641  		if auxIntToInt64(v.AuxInt) != 7 {
 20642  			break
 20643  		}
 20644  		dst := v_0
 20645  		src := v_1
 20646  		mem := v_2
 20647  		v.reset(OpARM64MOVWstore)
 20648  		v.AuxInt = int32ToAuxInt(3)
 20649  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 20650  		v0.AuxInt = int32ToAuxInt(3)
 20651  		v0.AddArg2(src, mem)
 20652  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 20653  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 20654  		v2.AddArg2(src, mem)
 20655  		v1.AddArg3(dst, v2, mem)
 20656  		v.AddArg3(dst, v0, v1)
 20657  		return true
 20658  	}
 20659  	// match: (Move [8] dst src mem)
 20660  	// result: (MOVDstore dst (MOVDload src mem) mem)
 20661  	for {
 20662  		if auxIntToInt64(v.AuxInt) != 8 {
 20663  			break
 20664  		}
 20665  		dst := v_0
 20666  		src := v_1
 20667  		mem := v_2
 20668  		v.reset(OpARM64MOVDstore)
 20669  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20670  		v0.AddArg2(src, mem)
 20671  		v.AddArg3(dst, v0, mem)
 20672  		return true
 20673  	}
 20674  	// match: (Move [9] dst src mem)
 20675  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 20676  	for {
 20677  		if auxIntToInt64(v.AuxInt) != 9 {
 20678  			break
 20679  		}
 20680  		dst := v_0
 20681  		src := v_1
 20682  		mem := v_2
 20683  		v.reset(OpARM64MOVBstore)
 20684  		v.AuxInt = int32ToAuxInt(8)
 20685  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 20686  		v0.AuxInt = int32ToAuxInt(8)
 20687  		v0.AddArg2(src, mem)
 20688  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 20689  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20690  		v2.AddArg2(src, mem)
 20691  		v1.AddArg3(dst, v2, mem)
 20692  		v.AddArg3(dst, v0, v1)
 20693  		return true
 20694  	}
 20695  	// match: (Move [10] dst src mem)
 20696  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 20697  	for {
 20698  		if auxIntToInt64(v.AuxInt) != 10 {
 20699  			break
 20700  		}
 20701  		dst := v_0
 20702  		src := v_1
 20703  		mem := v_2
 20704  		v.reset(OpARM64MOVHstore)
 20705  		v.AuxInt = int32ToAuxInt(8)
 20706  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 20707  		v0.AuxInt = int32ToAuxInt(8)
 20708  		v0.AddArg2(src, mem)
 20709  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 20710  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20711  		v2.AddArg2(src, mem)
 20712  		v1.AddArg3(dst, v2, mem)
 20713  		v.AddArg3(dst, v0, v1)
 20714  		return true
 20715  	}
 20716  	// match: (Move [11] dst src mem)
 20717  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 20718  	for {
 20719  		if auxIntToInt64(v.AuxInt) != 11 {
 20720  			break
 20721  		}
 20722  		dst := v_0
 20723  		src := v_1
 20724  		mem := v_2
 20725  		v.reset(OpARM64MOVDstore)
 20726  		v.AuxInt = int32ToAuxInt(3)
 20727  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20728  		v0.AuxInt = int32ToAuxInt(3)
 20729  		v0.AddArg2(src, mem)
 20730  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 20731  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20732  		v2.AddArg2(src, mem)
 20733  		v1.AddArg3(dst, v2, mem)
 20734  		v.AddArg3(dst, v0, v1)
 20735  		return true
 20736  	}
 20737  	// match: (Move [12] dst src mem)
 20738  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 20739  	for {
 20740  		if auxIntToInt64(v.AuxInt) != 12 {
 20741  			break
 20742  		}
 20743  		dst := v_0
 20744  		src := v_1
 20745  		mem := v_2
 20746  		v.reset(OpARM64MOVWstore)
 20747  		v.AuxInt = int32ToAuxInt(8)
 20748  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 20749  		v0.AuxInt = int32ToAuxInt(8)
 20750  		v0.AddArg2(src, mem)
 20751  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 20752  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20753  		v2.AddArg2(src, mem)
 20754  		v1.AddArg3(dst, v2, mem)
 20755  		v.AddArg3(dst, v0, v1)
 20756  		return true
 20757  	}
 20758  	// match: (Move [13] dst src mem)
 20759  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 20760  	for {
 20761  		if auxIntToInt64(v.AuxInt) != 13 {
 20762  			break
 20763  		}
 20764  		dst := v_0
 20765  		src := v_1
 20766  		mem := v_2
 20767  		v.reset(OpARM64MOVDstore)
 20768  		v.AuxInt = int32ToAuxInt(5)
 20769  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20770  		v0.AuxInt = int32ToAuxInt(5)
 20771  		v0.AddArg2(src, mem)
 20772  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 20773  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20774  		v2.AddArg2(src, mem)
 20775  		v1.AddArg3(dst, v2, mem)
 20776  		v.AddArg3(dst, v0, v1)
 20777  		return true
 20778  	}
 20779  	// match: (Move [14] dst src mem)
 20780  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 20781  	for {
 20782  		if auxIntToInt64(v.AuxInt) != 14 {
 20783  			break
 20784  		}
 20785  		dst := v_0
 20786  		src := v_1
 20787  		mem := v_2
 20788  		v.reset(OpARM64MOVDstore)
 20789  		v.AuxInt = int32ToAuxInt(6)
 20790  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20791  		v0.AuxInt = int32ToAuxInt(6)
 20792  		v0.AddArg2(src, mem)
 20793  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 20794  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20795  		v2.AddArg2(src, mem)
 20796  		v1.AddArg3(dst, v2, mem)
 20797  		v.AddArg3(dst, v0, v1)
 20798  		return true
 20799  	}
 20800  	// match: (Move [15] dst src mem)
 20801  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 20802  	for {
 20803  		if auxIntToInt64(v.AuxInt) != 15 {
 20804  			break
 20805  		}
 20806  		dst := v_0
 20807  		src := v_1
 20808  		mem := v_2
 20809  		v.reset(OpARM64MOVDstore)
 20810  		v.AuxInt = int32ToAuxInt(7)
 20811  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20812  		v0.AuxInt = int32ToAuxInt(7)
 20813  		v0.AddArg2(src, mem)
 20814  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 20815  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 20816  		v2.AddArg2(src, mem)
 20817  		v1.AddArg3(dst, v2, mem)
 20818  		v.AddArg3(dst, v0, v1)
 20819  		return true
 20820  	}
 20821  	// match: (Move [16] dst src mem)
 20822  	// result: (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)
 20823  	for {
 20824  		if auxIntToInt64(v.AuxInt) != 16 {
 20825  			break
 20826  		}
 20827  		dst := v_0
 20828  		src := v_1
 20829  		mem := v_2
 20830  		v.reset(OpARM64STP)
 20831  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20832  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20833  		v1.AddArg2(src, mem)
 20834  		v0.AddArg(v1)
 20835  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20836  		v2.AddArg(v1)
 20837  		v.AddArg4(dst, v0, v2, mem)
 20838  		return true
 20839  	}
 20840  	// match: (Move [32] dst src mem)
 20841  	// result: (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))
 20842  	for {
 20843  		if auxIntToInt64(v.AuxInt) != 32 {
 20844  			break
 20845  		}
 20846  		dst := v_0
 20847  		src := v_1
 20848  		mem := v_2
 20849  		v.reset(OpARM64STP)
 20850  		v.AuxInt = int32ToAuxInt(16)
 20851  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20852  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20853  		v1.AuxInt = int32ToAuxInt(16)
 20854  		v1.AddArg2(src, mem)
 20855  		v0.AddArg(v1)
 20856  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20857  		v2.AddArg(v1)
 20858  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20859  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20860  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20861  		v5.AddArg2(src, mem)
 20862  		v4.AddArg(v5)
 20863  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20864  		v6.AddArg(v5)
 20865  		v3.AddArg4(dst, v4, v6, mem)
 20866  		v.AddArg4(dst, v0, v2, v3)
 20867  		return true
 20868  	}
 20869  	// match: (Move [48] dst src mem)
 20870  	// result: (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)))
 20871  	for {
 20872  		if auxIntToInt64(v.AuxInt) != 48 {
 20873  			break
 20874  		}
 20875  		dst := v_0
 20876  		src := v_1
 20877  		mem := v_2
 20878  		v.reset(OpARM64STP)
 20879  		v.AuxInt = int32ToAuxInt(32)
 20880  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20881  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20882  		v1.AuxInt = int32ToAuxInt(32)
 20883  		v1.AddArg2(src, mem)
 20884  		v0.AddArg(v1)
 20885  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20886  		v2.AddArg(v1)
 20887  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20888  		v3.AuxInt = int32ToAuxInt(16)
 20889  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20890  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20891  		v5.AuxInt = int32ToAuxInt(16)
 20892  		v5.AddArg2(src, mem)
 20893  		v4.AddArg(v5)
 20894  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20895  		v6.AddArg(v5)
 20896  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20897  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20898  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20899  		v9.AddArg2(src, mem)
 20900  		v8.AddArg(v9)
 20901  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20902  		v10.AddArg(v9)
 20903  		v7.AddArg4(dst, v8, v10, mem)
 20904  		v3.AddArg4(dst, v4, v6, v7)
 20905  		v.AddArg4(dst, v0, v2, v3)
 20906  		return true
 20907  	}
 20908  	// match: (Move [64] dst src mem)
 20909  	// result: (STP [48] dst (Select0 <typ.UInt64> (LDP [48] src mem)) (Select1 <typ.UInt64> (LDP [48] 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))))
 20910  	for {
 20911  		if auxIntToInt64(v.AuxInt) != 64 {
 20912  			break
 20913  		}
 20914  		dst := v_0
 20915  		src := v_1
 20916  		mem := v_2
 20917  		v.reset(OpARM64STP)
 20918  		v.AuxInt = int32ToAuxInt(48)
 20919  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20920  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20921  		v1.AuxInt = int32ToAuxInt(48)
 20922  		v1.AddArg2(src, mem)
 20923  		v0.AddArg(v1)
 20924  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20925  		v2.AddArg(v1)
 20926  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20927  		v3.AuxInt = int32ToAuxInt(32)
 20928  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20929  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20930  		v5.AuxInt = int32ToAuxInt(32)
 20931  		v5.AddArg2(src, mem)
 20932  		v4.AddArg(v5)
 20933  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20934  		v6.AddArg(v5)
 20935  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20936  		v7.AuxInt = int32ToAuxInt(16)
 20937  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20938  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20939  		v9.AuxInt = int32ToAuxInt(16)
 20940  		v9.AddArg2(src, mem)
 20941  		v8.AddArg(v9)
 20942  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20943  		v10.AddArg(v9)
 20944  		v11 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 20945  		v12 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 20946  		v13 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 20947  		v13.AddArg2(src, mem)
 20948  		v12.AddArg(v13)
 20949  		v14 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 20950  		v14.AddArg(v13)
 20951  		v11.AddArg4(dst, v12, v14, mem)
 20952  		v7.AddArg4(dst, v8, v10, v11)
 20953  		v3.AddArg4(dst, v4, v6, v7)
 20954  		v.AddArg4(dst, v0, v2, v3)
 20955  		return true
 20956  	}
 20957  	// match: (Move [s] dst src mem)
 20958  	// cond: s%16 != 0 && s%16 <= 8 && s > 16
 20959  	// result: (Move [8] (OffPtr <dst.Type> dst [s-8]) (OffPtr <src.Type> src [s-8]) (Move [s-s%16] dst src mem))
 20960  	for {
 20961  		s := auxIntToInt64(v.AuxInt)
 20962  		dst := v_0
 20963  		src := v_1
 20964  		mem := v_2
 20965  		if !(s%16 != 0 && s%16 <= 8 && s > 16) {
 20966  			break
 20967  		}
 20968  		v.reset(OpMove)
 20969  		v.AuxInt = int64ToAuxInt(8)
 20970  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 20971  		v0.AuxInt = int64ToAuxInt(s - 8)
 20972  		v0.AddArg(dst)
 20973  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 20974  		v1.AuxInt = int64ToAuxInt(s - 8)
 20975  		v1.AddArg(src)
 20976  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 20977  		v2.AuxInt = int64ToAuxInt(s - s%16)
 20978  		v2.AddArg3(dst, src, mem)
 20979  		v.AddArg3(v0, v1, v2)
 20980  		return true
 20981  	}
 20982  	// match: (Move [s] dst src mem)
 20983  	// cond: s%16 != 0 && s%16 > 8 && s > 16
 20984  	// result: (Move [16] (OffPtr <dst.Type> dst [s-16]) (OffPtr <src.Type> src [s-16]) (Move [s-s%16] dst src mem))
 20985  	for {
 20986  		s := auxIntToInt64(v.AuxInt)
 20987  		dst := v_0
 20988  		src := v_1
 20989  		mem := v_2
 20990  		if !(s%16 != 0 && s%16 > 8 && s > 16) {
 20991  			break
 20992  		}
 20993  		v.reset(OpMove)
 20994  		v.AuxInt = int64ToAuxInt(16)
 20995  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 20996  		v0.AuxInt = int64ToAuxInt(s - 16)
 20997  		v0.AddArg(dst)
 20998  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 20999  		v1.AuxInt = int64ToAuxInt(s - 16)
 21000  		v1.AddArg(src)
 21001  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 21002  		v2.AuxInt = int64ToAuxInt(s - s%16)
 21003  		v2.AddArg3(dst, src, mem)
 21004  		v.AddArg3(v0, v1, v2)
 21005  		return true
 21006  	}
 21007  	// match: (Move [s] dst src mem)
 21008  	// cond: s > 64 && s <= 16*64 && s%16 == 0 && !config.noDuffDevice && logLargeCopy(v, s)
 21009  	// result: (DUFFCOPY [8 * (64 - s/16)] dst src mem)
 21010  	for {
 21011  		s := auxIntToInt64(v.AuxInt)
 21012  		dst := v_0
 21013  		src := v_1
 21014  		mem := v_2
 21015  		if !(s > 64 && s <= 16*64 && s%16 == 0 && !config.noDuffDevice && logLargeCopy(v, s)) {
 21016  			break
 21017  		}
 21018  		v.reset(OpARM64DUFFCOPY)
 21019  		v.AuxInt = int64ToAuxInt(8 * (64 - s/16))
 21020  		v.AddArg3(dst, src, mem)
 21021  		return true
 21022  	}
 21023  	// match: (Move [s] dst src mem)
 21024  	// cond: s%16 == 0 && (s > 16*64 || config.noDuffDevice) && logLargeCopy(v, s)
 21025  	// result: (LoweredMove dst src (ADDconst <src.Type> src [s-16]) mem)
 21026  	for {
 21027  		s := auxIntToInt64(v.AuxInt)
 21028  		dst := v_0
 21029  		src := v_1
 21030  		mem := v_2
 21031  		if !(s%16 == 0 && (s > 16*64 || config.noDuffDevice) && logLargeCopy(v, s)) {
 21032  			break
 21033  		}
 21034  		v.reset(OpARM64LoweredMove)
 21035  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, src.Type)
 21036  		v0.AuxInt = int64ToAuxInt(s - 16)
 21037  		v0.AddArg(src)
 21038  		v.AddArg4(dst, src, v0, mem)
 21039  		return true
 21040  	}
 21041  	return false
 21042  }
 21043  func rewriteValueARM64_OpNeq16(v *Value) bool {
 21044  	v_1 := v.Args[1]
 21045  	v_0 := v.Args[0]
 21046  	b := v.Block
 21047  	typ := &b.Func.Config.Types
 21048  	// match: (Neq16 x y)
 21049  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 21050  	for {
 21051  		x := v_0
 21052  		y := v_1
 21053  		v.reset(OpARM64NotEqual)
 21054  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21055  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21056  		v1.AddArg(x)
 21057  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21058  		v2.AddArg(y)
 21059  		v0.AddArg2(v1, v2)
 21060  		v.AddArg(v0)
 21061  		return true
 21062  	}
 21063  }
 21064  func rewriteValueARM64_OpNeq32(v *Value) bool {
 21065  	v_1 := v.Args[1]
 21066  	v_0 := v.Args[0]
 21067  	b := v.Block
 21068  	// match: (Neq32 x y)
 21069  	// result: (NotEqual (CMPW x y))
 21070  	for {
 21071  		x := v_0
 21072  		y := v_1
 21073  		v.reset(OpARM64NotEqual)
 21074  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21075  		v0.AddArg2(x, y)
 21076  		v.AddArg(v0)
 21077  		return true
 21078  	}
 21079  }
 21080  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 21081  	v_1 := v.Args[1]
 21082  	v_0 := v.Args[0]
 21083  	b := v.Block
 21084  	// match: (Neq32F x y)
 21085  	// result: (NotEqual (FCMPS x y))
 21086  	for {
 21087  		x := v_0
 21088  		y := v_1
 21089  		v.reset(OpARM64NotEqual)
 21090  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 21091  		v0.AddArg2(x, y)
 21092  		v.AddArg(v0)
 21093  		return true
 21094  	}
 21095  }
 21096  func rewriteValueARM64_OpNeq64(v *Value) bool {
 21097  	v_1 := v.Args[1]
 21098  	v_0 := v.Args[0]
 21099  	b := v.Block
 21100  	// match: (Neq64 x y)
 21101  	// result: (NotEqual (CMP x y))
 21102  	for {
 21103  		x := v_0
 21104  		y := v_1
 21105  		v.reset(OpARM64NotEqual)
 21106  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 21107  		v0.AddArg2(x, y)
 21108  		v.AddArg(v0)
 21109  		return true
 21110  	}
 21111  }
 21112  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 21113  	v_1 := v.Args[1]
 21114  	v_0 := v.Args[0]
 21115  	b := v.Block
 21116  	// match: (Neq64F x y)
 21117  	// result: (NotEqual (FCMPD x y))
 21118  	for {
 21119  		x := v_0
 21120  		y := v_1
 21121  		v.reset(OpARM64NotEqual)
 21122  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 21123  		v0.AddArg2(x, y)
 21124  		v.AddArg(v0)
 21125  		return true
 21126  	}
 21127  }
 21128  func rewriteValueARM64_OpNeq8(v *Value) bool {
 21129  	v_1 := v.Args[1]
 21130  	v_0 := v.Args[0]
 21131  	b := v.Block
 21132  	typ := &b.Func.Config.Types
 21133  	// match: (Neq8 x y)
 21134  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 21135  	for {
 21136  		x := v_0
 21137  		y := v_1
 21138  		v.reset(OpARM64NotEqual)
 21139  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 21140  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21141  		v1.AddArg(x)
 21142  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 21143  		v2.AddArg(y)
 21144  		v0.AddArg2(v1, v2)
 21145  		v.AddArg(v0)
 21146  		return true
 21147  	}
 21148  }
 21149  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 21150  	v_1 := v.Args[1]
 21151  	v_0 := v.Args[0]
 21152  	b := v.Block
 21153  	// match: (NeqPtr x y)
 21154  	// result: (NotEqual (CMP x y))
 21155  	for {
 21156  		x := v_0
 21157  		y := v_1
 21158  		v.reset(OpARM64NotEqual)
 21159  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 21160  		v0.AddArg2(x, y)
 21161  		v.AddArg(v0)
 21162  		return true
 21163  	}
 21164  }
 21165  func rewriteValueARM64_OpNot(v *Value) bool {
 21166  	v_0 := v.Args[0]
 21167  	b := v.Block
 21168  	typ := &b.Func.Config.Types
 21169  	// match: (Not x)
 21170  	// result: (XOR (MOVDconst [1]) x)
 21171  	for {
 21172  		x := v_0
 21173  		v.reset(OpARM64XOR)
 21174  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21175  		v0.AuxInt = int64ToAuxInt(1)
 21176  		v.AddArg2(v0, x)
 21177  		return true
 21178  	}
 21179  }
 21180  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 21181  	v_0 := v.Args[0]
 21182  	// match: (OffPtr [off] ptr:(SP))
 21183  	// cond: is32Bit(off)
 21184  	// result: (MOVDaddr [int32(off)] ptr)
 21185  	for {
 21186  		off := auxIntToInt64(v.AuxInt)
 21187  		ptr := v_0
 21188  		if ptr.Op != OpSP || !(is32Bit(off)) {
 21189  			break
 21190  		}
 21191  		v.reset(OpARM64MOVDaddr)
 21192  		v.AuxInt = int32ToAuxInt(int32(off))
 21193  		v.AddArg(ptr)
 21194  		return true
 21195  	}
 21196  	// match: (OffPtr [off] ptr)
 21197  	// result: (ADDconst [off] ptr)
 21198  	for {
 21199  		off := auxIntToInt64(v.AuxInt)
 21200  		ptr := v_0
 21201  		v.reset(OpARM64ADDconst)
 21202  		v.AuxInt = int64ToAuxInt(off)
 21203  		v.AddArg(ptr)
 21204  		return true
 21205  	}
 21206  }
 21207  func rewriteValueARM64_OpPanicBounds(v *Value) bool {
 21208  	v_2 := v.Args[2]
 21209  	v_1 := v.Args[1]
 21210  	v_0 := v.Args[0]
 21211  	// match: (PanicBounds [kind] x y mem)
 21212  	// cond: boundsABI(kind) == 0
 21213  	// result: (LoweredPanicBoundsA [kind] x y mem)
 21214  	for {
 21215  		kind := auxIntToInt64(v.AuxInt)
 21216  		x := v_0
 21217  		y := v_1
 21218  		mem := v_2
 21219  		if !(boundsABI(kind) == 0) {
 21220  			break
 21221  		}
 21222  		v.reset(OpARM64LoweredPanicBoundsA)
 21223  		v.AuxInt = int64ToAuxInt(kind)
 21224  		v.AddArg3(x, y, mem)
 21225  		return true
 21226  	}
 21227  	// match: (PanicBounds [kind] x y mem)
 21228  	// cond: boundsABI(kind) == 1
 21229  	// result: (LoweredPanicBoundsB [kind] x y mem)
 21230  	for {
 21231  		kind := auxIntToInt64(v.AuxInt)
 21232  		x := v_0
 21233  		y := v_1
 21234  		mem := v_2
 21235  		if !(boundsABI(kind) == 1) {
 21236  			break
 21237  		}
 21238  		v.reset(OpARM64LoweredPanicBoundsB)
 21239  		v.AuxInt = int64ToAuxInt(kind)
 21240  		v.AddArg3(x, y, mem)
 21241  		return true
 21242  	}
 21243  	// match: (PanicBounds [kind] x y mem)
 21244  	// cond: boundsABI(kind) == 2
 21245  	// result: (LoweredPanicBoundsC [kind] x y mem)
 21246  	for {
 21247  		kind := auxIntToInt64(v.AuxInt)
 21248  		x := v_0
 21249  		y := v_1
 21250  		mem := v_2
 21251  		if !(boundsABI(kind) == 2) {
 21252  			break
 21253  		}
 21254  		v.reset(OpARM64LoweredPanicBoundsC)
 21255  		v.AuxInt = int64ToAuxInt(kind)
 21256  		v.AddArg3(x, y, mem)
 21257  		return true
 21258  	}
 21259  	return false
 21260  }
 21261  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 21262  	v_0 := v.Args[0]
 21263  	b := v.Block
 21264  	typ := &b.Func.Config.Types
 21265  	// match: (PopCount16 <t> x)
 21266  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 21267  	for {
 21268  		t := v.Type
 21269  		x := v_0
 21270  		v.reset(OpARM64FMOVDfpgp)
 21271  		v.Type = t
 21272  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 21273  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 21274  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 21275  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21276  		v3.AddArg(x)
 21277  		v2.AddArg(v3)
 21278  		v1.AddArg(v2)
 21279  		v0.AddArg(v1)
 21280  		v.AddArg(v0)
 21281  		return true
 21282  	}
 21283  }
 21284  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 21285  	v_0 := v.Args[0]
 21286  	b := v.Block
 21287  	typ := &b.Func.Config.Types
 21288  	// match: (PopCount32 <t> x)
 21289  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 21290  	for {
 21291  		t := v.Type
 21292  		x := v_0
 21293  		v.reset(OpARM64FMOVDfpgp)
 21294  		v.Type = t
 21295  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 21296  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 21297  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 21298  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21299  		v3.AddArg(x)
 21300  		v2.AddArg(v3)
 21301  		v1.AddArg(v2)
 21302  		v0.AddArg(v1)
 21303  		v.AddArg(v0)
 21304  		return true
 21305  	}
 21306  }
 21307  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 21308  	v_0 := v.Args[0]
 21309  	b := v.Block
 21310  	typ := &b.Func.Config.Types
 21311  	// match: (PopCount64 <t> x)
 21312  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 21313  	for {
 21314  		t := v.Type
 21315  		x := v_0
 21316  		v.reset(OpARM64FMOVDfpgp)
 21317  		v.Type = t
 21318  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 21319  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 21320  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 21321  		v2.AddArg(x)
 21322  		v1.AddArg(v2)
 21323  		v0.AddArg(v1)
 21324  		v.AddArg(v0)
 21325  		return true
 21326  	}
 21327  }
 21328  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 21329  	v_1 := v.Args[1]
 21330  	v_0 := v.Args[0]
 21331  	// match: (PrefetchCache addr mem)
 21332  	// result: (PRFM [0] addr mem)
 21333  	for {
 21334  		addr := v_0
 21335  		mem := v_1
 21336  		v.reset(OpARM64PRFM)
 21337  		v.AuxInt = int64ToAuxInt(0)
 21338  		v.AddArg2(addr, mem)
 21339  		return true
 21340  	}
 21341  }
 21342  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 21343  	v_1 := v.Args[1]
 21344  	v_0 := v.Args[0]
 21345  	// match: (PrefetchCacheStreamed addr mem)
 21346  	// result: (PRFM [1] addr mem)
 21347  	for {
 21348  		addr := v_0
 21349  		mem := v_1
 21350  		v.reset(OpARM64PRFM)
 21351  		v.AuxInt = int64ToAuxInt(1)
 21352  		v.AddArg2(addr, mem)
 21353  		return true
 21354  	}
 21355  }
 21356  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 21357  	v_0 := v.Args[0]
 21358  	// match: (PubBarrier mem)
 21359  	// result: (DMB [0xe] mem)
 21360  	for {
 21361  		mem := v_0
 21362  		v.reset(OpARM64DMB)
 21363  		v.AuxInt = int64ToAuxInt(0xe)
 21364  		v.AddArg(mem)
 21365  		return true
 21366  	}
 21367  }
 21368  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 21369  	v_1 := v.Args[1]
 21370  	v_0 := v.Args[0]
 21371  	b := v.Block
 21372  	typ := &b.Func.Config.Types
 21373  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 21374  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 21375  	for {
 21376  		t := v.Type
 21377  		x := v_0
 21378  		if v_1.Op != OpARM64MOVDconst {
 21379  			break
 21380  		}
 21381  		c := auxIntToInt64(v_1.AuxInt)
 21382  		v.reset(OpOr16)
 21383  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 21384  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21385  		v1.AuxInt = int64ToAuxInt(c & 15)
 21386  		v0.AddArg2(x, v1)
 21387  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 21388  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21389  		v3.AuxInt = int64ToAuxInt(-c & 15)
 21390  		v2.AddArg2(x, v3)
 21391  		v.AddArg2(v0, v2)
 21392  		return true
 21393  	}
 21394  	// match: (RotateLeft16 <t> x y)
 21395  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 21396  	for {
 21397  		t := v.Type
 21398  		x := v_0
 21399  		y := v_1
 21400  		v.reset(OpARM64RORW)
 21401  		v.Type = t
 21402  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 21403  		v0.AuxInt = int64ToAuxInt(16)
 21404  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 21405  		v1.AddArg(x)
 21406  		v0.AddArg2(v1, v1)
 21407  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 21408  		v2.AddArg(y)
 21409  		v.AddArg2(v0, v2)
 21410  		return true
 21411  	}
 21412  }
 21413  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 21414  	v_1 := v.Args[1]
 21415  	v_0 := v.Args[0]
 21416  	b := v.Block
 21417  	// match: (RotateLeft32 x y)
 21418  	// result: (RORW x (NEG <y.Type> y))
 21419  	for {
 21420  		x := v_0
 21421  		y := v_1
 21422  		v.reset(OpARM64RORW)
 21423  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 21424  		v0.AddArg(y)
 21425  		v.AddArg2(x, v0)
 21426  		return true
 21427  	}
 21428  }
 21429  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 21430  	v_1 := v.Args[1]
 21431  	v_0 := v.Args[0]
 21432  	b := v.Block
 21433  	// match: (RotateLeft64 x y)
 21434  	// result: (ROR x (NEG <y.Type> y))
 21435  	for {
 21436  		x := v_0
 21437  		y := v_1
 21438  		v.reset(OpARM64ROR)
 21439  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 21440  		v0.AddArg(y)
 21441  		v.AddArg2(x, v0)
 21442  		return true
 21443  	}
 21444  }
 21445  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 21446  	v_1 := v.Args[1]
 21447  	v_0 := v.Args[0]
 21448  	b := v.Block
 21449  	typ := &b.Func.Config.Types
 21450  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 21451  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 21452  	for {
 21453  		t := v.Type
 21454  		x := v_0
 21455  		if v_1.Op != OpARM64MOVDconst {
 21456  			break
 21457  		}
 21458  		c := auxIntToInt64(v_1.AuxInt)
 21459  		v.reset(OpOr8)
 21460  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 21461  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21462  		v1.AuxInt = int64ToAuxInt(c & 7)
 21463  		v0.AddArg2(x, v1)
 21464  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 21465  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21466  		v3.AuxInt = int64ToAuxInt(-c & 7)
 21467  		v2.AddArg2(x, v3)
 21468  		v.AddArg2(v0, v2)
 21469  		return true
 21470  	}
 21471  	// match: (RotateLeft8 <t> x y)
 21472  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 21473  	for {
 21474  		t := v.Type
 21475  		x := v_0
 21476  		y := v_1
 21477  		v.reset(OpARM64OR)
 21478  		v.Type = t
 21479  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 21480  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 21481  		v1.AuxInt = int64ToAuxInt(7)
 21482  		v1.AddArg(y)
 21483  		v0.AddArg2(x, v1)
 21484  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21485  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21486  		v3.AddArg(x)
 21487  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 21488  		v4.AuxInt = int64ToAuxInt(7)
 21489  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 21490  		v5.AddArg(y)
 21491  		v4.AddArg(v5)
 21492  		v2.AddArg2(v3, v4)
 21493  		v.AddArg2(v0, v2)
 21494  		return true
 21495  	}
 21496  }
 21497  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 21498  	v_1 := v.Args[1]
 21499  	v_0 := v.Args[0]
 21500  	b := v.Block
 21501  	typ := &b.Func.Config.Types
 21502  	// match: (Rsh16Ux16 <t> x y)
 21503  	// cond: shiftIsBounded(v)
 21504  	// result: (SRL <t> (ZeroExt16to64 x) y)
 21505  	for {
 21506  		t := v.Type
 21507  		x := v_0
 21508  		y := v_1
 21509  		if !(shiftIsBounded(v)) {
 21510  			break
 21511  		}
 21512  		v.reset(OpARM64SRL)
 21513  		v.Type = t
 21514  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21515  		v0.AddArg(x)
 21516  		v.AddArg2(v0, y)
 21517  		return true
 21518  	}
 21519  	// match: (Rsh16Ux16 <t> x y)
 21520  	// cond: !shiftIsBounded(v)
 21521  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21522  	for {
 21523  		t := v.Type
 21524  		x := v_0
 21525  		y := v_1
 21526  		if !(!shiftIsBounded(v)) {
 21527  			break
 21528  		}
 21529  		v.reset(OpARM64CSEL)
 21530  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21531  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21532  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21533  		v1.AddArg(x)
 21534  		v0.AddArg2(v1, y)
 21535  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21536  		v2.AuxInt = int64ToAuxInt(0)
 21537  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21538  		v3.AuxInt = int64ToAuxInt(64)
 21539  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21540  		v4.AddArg(y)
 21541  		v3.AddArg(v4)
 21542  		v.AddArg3(v0, v2, v3)
 21543  		return true
 21544  	}
 21545  	return false
 21546  }
 21547  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 21548  	v_1 := v.Args[1]
 21549  	v_0 := v.Args[0]
 21550  	b := v.Block
 21551  	typ := &b.Func.Config.Types
 21552  	// match: (Rsh16Ux32 <t> x y)
 21553  	// cond: shiftIsBounded(v)
 21554  	// result: (SRL <t> (ZeroExt16to64 x) y)
 21555  	for {
 21556  		t := v.Type
 21557  		x := v_0
 21558  		y := v_1
 21559  		if !(shiftIsBounded(v)) {
 21560  			break
 21561  		}
 21562  		v.reset(OpARM64SRL)
 21563  		v.Type = t
 21564  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21565  		v0.AddArg(x)
 21566  		v.AddArg2(v0, y)
 21567  		return true
 21568  	}
 21569  	// match: (Rsh16Ux32 <t> x y)
 21570  	// cond: !shiftIsBounded(v)
 21571  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21572  	for {
 21573  		t := v.Type
 21574  		x := v_0
 21575  		y := v_1
 21576  		if !(!shiftIsBounded(v)) {
 21577  			break
 21578  		}
 21579  		v.reset(OpARM64CSEL)
 21580  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21581  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21582  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21583  		v1.AddArg(x)
 21584  		v0.AddArg2(v1, y)
 21585  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21586  		v2.AuxInt = int64ToAuxInt(0)
 21587  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21588  		v3.AuxInt = int64ToAuxInt(64)
 21589  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21590  		v4.AddArg(y)
 21591  		v3.AddArg(v4)
 21592  		v.AddArg3(v0, v2, v3)
 21593  		return true
 21594  	}
 21595  	return false
 21596  }
 21597  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 21598  	v_1 := v.Args[1]
 21599  	v_0 := v.Args[0]
 21600  	b := v.Block
 21601  	typ := &b.Func.Config.Types
 21602  	// match: (Rsh16Ux64 <t> x y)
 21603  	// cond: shiftIsBounded(v)
 21604  	// result: (SRL <t> (ZeroExt16to64 x) y)
 21605  	for {
 21606  		t := v.Type
 21607  		x := v_0
 21608  		y := v_1
 21609  		if !(shiftIsBounded(v)) {
 21610  			break
 21611  		}
 21612  		v.reset(OpARM64SRL)
 21613  		v.Type = t
 21614  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21615  		v0.AddArg(x)
 21616  		v.AddArg2(v0, y)
 21617  		return true
 21618  	}
 21619  	// match: (Rsh16Ux64 <t> x y)
 21620  	// cond: !shiftIsBounded(v)
 21621  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 21622  	for {
 21623  		t := v.Type
 21624  		x := v_0
 21625  		y := v_1
 21626  		if !(!shiftIsBounded(v)) {
 21627  			break
 21628  		}
 21629  		v.reset(OpARM64CSEL)
 21630  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21631  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21632  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21633  		v1.AddArg(x)
 21634  		v0.AddArg2(v1, y)
 21635  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21636  		v2.AuxInt = int64ToAuxInt(0)
 21637  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21638  		v3.AuxInt = int64ToAuxInt(64)
 21639  		v3.AddArg(y)
 21640  		v.AddArg3(v0, v2, v3)
 21641  		return true
 21642  	}
 21643  	return false
 21644  }
 21645  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 21646  	v_1 := v.Args[1]
 21647  	v_0 := v.Args[0]
 21648  	b := v.Block
 21649  	typ := &b.Func.Config.Types
 21650  	// match: (Rsh16Ux8 <t> x y)
 21651  	// cond: shiftIsBounded(v)
 21652  	// result: (SRL <t> (ZeroExt16to64 x) y)
 21653  	for {
 21654  		t := v.Type
 21655  		x := v_0
 21656  		y := v_1
 21657  		if !(shiftIsBounded(v)) {
 21658  			break
 21659  		}
 21660  		v.reset(OpARM64SRL)
 21661  		v.Type = t
 21662  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21663  		v0.AddArg(x)
 21664  		v.AddArg2(v0, y)
 21665  		return true
 21666  	}
 21667  	// match: (Rsh16Ux8 <t> x y)
 21668  	// cond: !shiftIsBounded(v)
 21669  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21670  	for {
 21671  		t := v.Type
 21672  		x := v_0
 21673  		y := v_1
 21674  		if !(!shiftIsBounded(v)) {
 21675  			break
 21676  		}
 21677  		v.reset(OpARM64CSEL)
 21678  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21679  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21680  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21681  		v1.AddArg(x)
 21682  		v0.AddArg2(v1, y)
 21683  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21684  		v2.AuxInt = int64ToAuxInt(0)
 21685  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21686  		v3.AuxInt = int64ToAuxInt(64)
 21687  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21688  		v4.AddArg(y)
 21689  		v3.AddArg(v4)
 21690  		v.AddArg3(v0, v2, v3)
 21691  		return true
 21692  	}
 21693  	return false
 21694  }
 21695  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 21696  	v_1 := v.Args[1]
 21697  	v_0 := v.Args[0]
 21698  	b := v.Block
 21699  	typ := &b.Func.Config.Types
 21700  	// match: (Rsh16x16 <t> x y)
 21701  	// cond: shiftIsBounded(v)
 21702  	// result: (SRA <t> (SignExt16to64 x) y)
 21703  	for {
 21704  		t := v.Type
 21705  		x := v_0
 21706  		y := v_1
 21707  		if !(shiftIsBounded(v)) {
 21708  			break
 21709  		}
 21710  		v.reset(OpARM64SRA)
 21711  		v.Type = t
 21712  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21713  		v0.AddArg(x)
 21714  		v.AddArg2(v0, y)
 21715  		return true
 21716  	}
 21717  	// match: (Rsh16x16 x y)
 21718  	// cond: !shiftIsBounded(v)
 21719  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21720  	for {
 21721  		x := v_0
 21722  		y := v_1
 21723  		if !(!shiftIsBounded(v)) {
 21724  			break
 21725  		}
 21726  		v.reset(OpARM64SRA)
 21727  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21728  		v0.AddArg(x)
 21729  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21730  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21731  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21732  		v2.AuxInt = int64ToAuxInt(63)
 21733  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21734  		v3.AuxInt = int64ToAuxInt(64)
 21735  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21736  		v4.AddArg(y)
 21737  		v3.AddArg(v4)
 21738  		v1.AddArg3(y, v2, v3)
 21739  		v.AddArg2(v0, v1)
 21740  		return true
 21741  	}
 21742  	return false
 21743  }
 21744  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 21745  	v_1 := v.Args[1]
 21746  	v_0 := v.Args[0]
 21747  	b := v.Block
 21748  	typ := &b.Func.Config.Types
 21749  	// match: (Rsh16x32 <t> x y)
 21750  	// cond: shiftIsBounded(v)
 21751  	// result: (SRA <t> (SignExt16to64 x) y)
 21752  	for {
 21753  		t := v.Type
 21754  		x := v_0
 21755  		y := v_1
 21756  		if !(shiftIsBounded(v)) {
 21757  			break
 21758  		}
 21759  		v.reset(OpARM64SRA)
 21760  		v.Type = t
 21761  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21762  		v0.AddArg(x)
 21763  		v.AddArg2(v0, y)
 21764  		return true
 21765  	}
 21766  	// match: (Rsh16x32 x y)
 21767  	// cond: !shiftIsBounded(v)
 21768  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21769  	for {
 21770  		x := v_0
 21771  		y := v_1
 21772  		if !(!shiftIsBounded(v)) {
 21773  			break
 21774  		}
 21775  		v.reset(OpARM64SRA)
 21776  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21777  		v0.AddArg(x)
 21778  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21779  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21780  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21781  		v2.AuxInt = int64ToAuxInt(63)
 21782  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21783  		v3.AuxInt = int64ToAuxInt(64)
 21784  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21785  		v4.AddArg(y)
 21786  		v3.AddArg(v4)
 21787  		v1.AddArg3(y, v2, v3)
 21788  		v.AddArg2(v0, v1)
 21789  		return true
 21790  	}
 21791  	return false
 21792  }
 21793  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 21794  	v_1 := v.Args[1]
 21795  	v_0 := v.Args[0]
 21796  	b := v.Block
 21797  	typ := &b.Func.Config.Types
 21798  	// match: (Rsh16x64 <t> x y)
 21799  	// cond: shiftIsBounded(v)
 21800  	// result: (SRA <t> (SignExt16to64 x) y)
 21801  	for {
 21802  		t := v.Type
 21803  		x := v_0
 21804  		y := v_1
 21805  		if !(shiftIsBounded(v)) {
 21806  			break
 21807  		}
 21808  		v.reset(OpARM64SRA)
 21809  		v.Type = t
 21810  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21811  		v0.AddArg(x)
 21812  		v.AddArg2(v0, y)
 21813  		return true
 21814  	}
 21815  	// match: (Rsh16x64 x y)
 21816  	// cond: !shiftIsBounded(v)
 21817  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21818  	for {
 21819  		x := v_0
 21820  		y := v_1
 21821  		if !(!shiftIsBounded(v)) {
 21822  			break
 21823  		}
 21824  		v.reset(OpARM64SRA)
 21825  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21826  		v0.AddArg(x)
 21827  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21828  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21829  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21830  		v2.AuxInt = int64ToAuxInt(63)
 21831  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21832  		v3.AuxInt = int64ToAuxInt(64)
 21833  		v3.AddArg(y)
 21834  		v1.AddArg3(y, v2, v3)
 21835  		v.AddArg2(v0, v1)
 21836  		return true
 21837  	}
 21838  	return false
 21839  }
 21840  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 21841  	v_1 := v.Args[1]
 21842  	v_0 := v.Args[0]
 21843  	b := v.Block
 21844  	typ := &b.Func.Config.Types
 21845  	// match: (Rsh16x8 <t> x y)
 21846  	// cond: shiftIsBounded(v)
 21847  	// result: (SRA <t> (SignExt16to64 x) y)
 21848  	for {
 21849  		t := v.Type
 21850  		x := v_0
 21851  		y := v_1
 21852  		if !(shiftIsBounded(v)) {
 21853  			break
 21854  		}
 21855  		v.reset(OpARM64SRA)
 21856  		v.Type = t
 21857  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21858  		v0.AddArg(x)
 21859  		v.AddArg2(v0, y)
 21860  		return true
 21861  	}
 21862  	// match: (Rsh16x8 x y)
 21863  	// cond: !shiftIsBounded(v)
 21864  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21865  	for {
 21866  		x := v_0
 21867  		y := v_1
 21868  		if !(!shiftIsBounded(v)) {
 21869  			break
 21870  		}
 21871  		v.reset(OpARM64SRA)
 21872  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 21873  		v0.AddArg(x)
 21874  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21875  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21876  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21877  		v2.AuxInt = int64ToAuxInt(63)
 21878  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21879  		v3.AuxInt = int64ToAuxInt(64)
 21880  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21881  		v4.AddArg(y)
 21882  		v3.AddArg(v4)
 21883  		v1.AddArg3(y, v2, v3)
 21884  		v.AddArg2(v0, v1)
 21885  		return true
 21886  	}
 21887  	return false
 21888  }
 21889  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 21890  	v_1 := v.Args[1]
 21891  	v_0 := v.Args[0]
 21892  	b := v.Block
 21893  	typ := &b.Func.Config.Types
 21894  	// match: (Rsh32Ux16 <t> x y)
 21895  	// cond: shiftIsBounded(v)
 21896  	// result: (SRL <t> (ZeroExt32to64 x) y)
 21897  	for {
 21898  		t := v.Type
 21899  		x := v_0
 21900  		y := v_1
 21901  		if !(shiftIsBounded(v)) {
 21902  			break
 21903  		}
 21904  		v.reset(OpARM64SRL)
 21905  		v.Type = t
 21906  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21907  		v0.AddArg(x)
 21908  		v.AddArg2(v0, y)
 21909  		return true
 21910  	}
 21911  	// match: (Rsh32Ux16 <t> x y)
 21912  	// cond: !shiftIsBounded(v)
 21913  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21914  	for {
 21915  		t := v.Type
 21916  		x := v_0
 21917  		y := v_1
 21918  		if !(!shiftIsBounded(v)) {
 21919  			break
 21920  		}
 21921  		v.reset(OpARM64CSEL)
 21922  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21923  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21924  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21925  		v1.AddArg(x)
 21926  		v0.AddArg2(v1, y)
 21927  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21928  		v2.AuxInt = int64ToAuxInt(0)
 21929  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21930  		v3.AuxInt = int64ToAuxInt(64)
 21931  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21932  		v4.AddArg(y)
 21933  		v3.AddArg(v4)
 21934  		v.AddArg3(v0, v2, v3)
 21935  		return true
 21936  	}
 21937  	return false
 21938  }
 21939  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 21940  	v_1 := v.Args[1]
 21941  	v_0 := v.Args[0]
 21942  	b := v.Block
 21943  	typ := &b.Func.Config.Types
 21944  	// match: (Rsh32Ux32 <t> x y)
 21945  	// cond: shiftIsBounded(v)
 21946  	// result: (SRL <t> (ZeroExt32to64 x) y)
 21947  	for {
 21948  		t := v.Type
 21949  		x := v_0
 21950  		y := v_1
 21951  		if !(shiftIsBounded(v)) {
 21952  			break
 21953  		}
 21954  		v.reset(OpARM64SRL)
 21955  		v.Type = t
 21956  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21957  		v0.AddArg(x)
 21958  		v.AddArg2(v0, y)
 21959  		return true
 21960  	}
 21961  	// match: (Rsh32Ux32 <t> x y)
 21962  	// cond: !shiftIsBounded(v)
 21963  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21964  	for {
 21965  		t := v.Type
 21966  		x := v_0
 21967  		y := v_1
 21968  		if !(!shiftIsBounded(v)) {
 21969  			break
 21970  		}
 21971  		v.reset(OpARM64CSEL)
 21972  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21973  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21974  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21975  		v1.AddArg(x)
 21976  		v0.AddArg2(v1, y)
 21977  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21978  		v2.AuxInt = int64ToAuxInt(0)
 21979  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21980  		v3.AuxInt = int64ToAuxInt(64)
 21981  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21982  		v4.AddArg(y)
 21983  		v3.AddArg(v4)
 21984  		v.AddArg3(v0, v2, v3)
 21985  		return true
 21986  	}
 21987  	return false
 21988  }
 21989  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 21990  	v_1 := v.Args[1]
 21991  	v_0 := v.Args[0]
 21992  	b := v.Block
 21993  	typ := &b.Func.Config.Types
 21994  	// match: (Rsh32Ux64 <t> x y)
 21995  	// cond: shiftIsBounded(v)
 21996  	// result: (SRL <t> (ZeroExt32to64 x) y)
 21997  	for {
 21998  		t := v.Type
 21999  		x := v_0
 22000  		y := v_1
 22001  		if !(shiftIsBounded(v)) {
 22002  			break
 22003  		}
 22004  		v.reset(OpARM64SRL)
 22005  		v.Type = t
 22006  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22007  		v0.AddArg(x)
 22008  		v.AddArg2(v0, y)
 22009  		return true
 22010  	}
 22011  	// match: (Rsh32Ux64 <t> x y)
 22012  	// cond: !shiftIsBounded(v)
 22013  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 22014  	for {
 22015  		t := v.Type
 22016  		x := v_0
 22017  		y := v_1
 22018  		if !(!shiftIsBounded(v)) {
 22019  			break
 22020  		}
 22021  		v.reset(OpARM64CSEL)
 22022  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22023  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22024  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22025  		v1.AddArg(x)
 22026  		v0.AddArg2(v1, y)
 22027  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 22028  		v2.AuxInt = int64ToAuxInt(0)
 22029  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22030  		v3.AuxInt = int64ToAuxInt(64)
 22031  		v3.AddArg(y)
 22032  		v.AddArg3(v0, v2, v3)
 22033  		return true
 22034  	}
 22035  	return false
 22036  }
 22037  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 22038  	v_1 := v.Args[1]
 22039  	v_0 := v.Args[0]
 22040  	b := v.Block
 22041  	typ := &b.Func.Config.Types
 22042  	// match: (Rsh32Ux8 <t> x y)
 22043  	// cond: shiftIsBounded(v)
 22044  	// result: (SRL <t> (ZeroExt32to64 x) y)
 22045  	for {
 22046  		t := v.Type
 22047  		x := v_0
 22048  		y := v_1
 22049  		if !(shiftIsBounded(v)) {
 22050  			break
 22051  		}
 22052  		v.reset(OpARM64SRL)
 22053  		v.Type = t
 22054  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22055  		v0.AddArg(x)
 22056  		v.AddArg2(v0, y)
 22057  		return true
 22058  	}
 22059  	// match: (Rsh32Ux8 <t> x y)
 22060  	// cond: !shiftIsBounded(v)
 22061  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 22062  	for {
 22063  		t := v.Type
 22064  		x := v_0
 22065  		y := v_1
 22066  		if !(!shiftIsBounded(v)) {
 22067  			break
 22068  		}
 22069  		v.reset(OpARM64CSEL)
 22070  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22071  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22072  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22073  		v1.AddArg(x)
 22074  		v0.AddArg2(v1, y)
 22075  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 22076  		v2.AuxInt = int64ToAuxInt(0)
 22077  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22078  		v3.AuxInt = int64ToAuxInt(64)
 22079  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22080  		v4.AddArg(y)
 22081  		v3.AddArg(v4)
 22082  		v.AddArg3(v0, v2, v3)
 22083  		return true
 22084  	}
 22085  	return false
 22086  }
 22087  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 22088  	v_1 := v.Args[1]
 22089  	v_0 := v.Args[0]
 22090  	b := v.Block
 22091  	typ := &b.Func.Config.Types
 22092  	// match: (Rsh32x16 <t> x y)
 22093  	// cond: shiftIsBounded(v)
 22094  	// result: (SRA <t> (SignExt32to64 x) y)
 22095  	for {
 22096  		t := v.Type
 22097  		x := v_0
 22098  		y := v_1
 22099  		if !(shiftIsBounded(v)) {
 22100  			break
 22101  		}
 22102  		v.reset(OpARM64SRA)
 22103  		v.Type = t
 22104  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22105  		v0.AddArg(x)
 22106  		v.AddArg2(v0, y)
 22107  		return true
 22108  	}
 22109  	// match: (Rsh32x16 x y)
 22110  	// cond: !shiftIsBounded(v)
 22111  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 22112  	for {
 22113  		x := v_0
 22114  		y := v_1
 22115  		if !(!shiftIsBounded(v)) {
 22116  			break
 22117  		}
 22118  		v.reset(OpARM64SRA)
 22119  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22120  		v0.AddArg(x)
 22121  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22122  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22123  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22124  		v2.AuxInt = int64ToAuxInt(63)
 22125  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22126  		v3.AuxInt = int64ToAuxInt(64)
 22127  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22128  		v4.AddArg(y)
 22129  		v3.AddArg(v4)
 22130  		v1.AddArg3(y, v2, v3)
 22131  		v.AddArg2(v0, v1)
 22132  		return true
 22133  	}
 22134  	return false
 22135  }
 22136  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 22137  	v_1 := v.Args[1]
 22138  	v_0 := v.Args[0]
 22139  	b := v.Block
 22140  	typ := &b.Func.Config.Types
 22141  	// match: (Rsh32x32 <t> x y)
 22142  	// cond: shiftIsBounded(v)
 22143  	// result: (SRA <t> (SignExt32to64 x) y)
 22144  	for {
 22145  		t := v.Type
 22146  		x := v_0
 22147  		y := v_1
 22148  		if !(shiftIsBounded(v)) {
 22149  			break
 22150  		}
 22151  		v.reset(OpARM64SRA)
 22152  		v.Type = t
 22153  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22154  		v0.AddArg(x)
 22155  		v.AddArg2(v0, y)
 22156  		return true
 22157  	}
 22158  	// match: (Rsh32x32 x y)
 22159  	// cond: !shiftIsBounded(v)
 22160  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 22161  	for {
 22162  		x := v_0
 22163  		y := v_1
 22164  		if !(!shiftIsBounded(v)) {
 22165  			break
 22166  		}
 22167  		v.reset(OpARM64SRA)
 22168  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22169  		v0.AddArg(x)
 22170  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22171  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22172  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22173  		v2.AuxInt = int64ToAuxInt(63)
 22174  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22175  		v3.AuxInt = int64ToAuxInt(64)
 22176  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22177  		v4.AddArg(y)
 22178  		v3.AddArg(v4)
 22179  		v1.AddArg3(y, v2, v3)
 22180  		v.AddArg2(v0, v1)
 22181  		return true
 22182  	}
 22183  	return false
 22184  }
 22185  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 22186  	v_1 := v.Args[1]
 22187  	v_0 := v.Args[0]
 22188  	b := v.Block
 22189  	typ := &b.Func.Config.Types
 22190  	// match: (Rsh32x64 <t> x y)
 22191  	// cond: shiftIsBounded(v)
 22192  	// result: (SRA <t> (SignExt32to64 x) y)
 22193  	for {
 22194  		t := v.Type
 22195  		x := v_0
 22196  		y := v_1
 22197  		if !(shiftIsBounded(v)) {
 22198  			break
 22199  		}
 22200  		v.reset(OpARM64SRA)
 22201  		v.Type = t
 22202  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22203  		v0.AddArg(x)
 22204  		v.AddArg2(v0, y)
 22205  		return true
 22206  	}
 22207  	// match: (Rsh32x64 x y)
 22208  	// cond: !shiftIsBounded(v)
 22209  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 22210  	for {
 22211  		x := v_0
 22212  		y := v_1
 22213  		if !(!shiftIsBounded(v)) {
 22214  			break
 22215  		}
 22216  		v.reset(OpARM64SRA)
 22217  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22218  		v0.AddArg(x)
 22219  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22220  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22221  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22222  		v2.AuxInt = int64ToAuxInt(63)
 22223  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22224  		v3.AuxInt = int64ToAuxInt(64)
 22225  		v3.AddArg(y)
 22226  		v1.AddArg3(y, v2, v3)
 22227  		v.AddArg2(v0, v1)
 22228  		return true
 22229  	}
 22230  	return false
 22231  }
 22232  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 22233  	v_1 := v.Args[1]
 22234  	v_0 := v.Args[0]
 22235  	b := v.Block
 22236  	typ := &b.Func.Config.Types
 22237  	// match: (Rsh32x8 <t> x y)
 22238  	// cond: shiftIsBounded(v)
 22239  	// result: (SRA <t> (SignExt32to64 x) y)
 22240  	for {
 22241  		t := v.Type
 22242  		x := v_0
 22243  		y := v_1
 22244  		if !(shiftIsBounded(v)) {
 22245  			break
 22246  		}
 22247  		v.reset(OpARM64SRA)
 22248  		v.Type = t
 22249  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22250  		v0.AddArg(x)
 22251  		v.AddArg2(v0, y)
 22252  		return true
 22253  	}
 22254  	// match: (Rsh32x8 x y)
 22255  	// cond: !shiftIsBounded(v)
 22256  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 22257  	for {
 22258  		x := v_0
 22259  		y := v_1
 22260  		if !(!shiftIsBounded(v)) {
 22261  			break
 22262  		}
 22263  		v.reset(OpARM64SRA)
 22264  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 22265  		v0.AddArg(x)
 22266  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22267  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22268  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22269  		v2.AuxInt = int64ToAuxInt(63)
 22270  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22271  		v3.AuxInt = int64ToAuxInt(64)
 22272  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22273  		v4.AddArg(y)
 22274  		v3.AddArg(v4)
 22275  		v1.AddArg3(y, v2, v3)
 22276  		v.AddArg2(v0, v1)
 22277  		return true
 22278  	}
 22279  	return false
 22280  }
 22281  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 22282  	v_1 := v.Args[1]
 22283  	v_0 := v.Args[0]
 22284  	b := v.Block
 22285  	typ := &b.Func.Config.Types
 22286  	// match: (Rsh64Ux16 <t> x y)
 22287  	// cond: shiftIsBounded(v)
 22288  	// result: (SRL <t> x y)
 22289  	for {
 22290  		t := v.Type
 22291  		x := v_0
 22292  		y := v_1
 22293  		if !(shiftIsBounded(v)) {
 22294  			break
 22295  		}
 22296  		v.reset(OpARM64SRL)
 22297  		v.Type = t
 22298  		v.AddArg2(x, y)
 22299  		return true
 22300  	}
 22301  	// match: (Rsh64Ux16 <t> x y)
 22302  	// cond: !shiftIsBounded(v)
 22303  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 22304  	for {
 22305  		t := v.Type
 22306  		x := v_0
 22307  		y := v_1
 22308  		if !(!shiftIsBounded(v)) {
 22309  			break
 22310  		}
 22311  		v.reset(OpARM64CSEL)
 22312  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22313  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22314  		v0.AddArg2(x, y)
 22315  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22316  		v1.AuxInt = int64ToAuxInt(0)
 22317  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22318  		v2.AuxInt = int64ToAuxInt(64)
 22319  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22320  		v3.AddArg(y)
 22321  		v2.AddArg(v3)
 22322  		v.AddArg3(v0, v1, v2)
 22323  		return true
 22324  	}
 22325  	return false
 22326  }
 22327  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 22328  	v_1 := v.Args[1]
 22329  	v_0 := v.Args[0]
 22330  	b := v.Block
 22331  	typ := &b.Func.Config.Types
 22332  	// match: (Rsh64Ux32 <t> x y)
 22333  	// cond: shiftIsBounded(v)
 22334  	// result: (SRL <t> x y)
 22335  	for {
 22336  		t := v.Type
 22337  		x := v_0
 22338  		y := v_1
 22339  		if !(shiftIsBounded(v)) {
 22340  			break
 22341  		}
 22342  		v.reset(OpARM64SRL)
 22343  		v.Type = t
 22344  		v.AddArg2(x, y)
 22345  		return true
 22346  	}
 22347  	// match: (Rsh64Ux32 <t> x y)
 22348  	// cond: !shiftIsBounded(v)
 22349  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 22350  	for {
 22351  		t := v.Type
 22352  		x := v_0
 22353  		y := v_1
 22354  		if !(!shiftIsBounded(v)) {
 22355  			break
 22356  		}
 22357  		v.reset(OpARM64CSEL)
 22358  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22359  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22360  		v0.AddArg2(x, y)
 22361  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22362  		v1.AuxInt = int64ToAuxInt(0)
 22363  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22364  		v2.AuxInt = int64ToAuxInt(64)
 22365  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22366  		v3.AddArg(y)
 22367  		v2.AddArg(v3)
 22368  		v.AddArg3(v0, v1, v2)
 22369  		return true
 22370  	}
 22371  	return false
 22372  }
 22373  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 22374  	v_1 := v.Args[1]
 22375  	v_0 := v.Args[0]
 22376  	b := v.Block
 22377  	// match: (Rsh64Ux64 <t> x y)
 22378  	// cond: shiftIsBounded(v)
 22379  	// result: (SRL <t> x y)
 22380  	for {
 22381  		t := v.Type
 22382  		x := v_0
 22383  		y := v_1
 22384  		if !(shiftIsBounded(v)) {
 22385  			break
 22386  		}
 22387  		v.reset(OpARM64SRL)
 22388  		v.Type = t
 22389  		v.AddArg2(x, y)
 22390  		return true
 22391  	}
 22392  	// match: (Rsh64Ux64 <t> x y)
 22393  	// cond: !shiftIsBounded(v)
 22394  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 22395  	for {
 22396  		t := v.Type
 22397  		x := v_0
 22398  		y := v_1
 22399  		if !(!shiftIsBounded(v)) {
 22400  			break
 22401  		}
 22402  		v.reset(OpARM64CSEL)
 22403  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22404  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22405  		v0.AddArg2(x, y)
 22406  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22407  		v1.AuxInt = int64ToAuxInt(0)
 22408  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22409  		v2.AuxInt = int64ToAuxInt(64)
 22410  		v2.AddArg(y)
 22411  		v.AddArg3(v0, v1, v2)
 22412  		return true
 22413  	}
 22414  	return false
 22415  }
 22416  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 22417  	v_1 := v.Args[1]
 22418  	v_0 := v.Args[0]
 22419  	b := v.Block
 22420  	typ := &b.Func.Config.Types
 22421  	// match: (Rsh64Ux8 <t> x y)
 22422  	// cond: shiftIsBounded(v)
 22423  	// result: (SRL <t> x y)
 22424  	for {
 22425  		t := v.Type
 22426  		x := v_0
 22427  		y := v_1
 22428  		if !(shiftIsBounded(v)) {
 22429  			break
 22430  		}
 22431  		v.reset(OpARM64SRL)
 22432  		v.Type = t
 22433  		v.AddArg2(x, y)
 22434  		return true
 22435  	}
 22436  	// match: (Rsh64Ux8 <t> x y)
 22437  	// cond: !shiftIsBounded(v)
 22438  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 22439  	for {
 22440  		t := v.Type
 22441  		x := v_0
 22442  		y := v_1
 22443  		if !(!shiftIsBounded(v)) {
 22444  			break
 22445  		}
 22446  		v.reset(OpARM64CSEL)
 22447  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22448  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22449  		v0.AddArg2(x, y)
 22450  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 22451  		v1.AuxInt = int64ToAuxInt(0)
 22452  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22453  		v2.AuxInt = int64ToAuxInt(64)
 22454  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22455  		v3.AddArg(y)
 22456  		v2.AddArg(v3)
 22457  		v.AddArg3(v0, v1, v2)
 22458  		return true
 22459  	}
 22460  	return false
 22461  }
 22462  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 22463  	v_1 := v.Args[1]
 22464  	v_0 := v.Args[0]
 22465  	b := v.Block
 22466  	typ := &b.Func.Config.Types
 22467  	// match: (Rsh64x16 <t> x y)
 22468  	// cond: shiftIsBounded(v)
 22469  	// result: (SRA <t> x y)
 22470  	for {
 22471  		t := v.Type
 22472  		x := v_0
 22473  		y := v_1
 22474  		if !(shiftIsBounded(v)) {
 22475  			break
 22476  		}
 22477  		v.reset(OpARM64SRA)
 22478  		v.Type = t
 22479  		v.AddArg2(x, y)
 22480  		return true
 22481  	}
 22482  	// match: (Rsh64x16 x y)
 22483  	// cond: !shiftIsBounded(v)
 22484  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 22485  	for {
 22486  		x := v_0
 22487  		y := v_1
 22488  		if !(!shiftIsBounded(v)) {
 22489  			break
 22490  		}
 22491  		v.reset(OpARM64SRA)
 22492  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22493  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22494  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22495  		v1.AuxInt = int64ToAuxInt(63)
 22496  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22497  		v2.AuxInt = int64ToAuxInt(64)
 22498  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22499  		v3.AddArg(y)
 22500  		v2.AddArg(v3)
 22501  		v0.AddArg3(y, v1, v2)
 22502  		v.AddArg2(x, v0)
 22503  		return true
 22504  	}
 22505  	return false
 22506  }
 22507  func rewriteValueARM64_OpRsh64x32(v *Value) bool {
 22508  	v_1 := v.Args[1]
 22509  	v_0 := v.Args[0]
 22510  	b := v.Block
 22511  	typ := &b.Func.Config.Types
 22512  	// match: (Rsh64x32 <t> x y)
 22513  	// cond: shiftIsBounded(v)
 22514  	// result: (SRA <t> x y)
 22515  	for {
 22516  		t := v.Type
 22517  		x := v_0
 22518  		y := v_1
 22519  		if !(shiftIsBounded(v)) {
 22520  			break
 22521  		}
 22522  		v.reset(OpARM64SRA)
 22523  		v.Type = t
 22524  		v.AddArg2(x, y)
 22525  		return true
 22526  	}
 22527  	// match: (Rsh64x32 x y)
 22528  	// cond: !shiftIsBounded(v)
 22529  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 22530  	for {
 22531  		x := v_0
 22532  		y := v_1
 22533  		if !(!shiftIsBounded(v)) {
 22534  			break
 22535  		}
 22536  		v.reset(OpARM64SRA)
 22537  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22538  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22539  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22540  		v1.AuxInt = int64ToAuxInt(63)
 22541  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22542  		v2.AuxInt = int64ToAuxInt(64)
 22543  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22544  		v3.AddArg(y)
 22545  		v2.AddArg(v3)
 22546  		v0.AddArg3(y, v1, v2)
 22547  		v.AddArg2(x, v0)
 22548  		return true
 22549  	}
 22550  	return false
 22551  }
 22552  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 22553  	v_1 := v.Args[1]
 22554  	v_0 := v.Args[0]
 22555  	b := v.Block
 22556  	// match: (Rsh64x64 <t> x y)
 22557  	// cond: shiftIsBounded(v)
 22558  	// result: (SRA <t> x y)
 22559  	for {
 22560  		t := v.Type
 22561  		x := v_0
 22562  		y := v_1
 22563  		if !(shiftIsBounded(v)) {
 22564  			break
 22565  		}
 22566  		v.reset(OpARM64SRA)
 22567  		v.Type = t
 22568  		v.AddArg2(x, y)
 22569  		return true
 22570  	}
 22571  	// match: (Rsh64x64 x y)
 22572  	// cond: !shiftIsBounded(v)
 22573  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 22574  	for {
 22575  		x := v_0
 22576  		y := v_1
 22577  		if !(!shiftIsBounded(v)) {
 22578  			break
 22579  		}
 22580  		v.reset(OpARM64SRA)
 22581  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22582  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22583  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22584  		v1.AuxInt = int64ToAuxInt(63)
 22585  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22586  		v2.AuxInt = int64ToAuxInt(64)
 22587  		v2.AddArg(y)
 22588  		v0.AddArg3(y, v1, v2)
 22589  		v.AddArg2(x, v0)
 22590  		return true
 22591  	}
 22592  	return false
 22593  }
 22594  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 22595  	v_1 := v.Args[1]
 22596  	v_0 := v.Args[0]
 22597  	b := v.Block
 22598  	typ := &b.Func.Config.Types
 22599  	// match: (Rsh64x8 <t> x y)
 22600  	// cond: shiftIsBounded(v)
 22601  	// result: (SRA <t> x y)
 22602  	for {
 22603  		t := v.Type
 22604  		x := v_0
 22605  		y := v_1
 22606  		if !(shiftIsBounded(v)) {
 22607  			break
 22608  		}
 22609  		v.reset(OpARM64SRA)
 22610  		v.Type = t
 22611  		v.AddArg2(x, y)
 22612  		return true
 22613  	}
 22614  	// match: (Rsh64x8 x y)
 22615  	// cond: !shiftIsBounded(v)
 22616  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 22617  	for {
 22618  		x := v_0
 22619  		y := v_1
 22620  		if !(!shiftIsBounded(v)) {
 22621  			break
 22622  		}
 22623  		v.reset(OpARM64SRA)
 22624  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22625  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 22626  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22627  		v1.AuxInt = int64ToAuxInt(63)
 22628  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22629  		v2.AuxInt = int64ToAuxInt(64)
 22630  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22631  		v3.AddArg(y)
 22632  		v2.AddArg(v3)
 22633  		v0.AddArg3(y, v1, v2)
 22634  		v.AddArg2(x, v0)
 22635  		return true
 22636  	}
 22637  	return false
 22638  }
 22639  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 22640  	v_1 := v.Args[1]
 22641  	v_0 := v.Args[0]
 22642  	b := v.Block
 22643  	typ := &b.Func.Config.Types
 22644  	// match: (Rsh8Ux16 <t> x y)
 22645  	// cond: shiftIsBounded(v)
 22646  	// result: (SRL <t> (ZeroExt8to64 x) y)
 22647  	for {
 22648  		t := v.Type
 22649  		x := v_0
 22650  		y := v_1
 22651  		if !(shiftIsBounded(v)) {
 22652  			break
 22653  		}
 22654  		v.reset(OpARM64SRL)
 22655  		v.Type = t
 22656  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22657  		v0.AddArg(x)
 22658  		v.AddArg2(v0, y)
 22659  		return true
 22660  	}
 22661  	// match: (Rsh8Ux16 <t> x y)
 22662  	// cond: !shiftIsBounded(v)
 22663  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 22664  	for {
 22665  		t := v.Type
 22666  		x := v_0
 22667  		y := v_1
 22668  		if !(!shiftIsBounded(v)) {
 22669  			break
 22670  		}
 22671  		v.reset(OpARM64CSEL)
 22672  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22673  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22674  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22675  		v1.AddArg(x)
 22676  		v0.AddArg2(v1, y)
 22677  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 22678  		v2.AuxInt = int64ToAuxInt(0)
 22679  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22680  		v3.AuxInt = int64ToAuxInt(64)
 22681  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22682  		v4.AddArg(y)
 22683  		v3.AddArg(v4)
 22684  		v.AddArg3(v0, v2, v3)
 22685  		return true
 22686  	}
 22687  	return false
 22688  }
 22689  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 22690  	v_1 := v.Args[1]
 22691  	v_0 := v.Args[0]
 22692  	b := v.Block
 22693  	typ := &b.Func.Config.Types
 22694  	// match: (Rsh8Ux32 <t> x y)
 22695  	// cond: shiftIsBounded(v)
 22696  	// result: (SRL <t> (ZeroExt8to64 x) y)
 22697  	for {
 22698  		t := v.Type
 22699  		x := v_0
 22700  		y := v_1
 22701  		if !(shiftIsBounded(v)) {
 22702  			break
 22703  		}
 22704  		v.reset(OpARM64SRL)
 22705  		v.Type = t
 22706  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22707  		v0.AddArg(x)
 22708  		v.AddArg2(v0, y)
 22709  		return true
 22710  	}
 22711  	// match: (Rsh8Ux32 <t> x y)
 22712  	// cond: !shiftIsBounded(v)
 22713  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 22714  	for {
 22715  		t := v.Type
 22716  		x := v_0
 22717  		y := v_1
 22718  		if !(!shiftIsBounded(v)) {
 22719  			break
 22720  		}
 22721  		v.reset(OpARM64CSEL)
 22722  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22723  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22724  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22725  		v1.AddArg(x)
 22726  		v0.AddArg2(v1, y)
 22727  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 22728  		v2.AuxInt = int64ToAuxInt(0)
 22729  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22730  		v3.AuxInt = int64ToAuxInt(64)
 22731  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22732  		v4.AddArg(y)
 22733  		v3.AddArg(v4)
 22734  		v.AddArg3(v0, v2, v3)
 22735  		return true
 22736  	}
 22737  	return false
 22738  }
 22739  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 22740  	v_1 := v.Args[1]
 22741  	v_0 := v.Args[0]
 22742  	b := v.Block
 22743  	typ := &b.Func.Config.Types
 22744  	// match: (Rsh8Ux64 <t> x y)
 22745  	// cond: shiftIsBounded(v)
 22746  	// result: (SRL <t> (ZeroExt8to64 x) y)
 22747  	for {
 22748  		t := v.Type
 22749  		x := v_0
 22750  		y := v_1
 22751  		if !(shiftIsBounded(v)) {
 22752  			break
 22753  		}
 22754  		v.reset(OpARM64SRL)
 22755  		v.Type = t
 22756  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22757  		v0.AddArg(x)
 22758  		v.AddArg2(v0, y)
 22759  		return true
 22760  	}
 22761  	// match: (Rsh8Ux64 <t> x y)
 22762  	// cond: !shiftIsBounded(v)
 22763  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 22764  	for {
 22765  		t := v.Type
 22766  		x := v_0
 22767  		y := v_1
 22768  		if !(!shiftIsBounded(v)) {
 22769  			break
 22770  		}
 22771  		v.reset(OpARM64CSEL)
 22772  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22773  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22774  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22775  		v1.AddArg(x)
 22776  		v0.AddArg2(v1, y)
 22777  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 22778  		v2.AuxInt = int64ToAuxInt(0)
 22779  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22780  		v3.AuxInt = int64ToAuxInt(64)
 22781  		v3.AddArg(y)
 22782  		v.AddArg3(v0, v2, v3)
 22783  		return true
 22784  	}
 22785  	return false
 22786  }
 22787  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 22788  	v_1 := v.Args[1]
 22789  	v_0 := v.Args[0]
 22790  	b := v.Block
 22791  	typ := &b.Func.Config.Types
 22792  	// match: (Rsh8Ux8 <t> x y)
 22793  	// cond: shiftIsBounded(v)
 22794  	// result: (SRL <t> (ZeroExt8to64 x) y)
 22795  	for {
 22796  		t := v.Type
 22797  		x := v_0
 22798  		y := v_1
 22799  		if !(shiftIsBounded(v)) {
 22800  			break
 22801  		}
 22802  		v.reset(OpARM64SRL)
 22803  		v.Type = t
 22804  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22805  		v0.AddArg(x)
 22806  		v.AddArg2(v0, y)
 22807  		return true
 22808  	}
 22809  	// match: (Rsh8Ux8 <t> x y)
 22810  	// cond: !shiftIsBounded(v)
 22811  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 22812  	for {
 22813  		t := v.Type
 22814  		x := v_0
 22815  		y := v_1
 22816  		if !(!shiftIsBounded(v)) {
 22817  			break
 22818  		}
 22819  		v.reset(OpARM64CSEL)
 22820  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 22821  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 22822  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22823  		v1.AddArg(x)
 22824  		v0.AddArg2(v1, y)
 22825  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 22826  		v2.AuxInt = int64ToAuxInt(0)
 22827  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22828  		v3.AuxInt = int64ToAuxInt(64)
 22829  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 22830  		v4.AddArg(y)
 22831  		v3.AddArg(v4)
 22832  		v.AddArg3(v0, v2, v3)
 22833  		return true
 22834  	}
 22835  	return false
 22836  }
 22837  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 22838  	v_1 := v.Args[1]
 22839  	v_0 := v.Args[0]
 22840  	b := v.Block
 22841  	typ := &b.Func.Config.Types
 22842  	// match: (Rsh8x16 <t> x y)
 22843  	// cond: shiftIsBounded(v)
 22844  	// result: (SRA <t> (SignExt8to64 x) y)
 22845  	for {
 22846  		t := v.Type
 22847  		x := v_0
 22848  		y := v_1
 22849  		if !(shiftIsBounded(v)) {
 22850  			break
 22851  		}
 22852  		v.reset(OpARM64SRA)
 22853  		v.Type = t
 22854  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22855  		v0.AddArg(x)
 22856  		v.AddArg2(v0, y)
 22857  		return true
 22858  	}
 22859  	// match: (Rsh8x16 x y)
 22860  	// cond: !shiftIsBounded(v)
 22861  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 22862  	for {
 22863  		x := v_0
 22864  		y := v_1
 22865  		if !(!shiftIsBounded(v)) {
 22866  			break
 22867  		}
 22868  		v.reset(OpARM64SRA)
 22869  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22870  		v0.AddArg(x)
 22871  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22872  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22873  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22874  		v2.AuxInt = int64ToAuxInt(63)
 22875  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22876  		v3.AuxInt = int64ToAuxInt(64)
 22877  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 22878  		v4.AddArg(y)
 22879  		v3.AddArg(v4)
 22880  		v1.AddArg3(y, v2, v3)
 22881  		v.AddArg2(v0, v1)
 22882  		return true
 22883  	}
 22884  	return false
 22885  }
 22886  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 22887  	v_1 := v.Args[1]
 22888  	v_0 := v.Args[0]
 22889  	b := v.Block
 22890  	typ := &b.Func.Config.Types
 22891  	// match: (Rsh8x32 <t> x y)
 22892  	// cond: shiftIsBounded(v)
 22893  	// result: (SRA <t> (SignExt8to64 x) y)
 22894  	for {
 22895  		t := v.Type
 22896  		x := v_0
 22897  		y := v_1
 22898  		if !(shiftIsBounded(v)) {
 22899  			break
 22900  		}
 22901  		v.reset(OpARM64SRA)
 22902  		v.Type = t
 22903  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22904  		v0.AddArg(x)
 22905  		v.AddArg2(v0, y)
 22906  		return true
 22907  	}
 22908  	// match: (Rsh8x32 x y)
 22909  	// cond: !shiftIsBounded(v)
 22910  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 22911  	for {
 22912  		x := v_0
 22913  		y := v_1
 22914  		if !(!shiftIsBounded(v)) {
 22915  			break
 22916  		}
 22917  		v.reset(OpARM64SRA)
 22918  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22919  		v0.AddArg(x)
 22920  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22921  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22922  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22923  		v2.AuxInt = int64ToAuxInt(63)
 22924  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22925  		v3.AuxInt = int64ToAuxInt(64)
 22926  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 22927  		v4.AddArg(y)
 22928  		v3.AddArg(v4)
 22929  		v1.AddArg3(y, v2, v3)
 22930  		v.AddArg2(v0, v1)
 22931  		return true
 22932  	}
 22933  	return false
 22934  }
 22935  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 22936  	v_1 := v.Args[1]
 22937  	v_0 := v.Args[0]
 22938  	b := v.Block
 22939  	typ := &b.Func.Config.Types
 22940  	// match: (Rsh8x64 <t> x y)
 22941  	// cond: shiftIsBounded(v)
 22942  	// result: (SRA <t> (SignExt8to64 x) y)
 22943  	for {
 22944  		t := v.Type
 22945  		x := v_0
 22946  		y := v_1
 22947  		if !(shiftIsBounded(v)) {
 22948  			break
 22949  		}
 22950  		v.reset(OpARM64SRA)
 22951  		v.Type = t
 22952  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22953  		v0.AddArg(x)
 22954  		v.AddArg2(v0, y)
 22955  		return true
 22956  	}
 22957  	// match: (Rsh8x64 x y)
 22958  	// cond: !shiftIsBounded(v)
 22959  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 22960  	for {
 22961  		x := v_0
 22962  		y := v_1
 22963  		if !(!shiftIsBounded(v)) {
 22964  			break
 22965  		}
 22966  		v.reset(OpARM64SRA)
 22967  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 22968  		v0.AddArg(x)
 22969  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 22970  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 22971  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 22972  		v2.AuxInt = int64ToAuxInt(63)
 22973  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 22974  		v3.AuxInt = int64ToAuxInt(64)
 22975  		v3.AddArg(y)
 22976  		v1.AddArg3(y, v2, v3)
 22977  		v.AddArg2(v0, v1)
 22978  		return true
 22979  	}
 22980  	return false
 22981  }
 22982  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 22983  	v_1 := v.Args[1]
 22984  	v_0 := v.Args[0]
 22985  	b := v.Block
 22986  	typ := &b.Func.Config.Types
 22987  	// match: (Rsh8x8 <t> x y)
 22988  	// cond: shiftIsBounded(v)
 22989  	// result: (SRA <t> (SignExt8to64 x) y)
 22990  	for {
 22991  		t := v.Type
 22992  		x := v_0
 22993  		y := v_1
 22994  		if !(shiftIsBounded(v)) {
 22995  			break
 22996  		}
 22997  		v.reset(OpARM64SRA)
 22998  		v.Type = t
 22999  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23000  		v0.AddArg(x)
 23001  		v.AddArg2(v0, y)
 23002  		return true
 23003  	}
 23004  	// match: (Rsh8x8 x y)
 23005  	// cond: !shiftIsBounded(v)
 23006  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 23007  	for {
 23008  		x := v_0
 23009  		y := v_1
 23010  		if !(!shiftIsBounded(v)) {
 23011  			break
 23012  		}
 23013  		v.reset(OpARM64SRA)
 23014  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 23015  		v0.AddArg(x)
 23016  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 23017  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 23018  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 23019  		v2.AuxInt = int64ToAuxInt(63)
 23020  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23021  		v3.AuxInt = int64ToAuxInt(64)
 23022  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 23023  		v4.AddArg(y)
 23024  		v3.AddArg(v4)
 23025  		v1.AddArg3(y, v2, v3)
 23026  		v.AddArg2(v0, v1)
 23027  		return true
 23028  	}
 23029  	return false
 23030  }
 23031  func rewriteValueARM64_OpSelect0(v *Value) bool {
 23032  	v_0 := v.Args[0]
 23033  	b := v.Block
 23034  	typ := &b.Func.Config.Types
 23035  	// match: (Select0 (Mul64uhilo x y))
 23036  	// result: (UMULH x y)
 23037  	for {
 23038  		if v_0.Op != OpMul64uhilo {
 23039  			break
 23040  		}
 23041  		y := v_0.Args[1]
 23042  		x := v_0.Args[0]
 23043  		v.reset(OpARM64UMULH)
 23044  		v.AddArg2(x, y)
 23045  		return true
 23046  	}
 23047  	// match: (Select0 (Add64carry x y c))
 23048  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 23049  	for {
 23050  		if v_0.Op != OpAdd64carry {
 23051  			break
 23052  		}
 23053  		c := v_0.Args[2]
 23054  		x := v_0.Args[0]
 23055  		y := v_0.Args[1]
 23056  		v.reset(OpSelect0)
 23057  		v.Type = typ.UInt64
 23058  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23059  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23060  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23061  		v2.AuxInt = int64ToAuxInt(-1)
 23062  		v2.AddArg(c)
 23063  		v1.AddArg(v2)
 23064  		v0.AddArg3(x, y, v1)
 23065  		v.AddArg(v0)
 23066  		return true
 23067  	}
 23068  	// match: (Select0 (Sub64borrow x y bo))
 23069  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 23070  	for {
 23071  		if v_0.Op != OpSub64borrow {
 23072  			break
 23073  		}
 23074  		bo := v_0.Args[2]
 23075  		x := v_0.Args[0]
 23076  		y := v_0.Args[1]
 23077  		v.reset(OpSelect0)
 23078  		v.Type = typ.UInt64
 23079  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23080  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23081  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23082  		v2.AddArg(bo)
 23083  		v1.AddArg(v2)
 23084  		v0.AddArg3(x, y, v1)
 23085  		v.AddArg(v0)
 23086  		return true
 23087  	}
 23088  	// match: (Select0 (Mul64uover x y))
 23089  	// result: (MUL x y)
 23090  	for {
 23091  		if v_0.Op != OpMul64uover {
 23092  			break
 23093  		}
 23094  		y := v_0.Args[1]
 23095  		x := v_0.Args[0]
 23096  		v.reset(OpARM64MUL)
 23097  		v.AddArg2(x, y)
 23098  		return true
 23099  	}
 23100  	return false
 23101  }
 23102  func rewriteValueARM64_OpSelect1(v *Value) bool {
 23103  	v_0 := v.Args[0]
 23104  	b := v.Block
 23105  	typ := &b.Func.Config.Types
 23106  	// match: (Select1 (Mul64uhilo x y))
 23107  	// result: (MUL x y)
 23108  	for {
 23109  		if v_0.Op != OpMul64uhilo {
 23110  			break
 23111  		}
 23112  		y := v_0.Args[1]
 23113  		x := v_0.Args[0]
 23114  		v.reset(OpARM64MUL)
 23115  		v.AddArg2(x, y)
 23116  		return true
 23117  	}
 23118  	// match: (Select1 (Add64carry x y c))
 23119  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 23120  	for {
 23121  		if v_0.Op != OpAdd64carry {
 23122  			break
 23123  		}
 23124  		c := v_0.Args[2]
 23125  		x := v_0.Args[0]
 23126  		y := v_0.Args[1]
 23127  		v.reset(OpARM64ADCzerocarry)
 23128  		v.Type = typ.UInt64
 23129  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23130  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23131  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23132  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23133  		v3.AuxInt = int64ToAuxInt(-1)
 23134  		v3.AddArg(c)
 23135  		v2.AddArg(v3)
 23136  		v1.AddArg3(x, y, v2)
 23137  		v0.AddArg(v1)
 23138  		v.AddArg(v0)
 23139  		return true
 23140  	}
 23141  	// match: (Select1 (Sub64borrow x y bo))
 23142  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 23143  	for {
 23144  		if v_0.Op != OpSub64borrow {
 23145  			break
 23146  		}
 23147  		bo := v_0.Args[2]
 23148  		x := v_0.Args[0]
 23149  		y := v_0.Args[1]
 23150  		v.reset(OpARM64NEG)
 23151  		v.Type = typ.UInt64
 23152  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 23153  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23154  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23155  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 23156  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 23157  		v4.AddArg(bo)
 23158  		v3.AddArg(v4)
 23159  		v2.AddArg3(x, y, v3)
 23160  		v1.AddArg(v2)
 23161  		v0.AddArg(v1)
 23162  		v.AddArg(v0)
 23163  		return true
 23164  	}
 23165  	// match: (Select1 (Mul64uover x y))
 23166  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 23167  	for {
 23168  		if v_0.Op != OpMul64uover {
 23169  			break
 23170  		}
 23171  		y := v_0.Args[1]
 23172  		x := v_0.Args[0]
 23173  		v.reset(OpARM64NotEqual)
 23174  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 23175  		v0.AuxInt = int64ToAuxInt(0)
 23176  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 23177  		v1.AddArg2(x, y)
 23178  		v0.AddArg(v1)
 23179  		v.AddArg(v0)
 23180  		return true
 23181  	}
 23182  	return false
 23183  }
 23184  func rewriteValueARM64_OpSelectN(v *Value) bool {
 23185  	v_0 := v.Args[0]
 23186  	b := v.Block
 23187  	config := b.Func.Config
 23188  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 23189  	// 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)
 23190  	// result: (Move [sz] dst src mem)
 23191  	for {
 23192  		if auxIntToInt64(v.AuxInt) != 0 {
 23193  			break
 23194  		}
 23195  		call := v_0
 23196  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 23197  			break
 23198  		}
 23199  		sym := auxToCall(call.Aux)
 23200  		s1 := call.Args[0]
 23201  		if s1.Op != OpARM64MOVDstore {
 23202  			break
 23203  		}
 23204  		_ = s1.Args[2]
 23205  		s1_1 := s1.Args[1]
 23206  		if s1_1.Op != OpARM64MOVDconst {
 23207  			break
 23208  		}
 23209  		sz := auxIntToInt64(s1_1.AuxInt)
 23210  		s2 := s1.Args[2]
 23211  		if s2.Op != OpARM64MOVDstore {
 23212  			break
 23213  		}
 23214  		_ = s2.Args[2]
 23215  		src := s2.Args[1]
 23216  		s3 := s2.Args[2]
 23217  		if s3.Op != OpARM64MOVDstore {
 23218  			break
 23219  		}
 23220  		mem := s3.Args[2]
 23221  		dst := s3.Args[1]
 23222  		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)) {
 23223  			break
 23224  		}
 23225  		v.reset(OpMove)
 23226  		v.AuxInt = int64ToAuxInt(sz)
 23227  		v.AddArg3(dst, src, mem)
 23228  		return true
 23229  	}
 23230  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 23231  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 23232  	// result: (Move [sz] dst src mem)
 23233  	for {
 23234  		if auxIntToInt64(v.AuxInt) != 0 {
 23235  			break
 23236  		}
 23237  		call := v_0
 23238  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 23239  			break
 23240  		}
 23241  		sym := auxToCall(call.Aux)
 23242  		mem := call.Args[3]
 23243  		dst := call.Args[0]
 23244  		src := call.Args[1]
 23245  		call_2 := call.Args[2]
 23246  		if call_2.Op != OpARM64MOVDconst {
 23247  			break
 23248  		}
 23249  		sz := auxIntToInt64(call_2.AuxInt)
 23250  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 23251  			break
 23252  		}
 23253  		v.reset(OpMove)
 23254  		v.AuxInt = int64ToAuxInt(sz)
 23255  		v.AddArg3(dst, src, mem)
 23256  		return true
 23257  	}
 23258  	return false
 23259  }
 23260  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 23261  	v_0 := v.Args[0]
 23262  	b := v.Block
 23263  	// match: (Slicemask <t> x)
 23264  	// result: (SRAconst (NEG <t> x) [63])
 23265  	for {
 23266  		t := v.Type
 23267  		x := v_0
 23268  		v.reset(OpARM64SRAconst)
 23269  		v.AuxInt = int64ToAuxInt(63)
 23270  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 23271  		v0.AddArg(x)
 23272  		v.AddArg(v0)
 23273  		return true
 23274  	}
 23275  }
 23276  func rewriteValueARM64_OpStore(v *Value) bool {
 23277  	v_2 := v.Args[2]
 23278  	v_1 := v.Args[1]
 23279  	v_0 := v.Args[0]
 23280  	// match: (Store {t} ptr val mem)
 23281  	// cond: t.Size() == 1
 23282  	// result: (MOVBstore ptr val mem)
 23283  	for {
 23284  		t := auxToType(v.Aux)
 23285  		ptr := v_0
 23286  		val := v_1
 23287  		mem := v_2
 23288  		if !(t.Size() == 1) {
 23289  			break
 23290  		}
 23291  		v.reset(OpARM64MOVBstore)
 23292  		v.AddArg3(ptr, val, mem)
 23293  		return true
 23294  	}
 23295  	// match: (Store {t} ptr val mem)
 23296  	// cond: t.Size() == 2
 23297  	// result: (MOVHstore ptr val mem)
 23298  	for {
 23299  		t := auxToType(v.Aux)
 23300  		ptr := v_0
 23301  		val := v_1
 23302  		mem := v_2
 23303  		if !(t.Size() == 2) {
 23304  			break
 23305  		}
 23306  		v.reset(OpARM64MOVHstore)
 23307  		v.AddArg3(ptr, val, mem)
 23308  		return true
 23309  	}
 23310  	// match: (Store {t} ptr val mem)
 23311  	// cond: t.Size() == 4 && !t.IsFloat()
 23312  	// result: (MOVWstore ptr val mem)
 23313  	for {
 23314  		t := auxToType(v.Aux)
 23315  		ptr := v_0
 23316  		val := v_1
 23317  		mem := v_2
 23318  		if !(t.Size() == 4 && !t.IsFloat()) {
 23319  			break
 23320  		}
 23321  		v.reset(OpARM64MOVWstore)
 23322  		v.AddArg3(ptr, val, mem)
 23323  		return true
 23324  	}
 23325  	// match: (Store {t} ptr val mem)
 23326  	// cond: t.Size() == 8 && !t.IsFloat()
 23327  	// result: (MOVDstore ptr val mem)
 23328  	for {
 23329  		t := auxToType(v.Aux)
 23330  		ptr := v_0
 23331  		val := v_1
 23332  		mem := v_2
 23333  		if !(t.Size() == 8 && !t.IsFloat()) {
 23334  			break
 23335  		}
 23336  		v.reset(OpARM64MOVDstore)
 23337  		v.AddArg3(ptr, val, mem)
 23338  		return true
 23339  	}
 23340  	// match: (Store {t} ptr val mem)
 23341  	// cond: t.Size() == 4 && t.IsFloat()
 23342  	// result: (FMOVSstore ptr val mem)
 23343  	for {
 23344  		t := auxToType(v.Aux)
 23345  		ptr := v_0
 23346  		val := v_1
 23347  		mem := v_2
 23348  		if !(t.Size() == 4 && t.IsFloat()) {
 23349  			break
 23350  		}
 23351  		v.reset(OpARM64FMOVSstore)
 23352  		v.AddArg3(ptr, val, mem)
 23353  		return true
 23354  	}
 23355  	// match: (Store {t} ptr val mem)
 23356  	// cond: t.Size() == 8 && t.IsFloat()
 23357  	// result: (FMOVDstore ptr val mem)
 23358  	for {
 23359  		t := auxToType(v.Aux)
 23360  		ptr := v_0
 23361  		val := v_1
 23362  		mem := v_2
 23363  		if !(t.Size() == 8 && t.IsFloat()) {
 23364  			break
 23365  		}
 23366  		v.reset(OpARM64FMOVDstore)
 23367  		v.AddArg3(ptr, val, mem)
 23368  		return true
 23369  	}
 23370  	return false
 23371  }
 23372  func rewriteValueARM64_OpZero(v *Value) bool {
 23373  	v_1 := v.Args[1]
 23374  	v_0 := v.Args[0]
 23375  	b := v.Block
 23376  	config := b.Func.Config
 23377  	typ := &b.Func.Config.Types
 23378  	// match: (Zero [0] _ mem)
 23379  	// result: mem
 23380  	for {
 23381  		if auxIntToInt64(v.AuxInt) != 0 {
 23382  			break
 23383  		}
 23384  		mem := v_1
 23385  		v.copyOf(mem)
 23386  		return true
 23387  	}
 23388  	// match: (Zero [1] ptr mem)
 23389  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 23390  	for {
 23391  		if auxIntToInt64(v.AuxInt) != 1 {
 23392  			break
 23393  		}
 23394  		ptr := v_0
 23395  		mem := v_1
 23396  		v.reset(OpARM64MOVBstore)
 23397  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23398  		v0.AuxInt = int64ToAuxInt(0)
 23399  		v.AddArg3(ptr, v0, mem)
 23400  		return true
 23401  	}
 23402  	// match: (Zero [2] ptr mem)
 23403  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 23404  	for {
 23405  		if auxIntToInt64(v.AuxInt) != 2 {
 23406  			break
 23407  		}
 23408  		ptr := v_0
 23409  		mem := v_1
 23410  		v.reset(OpARM64MOVHstore)
 23411  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23412  		v0.AuxInt = int64ToAuxInt(0)
 23413  		v.AddArg3(ptr, v0, mem)
 23414  		return true
 23415  	}
 23416  	// match: (Zero [4] ptr mem)
 23417  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 23418  	for {
 23419  		if auxIntToInt64(v.AuxInt) != 4 {
 23420  			break
 23421  		}
 23422  		ptr := v_0
 23423  		mem := v_1
 23424  		v.reset(OpARM64MOVWstore)
 23425  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23426  		v0.AuxInt = int64ToAuxInt(0)
 23427  		v.AddArg3(ptr, v0, mem)
 23428  		return true
 23429  	}
 23430  	// match: (Zero [3] ptr mem)
 23431  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 23432  	for {
 23433  		if auxIntToInt64(v.AuxInt) != 3 {
 23434  			break
 23435  		}
 23436  		ptr := v_0
 23437  		mem := v_1
 23438  		v.reset(OpARM64MOVBstore)
 23439  		v.AuxInt = int32ToAuxInt(2)
 23440  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23441  		v0.AuxInt = int64ToAuxInt(0)
 23442  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 23443  		v1.AddArg3(ptr, v0, mem)
 23444  		v.AddArg3(ptr, v0, v1)
 23445  		return true
 23446  	}
 23447  	// match: (Zero [5] ptr mem)
 23448  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 23449  	for {
 23450  		if auxIntToInt64(v.AuxInt) != 5 {
 23451  			break
 23452  		}
 23453  		ptr := v_0
 23454  		mem := v_1
 23455  		v.reset(OpARM64MOVBstore)
 23456  		v.AuxInt = int32ToAuxInt(4)
 23457  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23458  		v0.AuxInt = int64ToAuxInt(0)
 23459  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 23460  		v1.AddArg3(ptr, v0, mem)
 23461  		v.AddArg3(ptr, v0, v1)
 23462  		return true
 23463  	}
 23464  	// match: (Zero [6] ptr mem)
 23465  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 23466  	for {
 23467  		if auxIntToInt64(v.AuxInt) != 6 {
 23468  			break
 23469  		}
 23470  		ptr := v_0
 23471  		mem := v_1
 23472  		v.reset(OpARM64MOVHstore)
 23473  		v.AuxInt = int32ToAuxInt(4)
 23474  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23475  		v0.AuxInt = int64ToAuxInt(0)
 23476  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 23477  		v1.AddArg3(ptr, v0, mem)
 23478  		v.AddArg3(ptr, v0, v1)
 23479  		return true
 23480  	}
 23481  	// match: (Zero [7] ptr mem)
 23482  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 23483  	for {
 23484  		if auxIntToInt64(v.AuxInt) != 7 {
 23485  			break
 23486  		}
 23487  		ptr := v_0
 23488  		mem := v_1
 23489  		v.reset(OpARM64MOVWstore)
 23490  		v.AuxInt = int32ToAuxInt(3)
 23491  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23492  		v0.AuxInt = int64ToAuxInt(0)
 23493  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 23494  		v1.AddArg3(ptr, v0, mem)
 23495  		v.AddArg3(ptr, v0, v1)
 23496  		return true
 23497  	}
 23498  	// match: (Zero [8] ptr mem)
 23499  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 23500  	for {
 23501  		if auxIntToInt64(v.AuxInt) != 8 {
 23502  			break
 23503  		}
 23504  		ptr := v_0
 23505  		mem := v_1
 23506  		v.reset(OpARM64MOVDstore)
 23507  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23508  		v0.AuxInt = int64ToAuxInt(0)
 23509  		v.AddArg3(ptr, v0, mem)
 23510  		return true
 23511  	}
 23512  	// match: (Zero [9] ptr mem)
 23513  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 23514  	for {
 23515  		if auxIntToInt64(v.AuxInt) != 9 {
 23516  			break
 23517  		}
 23518  		ptr := v_0
 23519  		mem := v_1
 23520  		v.reset(OpARM64MOVBstore)
 23521  		v.AuxInt = int32ToAuxInt(8)
 23522  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23523  		v0.AuxInt = int64ToAuxInt(0)
 23524  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 23525  		v1.AddArg3(ptr, v0, mem)
 23526  		v.AddArg3(ptr, v0, v1)
 23527  		return true
 23528  	}
 23529  	// match: (Zero [10] ptr mem)
 23530  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 23531  	for {
 23532  		if auxIntToInt64(v.AuxInt) != 10 {
 23533  			break
 23534  		}
 23535  		ptr := v_0
 23536  		mem := v_1
 23537  		v.reset(OpARM64MOVHstore)
 23538  		v.AuxInt = int32ToAuxInt(8)
 23539  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23540  		v0.AuxInt = int64ToAuxInt(0)
 23541  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 23542  		v1.AddArg3(ptr, v0, mem)
 23543  		v.AddArg3(ptr, v0, v1)
 23544  		return true
 23545  	}
 23546  	// match: (Zero [11] ptr mem)
 23547  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 23548  	for {
 23549  		if auxIntToInt64(v.AuxInt) != 11 {
 23550  			break
 23551  		}
 23552  		ptr := v_0
 23553  		mem := v_1
 23554  		v.reset(OpARM64MOVDstore)
 23555  		v.AuxInt = int32ToAuxInt(3)
 23556  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23557  		v0.AuxInt = int64ToAuxInt(0)
 23558  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 23559  		v1.AddArg3(ptr, v0, mem)
 23560  		v.AddArg3(ptr, v0, v1)
 23561  		return true
 23562  	}
 23563  	// match: (Zero [12] ptr mem)
 23564  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 23565  	for {
 23566  		if auxIntToInt64(v.AuxInt) != 12 {
 23567  			break
 23568  		}
 23569  		ptr := v_0
 23570  		mem := v_1
 23571  		v.reset(OpARM64MOVWstore)
 23572  		v.AuxInt = int32ToAuxInt(8)
 23573  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23574  		v0.AuxInt = int64ToAuxInt(0)
 23575  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 23576  		v1.AddArg3(ptr, v0, mem)
 23577  		v.AddArg3(ptr, v0, v1)
 23578  		return true
 23579  	}
 23580  	// match: (Zero [13] ptr mem)
 23581  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 23582  	for {
 23583  		if auxIntToInt64(v.AuxInt) != 13 {
 23584  			break
 23585  		}
 23586  		ptr := v_0
 23587  		mem := v_1
 23588  		v.reset(OpARM64MOVDstore)
 23589  		v.AuxInt = int32ToAuxInt(5)
 23590  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23591  		v0.AuxInt = int64ToAuxInt(0)
 23592  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 23593  		v1.AddArg3(ptr, v0, mem)
 23594  		v.AddArg3(ptr, v0, v1)
 23595  		return true
 23596  	}
 23597  	// match: (Zero [14] ptr mem)
 23598  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 23599  	for {
 23600  		if auxIntToInt64(v.AuxInt) != 14 {
 23601  			break
 23602  		}
 23603  		ptr := v_0
 23604  		mem := v_1
 23605  		v.reset(OpARM64MOVDstore)
 23606  		v.AuxInt = int32ToAuxInt(6)
 23607  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23608  		v0.AuxInt = int64ToAuxInt(0)
 23609  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 23610  		v1.AddArg3(ptr, v0, mem)
 23611  		v.AddArg3(ptr, v0, v1)
 23612  		return true
 23613  	}
 23614  	// match: (Zero [15] ptr mem)
 23615  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 23616  	for {
 23617  		if auxIntToInt64(v.AuxInt) != 15 {
 23618  			break
 23619  		}
 23620  		ptr := v_0
 23621  		mem := v_1
 23622  		v.reset(OpARM64MOVDstore)
 23623  		v.AuxInt = int32ToAuxInt(7)
 23624  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23625  		v0.AuxInt = int64ToAuxInt(0)
 23626  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 23627  		v1.AddArg3(ptr, v0, mem)
 23628  		v.AddArg3(ptr, v0, v1)
 23629  		return true
 23630  	}
 23631  	// match: (Zero [16] ptr mem)
 23632  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 23633  	for {
 23634  		if auxIntToInt64(v.AuxInt) != 16 {
 23635  			break
 23636  		}
 23637  		ptr := v_0
 23638  		mem := v_1
 23639  		v.reset(OpARM64STP)
 23640  		v.AuxInt = int32ToAuxInt(0)
 23641  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23642  		v0.AuxInt = int64ToAuxInt(0)
 23643  		v.AddArg4(ptr, v0, v0, mem)
 23644  		return true
 23645  	}
 23646  	// match: (Zero [32] ptr mem)
 23647  	// result: (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem))
 23648  	for {
 23649  		if auxIntToInt64(v.AuxInt) != 32 {
 23650  			break
 23651  		}
 23652  		ptr := v_0
 23653  		mem := v_1
 23654  		v.reset(OpARM64STP)
 23655  		v.AuxInt = int32ToAuxInt(16)
 23656  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23657  		v0.AuxInt = int64ToAuxInt(0)
 23658  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 23659  		v1.AuxInt = int32ToAuxInt(0)
 23660  		v1.AddArg4(ptr, v0, v0, mem)
 23661  		v.AddArg4(ptr, v0, v0, v1)
 23662  		return true
 23663  	}
 23664  	// match: (Zero [48] ptr mem)
 23665  	// result: (STP [32] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)))
 23666  	for {
 23667  		if auxIntToInt64(v.AuxInt) != 48 {
 23668  			break
 23669  		}
 23670  		ptr := v_0
 23671  		mem := v_1
 23672  		v.reset(OpARM64STP)
 23673  		v.AuxInt = int32ToAuxInt(32)
 23674  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23675  		v0.AuxInt = int64ToAuxInt(0)
 23676  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 23677  		v1.AuxInt = int32ToAuxInt(16)
 23678  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 23679  		v2.AuxInt = int32ToAuxInt(0)
 23680  		v2.AddArg4(ptr, v0, v0, mem)
 23681  		v1.AddArg4(ptr, v0, v0, v2)
 23682  		v.AddArg4(ptr, v0, v0, v1)
 23683  		return true
 23684  	}
 23685  	// match: (Zero [64] ptr mem)
 23686  	// result: (STP [48] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [32] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem))))
 23687  	for {
 23688  		if auxIntToInt64(v.AuxInt) != 64 {
 23689  			break
 23690  		}
 23691  		ptr := v_0
 23692  		mem := v_1
 23693  		v.reset(OpARM64STP)
 23694  		v.AuxInt = int32ToAuxInt(48)
 23695  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 23696  		v0.AuxInt = int64ToAuxInt(0)
 23697  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 23698  		v1.AuxInt = int32ToAuxInt(32)
 23699  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 23700  		v2.AuxInt = int32ToAuxInt(16)
 23701  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 23702  		v3.AuxInt = int32ToAuxInt(0)
 23703  		v3.AddArg4(ptr, v0, v0, mem)
 23704  		v2.AddArg4(ptr, v0, v0, v3)
 23705  		v1.AddArg4(ptr, v0, v0, v2)
 23706  		v.AddArg4(ptr, v0, v0, v1)
 23707  		return true
 23708  	}
 23709  	// match: (Zero [s] ptr mem)
 23710  	// cond: s%16 != 0 && s%16 <= 8 && s > 16
 23711  	// result: (Zero [8] (OffPtr <ptr.Type> ptr [s-8]) (Zero [s-s%16] ptr mem))
 23712  	for {
 23713  		s := auxIntToInt64(v.AuxInt)
 23714  		ptr := v_0
 23715  		mem := v_1
 23716  		if !(s%16 != 0 && s%16 <= 8 && s > 16) {
 23717  			break
 23718  		}
 23719  		v.reset(OpZero)
 23720  		v.AuxInt = int64ToAuxInt(8)
 23721  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 23722  		v0.AuxInt = int64ToAuxInt(s - 8)
 23723  		v0.AddArg(ptr)
 23724  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 23725  		v1.AuxInt = int64ToAuxInt(s - s%16)
 23726  		v1.AddArg2(ptr, mem)
 23727  		v.AddArg2(v0, v1)
 23728  		return true
 23729  	}
 23730  	// match: (Zero [s] ptr mem)
 23731  	// cond: s%16 != 0 && s%16 > 8 && s > 16
 23732  	// result: (Zero [16] (OffPtr <ptr.Type> ptr [s-16]) (Zero [s-s%16] ptr mem))
 23733  	for {
 23734  		s := auxIntToInt64(v.AuxInt)
 23735  		ptr := v_0
 23736  		mem := v_1
 23737  		if !(s%16 != 0 && s%16 > 8 && s > 16) {
 23738  			break
 23739  		}
 23740  		v.reset(OpZero)
 23741  		v.AuxInt = int64ToAuxInt(16)
 23742  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 23743  		v0.AuxInt = int64ToAuxInt(s - 16)
 23744  		v0.AddArg(ptr)
 23745  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 23746  		v1.AuxInt = int64ToAuxInt(s - s%16)
 23747  		v1.AddArg2(ptr, mem)
 23748  		v.AddArg2(v0, v1)
 23749  		return true
 23750  	}
 23751  	// match: (Zero [s] ptr mem)
 23752  	// cond: s%16 == 0 && s > 64 && s <= 16*64 && !config.noDuffDevice
 23753  	// result: (DUFFZERO [4 * (64 - s/16)] ptr mem)
 23754  	for {
 23755  		s := auxIntToInt64(v.AuxInt)
 23756  		ptr := v_0
 23757  		mem := v_1
 23758  		if !(s%16 == 0 && s > 64 && s <= 16*64 && !config.noDuffDevice) {
 23759  			break
 23760  		}
 23761  		v.reset(OpARM64DUFFZERO)
 23762  		v.AuxInt = int64ToAuxInt(4 * (64 - s/16))
 23763  		v.AddArg2(ptr, mem)
 23764  		return true
 23765  	}
 23766  	// match: (Zero [s] ptr mem)
 23767  	// cond: s%16 == 0 && (s > 16*64 || config.noDuffDevice)
 23768  	// result: (LoweredZero ptr (ADDconst <ptr.Type> [s-16] ptr) mem)
 23769  	for {
 23770  		s := auxIntToInt64(v.AuxInt)
 23771  		ptr := v_0
 23772  		mem := v_1
 23773  		if !(s%16 == 0 && (s > 16*64 || config.noDuffDevice)) {
 23774  			break
 23775  		}
 23776  		v.reset(OpARM64LoweredZero)
 23777  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, ptr.Type)
 23778  		v0.AuxInt = int64ToAuxInt(s - 16)
 23779  		v0.AddArg(ptr)
 23780  		v.AddArg3(ptr, v0, mem)
 23781  		return true
 23782  	}
 23783  	return false
 23784  }
 23785  func rewriteBlockARM64(b *Block) bool {
 23786  	typ := &b.Func.Config.Types
 23787  	switch b.Kind {
 23788  	case BlockARM64EQ:
 23789  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 23790  		// cond: z.Uses == 1
 23791  		// result: (EQ (TST x y) yes no)
 23792  		for b.Controls[0].Op == OpARM64CMPconst {
 23793  			v_0 := b.Controls[0]
 23794  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23795  				break
 23796  			}
 23797  			z := v_0.Args[0]
 23798  			if z.Op != OpARM64AND {
 23799  				break
 23800  			}
 23801  			_ = z.Args[1]
 23802  			z_0 := z.Args[0]
 23803  			z_1 := z.Args[1]
 23804  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23805  				x := z_0
 23806  				y := z_1
 23807  				if !(z.Uses == 1) {
 23808  					continue
 23809  				}
 23810  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23811  				v0.AddArg2(x, y)
 23812  				b.resetWithControl(BlockARM64EQ, v0)
 23813  				return true
 23814  			}
 23815  			break
 23816  		}
 23817  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23818  		// cond: x.Uses == 1
 23819  		// result: (EQ (TSTconst [c] y) yes no)
 23820  		for b.Controls[0].Op == OpARM64CMPconst {
 23821  			v_0 := b.Controls[0]
 23822  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23823  				break
 23824  			}
 23825  			x := v_0.Args[0]
 23826  			if x.Op != OpARM64ANDconst {
 23827  				break
 23828  			}
 23829  			c := auxIntToInt64(x.AuxInt)
 23830  			y := x.Args[0]
 23831  			if !(x.Uses == 1) {
 23832  				break
 23833  			}
 23834  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23835  			v0.AuxInt = int64ToAuxInt(c)
 23836  			v0.AddArg(y)
 23837  			b.resetWithControl(BlockARM64EQ, v0)
 23838  			return true
 23839  		}
 23840  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 23841  		// cond: z.Uses == 1
 23842  		// result: (EQ (TSTW x y) yes no)
 23843  		for b.Controls[0].Op == OpARM64CMPWconst {
 23844  			v_0 := b.Controls[0]
 23845  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23846  				break
 23847  			}
 23848  			z := v_0.Args[0]
 23849  			if z.Op != OpARM64AND {
 23850  				break
 23851  			}
 23852  			_ = z.Args[1]
 23853  			z_0 := z.Args[0]
 23854  			z_1 := z.Args[1]
 23855  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23856  				x := z_0
 23857  				y := z_1
 23858  				if !(z.Uses == 1) {
 23859  					continue
 23860  				}
 23861  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23862  				v0.AddArg2(x, y)
 23863  				b.resetWithControl(BlockARM64EQ, v0)
 23864  				return true
 23865  			}
 23866  			break
 23867  		}
 23868  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23869  		// cond: x.Uses == 1
 23870  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 23871  		for b.Controls[0].Op == OpARM64CMPWconst {
 23872  			v_0 := b.Controls[0]
 23873  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23874  				break
 23875  			}
 23876  			x := v_0.Args[0]
 23877  			if x.Op != OpARM64ANDconst {
 23878  				break
 23879  			}
 23880  			c := auxIntToInt64(x.AuxInt)
 23881  			y := x.Args[0]
 23882  			if !(x.Uses == 1) {
 23883  				break
 23884  			}
 23885  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23886  			v0.AuxInt = int32ToAuxInt(int32(c))
 23887  			v0.AddArg(y)
 23888  			b.resetWithControl(BlockARM64EQ, v0)
 23889  			return true
 23890  		}
 23891  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23892  		// cond: x.Uses == 1
 23893  		// result: (EQ (CMNconst [c] y) yes no)
 23894  		for b.Controls[0].Op == OpARM64CMPconst {
 23895  			v_0 := b.Controls[0]
 23896  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23897  				break
 23898  			}
 23899  			x := v_0.Args[0]
 23900  			if x.Op != OpARM64ADDconst {
 23901  				break
 23902  			}
 23903  			c := auxIntToInt64(x.AuxInt)
 23904  			y := x.Args[0]
 23905  			if !(x.Uses == 1) {
 23906  				break
 23907  			}
 23908  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23909  			v0.AuxInt = int64ToAuxInt(c)
 23910  			v0.AddArg(y)
 23911  			b.resetWithControl(BlockARM64EQ, v0)
 23912  			return true
 23913  		}
 23914  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23915  		// cond: x.Uses == 1
 23916  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 23917  		for b.Controls[0].Op == OpARM64CMPWconst {
 23918  			v_0 := b.Controls[0]
 23919  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23920  				break
 23921  			}
 23922  			x := v_0.Args[0]
 23923  			if x.Op != OpARM64ADDconst {
 23924  				break
 23925  			}
 23926  			c := auxIntToInt64(x.AuxInt)
 23927  			y := x.Args[0]
 23928  			if !(x.Uses == 1) {
 23929  				break
 23930  			}
 23931  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23932  			v0.AuxInt = int32ToAuxInt(int32(c))
 23933  			v0.AddArg(y)
 23934  			b.resetWithControl(BlockARM64EQ, v0)
 23935  			return true
 23936  		}
 23937  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 23938  		// cond: z.Uses == 1
 23939  		// result: (EQ (CMN x y) yes no)
 23940  		for b.Controls[0].Op == OpARM64CMPconst {
 23941  			v_0 := b.Controls[0]
 23942  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23943  				break
 23944  			}
 23945  			z := v_0.Args[0]
 23946  			if z.Op != OpARM64ADD {
 23947  				break
 23948  			}
 23949  			_ = z.Args[1]
 23950  			z_0 := z.Args[0]
 23951  			z_1 := z.Args[1]
 23952  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23953  				x := z_0
 23954  				y := z_1
 23955  				if !(z.Uses == 1) {
 23956  					continue
 23957  				}
 23958  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23959  				v0.AddArg2(x, y)
 23960  				b.resetWithControl(BlockARM64EQ, v0)
 23961  				return true
 23962  			}
 23963  			break
 23964  		}
 23965  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 23966  		// cond: z.Uses == 1
 23967  		// result: (EQ (CMNW x y) yes no)
 23968  		for b.Controls[0].Op == OpARM64CMPWconst {
 23969  			v_0 := b.Controls[0]
 23970  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23971  				break
 23972  			}
 23973  			z := v_0.Args[0]
 23974  			if z.Op != OpARM64ADD {
 23975  				break
 23976  			}
 23977  			_ = z.Args[1]
 23978  			z_0 := z.Args[0]
 23979  			z_1 := z.Args[1]
 23980  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23981  				x := z_0
 23982  				y := z_1
 23983  				if !(z.Uses == 1) {
 23984  					continue
 23985  				}
 23986  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23987  				v0.AddArg2(x, y)
 23988  				b.resetWithControl(BlockARM64EQ, v0)
 23989  				return true
 23990  			}
 23991  			break
 23992  		}
 23993  		// match: (EQ (CMP x z:(NEG y)) yes no)
 23994  		// cond: z.Uses == 1
 23995  		// result: (EQ (CMN x y) yes no)
 23996  		for b.Controls[0].Op == OpARM64CMP {
 23997  			v_0 := b.Controls[0]
 23998  			_ = v_0.Args[1]
 23999  			x := v_0.Args[0]
 24000  			z := v_0.Args[1]
 24001  			if z.Op != OpARM64NEG {
 24002  				break
 24003  			}
 24004  			y := z.Args[0]
 24005  			if !(z.Uses == 1) {
 24006  				break
 24007  			}
 24008  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24009  			v0.AddArg2(x, y)
 24010  			b.resetWithControl(BlockARM64EQ, v0)
 24011  			return true
 24012  		}
 24013  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 24014  		// cond: z.Uses == 1
 24015  		// result: (EQ (CMNW x y) yes no)
 24016  		for b.Controls[0].Op == OpARM64CMPW {
 24017  			v_0 := b.Controls[0]
 24018  			_ = v_0.Args[1]
 24019  			x := v_0.Args[0]
 24020  			z := v_0.Args[1]
 24021  			if z.Op != OpARM64NEG {
 24022  				break
 24023  			}
 24024  			y := z.Args[0]
 24025  			if !(z.Uses == 1) {
 24026  				break
 24027  			}
 24028  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24029  			v0.AddArg2(x, y)
 24030  			b.resetWithControl(BlockARM64EQ, v0)
 24031  			return true
 24032  		}
 24033  		// match: (EQ (CMPconst [0] x) yes no)
 24034  		// result: (Z x yes no)
 24035  		for b.Controls[0].Op == OpARM64CMPconst {
 24036  			v_0 := b.Controls[0]
 24037  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24038  				break
 24039  			}
 24040  			x := v_0.Args[0]
 24041  			b.resetWithControl(BlockARM64Z, x)
 24042  			return true
 24043  		}
 24044  		// match: (EQ (CMPWconst [0] x) yes no)
 24045  		// result: (ZW x yes no)
 24046  		for b.Controls[0].Op == OpARM64CMPWconst {
 24047  			v_0 := b.Controls[0]
 24048  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24049  				break
 24050  			}
 24051  			x := v_0.Args[0]
 24052  			b.resetWithControl(BlockARM64ZW, x)
 24053  			return true
 24054  		}
 24055  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 24056  		// cond: z.Uses==1
 24057  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 24058  		for b.Controls[0].Op == OpARM64CMPconst {
 24059  			v_0 := b.Controls[0]
 24060  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24061  				break
 24062  			}
 24063  			z := v_0.Args[0]
 24064  			if z.Op != OpARM64MADD {
 24065  				break
 24066  			}
 24067  			y := z.Args[2]
 24068  			a := z.Args[0]
 24069  			x := z.Args[1]
 24070  			if !(z.Uses == 1) {
 24071  				break
 24072  			}
 24073  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24074  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24075  			v1.AddArg2(x, y)
 24076  			v0.AddArg2(a, v1)
 24077  			b.resetWithControl(BlockARM64EQ, v0)
 24078  			return true
 24079  		}
 24080  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 24081  		// cond: z.Uses==1
 24082  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 24083  		for b.Controls[0].Op == OpARM64CMPconst {
 24084  			v_0 := b.Controls[0]
 24085  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24086  				break
 24087  			}
 24088  			z := v_0.Args[0]
 24089  			if z.Op != OpARM64MSUB {
 24090  				break
 24091  			}
 24092  			y := z.Args[2]
 24093  			a := z.Args[0]
 24094  			x := z.Args[1]
 24095  			if !(z.Uses == 1) {
 24096  				break
 24097  			}
 24098  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24099  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24100  			v1.AddArg2(x, y)
 24101  			v0.AddArg2(a, v1)
 24102  			b.resetWithControl(BlockARM64EQ, v0)
 24103  			return true
 24104  		}
 24105  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 24106  		// cond: z.Uses==1
 24107  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 24108  		for b.Controls[0].Op == OpARM64CMPWconst {
 24109  			v_0 := b.Controls[0]
 24110  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24111  				break
 24112  			}
 24113  			z := v_0.Args[0]
 24114  			if z.Op != OpARM64MADDW {
 24115  				break
 24116  			}
 24117  			y := z.Args[2]
 24118  			a := z.Args[0]
 24119  			x := z.Args[1]
 24120  			if !(z.Uses == 1) {
 24121  				break
 24122  			}
 24123  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24124  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24125  			v1.AddArg2(x, y)
 24126  			v0.AddArg2(a, v1)
 24127  			b.resetWithControl(BlockARM64EQ, v0)
 24128  			return true
 24129  		}
 24130  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24131  		// cond: z.Uses==1
 24132  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 24133  		for b.Controls[0].Op == OpARM64CMPWconst {
 24134  			v_0 := b.Controls[0]
 24135  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24136  				break
 24137  			}
 24138  			z := v_0.Args[0]
 24139  			if z.Op != OpARM64MSUBW {
 24140  				break
 24141  			}
 24142  			y := z.Args[2]
 24143  			a := z.Args[0]
 24144  			x := z.Args[1]
 24145  			if !(z.Uses == 1) {
 24146  				break
 24147  			}
 24148  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24149  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24150  			v1.AddArg2(x, y)
 24151  			v0.AddArg2(a, v1)
 24152  			b.resetWithControl(BlockARM64EQ, v0)
 24153  			return true
 24154  		}
 24155  		// match: (EQ (TSTconst [c] x) yes no)
 24156  		// cond: oneBit(c)
 24157  		// result: (TBZ [int64(ntz64(c))] x yes no)
 24158  		for b.Controls[0].Op == OpARM64TSTconst {
 24159  			v_0 := b.Controls[0]
 24160  			c := auxIntToInt64(v_0.AuxInt)
 24161  			x := v_0.Args[0]
 24162  			if !(oneBit(c)) {
 24163  				break
 24164  			}
 24165  			b.resetWithControl(BlockARM64TBZ, x)
 24166  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 24167  			return true
 24168  		}
 24169  		// match: (EQ (TSTWconst [c] x) yes no)
 24170  		// cond: oneBit(int64(uint32(c)))
 24171  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 24172  		for b.Controls[0].Op == OpARM64TSTWconst {
 24173  			v_0 := b.Controls[0]
 24174  			c := auxIntToInt32(v_0.AuxInt)
 24175  			x := v_0.Args[0]
 24176  			if !(oneBit(int64(uint32(c)))) {
 24177  				break
 24178  			}
 24179  			b.resetWithControl(BlockARM64TBZ, x)
 24180  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 24181  			return true
 24182  		}
 24183  		// match: (EQ (FlagConstant [fc]) yes no)
 24184  		// cond: fc.eq()
 24185  		// result: (First yes no)
 24186  		for b.Controls[0].Op == OpARM64FlagConstant {
 24187  			v_0 := b.Controls[0]
 24188  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24189  			if !(fc.eq()) {
 24190  				break
 24191  			}
 24192  			b.Reset(BlockFirst)
 24193  			return true
 24194  		}
 24195  		// match: (EQ (FlagConstant [fc]) yes no)
 24196  		// cond: !fc.eq()
 24197  		// result: (First no yes)
 24198  		for b.Controls[0].Op == OpARM64FlagConstant {
 24199  			v_0 := b.Controls[0]
 24200  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24201  			if !(!fc.eq()) {
 24202  				break
 24203  			}
 24204  			b.Reset(BlockFirst)
 24205  			b.swapSuccessors()
 24206  			return true
 24207  		}
 24208  		// match: (EQ (InvertFlags cmp) yes no)
 24209  		// result: (EQ cmp yes no)
 24210  		for b.Controls[0].Op == OpARM64InvertFlags {
 24211  			v_0 := b.Controls[0]
 24212  			cmp := v_0.Args[0]
 24213  			b.resetWithControl(BlockARM64EQ, cmp)
 24214  			return true
 24215  		}
 24216  	case BlockARM64FGE:
 24217  		// match: (FGE (InvertFlags cmp) yes no)
 24218  		// result: (FLE cmp yes no)
 24219  		for b.Controls[0].Op == OpARM64InvertFlags {
 24220  			v_0 := b.Controls[0]
 24221  			cmp := v_0.Args[0]
 24222  			b.resetWithControl(BlockARM64FLE, cmp)
 24223  			return true
 24224  		}
 24225  	case BlockARM64FGT:
 24226  		// match: (FGT (InvertFlags cmp) yes no)
 24227  		// result: (FLT cmp yes no)
 24228  		for b.Controls[0].Op == OpARM64InvertFlags {
 24229  			v_0 := b.Controls[0]
 24230  			cmp := v_0.Args[0]
 24231  			b.resetWithControl(BlockARM64FLT, cmp)
 24232  			return true
 24233  		}
 24234  	case BlockARM64FLE:
 24235  		// match: (FLE (InvertFlags cmp) yes no)
 24236  		// result: (FGE cmp yes no)
 24237  		for b.Controls[0].Op == OpARM64InvertFlags {
 24238  			v_0 := b.Controls[0]
 24239  			cmp := v_0.Args[0]
 24240  			b.resetWithControl(BlockARM64FGE, cmp)
 24241  			return true
 24242  		}
 24243  	case BlockARM64FLT:
 24244  		// match: (FLT (InvertFlags cmp) yes no)
 24245  		// result: (FGT cmp yes no)
 24246  		for b.Controls[0].Op == OpARM64InvertFlags {
 24247  			v_0 := b.Controls[0]
 24248  			cmp := v_0.Args[0]
 24249  			b.resetWithControl(BlockARM64FGT, cmp)
 24250  			return true
 24251  		}
 24252  	case BlockARM64GE:
 24253  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 24254  		// cond: z.Uses == 1
 24255  		// result: (GE (TST x y) yes no)
 24256  		for b.Controls[0].Op == OpARM64CMPconst {
 24257  			v_0 := b.Controls[0]
 24258  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24259  				break
 24260  			}
 24261  			z := v_0.Args[0]
 24262  			if z.Op != OpARM64AND {
 24263  				break
 24264  			}
 24265  			_ = z.Args[1]
 24266  			z_0 := z.Args[0]
 24267  			z_1 := z.Args[1]
 24268  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24269  				x := z_0
 24270  				y := z_1
 24271  				if !(z.Uses == 1) {
 24272  					continue
 24273  				}
 24274  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24275  				v0.AddArg2(x, y)
 24276  				b.resetWithControl(BlockARM64GE, v0)
 24277  				return true
 24278  			}
 24279  			break
 24280  		}
 24281  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24282  		// cond: x.Uses == 1
 24283  		// result: (GE (TSTconst [c] y) yes no)
 24284  		for b.Controls[0].Op == OpARM64CMPconst {
 24285  			v_0 := b.Controls[0]
 24286  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24287  				break
 24288  			}
 24289  			x := v_0.Args[0]
 24290  			if x.Op != OpARM64ANDconst {
 24291  				break
 24292  			}
 24293  			c := auxIntToInt64(x.AuxInt)
 24294  			y := x.Args[0]
 24295  			if !(x.Uses == 1) {
 24296  				break
 24297  			}
 24298  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24299  			v0.AuxInt = int64ToAuxInt(c)
 24300  			v0.AddArg(y)
 24301  			b.resetWithControl(BlockARM64GE, v0)
 24302  			return true
 24303  		}
 24304  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 24305  		// cond: z.Uses == 1
 24306  		// result: (GE (TSTW x y) yes no)
 24307  		for b.Controls[0].Op == OpARM64CMPWconst {
 24308  			v_0 := b.Controls[0]
 24309  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24310  				break
 24311  			}
 24312  			z := v_0.Args[0]
 24313  			if z.Op != OpARM64AND {
 24314  				break
 24315  			}
 24316  			_ = z.Args[1]
 24317  			z_0 := z.Args[0]
 24318  			z_1 := z.Args[1]
 24319  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24320  				x := z_0
 24321  				y := z_1
 24322  				if !(z.Uses == 1) {
 24323  					continue
 24324  				}
 24325  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24326  				v0.AddArg2(x, y)
 24327  				b.resetWithControl(BlockARM64GE, v0)
 24328  				return true
 24329  			}
 24330  			break
 24331  		}
 24332  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24333  		// cond: x.Uses == 1
 24334  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 24335  		for b.Controls[0].Op == OpARM64CMPWconst {
 24336  			v_0 := b.Controls[0]
 24337  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24338  				break
 24339  			}
 24340  			x := v_0.Args[0]
 24341  			if x.Op != OpARM64ANDconst {
 24342  				break
 24343  			}
 24344  			c := auxIntToInt64(x.AuxInt)
 24345  			y := x.Args[0]
 24346  			if !(x.Uses == 1) {
 24347  				break
 24348  			}
 24349  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24350  			v0.AuxInt = int32ToAuxInt(int32(c))
 24351  			v0.AddArg(y)
 24352  			b.resetWithControl(BlockARM64GE, v0)
 24353  			return true
 24354  		}
 24355  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24356  		// cond: x.Uses == 1
 24357  		// result: (GEnoov (CMNconst [c] y) yes no)
 24358  		for b.Controls[0].Op == OpARM64CMPconst {
 24359  			v_0 := b.Controls[0]
 24360  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24361  				break
 24362  			}
 24363  			x := v_0.Args[0]
 24364  			if x.Op != OpARM64ADDconst {
 24365  				break
 24366  			}
 24367  			c := auxIntToInt64(x.AuxInt)
 24368  			y := x.Args[0]
 24369  			if !(x.Uses == 1) {
 24370  				break
 24371  			}
 24372  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24373  			v0.AuxInt = int64ToAuxInt(c)
 24374  			v0.AddArg(y)
 24375  			b.resetWithControl(BlockARM64GEnoov, v0)
 24376  			return true
 24377  		}
 24378  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24379  		// cond: x.Uses == 1
 24380  		// result: (GEnoov (CMNWconst [int32(c)] y) yes no)
 24381  		for b.Controls[0].Op == OpARM64CMPWconst {
 24382  			v_0 := b.Controls[0]
 24383  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24384  				break
 24385  			}
 24386  			x := v_0.Args[0]
 24387  			if x.Op != OpARM64ADDconst {
 24388  				break
 24389  			}
 24390  			c := auxIntToInt64(x.AuxInt)
 24391  			y := x.Args[0]
 24392  			if !(x.Uses == 1) {
 24393  				break
 24394  			}
 24395  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24396  			v0.AuxInt = int32ToAuxInt(int32(c))
 24397  			v0.AddArg(y)
 24398  			b.resetWithControl(BlockARM64GEnoov, v0)
 24399  			return true
 24400  		}
 24401  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 24402  		// cond: z.Uses == 1
 24403  		// result: (GEnoov (CMN x y) yes no)
 24404  		for b.Controls[0].Op == OpARM64CMPconst {
 24405  			v_0 := b.Controls[0]
 24406  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24407  				break
 24408  			}
 24409  			z := v_0.Args[0]
 24410  			if z.Op != OpARM64ADD {
 24411  				break
 24412  			}
 24413  			_ = z.Args[1]
 24414  			z_0 := z.Args[0]
 24415  			z_1 := z.Args[1]
 24416  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24417  				x := z_0
 24418  				y := z_1
 24419  				if !(z.Uses == 1) {
 24420  					continue
 24421  				}
 24422  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24423  				v0.AddArg2(x, y)
 24424  				b.resetWithControl(BlockARM64GEnoov, v0)
 24425  				return true
 24426  			}
 24427  			break
 24428  		}
 24429  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 24430  		// cond: z.Uses == 1
 24431  		// result: (GEnoov (CMNW x y) yes no)
 24432  		for b.Controls[0].Op == OpARM64CMPWconst {
 24433  			v_0 := b.Controls[0]
 24434  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24435  				break
 24436  			}
 24437  			z := v_0.Args[0]
 24438  			if z.Op != OpARM64ADD {
 24439  				break
 24440  			}
 24441  			_ = z.Args[1]
 24442  			z_0 := z.Args[0]
 24443  			z_1 := z.Args[1]
 24444  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24445  				x := z_0
 24446  				y := z_1
 24447  				if !(z.Uses == 1) {
 24448  					continue
 24449  				}
 24450  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24451  				v0.AddArg2(x, y)
 24452  				b.resetWithControl(BlockARM64GEnoov, v0)
 24453  				return true
 24454  			}
 24455  			break
 24456  		}
 24457  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 24458  		// cond: z.Uses==1
 24459  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 24460  		for b.Controls[0].Op == OpARM64CMPconst {
 24461  			v_0 := b.Controls[0]
 24462  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24463  				break
 24464  			}
 24465  			z := v_0.Args[0]
 24466  			if z.Op != OpARM64MADD {
 24467  				break
 24468  			}
 24469  			y := z.Args[2]
 24470  			a := z.Args[0]
 24471  			x := z.Args[1]
 24472  			if !(z.Uses == 1) {
 24473  				break
 24474  			}
 24475  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24476  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24477  			v1.AddArg2(x, y)
 24478  			v0.AddArg2(a, v1)
 24479  			b.resetWithControl(BlockARM64GEnoov, v0)
 24480  			return true
 24481  		}
 24482  		// match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
 24483  		// cond: z.Uses==1
 24484  		// result: (GEnoov (CMP a (MUL <x.Type> x y)) yes no)
 24485  		for b.Controls[0].Op == OpARM64CMPconst {
 24486  			v_0 := b.Controls[0]
 24487  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24488  				break
 24489  			}
 24490  			z := v_0.Args[0]
 24491  			if z.Op != OpARM64MSUB {
 24492  				break
 24493  			}
 24494  			y := z.Args[2]
 24495  			a := z.Args[0]
 24496  			x := z.Args[1]
 24497  			if !(z.Uses == 1) {
 24498  				break
 24499  			}
 24500  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24501  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24502  			v1.AddArg2(x, y)
 24503  			v0.AddArg2(a, v1)
 24504  			b.resetWithControl(BlockARM64GEnoov, v0)
 24505  			return true
 24506  		}
 24507  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 24508  		// cond: z.Uses==1
 24509  		// result: (GEnoov (CMNW a (MULW <x.Type> x 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  			z := v_0.Args[0]
 24516  			if z.Op != OpARM64MADDW {
 24517  				break
 24518  			}
 24519  			y := z.Args[2]
 24520  			a := z.Args[0]
 24521  			x := z.Args[1]
 24522  			if !(z.Uses == 1) {
 24523  				break
 24524  			}
 24525  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24526  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24527  			v1.AddArg2(x, y)
 24528  			v0.AddArg2(a, v1)
 24529  			b.resetWithControl(BlockARM64GEnoov, v0)
 24530  			return true
 24531  		}
 24532  		// match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24533  		// cond: z.Uses==1
 24534  		// result: (GEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24535  		for b.Controls[0].Op == OpARM64CMPWconst {
 24536  			v_0 := b.Controls[0]
 24537  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24538  				break
 24539  			}
 24540  			z := v_0.Args[0]
 24541  			if z.Op != OpARM64MSUBW {
 24542  				break
 24543  			}
 24544  			y := z.Args[2]
 24545  			a := z.Args[0]
 24546  			x := z.Args[1]
 24547  			if !(z.Uses == 1) {
 24548  				break
 24549  			}
 24550  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24551  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24552  			v1.AddArg2(x, y)
 24553  			v0.AddArg2(a, v1)
 24554  			b.resetWithControl(BlockARM64GEnoov, v0)
 24555  			return true
 24556  		}
 24557  		// match: (GE (CMPWconst [0] x) yes no)
 24558  		// result: (TBZ [31] x yes no)
 24559  		for b.Controls[0].Op == OpARM64CMPWconst {
 24560  			v_0 := b.Controls[0]
 24561  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24562  				break
 24563  			}
 24564  			x := v_0.Args[0]
 24565  			b.resetWithControl(BlockARM64TBZ, x)
 24566  			b.AuxInt = int64ToAuxInt(31)
 24567  			return true
 24568  		}
 24569  		// match: (GE (CMPconst [0] x) yes no)
 24570  		// result: (TBZ [63] x yes no)
 24571  		for b.Controls[0].Op == OpARM64CMPconst {
 24572  			v_0 := b.Controls[0]
 24573  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24574  				break
 24575  			}
 24576  			x := v_0.Args[0]
 24577  			b.resetWithControl(BlockARM64TBZ, x)
 24578  			b.AuxInt = int64ToAuxInt(63)
 24579  			return true
 24580  		}
 24581  		// match: (GE (FlagConstant [fc]) yes no)
 24582  		// cond: fc.ge()
 24583  		// result: (First yes no)
 24584  		for b.Controls[0].Op == OpARM64FlagConstant {
 24585  			v_0 := b.Controls[0]
 24586  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24587  			if !(fc.ge()) {
 24588  				break
 24589  			}
 24590  			b.Reset(BlockFirst)
 24591  			return true
 24592  		}
 24593  		// match: (GE (FlagConstant [fc]) yes no)
 24594  		// cond: !fc.ge()
 24595  		// result: (First no yes)
 24596  		for b.Controls[0].Op == OpARM64FlagConstant {
 24597  			v_0 := b.Controls[0]
 24598  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24599  			if !(!fc.ge()) {
 24600  				break
 24601  			}
 24602  			b.Reset(BlockFirst)
 24603  			b.swapSuccessors()
 24604  			return true
 24605  		}
 24606  		// match: (GE (InvertFlags cmp) yes no)
 24607  		// result: (LE cmp yes no)
 24608  		for b.Controls[0].Op == OpARM64InvertFlags {
 24609  			v_0 := b.Controls[0]
 24610  			cmp := v_0.Args[0]
 24611  			b.resetWithControl(BlockARM64LE, cmp)
 24612  			return true
 24613  		}
 24614  	case BlockARM64GEnoov:
 24615  		// match: (GEnoov (FlagConstant [fc]) yes no)
 24616  		// cond: fc.geNoov()
 24617  		// result: (First yes no)
 24618  		for b.Controls[0].Op == OpARM64FlagConstant {
 24619  			v_0 := b.Controls[0]
 24620  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24621  			if !(fc.geNoov()) {
 24622  				break
 24623  			}
 24624  			b.Reset(BlockFirst)
 24625  			return true
 24626  		}
 24627  		// match: (GEnoov (FlagConstant [fc]) yes no)
 24628  		// cond: !fc.geNoov()
 24629  		// result: (First no yes)
 24630  		for b.Controls[0].Op == OpARM64FlagConstant {
 24631  			v_0 := b.Controls[0]
 24632  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24633  			if !(!fc.geNoov()) {
 24634  				break
 24635  			}
 24636  			b.Reset(BlockFirst)
 24637  			b.swapSuccessors()
 24638  			return true
 24639  		}
 24640  		// match: (GEnoov (InvertFlags cmp) yes no)
 24641  		// result: (LEnoov cmp yes no)
 24642  		for b.Controls[0].Op == OpARM64InvertFlags {
 24643  			v_0 := b.Controls[0]
 24644  			cmp := v_0.Args[0]
 24645  			b.resetWithControl(BlockARM64LEnoov, cmp)
 24646  			return true
 24647  		}
 24648  	case BlockARM64GT:
 24649  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 24650  		// cond: z.Uses == 1
 24651  		// result: (GT (TST x y) yes no)
 24652  		for b.Controls[0].Op == OpARM64CMPconst {
 24653  			v_0 := b.Controls[0]
 24654  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24655  				break
 24656  			}
 24657  			z := v_0.Args[0]
 24658  			if z.Op != OpARM64AND {
 24659  				break
 24660  			}
 24661  			_ = z.Args[1]
 24662  			z_0 := z.Args[0]
 24663  			z_1 := z.Args[1]
 24664  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24665  				x := z_0
 24666  				y := z_1
 24667  				if !(z.Uses == 1) {
 24668  					continue
 24669  				}
 24670  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24671  				v0.AddArg2(x, y)
 24672  				b.resetWithControl(BlockARM64GT, v0)
 24673  				return true
 24674  			}
 24675  			break
 24676  		}
 24677  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24678  		// cond: x.Uses == 1
 24679  		// result: (GT (TSTconst [c] y) yes no)
 24680  		for b.Controls[0].Op == OpARM64CMPconst {
 24681  			v_0 := b.Controls[0]
 24682  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24683  				break
 24684  			}
 24685  			x := v_0.Args[0]
 24686  			if x.Op != OpARM64ANDconst {
 24687  				break
 24688  			}
 24689  			c := auxIntToInt64(x.AuxInt)
 24690  			y := x.Args[0]
 24691  			if !(x.Uses == 1) {
 24692  				break
 24693  			}
 24694  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24695  			v0.AuxInt = int64ToAuxInt(c)
 24696  			v0.AddArg(y)
 24697  			b.resetWithControl(BlockARM64GT, v0)
 24698  			return true
 24699  		}
 24700  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 24701  		// cond: z.Uses == 1
 24702  		// result: (GT (TSTW x y) yes no)
 24703  		for b.Controls[0].Op == OpARM64CMPWconst {
 24704  			v_0 := b.Controls[0]
 24705  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24706  				break
 24707  			}
 24708  			z := v_0.Args[0]
 24709  			if z.Op != OpARM64AND {
 24710  				break
 24711  			}
 24712  			_ = z.Args[1]
 24713  			z_0 := z.Args[0]
 24714  			z_1 := z.Args[1]
 24715  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24716  				x := z_0
 24717  				y := z_1
 24718  				if !(z.Uses == 1) {
 24719  					continue
 24720  				}
 24721  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24722  				v0.AddArg2(x, y)
 24723  				b.resetWithControl(BlockARM64GT, v0)
 24724  				return true
 24725  			}
 24726  			break
 24727  		}
 24728  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24729  		// cond: x.Uses == 1
 24730  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 24731  		for b.Controls[0].Op == OpARM64CMPWconst {
 24732  			v_0 := b.Controls[0]
 24733  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24734  				break
 24735  			}
 24736  			x := v_0.Args[0]
 24737  			if x.Op != OpARM64ANDconst {
 24738  				break
 24739  			}
 24740  			c := auxIntToInt64(x.AuxInt)
 24741  			y := x.Args[0]
 24742  			if !(x.Uses == 1) {
 24743  				break
 24744  			}
 24745  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24746  			v0.AuxInt = int32ToAuxInt(int32(c))
 24747  			v0.AddArg(y)
 24748  			b.resetWithControl(BlockARM64GT, v0)
 24749  			return true
 24750  		}
 24751  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24752  		// cond: x.Uses == 1
 24753  		// result: (GTnoov (CMNconst [c] y) yes no)
 24754  		for b.Controls[0].Op == OpARM64CMPconst {
 24755  			v_0 := b.Controls[0]
 24756  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24757  				break
 24758  			}
 24759  			x := v_0.Args[0]
 24760  			if x.Op != OpARM64ADDconst {
 24761  				break
 24762  			}
 24763  			c := auxIntToInt64(x.AuxInt)
 24764  			y := x.Args[0]
 24765  			if !(x.Uses == 1) {
 24766  				break
 24767  			}
 24768  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24769  			v0.AuxInt = int64ToAuxInt(c)
 24770  			v0.AddArg(y)
 24771  			b.resetWithControl(BlockARM64GTnoov, v0)
 24772  			return true
 24773  		}
 24774  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24775  		// cond: x.Uses == 1
 24776  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 24777  		for b.Controls[0].Op == OpARM64CMPWconst {
 24778  			v_0 := b.Controls[0]
 24779  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24780  				break
 24781  			}
 24782  			x := v_0.Args[0]
 24783  			if x.Op != OpARM64ADDconst {
 24784  				break
 24785  			}
 24786  			c := auxIntToInt64(x.AuxInt)
 24787  			y := x.Args[0]
 24788  			if !(x.Uses == 1) {
 24789  				break
 24790  			}
 24791  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24792  			v0.AuxInt = int32ToAuxInt(int32(c))
 24793  			v0.AddArg(y)
 24794  			b.resetWithControl(BlockARM64GTnoov, v0)
 24795  			return true
 24796  		}
 24797  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 24798  		// cond: z.Uses == 1
 24799  		// result: (GTnoov (CMN x y) yes no)
 24800  		for b.Controls[0].Op == OpARM64CMPconst {
 24801  			v_0 := b.Controls[0]
 24802  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24803  				break
 24804  			}
 24805  			z := v_0.Args[0]
 24806  			if z.Op != OpARM64ADD {
 24807  				break
 24808  			}
 24809  			_ = z.Args[1]
 24810  			z_0 := z.Args[0]
 24811  			z_1 := z.Args[1]
 24812  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24813  				x := z_0
 24814  				y := z_1
 24815  				if !(z.Uses == 1) {
 24816  					continue
 24817  				}
 24818  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24819  				v0.AddArg2(x, y)
 24820  				b.resetWithControl(BlockARM64GTnoov, v0)
 24821  				return true
 24822  			}
 24823  			break
 24824  		}
 24825  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 24826  		// cond: z.Uses == 1
 24827  		// result: (GTnoov (CMNW x y) yes no)
 24828  		for b.Controls[0].Op == OpARM64CMPWconst {
 24829  			v_0 := b.Controls[0]
 24830  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24831  				break
 24832  			}
 24833  			z := v_0.Args[0]
 24834  			if z.Op != OpARM64ADD {
 24835  				break
 24836  			}
 24837  			_ = z.Args[1]
 24838  			z_0 := z.Args[0]
 24839  			z_1 := z.Args[1]
 24840  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24841  				x := z_0
 24842  				y := z_1
 24843  				if !(z.Uses == 1) {
 24844  					continue
 24845  				}
 24846  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24847  				v0.AddArg2(x, y)
 24848  				b.resetWithControl(BlockARM64GTnoov, v0)
 24849  				return true
 24850  			}
 24851  			break
 24852  		}
 24853  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 24854  		// cond: z.Uses==1
 24855  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 24856  		for b.Controls[0].Op == OpARM64CMPconst {
 24857  			v_0 := b.Controls[0]
 24858  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24859  				break
 24860  			}
 24861  			z := v_0.Args[0]
 24862  			if z.Op != OpARM64MADD {
 24863  				break
 24864  			}
 24865  			y := z.Args[2]
 24866  			a := z.Args[0]
 24867  			x := z.Args[1]
 24868  			if !(z.Uses == 1) {
 24869  				break
 24870  			}
 24871  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24872  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24873  			v1.AddArg2(x, y)
 24874  			v0.AddArg2(a, v1)
 24875  			b.resetWithControl(BlockARM64GTnoov, v0)
 24876  			return true
 24877  		}
 24878  		// match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
 24879  		// cond: z.Uses==1
 24880  		// result: (GTnoov (CMP a (MUL <x.Type> x y)) yes no)
 24881  		for b.Controls[0].Op == OpARM64CMPconst {
 24882  			v_0 := b.Controls[0]
 24883  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24884  				break
 24885  			}
 24886  			z := v_0.Args[0]
 24887  			if z.Op != OpARM64MSUB {
 24888  				break
 24889  			}
 24890  			y := z.Args[2]
 24891  			a := z.Args[0]
 24892  			x := z.Args[1]
 24893  			if !(z.Uses == 1) {
 24894  				break
 24895  			}
 24896  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24897  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24898  			v1.AddArg2(x, y)
 24899  			v0.AddArg2(a, v1)
 24900  			b.resetWithControl(BlockARM64GTnoov, v0)
 24901  			return true
 24902  		}
 24903  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 24904  		// cond: z.Uses==1
 24905  		// result: (GTnoov (CMNW a (MULW <x.Type> x 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  			z := v_0.Args[0]
 24912  			if z.Op != OpARM64MADDW {
 24913  				break
 24914  			}
 24915  			y := z.Args[2]
 24916  			a := z.Args[0]
 24917  			x := z.Args[1]
 24918  			if !(z.Uses == 1) {
 24919  				break
 24920  			}
 24921  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24922  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24923  			v1.AddArg2(x, y)
 24924  			v0.AddArg2(a, v1)
 24925  			b.resetWithControl(BlockARM64GTnoov, v0)
 24926  			return true
 24927  		}
 24928  		// match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24929  		// cond: z.Uses==1
 24930  		// result: (GTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24931  		for b.Controls[0].Op == OpARM64CMPWconst {
 24932  			v_0 := b.Controls[0]
 24933  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24934  				break
 24935  			}
 24936  			z := v_0.Args[0]
 24937  			if z.Op != OpARM64MSUBW {
 24938  				break
 24939  			}
 24940  			y := z.Args[2]
 24941  			a := z.Args[0]
 24942  			x := z.Args[1]
 24943  			if !(z.Uses == 1) {
 24944  				break
 24945  			}
 24946  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24947  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24948  			v1.AddArg2(x, y)
 24949  			v0.AddArg2(a, v1)
 24950  			b.resetWithControl(BlockARM64GTnoov, v0)
 24951  			return true
 24952  		}
 24953  		// match: (GT (FlagConstant [fc]) yes no)
 24954  		// cond: fc.gt()
 24955  		// result: (First yes no)
 24956  		for b.Controls[0].Op == OpARM64FlagConstant {
 24957  			v_0 := b.Controls[0]
 24958  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24959  			if !(fc.gt()) {
 24960  				break
 24961  			}
 24962  			b.Reset(BlockFirst)
 24963  			return true
 24964  		}
 24965  		// match: (GT (FlagConstant [fc]) yes no)
 24966  		// cond: !fc.gt()
 24967  		// result: (First no yes)
 24968  		for b.Controls[0].Op == OpARM64FlagConstant {
 24969  			v_0 := b.Controls[0]
 24970  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24971  			if !(!fc.gt()) {
 24972  				break
 24973  			}
 24974  			b.Reset(BlockFirst)
 24975  			b.swapSuccessors()
 24976  			return true
 24977  		}
 24978  		// match: (GT (InvertFlags cmp) yes no)
 24979  		// result: (LT cmp yes no)
 24980  		for b.Controls[0].Op == OpARM64InvertFlags {
 24981  			v_0 := b.Controls[0]
 24982  			cmp := v_0.Args[0]
 24983  			b.resetWithControl(BlockARM64LT, cmp)
 24984  			return true
 24985  		}
 24986  	case BlockARM64GTnoov:
 24987  		// match: (GTnoov (FlagConstant [fc]) yes no)
 24988  		// cond: fc.gtNoov()
 24989  		// result: (First yes no)
 24990  		for b.Controls[0].Op == OpARM64FlagConstant {
 24991  			v_0 := b.Controls[0]
 24992  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24993  			if !(fc.gtNoov()) {
 24994  				break
 24995  			}
 24996  			b.Reset(BlockFirst)
 24997  			return true
 24998  		}
 24999  		// match: (GTnoov (FlagConstant [fc]) yes no)
 25000  		// cond: !fc.gtNoov()
 25001  		// result: (First no yes)
 25002  		for b.Controls[0].Op == OpARM64FlagConstant {
 25003  			v_0 := b.Controls[0]
 25004  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25005  			if !(!fc.gtNoov()) {
 25006  				break
 25007  			}
 25008  			b.Reset(BlockFirst)
 25009  			b.swapSuccessors()
 25010  			return true
 25011  		}
 25012  		// match: (GTnoov (InvertFlags cmp) yes no)
 25013  		// result: (LTnoov cmp yes no)
 25014  		for b.Controls[0].Op == OpARM64InvertFlags {
 25015  			v_0 := b.Controls[0]
 25016  			cmp := v_0.Args[0]
 25017  			b.resetWithControl(BlockARM64LTnoov, cmp)
 25018  			return true
 25019  		}
 25020  	case BlockIf:
 25021  		// match: (If (Equal cc) yes no)
 25022  		// result: (EQ cc yes no)
 25023  		for b.Controls[0].Op == OpARM64Equal {
 25024  			v_0 := b.Controls[0]
 25025  			cc := v_0.Args[0]
 25026  			b.resetWithControl(BlockARM64EQ, cc)
 25027  			return true
 25028  		}
 25029  		// match: (If (NotEqual cc) yes no)
 25030  		// result: (NE cc yes no)
 25031  		for b.Controls[0].Op == OpARM64NotEqual {
 25032  			v_0 := b.Controls[0]
 25033  			cc := v_0.Args[0]
 25034  			b.resetWithControl(BlockARM64NE, cc)
 25035  			return true
 25036  		}
 25037  		// match: (If (LessThan cc) yes no)
 25038  		// result: (LT cc yes no)
 25039  		for b.Controls[0].Op == OpARM64LessThan {
 25040  			v_0 := b.Controls[0]
 25041  			cc := v_0.Args[0]
 25042  			b.resetWithControl(BlockARM64LT, cc)
 25043  			return true
 25044  		}
 25045  		// match: (If (LessThanU cc) yes no)
 25046  		// result: (ULT cc yes no)
 25047  		for b.Controls[0].Op == OpARM64LessThanU {
 25048  			v_0 := b.Controls[0]
 25049  			cc := v_0.Args[0]
 25050  			b.resetWithControl(BlockARM64ULT, cc)
 25051  			return true
 25052  		}
 25053  		// match: (If (LessEqual cc) yes no)
 25054  		// result: (LE cc yes no)
 25055  		for b.Controls[0].Op == OpARM64LessEqual {
 25056  			v_0 := b.Controls[0]
 25057  			cc := v_0.Args[0]
 25058  			b.resetWithControl(BlockARM64LE, cc)
 25059  			return true
 25060  		}
 25061  		// match: (If (LessEqualU cc) yes no)
 25062  		// result: (ULE cc yes no)
 25063  		for b.Controls[0].Op == OpARM64LessEqualU {
 25064  			v_0 := b.Controls[0]
 25065  			cc := v_0.Args[0]
 25066  			b.resetWithControl(BlockARM64ULE, cc)
 25067  			return true
 25068  		}
 25069  		// match: (If (GreaterThan cc) yes no)
 25070  		// result: (GT cc yes no)
 25071  		for b.Controls[0].Op == OpARM64GreaterThan {
 25072  			v_0 := b.Controls[0]
 25073  			cc := v_0.Args[0]
 25074  			b.resetWithControl(BlockARM64GT, cc)
 25075  			return true
 25076  		}
 25077  		// match: (If (GreaterThanU cc) yes no)
 25078  		// result: (UGT cc yes no)
 25079  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25080  			v_0 := b.Controls[0]
 25081  			cc := v_0.Args[0]
 25082  			b.resetWithControl(BlockARM64UGT, cc)
 25083  			return true
 25084  		}
 25085  		// match: (If (GreaterEqual cc) yes no)
 25086  		// result: (GE cc yes no)
 25087  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25088  			v_0 := b.Controls[0]
 25089  			cc := v_0.Args[0]
 25090  			b.resetWithControl(BlockARM64GE, cc)
 25091  			return true
 25092  		}
 25093  		// match: (If (GreaterEqualU cc) yes no)
 25094  		// result: (UGE cc yes no)
 25095  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25096  			v_0 := b.Controls[0]
 25097  			cc := v_0.Args[0]
 25098  			b.resetWithControl(BlockARM64UGE, cc)
 25099  			return true
 25100  		}
 25101  		// match: (If (LessThanF cc) yes no)
 25102  		// result: (FLT cc yes no)
 25103  		for b.Controls[0].Op == OpARM64LessThanF {
 25104  			v_0 := b.Controls[0]
 25105  			cc := v_0.Args[0]
 25106  			b.resetWithControl(BlockARM64FLT, cc)
 25107  			return true
 25108  		}
 25109  		// match: (If (LessEqualF cc) yes no)
 25110  		// result: (FLE cc yes no)
 25111  		for b.Controls[0].Op == OpARM64LessEqualF {
 25112  			v_0 := b.Controls[0]
 25113  			cc := v_0.Args[0]
 25114  			b.resetWithControl(BlockARM64FLE, cc)
 25115  			return true
 25116  		}
 25117  		// match: (If (GreaterThanF cc) yes no)
 25118  		// result: (FGT cc yes no)
 25119  		for b.Controls[0].Op == OpARM64GreaterThanF {
 25120  			v_0 := b.Controls[0]
 25121  			cc := v_0.Args[0]
 25122  			b.resetWithControl(BlockARM64FGT, cc)
 25123  			return true
 25124  		}
 25125  		// match: (If (GreaterEqualF cc) yes no)
 25126  		// result: (FGE cc yes no)
 25127  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25128  			v_0 := b.Controls[0]
 25129  			cc := v_0.Args[0]
 25130  			b.resetWithControl(BlockARM64FGE, cc)
 25131  			return true
 25132  		}
 25133  		// match: (If cond yes no)
 25134  		// result: (TBNZ [0] cond yes no)
 25135  		for {
 25136  			cond := b.Controls[0]
 25137  			b.resetWithControl(BlockARM64TBNZ, cond)
 25138  			b.AuxInt = int64ToAuxInt(0)
 25139  			return true
 25140  		}
 25141  	case BlockJumpTable:
 25142  		// match: (JumpTable idx)
 25143  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 25144  		for {
 25145  			idx := b.Controls[0]
 25146  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 25147  			v0.Aux = symToAux(makeJumpTableSym(b))
 25148  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 25149  			v0.AddArg(v1)
 25150  			b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
 25151  			b.Aux = symToAux(makeJumpTableSym(b))
 25152  			return true
 25153  		}
 25154  	case BlockARM64LE:
 25155  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 25156  		// cond: z.Uses == 1
 25157  		// result: (LE (TST x y) yes no)
 25158  		for b.Controls[0].Op == OpARM64CMPconst {
 25159  			v_0 := b.Controls[0]
 25160  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25161  				break
 25162  			}
 25163  			z := v_0.Args[0]
 25164  			if z.Op != OpARM64AND {
 25165  				break
 25166  			}
 25167  			_ = z.Args[1]
 25168  			z_0 := z.Args[0]
 25169  			z_1 := z.Args[1]
 25170  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25171  				x := z_0
 25172  				y := z_1
 25173  				if !(z.Uses == 1) {
 25174  					continue
 25175  				}
 25176  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25177  				v0.AddArg2(x, y)
 25178  				b.resetWithControl(BlockARM64LE, v0)
 25179  				return true
 25180  			}
 25181  			break
 25182  		}
 25183  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25184  		// cond: x.Uses == 1
 25185  		// result: (LE (TSTconst [c] y) yes no)
 25186  		for b.Controls[0].Op == OpARM64CMPconst {
 25187  			v_0 := b.Controls[0]
 25188  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25189  				break
 25190  			}
 25191  			x := v_0.Args[0]
 25192  			if x.Op != OpARM64ANDconst {
 25193  				break
 25194  			}
 25195  			c := auxIntToInt64(x.AuxInt)
 25196  			y := x.Args[0]
 25197  			if !(x.Uses == 1) {
 25198  				break
 25199  			}
 25200  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25201  			v0.AuxInt = int64ToAuxInt(c)
 25202  			v0.AddArg(y)
 25203  			b.resetWithControl(BlockARM64LE, v0)
 25204  			return true
 25205  		}
 25206  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 25207  		// cond: z.Uses == 1
 25208  		// result: (LE (TSTW x y) yes no)
 25209  		for b.Controls[0].Op == OpARM64CMPWconst {
 25210  			v_0 := b.Controls[0]
 25211  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25212  				break
 25213  			}
 25214  			z := v_0.Args[0]
 25215  			if z.Op != OpARM64AND {
 25216  				break
 25217  			}
 25218  			_ = z.Args[1]
 25219  			z_0 := z.Args[0]
 25220  			z_1 := z.Args[1]
 25221  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25222  				x := z_0
 25223  				y := z_1
 25224  				if !(z.Uses == 1) {
 25225  					continue
 25226  				}
 25227  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25228  				v0.AddArg2(x, y)
 25229  				b.resetWithControl(BlockARM64LE, v0)
 25230  				return true
 25231  			}
 25232  			break
 25233  		}
 25234  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25235  		// cond: x.Uses == 1
 25236  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 25237  		for b.Controls[0].Op == OpARM64CMPWconst {
 25238  			v_0 := b.Controls[0]
 25239  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25240  				break
 25241  			}
 25242  			x := v_0.Args[0]
 25243  			if x.Op != OpARM64ANDconst {
 25244  				break
 25245  			}
 25246  			c := auxIntToInt64(x.AuxInt)
 25247  			y := x.Args[0]
 25248  			if !(x.Uses == 1) {
 25249  				break
 25250  			}
 25251  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25252  			v0.AuxInt = int32ToAuxInt(int32(c))
 25253  			v0.AddArg(y)
 25254  			b.resetWithControl(BlockARM64LE, v0)
 25255  			return true
 25256  		}
 25257  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25258  		// cond: x.Uses == 1
 25259  		// result: (LEnoov (CMNconst [c] y) yes no)
 25260  		for b.Controls[0].Op == OpARM64CMPconst {
 25261  			v_0 := b.Controls[0]
 25262  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25263  				break
 25264  			}
 25265  			x := v_0.Args[0]
 25266  			if x.Op != OpARM64ADDconst {
 25267  				break
 25268  			}
 25269  			c := auxIntToInt64(x.AuxInt)
 25270  			y := x.Args[0]
 25271  			if !(x.Uses == 1) {
 25272  				break
 25273  			}
 25274  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25275  			v0.AuxInt = int64ToAuxInt(c)
 25276  			v0.AddArg(y)
 25277  			b.resetWithControl(BlockARM64LEnoov, v0)
 25278  			return true
 25279  		}
 25280  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25281  		// cond: x.Uses == 1
 25282  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 25283  		for b.Controls[0].Op == OpARM64CMPWconst {
 25284  			v_0 := b.Controls[0]
 25285  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25286  				break
 25287  			}
 25288  			x := v_0.Args[0]
 25289  			if x.Op != OpARM64ADDconst {
 25290  				break
 25291  			}
 25292  			c := auxIntToInt64(x.AuxInt)
 25293  			y := x.Args[0]
 25294  			if !(x.Uses == 1) {
 25295  				break
 25296  			}
 25297  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25298  			v0.AuxInt = int32ToAuxInt(int32(c))
 25299  			v0.AddArg(y)
 25300  			b.resetWithControl(BlockARM64LEnoov, v0)
 25301  			return true
 25302  		}
 25303  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 25304  		// cond: z.Uses == 1
 25305  		// result: (LEnoov (CMN x y) yes no)
 25306  		for b.Controls[0].Op == OpARM64CMPconst {
 25307  			v_0 := b.Controls[0]
 25308  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25309  				break
 25310  			}
 25311  			z := v_0.Args[0]
 25312  			if z.Op != OpARM64ADD {
 25313  				break
 25314  			}
 25315  			_ = z.Args[1]
 25316  			z_0 := z.Args[0]
 25317  			z_1 := z.Args[1]
 25318  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25319  				x := z_0
 25320  				y := z_1
 25321  				if !(z.Uses == 1) {
 25322  					continue
 25323  				}
 25324  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25325  				v0.AddArg2(x, y)
 25326  				b.resetWithControl(BlockARM64LEnoov, v0)
 25327  				return true
 25328  			}
 25329  			break
 25330  		}
 25331  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 25332  		// cond: z.Uses == 1
 25333  		// result: (LEnoov (CMNW x y) yes no)
 25334  		for b.Controls[0].Op == OpARM64CMPWconst {
 25335  			v_0 := b.Controls[0]
 25336  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25337  				break
 25338  			}
 25339  			z := v_0.Args[0]
 25340  			if z.Op != OpARM64ADD {
 25341  				break
 25342  			}
 25343  			_ = z.Args[1]
 25344  			z_0 := z.Args[0]
 25345  			z_1 := z.Args[1]
 25346  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25347  				x := z_0
 25348  				y := z_1
 25349  				if !(z.Uses == 1) {
 25350  					continue
 25351  				}
 25352  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25353  				v0.AddArg2(x, y)
 25354  				b.resetWithControl(BlockARM64LEnoov, v0)
 25355  				return true
 25356  			}
 25357  			break
 25358  		}
 25359  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 25360  		// cond: z.Uses==1
 25361  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 25362  		for b.Controls[0].Op == OpARM64CMPconst {
 25363  			v_0 := b.Controls[0]
 25364  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25365  				break
 25366  			}
 25367  			z := v_0.Args[0]
 25368  			if z.Op != OpARM64MADD {
 25369  				break
 25370  			}
 25371  			y := z.Args[2]
 25372  			a := z.Args[0]
 25373  			x := z.Args[1]
 25374  			if !(z.Uses == 1) {
 25375  				break
 25376  			}
 25377  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25378  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25379  			v1.AddArg2(x, y)
 25380  			v0.AddArg2(a, v1)
 25381  			b.resetWithControl(BlockARM64LEnoov, v0)
 25382  			return true
 25383  		}
 25384  		// match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
 25385  		// cond: z.Uses==1
 25386  		// result: (LEnoov (CMP a (MUL <x.Type> x y)) yes no)
 25387  		for b.Controls[0].Op == OpARM64CMPconst {
 25388  			v_0 := b.Controls[0]
 25389  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25390  				break
 25391  			}
 25392  			z := v_0.Args[0]
 25393  			if z.Op != OpARM64MSUB {
 25394  				break
 25395  			}
 25396  			y := z.Args[2]
 25397  			a := z.Args[0]
 25398  			x := z.Args[1]
 25399  			if !(z.Uses == 1) {
 25400  				break
 25401  			}
 25402  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 25403  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25404  			v1.AddArg2(x, y)
 25405  			v0.AddArg2(a, v1)
 25406  			b.resetWithControl(BlockARM64LEnoov, v0)
 25407  			return true
 25408  		}
 25409  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 25410  		// cond: z.Uses==1
 25411  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25412  		for b.Controls[0].Op == OpARM64CMPWconst {
 25413  			v_0 := b.Controls[0]
 25414  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25415  				break
 25416  			}
 25417  			z := v_0.Args[0]
 25418  			if z.Op != OpARM64MADDW {
 25419  				break
 25420  			}
 25421  			y := z.Args[2]
 25422  			a := z.Args[0]
 25423  			x := z.Args[1]
 25424  			if !(z.Uses == 1) {
 25425  				break
 25426  			}
 25427  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25428  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25429  			v1.AddArg2(x, y)
 25430  			v0.AddArg2(a, v1)
 25431  			b.resetWithControl(BlockARM64LEnoov, v0)
 25432  			return true
 25433  		}
 25434  		// match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 25435  		// cond: z.Uses==1
 25436  		// result: (LEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 25437  		for b.Controls[0].Op == OpARM64CMPWconst {
 25438  			v_0 := b.Controls[0]
 25439  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25440  				break
 25441  			}
 25442  			z := v_0.Args[0]
 25443  			if z.Op != OpARM64MSUBW {
 25444  				break
 25445  			}
 25446  			y := z.Args[2]
 25447  			a := z.Args[0]
 25448  			x := z.Args[1]
 25449  			if !(z.Uses == 1) {
 25450  				break
 25451  			}
 25452  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 25453  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25454  			v1.AddArg2(x, y)
 25455  			v0.AddArg2(a, v1)
 25456  			b.resetWithControl(BlockARM64LEnoov, v0)
 25457  			return true
 25458  		}
 25459  		// match: (LE (FlagConstant [fc]) yes no)
 25460  		// cond: fc.le()
 25461  		// result: (First yes no)
 25462  		for b.Controls[0].Op == OpARM64FlagConstant {
 25463  			v_0 := b.Controls[0]
 25464  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25465  			if !(fc.le()) {
 25466  				break
 25467  			}
 25468  			b.Reset(BlockFirst)
 25469  			return true
 25470  		}
 25471  		// match: (LE (FlagConstant [fc]) yes no)
 25472  		// cond: !fc.le()
 25473  		// result: (First no yes)
 25474  		for b.Controls[0].Op == OpARM64FlagConstant {
 25475  			v_0 := b.Controls[0]
 25476  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25477  			if !(!fc.le()) {
 25478  				break
 25479  			}
 25480  			b.Reset(BlockFirst)
 25481  			b.swapSuccessors()
 25482  			return true
 25483  		}
 25484  		// match: (LE (InvertFlags cmp) yes no)
 25485  		// result: (GE cmp yes no)
 25486  		for b.Controls[0].Op == OpARM64InvertFlags {
 25487  			v_0 := b.Controls[0]
 25488  			cmp := v_0.Args[0]
 25489  			b.resetWithControl(BlockARM64GE, cmp)
 25490  			return true
 25491  		}
 25492  	case BlockARM64LEnoov:
 25493  		// match: (LEnoov (FlagConstant [fc]) yes no)
 25494  		// cond: fc.leNoov()
 25495  		// result: (First yes no)
 25496  		for b.Controls[0].Op == OpARM64FlagConstant {
 25497  			v_0 := b.Controls[0]
 25498  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25499  			if !(fc.leNoov()) {
 25500  				break
 25501  			}
 25502  			b.Reset(BlockFirst)
 25503  			return true
 25504  		}
 25505  		// match: (LEnoov (FlagConstant [fc]) yes no)
 25506  		// cond: !fc.leNoov()
 25507  		// result: (First no yes)
 25508  		for b.Controls[0].Op == OpARM64FlagConstant {
 25509  			v_0 := b.Controls[0]
 25510  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25511  			if !(!fc.leNoov()) {
 25512  				break
 25513  			}
 25514  			b.Reset(BlockFirst)
 25515  			b.swapSuccessors()
 25516  			return true
 25517  		}
 25518  		// match: (LEnoov (InvertFlags cmp) yes no)
 25519  		// result: (GEnoov cmp yes no)
 25520  		for b.Controls[0].Op == OpARM64InvertFlags {
 25521  			v_0 := b.Controls[0]
 25522  			cmp := v_0.Args[0]
 25523  			b.resetWithControl(BlockARM64GEnoov, cmp)
 25524  			return true
 25525  		}
 25526  	case BlockARM64LT:
 25527  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 25528  		// cond: z.Uses == 1
 25529  		// result: (LT (TST x y) yes no)
 25530  		for b.Controls[0].Op == OpARM64CMPconst {
 25531  			v_0 := b.Controls[0]
 25532  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25533  				break
 25534  			}
 25535  			z := v_0.Args[0]
 25536  			if z.Op != OpARM64AND {
 25537  				break
 25538  			}
 25539  			_ = z.Args[1]
 25540  			z_0 := z.Args[0]
 25541  			z_1 := z.Args[1]
 25542  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25543  				x := z_0
 25544  				y := z_1
 25545  				if !(z.Uses == 1) {
 25546  					continue
 25547  				}
 25548  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25549  				v0.AddArg2(x, y)
 25550  				b.resetWithControl(BlockARM64LT, v0)
 25551  				return true
 25552  			}
 25553  			break
 25554  		}
 25555  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25556  		// cond: x.Uses == 1
 25557  		// result: (LT (TSTconst [c] y) yes no)
 25558  		for b.Controls[0].Op == OpARM64CMPconst {
 25559  			v_0 := b.Controls[0]
 25560  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25561  				break
 25562  			}
 25563  			x := v_0.Args[0]
 25564  			if x.Op != OpARM64ANDconst {
 25565  				break
 25566  			}
 25567  			c := auxIntToInt64(x.AuxInt)
 25568  			y := x.Args[0]
 25569  			if !(x.Uses == 1) {
 25570  				break
 25571  			}
 25572  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25573  			v0.AuxInt = int64ToAuxInt(c)
 25574  			v0.AddArg(y)
 25575  			b.resetWithControl(BlockARM64LT, v0)
 25576  			return true
 25577  		}
 25578  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 25579  		// cond: z.Uses == 1
 25580  		// result: (LT (TSTW x y) yes no)
 25581  		for b.Controls[0].Op == OpARM64CMPWconst {
 25582  			v_0 := b.Controls[0]
 25583  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25584  				break
 25585  			}
 25586  			z := v_0.Args[0]
 25587  			if z.Op != OpARM64AND {
 25588  				break
 25589  			}
 25590  			_ = z.Args[1]
 25591  			z_0 := z.Args[0]
 25592  			z_1 := z.Args[1]
 25593  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25594  				x := z_0
 25595  				y := z_1
 25596  				if !(z.Uses == 1) {
 25597  					continue
 25598  				}
 25599  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25600  				v0.AddArg2(x, y)
 25601  				b.resetWithControl(BlockARM64LT, v0)
 25602  				return true
 25603  			}
 25604  			break
 25605  		}
 25606  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 25607  		// cond: x.Uses == 1
 25608  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 25609  		for b.Controls[0].Op == OpARM64CMPWconst {
 25610  			v_0 := b.Controls[0]
 25611  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25612  				break
 25613  			}
 25614  			x := v_0.Args[0]
 25615  			if x.Op != OpARM64ANDconst {
 25616  				break
 25617  			}
 25618  			c := auxIntToInt64(x.AuxInt)
 25619  			y := x.Args[0]
 25620  			if !(x.Uses == 1) {
 25621  				break
 25622  			}
 25623  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 25624  			v0.AuxInt = int32ToAuxInt(int32(c))
 25625  			v0.AddArg(y)
 25626  			b.resetWithControl(BlockARM64LT, v0)
 25627  			return true
 25628  		}
 25629  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 25630  		// cond: x.Uses == 1
 25631  		// result: (LTnoov (CMNconst [c] y) yes no)
 25632  		for b.Controls[0].Op == OpARM64CMPconst {
 25633  			v_0 := b.Controls[0]
 25634  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25635  				break
 25636  			}
 25637  			x := v_0.Args[0]
 25638  			if x.Op != OpARM64ADDconst {
 25639  				break
 25640  			}
 25641  			c := auxIntToInt64(x.AuxInt)
 25642  			y := x.Args[0]
 25643  			if !(x.Uses == 1) {
 25644  				break
 25645  			}
 25646  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 25647  			v0.AuxInt = int64ToAuxInt(c)
 25648  			v0.AddArg(y)
 25649  			b.resetWithControl(BlockARM64LTnoov, v0)
 25650  			return true
 25651  		}
 25652  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 25653  		// cond: x.Uses == 1
 25654  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 25655  		for b.Controls[0].Op == OpARM64CMPWconst {
 25656  			v_0 := b.Controls[0]
 25657  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25658  				break
 25659  			}
 25660  			x := v_0.Args[0]
 25661  			if x.Op != OpARM64ADDconst {
 25662  				break
 25663  			}
 25664  			c := auxIntToInt64(x.AuxInt)
 25665  			y := x.Args[0]
 25666  			if !(x.Uses == 1) {
 25667  				break
 25668  			}
 25669  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 25670  			v0.AuxInt = int32ToAuxInt(int32(c))
 25671  			v0.AddArg(y)
 25672  			b.resetWithControl(BlockARM64LTnoov, v0)
 25673  			return true
 25674  		}
 25675  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 25676  		// cond: z.Uses == 1
 25677  		// result: (LTnoov (CMN x y) yes no)
 25678  		for b.Controls[0].Op == OpARM64CMPconst {
 25679  			v_0 := b.Controls[0]
 25680  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25681  				break
 25682  			}
 25683  			z := v_0.Args[0]
 25684  			if z.Op != OpARM64ADD {
 25685  				break
 25686  			}
 25687  			_ = z.Args[1]
 25688  			z_0 := z.Args[0]
 25689  			z_1 := z.Args[1]
 25690  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25691  				x := z_0
 25692  				y := z_1
 25693  				if !(z.Uses == 1) {
 25694  					continue
 25695  				}
 25696  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25697  				v0.AddArg2(x, y)
 25698  				b.resetWithControl(BlockARM64LTnoov, v0)
 25699  				return true
 25700  			}
 25701  			break
 25702  		}
 25703  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 25704  		// cond: z.Uses == 1
 25705  		// result: (LTnoov (CMNW x y) yes no)
 25706  		for b.Controls[0].Op == OpARM64CMPWconst {
 25707  			v_0 := b.Controls[0]
 25708  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25709  				break
 25710  			}
 25711  			z := v_0.Args[0]
 25712  			if z.Op != OpARM64ADD {
 25713  				break
 25714  			}
 25715  			_ = z.Args[1]
 25716  			z_0 := z.Args[0]
 25717  			z_1 := z.Args[1]
 25718  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25719  				x := z_0
 25720  				y := z_1
 25721  				if !(z.Uses == 1) {
 25722  					continue
 25723  				}
 25724  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25725  				v0.AddArg2(x, y)
 25726  				b.resetWithControl(BlockARM64LTnoov, v0)
 25727  				return true
 25728  			}
 25729  			break
 25730  		}
 25731  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 25732  		// cond: z.Uses==1
 25733  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 25734  		for b.Controls[0].Op == OpARM64CMPconst {
 25735  			v_0 := b.Controls[0]
 25736  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25737  				break
 25738  			}
 25739  			z := v_0.Args[0]
 25740  			if z.Op != OpARM64MADD {
 25741  				break
 25742  			}
 25743  			y := z.Args[2]
 25744  			a := z.Args[0]
 25745  			x := z.Args[1]
 25746  			if !(z.Uses == 1) {
 25747  				break
 25748  			}
 25749  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 25750  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25751  			v1.AddArg2(x, y)
 25752  			v0.AddArg2(a, v1)
 25753  			b.resetWithControl(BlockARM64LTnoov, v0)
 25754  			return true
 25755  		}
 25756  		// match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
 25757  		// cond: z.Uses==1
 25758  		// result: (LTnoov (CMP a (MUL <x.Type> x y)) yes no)
 25759  		for b.Controls[0].Op == OpARM64CMPconst {
 25760  			v_0 := b.Controls[0]
 25761  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25762  				break
 25763  			}
 25764  			z := v_0.Args[0]
 25765  			if z.Op != OpARM64MSUB {
 25766  				break
 25767  			}
 25768  			y := z.Args[2]
 25769  			a := z.Args[0]
 25770  			x := z.Args[1]
 25771  			if !(z.Uses == 1) {
 25772  				break
 25773  			}
 25774  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 25775  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 25776  			v1.AddArg2(x, y)
 25777  			v0.AddArg2(a, v1)
 25778  			b.resetWithControl(BlockARM64LTnoov, v0)
 25779  			return true
 25780  		}
 25781  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 25782  		// cond: z.Uses==1
 25783  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 25784  		for b.Controls[0].Op == OpARM64CMPWconst {
 25785  			v_0 := b.Controls[0]
 25786  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25787  				break
 25788  			}
 25789  			z := v_0.Args[0]
 25790  			if z.Op != OpARM64MADDW {
 25791  				break
 25792  			}
 25793  			y := z.Args[2]
 25794  			a := z.Args[0]
 25795  			x := z.Args[1]
 25796  			if !(z.Uses == 1) {
 25797  				break
 25798  			}
 25799  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 25800  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25801  			v1.AddArg2(x, y)
 25802  			v0.AddArg2(a, v1)
 25803  			b.resetWithControl(BlockARM64LTnoov, v0)
 25804  			return true
 25805  		}
 25806  		// match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 25807  		// cond: z.Uses==1
 25808  		// result: (LTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 25809  		for b.Controls[0].Op == OpARM64CMPWconst {
 25810  			v_0 := b.Controls[0]
 25811  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25812  				break
 25813  			}
 25814  			z := v_0.Args[0]
 25815  			if z.Op != OpARM64MSUBW {
 25816  				break
 25817  			}
 25818  			y := z.Args[2]
 25819  			a := z.Args[0]
 25820  			x := z.Args[1]
 25821  			if !(z.Uses == 1) {
 25822  				break
 25823  			}
 25824  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 25825  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 25826  			v1.AddArg2(x, y)
 25827  			v0.AddArg2(a, v1)
 25828  			b.resetWithControl(BlockARM64LTnoov, v0)
 25829  			return true
 25830  		}
 25831  		// match: (LT (CMPWconst [0] x) yes no)
 25832  		// result: (TBNZ [31] x yes no)
 25833  		for b.Controls[0].Op == OpARM64CMPWconst {
 25834  			v_0 := b.Controls[0]
 25835  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25836  				break
 25837  			}
 25838  			x := v_0.Args[0]
 25839  			b.resetWithControl(BlockARM64TBNZ, x)
 25840  			b.AuxInt = int64ToAuxInt(31)
 25841  			return true
 25842  		}
 25843  		// match: (LT (CMPconst [0] x) yes no)
 25844  		// result: (TBNZ [63] x yes no)
 25845  		for b.Controls[0].Op == OpARM64CMPconst {
 25846  			v_0 := b.Controls[0]
 25847  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25848  				break
 25849  			}
 25850  			x := v_0.Args[0]
 25851  			b.resetWithControl(BlockARM64TBNZ, x)
 25852  			b.AuxInt = int64ToAuxInt(63)
 25853  			return true
 25854  		}
 25855  		// match: (LT (FlagConstant [fc]) yes no)
 25856  		// cond: fc.lt()
 25857  		// result: (First yes no)
 25858  		for b.Controls[0].Op == OpARM64FlagConstant {
 25859  			v_0 := b.Controls[0]
 25860  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25861  			if !(fc.lt()) {
 25862  				break
 25863  			}
 25864  			b.Reset(BlockFirst)
 25865  			return true
 25866  		}
 25867  		// match: (LT (FlagConstant [fc]) yes no)
 25868  		// cond: !fc.lt()
 25869  		// result: (First no yes)
 25870  		for b.Controls[0].Op == OpARM64FlagConstant {
 25871  			v_0 := b.Controls[0]
 25872  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25873  			if !(!fc.lt()) {
 25874  				break
 25875  			}
 25876  			b.Reset(BlockFirst)
 25877  			b.swapSuccessors()
 25878  			return true
 25879  		}
 25880  		// match: (LT (InvertFlags cmp) yes no)
 25881  		// result: (GT cmp yes no)
 25882  		for b.Controls[0].Op == OpARM64InvertFlags {
 25883  			v_0 := b.Controls[0]
 25884  			cmp := v_0.Args[0]
 25885  			b.resetWithControl(BlockARM64GT, cmp)
 25886  			return true
 25887  		}
 25888  	case BlockARM64LTnoov:
 25889  		// match: (LTnoov (FlagConstant [fc]) yes no)
 25890  		// cond: fc.ltNoov()
 25891  		// result: (First yes no)
 25892  		for b.Controls[0].Op == OpARM64FlagConstant {
 25893  			v_0 := b.Controls[0]
 25894  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25895  			if !(fc.ltNoov()) {
 25896  				break
 25897  			}
 25898  			b.Reset(BlockFirst)
 25899  			return true
 25900  		}
 25901  		// match: (LTnoov (FlagConstant [fc]) yes no)
 25902  		// cond: !fc.ltNoov()
 25903  		// result: (First no yes)
 25904  		for b.Controls[0].Op == OpARM64FlagConstant {
 25905  			v_0 := b.Controls[0]
 25906  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25907  			if !(!fc.ltNoov()) {
 25908  				break
 25909  			}
 25910  			b.Reset(BlockFirst)
 25911  			b.swapSuccessors()
 25912  			return true
 25913  		}
 25914  		// match: (LTnoov (InvertFlags cmp) yes no)
 25915  		// result: (GTnoov cmp yes no)
 25916  		for b.Controls[0].Op == OpARM64InvertFlags {
 25917  			v_0 := b.Controls[0]
 25918  			cmp := v_0.Args[0]
 25919  			b.resetWithControl(BlockARM64GTnoov, cmp)
 25920  			return true
 25921  		}
 25922  	case BlockARM64NE:
 25923  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 25924  		// cond: z.Uses == 1
 25925  		// result: (NE (TST x y) yes no)
 25926  		for b.Controls[0].Op == OpARM64CMPconst {
 25927  			v_0 := b.Controls[0]
 25928  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25929  				break
 25930  			}
 25931  			z := v_0.Args[0]
 25932  			if z.Op != OpARM64AND {
 25933  				break
 25934  			}
 25935  			_ = z.Args[1]
 25936  			z_0 := z.Args[0]
 25937  			z_1 := z.Args[1]
 25938  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25939  				x := z_0
 25940  				y := z_1
 25941  				if !(z.Uses == 1) {
 25942  					continue
 25943  				}
 25944  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 25945  				v0.AddArg2(x, y)
 25946  				b.resetWithControl(BlockARM64NE, v0)
 25947  				return true
 25948  			}
 25949  			break
 25950  		}
 25951  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 25952  		// cond: x.Uses == 1
 25953  		// result: (NE (TSTconst [c] y) yes no)
 25954  		for b.Controls[0].Op == OpARM64CMPconst {
 25955  			v_0 := b.Controls[0]
 25956  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25957  				break
 25958  			}
 25959  			x := v_0.Args[0]
 25960  			if x.Op != OpARM64ANDconst {
 25961  				break
 25962  			}
 25963  			c := auxIntToInt64(x.AuxInt)
 25964  			y := x.Args[0]
 25965  			if !(x.Uses == 1) {
 25966  				break
 25967  			}
 25968  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 25969  			v0.AuxInt = int64ToAuxInt(c)
 25970  			v0.AddArg(y)
 25971  			b.resetWithControl(BlockARM64NE, v0)
 25972  			return true
 25973  		}
 25974  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 25975  		// cond: z.Uses == 1
 25976  		// result: (NE (TSTW x y) yes no)
 25977  		for b.Controls[0].Op == OpARM64CMPWconst {
 25978  			v_0 := b.Controls[0]
 25979  			if auxIntToInt32(v_0.AuxInt) != 0 {
 25980  				break
 25981  			}
 25982  			z := v_0.Args[0]
 25983  			if z.Op != OpARM64AND {
 25984  				break
 25985  			}
 25986  			_ = z.Args[1]
 25987  			z_0 := z.Args[0]
 25988  			z_1 := z.Args[1]
 25989  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 25990  				x := z_0
 25991  				y := z_1
 25992  				if !(z.Uses == 1) {
 25993  					continue
 25994  				}
 25995  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 25996  				v0.AddArg2(x, y)
 25997  				b.resetWithControl(BlockARM64NE, v0)
 25998  				return true
 25999  			}
 26000  			break
 26001  		}
 26002  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 26003  		// cond: x.Uses == 1
 26004  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 26005  		for b.Controls[0].Op == OpARM64CMPWconst {
 26006  			v_0 := b.Controls[0]
 26007  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26008  				break
 26009  			}
 26010  			x := v_0.Args[0]
 26011  			if x.Op != OpARM64ANDconst {
 26012  				break
 26013  			}
 26014  			c := auxIntToInt64(x.AuxInt)
 26015  			y := x.Args[0]
 26016  			if !(x.Uses == 1) {
 26017  				break
 26018  			}
 26019  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 26020  			v0.AuxInt = int32ToAuxInt(int32(c))
 26021  			v0.AddArg(y)
 26022  			b.resetWithControl(BlockARM64NE, v0)
 26023  			return true
 26024  		}
 26025  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 26026  		// cond: x.Uses == 1
 26027  		// result: (NE (CMNconst [c] y) yes no)
 26028  		for b.Controls[0].Op == OpARM64CMPconst {
 26029  			v_0 := b.Controls[0]
 26030  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26031  				break
 26032  			}
 26033  			x := v_0.Args[0]
 26034  			if x.Op != OpARM64ADDconst {
 26035  				break
 26036  			}
 26037  			c := auxIntToInt64(x.AuxInt)
 26038  			y := x.Args[0]
 26039  			if !(x.Uses == 1) {
 26040  				break
 26041  			}
 26042  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 26043  			v0.AuxInt = int64ToAuxInt(c)
 26044  			v0.AddArg(y)
 26045  			b.resetWithControl(BlockARM64NE, v0)
 26046  			return true
 26047  		}
 26048  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 26049  		// cond: x.Uses == 1
 26050  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 26051  		for b.Controls[0].Op == OpARM64CMPWconst {
 26052  			v_0 := b.Controls[0]
 26053  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26054  				break
 26055  			}
 26056  			x := v_0.Args[0]
 26057  			if x.Op != OpARM64ADDconst {
 26058  				break
 26059  			}
 26060  			c := auxIntToInt64(x.AuxInt)
 26061  			y := x.Args[0]
 26062  			if !(x.Uses == 1) {
 26063  				break
 26064  			}
 26065  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 26066  			v0.AuxInt = int32ToAuxInt(int32(c))
 26067  			v0.AddArg(y)
 26068  			b.resetWithControl(BlockARM64NE, v0)
 26069  			return true
 26070  		}
 26071  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 26072  		// cond: z.Uses == 1
 26073  		// result: (NE (CMN x y) yes no)
 26074  		for b.Controls[0].Op == OpARM64CMPconst {
 26075  			v_0 := b.Controls[0]
 26076  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26077  				break
 26078  			}
 26079  			z := v_0.Args[0]
 26080  			if z.Op != OpARM64ADD {
 26081  				break
 26082  			}
 26083  			_ = z.Args[1]
 26084  			z_0 := z.Args[0]
 26085  			z_1 := z.Args[1]
 26086  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26087  				x := z_0
 26088  				y := z_1
 26089  				if !(z.Uses == 1) {
 26090  					continue
 26091  				}
 26092  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26093  				v0.AddArg2(x, y)
 26094  				b.resetWithControl(BlockARM64NE, v0)
 26095  				return true
 26096  			}
 26097  			break
 26098  		}
 26099  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 26100  		// cond: z.Uses == 1
 26101  		// result: (NE (CMNW x y) yes no)
 26102  		for b.Controls[0].Op == OpARM64CMPWconst {
 26103  			v_0 := b.Controls[0]
 26104  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26105  				break
 26106  			}
 26107  			z := v_0.Args[0]
 26108  			if z.Op != OpARM64ADD {
 26109  				break
 26110  			}
 26111  			_ = z.Args[1]
 26112  			z_0 := z.Args[0]
 26113  			z_1 := z.Args[1]
 26114  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 26115  				x := z_0
 26116  				y := z_1
 26117  				if !(z.Uses == 1) {
 26118  					continue
 26119  				}
 26120  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26121  				v0.AddArg2(x, y)
 26122  				b.resetWithControl(BlockARM64NE, v0)
 26123  				return true
 26124  			}
 26125  			break
 26126  		}
 26127  		// match: (NE (CMP x z:(NEG y)) yes no)
 26128  		// cond: z.Uses == 1
 26129  		// result: (NE (CMN x y) yes no)
 26130  		for b.Controls[0].Op == OpARM64CMP {
 26131  			v_0 := b.Controls[0]
 26132  			_ = v_0.Args[1]
 26133  			x := v_0.Args[0]
 26134  			z := v_0.Args[1]
 26135  			if z.Op != OpARM64NEG {
 26136  				break
 26137  			}
 26138  			y := z.Args[0]
 26139  			if !(z.Uses == 1) {
 26140  				break
 26141  			}
 26142  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26143  			v0.AddArg2(x, y)
 26144  			b.resetWithControl(BlockARM64NE, v0)
 26145  			return true
 26146  		}
 26147  		// match: (NE (CMPW x z:(NEG y)) yes no)
 26148  		// cond: z.Uses == 1
 26149  		// result: (NE (CMNW x y) yes no)
 26150  		for b.Controls[0].Op == OpARM64CMPW {
 26151  			v_0 := b.Controls[0]
 26152  			_ = v_0.Args[1]
 26153  			x := v_0.Args[0]
 26154  			z := v_0.Args[1]
 26155  			if z.Op != OpARM64NEG {
 26156  				break
 26157  			}
 26158  			y := z.Args[0]
 26159  			if !(z.Uses == 1) {
 26160  				break
 26161  			}
 26162  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26163  			v0.AddArg2(x, y)
 26164  			b.resetWithControl(BlockARM64NE, v0)
 26165  			return true
 26166  		}
 26167  		// match: (NE (CMPconst [0] x) yes no)
 26168  		// result: (NZ x yes no)
 26169  		for b.Controls[0].Op == OpARM64CMPconst {
 26170  			v_0 := b.Controls[0]
 26171  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26172  				break
 26173  			}
 26174  			x := v_0.Args[0]
 26175  			b.resetWithControl(BlockARM64NZ, x)
 26176  			return true
 26177  		}
 26178  		// match: (NE (CMPWconst [0] x) yes no)
 26179  		// result: (NZW x yes no)
 26180  		for b.Controls[0].Op == OpARM64CMPWconst {
 26181  			v_0 := b.Controls[0]
 26182  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26183  				break
 26184  			}
 26185  			x := v_0.Args[0]
 26186  			b.resetWithControl(BlockARM64NZW, x)
 26187  			return true
 26188  		}
 26189  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 26190  		// cond: z.Uses==1
 26191  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 26192  		for b.Controls[0].Op == OpARM64CMPconst {
 26193  			v_0 := b.Controls[0]
 26194  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26195  				break
 26196  			}
 26197  			z := v_0.Args[0]
 26198  			if z.Op != OpARM64MADD {
 26199  				break
 26200  			}
 26201  			y := z.Args[2]
 26202  			a := z.Args[0]
 26203  			x := z.Args[1]
 26204  			if !(z.Uses == 1) {
 26205  				break
 26206  			}
 26207  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 26208  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26209  			v1.AddArg2(x, y)
 26210  			v0.AddArg2(a, v1)
 26211  			b.resetWithControl(BlockARM64NE, v0)
 26212  			return true
 26213  		}
 26214  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 26215  		// cond: z.Uses==1
 26216  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 26217  		for b.Controls[0].Op == OpARM64CMPconst {
 26218  			v_0 := b.Controls[0]
 26219  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26220  				break
 26221  			}
 26222  			z := v_0.Args[0]
 26223  			if z.Op != OpARM64MSUB {
 26224  				break
 26225  			}
 26226  			y := z.Args[2]
 26227  			a := z.Args[0]
 26228  			x := z.Args[1]
 26229  			if !(z.Uses == 1) {
 26230  				break
 26231  			}
 26232  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 26233  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 26234  			v1.AddArg2(x, y)
 26235  			v0.AddArg2(a, v1)
 26236  			b.resetWithControl(BlockARM64NE, v0)
 26237  			return true
 26238  		}
 26239  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 26240  		// cond: z.Uses==1
 26241  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 26242  		for b.Controls[0].Op == OpARM64CMPWconst {
 26243  			v_0 := b.Controls[0]
 26244  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26245  				break
 26246  			}
 26247  			z := v_0.Args[0]
 26248  			if z.Op != OpARM64MADDW {
 26249  				break
 26250  			}
 26251  			y := z.Args[2]
 26252  			a := z.Args[0]
 26253  			x := z.Args[1]
 26254  			if !(z.Uses == 1) {
 26255  				break
 26256  			}
 26257  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 26258  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26259  			v1.AddArg2(x, y)
 26260  			v0.AddArg2(a, v1)
 26261  			b.resetWithControl(BlockARM64NE, v0)
 26262  			return true
 26263  		}
 26264  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 26265  		// cond: z.Uses==1
 26266  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 26267  		for b.Controls[0].Op == OpARM64CMPWconst {
 26268  			v_0 := b.Controls[0]
 26269  			if auxIntToInt32(v_0.AuxInt) != 0 {
 26270  				break
 26271  			}
 26272  			z := v_0.Args[0]
 26273  			if z.Op != OpARM64MSUBW {
 26274  				break
 26275  			}
 26276  			y := z.Args[2]
 26277  			a := z.Args[0]
 26278  			x := z.Args[1]
 26279  			if !(z.Uses == 1) {
 26280  				break
 26281  			}
 26282  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 26283  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 26284  			v1.AddArg2(x, y)
 26285  			v0.AddArg2(a, v1)
 26286  			b.resetWithControl(BlockARM64NE, v0)
 26287  			return true
 26288  		}
 26289  		// match: (NE (TSTconst [c] x) yes no)
 26290  		// cond: oneBit(c)
 26291  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 26292  		for b.Controls[0].Op == OpARM64TSTconst {
 26293  			v_0 := b.Controls[0]
 26294  			c := auxIntToInt64(v_0.AuxInt)
 26295  			x := v_0.Args[0]
 26296  			if !(oneBit(c)) {
 26297  				break
 26298  			}
 26299  			b.resetWithControl(BlockARM64TBNZ, x)
 26300  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 26301  			return true
 26302  		}
 26303  		// match: (NE (TSTWconst [c] x) yes no)
 26304  		// cond: oneBit(int64(uint32(c)))
 26305  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 26306  		for b.Controls[0].Op == OpARM64TSTWconst {
 26307  			v_0 := b.Controls[0]
 26308  			c := auxIntToInt32(v_0.AuxInt)
 26309  			x := v_0.Args[0]
 26310  			if !(oneBit(int64(uint32(c)))) {
 26311  				break
 26312  			}
 26313  			b.resetWithControl(BlockARM64TBNZ, x)
 26314  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 26315  			return true
 26316  		}
 26317  		// match: (NE (FlagConstant [fc]) yes no)
 26318  		// cond: fc.ne()
 26319  		// result: (First yes no)
 26320  		for b.Controls[0].Op == OpARM64FlagConstant {
 26321  			v_0 := b.Controls[0]
 26322  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26323  			if !(fc.ne()) {
 26324  				break
 26325  			}
 26326  			b.Reset(BlockFirst)
 26327  			return true
 26328  		}
 26329  		// match: (NE (FlagConstant [fc]) yes no)
 26330  		// cond: !fc.ne()
 26331  		// result: (First no yes)
 26332  		for b.Controls[0].Op == OpARM64FlagConstant {
 26333  			v_0 := b.Controls[0]
 26334  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26335  			if !(!fc.ne()) {
 26336  				break
 26337  			}
 26338  			b.Reset(BlockFirst)
 26339  			b.swapSuccessors()
 26340  			return true
 26341  		}
 26342  		// match: (NE (InvertFlags cmp) yes no)
 26343  		// result: (NE cmp yes no)
 26344  		for b.Controls[0].Op == OpARM64InvertFlags {
 26345  			v_0 := b.Controls[0]
 26346  			cmp := v_0.Args[0]
 26347  			b.resetWithControl(BlockARM64NE, cmp)
 26348  			return true
 26349  		}
 26350  	case BlockARM64NZ:
 26351  		// match: (NZ (Equal cc) yes no)
 26352  		// result: (EQ cc yes no)
 26353  		for b.Controls[0].Op == OpARM64Equal {
 26354  			v_0 := b.Controls[0]
 26355  			cc := v_0.Args[0]
 26356  			b.resetWithControl(BlockARM64EQ, cc)
 26357  			return true
 26358  		}
 26359  		// match: (NZ (NotEqual cc) yes no)
 26360  		// result: (NE cc yes no)
 26361  		for b.Controls[0].Op == OpARM64NotEqual {
 26362  			v_0 := b.Controls[0]
 26363  			cc := v_0.Args[0]
 26364  			b.resetWithControl(BlockARM64NE, cc)
 26365  			return true
 26366  		}
 26367  		// match: (NZ (LessThan cc) yes no)
 26368  		// result: (LT cc yes no)
 26369  		for b.Controls[0].Op == OpARM64LessThan {
 26370  			v_0 := b.Controls[0]
 26371  			cc := v_0.Args[0]
 26372  			b.resetWithControl(BlockARM64LT, cc)
 26373  			return true
 26374  		}
 26375  		// match: (NZ (LessThanU cc) yes no)
 26376  		// result: (ULT cc yes no)
 26377  		for b.Controls[0].Op == OpARM64LessThanU {
 26378  			v_0 := b.Controls[0]
 26379  			cc := v_0.Args[0]
 26380  			b.resetWithControl(BlockARM64ULT, cc)
 26381  			return true
 26382  		}
 26383  		// match: (NZ (LessEqual cc) yes no)
 26384  		// result: (LE cc yes no)
 26385  		for b.Controls[0].Op == OpARM64LessEqual {
 26386  			v_0 := b.Controls[0]
 26387  			cc := v_0.Args[0]
 26388  			b.resetWithControl(BlockARM64LE, cc)
 26389  			return true
 26390  		}
 26391  		// match: (NZ (LessEqualU cc) yes no)
 26392  		// result: (ULE cc yes no)
 26393  		for b.Controls[0].Op == OpARM64LessEqualU {
 26394  			v_0 := b.Controls[0]
 26395  			cc := v_0.Args[0]
 26396  			b.resetWithControl(BlockARM64ULE, cc)
 26397  			return true
 26398  		}
 26399  		// match: (NZ (GreaterThan cc) yes no)
 26400  		// result: (GT cc yes no)
 26401  		for b.Controls[0].Op == OpARM64GreaterThan {
 26402  			v_0 := b.Controls[0]
 26403  			cc := v_0.Args[0]
 26404  			b.resetWithControl(BlockARM64GT, cc)
 26405  			return true
 26406  		}
 26407  		// match: (NZ (GreaterThanU cc) yes no)
 26408  		// result: (UGT cc yes no)
 26409  		for b.Controls[0].Op == OpARM64GreaterThanU {
 26410  			v_0 := b.Controls[0]
 26411  			cc := v_0.Args[0]
 26412  			b.resetWithControl(BlockARM64UGT, cc)
 26413  			return true
 26414  		}
 26415  		// match: (NZ (GreaterEqual cc) yes no)
 26416  		// result: (GE cc yes no)
 26417  		for b.Controls[0].Op == OpARM64GreaterEqual {
 26418  			v_0 := b.Controls[0]
 26419  			cc := v_0.Args[0]
 26420  			b.resetWithControl(BlockARM64GE, cc)
 26421  			return true
 26422  		}
 26423  		// match: (NZ (GreaterEqualU cc) yes no)
 26424  		// result: (UGE cc yes no)
 26425  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 26426  			v_0 := b.Controls[0]
 26427  			cc := v_0.Args[0]
 26428  			b.resetWithControl(BlockARM64UGE, cc)
 26429  			return true
 26430  		}
 26431  		// match: (NZ (LessThanF cc) yes no)
 26432  		// result: (FLT cc yes no)
 26433  		for b.Controls[0].Op == OpARM64LessThanF {
 26434  			v_0 := b.Controls[0]
 26435  			cc := v_0.Args[0]
 26436  			b.resetWithControl(BlockARM64FLT, cc)
 26437  			return true
 26438  		}
 26439  		// match: (NZ (LessEqualF cc) yes no)
 26440  		// result: (FLE cc yes no)
 26441  		for b.Controls[0].Op == OpARM64LessEqualF {
 26442  			v_0 := b.Controls[0]
 26443  			cc := v_0.Args[0]
 26444  			b.resetWithControl(BlockARM64FLE, cc)
 26445  			return true
 26446  		}
 26447  		// match: (NZ (GreaterThanF cc) yes no)
 26448  		// result: (FGT cc yes no)
 26449  		for b.Controls[0].Op == OpARM64GreaterThanF {
 26450  			v_0 := b.Controls[0]
 26451  			cc := v_0.Args[0]
 26452  			b.resetWithControl(BlockARM64FGT, cc)
 26453  			return true
 26454  		}
 26455  		// match: (NZ (GreaterEqualF cc) yes no)
 26456  		// result: (FGE cc yes no)
 26457  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 26458  			v_0 := b.Controls[0]
 26459  			cc := v_0.Args[0]
 26460  			b.resetWithControl(BlockARM64FGE, cc)
 26461  			return true
 26462  		}
 26463  		// match: (NZ (ANDconst [c] x) yes no)
 26464  		// cond: oneBit(c)
 26465  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 26466  		for b.Controls[0].Op == OpARM64ANDconst {
 26467  			v_0 := b.Controls[0]
 26468  			c := auxIntToInt64(v_0.AuxInt)
 26469  			x := v_0.Args[0]
 26470  			if !(oneBit(c)) {
 26471  				break
 26472  			}
 26473  			b.resetWithControl(BlockARM64TBNZ, x)
 26474  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 26475  			return true
 26476  		}
 26477  		// match: (NZ (MOVDconst [0]) yes no)
 26478  		// result: (First no yes)
 26479  		for b.Controls[0].Op == OpARM64MOVDconst {
 26480  			v_0 := b.Controls[0]
 26481  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26482  				break
 26483  			}
 26484  			b.Reset(BlockFirst)
 26485  			b.swapSuccessors()
 26486  			return true
 26487  		}
 26488  		// match: (NZ (MOVDconst [c]) yes no)
 26489  		// cond: c != 0
 26490  		// result: (First yes no)
 26491  		for b.Controls[0].Op == OpARM64MOVDconst {
 26492  			v_0 := b.Controls[0]
 26493  			c := auxIntToInt64(v_0.AuxInt)
 26494  			if !(c != 0) {
 26495  				break
 26496  			}
 26497  			b.Reset(BlockFirst)
 26498  			return true
 26499  		}
 26500  	case BlockARM64NZW:
 26501  		// match: (NZW (ANDconst [c] x) yes no)
 26502  		// cond: oneBit(int64(uint32(c)))
 26503  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 26504  		for b.Controls[0].Op == OpARM64ANDconst {
 26505  			v_0 := b.Controls[0]
 26506  			c := auxIntToInt64(v_0.AuxInt)
 26507  			x := v_0.Args[0]
 26508  			if !(oneBit(int64(uint32(c)))) {
 26509  				break
 26510  			}
 26511  			b.resetWithControl(BlockARM64TBNZ, x)
 26512  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 26513  			return true
 26514  		}
 26515  		// match: (NZW (MOVDconst [c]) yes no)
 26516  		// cond: int32(c) == 0
 26517  		// result: (First no yes)
 26518  		for b.Controls[0].Op == OpARM64MOVDconst {
 26519  			v_0 := b.Controls[0]
 26520  			c := auxIntToInt64(v_0.AuxInt)
 26521  			if !(int32(c) == 0) {
 26522  				break
 26523  			}
 26524  			b.Reset(BlockFirst)
 26525  			b.swapSuccessors()
 26526  			return true
 26527  		}
 26528  		// match: (NZW (MOVDconst [c]) yes no)
 26529  		// cond: int32(c) != 0
 26530  		// result: (First yes no)
 26531  		for b.Controls[0].Op == OpARM64MOVDconst {
 26532  			v_0 := b.Controls[0]
 26533  			c := auxIntToInt64(v_0.AuxInt)
 26534  			if !(int32(c) != 0) {
 26535  				break
 26536  			}
 26537  			b.Reset(BlockFirst)
 26538  			return true
 26539  		}
 26540  	case BlockARM64TBNZ:
 26541  		// match: (TBNZ [0] (Equal cc) yes no)
 26542  		// result: (EQ cc yes no)
 26543  		for b.Controls[0].Op == OpARM64Equal {
 26544  			v_0 := b.Controls[0]
 26545  			cc := v_0.Args[0]
 26546  			if auxIntToInt64(b.AuxInt) != 0 {
 26547  				break
 26548  			}
 26549  			b.resetWithControl(BlockARM64EQ, cc)
 26550  			return true
 26551  		}
 26552  		// match: (TBNZ [0] (NotEqual cc) yes no)
 26553  		// result: (NE cc yes no)
 26554  		for b.Controls[0].Op == OpARM64NotEqual {
 26555  			v_0 := b.Controls[0]
 26556  			cc := v_0.Args[0]
 26557  			if auxIntToInt64(b.AuxInt) != 0 {
 26558  				break
 26559  			}
 26560  			b.resetWithControl(BlockARM64NE, cc)
 26561  			return true
 26562  		}
 26563  		// match: (TBNZ [0] (LessThan cc) yes no)
 26564  		// result: (LT cc yes no)
 26565  		for b.Controls[0].Op == OpARM64LessThan {
 26566  			v_0 := b.Controls[0]
 26567  			cc := v_0.Args[0]
 26568  			if auxIntToInt64(b.AuxInt) != 0 {
 26569  				break
 26570  			}
 26571  			b.resetWithControl(BlockARM64LT, cc)
 26572  			return true
 26573  		}
 26574  		// match: (TBNZ [0] (LessThanU cc) yes no)
 26575  		// result: (ULT cc yes no)
 26576  		for b.Controls[0].Op == OpARM64LessThanU {
 26577  			v_0 := b.Controls[0]
 26578  			cc := v_0.Args[0]
 26579  			if auxIntToInt64(b.AuxInt) != 0 {
 26580  				break
 26581  			}
 26582  			b.resetWithControl(BlockARM64ULT, cc)
 26583  			return true
 26584  		}
 26585  		// match: (TBNZ [0] (LessEqual cc) yes no)
 26586  		// result: (LE cc yes no)
 26587  		for b.Controls[0].Op == OpARM64LessEqual {
 26588  			v_0 := b.Controls[0]
 26589  			cc := v_0.Args[0]
 26590  			if auxIntToInt64(b.AuxInt) != 0 {
 26591  				break
 26592  			}
 26593  			b.resetWithControl(BlockARM64LE, cc)
 26594  			return true
 26595  		}
 26596  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 26597  		// result: (ULE cc yes no)
 26598  		for b.Controls[0].Op == OpARM64LessEqualU {
 26599  			v_0 := b.Controls[0]
 26600  			cc := v_0.Args[0]
 26601  			if auxIntToInt64(b.AuxInt) != 0 {
 26602  				break
 26603  			}
 26604  			b.resetWithControl(BlockARM64ULE, cc)
 26605  			return true
 26606  		}
 26607  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 26608  		// result: (GT cc yes no)
 26609  		for b.Controls[0].Op == OpARM64GreaterThan {
 26610  			v_0 := b.Controls[0]
 26611  			cc := v_0.Args[0]
 26612  			if auxIntToInt64(b.AuxInt) != 0 {
 26613  				break
 26614  			}
 26615  			b.resetWithControl(BlockARM64GT, cc)
 26616  			return true
 26617  		}
 26618  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 26619  		// result: (UGT cc yes no)
 26620  		for b.Controls[0].Op == OpARM64GreaterThanU {
 26621  			v_0 := b.Controls[0]
 26622  			cc := v_0.Args[0]
 26623  			if auxIntToInt64(b.AuxInt) != 0 {
 26624  				break
 26625  			}
 26626  			b.resetWithControl(BlockARM64UGT, cc)
 26627  			return true
 26628  		}
 26629  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 26630  		// result: (GE cc yes no)
 26631  		for b.Controls[0].Op == OpARM64GreaterEqual {
 26632  			v_0 := b.Controls[0]
 26633  			cc := v_0.Args[0]
 26634  			if auxIntToInt64(b.AuxInt) != 0 {
 26635  				break
 26636  			}
 26637  			b.resetWithControl(BlockARM64GE, cc)
 26638  			return true
 26639  		}
 26640  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 26641  		// result: (UGE cc yes no)
 26642  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 26643  			v_0 := b.Controls[0]
 26644  			cc := v_0.Args[0]
 26645  			if auxIntToInt64(b.AuxInt) != 0 {
 26646  				break
 26647  			}
 26648  			b.resetWithControl(BlockARM64UGE, cc)
 26649  			return true
 26650  		}
 26651  		// match: (TBNZ [0] (LessThanF cc) yes no)
 26652  		// result: (FLT cc yes no)
 26653  		for b.Controls[0].Op == OpARM64LessThanF {
 26654  			v_0 := b.Controls[0]
 26655  			cc := v_0.Args[0]
 26656  			if auxIntToInt64(b.AuxInt) != 0 {
 26657  				break
 26658  			}
 26659  			b.resetWithControl(BlockARM64FLT, cc)
 26660  			return true
 26661  		}
 26662  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 26663  		// result: (FLE cc yes no)
 26664  		for b.Controls[0].Op == OpARM64LessEqualF {
 26665  			v_0 := b.Controls[0]
 26666  			cc := v_0.Args[0]
 26667  			if auxIntToInt64(b.AuxInt) != 0 {
 26668  				break
 26669  			}
 26670  			b.resetWithControl(BlockARM64FLE, cc)
 26671  			return true
 26672  		}
 26673  		// match: (TBNZ [0] (GreaterThanF cc) yes no)
 26674  		// result: (FGT cc yes no)
 26675  		for b.Controls[0].Op == OpARM64GreaterThanF {
 26676  			v_0 := b.Controls[0]
 26677  			cc := v_0.Args[0]
 26678  			if auxIntToInt64(b.AuxInt) != 0 {
 26679  				break
 26680  			}
 26681  			b.resetWithControl(BlockARM64FGT, cc)
 26682  			return true
 26683  		}
 26684  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 26685  		// result: (FGE cc yes no)
 26686  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 26687  			v_0 := b.Controls[0]
 26688  			cc := v_0.Args[0]
 26689  			if auxIntToInt64(b.AuxInt) != 0 {
 26690  				break
 26691  			}
 26692  			b.resetWithControl(BlockARM64FGE, cc)
 26693  			return true
 26694  		}
 26695  	case BlockARM64UGE:
 26696  		// match: (UGE (FlagConstant [fc]) yes no)
 26697  		// cond: fc.uge()
 26698  		// result: (First yes no)
 26699  		for b.Controls[0].Op == OpARM64FlagConstant {
 26700  			v_0 := b.Controls[0]
 26701  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26702  			if !(fc.uge()) {
 26703  				break
 26704  			}
 26705  			b.Reset(BlockFirst)
 26706  			return true
 26707  		}
 26708  		// match: (UGE (FlagConstant [fc]) yes no)
 26709  		// cond: !fc.uge()
 26710  		// result: (First no yes)
 26711  		for b.Controls[0].Op == OpARM64FlagConstant {
 26712  			v_0 := b.Controls[0]
 26713  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26714  			if !(!fc.uge()) {
 26715  				break
 26716  			}
 26717  			b.Reset(BlockFirst)
 26718  			b.swapSuccessors()
 26719  			return true
 26720  		}
 26721  		// match: (UGE (InvertFlags cmp) yes no)
 26722  		// result: (ULE cmp yes no)
 26723  		for b.Controls[0].Op == OpARM64InvertFlags {
 26724  			v_0 := b.Controls[0]
 26725  			cmp := v_0.Args[0]
 26726  			b.resetWithControl(BlockARM64ULE, cmp)
 26727  			return true
 26728  		}
 26729  	case BlockARM64UGT:
 26730  		// match: (UGT (FlagConstant [fc]) yes no)
 26731  		// cond: fc.ugt()
 26732  		// result: (First yes no)
 26733  		for b.Controls[0].Op == OpARM64FlagConstant {
 26734  			v_0 := b.Controls[0]
 26735  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26736  			if !(fc.ugt()) {
 26737  				break
 26738  			}
 26739  			b.Reset(BlockFirst)
 26740  			return true
 26741  		}
 26742  		// match: (UGT (FlagConstant [fc]) yes no)
 26743  		// cond: !fc.ugt()
 26744  		// result: (First no yes)
 26745  		for b.Controls[0].Op == OpARM64FlagConstant {
 26746  			v_0 := b.Controls[0]
 26747  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26748  			if !(!fc.ugt()) {
 26749  				break
 26750  			}
 26751  			b.Reset(BlockFirst)
 26752  			b.swapSuccessors()
 26753  			return true
 26754  		}
 26755  		// match: (UGT (InvertFlags cmp) yes no)
 26756  		// result: (ULT cmp yes no)
 26757  		for b.Controls[0].Op == OpARM64InvertFlags {
 26758  			v_0 := b.Controls[0]
 26759  			cmp := v_0.Args[0]
 26760  			b.resetWithControl(BlockARM64ULT, cmp)
 26761  			return true
 26762  		}
 26763  	case BlockARM64ULE:
 26764  		// match: (ULE (FlagConstant [fc]) yes no)
 26765  		// cond: fc.ule()
 26766  		// result: (First yes no)
 26767  		for b.Controls[0].Op == OpARM64FlagConstant {
 26768  			v_0 := b.Controls[0]
 26769  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26770  			if !(fc.ule()) {
 26771  				break
 26772  			}
 26773  			b.Reset(BlockFirst)
 26774  			return true
 26775  		}
 26776  		// match: (ULE (FlagConstant [fc]) yes no)
 26777  		// cond: !fc.ule()
 26778  		// result: (First no yes)
 26779  		for b.Controls[0].Op == OpARM64FlagConstant {
 26780  			v_0 := b.Controls[0]
 26781  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26782  			if !(!fc.ule()) {
 26783  				break
 26784  			}
 26785  			b.Reset(BlockFirst)
 26786  			b.swapSuccessors()
 26787  			return true
 26788  		}
 26789  		// match: (ULE (InvertFlags cmp) yes no)
 26790  		// result: (UGE cmp yes no)
 26791  		for b.Controls[0].Op == OpARM64InvertFlags {
 26792  			v_0 := b.Controls[0]
 26793  			cmp := v_0.Args[0]
 26794  			b.resetWithControl(BlockARM64UGE, cmp)
 26795  			return true
 26796  		}
 26797  	case BlockARM64ULT:
 26798  		// match: (ULT (FlagConstant [fc]) yes no)
 26799  		// cond: fc.ult()
 26800  		// result: (First yes no)
 26801  		for b.Controls[0].Op == OpARM64FlagConstant {
 26802  			v_0 := b.Controls[0]
 26803  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26804  			if !(fc.ult()) {
 26805  				break
 26806  			}
 26807  			b.Reset(BlockFirst)
 26808  			return true
 26809  		}
 26810  		// match: (ULT (FlagConstant [fc]) yes no)
 26811  		// cond: !fc.ult()
 26812  		// result: (First no yes)
 26813  		for b.Controls[0].Op == OpARM64FlagConstant {
 26814  			v_0 := b.Controls[0]
 26815  			fc := auxIntToFlagConstant(v_0.AuxInt)
 26816  			if !(!fc.ult()) {
 26817  				break
 26818  			}
 26819  			b.Reset(BlockFirst)
 26820  			b.swapSuccessors()
 26821  			return true
 26822  		}
 26823  		// match: (ULT (InvertFlags cmp) yes no)
 26824  		// result: (UGT cmp yes no)
 26825  		for b.Controls[0].Op == OpARM64InvertFlags {
 26826  			v_0 := b.Controls[0]
 26827  			cmp := v_0.Args[0]
 26828  			b.resetWithControl(BlockARM64UGT, cmp)
 26829  			return true
 26830  		}
 26831  	case BlockARM64Z:
 26832  		// match: (Z (ANDconst [c] x) yes no)
 26833  		// cond: oneBit(c)
 26834  		// result: (TBZ [int64(ntz64(c))] x yes no)
 26835  		for b.Controls[0].Op == OpARM64ANDconst {
 26836  			v_0 := b.Controls[0]
 26837  			c := auxIntToInt64(v_0.AuxInt)
 26838  			x := v_0.Args[0]
 26839  			if !(oneBit(c)) {
 26840  				break
 26841  			}
 26842  			b.resetWithControl(BlockARM64TBZ, x)
 26843  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 26844  			return true
 26845  		}
 26846  		// match: (Z (MOVDconst [0]) yes no)
 26847  		// result: (First yes no)
 26848  		for b.Controls[0].Op == OpARM64MOVDconst {
 26849  			v_0 := b.Controls[0]
 26850  			if auxIntToInt64(v_0.AuxInt) != 0 {
 26851  				break
 26852  			}
 26853  			b.Reset(BlockFirst)
 26854  			return true
 26855  		}
 26856  		// match: (Z (MOVDconst [c]) yes no)
 26857  		// cond: c != 0
 26858  		// result: (First no yes)
 26859  		for b.Controls[0].Op == OpARM64MOVDconst {
 26860  			v_0 := b.Controls[0]
 26861  			c := auxIntToInt64(v_0.AuxInt)
 26862  			if !(c != 0) {
 26863  				break
 26864  			}
 26865  			b.Reset(BlockFirst)
 26866  			b.swapSuccessors()
 26867  			return true
 26868  		}
 26869  	case BlockARM64ZW:
 26870  		// match: (ZW (ANDconst [c] x) yes no)
 26871  		// cond: oneBit(int64(uint32(c)))
 26872  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 26873  		for b.Controls[0].Op == OpARM64ANDconst {
 26874  			v_0 := b.Controls[0]
 26875  			c := auxIntToInt64(v_0.AuxInt)
 26876  			x := v_0.Args[0]
 26877  			if !(oneBit(int64(uint32(c)))) {
 26878  				break
 26879  			}
 26880  			b.resetWithControl(BlockARM64TBZ, x)
 26881  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 26882  			return true
 26883  		}
 26884  		// match: (ZW (MOVDconst [c]) yes no)
 26885  		// cond: int32(c) == 0
 26886  		// result: (First yes no)
 26887  		for b.Controls[0].Op == OpARM64MOVDconst {
 26888  			v_0 := b.Controls[0]
 26889  			c := auxIntToInt64(v_0.AuxInt)
 26890  			if !(int32(c) == 0) {
 26891  				break
 26892  			}
 26893  			b.Reset(BlockFirst)
 26894  			return true
 26895  		}
 26896  		// match: (ZW (MOVDconst [c]) yes no)
 26897  		// cond: int32(c) != 0
 26898  		// result: (First no yes)
 26899  		for b.Controls[0].Op == OpARM64MOVDconst {
 26900  			v_0 := b.Controls[0]
 26901  			c := auxIntToInt64(v_0.AuxInt)
 26902  			if !(int32(c) != 0) {
 26903  				break
 26904  			}
 26905  			b.Reset(BlockFirst)
 26906  			b.swapSuccessors()
 26907  			return true
 26908  		}
 26909  	}
 26910  	return false
 26911  }
 26912  

View as plain text