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 OpARM64MOVDload:
   212  		return rewriteValueARM64_OpARM64MOVDload(v)
   213  	case OpARM64MOVDloadidx:
   214  		return rewriteValueARM64_OpARM64MOVDloadidx(v)
   215  	case OpARM64MOVDloadidx8:
   216  		return rewriteValueARM64_OpARM64MOVDloadidx8(v)
   217  	case OpARM64MOVDnop:
   218  		return rewriteValueARM64_OpARM64MOVDnop(v)
   219  	case OpARM64MOVDreg:
   220  		return rewriteValueARM64_OpARM64MOVDreg(v)
   221  	case OpARM64MOVDstore:
   222  		return rewriteValueARM64_OpARM64MOVDstore(v)
   223  	case OpARM64MOVDstoreidx:
   224  		return rewriteValueARM64_OpARM64MOVDstoreidx(v)
   225  	case OpARM64MOVDstoreidx8:
   226  		return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
   227  	case OpARM64MOVHUload:
   228  		return rewriteValueARM64_OpARM64MOVHUload(v)
   229  	case OpARM64MOVHUloadidx:
   230  		return rewriteValueARM64_OpARM64MOVHUloadidx(v)
   231  	case OpARM64MOVHUloadidx2:
   232  		return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
   233  	case OpARM64MOVHUreg:
   234  		return rewriteValueARM64_OpARM64MOVHUreg(v)
   235  	case OpARM64MOVHload:
   236  		return rewriteValueARM64_OpARM64MOVHload(v)
   237  	case OpARM64MOVHloadidx:
   238  		return rewriteValueARM64_OpARM64MOVHloadidx(v)
   239  	case OpARM64MOVHloadidx2:
   240  		return rewriteValueARM64_OpARM64MOVHloadidx2(v)
   241  	case OpARM64MOVHreg:
   242  		return rewriteValueARM64_OpARM64MOVHreg(v)
   243  	case OpARM64MOVHstore:
   244  		return rewriteValueARM64_OpARM64MOVHstore(v)
   245  	case OpARM64MOVHstoreidx:
   246  		return rewriteValueARM64_OpARM64MOVHstoreidx(v)
   247  	case OpARM64MOVHstoreidx2:
   248  		return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
   249  	case OpARM64MOVWUload:
   250  		return rewriteValueARM64_OpARM64MOVWUload(v)
   251  	case OpARM64MOVWUloadidx:
   252  		return rewriteValueARM64_OpARM64MOVWUloadidx(v)
   253  	case OpARM64MOVWUloadidx4:
   254  		return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
   255  	case OpARM64MOVWUreg:
   256  		return rewriteValueARM64_OpARM64MOVWUreg(v)
   257  	case OpARM64MOVWload:
   258  		return rewriteValueARM64_OpARM64MOVWload(v)
   259  	case OpARM64MOVWloadidx:
   260  		return rewriteValueARM64_OpARM64MOVWloadidx(v)
   261  	case OpARM64MOVWloadidx4:
   262  		return rewriteValueARM64_OpARM64MOVWloadidx4(v)
   263  	case OpARM64MOVWreg:
   264  		return rewriteValueARM64_OpARM64MOVWreg(v)
   265  	case OpARM64MOVWstore:
   266  		return rewriteValueARM64_OpARM64MOVWstore(v)
   267  	case OpARM64MOVWstoreidx:
   268  		return rewriteValueARM64_OpARM64MOVWstoreidx(v)
   269  	case OpARM64MOVWstoreidx4:
   270  		return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
   271  	case OpARM64MSUB:
   272  		return rewriteValueARM64_OpARM64MSUB(v)
   273  	case OpARM64MSUBW:
   274  		return rewriteValueARM64_OpARM64MSUBW(v)
   275  	case OpARM64MUL:
   276  		return rewriteValueARM64_OpARM64MUL(v)
   277  	case OpARM64MULW:
   278  		return rewriteValueARM64_OpARM64MULW(v)
   279  	case OpARM64MVN:
   280  		return rewriteValueARM64_OpARM64MVN(v)
   281  	case OpARM64MVNshiftLL:
   282  		return rewriteValueARM64_OpARM64MVNshiftLL(v)
   283  	case OpARM64MVNshiftRA:
   284  		return rewriteValueARM64_OpARM64MVNshiftRA(v)
   285  	case OpARM64MVNshiftRL:
   286  		return rewriteValueARM64_OpARM64MVNshiftRL(v)
   287  	case OpARM64MVNshiftRO:
   288  		return rewriteValueARM64_OpARM64MVNshiftRO(v)
   289  	case OpARM64NEG:
   290  		return rewriteValueARM64_OpARM64NEG(v)
   291  	case OpARM64NEGshiftLL:
   292  		return rewriteValueARM64_OpARM64NEGshiftLL(v)
   293  	case OpARM64NEGshiftRA:
   294  		return rewriteValueARM64_OpARM64NEGshiftRA(v)
   295  	case OpARM64NEGshiftRL:
   296  		return rewriteValueARM64_OpARM64NEGshiftRL(v)
   297  	case OpARM64NotEqual:
   298  		return rewriteValueARM64_OpARM64NotEqual(v)
   299  	case OpARM64OR:
   300  		return rewriteValueARM64_OpARM64OR(v)
   301  	case OpARM64ORN:
   302  		return rewriteValueARM64_OpARM64ORN(v)
   303  	case OpARM64ORNshiftLL:
   304  		return rewriteValueARM64_OpARM64ORNshiftLL(v)
   305  	case OpARM64ORNshiftRA:
   306  		return rewriteValueARM64_OpARM64ORNshiftRA(v)
   307  	case OpARM64ORNshiftRL:
   308  		return rewriteValueARM64_OpARM64ORNshiftRL(v)
   309  	case OpARM64ORNshiftRO:
   310  		return rewriteValueARM64_OpARM64ORNshiftRO(v)
   311  	case OpARM64ORconst:
   312  		return rewriteValueARM64_OpARM64ORconst(v)
   313  	case OpARM64ORshiftLL:
   314  		return rewriteValueARM64_OpARM64ORshiftLL(v)
   315  	case OpARM64ORshiftRA:
   316  		return rewriteValueARM64_OpARM64ORshiftRA(v)
   317  	case OpARM64ORshiftRL:
   318  		return rewriteValueARM64_OpARM64ORshiftRL(v)
   319  	case OpARM64ORshiftRO:
   320  		return rewriteValueARM64_OpARM64ORshiftRO(v)
   321  	case OpARM64REV:
   322  		return rewriteValueARM64_OpARM64REV(v)
   323  	case OpARM64REVW:
   324  		return rewriteValueARM64_OpARM64REVW(v)
   325  	case OpARM64ROR:
   326  		return rewriteValueARM64_OpARM64ROR(v)
   327  	case OpARM64RORW:
   328  		return rewriteValueARM64_OpARM64RORW(v)
   329  	case OpARM64SBCSflags:
   330  		return rewriteValueARM64_OpARM64SBCSflags(v)
   331  	case OpARM64SBFX:
   332  		return rewriteValueARM64_OpARM64SBFX(v)
   333  	case OpARM64SLL:
   334  		return rewriteValueARM64_OpARM64SLL(v)
   335  	case OpARM64SLLconst:
   336  		return rewriteValueARM64_OpARM64SLLconst(v)
   337  	case OpARM64SRA:
   338  		return rewriteValueARM64_OpARM64SRA(v)
   339  	case OpARM64SRAconst:
   340  		return rewriteValueARM64_OpARM64SRAconst(v)
   341  	case OpARM64SRL:
   342  		return rewriteValueARM64_OpARM64SRL(v)
   343  	case OpARM64SRLconst:
   344  		return rewriteValueARM64_OpARM64SRLconst(v)
   345  	case OpARM64STP:
   346  		return rewriteValueARM64_OpARM64STP(v)
   347  	case OpARM64SUB:
   348  		return rewriteValueARM64_OpARM64SUB(v)
   349  	case OpARM64SUBconst:
   350  		return rewriteValueARM64_OpARM64SUBconst(v)
   351  	case OpARM64SUBshiftLL:
   352  		return rewriteValueARM64_OpARM64SUBshiftLL(v)
   353  	case OpARM64SUBshiftRA:
   354  		return rewriteValueARM64_OpARM64SUBshiftRA(v)
   355  	case OpARM64SUBshiftRL:
   356  		return rewriteValueARM64_OpARM64SUBshiftRL(v)
   357  	case OpARM64TST:
   358  		return rewriteValueARM64_OpARM64TST(v)
   359  	case OpARM64TSTW:
   360  		return rewriteValueARM64_OpARM64TSTW(v)
   361  	case OpARM64TSTWconst:
   362  		return rewriteValueARM64_OpARM64TSTWconst(v)
   363  	case OpARM64TSTconst:
   364  		return rewriteValueARM64_OpARM64TSTconst(v)
   365  	case OpARM64TSTshiftLL:
   366  		return rewriteValueARM64_OpARM64TSTshiftLL(v)
   367  	case OpARM64TSTshiftRA:
   368  		return rewriteValueARM64_OpARM64TSTshiftRA(v)
   369  	case OpARM64TSTshiftRL:
   370  		return rewriteValueARM64_OpARM64TSTshiftRL(v)
   371  	case OpARM64TSTshiftRO:
   372  		return rewriteValueARM64_OpARM64TSTshiftRO(v)
   373  	case OpARM64UBFIZ:
   374  		return rewriteValueARM64_OpARM64UBFIZ(v)
   375  	case OpARM64UBFX:
   376  		return rewriteValueARM64_OpARM64UBFX(v)
   377  	case OpARM64UDIV:
   378  		return rewriteValueARM64_OpARM64UDIV(v)
   379  	case OpARM64UDIVW:
   380  		return rewriteValueARM64_OpARM64UDIVW(v)
   381  	case OpARM64UMOD:
   382  		return rewriteValueARM64_OpARM64UMOD(v)
   383  	case OpARM64UMODW:
   384  		return rewriteValueARM64_OpARM64UMODW(v)
   385  	case OpARM64XOR:
   386  		return rewriteValueARM64_OpARM64XOR(v)
   387  	case OpARM64XORconst:
   388  		return rewriteValueARM64_OpARM64XORconst(v)
   389  	case OpARM64XORshiftLL:
   390  		return rewriteValueARM64_OpARM64XORshiftLL(v)
   391  	case OpARM64XORshiftRA:
   392  		return rewriteValueARM64_OpARM64XORshiftRA(v)
   393  	case OpARM64XORshiftRL:
   394  		return rewriteValueARM64_OpARM64XORshiftRL(v)
   395  	case OpARM64XORshiftRO:
   396  		return rewriteValueARM64_OpARM64XORshiftRO(v)
   397  	case OpAbs:
   398  		v.Op = OpARM64FABSD
   399  		return true
   400  	case OpAdd16:
   401  		v.Op = OpARM64ADD
   402  		return true
   403  	case OpAdd32:
   404  		v.Op = OpARM64ADD
   405  		return true
   406  	case OpAdd32F:
   407  		v.Op = OpARM64FADDS
   408  		return true
   409  	case OpAdd64:
   410  		v.Op = OpARM64ADD
   411  		return true
   412  	case OpAdd64F:
   413  		v.Op = OpARM64FADDD
   414  		return true
   415  	case OpAdd8:
   416  		v.Op = OpARM64ADD
   417  		return true
   418  	case OpAddPtr:
   419  		v.Op = OpARM64ADD
   420  		return true
   421  	case OpAddr:
   422  		return rewriteValueARM64_OpAddr(v)
   423  	case OpAnd16:
   424  		v.Op = OpARM64AND
   425  		return true
   426  	case OpAnd32:
   427  		v.Op = OpARM64AND
   428  		return true
   429  	case OpAnd64:
   430  		v.Op = OpARM64AND
   431  		return true
   432  	case OpAnd8:
   433  		v.Op = OpARM64AND
   434  		return true
   435  	case OpAndB:
   436  		v.Op = OpARM64AND
   437  		return true
   438  	case OpAtomicAdd32:
   439  		v.Op = OpARM64LoweredAtomicAdd32
   440  		return true
   441  	case OpAtomicAdd32Variant:
   442  		v.Op = OpARM64LoweredAtomicAdd32Variant
   443  		return true
   444  	case OpAtomicAdd64:
   445  		v.Op = OpARM64LoweredAtomicAdd64
   446  		return true
   447  	case OpAtomicAdd64Variant:
   448  		v.Op = OpARM64LoweredAtomicAdd64Variant
   449  		return true
   450  	case OpAtomicAnd32value:
   451  		v.Op = OpARM64LoweredAtomicAnd32
   452  		return true
   453  	case OpAtomicAnd32valueVariant:
   454  		v.Op = OpARM64LoweredAtomicAnd32Variant
   455  		return true
   456  	case OpAtomicAnd64value:
   457  		v.Op = OpARM64LoweredAtomicAnd64
   458  		return true
   459  	case OpAtomicAnd64valueVariant:
   460  		v.Op = OpARM64LoweredAtomicAnd64Variant
   461  		return true
   462  	case OpAtomicAnd8value:
   463  		v.Op = OpARM64LoweredAtomicAnd8
   464  		return true
   465  	case OpAtomicAnd8valueVariant:
   466  		v.Op = OpARM64LoweredAtomicAnd8Variant
   467  		return true
   468  	case OpAtomicCompareAndSwap32:
   469  		v.Op = OpARM64LoweredAtomicCas32
   470  		return true
   471  	case OpAtomicCompareAndSwap32Variant:
   472  		v.Op = OpARM64LoweredAtomicCas32Variant
   473  		return true
   474  	case OpAtomicCompareAndSwap64:
   475  		v.Op = OpARM64LoweredAtomicCas64
   476  		return true
   477  	case OpAtomicCompareAndSwap64Variant:
   478  		v.Op = OpARM64LoweredAtomicCas64Variant
   479  		return true
   480  	case OpAtomicExchange32:
   481  		v.Op = OpARM64LoweredAtomicExchange32
   482  		return true
   483  	case OpAtomicExchange32Variant:
   484  		v.Op = OpARM64LoweredAtomicExchange32Variant
   485  		return true
   486  	case OpAtomicExchange64:
   487  		v.Op = OpARM64LoweredAtomicExchange64
   488  		return true
   489  	case OpAtomicExchange64Variant:
   490  		v.Op = OpARM64LoweredAtomicExchange64Variant
   491  		return true
   492  	case OpAtomicExchange8:
   493  		v.Op = OpARM64LoweredAtomicExchange8
   494  		return true
   495  	case OpAtomicExchange8Variant:
   496  		v.Op = OpARM64LoweredAtomicExchange8Variant
   497  		return true
   498  	case OpAtomicLoad32:
   499  		v.Op = OpARM64LDARW
   500  		return true
   501  	case OpAtomicLoad64:
   502  		v.Op = OpARM64LDAR
   503  		return true
   504  	case OpAtomicLoad8:
   505  		v.Op = OpARM64LDARB
   506  		return true
   507  	case OpAtomicLoadPtr:
   508  		v.Op = OpARM64LDAR
   509  		return true
   510  	case OpAtomicOr32value:
   511  		v.Op = OpARM64LoweredAtomicOr32
   512  		return true
   513  	case OpAtomicOr32valueVariant:
   514  		v.Op = OpARM64LoweredAtomicOr32Variant
   515  		return true
   516  	case OpAtomicOr64value:
   517  		v.Op = OpARM64LoweredAtomicOr64
   518  		return true
   519  	case OpAtomicOr64valueVariant:
   520  		v.Op = OpARM64LoweredAtomicOr64Variant
   521  		return true
   522  	case OpAtomicOr8value:
   523  		v.Op = OpARM64LoweredAtomicOr8
   524  		return true
   525  	case OpAtomicOr8valueVariant:
   526  		v.Op = OpARM64LoweredAtomicOr8Variant
   527  		return true
   528  	case OpAtomicStore32:
   529  		v.Op = OpARM64STLRW
   530  		return true
   531  	case OpAtomicStore64:
   532  		v.Op = OpARM64STLR
   533  		return true
   534  	case OpAtomicStore8:
   535  		v.Op = OpARM64STLRB
   536  		return true
   537  	case OpAtomicStorePtrNoWB:
   538  		v.Op = OpARM64STLR
   539  		return true
   540  	case OpAvg64u:
   541  		return rewriteValueARM64_OpAvg64u(v)
   542  	case OpBitLen16:
   543  		return rewriteValueARM64_OpBitLen16(v)
   544  	case OpBitLen32:
   545  		return rewriteValueARM64_OpBitLen32(v)
   546  	case OpBitLen64:
   547  		return rewriteValueARM64_OpBitLen64(v)
   548  	case OpBitLen8:
   549  		return rewriteValueARM64_OpBitLen8(v)
   550  	case OpBitRev16:
   551  		return rewriteValueARM64_OpBitRev16(v)
   552  	case OpBitRev32:
   553  		v.Op = OpARM64RBITW
   554  		return true
   555  	case OpBitRev64:
   556  		v.Op = OpARM64RBIT
   557  		return true
   558  	case OpBitRev8:
   559  		return rewriteValueARM64_OpBitRev8(v)
   560  	case OpBswap16:
   561  		v.Op = OpARM64REV16W
   562  		return true
   563  	case OpBswap32:
   564  		v.Op = OpARM64REVW
   565  		return true
   566  	case OpBswap64:
   567  		v.Op = OpARM64REV
   568  		return true
   569  	case OpCeil:
   570  		v.Op = OpARM64FRINTPD
   571  		return true
   572  	case OpClosureCall:
   573  		v.Op = OpARM64CALLclosure
   574  		return true
   575  	case OpCom16:
   576  		v.Op = OpARM64MVN
   577  		return true
   578  	case OpCom32:
   579  		v.Op = OpARM64MVN
   580  		return true
   581  	case OpCom64:
   582  		v.Op = OpARM64MVN
   583  		return true
   584  	case OpCom8:
   585  		v.Op = OpARM64MVN
   586  		return true
   587  	case OpCondSelect:
   588  		return rewriteValueARM64_OpCondSelect(v)
   589  	case OpConst16:
   590  		return rewriteValueARM64_OpConst16(v)
   591  	case OpConst32:
   592  		return rewriteValueARM64_OpConst32(v)
   593  	case OpConst32F:
   594  		return rewriteValueARM64_OpConst32F(v)
   595  	case OpConst64:
   596  		return rewriteValueARM64_OpConst64(v)
   597  	case OpConst64F:
   598  		return rewriteValueARM64_OpConst64F(v)
   599  	case OpConst8:
   600  		return rewriteValueARM64_OpConst8(v)
   601  	case OpConstBool:
   602  		return rewriteValueARM64_OpConstBool(v)
   603  	case OpConstNil:
   604  		return rewriteValueARM64_OpConstNil(v)
   605  	case OpCtz16:
   606  		return rewriteValueARM64_OpCtz16(v)
   607  	case OpCtz16NonZero:
   608  		v.Op = OpCtz32
   609  		return true
   610  	case OpCtz32:
   611  		return rewriteValueARM64_OpCtz32(v)
   612  	case OpCtz32NonZero:
   613  		v.Op = OpCtz32
   614  		return true
   615  	case OpCtz64:
   616  		return rewriteValueARM64_OpCtz64(v)
   617  	case OpCtz64NonZero:
   618  		v.Op = OpCtz64
   619  		return true
   620  	case OpCtz8:
   621  		return rewriteValueARM64_OpCtz8(v)
   622  	case OpCtz8NonZero:
   623  		v.Op = OpCtz32
   624  		return true
   625  	case OpCvt32Fto32:
   626  		v.Op = OpARM64FCVTZSSW
   627  		return true
   628  	case OpCvt32Fto32U:
   629  		v.Op = OpARM64FCVTZUSW
   630  		return true
   631  	case OpCvt32Fto64:
   632  		v.Op = OpARM64FCVTZSS
   633  		return true
   634  	case OpCvt32Fto64F:
   635  		v.Op = OpARM64FCVTSD
   636  		return true
   637  	case OpCvt32Fto64U:
   638  		v.Op = OpARM64FCVTZUS
   639  		return true
   640  	case OpCvt32Uto32F:
   641  		v.Op = OpARM64UCVTFWS
   642  		return true
   643  	case OpCvt32Uto64F:
   644  		v.Op = OpARM64UCVTFWD
   645  		return true
   646  	case OpCvt32to32F:
   647  		v.Op = OpARM64SCVTFWS
   648  		return true
   649  	case OpCvt32to64F:
   650  		v.Op = OpARM64SCVTFWD
   651  		return true
   652  	case OpCvt64Fto32:
   653  		v.Op = OpARM64FCVTZSDW
   654  		return true
   655  	case OpCvt64Fto32F:
   656  		v.Op = OpARM64FCVTDS
   657  		return true
   658  	case OpCvt64Fto32U:
   659  		v.Op = OpARM64FCVTZUDW
   660  		return true
   661  	case OpCvt64Fto64:
   662  		v.Op = OpARM64FCVTZSD
   663  		return true
   664  	case OpCvt64Fto64U:
   665  		v.Op = OpARM64FCVTZUD
   666  		return true
   667  	case OpCvt64Uto32F:
   668  		v.Op = OpARM64UCVTFS
   669  		return true
   670  	case OpCvt64Uto64F:
   671  		v.Op = OpARM64UCVTFD
   672  		return true
   673  	case OpCvt64to32F:
   674  		v.Op = OpARM64SCVTFS
   675  		return true
   676  	case OpCvt64to64F:
   677  		v.Op = OpARM64SCVTFD
   678  		return true
   679  	case OpCvtBoolToUint8:
   680  		v.Op = OpCopy
   681  		return true
   682  	case OpDiv16:
   683  		return rewriteValueARM64_OpDiv16(v)
   684  	case OpDiv16u:
   685  		return rewriteValueARM64_OpDiv16u(v)
   686  	case OpDiv32:
   687  		return rewriteValueARM64_OpDiv32(v)
   688  	case OpDiv32F:
   689  		v.Op = OpARM64FDIVS
   690  		return true
   691  	case OpDiv32u:
   692  		v.Op = OpARM64UDIVW
   693  		return true
   694  	case OpDiv64:
   695  		return rewriteValueARM64_OpDiv64(v)
   696  	case OpDiv64F:
   697  		v.Op = OpARM64FDIVD
   698  		return true
   699  	case OpDiv64u:
   700  		v.Op = OpARM64UDIV
   701  		return true
   702  	case OpDiv8:
   703  		return rewriteValueARM64_OpDiv8(v)
   704  	case OpDiv8u:
   705  		return rewriteValueARM64_OpDiv8u(v)
   706  	case OpEq16:
   707  		return rewriteValueARM64_OpEq16(v)
   708  	case OpEq32:
   709  		return rewriteValueARM64_OpEq32(v)
   710  	case OpEq32F:
   711  		return rewriteValueARM64_OpEq32F(v)
   712  	case OpEq64:
   713  		return rewriteValueARM64_OpEq64(v)
   714  	case OpEq64F:
   715  		return rewriteValueARM64_OpEq64F(v)
   716  	case OpEq8:
   717  		return rewriteValueARM64_OpEq8(v)
   718  	case OpEqB:
   719  		return rewriteValueARM64_OpEqB(v)
   720  	case OpEqPtr:
   721  		return rewriteValueARM64_OpEqPtr(v)
   722  	case OpFMA:
   723  		return rewriteValueARM64_OpFMA(v)
   724  	case OpFloor:
   725  		v.Op = OpARM64FRINTMD
   726  		return true
   727  	case OpGetCallerPC:
   728  		v.Op = OpARM64LoweredGetCallerPC
   729  		return true
   730  	case OpGetCallerSP:
   731  		v.Op = OpARM64LoweredGetCallerSP
   732  		return true
   733  	case OpGetClosurePtr:
   734  		v.Op = OpARM64LoweredGetClosurePtr
   735  		return true
   736  	case OpHmul32:
   737  		return rewriteValueARM64_OpHmul32(v)
   738  	case OpHmul32u:
   739  		return rewriteValueARM64_OpHmul32u(v)
   740  	case OpHmul64:
   741  		v.Op = OpARM64MULH
   742  		return true
   743  	case OpHmul64u:
   744  		v.Op = OpARM64UMULH
   745  		return true
   746  	case OpInterCall:
   747  		v.Op = OpARM64CALLinter
   748  		return true
   749  	case OpIsInBounds:
   750  		return rewriteValueARM64_OpIsInBounds(v)
   751  	case OpIsNonNil:
   752  		return rewriteValueARM64_OpIsNonNil(v)
   753  	case OpIsSliceInBounds:
   754  		return rewriteValueARM64_OpIsSliceInBounds(v)
   755  	case OpLeq16:
   756  		return rewriteValueARM64_OpLeq16(v)
   757  	case OpLeq16U:
   758  		return rewriteValueARM64_OpLeq16U(v)
   759  	case OpLeq32:
   760  		return rewriteValueARM64_OpLeq32(v)
   761  	case OpLeq32F:
   762  		return rewriteValueARM64_OpLeq32F(v)
   763  	case OpLeq32U:
   764  		return rewriteValueARM64_OpLeq32U(v)
   765  	case OpLeq64:
   766  		return rewriteValueARM64_OpLeq64(v)
   767  	case OpLeq64F:
   768  		return rewriteValueARM64_OpLeq64F(v)
   769  	case OpLeq64U:
   770  		return rewriteValueARM64_OpLeq64U(v)
   771  	case OpLeq8:
   772  		return rewriteValueARM64_OpLeq8(v)
   773  	case OpLeq8U:
   774  		return rewriteValueARM64_OpLeq8U(v)
   775  	case OpLess16:
   776  		return rewriteValueARM64_OpLess16(v)
   777  	case OpLess16U:
   778  		return rewriteValueARM64_OpLess16U(v)
   779  	case OpLess32:
   780  		return rewriteValueARM64_OpLess32(v)
   781  	case OpLess32F:
   782  		return rewriteValueARM64_OpLess32F(v)
   783  	case OpLess32U:
   784  		return rewriteValueARM64_OpLess32U(v)
   785  	case OpLess64:
   786  		return rewriteValueARM64_OpLess64(v)
   787  	case OpLess64F:
   788  		return rewriteValueARM64_OpLess64F(v)
   789  	case OpLess64U:
   790  		return rewriteValueARM64_OpLess64U(v)
   791  	case OpLess8:
   792  		return rewriteValueARM64_OpLess8(v)
   793  	case OpLess8U:
   794  		return rewriteValueARM64_OpLess8U(v)
   795  	case OpLoad:
   796  		return rewriteValueARM64_OpLoad(v)
   797  	case OpLocalAddr:
   798  		return rewriteValueARM64_OpLocalAddr(v)
   799  	case OpLsh16x16:
   800  		return rewriteValueARM64_OpLsh16x16(v)
   801  	case OpLsh16x32:
   802  		return rewriteValueARM64_OpLsh16x32(v)
   803  	case OpLsh16x64:
   804  		return rewriteValueARM64_OpLsh16x64(v)
   805  	case OpLsh16x8:
   806  		return rewriteValueARM64_OpLsh16x8(v)
   807  	case OpLsh32x16:
   808  		return rewriteValueARM64_OpLsh32x16(v)
   809  	case OpLsh32x32:
   810  		return rewriteValueARM64_OpLsh32x32(v)
   811  	case OpLsh32x64:
   812  		return rewriteValueARM64_OpLsh32x64(v)
   813  	case OpLsh32x8:
   814  		return rewriteValueARM64_OpLsh32x8(v)
   815  	case OpLsh64x16:
   816  		return rewriteValueARM64_OpLsh64x16(v)
   817  	case OpLsh64x32:
   818  		return rewriteValueARM64_OpLsh64x32(v)
   819  	case OpLsh64x64:
   820  		return rewriteValueARM64_OpLsh64x64(v)
   821  	case OpLsh64x8:
   822  		return rewriteValueARM64_OpLsh64x8(v)
   823  	case OpLsh8x16:
   824  		return rewriteValueARM64_OpLsh8x16(v)
   825  	case OpLsh8x32:
   826  		return rewriteValueARM64_OpLsh8x32(v)
   827  	case OpLsh8x64:
   828  		return rewriteValueARM64_OpLsh8x64(v)
   829  	case OpLsh8x8:
   830  		return rewriteValueARM64_OpLsh8x8(v)
   831  	case OpMax32F:
   832  		v.Op = OpARM64FMAXS
   833  		return true
   834  	case OpMax64F:
   835  		v.Op = OpARM64FMAXD
   836  		return true
   837  	case OpMin32F:
   838  		v.Op = OpARM64FMINS
   839  		return true
   840  	case OpMin64F:
   841  		v.Op = OpARM64FMIND
   842  		return true
   843  	case OpMod16:
   844  		return rewriteValueARM64_OpMod16(v)
   845  	case OpMod16u:
   846  		return rewriteValueARM64_OpMod16u(v)
   847  	case OpMod32:
   848  		return rewriteValueARM64_OpMod32(v)
   849  	case OpMod32u:
   850  		v.Op = OpARM64UMODW
   851  		return true
   852  	case OpMod64:
   853  		return rewriteValueARM64_OpMod64(v)
   854  	case OpMod64u:
   855  		v.Op = OpARM64UMOD
   856  		return true
   857  	case OpMod8:
   858  		return rewriteValueARM64_OpMod8(v)
   859  	case OpMod8u:
   860  		return rewriteValueARM64_OpMod8u(v)
   861  	case OpMove:
   862  		return rewriteValueARM64_OpMove(v)
   863  	case OpMul16:
   864  		v.Op = OpARM64MULW
   865  		return true
   866  	case OpMul32:
   867  		v.Op = OpARM64MULW
   868  		return true
   869  	case OpMul32F:
   870  		v.Op = OpARM64FMULS
   871  		return true
   872  	case OpMul64:
   873  		v.Op = OpARM64MUL
   874  		return true
   875  	case OpMul64F:
   876  		v.Op = OpARM64FMULD
   877  		return true
   878  	case OpMul8:
   879  		v.Op = OpARM64MULW
   880  		return true
   881  	case OpNeg16:
   882  		v.Op = OpARM64NEG
   883  		return true
   884  	case OpNeg32:
   885  		v.Op = OpARM64NEG
   886  		return true
   887  	case OpNeg32F:
   888  		v.Op = OpARM64FNEGS
   889  		return true
   890  	case OpNeg64:
   891  		v.Op = OpARM64NEG
   892  		return true
   893  	case OpNeg64F:
   894  		v.Op = OpARM64FNEGD
   895  		return true
   896  	case OpNeg8:
   897  		v.Op = OpARM64NEG
   898  		return true
   899  	case OpNeq16:
   900  		return rewriteValueARM64_OpNeq16(v)
   901  	case OpNeq32:
   902  		return rewriteValueARM64_OpNeq32(v)
   903  	case OpNeq32F:
   904  		return rewriteValueARM64_OpNeq32F(v)
   905  	case OpNeq64:
   906  		return rewriteValueARM64_OpNeq64(v)
   907  	case OpNeq64F:
   908  		return rewriteValueARM64_OpNeq64F(v)
   909  	case OpNeq8:
   910  		return rewriteValueARM64_OpNeq8(v)
   911  	case OpNeqB:
   912  		v.Op = OpARM64XOR
   913  		return true
   914  	case OpNeqPtr:
   915  		return rewriteValueARM64_OpNeqPtr(v)
   916  	case OpNilCheck:
   917  		v.Op = OpARM64LoweredNilCheck
   918  		return true
   919  	case OpNot:
   920  		return rewriteValueARM64_OpNot(v)
   921  	case OpOffPtr:
   922  		return rewriteValueARM64_OpOffPtr(v)
   923  	case OpOr16:
   924  		v.Op = OpARM64OR
   925  		return true
   926  	case OpOr32:
   927  		v.Op = OpARM64OR
   928  		return true
   929  	case OpOr64:
   930  		v.Op = OpARM64OR
   931  		return true
   932  	case OpOr8:
   933  		v.Op = OpARM64OR
   934  		return true
   935  	case OpOrB:
   936  		v.Op = OpARM64OR
   937  		return true
   938  	case OpPanicBounds:
   939  		return rewriteValueARM64_OpPanicBounds(v)
   940  	case OpPopCount16:
   941  		return rewriteValueARM64_OpPopCount16(v)
   942  	case OpPopCount32:
   943  		return rewriteValueARM64_OpPopCount32(v)
   944  	case OpPopCount64:
   945  		return rewriteValueARM64_OpPopCount64(v)
   946  	case OpPrefetchCache:
   947  		return rewriteValueARM64_OpPrefetchCache(v)
   948  	case OpPrefetchCacheStreamed:
   949  		return rewriteValueARM64_OpPrefetchCacheStreamed(v)
   950  	case OpPubBarrier:
   951  		return rewriteValueARM64_OpPubBarrier(v)
   952  	case OpRotateLeft16:
   953  		return rewriteValueARM64_OpRotateLeft16(v)
   954  	case OpRotateLeft32:
   955  		return rewriteValueARM64_OpRotateLeft32(v)
   956  	case OpRotateLeft64:
   957  		return rewriteValueARM64_OpRotateLeft64(v)
   958  	case OpRotateLeft8:
   959  		return rewriteValueARM64_OpRotateLeft8(v)
   960  	case OpRound:
   961  		v.Op = OpARM64FRINTAD
   962  		return true
   963  	case OpRound32F:
   964  		v.Op = OpARM64LoweredRound32F
   965  		return true
   966  	case OpRound64F:
   967  		v.Op = OpARM64LoweredRound64F
   968  		return true
   969  	case OpRoundToEven:
   970  		v.Op = OpARM64FRINTND
   971  		return true
   972  	case OpRsh16Ux16:
   973  		return rewriteValueARM64_OpRsh16Ux16(v)
   974  	case OpRsh16Ux32:
   975  		return rewriteValueARM64_OpRsh16Ux32(v)
   976  	case OpRsh16Ux64:
   977  		return rewriteValueARM64_OpRsh16Ux64(v)
   978  	case OpRsh16Ux8:
   979  		return rewriteValueARM64_OpRsh16Ux8(v)
   980  	case OpRsh16x16:
   981  		return rewriteValueARM64_OpRsh16x16(v)
   982  	case OpRsh16x32:
   983  		return rewriteValueARM64_OpRsh16x32(v)
   984  	case OpRsh16x64:
   985  		return rewriteValueARM64_OpRsh16x64(v)
   986  	case OpRsh16x8:
   987  		return rewriteValueARM64_OpRsh16x8(v)
   988  	case OpRsh32Ux16:
   989  		return rewriteValueARM64_OpRsh32Ux16(v)
   990  	case OpRsh32Ux32:
   991  		return rewriteValueARM64_OpRsh32Ux32(v)
   992  	case OpRsh32Ux64:
   993  		return rewriteValueARM64_OpRsh32Ux64(v)
   994  	case OpRsh32Ux8:
   995  		return rewriteValueARM64_OpRsh32Ux8(v)
   996  	case OpRsh32x16:
   997  		return rewriteValueARM64_OpRsh32x16(v)
   998  	case OpRsh32x32:
   999  		return rewriteValueARM64_OpRsh32x32(v)
  1000  	case OpRsh32x64:
  1001  		return rewriteValueARM64_OpRsh32x64(v)
  1002  	case OpRsh32x8:
  1003  		return rewriteValueARM64_OpRsh32x8(v)
  1004  	case OpRsh64Ux16:
  1005  		return rewriteValueARM64_OpRsh64Ux16(v)
  1006  	case OpRsh64Ux32:
  1007  		return rewriteValueARM64_OpRsh64Ux32(v)
  1008  	case OpRsh64Ux64:
  1009  		return rewriteValueARM64_OpRsh64Ux64(v)
  1010  	case OpRsh64Ux8:
  1011  		return rewriteValueARM64_OpRsh64Ux8(v)
  1012  	case OpRsh64x16:
  1013  		return rewriteValueARM64_OpRsh64x16(v)
  1014  	case OpRsh64x32:
  1015  		return rewriteValueARM64_OpRsh64x32(v)
  1016  	case OpRsh64x64:
  1017  		return rewriteValueARM64_OpRsh64x64(v)
  1018  	case OpRsh64x8:
  1019  		return rewriteValueARM64_OpRsh64x8(v)
  1020  	case OpRsh8Ux16:
  1021  		return rewriteValueARM64_OpRsh8Ux16(v)
  1022  	case OpRsh8Ux32:
  1023  		return rewriteValueARM64_OpRsh8Ux32(v)
  1024  	case OpRsh8Ux64:
  1025  		return rewriteValueARM64_OpRsh8Ux64(v)
  1026  	case OpRsh8Ux8:
  1027  		return rewriteValueARM64_OpRsh8Ux8(v)
  1028  	case OpRsh8x16:
  1029  		return rewriteValueARM64_OpRsh8x16(v)
  1030  	case OpRsh8x32:
  1031  		return rewriteValueARM64_OpRsh8x32(v)
  1032  	case OpRsh8x64:
  1033  		return rewriteValueARM64_OpRsh8x64(v)
  1034  	case OpRsh8x8:
  1035  		return rewriteValueARM64_OpRsh8x8(v)
  1036  	case OpSelect0:
  1037  		return rewriteValueARM64_OpSelect0(v)
  1038  	case OpSelect1:
  1039  		return rewriteValueARM64_OpSelect1(v)
  1040  	case OpSelectN:
  1041  		return rewriteValueARM64_OpSelectN(v)
  1042  	case OpSignExt16to32:
  1043  		v.Op = OpARM64MOVHreg
  1044  		return true
  1045  	case OpSignExt16to64:
  1046  		v.Op = OpARM64MOVHreg
  1047  		return true
  1048  	case OpSignExt32to64:
  1049  		v.Op = OpARM64MOVWreg
  1050  		return true
  1051  	case OpSignExt8to16:
  1052  		v.Op = OpARM64MOVBreg
  1053  		return true
  1054  	case OpSignExt8to32:
  1055  		v.Op = OpARM64MOVBreg
  1056  		return true
  1057  	case OpSignExt8to64:
  1058  		v.Op = OpARM64MOVBreg
  1059  		return true
  1060  	case OpSlicemask:
  1061  		return rewriteValueARM64_OpSlicemask(v)
  1062  	case OpSqrt:
  1063  		v.Op = OpARM64FSQRTD
  1064  		return true
  1065  	case OpSqrt32:
  1066  		v.Op = OpARM64FSQRTS
  1067  		return true
  1068  	case OpStaticCall:
  1069  		v.Op = OpARM64CALLstatic
  1070  		return true
  1071  	case OpStore:
  1072  		return rewriteValueARM64_OpStore(v)
  1073  	case OpSub16:
  1074  		v.Op = OpARM64SUB
  1075  		return true
  1076  	case OpSub32:
  1077  		v.Op = OpARM64SUB
  1078  		return true
  1079  	case OpSub32F:
  1080  		v.Op = OpARM64FSUBS
  1081  		return true
  1082  	case OpSub64:
  1083  		v.Op = OpARM64SUB
  1084  		return true
  1085  	case OpSub64F:
  1086  		v.Op = OpARM64FSUBD
  1087  		return true
  1088  	case OpSub8:
  1089  		v.Op = OpARM64SUB
  1090  		return true
  1091  	case OpSubPtr:
  1092  		v.Op = OpARM64SUB
  1093  		return true
  1094  	case OpTailCall:
  1095  		v.Op = OpARM64CALLtail
  1096  		return true
  1097  	case OpTrunc:
  1098  		v.Op = OpARM64FRINTZD
  1099  		return true
  1100  	case OpTrunc16to8:
  1101  		v.Op = OpCopy
  1102  		return true
  1103  	case OpTrunc32to16:
  1104  		v.Op = OpCopy
  1105  		return true
  1106  	case OpTrunc32to8:
  1107  		v.Op = OpCopy
  1108  		return true
  1109  	case OpTrunc64to16:
  1110  		v.Op = OpCopy
  1111  		return true
  1112  	case OpTrunc64to32:
  1113  		v.Op = OpCopy
  1114  		return true
  1115  	case OpTrunc64to8:
  1116  		v.Op = OpCopy
  1117  		return true
  1118  	case OpWB:
  1119  		v.Op = OpARM64LoweredWB
  1120  		return true
  1121  	case OpXor16:
  1122  		v.Op = OpARM64XOR
  1123  		return true
  1124  	case OpXor32:
  1125  		v.Op = OpARM64XOR
  1126  		return true
  1127  	case OpXor64:
  1128  		v.Op = OpARM64XOR
  1129  		return true
  1130  	case OpXor8:
  1131  		v.Op = OpARM64XOR
  1132  		return true
  1133  	case OpZero:
  1134  		return rewriteValueARM64_OpZero(v)
  1135  	case OpZeroExt16to32:
  1136  		v.Op = OpARM64MOVHUreg
  1137  		return true
  1138  	case OpZeroExt16to64:
  1139  		v.Op = OpARM64MOVHUreg
  1140  		return true
  1141  	case OpZeroExt32to64:
  1142  		v.Op = OpARM64MOVWUreg
  1143  		return true
  1144  	case OpZeroExt8to16:
  1145  		v.Op = OpARM64MOVBUreg
  1146  		return true
  1147  	case OpZeroExt8to32:
  1148  		v.Op = OpARM64MOVBUreg
  1149  		return true
  1150  	case OpZeroExt8to64:
  1151  		v.Op = OpARM64MOVBUreg
  1152  		return true
  1153  	}
  1154  	return false
  1155  }
  1156  func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
  1157  	v_2 := v.Args[2]
  1158  	v_1 := v.Args[1]
  1159  	v_0 := v.Args[0]
  1160  	b := v.Block
  1161  	typ := &b.Func.Config.Types
  1162  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c))))
  1163  	// result: (ADCSflags x y c)
  1164  	for {
  1165  		x := v_0
  1166  		y := v_1
  1167  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1168  			break
  1169  		}
  1170  		v_2_0 := v_2.Args[0]
  1171  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1172  			break
  1173  		}
  1174  		v_2_0_0 := v_2_0.Args[0]
  1175  		if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
  1176  			break
  1177  		}
  1178  		c := v_2_0_0.Args[0]
  1179  		v.reset(OpARM64ADCSflags)
  1180  		v.AddArg3(x, y, c)
  1181  		return true
  1182  	}
  1183  	// match: (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (MOVDconst [0]))))
  1184  	// result: (ADDSflags x y)
  1185  	for {
  1186  		x := v_0
  1187  		y := v_1
  1188  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
  1189  			break
  1190  		}
  1191  		v_2_0 := v_2.Args[0]
  1192  		if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
  1193  			break
  1194  		}
  1195  		v_2_0_0 := v_2_0.Args[0]
  1196  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
  1197  			break
  1198  		}
  1199  		v.reset(OpARM64ADDSflags)
  1200  		v.AddArg2(x, y)
  1201  		return true
  1202  	}
  1203  	return false
  1204  }
  1205  func rewriteValueARM64_OpARM64ADD(v *Value) bool {
  1206  	v_1 := v.Args[1]
  1207  	v_0 := v.Args[0]
  1208  	b := v.Block
  1209  	// match: (ADD x (MOVDconst <t> [c]))
  1210  	// cond: !t.IsPtr()
  1211  	// result: (ADDconst [c] x)
  1212  	for {
  1213  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1214  			x := v_0
  1215  			if v_1.Op != OpARM64MOVDconst {
  1216  				continue
  1217  			}
  1218  			t := v_1.Type
  1219  			c := auxIntToInt64(v_1.AuxInt)
  1220  			if !(!t.IsPtr()) {
  1221  				continue
  1222  			}
  1223  			v.reset(OpARM64ADDconst)
  1224  			v.AuxInt = int64ToAuxInt(c)
  1225  			v.AddArg(x)
  1226  			return true
  1227  		}
  1228  		break
  1229  	}
  1230  	// match: (ADD a l:(MUL x y))
  1231  	// cond: l.Uses==1 && clobber(l)
  1232  	// result: (MADD a x y)
  1233  	for {
  1234  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1235  			a := v_0
  1236  			l := v_1
  1237  			if l.Op != OpARM64MUL {
  1238  				continue
  1239  			}
  1240  			y := l.Args[1]
  1241  			x := l.Args[0]
  1242  			if !(l.Uses == 1 && clobber(l)) {
  1243  				continue
  1244  			}
  1245  			v.reset(OpARM64MADD)
  1246  			v.AddArg3(a, x, y)
  1247  			return true
  1248  		}
  1249  		break
  1250  	}
  1251  	// match: (ADD a l:(MNEG x y))
  1252  	// cond: l.Uses==1 && clobber(l)
  1253  	// result: (MSUB a x y)
  1254  	for {
  1255  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1256  			a := v_0
  1257  			l := v_1
  1258  			if l.Op != OpARM64MNEG {
  1259  				continue
  1260  			}
  1261  			y := l.Args[1]
  1262  			x := l.Args[0]
  1263  			if !(l.Uses == 1 && clobber(l)) {
  1264  				continue
  1265  			}
  1266  			v.reset(OpARM64MSUB)
  1267  			v.AddArg3(a, x, y)
  1268  			return true
  1269  		}
  1270  		break
  1271  	}
  1272  	// match: (ADD a l:(MULW x y))
  1273  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1274  	// result: (MADDW a x y)
  1275  	for {
  1276  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1277  			a := v_0
  1278  			l := v_1
  1279  			if l.Op != OpARM64MULW {
  1280  				continue
  1281  			}
  1282  			y := l.Args[1]
  1283  			x := l.Args[0]
  1284  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1285  				continue
  1286  			}
  1287  			v.reset(OpARM64MADDW)
  1288  			v.AddArg3(a, x, y)
  1289  			return true
  1290  		}
  1291  		break
  1292  	}
  1293  	// match: (ADD a l:(MNEGW x y))
  1294  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
  1295  	// result: (MSUBW a x y)
  1296  	for {
  1297  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1298  			a := v_0
  1299  			l := v_1
  1300  			if l.Op != OpARM64MNEGW {
  1301  				continue
  1302  			}
  1303  			y := l.Args[1]
  1304  			x := l.Args[0]
  1305  			if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
  1306  				continue
  1307  			}
  1308  			v.reset(OpARM64MSUBW)
  1309  			v.AddArg3(a, x, y)
  1310  			return true
  1311  		}
  1312  		break
  1313  	}
  1314  	// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
  1315  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1316  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1317  	for {
  1318  		t := v.Type
  1319  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1320  			a := v_0
  1321  			p := v_1
  1322  			if p.Op != OpARM64ADDconst {
  1323  				continue
  1324  			}
  1325  			c := auxIntToInt64(p.AuxInt)
  1326  			m := p.Args[0]
  1327  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1328  				continue
  1329  			}
  1330  			v.reset(OpARM64ADDconst)
  1331  			v.AuxInt = int64ToAuxInt(c)
  1332  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1333  			v0.AddArg2(a, m)
  1334  			v.AddArg(v0)
  1335  			return true
  1336  		}
  1337  		break
  1338  	}
  1339  	// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
  1340  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1341  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1342  	for {
  1343  		t := v.Type
  1344  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1345  			a := v_0
  1346  			p := v_1
  1347  			if p.Op != OpARM64ADDconst {
  1348  				continue
  1349  			}
  1350  			c := auxIntToInt64(p.AuxInt)
  1351  			m := p.Args[0]
  1352  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1353  				continue
  1354  			}
  1355  			v.reset(OpARM64ADDconst)
  1356  			v.AuxInt = int64ToAuxInt(c)
  1357  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1358  			v0.AddArg2(a, m)
  1359  			v.AddArg(v0)
  1360  			return true
  1361  		}
  1362  		break
  1363  	}
  1364  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
  1365  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1366  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1367  	for {
  1368  		t := v.Type
  1369  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1370  			a := v_0
  1371  			p := v_1
  1372  			if p.Op != OpARM64ADDconst {
  1373  				continue
  1374  			}
  1375  			c := auxIntToInt64(p.AuxInt)
  1376  			m := p.Args[0]
  1377  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1378  				continue
  1379  			}
  1380  			v.reset(OpARM64ADDconst)
  1381  			v.AuxInt = int64ToAuxInt(c)
  1382  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1383  			v0.AddArg2(a, m)
  1384  			v.AddArg(v0)
  1385  			return true
  1386  		}
  1387  		break
  1388  	}
  1389  	// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
  1390  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1391  	// result: (ADDconst [c] (ADD <v.Type> a m))
  1392  	for {
  1393  		t := v.Type
  1394  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1395  			a := v_0
  1396  			p := v_1
  1397  			if p.Op != OpARM64ADDconst {
  1398  				continue
  1399  			}
  1400  			c := auxIntToInt64(p.AuxInt)
  1401  			m := p.Args[0]
  1402  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1403  				continue
  1404  			}
  1405  			v.reset(OpARM64ADDconst)
  1406  			v.AuxInt = int64ToAuxInt(c)
  1407  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1408  			v0.AddArg2(a, m)
  1409  			v.AddArg(v0)
  1410  			return true
  1411  		}
  1412  		break
  1413  	}
  1414  	// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
  1415  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1416  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1417  	for {
  1418  		t := v.Type
  1419  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1420  			a := v_0
  1421  			p := v_1
  1422  			if p.Op != OpARM64SUBconst {
  1423  				continue
  1424  			}
  1425  			c := auxIntToInt64(p.AuxInt)
  1426  			m := p.Args[0]
  1427  			if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1428  				continue
  1429  			}
  1430  			v.reset(OpARM64SUBconst)
  1431  			v.AuxInt = int64ToAuxInt(c)
  1432  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1433  			v0.AddArg2(a, m)
  1434  			v.AddArg(v0)
  1435  			return true
  1436  		}
  1437  		break
  1438  	}
  1439  	// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
  1440  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1441  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1442  	for {
  1443  		t := v.Type
  1444  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1445  			a := v_0
  1446  			p := v_1
  1447  			if p.Op != OpARM64SUBconst {
  1448  				continue
  1449  			}
  1450  			c := auxIntToInt64(p.AuxInt)
  1451  			m := p.Args[0]
  1452  			if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1453  				continue
  1454  			}
  1455  			v.reset(OpARM64SUBconst)
  1456  			v.AuxInt = int64ToAuxInt(c)
  1457  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1458  			v0.AddArg2(a, m)
  1459  			v.AddArg(v0)
  1460  			return true
  1461  		}
  1462  		break
  1463  	}
  1464  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
  1465  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1466  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1467  	for {
  1468  		t := v.Type
  1469  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1470  			a := v_0
  1471  			p := v_1
  1472  			if p.Op != OpARM64SUBconst {
  1473  				continue
  1474  			}
  1475  			c := auxIntToInt64(p.AuxInt)
  1476  			m := p.Args[0]
  1477  			if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1478  				continue
  1479  			}
  1480  			v.reset(OpARM64SUBconst)
  1481  			v.AuxInt = int64ToAuxInt(c)
  1482  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1483  			v0.AddArg2(a, m)
  1484  			v.AddArg(v0)
  1485  			return true
  1486  		}
  1487  		break
  1488  	}
  1489  	// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
  1490  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
  1491  	// result: (SUBconst [c] (ADD <v.Type> a m))
  1492  	for {
  1493  		t := v.Type
  1494  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1495  			a := v_0
  1496  			p := v_1
  1497  			if p.Op != OpARM64SUBconst {
  1498  				continue
  1499  			}
  1500  			c := auxIntToInt64(p.AuxInt)
  1501  			m := p.Args[0]
  1502  			if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
  1503  				continue
  1504  			}
  1505  			v.reset(OpARM64SUBconst)
  1506  			v.AuxInt = int64ToAuxInt(c)
  1507  			v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
  1508  			v0.AddArg2(a, m)
  1509  			v.AddArg(v0)
  1510  			return true
  1511  		}
  1512  		break
  1513  	}
  1514  	// match: (ADD x (NEG y))
  1515  	// result: (SUB x y)
  1516  	for {
  1517  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1518  			x := v_0
  1519  			if v_1.Op != OpARM64NEG {
  1520  				continue
  1521  			}
  1522  			y := v_1.Args[0]
  1523  			v.reset(OpARM64SUB)
  1524  			v.AddArg2(x, y)
  1525  			return true
  1526  		}
  1527  		break
  1528  	}
  1529  	// match: (ADD x0 x1:(SLLconst [c] y))
  1530  	// cond: clobberIfDead(x1)
  1531  	// result: (ADDshiftLL x0 y [c])
  1532  	for {
  1533  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1534  			x0 := v_0
  1535  			x1 := v_1
  1536  			if x1.Op != OpARM64SLLconst {
  1537  				continue
  1538  			}
  1539  			c := auxIntToInt64(x1.AuxInt)
  1540  			y := x1.Args[0]
  1541  			if !(clobberIfDead(x1)) {
  1542  				continue
  1543  			}
  1544  			v.reset(OpARM64ADDshiftLL)
  1545  			v.AuxInt = int64ToAuxInt(c)
  1546  			v.AddArg2(x0, y)
  1547  			return true
  1548  		}
  1549  		break
  1550  	}
  1551  	// match: (ADD x0 x1:(SRLconst [c] y))
  1552  	// cond: clobberIfDead(x1)
  1553  	// result: (ADDshiftRL x0 y [c])
  1554  	for {
  1555  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1556  			x0 := v_0
  1557  			x1 := v_1
  1558  			if x1.Op != OpARM64SRLconst {
  1559  				continue
  1560  			}
  1561  			c := auxIntToInt64(x1.AuxInt)
  1562  			y := x1.Args[0]
  1563  			if !(clobberIfDead(x1)) {
  1564  				continue
  1565  			}
  1566  			v.reset(OpARM64ADDshiftRL)
  1567  			v.AuxInt = int64ToAuxInt(c)
  1568  			v.AddArg2(x0, y)
  1569  			return true
  1570  		}
  1571  		break
  1572  	}
  1573  	// match: (ADD x0 x1:(SRAconst [c] y))
  1574  	// cond: clobberIfDead(x1)
  1575  	// result: (ADDshiftRA x0 y [c])
  1576  	for {
  1577  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1578  			x0 := v_0
  1579  			x1 := v_1
  1580  			if x1.Op != OpARM64SRAconst {
  1581  				continue
  1582  			}
  1583  			c := auxIntToInt64(x1.AuxInt)
  1584  			y := x1.Args[0]
  1585  			if !(clobberIfDead(x1)) {
  1586  				continue
  1587  			}
  1588  			v.reset(OpARM64ADDshiftRA)
  1589  			v.AuxInt = int64ToAuxInt(c)
  1590  			v.AddArg2(x0, y)
  1591  			return true
  1592  		}
  1593  		break
  1594  	}
  1595  	return false
  1596  }
  1597  func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
  1598  	v_1 := v.Args[1]
  1599  	v_0 := v.Args[0]
  1600  	// match: (ADDSflags x (MOVDconst [c]))
  1601  	// result: (ADDSconstflags [c] x)
  1602  	for {
  1603  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1604  			x := v_0
  1605  			if v_1.Op != OpARM64MOVDconst {
  1606  				continue
  1607  			}
  1608  			c := auxIntToInt64(v_1.AuxInt)
  1609  			v.reset(OpARM64ADDSconstflags)
  1610  			v.AuxInt = int64ToAuxInt(c)
  1611  			v.AddArg(x)
  1612  			return true
  1613  		}
  1614  		break
  1615  	}
  1616  	return false
  1617  }
  1618  func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
  1619  	v_0 := v.Args[0]
  1620  	// match: (ADDconst [off1] (MOVDaddr [off2] {sym} ptr))
  1621  	// cond: is32Bit(off1+int64(off2))
  1622  	// result: (MOVDaddr [int32(off1)+off2] {sym} ptr)
  1623  	for {
  1624  		off1 := auxIntToInt64(v.AuxInt)
  1625  		if v_0.Op != OpARM64MOVDaddr {
  1626  			break
  1627  		}
  1628  		off2 := auxIntToInt32(v_0.AuxInt)
  1629  		sym := auxToSym(v_0.Aux)
  1630  		ptr := v_0.Args[0]
  1631  		if !(is32Bit(off1 + int64(off2))) {
  1632  			break
  1633  		}
  1634  		v.reset(OpARM64MOVDaddr)
  1635  		v.AuxInt = int32ToAuxInt(int32(off1) + off2)
  1636  		v.Aux = symToAux(sym)
  1637  		v.AddArg(ptr)
  1638  		return true
  1639  	}
  1640  	// match: (ADDconst [c] y)
  1641  	// cond: c < 0
  1642  	// result: (SUBconst [-c] y)
  1643  	for {
  1644  		c := auxIntToInt64(v.AuxInt)
  1645  		y := v_0
  1646  		if !(c < 0) {
  1647  			break
  1648  		}
  1649  		v.reset(OpARM64SUBconst)
  1650  		v.AuxInt = int64ToAuxInt(-c)
  1651  		v.AddArg(y)
  1652  		return true
  1653  	}
  1654  	// match: (ADDconst [0] x)
  1655  	// result: x
  1656  	for {
  1657  		if auxIntToInt64(v.AuxInt) != 0 {
  1658  			break
  1659  		}
  1660  		x := v_0
  1661  		v.copyOf(x)
  1662  		return true
  1663  	}
  1664  	// match: (ADDconst [c] (MOVDconst [d]))
  1665  	// result: (MOVDconst [c+d])
  1666  	for {
  1667  		c := auxIntToInt64(v.AuxInt)
  1668  		if v_0.Op != OpARM64MOVDconst {
  1669  			break
  1670  		}
  1671  		d := auxIntToInt64(v_0.AuxInt)
  1672  		v.reset(OpARM64MOVDconst)
  1673  		v.AuxInt = int64ToAuxInt(c + d)
  1674  		return true
  1675  	}
  1676  	// match: (ADDconst [c] (ADDconst [d] x))
  1677  	// result: (ADDconst [c+d] x)
  1678  	for {
  1679  		c := auxIntToInt64(v.AuxInt)
  1680  		if v_0.Op != OpARM64ADDconst {
  1681  			break
  1682  		}
  1683  		d := auxIntToInt64(v_0.AuxInt)
  1684  		x := v_0.Args[0]
  1685  		v.reset(OpARM64ADDconst)
  1686  		v.AuxInt = int64ToAuxInt(c + d)
  1687  		v.AddArg(x)
  1688  		return true
  1689  	}
  1690  	// match: (ADDconst [c] (SUBconst [d] x))
  1691  	// result: (ADDconst [c-d] x)
  1692  	for {
  1693  		c := auxIntToInt64(v.AuxInt)
  1694  		if v_0.Op != OpARM64SUBconst {
  1695  			break
  1696  		}
  1697  		d := auxIntToInt64(v_0.AuxInt)
  1698  		x := v_0.Args[0]
  1699  		v.reset(OpARM64ADDconst)
  1700  		v.AuxInt = int64ToAuxInt(c - d)
  1701  		v.AddArg(x)
  1702  		return true
  1703  	}
  1704  	return false
  1705  }
  1706  func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
  1707  	v_1 := v.Args[1]
  1708  	v_0 := v.Args[0]
  1709  	b := v.Block
  1710  	typ := &b.Func.Config.Types
  1711  	// match: (ADDshiftLL (MOVDconst [c]) x [d])
  1712  	// result: (ADDconst [c] (SLLconst <x.Type> x [d]))
  1713  	for {
  1714  		d := auxIntToInt64(v.AuxInt)
  1715  		if v_0.Op != OpARM64MOVDconst {
  1716  			break
  1717  		}
  1718  		c := auxIntToInt64(v_0.AuxInt)
  1719  		x := v_1
  1720  		v.reset(OpARM64ADDconst)
  1721  		v.AuxInt = int64ToAuxInt(c)
  1722  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  1723  		v0.AuxInt = int64ToAuxInt(d)
  1724  		v0.AddArg(x)
  1725  		v.AddArg(v0)
  1726  		return true
  1727  	}
  1728  	// match: (ADDshiftLL x (MOVDconst [c]) [d])
  1729  	// result: (ADDconst x [int64(uint64(c)<<uint64(d))])
  1730  	for {
  1731  		d := auxIntToInt64(v.AuxInt)
  1732  		x := v_0
  1733  		if v_1.Op != OpARM64MOVDconst {
  1734  			break
  1735  		}
  1736  		c := auxIntToInt64(v_1.AuxInt)
  1737  		v.reset(OpARM64ADDconst)
  1738  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  1739  		v.AddArg(x)
  1740  		return true
  1741  	}
  1742  	// match: (ADDshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
  1743  	// result: (REV16W x)
  1744  	for {
  1745  		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) {
  1746  			break
  1747  		}
  1748  		x := v_0.Args[0]
  1749  		if x != v_1 {
  1750  			break
  1751  		}
  1752  		v.reset(OpARM64REV16W)
  1753  		v.AddArg(x)
  1754  		return true
  1755  	}
  1756  	// match: (ADDshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
  1757  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
  1758  	// result: (REV16W x)
  1759  	for {
  1760  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
  1761  			break
  1762  		}
  1763  		v_0_0 := v_0.Args[0]
  1764  		if v_0_0.Op != OpARM64ANDconst {
  1765  			break
  1766  		}
  1767  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1768  		x := v_0_0.Args[0]
  1769  		if v_1.Op != OpARM64ANDconst {
  1770  			break
  1771  		}
  1772  		c2 := auxIntToInt64(v_1.AuxInt)
  1773  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
  1774  			break
  1775  		}
  1776  		v.reset(OpARM64REV16W)
  1777  		v.AddArg(x)
  1778  		return true
  1779  	}
  1780  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1781  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
  1782  	// result: (REV16 x)
  1783  	for {
  1784  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1785  			break
  1786  		}
  1787  		v_0_0 := v_0.Args[0]
  1788  		if v_0_0.Op != OpARM64ANDconst {
  1789  			break
  1790  		}
  1791  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1792  		x := v_0_0.Args[0]
  1793  		if v_1.Op != OpARM64ANDconst {
  1794  			break
  1795  		}
  1796  		c2 := auxIntToInt64(v_1.AuxInt)
  1797  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
  1798  			break
  1799  		}
  1800  		v.reset(OpARM64REV16)
  1801  		v.AddArg(x)
  1802  		return true
  1803  	}
  1804  	// match: (ADDshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
  1805  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
  1806  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
  1807  	for {
  1808  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
  1809  			break
  1810  		}
  1811  		v_0_0 := v_0.Args[0]
  1812  		if v_0_0.Op != OpARM64ANDconst {
  1813  			break
  1814  		}
  1815  		c1 := auxIntToInt64(v_0_0.AuxInt)
  1816  		x := v_0_0.Args[0]
  1817  		if v_1.Op != OpARM64ANDconst {
  1818  			break
  1819  		}
  1820  		c2 := auxIntToInt64(v_1.AuxInt)
  1821  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
  1822  			break
  1823  		}
  1824  		v.reset(OpARM64REV16)
  1825  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
  1826  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  1827  		v0.AddArg(x)
  1828  		v.AddArg(v0)
  1829  		return true
  1830  	}
  1831  	// match: (ADDshiftLL [c] (SRLconst x [64-c]) x2)
  1832  	// result: (EXTRconst [64-c] x2 x)
  1833  	for {
  1834  		c := auxIntToInt64(v.AuxInt)
  1835  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
  1836  			break
  1837  		}
  1838  		x := v_0.Args[0]
  1839  		x2 := v_1
  1840  		v.reset(OpARM64EXTRconst)
  1841  		v.AuxInt = int64ToAuxInt(64 - c)
  1842  		v.AddArg2(x2, x)
  1843  		return true
  1844  	}
  1845  	// match: (ADDshiftLL <t> [c] (UBFX [bfc] x) x2)
  1846  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
  1847  	// result: (EXTRWconst [32-c] x2 x)
  1848  	for {
  1849  		t := v.Type
  1850  		c := auxIntToInt64(v.AuxInt)
  1851  		if v_0.Op != OpARM64UBFX {
  1852  			break
  1853  		}
  1854  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  1855  		x := v_0.Args[0]
  1856  		x2 := v_1
  1857  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
  1858  			break
  1859  		}
  1860  		v.reset(OpARM64EXTRWconst)
  1861  		v.AuxInt = int64ToAuxInt(32 - c)
  1862  		v.AddArg2(x2, x)
  1863  		return true
  1864  	}
  1865  	return false
  1866  }
  1867  func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
  1868  	v_1 := v.Args[1]
  1869  	v_0 := v.Args[0]
  1870  	b := v.Block
  1871  	// match: (ADDshiftRA (MOVDconst [c]) x [d])
  1872  	// result: (ADDconst [c] (SRAconst <x.Type> x [d]))
  1873  	for {
  1874  		d := auxIntToInt64(v.AuxInt)
  1875  		if v_0.Op != OpARM64MOVDconst {
  1876  			break
  1877  		}
  1878  		c := auxIntToInt64(v_0.AuxInt)
  1879  		x := v_1
  1880  		v.reset(OpARM64ADDconst)
  1881  		v.AuxInt = int64ToAuxInt(c)
  1882  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  1883  		v0.AuxInt = int64ToAuxInt(d)
  1884  		v0.AddArg(x)
  1885  		v.AddArg(v0)
  1886  		return true
  1887  	}
  1888  	// match: (ADDshiftRA x (MOVDconst [c]) [d])
  1889  	// result: (ADDconst x [c>>uint64(d)])
  1890  	for {
  1891  		d := auxIntToInt64(v.AuxInt)
  1892  		x := v_0
  1893  		if v_1.Op != OpARM64MOVDconst {
  1894  			break
  1895  		}
  1896  		c := auxIntToInt64(v_1.AuxInt)
  1897  		v.reset(OpARM64ADDconst)
  1898  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  1899  		v.AddArg(x)
  1900  		return true
  1901  	}
  1902  	return false
  1903  }
  1904  func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
  1905  	v_1 := v.Args[1]
  1906  	v_0 := v.Args[0]
  1907  	b := v.Block
  1908  	// match: (ADDshiftRL (MOVDconst [c]) x [d])
  1909  	// result: (ADDconst [c] (SRLconst <x.Type> x [d]))
  1910  	for {
  1911  		d := auxIntToInt64(v.AuxInt)
  1912  		if v_0.Op != OpARM64MOVDconst {
  1913  			break
  1914  		}
  1915  		c := auxIntToInt64(v_0.AuxInt)
  1916  		x := v_1
  1917  		v.reset(OpARM64ADDconst)
  1918  		v.AuxInt = int64ToAuxInt(c)
  1919  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  1920  		v0.AuxInt = int64ToAuxInt(d)
  1921  		v0.AddArg(x)
  1922  		v.AddArg(v0)
  1923  		return true
  1924  	}
  1925  	// match: (ADDshiftRL x (MOVDconst [c]) [d])
  1926  	// result: (ADDconst x [int64(uint64(c)>>uint64(d))])
  1927  	for {
  1928  		d := auxIntToInt64(v.AuxInt)
  1929  		x := v_0
  1930  		if v_1.Op != OpARM64MOVDconst {
  1931  			break
  1932  		}
  1933  		c := auxIntToInt64(v_1.AuxInt)
  1934  		v.reset(OpARM64ADDconst)
  1935  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  1936  		v.AddArg(x)
  1937  		return true
  1938  	}
  1939  	return false
  1940  }
  1941  func rewriteValueARM64_OpARM64AND(v *Value) bool {
  1942  	v_1 := v.Args[1]
  1943  	v_0 := v.Args[0]
  1944  	// match: (AND x (MOVDconst [c]))
  1945  	// result: (ANDconst [c] x)
  1946  	for {
  1947  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1948  			x := v_0
  1949  			if v_1.Op != OpARM64MOVDconst {
  1950  				continue
  1951  			}
  1952  			c := auxIntToInt64(v_1.AuxInt)
  1953  			v.reset(OpARM64ANDconst)
  1954  			v.AuxInt = int64ToAuxInt(c)
  1955  			v.AddArg(x)
  1956  			return true
  1957  		}
  1958  		break
  1959  	}
  1960  	// match: (AND x x)
  1961  	// result: x
  1962  	for {
  1963  		x := v_0
  1964  		if x != v_1 {
  1965  			break
  1966  		}
  1967  		v.copyOf(x)
  1968  		return true
  1969  	}
  1970  	// match: (AND x (MVN y))
  1971  	// result: (BIC x y)
  1972  	for {
  1973  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1974  			x := v_0
  1975  			if v_1.Op != OpARM64MVN {
  1976  				continue
  1977  			}
  1978  			y := v_1.Args[0]
  1979  			v.reset(OpARM64BIC)
  1980  			v.AddArg2(x, y)
  1981  			return true
  1982  		}
  1983  		break
  1984  	}
  1985  	// match: (AND x0 x1:(SLLconst [c] y))
  1986  	// cond: clobberIfDead(x1)
  1987  	// result: (ANDshiftLL x0 y [c])
  1988  	for {
  1989  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1990  			x0 := v_0
  1991  			x1 := v_1
  1992  			if x1.Op != OpARM64SLLconst {
  1993  				continue
  1994  			}
  1995  			c := auxIntToInt64(x1.AuxInt)
  1996  			y := x1.Args[0]
  1997  			if !(clobberIfDead(x1)) {
  1998  				continue
  1999  			}
  2000  			v.reset(OpARM64ANDshiftLL)
  2001  			v.AuxInt = int64ToAuxInt(c)
  2002  			v.AddArg2(x0, y)
  2003  			return true
  2004  		}
  2005  		break
  2006  	}
  2007  	// match: (AND x0 x1:(SRLconst [c] y))
  2008  	// cond: clobberIfDead(x1)
  2009  	// result: (ANDshiftRL x0 y [c])
  2010  	for {
  2011  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2012  			x0 := v_0
  2013  			x1 := v_1
  2014  			if x1.Op != OpARM64SRLconst {
  2015  				continue
  2016  			}
  2017  			c := auxIntToInt64(x1.AuxInt)
  2018  			y := x1.Args[0]
  2019  			if !(clobberIfDead(x1)) {
  2020  				continue
  2021  			}
  2022  			v.reset(OpARM64ANDshiftRL)
  2023  			v.AuxInt = int64ToAuxInt(c)
  2024  			v.AddArg2(x0, y)
  2025  			return true
  2026  		}
  2027  		break
  2028  	}
  2029  	// match: (AND x0 x1:(SRAconst [c] y))
  2030  	// cond: clobberIfDead(x1)
  2031  	// result: (ANDshiftRA x0 y [c])
  2032  	for {
  2033  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2034  			x0 := v_0
  2035  			x1 := v_1
  2036  			if x1.Op != OpARM64SRAconst {
  2037  				continue
  2038  			}
  2039  			c := auxIntToInt64(x1.AuxInt)
  2040  			y := x1.Args[0]
  2041  			if !(clobberIfDead(x1)) {
  2042  				continue
  2043  			}
  2044  			v.reset(OpARM64ANDshiftRA)
  2045  			v.AuxInt = int64ToAuxInt(c)
  2046  			v.AddArg2(x0, y)
  2047  			return true
  2048  		}
  2049  		break
  2050  	}
  2051  	// match: (AND x0 x1:(RORconst [c] y))
  2052  	// cond: clobberIfDead(x1)
  2053  	// result: (ANDshiftRO x0 y [c])
  2054  	for {
  2055  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2056  			x0 := v_0
  2057  			x1 := v_1
  2058  			if x1.Op != OpARM64RORconst {
  2059  				continue
  2060  			}
  2061  			c := auxIntToInt64(x1.AuxInt)
  2062  			y := x1.Args[0]
  2063  			if !(clobberIfDead(x1)) {
  2064  				continue
  2065  			}
  2066  			v.reset(OpARM64ANDshiftRO)
  2067  			v.AuxInt = int64ToAuxInt(c)
  2068  			v.AddArg2(x0, y)
  2069  			return true
  2070  		}
  2071  		break
  2072  	}
  2073  	return false
  2074  }
  2075  func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
  2076  	v_0 := v.Args[0]
  2077  	// match: (ANDconst [0] _)
  2078  	// result: (MOVDconst [0])
  2079  	for {
  2080  		if auxIntToInt64(v.AuxInt) != 0 {
  2081  			break
  2082  		}
  2083  		v.reset(OpARM64MOVDconst)
  2084  		v.AuxInt = int64ToAuxInt(0)
  2085  		return true
  2086  	}
  2087  	// match: (ANDconst [-1] x)
  2088  	// result: x
  2089  	for {
  2090  		if auxIntToInt64(v.AuxInt) != -1 {
  2091  			break
  2092  		}
  2093  		x := v_0
  2094  		v.copyOf(x)
  2095  		return true
  2096  	}
  2097  	// match: (ANDconst [c] (MOVDconst [d]))
  2098  	// result: (MOVDconst [c&d])
  2099  	for {
  2100  		c := auxIntToInt64(v.AuxInt)
  2101  		if v_0.Op != OpARM64MOVDconst {
  2102  			break
  2103  		}
  2104  		d := auxIntToInt64(v_0.AuxInt)
  2105  		v.reset(OpARM64MOVDconst)
  2106  		v.AuxInt = int64ToAuxInt(c & d)
  2107  		return true
  2108  	}
  2109  	// match: (ANDconst [c] (ANDconst [d] x))
  2110  	// result: (ANDconst [c&d] x)
  2111  	for {
  2112  		c := auxIntToInt64(v.AuxInt)
  2113  		if v_0.Op != OpARM64ANDconst {
  2114  			break
  2115  		}
  2116  		d := auxIntToInt64(v_0.AuxInt)
  2117  		x := v_0.Args[0]
  2118  		v.reset(OpARM64ANDconst)
  2119  		v.AuxInt = int64ToAuxInt(c & d)
  2120  		v.AddArg(x)
  2121  		return true
  2122  	}
  2123  	// match: (ANDconst [c] (MOVWUreg x))
  2124  	// result: (ANDconst [c&(1<<32-1)] x)
  2125  	for {
  2126  		c := auxIntToInt64(v.AuxInt)
  2127  		if v_0.Op != OpARM64MOVWUreg {
  2128  			break
  2129  		}
  2130  		x := v_0.Args[0]
  2131  		v.reset(OpARM64ANDconst)
  2132  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
  2133  		v.AddArg(x)
  2134  		return true
  2135  	}
  2136  	// match: (ANDconst [c] (MOVHUreg x))
  2137  	// result: (ANDconst [c&(1<<16-1)] x)
  2138  	for {
  2139  		c := auxIntToInt64(v.AuxInt)
  2140  		if v_0.Op != OpARM64MOVHUreg {
  2141  			break
  2142  		}
  2143  		x := v_0.Args[0]
  2144  		v.reset(OpARM64ANDconst)
  2145  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  2146  		v.AddArg(x)
  2147  		return true
  2148  	}
  2149  	// match: (ANDconst [c] (MOVBUreg x))
  2150  	// result: (ANDconst [c&(1<<8-1)] x)
  2151  	for {
  2152  		c := auxIntToInt64(v.AuxInt)
  2153  		if v_0.Op != OpARM64MOVBUreg {
  2154  			break
  2155  		}
  2156  		x := v_0.Args[0]
  2157  		v.reset(OpARM64ANDconst)
  2158  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  2159  		v.AddArg(x)
  2160  		return true
  2161  	}
  2162  	// match: (ANDconst [ac] (SLLconst [sc] x))
  2163  	// cond: isARM64BFMask(sc, ac, sc)
  2164  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
  2165  	for {
  2166  		ac := auxIntToInt64(v.AuxInt)
  2167  		if v_0.Op != OpARM64SLLconst {
  2168  			break
  2169  		}
  2170  		sc := auxIntToInt64(v_0.AuxInt)
  2171  		x := v_0.Args[0]
  2172  		if !(isARM64BFMask(sc, ac, sc)) {
  2173  			break
  2174  		}
  2175  		v.reset(OpARM64UBFIZ)
  2176  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
  2177  		v.AddArg(x)
  2178  		return true
  2179  	}
  2180  	// match: (ANDconst [ac] (SRLconst [sc] x))
  2181  	// cond: isARM64BFMask(sc, ac, 0)
  2182  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
  2183  	for {
  2184  		ac := auxIntToInt64(v.AuxInt)
  2185  		if v_0.Op != OpARM64SRLconst {
  2186  			break
  2187  		}
  2188  		sc := auxIntToInt64(v_0.AuxInt)
  2189  		x := v_0.Args[0]
  2190  		if !(isARM64BFMask(sc, ac, 0)) {
  2191  			break
  2192  		}
  2193  		v.reset(OpARM64UBFX)
  2194  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
  2195  		v.AddArg(x)
  2196  		return true
  2197  	}
  2198  	// match: (ANDconst [c] (UBFX [bfc] x))
  2199  	// cond: isARM64BFMask(0, c, 0)
  2200  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0)))] x)
  2201  	for {
  2202  		c := auxIntToInt64(v.AuxInt)
  2203  		if v_0.Op != OpARM64UBFX {
  2204  			break
  2205  		}
  2206  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  2207  		x := v_0.Args[0]
  2208  		if !(isARM64BFMask(0, c, 0)) {
  2209  			break
  2210  		}
  2211  		v.reset(OpARM64UBFX)
  2212  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
  2213  		v.AddArg(x)
  2214  		return true
  2215  	}
  2216  	return false
  2217  }
  2218  func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
  2219  	v_1 := v.Args[1]
  2220  	v_0 := v.Args[0]
  2221  	b := v.Block
  2222  	// match: (ANDshiftLL (MOVDconst [c]) x [d])
  2223  	// result: (ANDconst [c] (SLLconst <x.Type> x [d]))
  2224  	for {
  2225  		d := auxIntToInt64(v.AuxInt)
  2226  		if v_0.Op != OpARM64MOVDconst {
  2227  			break
  2228  		}
  2229  		c := auxIntToInt64(v_0.AuxInt)
  2230  		x := v_1
  2231  		v.reset(OpARM64ANDconst)
  2232  		v.AuxInt = int64ToAuxInt(c)
  2233  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2234  		v0.AuxInt = int64ToAuxInt(d)
  2235  		v0.AddArg(x)
  2236  		v.AddArg(v0)
  2237  		return true
  2238  	}
  2239  	// match: (ANDshiftLL x (MOVDconst [c]) [d])
  2240  	// result: (ANDconst x [int64(uint64(c)<<uint64(d))])
  2241  	for {
  2242  		d := auxIntToInt64(v.AuxInt)
  2243  		x := v_0
  2244  		if v_1.Op != OpARM64MOVDconst {
  2245  			break
  2246  		}
  2247  		c := auxIntToInt64(v_1.AuxInt)
  2248  		v.reset(OpARM64ANDconst)
  2249  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2250  		v.AddArg(x)
  2251  		return true
  2252  	}
  2253  	// match: (ANDshiftLL y:(SLLconst x [c]) x [c])
  2254  	// result: y
  2255  	for {
  2256  		c := auxIntToInt64(v.AuxInt)
  2257  		y := v_0
  2258  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
  2259  			break
  2260  		}
  2261  		x := y.Args[0]
  2262  		if x != v_1 {
  2263  			break
  2264  		}
  2265  		v.copyOf(y)
  2266  		return true
  2267  	}
  2268  	return false
  2269  }
  2270  func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
  2271  	v_1 := v.Args[1]
  2272  	v_0 := v.Args[0]
  2273  	b := v.Block
  2274  	// match: (ANDshiftRA (MOVDconst [c]) x [d])
  2275  	// result: (ANDconst [c] (SRAconst <x.Type> x [d]))
  2276  	for {
  2277  		d := auxIntToInt64(v.AuxInt)
  2278  		if v_0.Op != OpARM64MOVDconst {
  2279  			break
  2280  		}
  2281  		c := auxIntToInt64(v_0.AuxInt)
  2282  		x := v_1
  2283  		v.reset(OpARM64ANDconst)
  2284  		v.AuxInt = int64ToAuxInt(c)
  2285  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2286  		v0.AuxInt = int64ToAuxInt(d)
  2287  		v0.AddArg(x)
  2288  		v.AddArg(v0)
  2289  		return true
  2290  	}
  2291  	// match: (ANDshiftRA x (MOVDconst [c]) [d])
  2292  	// result: (ANDconst x [c>>uint64(d)])
  2293  	for {
  2294  		d := auxIntToInt64(v.AuxInt)
  2295  		x := v_0
  2296  		if v_1.Op != OpARM64MOVDconst {
  2297  			break
  2298  		}
  2299  		c := auxIntToInt64(v_1.AuxInt)
  2300  		v.reset(OpARM64ANDconst)
  2301  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2302  		v.AddArg(x)
  2303  		return true
  2304  	}
  2305  	// match: (ANDshiftRA y:(SRAconst x [c]) x [c])
  2306  	// result: y
  2307  	for {
  2308  		c := auxIntToInt64(v.AuxInt)
  2309  		y := v_0
  2310  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
  2311  			break
  2312  		}
  2313  		x := y.Args[0]
  2314  		if x != v_1 {
  2315  			break
  2316  		}
  2317  		v.copyOf(y)
  2318  		return true
  2319  	}
  2320  	return false
  2321  }
  2322  func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
  2323  	v_1 := v.Args[1]
  2324  	v_0 := v.Args[0]
  2325  	b := v.Block
  2326  	// match: (ANDshiftRL (MOVDconst [c]) x [d])
  2327  	// result: (ANDconst [c] (SRLconst <x.Type> x [d]))
  2328  	for {
  2329  		d := auxIntToInt64(v.AuxInt)
  2330  		if v_0.Op != OpARM64MOVDconst {
  2331  			break
  2332  		}
  2333  		c := auxIntToInt64(v_0.AuxInt)
  2334  		x := v_1
  2335  		v.reset(OpARM64ANDconst)
  2336  		v.AuxInt = int64ToAuxInt(c)
  2337  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2338  		v0.AuxInt = int64ToAuxInt(d)
  2339  		v0.AddArg(x)
  2340  		v.AddArg(v0)
  2341  		return true
  2342  	}
  2343  	// match: (ANDshiftRL x (MOVDconst [c]) [d])
  2344  	// result: (ANDconst x [int64(uint64(c)>>uint64(d))])
  2345  	for {
  2346  		d := auxIntToInt64(v.AuxInt)
  2347  		x := v_0
  2348  		if v_1.Op != OpARM64MOVDconst {
  2349  			break
  2350  		}
  2351  		c := auxIntToInt64(v_1.AuxInt)
  2352  		v.reset(OpARM64ANDconst)
  2353  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2354  		v.AddArg(x)
  2355  		return true
  2356  	}
  2357  	// match: (ANDshiftRL y:(SRLconst x [c]) x [c])
  2358  	// result: y
  2359  	for {
  2360  		c := auxIntToInt64(v.AuxInt)
  2361  		y := v_0
  2362  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
  2363  			break
  2364  		}
  2365  		x := y.Args[0]
  2366  		if x != v_1 {
  2367  			break
  2368  		}
  2369  		v.copyOf(y)
  2370  		return true
  2371  	}
  2372  	return false
  2373  }
  2374  func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
  2375  	v_1 := v.Args[1]
  2376  	v_0 := v.Args[0]
  2377  	b := v.Block
  2378  	// match: (ANDshiftRO (MOVDconst [c]) x [d])
  2379  	// result: (ANDconst [c] (RORconst <x.Type> x [d]))
  2380  	for {
  2381  		d := auxIntToInt64(v.AuxInt)
  2382  		if v_0.Op != OpARM64MOVDconst {
  2383  			break
  2384  		}
  2385  		c := auxIntToInt64(v_0.AuxInt)
  2386  		x := v_1
  2387  		v.reset(OpARM64ANDconst)
  2388  		v.AuxInt = int64ToAuxInt(c)
  2389  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
  2390  		v0.AuxInt = int64ToAuxInt(d)
  2391  		v0.AddArg(x)
  2392  		v.AddArg(v0)
  2393  		return true
  2394  	}
  2395  	// match: (ANDshiftRO x (MOVDconst [c]) [d])
  2396  	// result: (ANDconst x [rotateRight64(c, d)])
  2397  	for {
  2398  		d := auxIntToInt64(v.AuxInt)
  2399  		x := v_0
  2400  		if v_1.Op != OpARM64MOVDconst {
  2401  			break
  2402  		}
  2403  		c := auxIntToInt64(v_1.AuxInt)
  2404  		v.reset(OpARM64ANDconst)
  2405  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
  2406  		v.AddArg(x)
  2407  		return true
  2408  	}
  2409  	// match: (ANDshiftRO y:(RORconst x [c]) x [c])
  2410  	// result: y
  2411  	for {
  2412  		c := auxIntToInt64(v.AuxInt)
  2413  		y := v_0
  2414  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
  2415  			break
  2416  		}
  2417  		x := y.Args[0]
  2418  		if x != v_1 {
  2419  			break
  2420  		}
  2421  		v.copyOf(y)
  2422  		return true
  2423  	}
  2424  	return false
  2425  }
  2426  func rewriteValueARM64_OpARM64BIC(v *Value) bool {
  2427  	v_1 := v.Args[1]
  2428  	v_0 := v.Args[0]
  2429  	// match: (BIC x (MOVDconst [c]))
  2430  	// result: (ANDconst [^c] x)
  2431  	for {
  2432  		x := v_0
  2433  		if v_1.Op != OpARM64MOVDconst {
  2434  			break
  2435  		}
  2436  		c := auxIntToInt64(v_1.AuxInt)
  2437  		v.reset(OpARM64ANDconst)
  2438  		v.AuxInt = int64ToAuxInt(^c)
  2439  		v.AddArg(x)
  2440  		return true
  2441  	}
  2442  	// match: (BIC x x)
  2443  	// result: (MOVDconst [0])
  2444  	for {
  2445  		x := v_0
  2446  		if x != v_1 {
  2447  			break
  2448  		}
  2449  		v.reset(OpARM64MOVDconst)
  2450  		v.AuxInt = int64ToAuxInt(0)
  2451  		return true
  2452  	}
  2453  	// match: (BIC x0 x1:(SLLconst [c] y))
  2454  	// cond: clobberIfDead(x1)
  2455  	// result: (BICshiftLL x0 y [c])
  2456  	for {
  2457  		x0 := v_0
  2458  		x1 := v_1
  2459  		if x1.Op != OpARM64SLLconst {
  2460  			break
  2461  		}
  2462  		c := auxIntToInt64(x1.AuxInt)
  2463  		y := x1.Args[0]
  2464  		if !(clobberIfDead(x1)) {
  2465  			break
  2466  		}
  2467  		v.reset(OpARM64BICshiftLL)
  2468  		v.AuxInt = int64ToAuxInt(c)
  2469  		v.AddArg2(x0, y)
  2470  		return true
  2471  	}
  2472  	// match: (BIC x0 x1:(SRLconst [c] y))
  2473  	// cond: clobberIfDead(x1)
  2474  	// result: (BICshiftRL x0 y [c])
  2475  	for {
  2476  		x0 := v_0
  2477  		x1 := v_1
  2478  		if x1.Op != OpARM64SRLconst {
  2479  			break
  2480  		}
  2481  		c := auxIntToInt64(x1.AuxInt)
  2482  		y := x1.Args[0]
  2483  		if !(clobberIfDead(x1)) {
  2484  			break
  2485  		}
  2486  		v.reset(OpARM64BICshiftRL)
  2487  		v.AuxInt = int64ToAuxInt(c)
  2488  		v.AddArg2(x0, y)
  2489  		return true
  2490  	}
  2491  	// match: (BIC x0 x1:(SRAconst [c] y))
  2492  	// cond: clobberIfDead(x1)
  2493  	// result: (BICshiftRA x0 y [c])
  2494  	for {
  2495  		x0 := v_0
  2496  		x1 := v_1
  2497  		if x1.Op != OpARM64SRAconst {
  2498  			break
  2499  		}
  2500  		c := auxIntToInt64(x1.AuxInt)
  2501  		y := x1.Args[0]
  2502  		if !(clobberIfDead(x1)) {
  2503  			break
  2504  		}
  2505  		v.reset(OpARM64BICshiftRA)
  2506  		v.AuxInt = int64ToAuxInt(c)
  2507  		v.AddArg2(x0, y)
  2508  		return true
  2509  	}
  2510  	// match: (BIC x0 x1:(RORconst [c] y))
  2511  	// cond: clobberIfDead(x1)
  2512  	// result: (BICshiftRO x0 y [c])
  2513  	for {
  2514  		x0 := v_0
  2515  		x1 := v_1
  2516  		if x1.Op != OpARM64RORconst {
  2517  			break
  2518  		}
  2519  		c := auxIntToInt64(x1.AuxInt)
  2520  		y := x1.Args[0]
  2521  		if !(clobberIfDead(x1)) {
  2522  			break
  2523  		}
  2524  		v.reset(OpARM64BICshiftRO)
  2525  		v.AuxInt = int64ToAuxInt(c)
  2526  		v.AddArg2(x0, y)
  2527  		return true
  2528  	}
  2529  	return false
  2530  }
  2531  func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
  2532  	v_1 := v.Args[1]
  2533  	v_0 := v.Args[0]
  2534  	// match: (BICshiftLL x (MOVDconst [c]) [d])
  2535  	// result: (ANDconst x [^int64(uint64(c)<<uint64(d))])
  2536  	for {
  2537  		d := auxIntToInt64(v.AuxInt)
  2538  		x := v_0
  2539  		if v_1.Op != OpARM64MOVDconst {
  2540  			break
  2541  		}
  2542  		c := auxIntToInt64(v_1.AuxInt)
  2543  		v.reset(OpARM64ANDconst)
  2544  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  2545  		v.AddArg(x)
  2546  		return true
  2547  	}
  2548  	// match: (BICshiftLL (SLLconst x [c]) x [c])
  2549  	// result: (MOVDconst [0])
  2550  	for {
  2551  		c := auxIntToInt64(v.AuxInt)
  2552  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  2553  			break
  2554  		}
  2555  		x := v_0.Args[0]
  2556  		if x != v_1 {
  2557  			break
  2558  		}
  2559  		v.reset(OpARM64MOVDconst)
  2560  		v.AuxInt = int64ToAuxInt(0)
  2561  		return true
  2562  	}
  2563  	return false
  2564  }
  2565  func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
  2566  	v_1 := v.Args[1]
  2567  	v_0 := v.Args[0]
  2568  	// match: (BICshiftRA x (MOVDconst [c]) [d])
  2569  	// result: (ANDconst x [^(c>>uint64(d))])
  2570  	for {
  2571  		d := auxIntToInt64(v.AuxInt)
  2572  		x := v_0
  2573  		if v_1.Op != OpARM64MOVDconst {
  2574  			break
  2575  		}
  2576  		c := auxIntToInt64(v_1.AuxInt)
  2577  		v.reset(OpARM64ANDconst)
  2578  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  2579  		v.AddArg(x)
  2580  		return true
  2581  	}
  2582  	// match: (BICshiftRA (SRAconst x [c]) x [c])
  2583  	// result: (MOVDconst [0])
  2584  	for {
  2585  		c := auxIntToInt64(v.AuxInt)
  2586  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  2587  			break
  2588  		}
  2589  		x := v_0.Args[0]
  2590  		if x != v_1 {
  2591  			break
  2592  		}
  2593  		v.reset(OpARM64MOVDconst)
  2594  		v.AuxInt = int64ToAuxInt(0)
  2595  		return true
  2596  	}
  2597  	return false
  2598  }
  2599  func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
  2600  	v_1 := v.Args[1]
  2601  	v_0 := v.Args[0]
  2602  	// match: (BICshiftRL x (MOVDconst [c]) [d])
  2603  	// result: (ANDconst x [^int64(uint64(c)>>uint64(d))])
  2604  	for {
  2605  		d := auxIntToInt64(v.AuxInt)
  2606  		x := v_0
  2607  		if v_1.Op != OpARM64MOVDconst {
  2608  			break
  2609  		}
  2610  		c := auxIntToInt64(v_1.AuxInt)
  2611  		v.reset(OpARM64ANDconst)
  2612  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  2613  		v.AddArg(x)
  2614  		return true
  2615  	}
  2616  	// match: (BICshiftRL (SRLconst x [c]) x [c])
  2617  	// result: (MOVDconst [0])
  2618  	for {
  2619  		c := auxIntToInt64(v.AuxInt)
  2620  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  2621  			break
  2622  		}
  2623  		x := v_0.Args[0]
  2624  		if x != v_1 {
  2625  			break
  2626  		}
  2627  		v.reset(OpARM64MOVDconst)
  2628  		v.AuxInt = int64ToAuxInt(0)
  2629  		return true
  2630  	}
  2631  	return false
  2632  }
  2633  func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
  2634  	v_1 := v.Args[1]
  2635  	v_0 := v.Args[0]
  2636  	// match: (BICshiftRO x (MOVDconst [c]) [d])
  2637  	// result: (ANDconst x [^rotateRight64(c, d)])
  2638  	for {
  2639  		d := auxIntToInt64(v.AuxInt)
  2640  		x := v_0
  2641  		if v_1.Op != OpARM64MOVDconst {
  2642  			break
  2643  		}
  2644  		c := auxIntToInt64(v_1.AuxInt)
  2645  		v.reset(OpARM64ANDconst)
  2646  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  2647  		v.AddArg(x)
  2648  		return true
  2649  	}
  2650  	// match: (BICshiftRO (RORconst x [c]) x [c])
  2651  	// result: (MOVDconst [0])
  2652  	for {
  2653  		c := auxIntToInt64(v.AuxInt)
  2654  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  2655  			break
  2656  		}
  2657  		x := v_0.Args[0]
  2658  		if x != v_1 {
  2659  			break
  2660  		}
  2661  		v.reset(OpARM64MOVDconst)
  2662  		v.AuxInt = int64ToAuxInt(0)
  2663  		return true
  2664  	}
  2665  	return false
  2666  }
  2667  func rewriteValueARM64_OpARM64CMN(v *Value) bool {
  2668  	v_1 := v.Args[1]
  2669  	v_0 := v.Args[0]
  2670  	// match: (CMN x (MOVDconst [c]))
  2671  	// result: (CMNconst [c] x)
  2672  	for {
  2673  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2674  			x := v_0
  2675  			if v_1.Op != OpARM64MOVDconst {
  2676  				continue
  2677  			}
  2678  			c := auxIntToInt64(v_1.AuxInt)
  2679  			v.reset(OpARM64CMNconst)
  2680  			v.AuxInt = int64ToAuxInt(c)
  2681  			v.AddArg(x)
  2682  			return true
  2683  		}
  2684  		break
  2685  	}
  2686  	// match: (CMN x0 x1:(SLLconst [c] y))
  2687  	// cond: clobberIfDead(x1)
  2688  	// result: (CMNshiftLL x0 y [c])
  2689  	for {
  2690  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2691  			x0 := v_0
  2692  			x1 := v_1
  2693  			if x1.Op != OpARM64SLLconst {
  2694  				continue
  2695  			}
  2696  			c := auxIntToInt64(x1.AuxInt)
  2697  			y := x1.Args[0]
  2698  			if !(clobberIfDead(x1)) {
  2699  				continue
  2700  			}
  2701  			v.reset(OpARM64CMNshiftLL)
  2702  			v.AuxInt = int64ToAuxInt(c)
  2703  			v.AddArg2(x0, y)
  2704  			return true
  2705  		}
  2706  		break
  2707  	}
  2708  	// match: (CMN x0 x1:(SRLconst [c] y))
  2709  	// cond: clobberIfDead(x1)
  2710  	// result: (CMNshiftRL x0 y [c])
  2711  	for {
  2712  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2713  			x0 := v_0
  2714  			x1 := v_1
  2715  			if x1.Op != OpARM64SRLconst {
  2716  				continue
  2717  			}
  2718  			c := auxIntToInt64(x1.AuxInt)
  2719  			y := x1.Args[0]
  2720  			if !(clobberIfDead(x1)) {
  2721  				continue
  2722  			}
  2723  			v.reset(OpARM64CMNshiftRL)
  2724  			v.AuxInt = int64ToAuxInt(c)
  2725  			v.AddArg2(x0, y)
  2726  			return true
  2727  		}
  2728  		break
  2729  	}
  2730  	// match: (CMN x0 x1:(SRAconst [c] y))
  2731  	// cond: clobberIfDead(x1)
  2732  	// result: (CMNshiftRA x0 y [c])
  2733  	for {
  2734  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2735  			x0 := v_0
  2736  			x1 := v_1
  2737  			if x1.Op != OpARM64SRAconst {
  2738  				continue
  2739  			}
  2740  			c := auxIntToInt64(x1.AuxInt)
  2741  			y := x1.Args[0]
  2742  			if !(clobberIfDead(x1)) {
  2743  				continue
  2744  			}
  2745  			v.reset(OpARM64CMNshiftRA)
  2746  			v.AuxInt = int64ToAuxInt(c)
  2747  			v.AddArg2(x0, y)
  2748  			return true
  2749  		}
  2750  		break
  2751  	}
  2752  	return false
  2753  }
  2754  func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
  2755  	v_1 := v.Args[1]
  2756  	v_0 := v.Args[0]
  2757  	// match: (CMNW x (MOVDconst [c]))
  2758  	// result: (CMNWconst [int32(c)] x)
  2759  	for {
  2760  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2761  			x := v_0
  2762  			if v_1.Op != OpARM64MOVDconst {
  2763  				continue
  2764  			}
  2765  			c := auxIntToInt64(v_1.AuxInt)
  2766  			v.reset(OpARM64CMNWconst)
  2767  			v.AuxInt = int32ToAuxInt(int32(c))
  2768  			v.AddArg(x)
  2769  			return true
  2770  		}
  2771  		break
  2772  	}
  2773  	return false
  2774  }
  2775  func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
  2776  	v_0 := v.Args[0]
  2777  	// match: (CMNWconst [c] y)
  2778  	// cond: c < 0 && c != -1<<31
  2779  	// result: (CMPWconst [-c] y)
  2780  	for {
  2781  		c := auxIntToInt32(v.AuxInt)
  2782  		y := v_0
  2783  		if !(c < 0 && c != -1<<31) {
  2784  			break
  2785  		}
  2786  		v.reset(OpARM64CMPWconst)
  2787  		v.AuxInt = int32ToAuxInt(-c)
  2788  		v.AddArg(y)
  2789  		return true
  2790  	}
  2791  	// match: (CMNWconst (MOVDconst [x]) [y])
  2792  	// result: (FlagConstant [addFlags32(int32(x),y)])
  2793  	for {
  2794  		y := auxIntToInt32(v.AuxInt)
  2795  		if v_0.Op != OpARM64MOVDconst {
  2796  			break
  2797  		}
  2798  		x := auxIntToInt64(v_0.AuxInt)
  2799  		v.reset(OpARM64FlagConstant)
  2800  		v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
  2801  		return true
  2802  	}
  2803  	return false
  2804  }
  2805  func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
  2806  	v_0 := v.Args[0]
  2807  	// match: (CMNconst [c] y)
  2808  	// cond: c < 0 && c != -1<<63
  2809  	// result: (CMPconst [-c] y)
  2810  	for {
  2811  		c := auxIntToInt64(v.AuxInt)
  2812  		y := v_0
  2813  		if !(c < 0 && c != -1<<63) {
  2814  			break
  2815  		}
  2816  		v.reset(OpARM64CMPconst)
  2817  		v.AuxInt = int64ToAuxInt(-c)
  2818  		v.AddArg(y)
  2819  		return true
  2820  	}
  2821  	// match: (CMNconst (MOVDconst [x]) [y])
  2822  	// result: (FlagConstant [addFlags64(x,y)])
  2823  	for {
  2824  		y := auxIntToInt64(v.AuxInt)
  2825  		if v_0.Op != OpARM64MOVDconst {
  2826  			break
  2827  		}
  2828  		x := auxIntToInt64(v_0.AuxInt)
  2829  		v.reset(OpARM64FlagConstant)
  2830  		v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
  2831  		return true
  2832  	}
  2833  	return false
  2834  }
  2835  func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
  2836  	v_1 := v.Args[1]
  2837  	v_0 := v.Args[0]
  2838  	b := v.Block
  2839  	// match: (CMNshiftLL (MOVDconst [c]) x [d])
  2840  	// result: (CMNconst [c] (SLLconst <x.Type> x [d]))
  2841  	for {
  2842  		d := auxIntToInt64(v.AuxInt)
  2843  		if v_0.Op != OpARM64MOVDconst {
  2844  			break
  2845  		}
  2846  		c := auxIntToInt64(v_0.AuxInt)
  2847  		x := v_1
  2848  		v.reset(OpARM64CMNconst)
  2849  		v.AuxInt = int64ToAuxInt(c)
  2850  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  2851  		v0.AuxInt = int64ToAuxInt(d)
  2852  		v0.AddArg(x)
  2853  		v.AddArg(v0)
  2854  		return true
  2855  	}
  2856  	// match: (CMNshiftLL x (MOVDconst [c]) [d])
  2857  	// result: (CMNconst x [int64(uint64(c)<<uint64(d))])
  2858  	for {
  2859  		d := auxIntToInt64(v.AuxInt)
  2860  		x := v_0
  2861  		if v_1.Op != OpARM64MOVDconst {
  2862  			break
  2863  		}
  2864  		c := auxIntToInt64(v_1.AuxInt)
  2865  		v.reset(OpARM64CMNconst)
  2866  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  2867  		v.AddArg(x)
  2868  		return true
  2869  	}
  2870  	return false
  2871  }
  2872  func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
  2873  	v_1 := v.Args[1]
  2874  	v_0 := v.Args[0]
  2875  	b := v.Block
  2876  	// match: (CMNshiftRA (MOVDconst [c]) x [d])
  2877  	// result: (CMNconst [c] (SRAconst <x.Type> x [d]))
  2878  	for {
  2879  		d := auxIntToInt64(v.AuxInt)
  2880  		if v_0.Op != OpARM64MOVDconst {
  2881  			break
  2882  		}
  2883  		c := auxIntToInt64(v_0.AuxInt)
  2884  		x := v_1
  2885  		v.reset(OpARM64CMNconst)
  2886  		v.AuxInt = int64ToAuxInt(c)
  2887  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  2888  		v0.AuxInt = int64ToAuxInt(d)
  2889  		v0.AddArg(x)
  2890  		v.AddArg(v0)
  2891  		return true
  2892  	}
  2893  	// match: (CMNshiftRA x (MOVDconst [c]) [d])
  2894  	// result: (CMNconst x [c>>uint64(d)])
  2895  	for {
  2896  		d := auxIntToInt64(v.AuxInt)
  2897  		x := v_0
  2898  		if v_1.Op != OpARM64MOVDconst {
  2899  			break
  2900  		}
  2901  		c := auxIntToInt64(v_1.AuxInt)
  2902  		v.reset(OpARM64CMNconst)
  2903  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  2904  		v.AddArg(x)
  2905  		return true
  2906  	}
  2907  	return false
  2908  }
  2909  func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
  2910  	v_1 := v.Args[1]
  2911  	v_0 := v.Args[0]
  2912  	b := v.Block
  2913  	// match: (CMNshiftRL (MOVDconst [c]) x [d])
  2914  	// result: (CMNconst [c] (SRLconst <x.Type> x [d]))
  2915  	for {
  2916  		d := auxIntToInt64(v.AuxInt)
  2917  		if v_0.Op != OpARM64MOVDconst {
  2918  			break
  2919  		}
  2920  		c := auxIntToInt64(v_0.AuxInt)
  2921  		x := v_1
  2922  		v.reset(OpARM64CMNconst)
  2923  		v.AuxInt = int64ToAuxInt(c)
  2924  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  2925  		v0.AuxInt = int64ToAuxInt(d)
  2926  		v0.AddArg(x)
  2927  		v.AddArg(v0)
  2928  		return true
  2929  	}
  2930  	// match: (CMNshiftRL x (MOVDconst [c]) [d])
  2931  	// result: (CMNconst x [int64(uint64(c)>>uint64(d))])
  2932  	for {
  2933  		d := auxIntToInt64(v.AuxInt)
  2934  		x := v_0
  2935  		if v_1.Op != OpARM64MOVDconst {
  2936  			break
  2937  		}
  2938  		c := auxIntToInt64(v_1.AuxInt)
  2939  		v.reset(OpARM64CMNconst)
  2940  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  2941  		v.AddArg(x)
  2942  		return true
  2943  	}
  2944  	return false
  2945  }
  2946  func rewriteValueARM64_OpARM64CMP(v *Value) bool {
  2947  	v_1 := v.Args[1]
  2948  	v_0 := v.Args[0]
  2949  	b := v.Block
  2950  	// match: (CMP x (MOVDconst [c]))
  2951  	// result: (CMPconst [c] x)
  2952  	for {
  2953  		x := v_0
  2954  		if v_1.Op != OpARM64MOVDconst {
  2955  			break
  2956  		}
  2957  		c := auxIntToInt64(v_1.AuxInt)
  2958  		v.reset(OpARM64CMPconst)
  2959  		v.AuxInt = int64ToAuxInt(c)
  2960  		v.AddArg(x)
  2961  		return true
  2962  	}
  2963  	// match: (CMP (MOVDconst [c]) x)
  2964  	// result: (InvertFlags (CMPconst [c] x))
  2965  	for {
  2966  		if v_0.Op != OpARM64MOVDconst {
  2967  			break
  2968  		}
  2969  		c := auxIntToInt64(v_0.AuxInt)
  2970  		x := v_1
  2971  		v.reset(OpARM64InvertFlags)
  2972  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  2973  		v0.AuxInt = int64ToAuxInt(c)
  2974  		v0.AddArg(x)
  2975  		v.AddArg(v0)
  2976  		return true
  2977  	}
  2978  	// match: (CMP x y)
  2979  	// cond: canonLessThan(x,y)
  2980  	// result: (InvertFlags (CMP y x))
  2981  	for {
  2982  		x := v_0
  2983  		y := v_1
  2984  		if !(canonLessThan(x, y)) {
  2985  			break
  2986  		}
  2987  		v.reset(OpARM64InvertFlags)
  2988  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  2989  		v0.AddArg2(y, x)
  2990  		v.AddArg(v0)
  2991  		return true
  2992  	}
  2993  	// match: (CMP x0 x1:(SLLconst [c] y))
  2994  	// cond: clobberIfDead(x1)
  2995  	// result: (CMPshiftLL x0 y [c])
  2996  	for {
  2997  		x0 := v_0
  2998  		x1 := v_1
  2999  		if x1.Op != OpARM64SLLconst {
  3000  			break
  3001  		}
  3002  		c := auxIntToInt64(x1.AuxInt)
  3003  		y := x1.Args[0]
  3004  		if !(clobberIfDead(x1)) {
  3005  			break
  3006  		}
  3007  		v.reset(OpARM64CMPshiftLL)
  3008  		v.AuxInt = int64ToAuxInt(c)
  3009  		v.AddArg2(x0, y)
  3010  		return true
  3011  	}
  3012  	// match: (CMP x0:(SLLconst [c] y) x1)
  3013  	// cond: clobberIfDead(x0)
  3014  	// result: (InvertFlags (CMPshiftLL x1 y [c]))
  3015  	for {
  3016  		x0 := v_0
  3017  		if x0.Op != OpARM64SLLconst {
  3018  			break
  3019  		}
  3020  		c := auxIntToInt64(x0.AuxInt)
  3021  		y := x0.Args[0]
  3022  		x1 := v_1
  3023  		if !(clobberIfDead(x0)) {
  3024  			break
  3025  		}
  3026  		v.reset(OpARM64InvertFlags)
  3027  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
  3028  		v0.AuxInt = int64ToAuxInt(c)
  3029  		v0.AddArg2(x1, y)
  3030  		v.AddArg(v0)
  3031  		return true
  3032  	}
  3033  	// match: (CMP x0 x1:(SRLconst [c] y))
  3034  	// cond: clobberIfDead(x1)
  3035  	// result: (CMPshiftRL x0 y [c])
  3036  	for {
  3037  		x0 := v_0
  3038  		x1 := v_1
  3039  		if x1.Op != OpARM64SRLconst {
  3040  			break
  3041  		}
  3042  		c := auxIntToInt64(x1.AuxInt)
  3043  		y := x1.Args[0]
  3044  		if !(clobberIfDead(x1)) {
  3045  			break
  3046  		}
  3047  		v.reset(OpARM64CMPshiftRL)
  3048  		v.AuxInt = int64ToAuxInt(c)
  3049  		v.AddArg2(x0, y)
  3050  		return true
  3051  	}
  3052  	// match: (CMP x0:(SRLconst [c] y) x1)
  3053  	// cond: clobberIfDead(x0)
  3054  	// result: (InvertFlags (CMPshiftRL x1 y [c]))
  3055  	for {
  3056  		x0 := v_0
  3057  		if x0.Op != OpARM64SRLconst {
  3058  			break
  3059  		}
  3060  		c := auxIntToInt64(x0.AuxInt)
  3061  		y := x0.Args[0]
  3062  		x1 := v_1
  3063  		if !(clobberIfDead(x0)) {
  3064  			break
  3065  		}
  3066  		v.reset(OpARM64InvertFlags)
  3067  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
  3068  		v0.AuxInt = int64ToAuxInt(c)
  3069  		v0.AddArg2(x1, y)
  3070  		v.AddArg(v0)
  3071  		return true
  3072  	}
  3073  	// match: (CMP x0 x1:(SRAconst [c] y))
  3074  	// cond: clobberIfDead(x1)
  3075  	// result: (CMPshiftRA x0 y [c])
  3076  	for {
  3077  		x0 := v_0
  3078  		x1 := v_1
  3079  		if x1.Op != OpARM64SRAconst {
  3080  			break
  3081  		}
  3082  		c := auxIntToInt64(x1.AuxInt)
  3083  		y := x1.Args[0]
  3084  		if !(clobberIfDead(x1)) {
  3085  			break
  3086  		}
  3087  		v.reset(OpARM64CMPshiftRA)
  3088  		v.AuxInt = int64ToAuxInt(c)
  3089  		v.AddArg2(x0, y)
  3090  		return true
  3091  	}
  3092  	// match: (CMP x0:(SRAconst [c] y) x1)
  3093  	// cond: clobberIfDead(x0)
  3094  	// result: (InvertFlags (CMPshiftRA x1 y [c]))
  3095  	for {
  3096  		x0 := v_0
  3097  		if x0.Op != OpARM64SRAconst {
  3098  			break
  3099  		}
  3100  		c := auxIntToInt64(x0.AuxInt)
  3101  		y := x0.Args[0]
  3102  		x1 := v_1
  3103  		if !(clobberIfDead(x0)) {
  3104  			break
  3105  		}
  3106  		v.reset(OpARM64InvertFlags)
  3107  		v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
  3108  		v0.AuxInt = int64ToAuxInt(c)
  3109  		v0.AddArg2(x1, y)
  3110  		v.AddArg(v0)
  3111  		return true
  3112  	}
  3113  	return false
  3114  }
  3115  func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
  3116  	v_1 := v.Args[1]
  3117  	v_0 := v.Args[0]
  3118  	b := v.Block
  3119  	// match: (CMPW x (MOVDconst [c]))
  3120  	// result: (CMPWconst [int32(c)] x)
  3121  	for {
  3122  		x := v_0
  3123  		if v_1.Op != OpARM64MOVDconst {
  3124  			break
  3125  		}
  3126  		c := auxIntToInt64(v_1.AuxInt)
  3127  		v.reset(OpARM64CMPWconst)
  3128  		v.AuxInt = int32ToAuxInt(int32(c))
  3129  		v.AddArg(x)
  3130  		return true
  3131  	}
  3132  	// match: (CMPW (MOVDconst [c]) x)
  3133  	// result: (InvertFlags (CMPWconst [int32(c)] x))
  3134  	for {
  3135  		if v_0.Op != OpARM64MOVDconst {
  3136  			break
  3137  		}
  3138  		c := auxIntToInt64(v_0.AuxInt)
  3139  		x := v_1
  3140  		v.reset(OpARM64InvertFlags)
  3141  		v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
  3142  		v0.AuxInt = int32ToAuxInt(int32(c))
  3143  		v0.AddArg(x)
  3144  		v.AddArg(v0)
  3145  		return true
  3146  	}
  3147  	// match: (CMPW x y)
  3148  	// cond: canonLessThan(x,y)
  3149  	// result: (InvertFlags (CMPW y x))
  3150  	for {
  3151  		x := v_0
  3152  		y := v_1
  3153  		if !(canonLessThan(x, y)) {
  3154  			break
  3155  		}
  3156  		v.reset(OpARM64InvertFlags)
  3157  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  3158  		v0.AddArg2(y, x)
  3159  		v.AddArg(v0)
  3160  		return true
  3161  	}
  3162  	return false
  3163  }
  3164  func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
  3165  	v_0 := v.Args[0]
  3166  	// match: (CMPWconst [c] y)
  3167  	// cond: c < 0 && c != -1<<31
  3168  	// result: (CMNWconst [-c] y)
  3169  	for {
  3170  		c := auxIntToInt32(v.AuxInt)
  3171  		y := v_0
  3172  		if !(c < 0 && c != -1<<31) {
  3173  			break
  3174  		}
  3175  		v.reset(OpARM64CMNWconst)
  3176  		v.AuxInt = int32ToAuxInt(-c)
  3177  		v.AddArg(y)
  3178  		return true
  3179  	}
  3180  	// match: (CMPWconst (MOVDconst [x]) [y])
  3181  	// result: (FlagConstant [subFlags32(int32(x),y)])
  3182  	for {
  3183  		y := auxIntToInt32(v.AuxInt)
  3184  		if v_0.Op != OpARM64MOVDconst {
  3185  			break
  3186  		}
  3187  		x := auxIntToInt64(v_0.AuxInt)
  3188  		v.reset(OpARM64FlagConstant)
  3189  		v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
  3190  		return true
  3191  	}
  3192  	// match: (CMPWconst (MOVBUreg _) [c])
  3193  	// cond: 0xff < c
  3194  	// result: (FlagConstant [subFlags64(0,1)])
  3195  	for {
  3196  		c := auxIntToInt32(v.AuxInt)
  3197  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3198  			break
  3199  		}
  3200  		v.reset(OpARM64FlagConstant)
  3201  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3202  		return true
  3203  	}
  3204  	// match: (CMPWconst (MOVHUreg _) [c])
  3205  	// cond: 0xffff < c
  3206  	// result: (FlagConstant [subFlags64(0,1)])
  3207  	for {
  3208  		c := auxIntToInt32(v.AuxInt)
  3209  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3210  			break
  3211  		}
  3212  		v.reset(OpARM64FlagConstant)
  3213  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3214  		return true
  3215  	}
  3216  	return false
  3217  }
  3218  func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
  3219  	v_0 := v.Args[0]
  3220  	// match: (CMPconst [c] y)
  3221  	// cond: c < 0 && c != -1<<63
  3222  	// result: (CMNconst [-c] y)
  3223  	for {
  3224  		c := auxIntToInt64(v.AuxInt)
  3225  		y := v_0
  3226  		if !(c < 0 && c != -1<<63) {
  3227  			break
  3228  		}
  3229  		v.reset(OpARM64CMNconst)
  3230  		v.AuxInt = int64ToAuxInt(-c)
  3231  		v.AddArg(y)
  3232  		return true
  3233  	}
  3234  	// match: (CMPconst (MOVDconst [x]) [y])
  3235  	// result: (FlagConstant [subFlags64(x,y)])
  3236  	for {
  3237  		y := auxIntToInt64(v.AuxInt)
  3238  		if v_0.Op != OpARM64MOVDconst {
  3239  			break
  3240  		}
  3241  		x := auxIntToInt64(v_0.AuxInt)
  3242  		v.reset(OpARM64FlagConstant)
  3243  		v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
  3244  		return true
  3245  	}
  3246  	// match: (CMPconst (MOVBUreg _) [c])
  3247  	// cond: 0xff < c
  3248  	// result: (FlagConstant [subFlags64(0,1)])
  3249  	for {
  3250  		c := auxIntToInt64(v.AuxInt)
  3251  		if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
  3252  			break
  3253  		}
  3254  		v.reset(OpARM64FlagConstant)
  3255  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3256  		return true
  3257  	}
  3258  	// match: (CMPconst (MOVHUreg _) [c])
  3259  	// cond: 0xffff < c
  3260  	// result: (FlagConstant [subFlags64(0,1)])
  3261  	for {
  3262  		c := auxIntToInt64(v.AuxInt)
  3263  		if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
  3264  			break
  3265  		}
  3266  		v.reset(OpARM64FlagConstant)
  3267  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3268  		return true
  3269  	}
  3270  	// match: (CMPconst (MOVWUreg _) [c])
  3271  	// cond: 0xffffffff < c
  3272  	// result: (FlagConstant [subFlags64(0,1)])
  3273  	for {
  3274  		c := auxIntToInt64(v.AuxInt)
  3275  		if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
  3276  			break
  3277  		}
  3278  		v.reset(OpARM64FlagConstant)
  3279  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3280  		return true
  3281  	}
  3282  	// match: (CMPconst (ANDconst _ [m]) [n])
  3283  	// cond: 0 <= m && m < n
  3284  	// result: (FlagConstant [subFlags64(0,1)])
  3285  	for {
  3286  		n := auxIntToInt64(v.AuxInt)
  3287  		if v_0.Op != OpARM64ANDconst {
  3288  			break
  3289  		}
  3290  		m := auxIntToInt64(v_0.AuxInt)
  3291  		if !(0 <= m && m < n) {
  3292  			break
  3293  		}
  3294  		v.reset(OpARM64FlagConstant)
  3295  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3296  		return true
  3297  	}
  3298  	// match: (CMPconst (SRLconst _ [c]) [n])
  3299  	// cond: 0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)
  3300  	// result: (FlagConstant [subFlags64(0,1)])
  3301  	for {
  3302  		n := auxIntToInt64(v.AuxInt)
  3303  		if v_0.Op != OpARM64SRLconst {
  3304  			break
  3305  		}
  3306  		c := auxIntToInt64(v_0.AuxInt)
  3307  		if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
  3308  			break
  3309  		}
  3310  		v.reset(OpARM64FlagConstant)
  3311  		v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
  3312  		return true
  3313  	}
  3314  	return false
  3315  }
  3316  func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
  3317  	v_1 := v.Args[1]
  3318  	v_0 := v.Args[0]
  3319  	b := v.Block
  3320  	// match: (CMPshiftLL (MOVDconst [c]) x [d])
  3321  	// result: (InvertFlags (CMPconst [c] (SLLconst <x.Type> x [d])))
  3322  	for {
  3323  		d := auxIntToInt64(v.AuxInt)
  3324  		if v_0.Op != OpARM64MOVDconst {
  3325  			break
  3326  		}
  3327  		c := auxIntToInt64(v_0.AuxInt)
  3328  		x := v_1
  3329  		v.reset(OpARM64InvertFlags)
  3330  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3331  		v0.AuxInt = int64ToAuxInt(c)
  3332  		v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  3333  		v1.AuxInt = int64ToAuxInt(d)
  3334  		v1.AddArg(x)
  3335  		v0.AddArg(v1)
  3336  		v.AddArg(v0)
  3337  		return true
  3338  	}
  3339  	// match: (CMPshiftLL x (MOVDconst [c]) [d])
  3340  	// result: (CMPconst x [int64(uint64(c)<<uint64(d))])
  3341  	for {
  3342  		d := auxIntToInt64(v.AuxInt)
  3343  		x := v_0
  3344  		if v_1.Op != OpARM64MOVDconst {
  3345  			break
  3346  		}
  3347  		c := auxIntToInt64(v_1.AuxInt)
  3348  		v.reset(OpARM64CMPconst)
  3349  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
  3350  		v.AddArg(x)
  3351  		return true
  3352  	}
  3353  	return false
  3354  }
  3355  func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
  3356  	v_1 := v.Args[1]
  3357  	v_0 := v.Args[0]
  3358  	b := v.Block
  3359  	// match: (CMPshiftRA (MOVDconst [c]) x [d])
  3360  	// result: (InvertFlags (CMPconst [c] (SRAconst <x.Type> x [d])))
  3361  	for {
  3362  		d := auxIntToInt64(v.AuxInt)
  3363  		if v_0.Op != OpARM64MOVDconst {
  3364  			break
  3365  		}
  3366  		c := auxIntToInt64(v_0.AuxInt)
  3367  		x := v_1
  3368  		v.reset(OpARM64InvertFlags)
  3369  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3370  		v0.AuxInt = int64ToAuxInt(c)
  3371  		v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
  3372  		v1.AuxInt = int64ToAuxInt(d)
  3373  		v1.AddArg(x)
  3374  		v0.AddArg(v1)
  3375  		v.AddArg(v0)
  3376  		return true
  3377  	}
  3378  	// match: (CMPshiftRA x (MOVDconst [c]) [d])
  3379  	// result: (CMPconst x [c>>uint64(d)])
  3380  	for {
  3381  		d := auxIntToInt64(v.AuxInt)
  3382  		x := v_0
  3383  		if v_1.Op != OpARM64MOVDconst {
  3384  			break
  3385  		}
  3386  		c := auxIntToInt64(v_1.AuxInt)
  3387  		v.reset(OpARM64CMPconst)
  3388  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
  3389  		v.AddArg(x)
  3390  		return true
  3391  	}
  3392  	return false
  3393  }
  3394  func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
  3395  	v_1 := v.Args[1]
  3396  	v_0 := v.Args[0]
  3397  	b := v.Block
  3398  	// match: (CMPshiftRL (MOVDconst [c]) x [d])
  3399  	// result: (InvertFlags (CMPconst [c] (SRLconst <x.Type> x [d])))
  3400  	for {
  3401  		d := auxIntToInt64(v.AuxInt)
  3402  		if v_0.Op != OpARM64MOVDconst {
  3403  			break
  3404  		}
  3405  		c := auxIntToInt64(v_0.AuxInt)
  3406  		x := v_1
  3407  		v.reset(OpARM64InvertFlags)
  3408  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
  3409  		v0.AuxInt = int64ToAuxInt(c)
  3410  		v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
  3411  		v1.AuxInt = int64ToAuxInt(d)
  3412  		v1.AddArg(x)
  3413  		v0.AddArg(v1)
  3414  		v.AddArg(v0)
  3415  		return true
  3416  	}
  3417  	// match: (CMPshiftRL x (MOVDconst [c]) [d])
  3418  	// result: (CMPconst x [int64(uint64(c)>>uint64(d))])
  3419  	for {
  3420  		d := auxIntToInt64(v.AuxInt)
  3421  		x := v_0
  3422  		if v_1.Op != OpARM64MOVDconst {
  3423  			break
  3424  		}
  3425  		c := auxIntToInt64(v_1.AuxInt)
  3426  		v.reset(OpARM64CMPconst)
  3427  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
  3428  		v.AddArg(x)
  3429  		return true
  3430  	}
  3431  	return false
  3432  }
  3433  func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
  3434  	v_2 := v.Args[2]
  3435  	v_1 := v.Args[1]
  3436  	v_0 := v.Args[0]
  3437  	// match: (CSEL [cc] (MOVDconst [-1]) (MOVDconst [0]) flag)
  3438  	// result: (CSETM [cc] flag)
  3439  	for {
  3440  		cc := auxIntToOp(v.AuxInt)
  3441  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3442  			break
  3443  		}
  3444  		flag := v_2
  3445  		v.reset(OpARM64CSETM)
  3446  		v.AuxInt = opToAuxInt(cc)
  3447  		v.AddArg(flag)
  3448  		return true
  3449  	}
  3450  	// match: (CSEL [cc] (MOVDconst [0]) (MOVDconst [-1]) flag)
  3451  	// result: (CSETM [arm64Negate(cc)] flag)
  3452  	for {
  3453  		cc := auxIntToOp(v.AuxInt)
  3454  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  3455  			break
  3456  		}
  3457  		flag := v_2
  3458  		v.reset(OpARM64CSETM)
  3459  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3460  		v.AddArg(flag)
  3461  		return true
  3462  	}
  3463  	// match: (CSEL [cc] x (MOVDconst [0]) flag)
  3464  	// result: (CSEL0 [cc] x flag)
  3465  	for {
  3466  		cc := auxIntToOp(v.AuxInt)
  3467  		x := v_0
  3468  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  3469  			break
  3470  		}
  3471  		flag := v_2
  3472  		v.reset(OpARM64CSEL0)
  3473  		v.AuxInt = opToAuxInt(cc)
  3474  		v.AddArg2(x, flag)
  3475  		return true
  3476  	}
  3477  	// match: (CSEL [cc] (MOVDconst [0]) y flag)
  3478  	// result: (CSEL0 [arm64Negate(cc)] y flag)
  3479  	for {
  3480  		cc := auxIntToOp(v.AuxInt)
  3481  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
  3482  			break
  3483  		}
  3484  		y := v_1
  3485  		flag := v_2
  3486  		v.reset(OpARM64CSEL0)
  3487  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3488  		v.AddArg2(y, flag)
  3489  		return true
  3490  	}
  3491  	// match: (CSEL [cc] x (ADDconst [1] a) flag)
  3492  	// result: (CSINC [cc] x a flag)
  3493  	for {
  3494  		cc := auxIntToOp(v.AuxInt)
  3495  		x := v_0
  3496  		if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  3497  			break
  3498  		}
  3499  		a := v_1.Args[0]
  3500  		flag := v_2
  3501  		v.reset(OpARM64CSINC)
  3502  		v.AuxInt = opToAuxInt(cc)
  3503  		v.AddArg3(x, a, flag)
  3504  		return true
  3505  	}
  3506  	// match: (CSEL [cc] (ADDconst [1] a) x flag)
  3507  	// result: (CSINC [arm64Negate(cc)] x a flag)
  3508  	for {
  3509  		cc := auxIntToOp(v.AuxInt)
  3510  		if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
  3511  			break
  3512  		}
  3513  		a := v_0.Args[0]
  3514  		x := v_1
  3515  		flag := v_2
  3516  		v.reset(OpARM64CSINC)
  3517  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3518  		v.AddArg3(x, a, flag)
  3519  		return true
  3520  	}
  3521  	// match: (CSEL [cc] x (MVN a) flag)
  3522  	// result: (CSINV [cc] x a flag)
  3523  	for {
  3524  		cc := auxIntToOp(v.AuxInt)
  3525  		x := v_0
  3526  		if v_1.Op != OpARM64MVN {
  3527  			break
  3528  		}
  3529  		a := v_1.Args[0]
  3530  		flag := v_2
  3531  		v.reset(OpARM64CSINV)
  3532  		v.AuxInt = opToAuxInt(cc)
  3533  		v.AddArg3(x, a, flag)
  3534  		return true
  3535  	}
  3536  	// match: (CSEL [cc] (MVN a) x flag)
  3537  	// result: (CSINV [arm64Negate(cc)] x a flag)
  3538  	for {
  3539  		cc := auxIntToOp(v.AuxInt)
  3540  		if v_0.Op != OpARM64MVN {
  3541  			break
  3542  		}
  3543  		a := v_0.Args[0]
  3544  		x := v_1
  3545  		flag := v_2
  3546  		v.reset(OpARM64CSINV)
  3547  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3548  		v.AddArg3(x, a, flag)
  3549  		return true
  3550  	}
  3551  	// match: (CSEL [cc] x (NEG a) flag)
  3552  	// result: (CSNEG [cc] x a flag)
  3553  	for {
  3554  		cc := auxIntToOp(v.AuxInt)
  3555  		x := v_0
  3556  		if v_1.Op != OpARM64NEG {
  3557  			break
  3558  		}
  3559  		a := v_1.Args[0]
  3560  		flag := v_2
  3561  		v.reset(OpARM64CSNEG)
  3562  		v.AuxInt = opToAuxInt(cc)
  3563  		v.AddArg3(x, a, flag)
  3564  		return true
  3565  	}
  3566  	// match: (CSEL [cc] (NEG a) x flag)
  3567  	// result: (CSNEG [arm64Negate(cc)] x a flag)
  3568  	for {
  3569  		cc := auxIntToOp(v.AuxInt)
  3570  		if v_0.Op != OpARM64NEG {
  3571  			break
  3572  		}
  3573  		a := v_0.Args[0]
  3574  		x := v_1
  3575  		flag := v_2
  3576  		v.reset(OpARM64CSNEG)
  3577  		v.AuxInt = opToAuxInt(arm64Negate(cc))
  3578  		v.AddArg3(x, a, flag)
  3579  		return true
  3580  	}
  3581  	// match: (CSEL [cc] x y (InvertFlags cmp))
  3582  	// result: (CSEL [arm64Invert(cc)] x y cmp)
  3583  	for {
  3584  		cc := auxIntToOp(v.AuxInt)
  3585  		x := v_0
  3586  		y := v_1
  3587  		if v_2.Op != OpARM64InvertFlags {
  3588  			break
  3589  		}
  3590  		cmp := v_2.Args[0]
  3591  		v.reset(OpARM64CSEL)
  3592  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3593  		v.AddArg3(x, y, cmp)
  3594  		return true
  3595  	}
  3596  	// match: (CSEL [cc] x _ flag)
  3597  	// cond: ccARM64Eval(cc, flag) > 0
  3598  	// result: x
  3599  	for {
  3600  		cc := auxIntToOp(v.AuxInt)
  3601  		x := v_0
  3602  		flag := v_2
  3603  		if !(ccARM64Eval(cc, flag) > 0) {
  3604  			break
  3605  		}
  3606  		v.copyOf(x)
  3607  		return true
  3608  	}
  3609  	// match: (CSEL [cc] _ y flag)
  3610  	// cond: ccARM64Eval(cc, flag) < 0
  3611  	// result: y
  3612  	for {
  3613  		cc := auxIntToOp(v.AuxInt)
  3614  		y := v_1
  3615  		flag := v_2
  3616  		if !(ccARM64Eval(cc, flag) < 0) {
  3617  			break
  3618  		}
  3619  		v.copyOf(y)
  3620  		return true
  3621  	}
  3622  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3623  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3624  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
  3625  	for {
  3626  		cc := auxIntToOp(v.AuxInt)
  3627  		x := v_0
  3628  		y := v_1
  3629  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3630  			break
  3631  		}
  3632  		boolval := v_2.Args[0]
  3633  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3634  			break
  3635  		}
  3636  		v.reset(OpARM64CSEL)
  3637  		v.AuxInt = opToAuxInt(boolval.Op)
  3638  		v.AddArg3(x, y, flagArg(boolval))
  3639  		return true
  3640  	}
  3641  	// match: (CSEL [cc] x y (CMPWconst [0] boolval))
  3642  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3643  	// result: (CSEL [arm64Negate(boolval.Op)] x y flagArg(boolval))
  3644  	for {
  3645  		cc := auxIntToOp(v.AuxInt)
  3646  		x := v_0
  3647  		y := v_1
  3648  		if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  3649  			break
  3650  		}
  3651  		boolval := v_2.Args[0]
  3652  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3653  			break
  3654  		}
  3655  		v.reset(OpARM64CSEL)
  3656  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3657  		v.AddArg3(x, y, flagArg(boolval))
  3658  		return true
  3659  	}
  3660  	return false
  3661  }
  3662  func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
  3663  	v_1 := v.Args[1]
  3664  	v_0 := v.Args[0]
  3665  	// match: (CSEL0 [cc] x (InvertFlags cmp))
  3666  	// result: (CSEL0 [arm64Invert(cc)] x cmp)
  3667  	for {
  3668  		cc := auxIntToOp(v.AuxInt)
  3669  		x := v_0
  3670  		if v_1.Op != OpARM64InvertFlags {
  3671  			break
  3672  		}
  3673  		cmp := v_1.Args[0]
  3674  		v.reset(OpARM64CSEL0)
  3675  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3676  		v.AddArg2(x, cmp)
  3677  		return true
  3678  	}
  3679  	// match: (CSEL0 [cc] x flag)
  3680  	// cond: ccARM64Eval(cc, flag) > 0
  3681  	// result: x
  3682  	for {
  3683  		cc := auxIntToOp(v.AuxInt)
  3684  		x := v_0
  3685  		flag := v_1
  3686  		if !(ccARM64Eval(cc, flag) > 0) {
  3687  			break
  3688  		}
  3689  		v.copyOf(x)
  3690  		return true
  3691  	}
  3692  	// match: (CSEL0 [cc] _ flag)
  3693  	// cond: ccARM64Eval(cc, flag) < 0
  3694  	// result: (MOVDconst [0])
  3695  	for {
  3696  		cc := auxIntToOp(v.AuxInt)
  3697  		flag := v_1
  3698  		if !(ccARM64Eval(cc, flag) < 0) {
  3699  			break
  3700  		}
  3701  		v.reset(OpARM64MOVDconst)
  3702  		v.AuxInt = int64ToAuxInt(0)
  3703  		return true
  3704  	}
  3705  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3706  	// cond: cc == OpARM64NotEqual && flagArg(boolval) != nil
  3707  	// result: (CSEL0 [boolval.Op] x flagArg(boolval))
  3708  	for {
  3709  		cc := auxIntToOp(v.AuxInt)
  3710  		x := v_0
  3711  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3712  			break
  3713  		}
  3714  		boolval := v_1.Args[0]
  3715  		if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
  3716  			break
  3717  		}
  3718  		v.reset(OpARM64CSEL0)
  3719  		v.AuxInt = opToAuxInt(boolval.Op)
  3720  		v.AddArg2(x, flagArg(boolval))
  3721  		return true
  3722  	}
  3723  	// match: (CSEL0 [cc] x (CMPWconst [0] boolval))
  3724  	// cond: cc == OpARM64Equal && flagArg(boolval) != nil
  3725  	// result: (CSEL0 [arm64Negate(boolval.Op)] x flagArg(boolval))
  3726  	for {
  3727  		cc := auxIntToOp(v.AuxInt)
  3728  		x := v_0
  3729  		if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
  3730  			break
  3731  		}
  3732  		boolval := v_1.Args[0]
  3733  		if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
  3734  			break
  3735  		}
  3736  		v.reset(OpARM64CSEL0)
  3737  		v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
  3738  		v.AddArg2(x, flagArg(boolval))
  3739  		return true
  3740  	}
  3741  	return false
  3742  }
  3743  func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
  3744  	v_0 := v.Args[0]
  3745  	// match: (CSETM [cc] (InvertFlags cmp))
  3746  	// result: (CSETM [arm64Invert(cc)] cmp)
  3747  	for {
  3748  		cc := auxIntToOp(v.AuxInt)
  3749  		if v_0.Op != OpARM64InvertFlags {
  3750  			break
  3751  		}
  3752  		cmp := v_0.Args[0]
  3753  		v.reset(OpARM64CSETM)
  3754  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3755  		v.AddArg(cmp)
  3756  		return true
  3757  	}
  3758  	// match: (CSETM [cc] flag)
  3759  	// cond: ccARM64Eval(cc, flag) > 0
  3760  	// result: (MOVDconst [-1])
  3761  	for {
  3762  		cc := auxIntToOp(v.AuxInt)
  3763  		flag := v_0
  3764  		if !(ccARM64Eval(cc, flag) > 0) {
  3765  			break
  3766  		}
  3767  		v.reset(OpARM64MOVDconst)
  3768  		v.AuxInt = int64ToAuxInt(-1)
  3769  		return true
  3770  	}
  3771  	// match: (CSETM [cc] flag)
  3772  	// cond: ccARM64Eval(cc, flag) < 0
  3773  	// result: (MOVDconst [0])
  3774  	for {
  3775  		cc := auxIntToOp(v.AuxInt)
  3776  		flag := v_0
  3777  		if !(ccARM64Eval(cc, flag) < 0) {
  3778  			break
  3779  		}
  3780  		v.reset(OpARM64MOVDconst)
  3781  		v.AuxInt = int64ToAuxInt(0)
  3782  		return true
  3783  	}
  3784  	return false
  3785  }
  3786  func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
  3787  	v_2 := v.Args[2]
  3788  	v_1 := v.Args[1]
  3789  	v_0 := v.Args[0]
  3790  	// match: (CSINC [cc] x y (InvertFlags cmp))
  3791  	// result: (CSINC [arm64Invert(cc)] x y cmp)
  3792  	for {
  3793  		cc := auxIntToOp(v.AuxInt)
  3794  		x := v_0
  3795  		y := v_1
  3796  		if v_2.Op != OpARM64InvertFlags {
  3797  			break
  3798  		}
  3799  		cmp := v_2.Args[0]
  3800  		v.reset(OpARM64CSINC)
  3801  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3802  		v.AddArg3(x, y, cmp)
  3803  		return true
  3804  	}
  3805  	// match: (CSINC [cc] x _ flag)
  3806  	// cond: ccARM64Eval(cc, flag) > 0
  3807  	// result: x
  3808  	for {
  3809  		cc := auxIntToOp(v.AuxInt)
  3810  		x := v_0
  3811  		flag := v_2
  3812  		if !(ccARM64Eval(cc, flag) > 0) {
  3813  			break
  3814  		}
  3815  		v.copyOf(x)
  3816  		return true
  3817  	}
  3818  	// match: (CSINC [cc] _ y flag)
  3819  	// cond: ccARM64Eval(cc, flag) < 0
  3820  	// result: (ADDconst [1] y)
  3821  	for {
  3822  		cc := auxIntToOp(v.AuxInt)
  3823  		y := v_1
  3824  		flag := v_2
  3825  		if !(ccARM64Eval(cc, flag) < 0) {
  3826  			break
  3827  		}
  3828  		v.reset(OpARM64ADDconst)
  3829  		v.AuxInt = int64ToAuxInt(1)
  3830  		v.AddArg(y)
  3831  		return true
  3832  	}
  3833  	return false
  3834  }
  3835  func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
  3836  	v_2 := v.Args[2]
  3837  	v_1 := v.Args[1]
  3838  	v_0 := v.Args[0]
  3839  	// match: (CSINV [cc] x y (InvertFlags cmp))
  3840  	// result: (CSINV [arm64Invert(cc)] x y cmp)
  3841  	for {
  3842  		cc := auxIntToOp(v.AuxInt)
  3843  		x := v_0
  3844  		y := v_1
  3845  		if v_2.Op != OpARM64InvertFlags {
  3846  			break
  3847  		}
  3848  		cmp := v_2.Args[0]
  3849  		v.reset(OpARM64CSINV)
  3850  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3851  		v.AddArg3(x, y, cmp)
  3852  		return true
  3853  	}
  3854  	// match: (CSINV [cc] x _ flag)
  3855  	// cond: ccARM64Eval(cc, flag) > 0
  3856  	// result: x
  3857  	for {
  3858  		cc := auxIntToOp(v.AuxInt)
  3859  		x := v_0
  3860  		flag := v_2
  3861  		if !(ccARM64Eval(cc, flag) > 0) {
  3862  			break
  3863  		}
  3864  		v.copyOf(x)
  3865  		return true
  3866  	}
  3867  	// match: (CSINV [cc] _ y flag)
  3868  	// cond: ccARM64Eval(cc, flag) < 0
  3869  	// result: (Not y)
  3870  	for {
  3871  		cc := auxIntToOp(v.AuxInt)
  3872  		y := v_1
  3873  		flag := v_2
  3874  		if !(ccARM64Eval(cc, flag) < 0) {
  3875  			break
  3876  		}
  3877  		v.reset(OpNot)
  3878  		v.AddArg(y)
  3879  		return true
  3880  	}
  3881  	return false
  3882  }
  3883  func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
  3884  	v_2 := v.Args[2]
  3885  	v_1 := v.Args[1]
  3886  	v_0 := v.Args[0]
  3887  	// match: (CSNEG [cc] x y (InvertFlags cmp))
  3888  	// result: (CSNEG [arm64Invert(cc)] x y cmp)
  3889  	for {
  3890  		cc := auxIntToOp(v.AuxInt)
  3891  		x := v_0
  3892  		y := v_1
  3893  		if v_2.Op != OpARM64InvertFlags {
  3894  			break
  3895  		}
  3896  		cmp := v_2.Args[0]
  3897  		v.reset(OpARM64CSNEG)
  3898  		v.AuxInt = opToAuxInt(arm64Invert(cc))
  3899  		v.AddArg3(x, y, cmp)
  3900  		return true
  3901  	}
  3902  	// match: (CSNEG [cc] x _ flag)
  3903  	// cond: ccARM64Eval(cc, flag) > 0
  3904  	// result: x
  3905  	for {
  3906  		cc := auxIntToOp(v.AuxInt)
  3907  		x := v_0
  3908  		flag := v_2
  3909  		if !(ccARM64Eval(cc, flag) > 0) {
  3910  			break
  3911  		}
  3912  		v.copyOf(x)
  3913  		return true
  3914  	}
  3915  	// match: (CSNEG [cc] _ y flag)
  3916  	// cond: ccARM64Eval(cc, flag) < 0
  3917  	// result: (NEG y)
  3918  	for {
  3919  		cc := auxIntToOp(v.AuxInt)
  3920  		y := v_1
  3921  		flag := v_2
  3922  		if !(ccARM64Eval(cc, flag) < 0) {
  3923  			break
  3924  		}
  3925  		v.reset(OpARM64NEG)
  3926  		v.AddArg(y)
  3927  		return true
  3928  	}
  3929  	return false
  3930  }
  3931  func rewriteValueARM64_OpARM64DIV(v *Value) bool {
  3932  	v_1 := v.Args[1]
  3933  	v_0 := v.Args[0]
  3934  	// match: (DIV (MOVDconst [c]) (MOVDconst [d]))
  3935  	// cond: d != 0
  3936  	// result: (MOVDconst [c/d])
  3937  	for {
  3938  		if v_0.Op != OpARM64MOVDconst {
  3939  			break
  3940  		}
  3941  		c := auxIntToInt64(v_0.AuxInt)
  3942  		if v_1.Op != OpARM64MOVDconst {
  3943  			break
  3944  		}
  3945  		d := auxIntToInt64(v_1.AuxInt)
  3946  		if !(d != 0) {
  3947  			break
  3948  		}
  3949  		v.reset(OpARM64MOVDconst)
  3950  		v.AuxInt = int64ToAuxInt(c / d)
  3951  		return true
  3952  	}
  3953  	return false
  3954  }
  3955  func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
  3956  	v_1 := v.Args[1]
  3957  	v_0 := v.Args[0]
  3958  	// match: (DIVW (MOVDconst [c]) (MOVDconst [d]))
  3959  	// cond: d != 0
  3960  	// result: (MOVDconst [int64(uint32(int32(c)/int32(d)))])
  3961  	for {
  3962  		if v_0.Op != OpARM64MOVDconst {
  3963  			break
  3964  		}
  3965  		c := auxIntToInt64(v_0.AuxInt)
  3966  		if v_1.Op != OpARM64MOVDconst {
  3967  			break
  3968  		}
  3969  		d := auxIntToInt64(v_1.AuxInt)
  3970  		if !(d != 0) {
  3971  			break
  3972  		}
  3973  		v.reset(OpARM64MOVDconst)
  3974  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
  3975  		return true
  3976  	}
  3977  	return false
  3978  }
  3979  func rewriteValueARM64_OpARM64EON(v *Value) bool {
  3980  	v_1 := v.Args[1]
  3981  	v_0 := v.Args[0]
  3982  	// match: (EON x (MOVDconst [c]))
  3983  	// result: (XORconst [^c] x)
  3984  	for {
  3985  		x := v_0
  3986  		if v_1.Op != OpARM64MOVDconst {
  3987  			break
  3988  		}
  3989  		c := auxIntToInt64(v_1.AuxInt)
  3990  		v.reset(OpARM64XORconst)
  3991  		v.AuxInt = int64ToAuxInt(^c)
  3992  		v.AddArg(x)
  3993  		return true
  3994  	}
  3995  	// match: (EON x x)
  3996  	// result: (MOVDconst [-1])
  3997  	for {
  3998  		x := v_0
  3999  		if x != v_1 {
  4000  			break
  4001  		}
  4002  		v.reset(OpARM64MOVDconst)
  4003  		v.AuxInt = int64ToAuxInt(-1)
  4004  		return true
  4005  	}
  4006  	// match: (EON x0 x1:(SLLconst [c] y))
  4007  	// cond: clobberIfDead(x1)
  4008  	// result: (EONshiftLL x0 y [c])
  4009  	for {
  4010  		x0 := v_0
  4011  		x1 := v_1
  4012  		if x1.Op != OpARM64SLLconst {
  4013  			break
  4014  		}
  4015  		c := auxIntToInt64(x1.AuxInt)
  4016  		y := x1.Args[0]
  4017  		if !(clobberIfDead(x1)) {
  4018  			break
  4019  		}
  4020  		v.reset(OpARM64EONshiftLL)
  4021  		v.AuxInt = int64ToAuxInt(c)
  4022  		v.AddArg2(x0, y)
  4023  		return true
  4024  	}
  4025  	// match: (EON x0 x1:(SRLconst [c] y))
  4026  	// cond: clobberIfDead(x1)
  4027  	// result: (EONshiftRL x0 y [c])
  4028  	for {
  4029  		x0 := v_0
  4030  		x1 := v_1
  4031  		if x1.Op != OpARM64SRLconst {
  4032  			break
  4033  		}
  4034  		c := auxIntToInt64(x1.AuxInt)
  4035  		y := x1.Args[0]
  4036  		if !(clobberIfDead(x1)) {
  4037  			break
  4038  		}
  4039  		v.reset(OpARM64EONshiftRL)
  4040  		v.AuxInt = int64ToAuxInt(c)
  4041  		v.AddArg2(x0, y)
  4042  		return true
  4043  	}
  4044  	// match: (EON x0 x1:(SRAconst [c] y))
  4045  	// cond: clobberIfDead(x1)
  4046  	// result: (EONshiftRA x0 y [c])
  4047  	for {
  4048  		x0 := v_0
  4049  		x1 := v_1
  4050  		if x1.Op != OpARM64SRAconst {
  4051  			break
  4052  		}
  4053  		c := auxIntToInt64(x1.AuxInt)
  4054  		y := x1.Args[0]
  4055  		if !(clobberIfDead(x1)) {
  4056  			break
  4057  		}
  4058  		v.reset(OpARM64EONshiftRA)
  4059  		v.AuxInt = int64ToAuxInt(c)
  4060  		v.AddArg2(x0, y)
  4061  		return true
  4062  	}
  4063  	// match: (EON x0 x1:(RORconst [c] y))
  4064  	// cond: clobberIfDead(x1)
  4065  	// result: (EONshiftRO x0 y [c])
  4066  	for {
  4067  		x0 := v_0
  4068  		x1 := v_1
  4069  		if x1.Op != OpARM64RORconst {
  4070  			break
  4071  		}
  4072  		c := auxIntToInt64(x1.AuxInt)
  4073  		y := x1.Args[0]
  4074  		if !(clobberIfDead(x1)) {
  4075  			break
  4076  		}
  4077  		v.reset(OpARM64EONshiftRO)
  4078  		v.AuxInt = int64ToAuxInt(c)
  4079  		v.AddArg2(x0, y)
  4080  		return true
  4081  	}
  4082  	return false
  4083  }
  4084  func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
  4085  	v_1 := v.Args[1]
  4086  	v_0 := v.Args[0]
  4087  	// match: (EONshiftLL x (MOVDconst [c]) [d])
  4088  	// result: (XORconst x [^int64(uint64(c)<<uint64(d))])
  4089  	for {
  4090  		d := auxIntToInt64(v.AuxInt)
  4091  		x := v_0
  4092  		if v_1.Op != OpARM64MOVDconst {
  4093  			break
  4094  		}
  4095  		c := auxIntToInt64(v_1.AuxInt)
  4096  		v.reset(OpARM64XORconst)
  4097  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
  4098  		v.AddArg(x)
  4099  		return true
  4100  	}
  4101  	// match: (EONshiftLL (SLLconst x [c]) x [c])
  4102  	// result: (MOVDconst [-1])
  4103  	for {
  4104  		c := auxIntToInt64(v.AuxInt)
  4105  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
  4106  			break
  4107  		}
  4108  		x := v_0.Args[0]
  4109  		if x != v_1 {
  4110  			break
  4111  		}
  4112  		v.reset(OpARM64MOVDconst)
  4113  		v.AuxInt = int64ToAuxInt(-1)
  4114  		return true
  4115  	}
  4116  	return false
  4117  }
  4118  func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
  4119  	v_1 := v.Args[1]
  4120  	v_0 := v.Args[0]
  4121  	// match: (EONshiftRA x (MOVDconst [c]) [d])
  4122  	// result: (XORconst x [^(c>>uint64(d))])
  4123  	for {
  4124  		d := auxIntToInt64(v.AuxInt)
  4125  		x := v_0
  4126  		if v_1.Op != OpARM64MOVDconst {
  4127  			break
  4128  		}
  4129  		c := auxIntToInt64(v_1.AuxInt)
  4130  		v.reset(OpARM64XORconst)
  4131  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
  4132  		v.AddArg(x)
  4133  		return true
  4134  	}
  4135  	// match: (EONshiftRA (SRAconst x [c]) x [c])
  4136  	// result: (MOVDconst [-1])
  4137  	for {
  4138  		c := auxIntToInt64(v.AuxInt)
  4139  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
  4140  			break
  4141  		}
  4142  		x := v_0.Args[0]
  4143  		if x != v_1 {
  4144  			break
  4145  		}
  4146  		v.reset(OpARM64MOVDconst)
  4147  		v.AuxInt = int64ToAuxInt(-1)
  4148  		return true
  4149  	}
  4150  	return false
  4151  }
  4152  func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
  4153  	v_1 := v.Args[1]
  4154  	v_0 := v.Args[0]
  4155  	// match: (EONshiftRL x (MOVDconst [c]) [d])
  4156  	// result: (XORconst x [^int64(uint64(c)>>uint64(d))])
  4157  	for {
  4158  		d := auxIntToInt64(v.AuxInt)
  4159  		x := v_0
  4160  		if v_1.Op != OpARM64MOVDconst {
  4161  			break
  4162  		}
  4163  		c := auxIntToInt64(v_1.AuxInt)
  4164  		v.reset(OpARM64XORconst)
  4165  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
  4166  		v.AddArg(x)
  4167  		return true
  4168  	}
  4169  	// match: (EONshiftRL (SRLconst x [c]) x [c])
  4170  	// result: (MOVDconst [-1])
  4171  	for {
  4172  		c := auxIntToInt64(v.AuxInt)
  4173  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
  4174  			break
  4175  		}
  4176  		x := v_0.Args[0]
  4177  		if x != v_1 {
  4178  			break
  4179  		}
  4180  		v.reset(OpARM64MOVDconst)
  4181  		v.AuxInt = int64ToAuxInt(-1)
  4182  		return true
  4183  	}
  4184  	return false
  4185  }
  4186  func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
  4187  	v_1 := v.Args[1]
  4188  	v_0 := v.Args[0]
  4189  	// match: (EONshiftRO x (MOVDconst [c]) [d])
  4190  	// result: (XORconst x [^rotateRight64(c, d)])
  4191  	for {
  4192  		d := auxIntToInt64(v.AuxInt)
  4193  		x := v_0
  4194  		if v_1.Op != OpARM64MOVDconst {
  4195  			break
  4196  		}
  4197  		c := auxIntToInt64(v_1.AuxInt)
  4198  		v.reset(OpARM64XORconst)
  4199  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
  4200  		v.AddArg(x)
  4201  		return true
  4202  	}
  4203  	// match: (EONshiftRO (RORconst x [c]) x [c])
  4204  	// result: (MOVDconst [-1])
  4205  	for {
  4206  		c := auxIntToInt64(v.AuxInt)
  4207  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
  4208  			break
  4209  		}
  4210  		x := v_0.Args[0]
  4211  		if x != v_1 {
  4212  			break
  4213  		}
  4214  		v.reset(OpARM64MOVDconst)
  4215  		v.AuxInt = int64ToAuxInt(-1)
  4216  		return true
  4217  	}
  4218  	return false
  4219  }
  4220  func rewriteValueARM64_OpARM64Equal(v *Value) bool {
  4221  	v_0 := v.Args[0]
  4222  	b := v.Block
  4223  	// match: (Equal (CMPconst [0] z:(AND x y)))
  4224  	// cond: z.Uses == 1
  4225  	// result: (Equal (TST x y))
  4226  	for {
  4227  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4228  			break
  4229  		}
  4230  		z := v_0.Args[0]
  4231  		if z.Op != OpARM64AND {
  4232  			break
  4233  		}
  4234  		y := z.Args[1]
  4235  		x := z.Args[0]
  4236  		if !(z.Uses == 1) {
  4237  			break
  4238  		}
  4239  		v.reset(OpARM64Equal)
  4240  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  4241  		v0.AddArg2(x, y)
  4242  		v.AddArg(v0)
  4243  		return true
  4244  	}
  4245  	// match: (Equal (CMPWconst [0] x:(ANDconst [c] y)))
  4246  	// cond: x.Uses == 1
  4247  	// result: (Equal (TSTWconst [int32(c)] y))
  4248  	for {
  4249  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4250  			break
  4251  		}
  4252  		x := v_0.Args[0]
  4253  		if x.Op != OpARM64ANDconst {
  4254  			break
  4255  		}
  4256  		c := auxIntToInt64(x.AuxInt)
  4257  		y := x.Args[0]
  4258  		if !(x.Uses == 1) {
  4259  			break
  4260  		}
  4261  		v.reset(OpARM64Equal)
  4262  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  4263  		v0.AuxInt = int32ToAuxInt(int32(c))
  4264  		v0.AddArg(y)
  4265  		v.AddArg(v0)
  4266  		return true
  4267  	}
  4268  	// match: (Equal (CMPWconst [0] z:(AND x y)))
  4269  	// cond: z.Uses == 1
  4270  	// result: (Equal (TSTW x y))
  4271  	for {
  4272  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4273  			break
  4274  		}
  4275  		z := v_0.Args[0]
  4276  		if z.Op != OpARM64AND {
  4277  			break
  4278  		}
  4279  		y := z.Args[1]
  4280  		x := z.Args[0]
  4281  		if !(z.Uses == 1) {
  4282  			break
  4283  		}
  4284  		v.reset(OpARM64Equal)
  4285  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  4286  		v0.AddArg2(x, y)
  4287  		v.AddArg(v0)
  4288  		return true
  4289  	}
  4290  	// match: (Equal (CMPconst [0] x:(ANDconst [c] y)))
  4291  	// cond: x.Uses == 1
  4292  	// result: (Equal (TSTconst [c] y))
  4293  	for {
  4294  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4295  			break
  4296  		}
  4297  		x := v_0.Args[0]
  4298  		if x.Op != OpARM64ANDconst {
  4299  			break
  4300  		}
  4301  		c := auxIntToInt64(x.AuxInt)
  4302  		y := x.Args[0]
  4303  		if !(x.Uses == 1) {
  4304  			break
  4305  		}
  4306  		v.reset(OpARM64Equal)
  4307  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  4308  		v0.AuxInt = int64ToAuxInt(c)
  4309  		v0.AddArg(y)
  4310  		v.AddArg(v0)
  4311  		return true
  4312  	}
  4313  	// match: (Equal (CMP x z:(NEG y)))
  4314  	// cond: z.Uses == 1
  4315  	// result: (Equal (CMN x y))
  4316  	for {
  4317  		if v_0.Op != OpARM64CMP {
  4318  			break
  4319  		}
  4320  		_ = v_0.Args[1]
  4321  		x := v_0.Args[0]
  4322  		z := v_0.Args[1]
  4323  		if z.Op != OpARM64NEG {
  4324  			break
  4325  		}
  4326  		y := z.Args[0]
  4327  		if !(z.Uses == 1) {
  4328  			break
  4329  		}
  4330  		v.reset(OpARM64Equal)
  4331  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4332  		v0.AddArg2(x, y)
  4333  		v.AddArg(v0)
  4334  		return true
  4335  	}
  4336  	// match: (Equal (CMPW x z:(NEG y)))
  4337  	// cond: z.Uses == 1
  4338  	// result: (Equal (CMNW x y))
  4339  	for {
  4340  		if v_0.Op != OpARM64CMPW {
  4341  			break
  4342  		}
  4343  		_ = v_0.Args[1]
  4344  		x := v_0.Args[0]
  4345  		z := v_0.Args[1]
  4346  		if z.Op != OpARM64NEG {
  4347  			break
  4348  		}
  4349  		y := z.Args[0]
  4350  		if !(z.Uses == 1) {
  4351  			break
  4352  		}
  4353  		v.reset(OpARM64Equal)
  4354  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4355  		v0.AddArg2(x, y)
  4356  		v.AddArg(v0)
  4357  		return true
  4358  	}
  4359  	// match: (Equal (CMPconst [0] x:(ADDconst [c] y)))
  4360  	// cond: x.Uses == 1
  4361  	// result: (Equal (CMNconst [c] y))
  4362  	for {
  4363  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4364  			break
  4365  		}
  4366  		x := v_0.Args[0]
  4367  		if x.Op != OpARM64ADDconst {
  4368  			break
  4369  		}
  4370  		c := auxIntToInt64(x.AuxInt)
  4371  		y := x.Args[0]
  4372  		if !(x.Uses == 1) {
  4373  			break
  4374  		}
  4375  		v.reset(OpARM64Equal)
  4376  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  4377  		v0.AuxInt = int64ToAuxInt(c)
  4378  		v0.AddArg(y)
  4379  		v.AddArg(v0)
  4380  		return true
  4381  	}
  4382  	// match: (Equal (CMPWconst [0] x:(ADDconst [c] y)))
  4383  	// cond: x.Uses == 1
  4384  	// result: (Equal (CMNWconst [int32(c)] y))
  4385  	for {
  4386  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4387  			break
  4388  		}
  4389  		x := v_0.Args[0]
  4390  		if x.Op != OpARM64ADDconst {
  4391  			break
  4392  		}
  4393  		c := auxIntToInt64(x.AuxInt)
  4394  		y := x.Args[0]
  4395  		if !(x.Uses == 1) {
  4396  			break
  4397  		}
  4398  		v.reset(OpARM64Equal)
  4399  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  4400  		v0.AuxInt = int32ToAuxInt(int32(c))
  4401  		v0.AddArg(y)
  4402  		v.AddArg(v0)
  4403  		return true
  4404  	}
  4405  	// match: (Equal (CMPconst [0] z:(ADD x y)))
  4406  	// cond: z.Uses == 1
  4407  	// result: (Equal (CMN x y))
  4408  	for {
  4409  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4410  			break
  4411  		}
  4412  		z := v_0.Args[0]
  4413  		if z.Op != OpARM64ADD {
  4414  			break
  4415  		}
  4416  		y := z.Args[1]
  4417  		x := z.Args[0]
  4418  		if !(z.Uses == 1) {
  4419  			break
  4420  		}
  4421  		v.reset(OpARM64Equal)
  4422  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4423  		v0.AddArg2(x, y)
  4424  		v.AddArg(v0)
  4425  		return true
  4426  	}
  4427  	// match: (Equal (CMPWconst [0] z:(ADD x y)))
  4428  	// cond: z.Uses == 1
  4429  	// result: (Equal (CMNW x y))
  4430  	for {
  4431  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4432  			break
  4433  		}
  4434  		z := v_0.Args[0]
  4435  		if z.Op != OpARM64ADD {
  4436  			break
  4437  		}
  4438  		y := z.Args[1]
  4439  		x := z.Args[0]
  4440  		if !(z.Uses == 1) {
  4441  			break
  4442  		}
  4443  		v.reset(OpARM64Equal)
  4444  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4445  		v0.AddArg2(x, y)
  4446  		v.AddArg(v0)
  4447  		return true
  4448  	}
  4449  	// match: (Equal (CMPconst [0] z:(MADD a x y)))
  4450  	// cond: z.Uses == 1
  4451  	// result: (Equal (CMN a (MUL <x.Type> x y)))
  4452  	for {
  4453  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4454  			break
  4455  		}
  4456  		z := v_0.Args[0]
  4457  		if z.Op != OpARM64MADD {
  4458  			break
  4459  		}
  4460  		y := z.Args[2]
  4461  		a := z.Args[0]
  4462  		x := z.Args[1]
  4463  		if !(z.Uses == 1) {
  4464  			break
  4465  		}
  4466  		v.reset(OpARM64Equal)
  4467  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  4468  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4469  		v1.AddArg2(x, y)
  4470  		v0.AddArg2(a, v1)
  4471  		v.AddArg(v0)
  4472  		return true
  4473  	}
  4474  	// match: (Equal (CMPconst [0] z:(MSUB a x y)))
  4475  	// cond: z.Uses == 1
  4476  	// result: (Equal (CMP a (MUL <x.Type> x y)))
  4477  	for {
  4478  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  4479  			break
  4480  		}
  4481  		z := v_0.Args[0]
  4482  		if z.Op != OpARM64MSUB {
  4483  			break
  4484  		}
  4485  		y := z.Args[2]
  4486  		a := z.Args[0]
  4487  		x := z.Args[1]
  4488  		if !(z.Uses == 1) {
  4489  			break
  4490  		}
  4491  		v.reset(OpARM64Equal)
  4492  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  4493  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  4494  		v1.AddArg2(x, y)
  4495  		v0.AddArg2(a, v1)
  4496  		v.AddArg(v0)
  4497  		return true
  4498  	}
  4499  	// match: (Equal (CMPWconst [0] z:(MADDW a x y)))
  4500  	// cond: z.Uses == 1
  4501  	// result: (Equal (CMNW a (MULW <x.Type> x y)))
  4502  	for {
  4503  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4504  			break
  4505  		}
  4506  		z := v_0.Args[0]
  4507  		if z.Op != OpARM64MADDW {
  4508  			break
  4509  		}
  4510  		y := z.Args[2]
  4511  		a := z.Args[0]
  4512  		x := z.Args[1]
  4513  		if !(z.Uses == 1) {
  4514  			break
  4515  		}
  4516  		v.reset(OpARM64Equal)
  4517  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  4518  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4519  		v1.AddArg2(x, y)
  4520  		v0.AddArg2(a, v1)
  4521  		v.AddArg(v0)
  4522  		return true
  4523  	}
  4524  	// match: (Equal (CMPWconst [0] z:(MSUBW a x y)))
  4525  	// cond: z.Uses == 1
  4526  	// result: (Equal (CMPW a (MULW <x.Type> x y)))
  4527  	for {
  4528  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  4529  			break
  4530  		}
  4531  		z := v_0.Args[0]
  4532  		if z.Op != OpARM64MSUBW {
  4533  			break
  4534  		}
  4535  		y := z.Args[2]
  4536  		a := z.Args[0]
  4537  		x := z.Args[1]
  4538  		if !(z.Uses == 1) {
  4539  			break
  4540  		}
  4541  		v.reset(OpARM64Equal)
  4542  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  4543  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  4544  		v1.AddArg2(x, y)
  4545  		v0.AddArg2(a, v1)
  4546  		v.AddArg(v0)
  4547  		return true
  4548  	}
  4549  	// match: (Equal (FlagConstant [fc]))
  4550  	// result: (MOVDconst [b2i(fc.eq())])
  4551  	for {
  4552  		if v_0.Op != OpARM64FlagConstant {
  4553  			break
  4554  		}
  4555  		fc := auxIntToFlagConstant(v_0.AuxInt)
  4556  		v.reset(OpARM64MOVDconst)
  4557  		v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
  4558  		return true
  4559  	}
  4560  	// match: (Equal (InvertFlags x))
  4561  	// result: (Equal x)
  4562  	for {
  4563  		if v_0.Op != OpARM64InvertFlags {
  4564  			break
  4565  		}
  4566  		x := v_0.Args[0]
  4567  		v.reset(OpARM64Equal)
  4568  		v.AddArg(x)
  4569  		return true
  4570  	}
  4571  	return false
  4572  }
  4573  func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
  4574  	v_1 := v.Args[1]
  4575  	v_0 := v.Args[0]
  4576  	// match: (FADDD a (FMULD x y))
  4577  	// cond: a.Block.Func.useFMA(v)
  4578  	// result: (FMADDD a x y)
  4579  	for {
  4580  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4581  			a := v_0
  4582  			if v_1.Op != OpARM64FMULD {
  4583  				continue
  4584  			}
  4585  			y := v_1.Args[1]
  4586  			x := v_1.Args[0]
  4587  			if !(a.Block.Func.useFMA(v)) {
  4588  				continue
  4589  			}
  4590  			v.reset(OpARM64FMADDD)
  4591  			v.AddArg3(a, x, y)
  4592  			return true
  4593  		}
  4594  		break
  4595  	}
  4596  	// match: (FADDD a (FNMULD x y))
  4597  	// cond: a.Block.Func.useFMA(v)
  4598  	// result: (FMSUBD 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 != OpARM64FNMULD {
  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(OpARM64FMSUBD)
  4611  			v.AddArg3(a, x, y)
  4612  			return true
  4613  		}
  4614  		break
  4615  	}
  4616  	return false
  4617  }
  4618  func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
  4619  	v_1 := v.Args[1]
  4620  	v_0 := v.Args[0]
  4621  	// match: (FADDS a (FMULS x y))
  4622  	// cond: a.Block.Func.useFMA(v)
  4623  	// result: (FMADDS a x y)
  4624  	for {
  4625  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4626  			a := v_0
  4627  			if v_1.Op != OpARM64FMULS {
  4628  				continue
  4629  			}
  4630  			y := v_1.Args[1]
  4631  			x := v_1.Args[0]
  4632  			if !(a.Block.Func.useFMA(v)) {
  4633  				continue
  4634  			}
  4635  			v.reset(OpARM64FMADDS)
  4636  			v.AddArg3(a, x, y)
  4637  			return true
  4638  		}
  4639  		break
  4640  	}
  4641  	// match: (FADDS a (FNMULS x y))
  4642  	// cond: a.Block.Func.useFMA(v)
  4643  	// result: (FMSUBS 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 != OpARM64FNMULS {
  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(OpARM64FMSUBS)
  4656  			v.AddArg3(a, x, y)
  4657  			return true
  4658  		}
  4659  		break
  4660  	}
  4661  	return false
  4662  }
  4663  func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
  4664  	v_1 := v.Args[1]
  4665  	v_0 := v.Args[0]
  4666  	b := v.Block
  4667  	// match: (FCMPD x (FMOVDconst [0]))
  4668  	// result: (FCMPD0 x)
  4669  	for {
  4670  		x := v_0
  4671  		if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4672  			break
  4673  		}
  4674  		v.reset(OpARM64FCMPD0)
  4675  		v.AddArg(x)
  4676  		return true
  4677  	}
  4678  	// match: (FCMPD (FMOVDconst [0]) x)
  4679  	// result: (InvertFlags (FCMPD0 x))
  4680  	for {
  4681  		if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4682  			break
  4683  		}
  4684  		x := v_1
  4685  		v.reset(OpARM64InvertFlags)
  4686  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
  4687  		v0.AddArg(x)
  4688  		v.AddArg(v0)
  4689  		return true
  4690  	}
  4691  	return false
  4692  }
  4693  func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
  4694  	v_1 := v.Args[1]
  4695  	v_0 := v.Args[0]
  4696  	b := v.Block
  4697  	// match: (FCMPS x (FMOVSconst [0]))
  4698  	// result: (FCMPS0 x)
  4699  	for {
  4700  		x := v_0
  4701  		if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
  4702  			break
  4703  		}
  4704  		v.reset(OpARM64FCMPS0)
  4705  		v.AddArg(x)
  4706  		return true
  4707  	}
  4708  	// match: (FCMPS (FMOVSconst [0]) x)
  4709  	// result: (InvertFlags (FCMPS0 x))
  4710  	for {
  4711  		if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
  4712  			break
  4713  		}
  4714  		x := v_1
  4715  		v.reset(OpARM64InvertFlags)
  4716  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
  4717  		v0.AddArg(x)
  4718  		v.AddArg(v0)
  4719  		return true
  4720  	}
  4721  	return false
  4722  }
  4723  func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
  4724  	v_0 := v.Args[0]
  4725  	b := v.Block
  4726  	// match: (FMOVDfpgp <t> (Arg [off] {sym}))
  4727  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4728  	for {
  4729  		t := v.Type
  4730  		if v_0.Op != OpArg {
  4731  			break
  4732  		}
  4733  		off := auxIntToInt32(v_0.AuxInt)
  4734  		sym := auxToSym(v_0.Aux)
  4735  		b = b.Func.Entry
  4736  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4737  		v.copyOf(v0)
  4738  		v0.AuxInt = int32ToAuxInt(off)
  4739  		v0.Aux = symToAux(sym)
  4740  		return true
  4741  	}
  4742  	return false
  4743  }
  4744  func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
  4745  	v_0 := v.Args[0]
  4746  	b := v.Block
  4747  	// match: (FMOVDgpfp <t> (Arg [off] {sym}))
  4748  	// result: @b.Func.Entry (Arg <t> [off] {sym})
  4749  	for {
  4750  		t := v.Type
  4751  		if v_0.Op != OpArg {
  4752  			break
  4753  		}
  4754  		off := auxIntToInt32(v_0.AuxInt)
  4755  		sym := auxToSym(v_0.Aux)
  4756  		b = b.Func.Entry
  4757  		v0 := b.NewValue0(v.Pos, OpArg, t)
  4758  		v.copyOf(v0)
  4759  		v0.AuxInt = int32ToAuxInt(off)
  4760  		v0.Aux = symToAux(sym)
  4761  		return true
  4762  	}
  4763  	return false
  4764  }
  4765  func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
  4766  	v_1 := v.Args[1]
  4767  	v_0 := v.Args[0]
  4768  	b := v.Block
  4769  	config := b.Func.Config
  4770  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr val _))
  4771  	// result: (FMOVDgpfp val)
  4772  	for {
  4773  		off := auxIntToInt32(v.AuxInt)
  4774  		sym := auxToSym(v.Aux)
  4775  		ptr := v_0
  4776  		if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  4777  			break
  4778  		}
  4779  		val := v_1.Args[1]
  4780  		if ptr != v_1.Args[0] {
  4781  			break
  4782  		}
  4783  		v.reset(OpARM64FMOVDgpfp)
  4784  		v.AddArg(val)
  4785  		return true
  4786  	}
  4787  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  4788  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4789  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  4790  	for {
  4791  		off1 := auxIntToInt32(v.AuxInt)
  4792  		sym := auxToSym(v.Aux)
  4793  		if v_0.Op != OpARM64ADDconst {
  4794  			break
  4795  		}
  4796  		off2 := auxIntToInt64(v_0.AuxInt)
  4797  		ptr := v_0.Args[0]
  4798  		mem := v_1
  4799  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4800  			break
  4801  		}
  4802  		v.reset(OpARM64FMOVDload)
  4803  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  4804  		v.Aux = symToAux(sym)
  4805  		v.AddArg2(ptr, mem)
  4806  		return true
  4807  	}
  4808  	// match: (FMOVDload [off] {sym} (ADD ptr idx) mem)
  4809  	// cond: off == 0 && sym == nil
  4810  	// result: (FMOVDloadidx ptr idx mem)
  4811  	for {
  4812  		off := auxIntToInt32(v.AuxInt)
  4813  		sym := auxToSym(v.Aux)
  4814  		if v_0.Op != OpARM64ADD {
  4815  			break
  4816  		}
  4817  		idx := v_0.Args[1]
  4818  		ptr := v_0.Args[0]
  4819  		mem := v_1
  4820  		if !(off == 0 && sym == nil) {
  4821  			break
  4822  		}
  4823  		v.reset(OpARM64FMOVDloadidx)
  4824  		v.AddArg3(ptr, idx, mem)
  4825  		return true
  4826  	}
  4827  	// match: (FMOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  4828  	// cond: off == 0 && sym == nil
  4829  	// result: (FMOVDloadidx8 ptr idx mem)
  4830  	for {
  4831  		off := auxIntToInt32(v.AuxInt)
  4832  		sym := auxToSym(v.Aux)
  4833  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  4834  			break
  4835  		}
  4836  		idx := v_0.Args[1]
  4837  		ptr := v_0.Args[0]
  4838  		mem := v_1
  4839  		if !(off == 0 && sym == nil) {
  4840  			break
  4841  		}
  4842  		v.reset(OpARM64FMOVDloadidx8)
  4843  		v.AddArg3(ptr, idx, mem)
  4844  		return true
  4845  	}
  4846  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  4847  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4848  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  4849  	for {
  4850  		off1 := auxIntToInt32(v.AuxInt)
  4851  		sym1 := auxToSym(v.Aux)
  4852  		if v_0.Op != OpARM64MOVDaddr {
  4853  			break
  4854  		}
  4855  		off2 := auxIntToInt32(v_0.AuxInt)
  4856  		sym2 := auxToSym(v_0.Aux)
  4857  		ptr := v_0.Args[0]
  4858  		mem := v_1
  4859  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4860  			break
  4861  		}
  4862  		v.reset(OpARM64FMOVDload)
  4863  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4864  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4865  		v.AddArg2(ptr, mem)
  4866  		return true
  4867  	}
  4868  	return false
  4869  }
  4870  func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
  4871  	v_2 := v.Args[2]
  4872  	v_1 := v.Args[1]
  4873  	v_0 := v.Args[0]
  4874  	// match: (FMOVDloadidx ptr (MOVDconst [c]) mem)
  4875  	// cond: is32Bit(c)
  4876  	// result: (FMOVDload [int32(c)] ptr mem)
  4877  	for {
  4878  		ptr := v_0
  4879  		if v_1.Op != OpARM64MOVDconst {
  4880  			break
  4881  		}
  4882  		c := auxIntToInt64(v_1.AuxInt)
  4883  		mem := v_2
  4884  		if !(is32Bit(c)) {
  4885  			break
  4886  		}
  4887  		v.reset(OpARM64FMOVDload)
  4888  		v.AuxInt = int32ToAuxInt(int32(c))
  4889  		v.AddArg2(ptr, mem)
  4890  		return true
  4891  	}
  4892  	// match: (FMOVDloadidx (MOVDconst [c]) ptr mem)
  4893  	// cond: is32Bit(c)
  4894  	// result: (FMOVDload [int32(c)] ptr mem)
  4895  	for {
  4896  		if v_0.Op != OpARM64MOVDconst {
  4897  			break
  4898  		}
  4899  		c := auxIntToInt64(v_0.AuxInt)
  4900  		ptr := v_1
  4901  		mem := v_2
  4902  		if !(is32Bit(c)) {
  4903  			break
  4904  		}
  4905  		v.reset(OpARM64FMOVDload)
  4906  		v.AuxInt = int32ToAuxInt(int32(c))
  4907  		v.AddArg2(ptr, mem)
  4908  		return true
  4909  	}
  4910  	// match: (FMOVDloadidx ptr (SLLconst [3] idx) mem)
  4911  	// result: (FMOVDloadidx8 ptr idx mem)
  4912  	for {
  4913  		ptr := v_0
  4914  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  4915  			break
  4916  		}
  4917  		idx := v_1.Args[0]
  4918  		mem := v_2
  4919  		v.reset(OpARM64FMOVDloadidx8)
  4920  		v.AddArg3(ptr, idx, mem)
  4921  		return true
  4922  	}
  4923  	// match: (FMOVDloadidx (SLLconst [3] idx) ptr mem)
  4924  	// result: (FMOVDloadidx8 ptr idx mem)
  4925  	for {
  4926  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  4927  			break
  4928  		}
  4929  		idx := v_0.Args[0]
  4930  		ptr := v_1
  4931  		mem := v_2
  4932  		v.reset(OpARM64FMOVDloadidx8)
  4933  		v.AddArg3(ptr, idx, mem)
  4934  		return true
  4935  	}
  4936  	return false
  4937  }
  4938  func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
  4939  	v_2 := v.Args[2]
  4940  	v_1 := v.Args[1]
  4941  	v_0 := v.Args[0]
  4942  	// match: (FMOVDloadidx8 ptr (MOVDconst [c]) mem)
  4943  	// cond: is32Bit(c<<3)
  4944  	// result: (FMOVDload ptr [int32(c)<<3] mem)
  4945  	for {
  4946  		ptr := v_0
  4947  		if v_1.Op != OpARM64MOVDconst {
  4948  			break
  4949  		}
  4950  		c := auxIntToInt64(v_1.AuxInt)
  4951  		mem := v_2
  4952  		if !(is32Bit(c << 3)) {
  4953  			break
  4954  		}
  4955  		v.reset(OpARM64FMOVDload)
  4956  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  4957  		v.AddArg2(ptr, mem)
  4958  		return true
  4959  	}
  4960  	return false
  4961  }
  4962  func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
  4963  	v_2 := v.Args[2]
  4964  	v_1 := v.Args[1]
  4965  	v_0 := v.Args[0]
  4966  	b := v.Block
  4967  	config := b.Func.Config
  4968  	// match: (FMOVDstore [off] {sym} ptr (FMOVDgpfp val) mem)
  4969  	// result: (MOVDstore [off] {sym} ptr val mem)
  4970  	for {
  4971  		off := auxIntToInt32(v.AuxInt)
  4972  		sym := auxToSym(v.Aux)
  4973  		ptr := v_0
  4974  		if v_1.Op != OpARM64FMOVDgpfp {
  4975  			break
  4976  		}
  4977  		val := v_1.Args[0]
  4978  		mem := v_2
  4979  		v.reset(OpARM64MOVDstore)
  4980  		v.AuxInt = int32ToAuxInt(off)
  4981  		v.Aux = symToAux(sym)
  4982  		v.AddArg3(ptr, val, mem)
  4983  		return true
  4984  	}
  4985  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  4986  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  4987  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  4988  	for {
  4989  		off1 := auxIntToInt32(v.AuxInt)
  4990  		sym := auxToSym(v.Aux)
  4991  		if v_0.Op != OpARM64ADDconst {
  4992  			break
  4993  		}
  4994  		off2 := auxIntToInt64(v_0.AuxInt)
  4995  		ptr := v_0.Args[0]
  4996  		val := v_1
  4997  		mem := v_2
  4998  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  4999  			break
  5000  		}
  5001  		v.reset(OpARM64FMOVDstore)
  5002  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5003  		v.Aux = symToAux(sym)
  5004  		v.AddArg3(ptr, val, mem)
  5005  		return true
  5006  	}
  5007  	// match: (FMOVDstore [off] {sym} (ADD ptr idx) val mem)
  5008  	// cond: off == 0 && sym == nil
  5009  	// result: (FMOVDstoreidx ptr idx val mem)
  5010  	for {
  5011  		off := auxIntToInt32(v.AuxInt)
  5012  		sym := auxToSym(v.Aux)
  5013  		if v_0.Op != OpARM64ADD {
  5014  			break
  5015  		}
  5016  		idx := v_0.Args[1]
  5017  		ptr := v_0.Args[0]
  5018  		val := v_1
  5019  		mem := v_2
  5020  		if !(off == 0 && sym == nil) {
  5021  			break
  5022  		}
  5023  		v.reset(OpARM64FMOVDstoreidx)
  5024  		v.AddArg4(ptr, idx, val, mem)
  5025  		return true
  5026  	}
  5027  	// match: (FMOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  5028  	// cond: off == 0 && sym == nil
  5029  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5030  	for {
  5031  		off := auxIntToInt32(v.AuxInt)
  5032  		sym := auxToSym(v.Aux)
  5033  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  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(OpARM64FMOVDstoreidx8)
  5044  		v.AddArg4(ptr, idx, val, mem)
  5045  		return true
  5046  	}
  5047  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5048  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5049  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5050  	for {
  5051  		off1 := auxIntToInt32(v.AuxInt)
  5052  		sym1 := auxToSym(v.Aux)
  5053  		if v_0.Op != OpARM64MOVDaddr {
  5054  			break
  5055  		}
  5056  		off2 := auxIntToInt32(v_0.AuxInt)
  5057  		sym2 := auxToSym(v_0.Aux)
  5058  		ptr := v_0.Args[0]
  5059  		val := v_1
  5060  		mem := v_2
  5061  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5062  			break
  5063  		}
  5064  		v.reset(OpARM64FMOVDstore)
  5065  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5066  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5067  		v.AddArg3(ptr, val, mem)
  5068  		return true
  5069  	}
  5070  	return false
  5071  }
  5072  func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
  5073  	v_3 := v.Args[3]
  5074  	v_2 := v.Args[2]
  5075  	v_1 := v.Args[1]
  5076  	v_0 := v.Args[0]
  5077  	// match: (FMOVDstoreidx ptr (MOVDconst [c]) val mem)
  5078  	// cond: is32Bit(c)
  5079  	// result: (FMOVDstore [int32(c)] ptr val mem)
  5080  	for {
  5081  		ptr := v_0
  5082  		if v_1.Op != OpARM64MOVDconst {
  5083  			break
  5084  		}
  5085  		c := auxIntToInt64(v_1.AuxInt)
  5086  		val := v_2
  5087  		mem := v_3
  5088  		if !(is32Bit(c)) {
  5089  			break
  5090  		}
  5091  		v.reset(OpARM64FMOVDstore)
  5092  		v.AuxInt = int32ToAuxInt(int32(c))
  5093  		v.AddArg3(ptr, val, mem)
  5094  		return true
  5095  	}
  5096  	// match: (FMOVDstoreidx (MOVDconst [c]) idx val mem)
  5097  	// cond: is32Bit(c)
  5098  	// result: (FMOVDstore [int32(c)] idx val mem)
  5099  	for {
  5100  		if v_0.Op != OpARM64MOVDconst {
  5101  			break
  5102  		}
  5103  		c := auxIntToInt64(v_0.AuxInt)
  5104  		idx := v_1
  5105  		val := v_2
  5106  		mem := v_3
  5107  		if !(is32Bit(c)) {
  5108  			break
  5109  		}
  5110  		v.reset(OpARM64FMOVDstore)
  5111  		v.AuxInt = int32ToAuxInt(int32(c))
  5112  		v.AddArg3(idx, val, mem)
  5113  		return true
  5114  	}
  5115  	// match: (FMOVDstoreidx ptr (SLLconst [3] idx) val mem)
  5116  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5117  	for {
  5118  		ptr := v_0
  5119  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  5120  			break
  5121  		}
  5122  		idx := v_1.Args[0]
  5123  		val := v_2
  5124  		mem := v_3
  5125  		v.reset(OpARM64FMOVDstoreidx8)
  5126  		v.AddArg4(ptr, idx, val, mem)
  5127  		return true
  5128  	}
  5129  	// match: (FMOVDstoreidx (SLLconst [3] idx) ptr val mem)
  5130  	// result: (FMOVDstoreidx8 ptr idx val mem)
  5131  	for {
  5132  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  5133  			break
  5134  		}
  5135  		idx := v_0.Args[0]
  5136  		ptr := v_1
  5137  		val := v_2
  5138  		mem := v_3
  5139  		v.reset(OpARM64FMOVDstoreidx8)
  5140  		v.AddArg4(ptr, idx, val, mem)
  5141  		return true
  5142  	}
  5143  	return false
  5144  }
  5145  func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
  5146  	v_3 := v.Args[3]
  5147  	v_2 := v.Args[2]
  5148  	v_1 := v.Args[1]
  5149  	v_0 := v.Args[0]
  5150  	// match: (FMOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  5151  	// cond: is32Bit(c<<3)
  5152  	// result: (FMOVDstore [int32(c)<<3] ptr val mem)
  5153  	for {
  5154  		ptr := v_0
  5155  		if v_1.Op != OpARM64MOVDconst {
  5156  			break
  5157  		}
  5158  		c := auxIntToInt64(v_1.AuxInt)
  5159  		val := v_2
  5160  		mem := v_3
  5161  		if !(is32Bit(c << 3)) {
  5162  			break
  5163  		}
  5164  		v.reset(OpARM64FMOVDstore)
  5165  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  5166  		v.AddArg3(ptr, val, mem)
  5167  		return true
  5168  	}
  5169  	return false
  5170  }
  5171  func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
  5172  	v_1 := v.Args[1]
  5173  	v_0 := v.Args[0]
  5174  	b := v.Block
  5175  	config := b.Func.Config
  5176  	// match: (FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _))
  5177  	// result: (FMOVSgpfp val)
  5178  	for {
  5179  		off := auxIntToInt32(v.AuxInt)
  5180  		sym := auxToSym(v.Aux)
  5181  		ptr := v_0
  5182  		if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5183  			break
  5184  		}
  5185  		val := v_1.Args[1]
  5186  		if ptr != v_1.Args[0] {
  5187  			break
  5188  		}
  5189  		v.reset(OpARM64FMOVSgpfp)
  5190  		v.AddArg(val)
  5191  		return true
  5192  	}
  5193  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  5194  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5195  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  5196  	for {
  5197  		off1 := auxIntToInt32(v.AuxInt)
  5198  		sym := auxToSym(v.Aux)
  5199  		if v_0.Op != OpARM64ADDconst {
  5200  			break
  5201  		}
  5202  		off2 := auxIntToInt64(v_0.AuxInt)
  5203  		ptr := v_0.Args[0]
  5204  		mem := v_1
  5205  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5206  			break
  5207  		}
  5208  		v.reset(OpARM64FMOVSload)
  5209  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5210  		v.Aux = symToAux(sym)
  5211  		v.AddArg2(ptr, mem)
  5212  		return true
  5213  	}
  5214  	// match: (FMOVSload [off] {sym} (ADD ptr idx) mem)
  5215  	// cond: off == 0 && sym == nil
  5216  	// result: (FMOVSloadidx ptr idx mem)
  5217  	for {
  5218  		off := auxIntToInt32(v.AuxInt)
  5219  		sym := auxToSym(v.Aux)
  5220  		if v_0.Op != OpARM64ADD {
  5221  			break
  5222  		}
  5223  		idx := v_0.Args[1]
  5224  		ptr := v_0.Args[0]
  5225  		mem := v_1
  5226  		if !(off == 0 && sym == nil) {
  5227  			break
  5228  		}
  5229  		v.reset(OpARM64FMOVSloadidx)
  5230  		v.AddArg3(ptr, idx, mem)
  5231  		return true
  5232  	}
  5233  	// match: (FMOVSload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
  5234  	// cond: off == 0 && sym == nil
  5235  	// result: (FMOVSloadidx4 ptr idx mem)
  5236  	for {
  5237  		off := auxIntToInt32(v.AuxInt)
  5238  		sym := auxToSym(v.Aux)
  5239  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  5240  			break
  5241  		}
  5242  		idx := v_0.Args[1]
  5243  		ptr := v_0.Args[0]
  5244  		mem := v_1
  5245  		if !(off == 0 && sym == nil) {
  5246  			break
  5247  		}
  5248  		v.reset(OpARM64FMOVSloadidx4)
  5249  		v.AddArg3(ptr, idx, mem)
  5250  		return true
  5251  	}
  5252  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  5253  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5254  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5255  	for {
  5256  		off1 := auxIntToInt32(v.AuxInt)
  5257  		sym1 := auxToSym(v.Aux)
  5258  		if v_0.Op != OpARM64MOVDaddr {
  5259  			break
  5260  		}
  5261  		off2 := auxIntToInt32(v_0.AuxInt)
  5262  		sym2 := auxToSym(v_0.Aux)
  5263  		ptr := v_0.Args[0]
  5264  		mem := v_1
  5265  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5266  			break
  5267  		}
  5268  		v.reset(OpARM64FMOVSload)
  5269  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5270  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5271  		v.AddArg2(ptr, mem)
  5272  		return true
  5273  	}
  5274  	return false
  5275  }
  5276  func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
  5277  	v_2 := v.Args[2]
  5278  	v_1 := v.Args[1]
  5279  	v_0 := v.Args[0]
  5280  	// match: (FMOVSloadidx ptr (MOVDconst [c]) mem)
  5281  	// cond: is32Bit(c)
  5282  	// result: (FMOVSload [int32(c)] ptr mem)
  5283  	for {
  5284  		ptr := v_0
  5285  		if v_1.Op != OpARM64MOVDconst {
  5286  			break
  5287  		}
  5288  		c := auxIntToInt64(v_1.AuxInt)
  5289  		mem := v_2
  5290  		if !(is32Bit(c)) {
  5291  			break
  5292  		}
  5293  		v.reset(OpARM64FMOVSload)
  5294  		v.AuxInt = int32ToAuxInt(int32(c))
  5295  		v.AddArg2(ptr, mem)
  5296  		return true
  5297  	}
  5298  	// match: (FMOVSloadidx (MOVDconst [c]) ptr mem)
  5299  	// cond: is32Bit(c)
  5300  	// result: (FMOVSload [int32(c)] ptr mem)
  5301  	for {
  5302  		if v_0.Op != OpARM64MOVDconst {
  5303  			break
  5304  		}
  5305  		c := auxIntToInt64(v_0.AuxInt)
  5306  		ptr := v_1
  5307  		mem := v_2
  5308  		if !(is32Bit(c)) {
  5309  			break
  5310  		}
  5311  		v.reset(OpARM64FMOVSload)
  5312  		v.AuxInt = int32ToAuxInt(int32(c))
  5313  		v.AddArg2(ptr, mem)
  5314  		return true
  5315  	}
  5316  	// match: (FMOVSloadidx ptr (SLLconst [2] idx) mem)
  5317  	// result: (FMOVSloadidx4 ptr idx mem)
  5318  	for {
  5319  		ptr := v_0
  5320  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5321  			break
  5322  		}
  5323  		idx := v_1.Args[0]
  5324  		mem := v_2
  5325  		v.reset(OpARM64FMOVSloadidx4)
  5326  		v.AddArg3(ptr, idx, mem)
  5327  		return true
  5328  	}
  5329  	// match: (FMOVSloadidx (SLLconst [2] idx) ptr mem)
  5330  	// result: (FMOVSloadidx4 ptr idx mem)
  5331  	for {
  5332  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5333  			break
  5334  		}
  5335  		idx := v_0.Args[0]
  5336  		ptr := v_1
  5337  		mem := v_2
  5338  		v.reset(OpARM64FMOVSloadidx4)
  5339  		v.AddArg3(ptr, idx, mem)
  5340  		return true
  5341  	}
  5342  	return false
  5343  }
  5344  func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
  5345  	v_2 := v.Args[2]
  5346  	v_1 := v.Args[1]
  5347  	v_0 := v.Args[0]
  5348  	// match: (FMOVSloadidx4 ptr (MOVDconst [c]) mem)
  5349  	// cond: is32Bit(c<<2)
  5350  	// result: (FMOVSload ptr [int32(c)<<2] mem)
  5351  	for {
  5352  		ptr := v_0
  5353  		if v_1.Op != OpARM64MOVDconst {
  5354  			break
  5355  		}
  5356  		c := auxIntToInt64(v_1.AuxInt)
  5357  		mem := v_2
  5358  		if !(is32Bit(c << 2)) {
  5359  			break
  5360  		}
  5361  		v.reset(OpARM64FMOVSload)
  5362  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5363  		v.AddArg2(ptr, mem)
  5364  		return true
  5365  	}
  5366  	return false
  5367  }
  5368  func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
  5369  	v_2 := v.Args[2]
  5370  	v_1 := v.Args[1]
  5371  	v_0 := v.Args[0]
  5372  	b := v.Block
  5373  	config := b.Func.Config
  5374  	// match: (FMOVSstore [off] {sym} ptr (FMOVSgpfp val) mem)
  5375  	// result: (MOVWstore [off] {sym} ptr val mem)
  5376  	for {
  5377  		off := auxIntToInt32(v.AuxInt)
  5378  		sym := auxToSym(v.Aux)
  5379  		ptr := v_0
  5380  		if v_1.Op != OpARM64FMOVSgpfp {
  5381  			break
  5382  		}
  5383  		val := v_1.Args[0]
  5384  		mem := v_2
  5385  		v.reset(OpARM64MOVWstore)
  5386  		v.AuxInt = int32ToAuxInt(off)
  5387  		v.Aux = symToAux(sym)
  5388  		v.AddArg3(ptr, val, mem)
  5389  		return true
  5390  	}
  5391  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5392  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5393  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  5394  	for {
  5395  		off1 := auxIntToInt32(v.AuxInt)
  5396  		sym := auxToSym(v.Aux)
  5397  		if v_0.Op != OpARM64ADDconst {
  5398  			break
  5399  		}
  5400  		off2 := auxIntToInt64(v_0.AuxInt)
  5401  		ptr := v_0.Args[0]
  5402  		val := v_1
  5403  		mem := v_2
  5404  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5405  			break
  5406  		}
  5407  		v.reset(OpARM64FMOVSstore)
  5408  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5409  		v.Aux = symToAux(sym)
  5410  		v.AddArg3(ptr, val, mem)
  5411  		return true
  5412  	}
  5413  	// match: (FMOVSstore [off] {sym} (ADD ptr idx) val mem)
  5414  	// cond: off == 0 && sym == nil
  5415  	// result: (FMOVSstoreidx ptr idx val mem)
  5416  	for {
  5417  		off := auxIntToInt32(v.AuxInt)
  5418  		sym := auxToSym(v.Aux)
  5419  		if v_0.Op != OpARM64ADD {
  5420  			break
  5421  		}
  5422  		idx := v_0.Args[1]
  5423  		ptr := v_0.Args[0]
  5424  		val := v_1
  5425  		mem := v_2
  5426  		if !(off == 0 && sym == nil) {
  5427  			break
  5428  		}
  5429  		v.reset(OpARM64FMOVSstoreidx)
  5430  		v.AddArg4(ptr, idx, val, mem)
  5431  		return true
  5432  	}
  5433  	// match: (FMOVSstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
  5434  	// cond: off == 0 && sym == nil
  5435  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5436  	for {
  5437  		off := auxIntToInt32(v.AuxInt)
  5438  		sym := auxToSym(v.Aux)
  5439  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
  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(OpARM64FMOVSstoreidx4)
  5450  		v.AddArg4(ptr, idx, val, mem)
  5451  		return true
  5452  	}
  5453  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  5454  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  5455  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5456  	for {
  5457  		off1 := auxIntToInt32(v.AuxInt)
  5458  		sym1 := auxToSym(v.Aux)
  5459  		if v_0.Op != OpARM64MOVDaddr {
  5460  			break
  5461  		}
  5462  		off2 := auxIntToInt32(v_0.AuxInt)
  5463  		sym2 := auxToSym(v_0.Aux)
  5464  		ptr := v_0.Args[0]
  5465  		val := v_1
  5466  		mem := v_2
  5467  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  5468  			break
  5469  		}
  5470  		v.reset(OpARM64FMOVSstore)
  5471  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5472  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5473  		v.AddArg3(ptr, val, mem)
  5474  		return true
  5475  	}
  5476  	return false
  5477  }
  5478  func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
  5479  	v_3 := v.Args[3]
  5480  	v_2 := v.Args[2]
  5481  	v_1 := v.Args[1]
  5482  	v_0 := v.Args[0]
  5483  	// match: (FMOVSstoreidx ptr (MOVDconst [c]) val mem)
  5484  	// cond: is32Bit(c)
  5485  	// result: (FMOVSstore [int32(c)] ptr val mem)
  5486  	for {
  5487  		ptr := v_0
  5488  		if v_1.Op != OpARM64MOVDconst {
  5489  			break
  5490  		}
  5491  		c := auxIntToInt64(v_1.AuxInt)
  5492  		val := v_2
  5493  		mem := v_3
  5494  		if !(is32Bit(c)) {
  5495  			break
  5496  		}
  5497  		v.reset(OpARM64FMOVSstore)
  5498  		v.AuxInt = int32ToAuxInt(int32(c))
  5499  		v.AddArg3(ptr, val, mem)
  5500  		return true
  5501  	}
  5502  	// match: (FMOVSstoreidx (MOVDconst [c]) idx val mem)
  5503  	// cond: is32Bit(c)
  5504  	// result: (FMOVSstore [int32(c)] idx val mem)
  5505  	for {
  5506  		if v_0.Op != OpARM64MOVDconst {
  5507  			break
  5508  		}
  5509  		c := auxIntToInt64(v_0.AuxInt)
  5510  		idx := v_1
  5511  		val := v_2
  5512  		mem := v_3
  5513  		if !(is32Bit(c)) {
  5514  			break
  5515  		}
  5516  		v.reset(OpARM64FMOVSstore)
  5517  		v.AuxInt = int32ToAuxInt(int32(c))
  5518  		v.AddArg3(idx, val, mem)
  5519  		return true
  5520  	}
  5521  	// match: (FMOVSstoreidx ptr (SLLconst [2] idx) val mem)
  5522  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5523  	for {
  5524  		ptr := v_0
  5525  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
  5526  			break
  5527  		}
  5528  		idx := v_1.Args[0]
  5529  		val := v_2
  5530  		mem := v_3
  5531  		v.reset(OpARM64FMOVSstoreidx4)
  5532  		v.AddArg4(ptr, idx, val, mem)
  5533  		return true
  5534  	}
  5535  	// match: (FMOVSstoreidx (SLLconst [2] idx) ptr val mem)
  5536  	// result: (FMOVSstoreidx4 ptr idx val mem)
  5537  	for {
  5538  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
  5539  			break
  5540  		}
  5541  		idx := v_0.Args[0]
  5542  		ptr := v_1
  5543  		val := v_2
  5544  		mem := v_3
  5545  		v.reset(OpARM64FMOVSstoreidx4)
  5546  		v.AddArg4(ptr, idx, val, mem)
  5547  		return true
  5548  	}
  5549  	return false
  5550  }
  5551  func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
  5552  	v_3 := v.Args[3]
  5553  	v_2 := v.Args[2]
  5554  	v_1 := v.Args[1]
  5555  	v_0 := v.Args[0]
  5556  	// match: (FMOVSstoreidx4 ptr (MOVDconst [c]) val mem)
  5557  	// cond: is32Bit(c<<2)
  5558  	// result: (FMOVSstore [int32(c)<<2] ptr val mem)
  5559  	for {
  5560  		ptr := v_0
  5561  		if v_1.Op != OpARM64MOVDconst {
  5562  			break
  5563  		}
  5564  		c := auxIntToInt64(v_1.AuxInt)
  5565  		val := v_2
  5566  		mem := v_3
  5567  		if !(is32Bit(c << 2)) {
  5568  			break
  5569  		}
  5570  		v.reset(OpARM64FMOVSstore)
  5571  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
  5572  		v.AddArg3(ptr, val, mem)
  5573  		return true
  5574  	}
  5575  	return false
  5576  }
  5577  func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
  5578  	v_1 := v.Args[1]
  5579  	v_0 := v.Args[0]
  5580  	// match: (FMULD (FNEGD x) y)
  5581  	// result: (FNMULD x y)
  5582  	for {
  5583  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5584  			if v_0.Op != OpARM64FNEGD {
  5585  				continue
  5586  			}
  5587  			x := v_0.Args[0]
  5588  			y := v_1
  5589  			v.reset(OpARM64FNMULD)
  5590  			v.AddArg2(x, y)
  5591  			return true
  5592  		}
  5593  		break
  5594  	}
  5595  	return false
  5596  }
  5597  func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
  5598  	v_1 := v.Args[1]
  5599  	v_0 := v.Args[0]
  5600  	// match: (FMULS (FNEGS x) y)
  5601  	// result: (FNMULS 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 != OpARM64FNEGS {
  5605  				continue
  5606  			}
  5607  			x := v_0.Args[0]
  5608  			y := v_1
  5609  			v.reset(OpARM64FNMULS)
  5610  			v.AddArg2(x, y)
  5611  			return true
  5612  		}
  5613  		break
  5614  	}
  5615  	return false
  5616  }
  5617  func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
  5618  	v_0 := v.Args[0]
  5619  	// match: (FNEGD (FMULD x y))
  5620  	// result: (FNMULD x y)
  5621  	for {
  5622  		if v_0.Op != OpARM64FMULD {
  5623  			break
  5624  		}
  5625  		y := v_0.Args[1]
  5626  		x := v_0.Args[0]
  5627  		v.reset(OpARM64FNMULD)
  5628  		v.AddArg2(x, y)
  5629  		return true
  5630  	}
  5631  	// match: (FNEGD (FNMULD x y))
  5632  	// result: (FMULD x y)
  5633  	for {
  5634  		if v_0.Op != OpARM64FNMULD {
  5635  			break
  5636  		}
  5637  		y := v_0.Args[1]
  5638  		x := v_0.Args[0]
  5639  		v.reset(OpARM64FMULD)
  5640  		v.AddArg2(x, y)
  5641  		return true
  5642  	}
  5643  	return false
  5644  }
  5645  func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
  5646  	v_0 := v.Args[0]
  5647  	// match: (FNEGS (FMULS x y))
  5648  	// result: (FNMULS x y)
  5649  	for {
  5650  		if v_0.Op != OpARM64FMULS {
  5651  			break
  5652  		}
  5653  		y := v_0.Args[1]
  5654  		x := v_0.Args[0]
  5655  		v.reset(OpARM64FNMULS)
  5656  		v.AddArg2(x, y)
  5657  		return true
  5658  	}
  5659  	// match: (FNEGS (FNMULS x y))
  5660  	// result: (FMULS x y)
  5661  	for {
  5662  		if v_0.Op != OpARM64FNMULS {
  5663  			break
  5664  		}
  5665  		y := v_0.Args[1]
  5666  		x := v_0.Args[0]
  5667  		v.reset(OpARM64FMULS)
  5668  		v.AddArg2(x, y)
  5669  		return true
  5670  	}
  5671  	return false
  5672  }
  5673  func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
  5674  	v_1 := v.Args[1]
  5675  	v_0 := v.Args[0]
  5676  	// match: (FNMULD (FNEGD x) y)
  5677  	// result: (FMULD x y)
  5678  	for {
  5679  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5680  			if v_0.Op != OpARM64FNEGD {
  5681  				continue
  5682  			}
  5683  			x := v_0.Args[0]
  5684  			y := v_1
  5685  			v.reset(OpARM64FMULD)
  5686  			v.AddArg2(x, y)
  5687  			return true
  5688  		}
  5689  		break
  5690  	}
  5691  	return false
  5692  }
  5693  func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
  5694  	v_1 := v.Args[1]
  5695  	v_0 := v.Args[0]
  5696  	// match: (FNMULS (FNEGS x) y)
  5697  	// result: (FMULS 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 != OpARM64FNEGS {
  5701  				continue
  5702  			}
  5703  			x := v_0.Args[0]
  5704  			y := v_1
  5705  			v.reset(OpARM64FMULS)
  5706  			v.AddArg2(x, y)
  5707  			return true
  5708  		}
  5709  		break
  5710  	}
  5711  	return false
  5712  }
  5713  func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
  5714  	v_1 := v.Args[1]
  5715  	v_0 := v.Args[0]
  5716  	// match: (FSUBD a (FMULD x y))
  5717  	// cond: a.Block.Func.useFMA(v)
  5718  	// result: (FMSUBD a x y)
  5719  	for {
  5720  		a := v_0
  5721  		if v_1.Op != OpARM64FMULD {
  5722  			break
  5723  		}
  5724  		y := v_1.Args[1]
  5725  		x := v_1.Args[0]
  5726  		if !(a.Block.Func.useFMA(v)) {
  5727  			break
  5728  		}
  5729  		v.reset(OpARM64FMSUBD)
  5730  		v.AddArg3(a, x, y)
  5731  		return true
  5732  	}
  5733  	// match: (FSUBD (FMULD x y) a)
  5734  	// cond: a.Block.Func.useFMA(v)
  5735  	// result: (FNMSUBD a x y)
  5736  	for {
  5737  		if v_0.Op != OpARM64FMULD {
  5738  			break
  5739  		}
  5740  		y := v_0.Args[1]
  5741  		x := v_0.Args[0]
  5742  		a := v_1
  5743  		if !(a.Block.Func.useFMA(v)) {
  5744  			break
  5745  		}
  5746  		v.reset(OpARM64FNMSUBD)
  5747  		v.AddArg3(a, x, y)
  5748  		return true
  5749  	}
  5750  	// match: (FSUBD a (FNMULD x y))
  5751  	// cond: a.Block.Func.useFMA(v)
  5752  	// result: (FMADDD a x y)
  5753  	for {
  5754  		a := v_0
  5755  		if v_1.Op != OpARM64FNMULD {
  5756  			break
  5757  		}
  5758  		y := v_1.Args[1]
  5759  		x := v_1.Args[0]
  5760  		if !(a.Block.Func.useFMA(v)) {
  5761  			break
  5762  		}
  5763  		v.reset(OpARM64FMADDD)
  5764  		v.AddArg3(a, x, y)
  5765  		return true
  5766  	}
  5767  	// match: (FSUBD (FNMULD x y) a)
  5768  	// cond: a.Block.Func.useFMA(v)
  5769  	// result: (FNMADDD a x y)
  5770  	for {
  5771  		if v_0.Op != OpARM64FNMULD {
  5772  			break
  5773  		}
  5774  		y := v_0.Args[1]
  5775  		x := v_0.Args[0]
  5776  		a := v_1
  5777  		if !(a.Block.Func.useFMA(v)) {
  5778  			break
  5779  		}
  5780  		v.reset(OpARM64FNMADDD)
  5781  		v.AddArg3(a, x, y)
  5782  		return true
  5783  	}
  5784  	return false
  5785  }
  5786  func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
  5787  	v_1 := v.Args[1]
  5788  	v_0 := v.Args[0]
  5789  	// match: (FSUBS a (FMULS x y))
  5790  	// cond: a.Block.Func.useFMA(v)
  5791  	// result: (FMSUBS a x y)
  5792  	for {
  5793  		a := v_0
  5794  		if v_1.Op != OpARM64FMULS {
  5795  			break
  5796  		}
  5797  		y := v_1.Args[1]
  5798  		x := v_1.Args[0]
  5799  		if !(a.Block.Func.useFMA(v)) {
  5800  			break
  5801  		}
  5802  		v.reset(OpARM64FMSUBS)
  5803  		v.AddArg3(a, x, y)
  5804  		return true
  5805  	}
  5806  	// match: (FSUBS (FMULS x y) a)
  5807  	// cond: a.Block.Func.useFMA(v)
  5808  	// result: (FNMSUBS a x y)
  5809  	for {
  5810  		if v_0.Op != OpARM64FMULS {
  5811  			break
  5812  		}
  5813  		y := v_0.Args[1]
  5814  		x := v_0.Args[0]
  5815  		a := v_1
  5816  		if !(a.Block.Func.useFMA(v)) {
  5817  			break
  5818  		}
  5819  		v.reset(OpARM64FNMSUBS)
  5820  		v.AddArg3(a, x, y)
  5821  		return true
  5822  	}
  5823  	// match: (FSUBS a (FNMULS x y))
  5824  	// cond: a.Block.Func.useFMA(v)
  5825  	// result: (FMADDS a x y)
  5826  	for {
  5827  		a := v_0
  5828  		if v_1.Op != OpARM64FNMULS {
  5829  			break
  5830  		}
  5831  		y := v_1.Args[1]
  5832  		x := v_1.Args[0]
  5833  		if !(a.Block.Func.useFMA(v)) {
  5834  			break
  5835  		}
  5836  		v.reset(OpARM64FMADDS)
  5837  		v.AddArg3(a, x, y)
  5838  		return true
  5839  	}
  5840  	// match: (FSUBS (FNMULS x y) a)
  5841  	// cond: a.Block.Func.useFMA(v)
  5842  	// result: (FNMADDS a x y)
  5843  	for {
  5844  		if v_0.Op != OpARM64FNMULS {
  5845  			break
  5846  		}
  5847  		y := v_0.Args[1]
  5848  		x := v_0.Args[0]
  5849  		a := v_1
  5850  		if !(a.Block.Func.useFMA(v)) {
  5851  			break
  5852  		}
  5853  		v.reset(OpARM64FNMADDS)
  5854  		v.AddArg3(a, x, y)
  5855  		return true
  5856  	}
  5857  	return false
  5858  }
  5859  func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
  5860  	v_0 := v.Args[0]
  5861  	b := v.Block
  5862  	// match: (GreaterEqual (CMPconst [0] z:(AND x y)))
  5863  	// cond: z.Uses == 1
  5864  	// result: (GreaterEqual (TST x y))
  5865  	for {
  5866  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5867  			break
  5868  		}
  5869  		z := v_0.Args[0]
  5870  		if z.Op != OpARM64AND {
  5871  			break
  5872  		}
  5873  		y := z.Args[1]
  5874  		x := z.Args[0]
  5875  		if !(z.Uses == 1) {
  5876  			break
  5877  		}
  5878  		v.reset(OpARM64GreaterEqual)
  5879  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  5880  		v0.AddArg2(x, y)
  5881  		v.AddArg(v0)
  5882  		return true
  5883  	}
  5884  	// match: (GreaterEqual (CMPWconst [0] x:(ANDconst [c] y)))
  5885  	// cond: x.Uses == 1
  5886  	// result: (GreaterEqual (TSTWconst [int32(c)] y))
  5887  	for {
  5888  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5889  			break
  5890  		}
  5891  		x := v_0.Args[0]
  5892  		if x.Op != OpARM64ANDconst {
  5893  			break
  5894  		}
  5895  		c := auxIntToInt64(x.AuxInt)
  5896  		y := x.Args[0]
  5897  		if !(x.Uses == 1) {
  5898  			break
  5899  		}
  5900  		v.reset(OpARM64GreaterEqual)
  5901  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  5902  		v0.AuxInt = int32ToAuxInt(int32(c))
  5903  		v0.AddArg(y)
  5904  		v.AddArg(v0)
  5905  		return true
  5906  	}
  5907  	// match: (GreaterEqual (CMPWconst [0] z:(AND x y)))
  5908  	// cond: z.Uses == 1
  5909  	// result: (GreaterEqual (TSTW x y))
  5910  	for {
  5911  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5912  			break
  5913  		}
  5914  		z := v_0.Args[0]
  5915  		if z.Op != OpARM64AND {
  5916  			break
  5917  		}
  5918  		y := z.Args[1]
  5919  		x := z.Args[0]
  5920  		if !(z.Uses == 1) {
  5921  			break
  5922  		}
  5923  		v.reset(OpARM64GreaterEqual)
  5924  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  5925  		v0.AddArg2(x, y)
  5926  		v.AddArg(v0)
  5927  		return true
  5928  	}
  5929  	// match: (GreaterEqual (CMPconst [0] x:(ANDconst [c] y)))
  5930  	// cond: x.Uses == 1
  5931  	// result: (GreaterEqual (TSTconst [c] y))
  5932  	for {
  5933  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5934  			break
  5935  		}
  5936  		x := v_0.Args[0]
  5937  		if x.Op != OpARM64ANDconst {
  5938  			break
  5939  		}
  5940  		c := auxIntToInt64(x.AuxInt)
  5941  		y := x.Args[0]
  5942  		if !(x.Uses == 1) {
  5943  			break
  5944  		}
  5945  		v.reset(OpARM64GreaterEqual)
  5946  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  5947  		v0.AuxInt = int64ToAuxInt(c)
  5948  		v0.AddArg(y)
  5949  		v.AddArg(v0)
  5950  		return true
  5951  	}
  5952  	// match: (GreaterEqual (CMPconst [0] x:(ADDconst [c] y)))
  5953  	// cond: x.Uses == 1
  5954  	// result: (GreaterEqualNoov (CMNconst [c] y))
  5955  	for {
  5956  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  5957  			break
  5958  		}
  5959  		x := v_0.Args[0]
  5960  		if x.Op != OpARM64ADDconst {
  5961  			break
  5962  		}
  5963  		c := auxIntToInt64(x.AuxInt)
  5964  		y := x.Args[0]
  5965  		if !(x.Uses == 1) {
  5966  			break
  5967  		}
  5968  		v.reset(OpARM64GreaterEqualNoov)
  5969  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  5970  		v0.AuxInt = int64ToAuxInt(c)
  5971  		v0.AddArg(y)
  5972  		v.AddArg(v0)
  5973  		return true
  5974  	}
  5975  	// match: (GreaterEqual (CMPWconst [0] x:(ADDconst [c] y)))
  5976  	// cond: x.Uses == 1
  5977  	// result: (GreaterEqualNoov (CMNWconst [int32(c)] y))
  5978  	for {
  5979  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  5980  			break
  5981  		}
  5982  		x := v_0.Args[0]
  5983  		if x.Op != OpARM64ADDconst {
  5984  			break
  5985  		}
  5986  		c := auxIntToInt64(x.AuxInt)
  5987  		y := x.Args[0]
  5988  		if !(x.Uses == 1) {
  5989  			break
  5990  		}
  5991  		v.reset(OpARM64GreaterEqualNoov)
  5992  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  5993  		v0.AuxInt = int32ToAuxInt(int32(c))
  5994  		v0.AddArg(y)
  5995  		v.AddArg(v0)
  5996  		return true
  5997  	}
  5998  	// match: (GreaterEqual (CMPconst [0] z:(ADD x y)))
  5999  	// cond: z.Uses == 1
  6000  	// result: (GreaterEqualNoov (CMN x y))
  6001  	for {
  6002  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6003  			break
  6004  		}
  6005  		z := v_0.Args[0]
  6006  		if z.Op != OpARM64ADD {
  6007  			break
  6008  		}
  6009  		y := z.Args[1]
  6010  		x := z.Args[0]
  6011  		if !(z.Uses == 1) {
  6012  			break
  6013  		}
  6014  		v.reset(OpARM64GreaterEqualNoov)
  6015  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6016  		v0.AddArg2(x, y)
  6017  		v.AddArg(v0)
  6018  		return true
  6019  	}
  6020  	// match: (GreaterEqual (CMPWconst [0] z:(ADD x y)))
  6021  	// cond: z.Uses == 1
  6022  	// result: (GreaterEqualNoov (CMNW x y))
  6023  	for {
  6024  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6025  			break
  6026  		}
  6027  		z := v_0.Args[0]
  6028  		if z.Op != OpARM64ADD {
  6029  			break
  6030  		}
  6031  		y := z.Args[1]
  6032  		x := z.Args[0]
  6033  		if !(z.Uses == 1) {
  6034  			break
  6035  		}
  6036  		v.reset(OpARM64GreaterEqualNoov)
  6037  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6038  		v0.AddArg2(x, y)
  6039  		v.AddArg(v0)
  6040  		return true
  6041  	}
  6042  	// match: (GreaterEqual (CMPconst [0] z:(MADD a x y)))
  6043  	// cond: z.Uses == 1
  6044  	// result: (GreaterEqualNoov (CMN a (MUL <x.Type> x y)))
  6045  	for {
  6046  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6047  			break
  6048  		}
  6049  		z := v_0.Args[0]
  6050  		if z.Op != OpARM64MADD {
  6051  			break
  6052  		}
  6053  		y := z.Args[2]
  6054  		a := z.Args[0]
  6055  		x := z.Args[1]
  6056  		if !(z.Uses == 1) {
  6057  			break
  6058  		}
  6059  		v.reset(OpARM64GreaterEqualNoov)
  6060  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6061  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6062  		v1.AddArg2(x, y)
  6063  		v0.AddArg2(a, v1)
  6064  		v.AddArg(v0)
  6065  		return true
  6066  	}
  6067  	// match: (GreaterEqual (CMPconst [0] z:(MSUB a x y)))
  6068  	// cond: z.Uses == 1
  6069  	// result: (GreaterEqualNoov (CMP a (MUL <x.Type> x y)))
  6070  	for {
  6071  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6072  			break
  6073  		}
  6074  		z := v_0.Args[0]
  6075  		if z.Op != OpARM64MSUB {
  6076  			break
  6077  		}
  6078  		y := z.Args[2]
  6079  		a := z.Args[0]
  6080  		x := z.Args[1]
  6081  		if !(z.Uses == 1) {
  6082  			break
  6083  		}
  6084  		v.reset(OpARM64GreaterEqualNoov)
  6085  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6086  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6087  		v1.AddArg2(x, y)
  6088  		v0.AddArg2(a, v1)
  6089  		v.AddArg(v0)
  6090  		return true
  6091  	}
  6092  	// match: (GreaterEqual (CMPWconst [0] z:(MADDW a x y)))
  6093  	// cond: z.Uses == 1
  6094  	// result: (GreaterEqualNoov (CMNW a (MULW <x.Type> x y)))
  6095  	for {
  6096  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6097  			break
  6098  		}
  6099  		z := v_0.Args[0]
  6100  		if z.Op != OpARM64MADDW {
  6101  			break
  6102  		}
  6103  		y := z.Args[2]
  6104  		a := z.Args[0]
  6105  		x := z.Args[1]
  6106  		if !(z.Uses == 1) {
  6107  			break
  6108  		}
  6109  		v.reset(OpARM64GreaterEqualNoov)
  6110  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6111  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6112  		v1.AddArg2(x, y)
  6113  		v0.AddArg2(a, v1)
  6114  		v.AddArg(v0)
  6115  		return true
  6116  	}
  6117  	// match: (GreaterEqual (CMPWconst [0] z:(MSUBW a x y)))
  6118  	// cond: z.Uses == 1
  6119  	// result: (GreaterEqualNoov (CMPW a (MULW <x.Type> x y)))
  6120  	for {
  6121  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6122  			break
  6123  		}
  6124  		z := v_0.Args[0]
  6125  		if z.Op != OpARM64MSUBW {
  6126  			break
  6127  		}
  6128  		y := z.Args[2]
  6129  		a := z.Args[0]
  6130  		x := z.Args[1]
  6131  		if !(z.Uses == 1) {
  6132  			break
  6133  		}
  6134  		v.reset(OpARM64GreaterEqualNoov)
  6135  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6136  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6137  		v1.AddArg2(x, y)
  6138  		v0.AddArg2(a, v1)
  6139  		v.AddArg(v0)
  6140  		return true
  6141  	}
  6142  	// match: (GreaterEqual (FlagConstant [fc]))
  6143  	// result: (MOVDconst [b2i(fc.ge())])
  6144  	for {
  6145  		if v_0.Op != OpARM64FlagConstant {
  6146  			break
  6147  		}
  6148  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6149  		v.reset(OpARM64MOVDconst)
  6150  		v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
  6151  		return true
  6152  	}
  6153  	// match: (GreaterEqual (InvertFlags x))
  6154  	// result: (LessEqual x)
  6155  	for {
  6156  		if v_0.Op != OpARM64InvertFlags {
  6157  			break
  6158  		}
  6159  		x := v_0.Args[0]
  6160  		v.reset(OpARM64LessEqual)
  6161  		v.AddArg(x)
  6162  		return true
  6163  	}
  6164  	return false
  6165  }
  6166  func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
  6167  	v_0 := v.Args[0]
  6168  	// match: (GreaterEqualF (InvertFlags x))
  6169  	// result: (LessEqualF x)
  6170  	for {
  6171  		if v_0.Op != OpARM64InvertFlags {
  6172  			break
  6173  		}
  6174  		x := v_0.Args[0]
  6175  		v.reset(OpARM64LessEqualF)
  6176  		v.AddArg(x)
  6177  		return true
  6178  	}
  6179  	return false
  6180  }
  6181  func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
  6182  	v_0 := v.Args[0]
  6183  	b := v.Block
  6184  	typ := &b.Func.Config.Types
  6185  	// match: (GreaterEqualNoov (FlagConstant [fc]))
  6186  	// result: (MOVDconst [b2i(fc.geNoov())])
  6187  	for {
  6188  		if v_0.Op != OpARM64FlagConstant {
  6189  			break
  6190  		}
  6191  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6192  		v.reset(OpARM64MOVDconst)
  6193  		v.AuxInt = int64ToAuxInt(b2i(fc.geNoov()))
  6194  		return true
  6195  	}
  6196  	// match: (GreaterEqualNoov (InvertFlags x))
  6197  	// result: (CSINC [OpARM64NotEqual] (LessThanNoov <typ.Bool> x) (MOVDconst [0]) x)
  6198  	for {
  6199  		if v_0.Op != OpARM64InvertFlags {
  6200  			break
  6201  		}
  6202  		x := v_0.Args[0]
  6203  		v.reset(OpARM64CSINC)
  6204  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6205  		v0 := b.NewValue0(v.Pos, OpARM64LessThanNoov, typ.Bool)
  6206  		v0.AddArg(x)
  6207  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
  6208  		v1.AuxInt = int64ToAuxInt(0)
  6209  		v.AddArg3(v0, v1, x)
  6210  		return true
  6211  	}
  6212  	return false
  6213  }
  6214  func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
  6215  	v_0 := v.Args[0]
  6216  	// match: (GreaterEqualU (FlagConstant [fc]))
  6217  	// result: (MOVDconst [b2i(fc.uge())])
  6218  	for {
  6219  		if v_0.Op != OpARM64FlagConstant {
  6220  			break
  6221  		}
  6222  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6223  		v.reset(OpARM64MOVDconst)
  6224  		v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
  6225  		return true
  6226  	}
  6227  	// match: (GreaterEqualU (InvertFlags x))
  6228  	// result: (LessEqualU x)
  6229  	for {
  6230  		if v_0.Op != OpARM64InvertFlags {
  6231  			break
  6232  		}
  6233  		x := v_0.Args[0]
  6234  		v.reset(OpARM64LessEqualU)
  6235  		v.AddArg(x)
  6236  		return true
  6237  	}
  6238  	return false
  6239  }
  6240  func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
  6241  	v_0 := v.Args[0]
  6242  	b := v.Block
  6243  	// match: (GreaterThan (CMPconst [0] z:(AND x y)))
  6244  	// cond: z.Uses == 1
  6245  	// result: (GreaterThan (TST x y))
  6246  	for {
  6247  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6248  			break
  6249  		}
  6250  		z := v_0.Args[0]
  6251  		if z.Op != OpARM64AND {
  6252  			break
  6253  		}
  6254  		y := z.Args[1]
  6255  		x := z.Args[0]
  6256  		if !(z.Uses == 1) {
  6257  			break
  6258  		}
  6259  		v.reset(OpARM64GreaterThan)
  6260  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6261  		v0.AddArg2(x, y)
  6262  		v.AddArg(v0)
  6263  		return true
  6264  	}
  6265  	// match: (GreaterThan (CMPWconst [0] x:(ANDconst [c] y)))
  6266  	// cond: x.Uses == 1
  6267  	// result: (GreaterThan (TSTWconst [int32(c)] y))
  6268  	for {
  6269  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6270  			break
  6271  		}
  6272  		x := v_0.Args[0]
  6273  		if x.Op != OpARM64ANDconst {
  6274  			break
  6275  		}
  6276  		c := auxIntToInt64(x.AuxInt)
  6277  		y := x.Args[0]
  6278  		if !(x.Uses == 1) {
  6279  			break
  6280  		}
  6281  		v.reset(OpARM64GreaterThan)
  6282  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6283  		v0.AuxInt = int32ToAuxInt(int32(c))
  6284  		v0.AddArg(y)
  6285  		v.AddArg(v0)
  6286  		return true
  6287  	}
  6288  	// match: (GreaterThan (CMPWconst [0] z:(AND x y)))
  6289  	// cond: z.Uses == 1
  6290  	// result: (GreaterThan (TSTW x y))
  6291  	for {
  6292  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6293  			break
  6294  		}
  6295  		z := v_0.Args[0]
  6296  		if z.Op != OpARM64AND {
  6297  			break
  6298  		}
  6299  		y := z.Args[1]
  6300  		x := z.Args[0]
  6301  		if !(z.Uses == 1) {
  6302  			break
  6303  		}
  6304  		v.reset(OpARM64GreaterThan)
  6305  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6306  		v0.AddArg2(x, y)
  6307  		v.AddArg(v0)
  6308  		return true
  6309  	}
  6310  	// match: (GreaterThan (CMPconst [0] x:(ANDconst [c] y)))
  6311  	// cond: x.Uses == 1
  6312  	// result: (GreaterThan (TSTconst [c] y))
  6313  	for {
  6314  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6315  			break
  6316  		}
  6317  		x := v_0.Args[0]
  6318  		if x.Op != OpARM64ANDconst {
  6319  			break
  6320  		}
  6321  		c := auxIntToInt64(x.AuxInt)
  6322  		y := x.Args[0]
  6323  		if !(x.Uses == 1) {
  6324  			break
  6325  		}
  6326  		v.reset(OpARM64GreaterThan)
  6327  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6328  		v0.AuxInt = int64ToAuxInt(c)
  6329  		v0.AddArg(y)
  6330  		v.AddArg(v0)
  6331  		return true
  6332  	}
  6333  	// match: (GreaterThan (FlagConstant [fc]))
  6334  	// result: (MOVDconst [b2i(fc.gt())])
  6335  	for {
  6336  		if v_0.Op != OpARM64FlagConstant {
  6337  			break
  6338  		}
  6339  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6340  		v.reset(OpARM64MOVDconst)
  6341  		v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
  6342  		return true
  6343  	}
  6344  	// match: (GreaterThan (InvertFlags x))
  6345  	// result: (LessThan x)
  6346  	for {
  6347  		if v_0.Op != OpARM64InvertFlags {
  6348  			break
  6349  		}
  6350  		x := v_0.Args[0]
  6351  		v.reset(OpARM64LessThan)
  6352  		v.AddArg(x)
  6353  		return true
  6354  	}
  6355  	return false
  6356  }
  6357  func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
  6358  	v_0 := v.Args[0]
  6359  	// match: (GreaterThanF (InvertFlags x))
  6360  	// result: (LessThanF x)
  6361  	for {
  6362  		if v_0.Op != OpARM64InvertFlags {
  6363  			break
  6364  		}
  6365  		x := v_0.Args[0]
  6366  		v.reset(OpARM64LessThanF)
  6367  		v.AddArg(x)
  6368  		return true
  6369  	}
  6370  	return false
  6371  }
  6372  func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
  6373  	v_0 := v.Args[0]
  6374  	// match: (GreaterThanU (FlagConstant [fc]))
  6375  	// result: (MOVDconst [b2i(fc.ugt())])
  6376  	for {
  6377  		if v_0.Op != OpARM64FlagConstant {
  6378  			break
  6379  		}
  6380  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6381  		v.reset(OpARM64MOVDconst)
  6382  		v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
  6383  		return true
  6384  	}
  6385  	// match: (GreaterThanU (InvertFlags x))
  6386  	// result: (LessThanU x)
  6387  	for {
  6388  		if v_0.Op != OpARM64InvertFlags {
  6389  			break
  6390  		}
  6391  		x := v_0.Args[0]
  6392  		v.reset(OpARM64LessThanU)
  6393  		v.AddArg(x)
  6394  		return true
  6395  	}
  6396  	return false
  6397  }
  6398  func rewriteValueARM64_OpARM64LDP(v *Value) bool {
  6399  	v_1 := v.Args[1]
  6400  	v_0 := v.Args[0]
  6401  	b := v.Block
  6402  	config := b.Func.Config
  6403  	// match: (LDP [off1] {sym} (ADDconst [off2] ptr) mem)
  6404  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6405  	// result: (LDP [off1+int32(off2)] {sym} ptr mem)
  6406  	for {
  6407  		off1 := auxIntToInt32(v.AuxInt)
  6408  		sym := auxToSym(v.Aux)
  6409  		if v_0.Op != OpARM64ADDconst {
  6410  			break
  6411  		}
  6412  		off2 := auxIntToInt64(v_0.AuxInt)
  6413  		ptr := v_0.Args[0]
  6414  		mem := v_1
  6415  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6416  			break
  6417  		}
  6418  		v.reset(OpARM64LDP)
  6419  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6420  		v.Aux = symToAux(sym)
  6421  		v.AddArg2(ptr, mem)
  6422  		return true
  6423  	}
  6424  	// match: (LDP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  6425  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  6426  	// result: (LDP [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6427  	for {
  6428  		off1 := auxIntToInt32(v.AuxInt)
  6429  		sym1 := auxToSym(v.Aux)
  6430  		if v_0.Op != OpARM64MOVDaddr {
  6431  			break
  6432  		}
  6433  		off2 := auxIntToInt32(v_0.AuxInt)
  6434  		sym2 := auxToSym(v_0.Aux)
  6435  		ptr := v_0.Args[0]
  6436  		mem := v_1
  6437  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  6438  			break
  6439  		}
  6440  		v.reset(OpARM64LDP)
  6441  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6442  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6443  		v.AddArg2(ptr, mem)
  6444  		return true
  6445  	}
  6446  	return false
  6447  }
  6448  func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
  6449  	v_0 := v.Args[0]
  6450  	b := v.Block
  6451  	// match: (LessEqual (CMPconst [0] z:(AND x y)))
  6452  	// cond: z.Uses == 1
  6453  	// result: (LessEqual (TST x y))
  6454  	for {
  6455  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6456  			break
  6457  		}
  6458  		z := v_0.Args[0]
  6459  		if z.Op != OpARM64AND {
  6460  			break
  6461  		}
  6462  		y := z.Args[1]
  6463  		x := z.Args[0]
  6464  		if !(z.Uses == 1) {
  6465  			break
  6466  		}
  6467  		v.reset(OpARM64LessEqual)
  6468  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6469  		v0.AddArg2(x, y)
  6470  		v.AddArg(v0)
  6471  		return true
  6472  	}
  6473  	// match: (LessEqual (CMPWconst [0] x:(ANDconst [c] y)))
  6474  	// cond: x.Uses == 1
  6475  	// result: (LessEqual (TSTWconst [int32(c)] y))
  6476  	for {
  6477  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6478  			break
  6479  		}
  6480  		x := v_0.Args[0]
  6481  		if x.Op != OpARM64ANDconst {
  6482  			break
  6483  		}
  6484  		c := auxIntToInt64(x.AuxInt)
  6485  		y := x.Args[0]
  6486  		if !(x.Uses == 1) {
  6487  			break
  6488  		}
  6489  		v.reset(OpARM64LessEqual)
  6490  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6491  		v0.AuxInt = int32ToAuxInt(int32(c))
  6492  		v0.AddArg(y)
  6493  		v.AddArg(v0)
  6494  		return true
  6495  	}
  6496  	// match: (LessEqual (CMPWconst [0] z:(AND x y)))
  6497  	// cond: z.Uses == 1
  6498  	// result: (LessEqual (TSTW x y))
  6499  	for {
  6500  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6501  			break
  6502  		}
  6503  		z := v_0.Args[0]
  6504  		if z.Op != OpARM64AND {
  6505  			break
  6506  		}
  6507  		y := z.Args[1]
  6508  		x := z.Args[0]
  6509  		if !(z.Uses == 1) {
  6510  			break
  6511  		}
  6512  		v.reset(OpARM64LessEqual)
  6513  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6514  		v0.AddArg2(x, y)
  6515  		v.AddArg(v0)
  6516  		return true
  6517  	}
  6518  	// match: (LessEqual (CMPconst [0] x:(ANDconst [c] y)))
  6519  	// cond: x.Uses == 1
  6520  	// result: (LessEqual (TSTconst [c] y))
  6521  	for {
  6522  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6523  			break
  6524  		}
  6525  		x := v_0.Args[0]
  6526  		if x.Op != OpARM64ANDconst {
  6527  			break
  6528  		}
  6529  		c := auxIntToInt64(x.AuxInt)
  6530  		y := x.Args[0]
  6531  		if !(x.Uses == 1) {
  6532  			break
  6533  		}
  6534  		v.reset(OpARM64LessEqual)
  6535  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6536  		v0.AuxInt = int64ToAuxInt(c)
  6537  		v0.AddArg(y)
  6538  		v.AddArg(v0)
  6539  		return true
  6540  	}
  6541  	// match: (LessEqual (FlagConstant [fc]))
  6542  	// result: (MOVDconst [b2i(fc.le())])
  6543  	for {
  6544  		if v_0.Op != OpARM64FlagConstant {
  6545  			break
  6546  		}
  6547  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6548  		v.reset(OpARM64MOVDconst)
  6549  		v.AuxInt = int64ToAuxInt(b2i(fc.le()))
  6550  		return true
  6551  	}
  6552  	// match: (LessEqual (InvertFlags x))
  6553  	// result: (GreaterEqual x)
  6554  	for {
  6555  		if v_0.Op != OpARM64InvertFlags {
  6556  			break
  6557  		}
  6558  		x := v_0.Args[0]
  6559  		v.reset(OpARM64GreaterEqual)
  6560  		v.AddArg(x)
  6561  		return true
  6562  	}
  6563  	return false
  6564  }
  6565  func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
  6566  	v_0 := v.Args[0]
  6567  	// match: (LessEqualF (InvertFlags x))
  6568  	// result: (GreaterEqualF x)
  6569  	for {
  6570  		if v_0.Op != OpARM64InvertFlags {
  6571  			break
  6572  		}
  6573  		x := v_0.Args[0]
  6574  		v.reset(OpARM64GreaterEqualF)
  6575  		v.AddArg(x)
  6576  		return true
  6577  	}
  6578  	return false
  6579  }
  6580  func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
  6581  	v_0 := v.Args[0]
  6582  	// match: (LessEqualU (FlagConstant [fc]))
  6583  	// result: (MOVDconst [b2i(fc.ule())])
  6584  	for {
  6585  		if v_0.Op != OpARM64FlagConstant {
  6586  			break
  6587  		}
  6588  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6589  		v.reset(OpARM64MOVDconst)
  6590  		v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
  6591  		return true
  6592  	}
  6593  	// match: (LessEqualU (InvertFlags x))
  6594  	// result: (GreaterEqualU x)
  6595  	for {
  6596  		if v_0.Op != OpARM64InvertFlags {
  6597  			break
  6598  		}
  6599  		x := v_0.Args[0]
  6600  		v.reset(OpARM64GreaterEqualU)
  6601  		v.AddArg(x)
  6602  		return true
  6603  	}
  6604  	return false
  6605  }
  6606  func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
  6607  	v_0 := v.Args[0]
  6608  	b := v.Block
  6609  	// match: (LessThan (CMPconst [0] z:(AND x y)))
  6610  	// cond: z.Uses == 1
  6611  	// result: (LessThan (TST x y))
  6612  	for {
  6613  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6614  			break
  6615  		}
  6616  		z := v_0.Args[0]
  6617  		if z.Op != OpARM64AND {
  6618  			break
  6619  		}
  6620  		y := z.Args[1]
  6621  		x := z.Args[0]
  6622  		if !(z.Uses == 1) {
  6623  			break
  6624  		}
  6625  		v.reset(OpARM64LessThan)
  6626  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
  6627  		v0.AddArg2(x, y)
  6628  		v.AddArg(v0)
  6629  		return true
  6630  	}
  6631  	// match: (LessThan (CMPWconst [0] x:(ANDconst [c] y)))
  6632  	// cond: x.Uses == 1
  6633  	// result: (LessThan (TSTWconst [int32(c)] y))
  6634  	for {
  6635  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6636  			break
  6637  		}
  6638  		x := v_0.Args[0]
  6639  		if x.Op != OpARM64ANDconst {
  6640  			break
  6641  		}
  6642  		c := auxIntToInt64(x.AuxInt)
  6643  		y := x.Args[0]
  6644  		if !(x.Uses == 1) {
  6645  			break
  6646  		}
  6647  		v.reset(OpARM64LessThan)
  6648  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
  6649  		v0.AuxInt = int32ToAuxInt(int32(c))
  6650  		v0.AddArg(y)
  6651  		v.AddArg(v0)
  6652  		return true
  6653  	}
  6654  	// match: (LessThan (CMPWconst [0] z:(AND x y)))
  6655  	// cond: z.Uses == 1
  6656  	// result: (LessThan (TSTW x y))
  6657  	for {
  6658  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6659  			break
  6660  		}
  6661  		z := v_0.Args[0]
  6662  		if z.Op != OpARM64AND {
  6663  			break
  6664  		}
  6665  		y := z.Args[1]
  6666  		x := z.Args[0]
  6667  		if !(z.Uses == 1) {
  6668  			break
  6669  		}
  6670  		v.reset(OpARM64LessThan)
  6671  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
  6672  		v0.AddArg2(x, y)
  6673  		v.AddArg(v0)
  6674  		return true
  6675  	}
  6676  	// match: (LessThan (CMPconst [0] x:(ANDconst [c] y)))
  6677  	// cond: x.Uses == 1
  6678  	// result: (LessThan (TSTconst [c] y))
  6679  	for {
  6680  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6681  			break
  6682  		}
  6683  		x := v_0.Args[0]
  6684  		if x.Op != OpARM64ANDconst {
  6685  			break
  6686  		}
  6687  		c := auxIntToInt64(x.AuxInt)
  6688  		y := x.Args[0]
  6689  		if !(x.Uses == 1) {
  6690  			break
  6691  		}
  6692  		v.reset(OpARM64LessThan)
  6693  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
  6694  		v0.AuxInt = int64ToAuxInt(c)
  6695  		v0.AddArg(y)
  6696  		v.AddArg(v0)
  6697  		return true
  6698  	}
  6699  	// match: (LessThan (CMPconst [0] x:(ADDconst [c] y)))
  6700  	// cond: x.Uses == 1
  6701  	// result: (LessThanNoov (CMNconst [c] y))
  6702  	for {
  6703  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6704  			break
  6705  		}
  6706  		x := v_0.Args[0]
  6707  		if x.Op != OpARM64ADDconst {
  6708  			break
  6709  		}
  6710  		c := auxIntToInt64(x.AuxInt)
  6711  		y := x.Args[0]
  6712  		if !(x.Uses == 1) {
  6713  			break
  6714  		}
  6715  		v.reset(OpARM64LessThanNoov)
  6716  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
  6717  		v0.AuxInt = int64ToAuxInt(c)
  6718  		v0.AddArg(y)
  6719  		v.AddArg(v0)
  6720  		return true
  6721  	}
  6722  	// match: (LessThan (CMPWconst [0] x:(ADDconst [c] y)))
  6723  	// cond: x.Uses == 1
  6724  	// result: (LessThanNoov (CMNWconst [int32(c)] y))
  6725  	for {
  6726  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6727  			break
  6728  		}
  6729  		x := v_0.Args[0]
  6730  		if x.Op != OpARM64ADDconst {
  6731  			break
  6732  		}
  6733  		c := auxIntToInt64(x.AuxInt)
  6734  		y := x.Args[0]
  6735  		if !(x.Uses == 1) {
  6736  			break
  6737  		}
  6738  		v.reset(OpARM64LessThanNoov)
  6739  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
  6740  		v0.AuxInt = int32ToAuxInt(int32(c))
  6741  		v0.AddArg(y)
  6742  		v.AddArg(v0)
  6743  		return true
  6744  	}
  6745  	// match: (LessThan (CMPconst [0] z:(ADD x y)))
  6746  	// cond: z.Uses == 1
  6747  	// result: (LessThanNoov (CMN x y))
  6748  	for {
  6749  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6750  			break
  6751  		}
  6752  		z := v_0.Args[0]
  6753  		if z.Op != OpARM64ADD {
  6754  			break
  6755  		}
  6756  		y := z.Args[1]
  6757  		x := z.Args[0]
  6758  		if !(z.Uses == 1) {
  6759  			break
  6760  		}
  6761  		v.reset(OpARM64LessThanNoov)
  6762  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6763  		v0.AddArg2(x, y)
  6764  		v.AddArg(v0)
  6765  		return true
  6766  	}
  6767  	// match: (LessThan (CMPWconst [0] z:(ADD x y)))
  6768  	// cond: z.Uses == 1
  6769  	// result: (LessThanNoov (CMNW x y))
  6770  	for {
  6771  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6772  			break
  6773  		}
  6774  		z := v_0.Args[0]
  6775  		if z.Op != OpARM64ADD {
  6776  			break
  6777  		}
  6778  		y := z.Args[1]
  6779  		x := z.Args[0]
  6780  		if !(z.Uses == 1) {
  6781  			break
  6782  		}
  6783  		v.reset(OpARM64LessThanNoov)
  6784  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6785  		v0.AddArg2(x, y)
  6786  		v.AddArg(v0)
  6787  		return true
  6788  	}
  6789  	// match: (LessThan (CMPconst [0] z:(MADD a x y)))
  6790  	// cond: z.Uses == 1
  6791  	// result: (LessThanNoov (CMN a (MUL <x.Type> x y)))
  6792  	for {
  6793  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6794  			break
  6795  		}
  6796  		z := v_0.Args[0]
  6797  		if z.Op != OpARM64MADD {
  6798  			break
  6799  		}
  6800  		y := z.Args[2]
  6801  		a := z.Args[0]
  6802  		x := z.Args[1]
  6803  		if !(z.Uses == 1) {
  6804  			break
  6805  		}
  6806  		v.reset(OpARM64LessThanNoov)
  6807  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
  6808  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6809  		v1.AddArg2(x, y)
  6810  		v0.AddArg2(a, v1)
  6811  		v.AddArg(v0)
  6812  		return true
  6813  	}
  6814  	// match: (LessThan (CMPconst [0] z:(MSUB a x y)))
  6815  	// cond: z.Uses == 1
  6816  	// result: (LessThanNoov (CMP a (MUL <x.Type> x y)))
  6817  	for {
  6818  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
  6819  			break
  6820  		}
  6821  		z := v_0.Args[0]
  6822  		if z.Op != OpARM64MSUB {
  6823  			break
  6824  		}
  6825  		y := z.Args[2]
  6826  		a := z.Args[0]
  6827  		x := z.Args[1]
  6828  		if !(z.Uses == 1) {
  6829  			break
  6830  		}
  6831  		v.reset(OpARM64LessThanNoov)
  6832  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
  6833  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  6834  		v1.AddArg2(x, y)
  6835  		v0.AddArg2(a, v1)
  6836  		v.AddArg(v0)
  6837  		return true
  6838  	}
  6839  	// match: (LessThan (CMPWconst [0] z:(MADDW a x y)))
  6840  	// cond: z.Uses == 1
  6841  	// result: (LessThanNoov (CMNW a (MULW <x.Type> x y)))
  6842  	for {
  6843  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6844  			break
  6845  		}
  6846  		z := v_0.Args[0]
  6847  		if z.Op != OpARM64MADDW {
  6848  			break
  6849  		}
  6850  		y := z.Args[2]
  6851  		a := z.Args[0]
  6852  		x := z.Args[1]
  6853  		if !(z.Uses == 1) {
  6854  			break
  6855  		}
  6856  		v.reset(OpARM64LessThanNoov)
  6857  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
  6858  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6859  		v1.AddArg2(x, y)
  6860  		v0.AddArg2(a, v1)
  6861  		v.AddArg(v0)
  6862  		return true
  6863  	}
  6864  	// match: (LessThan (CMPWconst [0] z:(MSUBW a x y)))
  6865  	// cond: z.Uses == 1
  6866  	// result: (LessThanNoov (CMPW a (MULW <x.Type> x y)))
  6867  	for {
  6868  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
  6869  			break
  6870  		}
  6871  		z := v_0.Args[0]
  6872  		if z.Op != OpARM64MSUBW {
  6873  			break
  6874  		}
  6875  		y := z.Args[2]
  6876  		a := z.Args[0]
  6877  		x := z.Args[1]
  6878  		if !(z.Uses == 1) {
  6879  			break
  6880  		}
  6881  		v.reset(OpARM64LessThanNoov)
  6882  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
  6883  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  6884  		v1.AddArg2(x, y)
  6885  		v0.AddArg2(a, v1)
  6886  		v.AddArg(v0)
  6887  		return true
  6888  	}
  6889  	// match: (LessThan (FlagConstant [fc]))
  6890  	// result: (MOVDconst [b2i(fc.lt())])
  6891  	for {
  6892  		if v_0.Op != OpARM64FlagConstant {
  6893  			break
  6894  		}
  6895  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6896  		v.reset(OpARM64MOVDconst)
  6897  		v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
  6898  		return true
  6899  	}
  6900  	// match: (LessThan (InvertFlags x))
  6901  	// result: (GreaterThan x)
  6902  	for {
  6903  		if v_0.Op != OpARM64InvertFlags {
  6904  			break
  6905  		}
  6906  		x := v_0.Args[0]
  6907  		v.reset(OpARM64GreaterThan)
  6908  		v.AddArg(x)
  6909  		return true
  6910  	}
  6911  	return false
  6912  }
  6913  func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
  6914  	v_0 := v.Args[0]
  6915  	// match: (LessThanF (InvertFlags x))
  6916  	// result: (GreaterThanF x)
  6917  	for {
  6918  		if v_0.Op != OpARM64InvertFlags {
  6919  			break
  6920  		}
  6921  		x := v_0.Args[0]
  6922  		v.reset(OpARM64GreaterThanF)
  6923  		v.AddArg(x)
  6924  		return true
  6925  	}
  6926  	return false
  6927  }
  6928  func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
  6929  	v_0 := v.Args[0]
  6930  	b := v.Block
  6931  	typ := &b.Func.Config.Types
  6932  	// match: (LessThanNoov (FlagConstant [fc]))
  6933  	// result: (MOVDconst [b2i(fc.ltNoov())])
  6934  	for {
  6935  		if v_0.Op != OpARM64FlagConstant {
  6936  			break
  6937  		}
  6938  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6939  		v.reset(OpARM64MOVDconst)
  6940  		v.AuxInt = int64ToAuxInt(b2i(fc.ltNoov()))
  6941  		return true
  6942  	}
  6943  	// match: (LessThanNoov (InvertFlags x))
  6944  	// result: (CSEL0 [OpARM64NotEqual] (GreaterEqualNoov <typ.Bool> x) x)
  6945  	for {
  6946  		if v_0.Op != OpARM64InvertFlags {
  6947  			break
  6948  		}
  6949  		x := v_0.Args[0]
  6950  		v.reset(OpARM64CSEL0)
  6951  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
  6952  		v0 := b.NewValue0(v.Pos, OpARM64GreaterEqualNoov, typ.Bool)
  6953  		v0.AddArg(x)
  6954  		v.AddArg2(v0, x)
  6955  		return true
  6956  	}
  6957  	return false
  6958  }
  6959  func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
  6960  	v_0 := v.Args[0]
  6961  	// match: (LessThanU (FlagConstant [fc]))
  6962  	// result: (MOVDconst [b2i(fc.ult())])
  6963  	for {
  6964  		if v_0.Op != OpARM64FlagConstant {
  6965  			break
  6966  		}
  6967  		fc := auxIntToFlagConstant(v_0.AuxInt)
  6968  		v.reset(OpARM64MOVDconst)
  6969  		v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
  6970  		return true
  6971  	}
  6972  	// match: (LessThanU (InvertFlags x))
  6973  	// result: (GreaterThanU x)
  6974  	for {
  6975  		if v_0.Op != OpARM64InvertFlags {
  6976  			break
  6977  		}
  6978  		x := v_0.Args[0]
  6979  		v.reset(OpARM64GreaterThanU)
  6980  		v.AddArg(x)
  6981  		return true
  6982  	}
  6983  	return false
  6984  }
  6985  func rewriteValueARM64_OpARM64MADD(v *Value) bool {
  6986  	v_2 := v.Args[2]
  6987  	v_1 := v.Args[1]
  6988  	v_0 := v.Args[0]
  6989  	b := v.Block
  6990  	// match: (MADD a x (MOVDconst [-1]))
  6991  	// result: (SUB a x)
  6992  	for {
  6993  		a := v_0
  6994  		x := v_1
  6995  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
  6996  			break
  6997  		}
  6998  		v.reset(OpARM64SUB)
  6999  		v.AddArg2(a, x)
  7000  		return true
  7001  	}
  7002  	// match: (MADD a _ (MOVDconst [0]))
  7003  	// result: a
  7004  	for {
  7005  		a := v_0
  7006  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
  7007  			break
  7008  		}
  7009  		v.copyOf(a)
  7010  		return true
  7011  	}
  7012  	// match: (MADD a x (MOVDconst [1]))
  7013  	// result: (ADD a x)
  7014  	for {
  7015  		a := v_0
  7016  		x := v_1
  7017  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
  7018  			break
  7019  		}
  7020  		v.reset(OpARM64ADD)
  7021  		v.AddArg2(a, x)
  7022  		return true
  7023  	}
  7024  	// match: (MADD a x (MOVDconst [c]))
  7025  	// cond: isPowerOfTwo(c)
  7026  	// result: (ADDshiftLL a x [log64(c)])
  7027  	for {
  7028  		a := v_0
  7029  		x := v_1
  7030  		if v_2.Op != OpARM64MOVDconst {
  7031  			break
  7032  		}
  7033  		c := auxIntToInt64(v_2.AuxInt)
  7034  		if !(isPowerOfTwo(c)) {
  7035  			break
  7036  		}
  7037  		v.reset(OpARM64ADDshiftLL)
  7038  		v.AuxInt = int64ToAuxInt(log64(c))
  7039  		v.AddArg2(a, x)
  7040  		return true
  7041  	}
  7042  	// match: (MADD a x (MOVDconst [c]))
  7043  	// cond: isPowerOfTwo(c-1) && c>=3
  7044  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7045  	for {
  7046  		a := v_0
  7047  		x := v_1
  7048  		if v_2.Op != OpARM64MOVDconst {
  7049  			break
  7050  		}
  7051  		c := auxIntToInt64(v_2.AuxInt)
  7052  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7053  			break
  7054  		}
  7055  		v.reset(OpARM64ADD)
  7056  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7057  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7058  		v0.AddArg2(x, x)
  7059  		v.AddArg2(a, v0)
  7060  		return true
  7061  	}
  7062  	// match: (MADD a x (MOVDconst [c]))
  7063  	// cond: isPowerOfTwo(c+1) && c>=7
  7064  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7065  	for {
  7066  		a := v_0
  7067  		x := v_1
  7068  		if v_2.Op != OpARM64MOVDconst {
  7069  			break
  7070  		}
  7071  		c := auxIntToInt64(v_2.AuxInt)
  7072  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7073  			break
  7074  		}
  7075  		v.reset(OpARM64SUB)
  7076  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7077  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7078  		v0.AddArg2(x, x)
  7079  		v.AddArg2(a, v0)
  7080  		return true
  7081  	}
  7082  	// match: (MADD a x (MOVDconst [c]))
  7083  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7084  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7085  	for {
  7086  		a := v_0
  7087  		x := v_1
  7088  		if v_2.Op != OpARM64MOVDconst {
  7089  			break
  7090  		}
  7091  		c := auxIntToInt64(v_2.AuxInt)
  7092  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7093  			break
  7094  		}
  7095  		v.reset(OpARM64SUBshiftLL)
  7096  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7097  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7098  		v0.AuxInt = int64ToAuxInt(2)
  7099  		v0.AddArg2(x, x)
  7100  		v.AddArg2(a, v0)
  7101  		return true
  7102  	}
  7103  	// match: (MADD a x (MOVDconst [c]))
  7104  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7105  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7106  	for {
  7107  		a := v_0
  7108  		x := v_1
  7109  		if v_2.Op != OpARM64MOVDconst {
  7110  			break
  7111  		}
  7112  		c := auxIntToInt64(v_2.AuxInt)
  7113  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7114  			break
  7115  		}
  7116  		v.reset(OpARM64ADDshiftLL)
  7117  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7118  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7119  		v0.AuxInt = int64ToAuxInt(2)
  7120  		v0.AddArg2(x, x)
  7121  		v.AddArg2(a, v0)
  7122  		return true
  7123  	}
  7124  	// match: (MADD a x (MOVDconst [c]))
  7125  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7126  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7127  	for {
  7128  		a := v_0
  7129  		x := v_1
  7130  		if v_2.Op != OpARM64MOVDconst {
  7131  			break
  7132  		}
  7133  		c := auxIntToInt64(v_2.AuxInt)
  7134  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7135  			break
  7136  		}
  7137  		v.reset(OpARM64SUBshiftLL)
  7138  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7139  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7140  		v0.AuxInt = int64ToAuxInt(3)
  7141  		v0.AddArg2(x, x)
  7142  		v.AddArg2(a, v0)
  7143  		return true
  7144  	}
  7145  	// match: (MADD a x (MOVDconst [c]))
  7146  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7147  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7148  	for {
  7149  		a := v_0
  7150  		x := v_1
  7151  		if v_2.Op != OpARM64MOVDconst {
  7152  			break
  7153  		}
  7154  		c := auxIntToInt64(v_2.AuxInt)
  7155  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7156  			break
  7157  		}
  7158  		v.reset(OpARM64ADDshiftLL)
  7159  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7160  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7161  		v0.AuxInt = int64ToAuxInt(3)
  7162  		v0.AddArg2(x, x)
  7163  		v.AddArg2(a, v0)
  7164  		return true
  7165  	}
  7166  	// match: (MADD a (MOVDconst [-1]) x)
  7167  	// result: (SUB a x)
  7168  	for {
  7169  		a := v_0
  7170  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7171  			break
  7172  		}
  7173  		x := v_2
  7174  		v.reset(OpARM64SUB)
  7175  		v.AddArg2(a, x)
  7176  		return true
  7177  	}
  7178  	// match: (MADD a (MOVDconst [0]) _)
  7179  	// result: a
  7180  	for {
  7181  		a := v_0
  7182  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7183  			break
  7184  		}
  7185  		v.copyOf(a)
  7186  		return true
  7187  	}
  7188  	// match: (MADD a (MOVDconst [1]) x)
  7189  	// result: (ADD a x)
  7190  	for {
  7191  		a := v_0
  7192  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7193  			break
  7194  		}
  7195  		x := v_2
  7196  		v.reset(OpARM64ADD)
  7197  		v.AddArg2(a, x)
  7198  		return true
  7199  	}
  7200  	// match: (MADD a (MOVDconst [c]) x)
  7201  	// cond: isPowerOfTwo(c)
  7202  	// result: (ADDshiftLL a x [log64(c)])
  7203  	for {
  7204  		a := v_0
  7205  		if v_1.Op != OpARM64MOVDconst {
  7206  			break
  7207  		}
  7208  		c := auxIntToInt64(v_1.AuxInt)
  7209  		x := v_2
  7210  		if !(isPowerOfTwo(c)) {
  7211  			break
  7212  		}
  7213  		v.reset(OpARM64ADDshiftLL)
  7214  		v.AuxInt = int64ToAuxInt(log64(c))
  7215  		v.AddArg2(a, x)
  7216  		return true
  7217  	}
  7218  	// match: (MADD a (MOVDconst [c]) x)
  7219  	// cond: isPowerOfTwo(c-1) && c>=3
  7220  	// result: (ADD a (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7221  	for {
  7222  		a := v_0
  7223  		if v_1.Op != OpARM64MOVDconst {
  7224  			break
  7225  		}
  7226  		c := auxIntToInt64(v_1.AuxInt)
  7227  		x := v_2
  7228  		if !(isPowerOfTwo(c-1) && c >= 3) {
  7229  			break
  7230  		}
  7231  		v.reset(OpARM64ADD)
  7232  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7233  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7234  		v0.AddArg2(x, x)
  7235  		v.AddArg2(a, v0)
  7236  		return true
  7237  	}
  7238  	// match: (MADD a (MOVDconst [c]) x)
  7239  	// cond: isPowerOfTwo(c+1) && c>=7
  7240  	// result: (SUB a (SUBshiftLL <x.Type> x x [log64(c+1)]))
  7241  	for {
  7242  		a := v_0
  7243  		if v_1.Op != OpARM64MOVDconst {
  7244  			break
  7245  		}
  7246  		c := auxIntToInt64(v_1.AuxInt)
  7247  		x := v_2
  7248  		if !(isPowerOfTwo(c+1) && c >= 7) {
  7249  			break
  7250  		}
  7251  		v.reset(OpARM64SUB)
  7252  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7253  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7254  		v0.AddArg2(x, x)
  7255  		v.AddArg2(a, v0)
  7256  		return true
  7257  	}
  7258  	// match: (MADD a (MOVDconst [c]) x)
  7259  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7260  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
  7261  	for {
  7262  		a := v_0
  7263  		if v_1.Op != OpARM64MOVDconst {
  7264  			break
  7265  		}
  7266  		c := auxIntToInt64(v_1.AuxInt)
  7267  		x := v_2
  7268  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7269  			break
  7270  		}
  7271  		v.reset(OpARM64SUBshiftLL)
  7272  		v.AuxInt = int64ToAuxInt(log64(c / 3))
  7273  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7274  		v0.AuxInt = int64ToAuxInt(2)
  7275  		v0.AddArg2(x, x)
  7276  		v.AddArg2(a, v0)
  7277  		return true
  7278  	}
  7279  	// match: (MADD a (MOVDconst [c]) x)
  7280  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7281  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
  7282  	for {
  7283  		a := v_0
  7284  		if v_1.Op != OpARM64MOVDconst {
  7285  			break
  7286  		}
  7287  		c := auxIntToInt64(v_1.AuxInt)
  7288  		x := v_2
  7289  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7290  			break
  7291  		}
  7292  		v.reset(OpARM64ADDshiftLL)
  7293  		v.AuxInt = int64ToAuxInt(log64(c / 5))
  7294  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7295  		v0.AuxInt = int64ToAuxInt(2)
  7296  		v0.AddArg2(x, x)
  7297  		v.AddArg2(a, v0)
  7298  		return true
  7299  	}
  7300  	// match: (MADD a (MOVDconst [c]) x)
  7301  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  7302  	// result: (SUBshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
  7303  	for {
  7304  		a := v_0
  7305  		if v_1.Op != OpARM64MOVDconst {
  7306  			break
  7307  		}
  7308  		c := auxIntToInt64(v_1.AuxInt)
  7309  		x := v_2
  7310  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  7311  			break
  7312  		}
  7313  		v.reset(OpARM64SUBshiftLL)
  7314  		v.AuxInt = int64ToAuxInt(log64(c / 7))
  7315  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7316  		v0.AuxInt = int64ToAuxInt(3)
  7317  		v0.AddArg2(x, x)
  7318  		v.AddArg2(a, v0)
  7319  		return true
  7320  	}
  7321  	// match: (MADD a (MOVDconst [c]) x)
  7322  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  7323  	// result: (ADDshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
  7324  	for {
  7325  		a := v_0
  7326  		if v_1.Op != OpARM64MOVDconst {
  7327  			break
  7328  		}
  7329  		c := auxIntToInt64(v_1.AuxInt)
  7330  		x := v_2
  7331  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  7332  			break
  7333  		}
  7334  		v.reset(OpARM64ADDshiftLL)
  7335  		v.AuxInt = int64ToAuxInt(log64(c / 9))
  7336  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7337  		v0.AuxInt = int64ToAuxInt(3)
  7338  		v0.AddArg2(x, x)
  7339  		v.AddArg2(a, v0)
  7340  		return true
  7341  	}
  7342  	// match: (MADD (MOVDconst [c]) x y)
  7343  	// result: (ADDconst [c] (MUL <x.Type> x y))
  7344  	for {
  7345  		if v_0.Op != OpARM64MOVDconst {
  7346  			break
  7347  		}
  7348  		c := auxIntToInt64(v_0.AuxInt)
  7349  		x := v_1
  7350  		y := v_2
  7351  		v.reset(OpARM64ADDconst)
  7352  		v.AuxInt = int64ToAuxInt(c)
  7353  		v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
  7354  		v0.AddArg2(x, y)
  7355  		v.AddArg(v0)
  7356  		return true
  7357  	}
  7358  	// match: (MADD a (MOVDconst [c]) (MOVDconst [d]))
  7359  	// result: (ADDconst [c*d] a)
  7360  	for {
  7361  		a := v_0
  7362  		if v_1.Op != OpARM64MOVDconst {
  7363  			break
  7364  		}
  7365  		c := auxIntToInt64(v_1.AuxInt)
  7366  		if v_2.Op != OpARM64MOVDconst {
  7367  			break
  7368  		}
  7369  		d := auxIntToInt64(v_2.AuxInt)
  7370  		v.reset(OpARM64ADDconst)
  7371  		v.AuxInt = int64ToAuxInt(c * d)
  7372  		v.AddArg(a)
  7373  		return true
  7374  	}
  7375  	return false
  7376  }
  7377  func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
  7378  	v_2 := v.Args[2]
  7379  	v_1 := v.Args[1]
  7380  	v_0 := v.Args[0]
  7381  	b := v.Block
  7382  	// match: (MADDW a x (MOVDconst [c]))
  7383  	// cond: int32(c)==-1
  7384  	// result: (MOVWUreg (SUB <a.Type> a x))
  7385  	for {
  7386  		a := v_0
  7387  		x := v_1
  7388  		if v_2.Op != OpARM64MOVDconst {
  7389  			break
  7390  		}
  7391  		c := auxIntToInt64(v_2.AuxInt)
  7392  		if !(int32(c) == -1) {
  7393  			break
  7394  		}
  7395  		v.reset(OpARM64MOVWUreg)
  7396  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7397  		v0.AddArg2(a, x)
  7398  		v.AddArg(v0)
  7399  		return true
  7400  	}
  7401  	// match: (MADDW a _ (MOVDconst [c]))
  7402  	// cond: int32(c)==0
  7403  	// result: (MOVWUreg a)
  7404  	for {
  7405  		a := v_0
  7406  		if v_2.Op != OpARM64MOVDconst {
  7407  			break
  7408  		}
  7409  		c := auxIntToInt64(v_2.AuxInt)
  7410  		if !(int32(c) == 0) {
  7411  			break
  7412  		}
  7413  		v.reset(OpARM64MOVWUreg)
  7414  		v.AddArg(a)
  7415  		return true
  7416  	}
  7417  	// match: (MADDW a x (MOVDconst [c]))
  7418  	// cond: int32(c)==1
  7419  	// result: (MOVWUreg (ADD <a.Type> a x))
  7420  	for {
  7421  		a := v_0
  7422  		x := v_1
  7423  		if v_2.Op != OpARM64MOVDconst {
  7424  			break
  7425  		}
  7426  		c := auxIntToInt64(v_2.AuxInt)
  7427  		if !(int32(c) == 1) {
  7428  			break
  7429  		}
  7430  		v.reset(OpARM64MOVWUreg)
  7431  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7432  		v0.AddArg2(a, x)
  7433  		v.AddArg(v0)
  7434  		return true
  7435  	}
  7436  	// match: (MADDW a x (MOVDconst [c]))
  7437  	// cond: isPowerOfTwo(c)
  7438  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7439  	for {
  7440  		a := v_0
  7441  		x := v_1
  7442  		if v_2.Op != OpARM64MOVDconst {
  7443  			break
  7444  		}
  7445  		c := auxIntToInt64(v_2.AuxInt)
  7446  		if !(isPowerOfTwo(c)) {
  7447  			break
  7448  		}
  7449  		v.reset(OpARM64MOVWUreg)
  7450  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7451  		v0.AuxInt = int64ToAuxInt(log64(c))
  7452  		v0.AddArg2(a, x)
  7453  		v.AddArg(v0)
  7454  		return true
  7455  	}
  7456  	// match: (MADDW a x (MOVDconst [c]))
  7457  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7458  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7459  	for {
  7460  		a := v_0
  7461  		x := v_1
  7462  		if v_2.Op != OpARM64MOVDconst {
  7463  			break
  7464  		}
  7465  		c := auxIntToInt64(v_2.AuxInt)
  7466  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7467  			break
  7468  		}
  7469  		v.reset(OpARM64MOVWUreg)
  7470  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7471  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7472  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7473  		v1.AddArg2(x, x)
  7474  		v0.AddArg2(a, v1)
  7475  		v.AddArg(v0)
  7476  		return true
  7477  	}
  7478  	// match: (MADDW a x (MOVDconst [c]))
  7479  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7480  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7481  	for {
  7482  		a := v_0
  7483  		x := v_1
  7484  		if v_2.Op != OpARM64MOVDconst {
  7485  			break
  7486  		}
  7487  		c := auxIntToInt64(v_2.AuxInt)
  7488  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7489  			break
  7490  		}
  7491  		v.reset(OpARM64MOVWUreg)
  7492  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7493  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7494  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7495  		v1.AddArg2(x, x)
  7496  		v0.AddArg2(a, v1)
  7497  		v.AddArg(v0)
  7498  		return true
  7499  	}
  7500  	// match: (MADDW a x (MOVDconst [c]))
  7501  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7502  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7503  	for {
  7504  		a := v_0
  7505  		x := v_1
  7506  		if v_2.Op != OpARM64MOVDconst {
  7507  			break
  7508  		}
  7509  		c := auxIntToInt64(v_2.AuxInt)
  7510  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7511  			break
  7512  		}
  7513  		v.reset(OpARM64MOVWUreg)
  7514  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7515  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7516  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7517  		v1.AuxInt = int64ToAuxInt(2)
  7518  		v1.AddArg2(x, x)
  7519  		v0.AddArg2(a, v1)
  7520  		v.AddArg(v0)
  7521  		return true
  7522  	}
  7523  	// match: (MADDW a x (MOVDconst [c]))
  7524  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7525  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7526  	for {
  7527  		a := v_0
  7528  		x := v_1
  7529  		if v_2.Op != OpARM64MOVDconst {
  7530  			break
  7531  		}
  7532  		c := auxIntToInt64(v_2.AuxInt)
  7533  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7534  			break
  7535  		}
  7536  		v.reset(OpARM64MOVWUreg)
  7537  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7538  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7539  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7540  		v1.AuxInt = int64ToAuxInt(2)
  7541  		v1.AddArg2(x, x)
  7542  		v0.AddArg2(a, v1)
  7543  		v.AddArg(v0)
  7544  		return true
  7545  	}
  7546  	// match: (MADDW a x (MOVDconst [c]))
  7547  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7548  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7549  	for {
  7550  		a := v_0
  7551  		x := v_1
  7552  		if v_2.Op != OpARM64MOVDconst {
  7553  			break
  7554  		}
  7555  		c := auxIntToInt64(v_2.AuxInt)
  7556  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7557  			break
  7558  		}
  7559  		v.reset(OpARM64MOVWUreg)
  7560  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7561  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7562  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7563  		v1.AuxInt = int64ToAuxInt(3)
  7564  		v1.AddArg2(x, x)
  7565  		v0.AddArg2(a, v1)
  7566  		v.AddArg(v0)
  7567  		return true
  7568  	}
  7569  	// match: (MADDW a x (MOVDconst [c]))
  7570  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7571  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7572  	for {
  7573  		a := v_0
  7574  		x := v_1
  7575  		if v_2.Op != OpARM64MOVDconst {
  7576  			break
  7577  		}
  7578  		c := auxIntToInt64(v_2.AuxInt)
  7579  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7580  			break
  7581  		}
  7582  		v.reset(OpARM64MOVWUreg)
  7583  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7584  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7585  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7586  		v1.AuxInt = int64ToAuxInt(3)
  7587  		v1.AddArg2(x, x)
  7588  		v0.AddArg2(a, v1)
  7589  		v.AddArg(v0)
  7590  		return true
  7591  	}
  7592  	// match: (MADDW a (MOVDconst [c]) x)
  7593  	// cond: int32(c)==-1
  7594  	// result: (MOVWUreg (SUB <a.Type> a x))
  7595  	for {
  7596  		a := v_0
  7597  		if v_1.Op != OpARM64MOVDconst {
  7598  			break
  7599  		}
  7600  		c := auxIntToInt64(v_1.AuxInt)
  7601  		x := v_2
  7602  		if !(int32(c) == -1) {
  7603  			break
  7604  		}
  7605  		v.reset(OpARM64MOVWUreg)
  7606  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7607  		v0.AddArg2(a, x)
  7608  		v.AddArg(v0)
  7609  		return true
  7610  	}
  7611  	// match: (MADDW a (MOVDconst [c]) _)
  7612  	// cond: int32(c)==0
  7613  	// result: (MOVWUreg a)
  7614  	for {
  7615  		a := v_0
  7616  		if v_1.Op != OpARM64MOVDconst {
  7617  			break
  7618  		}
  7619  		c := auxIntToInt64(v_1.AuxInt)
  7620  		if !(int32(c) == 0) {
  7621  			break
  7622  		}
  7623  		v.reset(OpARM64MOVWUreg)
  7624  		v.AddArg(a)
  7625  		return true
  7626  	}
  7627  	// match: (MADDW a (MOVDconst [c]) x)
  7628  	// cond: int32(c)==1
  7629  	// result: (MOVWUreg (ADD <a.Type> a x))
  7630  	for {
  7631  		a := v_0
  7632  		if v_1.Op != OpARM64MOVDconst {
  7633  			break
  7634  		}
  7635  		c := auxIntToInt64(v_1.AuxInt)
  7636  		x := v_2
  7637  		if !(int32(c) == 1) {
  7638  			break
  7639  		}
  7640  		v.reset(OpARM64MOVWUreg)
  7641  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7642  		v0.AddArg2(a, x)
  7643  		v.AddArg(v0)
  7644  		return true
  7645  	}
  7646  	// match: (MADDW a (MOVDconst [c]) x)
  7647  	// cond: isPowerOfTwo(c)
  7648  	// result: (MOVWUreg (ADDshiftLL <a.Type> a x [log64(c)]))
  7649  	for {
  7650  		a := v_0
  7651  		if v_1.Op != OpARM64MOVDconst {
  7652  			break
  7653  		}
  7654  		c := auxIntToInt64(v_1.AuxInt)
  7655  		x := v_2
  7656  		if !(isPowerOfTwo(c)) {
  7657  			break
  7658  		}
  7659  		v.reset(OpARM64MOVWUreg)
  7660  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7661  		v0.AuxInt = int64ToAuxInt(log64(c))
  7662  		v0.AddArg2(a, x)
  7663  		v.AddArg(v0)
  7664  		return true
  7665  	}
  7666  	// match: (MADDW a (MOVDconst [c]) x)
  7667  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
  7668  	// result: (MOVWUreg (ADD <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
  7669  	for {
  7670  		a := v_0
  7671  		if v_1.Op != OpARM64MOVDconst {
  7672  			break
  7673  		}
  7674  		c := auxIntToInt64(v_1.AuxInt)
  7675  		x := v_2
  7676  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  7677  			break
  7678  		}
  7679  		v.reset(OpARM64MOVWUreg)
  7680  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
  7681  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7682  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
  7683  		v1.AddArg2(x, x)
  7684  		v0.AddArg2(a, v1)
  7685  		v.AddArg(v0)
  7686  		return true
  7687  	}
  7688  	// match: (MADDW a (MOVDconst [c]) x)
  7689  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
  7690  	// result: (MOVWUreg (SUB <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
  7691  	for {
  7692  		a := v_0
  7693  		if v_1.Op != OpARM64MOVDconst {
  7694  			break
  7695  		}
  7696  		c := auxIntToInt64(v_1.AuxInt)
  7697  		x := v_2
  7698  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  7699  			break
  7700  		}
  7701  		v.reset(OpARM64MOVWUreg)
  7702  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
  7703  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7704  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
  7705  		v1.AddArg2(x, x)
  7706  		v0.AddArg2(a, v1)
  7707  		v.AddArg(v0)
  7708  		return true
  7709  	}
  7710  	// match: (MADDW a (MOVDconst [c]) x)
  7711  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  7712  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
  7713  	for {
  7714  		a := v_0
  7715  		if v_1.Op != OpARM64MOVDconst {
  7716  			break
  7717  		}
  7718  		c := auxIntToInt64(v_1.AuxInt)
  7719  		x := v_2
  7720  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  7721  			break
  7722  		}
  7723  		v.reset(OpARM64MOVWUreg)
  7724  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7725  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
  7726  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7727  		v1.AuxInt = int64ToAuxInt(2)
  7728  		v1.AddArg2(x, x)
  7729  		v0.AddArg2(a, v1)
  7730  		v.AddArg(v0)
  7731  		return true
  7732  	}
  7733  	// match: (MADDW a (MOVDconst [c]) x)
  7734  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  7735  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
  7736  	for {
  7737  		a := v_0
  7738  		if v_1.Op != OpARM64MOVDconst {
  7739  			break
  7740  		}
  7741  		c := auxIntToInt64(v_1.AuxInt)
  7742  		x := v_2
  7743  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  7744  			break
  7745  		}
  7746  		v.reset(OpARM64MOVWUreg)
  7747  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7748  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7749  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7750  		v1.AuxInt = int64ToAuxInt(2)
  7751  		v1.AddArg2(x, x)
  7752  		v0.AddArg2(a, v1)
  7753  		v.AddArg(v0)
  7754  		return true
  7755  	}
  7756  	// match: (MADDW a (MOVDconst [c]) x)
  7757  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  7758  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
  7759  	for {
  7760  		a := v_0
  7761  		if v_1.Op != OpARM64MOVDconst {
  7762  			break
  7763  		}
  7764  		c := auxIntToInt64(v_1.AuxInt)
  7765  		x := v_2
  7766  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  7767  			break
  7768  		}
  7769  		v.reset(OpARM64MOVWUreg)
  7770  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
  7771  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
  7772  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7773  		v1.AuxInt = int64ToAuxInt(3)
  7774  		v1.AddArg2(x, x)
  7775  		v0.AddArg2(a, v1)
  7776  		v.AddArg(v0)
  7777  		return true
  7778  	}
  7779  	// match: (MADDW a (MOVDconst [c]) x)
  7780  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  7781  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
  7782  	for {
  7783  		a := v_0
  7784  		if v_1.Op != OpARM64MOVDconst {
  7785  			break
  7786  		}
  7787  		c := auxIntToInt64(v_1.AuxInt)
  7788  		x := v_2
  7789  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  7790  			break
  7791  		}
  7792  		v.reset(OpARM64MOVWUreg)
  7793  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
  7794  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
  7795  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7796  		v1.AuxInt = int64ToAuxInt(3)
  7797  		v1.AddArg2(x, x)
  7798  		v0.AddArg2(a, v1)
  7799  		v.AddArg(v0)
  7800  		return true
  7801  	}
  7802  	// match: (MADDW (MOVDconst [c]) x y)
  7803  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MULW <x.Type> x y)))
  7804  	for {
  7805  		if v_0.Op != OpARM64MOVDconst {
  7806  			break
  7807  		}
  7808  		c := auxIntToInt64(v_0.AuxInt)
  7809  		x := v_1
  7810  		y := v_2
  7811  		v.reset(OpARM64MOVWUreg)
  7812  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
  7813  		v0.AuxInt = int64ToAuxInt(c)
  7814  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
  7815  		v1.AddArg2(x, y)
  7816  		v0.AddArg(v1)
  7817  		v.AddArg(v0)
  7818  		return true
  7819  	}
  7820  	// match: (MADDW a (MOVDconst [c]) (MOVDconst [d]))
  7821  	// result: (MOVWUreg (ADDconst <a.Type> [c*d] a))
  7822  	for {
  7823  		a := v_0
  7824  		if v_1.Op != OpARM64MOVDconst {
  7825  			break
  7826  		}
  7827  		c := auxIntToInt64(v_1.AuxInt)
  7828  		if v_2.Op != OpARM64MOVDconst {
  7829  			break
  7830  		}
  7831  		d := auxIntToInt64(v_2.AuxInt)
  7832  		v.reset(OpARM64MOVWUreg)
  7833  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
  7834  		v0.AuxInt = int64ToAuxInt(c * d)
  7835  		v0.AddArg(a)
  7836  		v.AddArg(v0)
  7837  		return true
  7838  	}
  7839  	return false
  7840  }
  7841  func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
  7842  	v_1 := v.Args[1]
  7843  	v_0 := v.Args[0]
  7844  	b := v.Block
  7845  	// match: (MNEG x (MOVDconst [-1]))
  7846  	// result: x
  7847  	for {
  7848  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7849  			x := v_0
  7850  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
  7851  				continue
  7852  			}
  7853  			v.copyOf(x)
  7854  			return true
  7855  		}
  7856  		break
  7857  	}
  7858  	// match: (MNEG _ (MOVDconst [0]))
  7859  	// result: (MOVDconst [0])
  7860  	for {
  7861  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7862  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7863  				continue
  7864  			}
  7865  			v.reset(OpARM64MOVDconst)
  7866  			v.AuxInt = int64ToAuxInt(0)
  7867  			return true
  7868  		}
  7869  		break
  7870  	}
  7871  	// match: (MNEG x (MOVDconst [1]))
  7872  	// result: (NEG x)
  7873  	for {
  7874  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7875  			x := v_0
  7876  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
  7877  				continue
  7878  			}
  7879  			v.reset(OpARM64NEG)
  7880  			v.AddArg(x)
  7881  			return true
  7882  		}
  7883  		break
  7884  	}
  7885  	// match: (MNEG x (MOVDconst [c]))
  7886  	// cond: isPowerOfTwo(c)
  7887  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  7888  	for {
  7889  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7890  			x := v_0
  7891  			if v_1.Op != OpARM64MOVDconst {
  7892  				continue
  7893  			}
  7894  			c := auxIntToInt64(v_1.AuxInt)
  7895  			if !(isPowerOfTwo(c)) {
  7896  				continue
  7897  			}
  7898  			v.reset(OpARM64NEG)
  7899  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  7900  			v0.AuxInt = int64ToAuxInt(log64(c))
  7901  			v0.AddArg(x)
  7902  			v.AddArg(v0)
  7903  			return true
  7904  		}
  7905  		break
  7906  	}
  7907  	// match: (MNEG x (MOVDconst [c]))
  7908  	// cond: isPowerOfTwo(c-1) && c >= 3
  7909  	// result: (NEG (ADDshiftLL <x.Type> x x [log64(c-1)]))
  7910  	for {
  7911  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7912  			x := v_0
  7913  			if v_1.Op != OpARM64MOVDconst {
  7914  				continue
  7915  			}
  7916  			c := auxIntToInt64(v_1.AuxInt)
  7917  			if !(isPowerOfTwo(c-1) && c >= 3) {
  7918  				continue
  7919  			}
  7920  			v.reset(OpARM64NEG)
  7921  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7922  			v0.AuxInt = int64ToAuxInt(log64(c - 1))
  7923  			v0.AddArg2(x, x)
  7924  			v.AddArg(v0)
  7925  			return true
  7926  		}
  7927  		break
  7928  	}
  7929  	// match: (MNEG x (MOVDconst [c]))
  7930  	// cond: isPowerOfTwo(c+1) && c >= 7
  7931  	// result: (NEG (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)]))
  7932  	for {
  7933  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7934  			x := v_0
  7935  			if v_1.Op != OpARM64MOVDconst {
  7936  				continue
  7937  			}
  7938  			c := auxIntToInt64(v_1.AuxInt)
  7939  			if !(isPowerOfTwo(c+1) && c >= 7) {
  7940  				continue
  7941  			}
  7942  			v.reset(OpARM64NEG)
  7943  			v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7944  			v0.AuxInt = int64ToAuxInt(log64(c + 1))
  7945  			v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  7946  			v1.AddArg(x)
  7947  			v0.AddArg2(v1, x)
  7948  			v.AddArg(v0)
  7949  			return true
  7950  		}
  7951  		break
  7952  	}
  7953  	// match: (MNEG x (MOVDconst [c]))
  7954  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  7955  	// result: (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2]))
  7956  	for {
  7957  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7958  			x := v_0
  7959  			if v_1.Op != OpARM64MOVDconst {
  7960  				continue
  7961  			}
  7962  			c := auxIntToInt64(v_1.AuxInt)
  7963  			if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  7964  				continue
  7965  			}
  7966  			v.reset(OpARM64SLLconst)
  7967  			v.Type = x.Type
  7968  			v.AuxInt = int64ToAuxInt(log64(c / 3))
  7969  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  7970  			v0.AuxInt = int64ToAuxInt(2)
  7971  			v0.AddArg2(x, x)
  7972  			v.AddArg(v0)
  7973  			return true
  7974  		}
  7975  		break
  7976  	}
  7977  	// match: (MNEG x (MOVDconst [c]))
  7978  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  7979  	// result: (NEG (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2])))
  7980  	for {
  7981  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7982  			x := v_0
  7983  			if v_1.Op != OpARM64MOVDconst {
  7984  				continue
  7985  			}
  7986  			c := auxIntToInt64(v_1.AuxInt)
  7987  			if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  7988  				continue
  7989  			}
  7990  			v.reset(OpARM64NEG)
  7991  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  7992  			v0.AuxInt = int64ToAuxInt(log64(c / 5))
  7993  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  7994  			v1.AuxInt = int64ToAuxInt(2)
  7995  			v1.AddArg2(x, x)
  7996  			v0.AddArg(v1)
  7997  			v.AddArg(v0)
  7998  			return true
  7999  		}
  8000  		break
  8001  	}
  8002  	// match: (MNEG x (MOVDconst [c]))
  8003  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
  8004  	// result: (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3]))
  8005  	for {
  8006  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8007  			x := v_0
  8008  			if v_1.Op != OpARM64MOVDconst {
  8009  				continue
  8010  			}
  8011  			c := auxIntToInt64(v_1.AuxInt)
  8012  			if !(c%7 == 0 && isPowerOfTwo(c/7)) {
  8013  				continue
  8014  			}
  8015  			v.reset(OpARM64SLLconst)
  8016  			v.Type = x.Type
  8017  			v.AuxInt = int64ToAuxInt(log64(c / 7))
  8018  			v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8019  			v0.AuxInt = int64ToAuxInt(3)
  8020  			v0.AddArg2(x, x)
  8021  			v.AddArg(v0)
  8022  			return true
  8023  		}
  8024  		break
  8025  	}
  8026  	// match: (MNEG x (MOVDconst [c]))
  8027  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  8028  	// result: (NEG (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3])))
  8029  	for {
  8030  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8031  			x := v_0
  8032  			if v_1.Op != OpARM64MOVDconst {
  8033  				continue
  8034  			}
  8035  			c := auxIntToInt64(v_1.AuxInt)
  8036  			if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  8037  				continue
  8038  			}
  8039  			v.reset(OpARM64NEG)
  8040  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8041  			v0.AuxInt = int64ToAuxInt(log64(c / 9))
  8042  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8043  			v1.AuxInt = int64ToAuxInt(3)
  8044  			v1.AddArg2(x, x)
  8045  			v0.AddArg(v1)
  8046  			v.AddArg(v0)
  8047  			return true
  8048  		}
  8049  		break
  8050  	}
  8051  	// match: (MNEG (MOVDconst [c]) (MOVDconst [d]))
  8052  	// result: (MOVDconst [-c*d])
  8053  	for {
  8054  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8055  			if v_0.Op != OpARM64MOVDconst {
  8056  				continue
  8057  			}
  8058  			c := auxIntToInt64(v_0.AuxInt)
  8059  			if v_1.Op != OpARM64MOVDconst {
  8060  				continue
  8061  			}
  8062  			d := auxIntToInt64(v_1.AuxInt)
  8063  			v.reset(OpARM64MOVDconst)
  8064  			v.AuxInt = int64ToAuxInt(-c * d)
  8065  			return true
  8066  		}
  8067  		break
  8068  	}
  8069  	return false
  8070  }
  8071  func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
  8072  	v_1 := v.Args[1]
  8073  	v_0 := v.Args[0]
  8074  	b := v.Block
  8075  	// match: (MNEGW x (MOVDconst [c]))
  8076  	// cond: int32(c)==-1
  8077  	// result: (MOVWUreg x)
  8078  	for {
  8079  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8080  			x := v_0
  8081  			if v_1.Op != OpARM64MOVDconst {
  8082  				continue
  8083  			}
  8084  			c := auxIntToInt64(v_1.AuxInt)
  8085  			if !(int32(c) == -1) {
  8086  				continue
  8087  			}
  8088  			v.reset(OpARM64MOVWUreg)
  8089  			v.AddArg(x)
  8090  			return true
  8091  		}
  8092  		break
  8093  	}
  8094  	// match: (MNEGW _ (MOVDconst [c]))
  8095  	// cond: int32(c)==0
  8096  	// result: (MOVDconst [0])
  8097  	for {
  8098  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8099  			if v_1.Op != OpARM64MOVDconst {
  8100  				continue
  8101  			}
  8102  			c := auxIntToInt64(v_1.AuxInt)
  8103  			if !(int32(c) == 0) {
  8104  				continue
  8105  			}
  8106  			v.reset(OpARM64MOVDconst)
  8107  			v.AuxInt = int64ToAuxInt(0)
  8108  			return true
  8109  		}
  8110  		break
  8111  	}
  8112  	// match: (MNEGW x (MOVDconst [c]))
  8113  	// cond: int32(c)==1
  8114  	// result: (MOVWUreg (NEG <x.Type> x))
  8115  	for {
  8116  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8117  			x := v_0
  8118  			if v_1.Op != OpARM64MOVDconst {
  8119  				continue
  8120  			}
  8121  			c := auxIntToInt64(v_1.AuxInt)
  8122  			if !(int32(c) == 1) {
  8123  				continue
  8124  			}
  8125  			v.reset(OpARM64MOVWUreg)
  8126  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8127  			v0.AddArg(x)
  8128  			v.AddArg(v0)
  8129  			return true
  8130  		}
  8131  		break
  8132  	}
  8133  	// match: (MNEGW x (MOVDconst [c]))
  8134  	// cond: isPowerOfTwo(c)
  8135  	// result: (NEG (SLLconst <x.Type> [log64(c)] x))
  8136  	for {
  8137  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8138  			x := v_0
  8139  			if v_1.Op != OpARM64MOVDconst {
  8140  				continue
  8141  			}
  8142  			c := auxIntToInt64(v_1.AuxInt)
  8143  			if !(isPowerOfTwo(c)) {
  8144  				continue
  8145  			}
  8146  			v.reset(OpARM64NEG)
  8147  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8148  			v0.AuxInt = int64ToAuxInt(log64(c))
  8149  			v0.AddArg(x)
  8150  			v.AddArg(v0)
  8151  			return true
  8152  		}
  8153  		break
  8154  	}
  8155  	// match: (MNEGW x (MOVDconst [c]))
  8156  	// cond: isPowerOfTwo(c-1) && int32(c) >= 3
  8157  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> x x [log64(c-1)])))
  8158  	for {
  8159  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8160  			x := v_0
  8161  			if v_1.Op != OpARM64MOVDconst {
  8162  				continue
  8163  			}
  8164  			c := auxIntToInt64(v_1.AuxInt)
  8165  			if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
  8166  				continue
  8167  			}
  8168  			v.reset(OpARM64MOVWUreg)
  8169  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8170  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8171  			v1.AuxInt = int64ToAuxInt(log64(c - 1))
  8172  			v1.AddArg2(x, x)
  8173  			v0.AddArg(v1)
  8174  			v.AddArg(v0)
  8175  			return true
  8176  		}
  8177  		break
  8178  	}
  8179  	// match: (MNEGW x (MOVDconst [c]))
  8180  	// cond: isPowerOfTwo(c+1) && int32(c) >= 7
  8181  	// result: (MOVWUreg (NEG <x.Type> (ADDshiftLL <x.Type> (NEG <x.Type> x) x [log64(c+1)])))
  8182  	for {
  8183  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8184  			x := v_0
  8185  			if v_1.Op != OpARM64MOVDconst {
  8186  				continue
  8187  			}
  8188  			c := auxIntToInt64(v_1.AuxInt)
  8189  			if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
  8190  				continue
  8191  			}
  8192  			v.reset(OpARM64MOVWUreg)
  8193  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8194  			v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8195  			v1.AuxInt = int64ToAuxInt(log64(c + 1))
  8196  			v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8197  			v2.AddArg(x)
  8198  			v1.AddArg2(v2, x)
  8199  			v0.AddArg(v1)
  8200  			v.AddArg(v0)
  8201  			return true
  8202  		}
  8203  		break
  8204  	}
  8205  	// match: (MNEGW x (MOVDconst [c]))
  8206  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
  8207  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/3)] (SUBshiftLL <x.Type> x x [2])))
  8208  	for {
  8209  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8210  			x := v_0
  8211  			if v_1.Op != OpARM64MOVDconst {
  8212  				continue
  8213  			}
  8214  			c := auxIntToInt64(v_1.AuxInt)
  8215  			if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
  8216  				continue
  8217  			}
  8218  			v.reset(OpARM64MOVWUreg)
  8219  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8220  			v0.AuxInt = int64ToAuxInt(log64(c / 3))
  8221  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8222  			v1.AuxInt = int64ToAuxInt(2)
  8223  			v1.AddArg2(x, x)
  8224  			v0.AddArg(v1)
  8225  			v.AddArg(v0)
  8226  			return true
  8227  		}
  8228  		break
  8229  	}
  8230  	// match: (MNEGW x (MOVDconst [c]))
  8231  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
  8232  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/5)] (ADDshiftLL <x.Type> x x [2]))))
  8233  	for {
  8234  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8235  			x := v_0
  8236  			if v_1.Op != OpARM64MOVDconst {
  8237  				continue
  8238  			}
  8239  			c := auxIntToInt64(v_1.AuxInt)
  8240  			if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
  8241  				continue
  8242  			}
  8243  			v.reset(OpARM64MOVWUreg)
  8244  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8245  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8246  			v1.AuxInt = int64ToAuxInt(log64(c / 5))
  8247  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8248  			v2.AuxInt = int64ToAuxInt(2)
  8249  			v2.AddArg2(x, x)
  8250  			v1.AddArg(v2)
  8251  			v0.AddArg(v1)
  8252  			v.AddArg(v0)
  8253  			return true
  8254  		}
  8255  		break
  8256  	}
  8257  	// match: (MNEGW x (MOVDconst [c]))
  8258  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
  8259  	// result: (MOVWUreg (SLLconst <x.Type> [log64(c/7)] (SUBshiftLL <x.Type> x x [3])))
  8260  	for {
  8261  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8262  			x := v_0
  8263  			if v_1.Op != OpARM64MOVDconst {
  8264  				continue
  8265  			}
  8266  			c := auxIntToInt64(v_1.AuxInt)
  8267  			if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
  8268  				continue
  8269  			}
  8270  			v.reset(OpARM64MOVWUreg)
  8271  			v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8272  			v0.AuxInt = int64ToAuxInt(log64(c / 7))
  8273  			v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
  8274  			v1.AuxInt = int64ToAuxInt(3)
  8275  			v1.AddArg2(x, x)
  8276  			v0.AddArg(v1)
  8277  			v.AddArg(v0)
  8278  			return true
  8279  		}
  8280  		break
  8281  	}
  8282  	// match: (MNEGW x (MOVDconst [c]))
  8283  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
  8284  	// result: (MOVWUreg (NEG <x.Type> (SLLconst <x.Type> [log64(c/9)] (ADDshiftLL <x.Type> x x [3]))))
  8285  	for {
  8286  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8287  			x := v_0
  8288  			if v_1.Op != OpARM64MOVDconst {
  8289  				continue
  8290  			}
  8291  			c := auxIntToInt64(v_1.AuxInt)
  8292  			if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
  8293  				continue
  8294  			}
  8295  			v.reset(OpARM64MOVWUreg)
  8296  			v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
  8297  			v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
  8298  			v1.AuxInt = int64ToAuxInt(log64(c / 9))
  8299  			v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
  8300  			v2.AuxInt = int64ToAuxInt(3)
  8301  			v2.AddArg2(x, x)
  8302  			v1.AddArg(v2)
  8303  			v0.AddArg(v1)
  8304  			v.AddArg(v0)
  8305  			return true
  8306  		}
  8307  		break
  8308  	}
  8309  	// match: (MNEGW (MOVDconst [c]) (MOVDconst [d]))
  8310  	// result: (MOVDconst [int64(uint32(-c*d))])
  8311  	for {
  8312  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8313  			if v_0.Op != OpARM64MOVDconst {
  8314  				continue
  8315  			}
  8316  			c := auxIntToInt64(v_0.AuxInt)
  8317  			if v_1.Op != OpARM64MOVDconst {
  8318  				continue
  8319  			}
  8320  			d := auxIntToInt64(v_1.AuxInt)
  8321  			v.reset(OpARM64MOVDconst)
  8322  			v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
  8323  			return true
  8324  		}
  8325  		break
  8326  	}
  8327  	return false
  8328  }
  8329  func rewriteValueARM64_OpARM64MOD(v *Value) bool {
  8330  	v_1 := v.Args[1]
  8331  	v_0 := v.Args[0]
  8332  	// match: (MOD (MOVDconst [c]) (MOVDconst [d]))
  8333  	// cond: d != 0
  8334  	// result: (MOVDconst [c%d])
  8335  	for {
  8336  		if v_0.Op != OpARM64MOVDconst {
  8337  			break
  8338  		}
  8339  		c := auxIntToInt64(v_0.AuxInt)
  8340  		if v_1.Op != OpARM64MOVDconst {
  8341  			break
  8342  		}
  8343  		d := auxIntToInt64(v_1.AuxInt)
  8344  		if !(d != 0) {
  8345  			break
  8346  		}
  8347  		v.reset(OpARM64MOVDconst)
  8348  		v.AuxInt = int64ToAuxInt(c % d)
  8349  		return true
  8350  	}
  8351  	return false
  8352  }
  8353  func rewriteValueARM64_OpARM64MODW(v *Value) bool {
  8354  	v_1 := v.Args[1]
  8355  	v_0 := v.Args[0]
  8356  	// match: (MODW (MOVDconst [c]) (MOVDconst [d]))
  8357  	// cond: d != 0
  8358  	// result: (MOVDconst [int64(uint32(int32(c)%int32(d)))])
  8359  	for {
  8360  		if v_0.Op != OpARM64MOVDconst {
  8361  			break
  8362  		}
  8363  		c := auxIntToInt64(v_0.AuxInt)
  8364  		if v_1.Op != OpARM64MOVDconst {
  8365  			break
  8366  		}
  8367  		d := auxIntToInt64(v_1.AuxInt)
  8368  		if !(d != 0) {
  8369  			break
  8370  		}
  8371  		v.reset(OpARM64MOVDconst)
  8372  		v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
  8373  		return true
  8374  	}
  8375  	return false
  8376  }
  8377  func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
  8378  	v_1 := v.Args[1]
  8379  	v_0 := v.Args[0]
  8380  	b := v.Block
  8381  	config := b.Func.Config
  8382  	// match: (MOVBUload [off1] {sym} (ADDconst [off2] ptr) mem)
  8383  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8384  	// result: (MOVBUload [off1+int32(off2)] {sym} ptr mem)
  8385  	for {
  8386  		off1 := auxIntToInt32(v.AuxInt)
  8387  		sym := auxToSym(v.Aux)
  8388  		if v_0.Op != OpARM64ADDconst {
  8389  			break
  8390  		}
  8391  		off2 := auxIntToInt64(v_0.AuxInt)
  8392  		ptr := v_0.Args[0]
  8393  		mem := v_1
  8394  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8395  			break
  8396  		}
  8397  		v.reset(OpARM64MOVBUload)
  8398  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8399  		v.Aux = symToAux(sym)
  8400  		v.AddArg2(ptr, mem)
  8401  		return true
  8402  	}
  8403  	// match: (MOVBUload [off] {sym} (ADD ptr idx) mem)
  8404  	// cond: off == 0 && sym == nil
  8405  	// result: (MOVBUloadidx ptr idx mem)
  8406  	for {
  8407  		off := auxIntToInt32(v.AuxInt)
  8408  		sym := auxToSym(v.Aux)
  8409  		if v_0.Op != OpARM64ADD {
  8410  			break
  8411  		}
  8412  		idx := v_0.Args[1]
  8413  		ptr := v_0.Args[0]
  8414  		mem := v_1
  8415  		if !(off == 0 && sym == nil) {
  8416  			break
  8417  		}
  8418  		v.reset(OpARM64MOVBUloadidx)
  8419  		v.AddArg3(ptr, idx, mem)
  8420  		return true
  8421  	}
  8422  	// match: (MOVBUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8423  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8424  	// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8425  	for {
  8426  		off1 := auxIntToInt32(v.AuxInt)
  8427  		sym1 := auxToSym(v.Aux)
  8428  		if v_0.Op != OpARM64MOVDaddr {
  8429  			break
  8430  		}
  8431  		off2 := auxIntToInt32(v_0.AuxInt)
  8432  		sym2 := auxToSym(v_0.Aux)
  8433  		ptr := v_0.Args[0]
  8434  		mem := v_1
  8435  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8436  			break
  8437  		}
  8438  		v.reset(OpARM64MOVBUload)
  8439  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8440  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8441  		v.AddArg2(ptr, mem)
  8442  		return true
  8443  	}
  8444  	// match: (MOVBUload [off] {sym} (SB) _)
  8445  	// cond: symIsRO(sym)
  8446  	// result: (MOVDconst [int64(read8(sym, int64(off)))])
  8447  	for {
  8448  		off := auxIntToInt32(v.AuxInt)
  8449  		sym := auxToSym(v.Aux)
  8450  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8451  			break
  8452  		}
  8453  		v.reset(OpARM64MOVDconst)
  8454  		v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
  8455  		return true
  8456  	}
  8457  	return false
  8458  }
  8459  func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
  8460  	v_2 := v.Args[2]
  8461  	v_1 := v.Args[1]
  8462  	v_0 := v.Args[0]
  8463  	// match: (MOVBUloadidx ptr (MOVDconst [c]) mem)
  8464  	// cond: is32Bit(c)
  8465  	// result: (MOVBUload [int32(c)] ptr mem)
  8466  	for {
  8467  		ptr := v_0
  8468  		if v_1.Op != OpARM64MOVDconst {
  8469  			break
  8470  		}
  8471  		c := auxIntToInt64(v_1.AuxInt)
  8472  		mem := v_2
  8473  		if !(is32Bit(c)) {
  8474  			break
  8475  		}
  8476  		v.reset(OpARM64MOVBUload)
  8477  		v.AuxInt = int32ToAuxInt(int32(c))
  8478  		v.AddArg2(ptr, mem)
  8479  		return true
  8480  	}
  8481  	// match: (MOVBUloadidx (MOVDconst [c]) ptr mem)
  8482  	// cond: is32Bit(c)
  8483  	// result: (MOVBUload [int32(c)] ptr mem)
  8484  	for {
  8485  		if v_0.Op != OpARM64MOVDconst {
  8486  			break
  8487  		}
  8488  		c := auxIntToInt64(v_0.AuxInt)
  8489  		ptr := v_1
  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  	return false
  8500  }
  8501  func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
  8502  	v_0 := v.Args[0]
  8503  	// match: (MOVBUreg (ANDconst [c] x))
  8504  	// result: (ANDconst [c&(1<<8-1)] x)
  8505  	for {
  8506  		if v_0.Op != OpARM64ANDconst {
  8507  			break
  8508  		}
  8509  		c := auxIntToInt64(v_0.AuxInt)
  8510  		x := v_0.Args[0]
  8511  		v.reset(OpARM64ANDconst)
  8512  		v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
  8513  		v.AddArg(x)
  8514  		return true
  8515  	}
  8516  	// match: (MOVBUreg (MOVDconst [c]))
  8517  	// result: (MOVDconst [int64(uint8(c))])
  8518  	for {
  8519  		if v_0.Op != OpARM64MOVDconst {
  8520  			break
  8521  		}
  8522  		c := auxIntToInt64(v_0.AuxInt)
  8523  		v.reset(OpARM64MOVDconst)
  8524  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8525  		return true
  8526  	}
  8527  	// match: (MOVBUreg x)
  8528  	// cond: v.Type.Size() <= 1
  8529  	// result: x
  8530  	for {
  8531  		x := v_0
  8532  		if !(v.Type.Size() <= 1) {
  8533  			break
  8534  		}
  8535  		v.copyOf(x)
  8536  		return true
  8537  	}
  8538  	// match: (MOVBUreg (SLLconst [lc] x))
  8539  	// cond: lc >= 8
  8540  	// result: (MOVDconst [0])
  8541  	for {
  8542  		if v_0.Op != OpARM64SLLconst {
  8543  			break
  8544  		}
  8545  		lc := auxIntToInt64(v_0.AuxInt)
  8546  		if !(lc >= 8) {
  8547  			break
  8548  		}
  8549  		v.reset(OpARM64MOVDconst)
  8550  		v.AuxInt = int64ToAuxInt(0)
  8551  		return true
  8552  	}
  8553  	// match: (MOVBUreg (SLLconst [lc] x))
  8554  	// cond: lc < 8
  8555  	// result: (UBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8556  	for {
  8557  		if v_0.Op != OpARM64SLLconst {
  8558  			break
  8559  		}
  8560  		lc := auxIntToInt64(v_0.AuxInt)
  8561  		x := v_0.Args[0]
  8562  		if !(lc < 8) {
  8563  			break
  8564  		}
  8565  		v.reset(OpARM64UBFIZ)
  8566  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8567  		v.AddArg(x)
  8568  		return true
  8569  	}
  8570  	// match: (MOVBUreg (SRLconst [rc] x))
  8571  	// cond: rc < 8
  8572  	// result: (UBFX [armBFAuxInt(rc, 8)] x)
  8573  	for {
  8574  		if v_0.Op != OpARM64SRLconst {
  8575  			break
  8576  		}
  8577  		rc := auxIntToInt64(v_0.AuxInt)
  8578  		x := v_0.Args[0]
  8579  		if !(rc < 8) {
  8580  			break
  8581  		}
  8582  		v.reset(OpARM64UBFX)
  8583  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
  8584  		v.AddArg(x)
  8585  		return true
  8586  	}
  8587  	// match: (MOVBUreg (UBFX [bfc] x))
  8588  	// cond: bfc.width() <= 8
  8589  	// result: (UBFX [bfc] x)
  8590  	for {
  8591  		if v_0.Op != OpARM64UBFX {
  8592  			break
  8593  		}
  8594  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8595  		x := v_0.Args[0]
  8596  		if !(bfc.width() <= 8) {
  8597  			break
  8598  		}
  8599  		v.reset(OpARM64UBFX)
  8600  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8601  		v.AddArg(x)
  8602  		return true
  8603  	}
  8604  	return false
  8605  }
  8606  func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
  8607  	v_1 := v.Args[1]
  8608  	v_0 := v.Args[0]
  8609  	b := v.Block
  8610  	config := b.Func.Config
  8611  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8612  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8613  	// result: (MOVBload [off1+int32(off2)] {sym} ptr mem)
  8614  	for {
  8615  		off1 := auxIntToInt32(v.AuxInt)
  8616  		sym := auxToSym(v.Aux)
  8617  		if v_0.Op != OpARM64ADDconst {
  8618  			break
  8619  		}
  8620  		off2 := auxIntToInt64(v_0.AuxInt)
  8621  		ptr := v_0.Args[0]
  8622  		mem := v_1
  8623  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8624  			break
  8625  		}
  8626  		v.reset(OpARM64MOVBload)
  8627  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8628  		v.Aux = symToAux(sym)
  8629  		v.AddArg2(ptr, mem)
  8630  		return true
  8631  	}
  8632  	// match: (MOVBload [off] {sym} (ADD ptr idx) mem)
  8633  	// cond: off == 0 && sym == nil
  8634  	// result: (MOVBloadidx ptr idx mem)
  8635  	for {
  8636  		off := auxIntToInt32(v.AuxInt)
  8637  		sym := auxToSym(v.Aux)
  8638  		if v_0.Op != OpARM64ADD {
  8639  			break
  8640  		}
  8641  		idx := v_0.Args[1]
  8642  		ptr := v_0.Args[0]
  8643  		mem := v_1
  8644  		if !(off == 0 && sym == nil) {
  8645  			break
  8646  		}
  8647  		v.reset(OpARM64MOVBloadidx)
  8648  		v.AddArg3(ptr, idx, mem)
  8649  		return true
  8650  	}
  8651  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  8652  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8653  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8654  	for {
  8655  		off1 := auxIntToInt32(v.AuxInt)
  8656  		sym1 := auxToSym(v.Aux)
  8657  		if v_0.Op != OpARM64MOVDaddr {
  8658  			break
  8659  		}
  8660  		off2 := auxIntToInt32(v_0.AuxInt)
  8661  		sym2 := auxToSym(v_0.Aux)
  8662  		ptr := v_0.Args[0]
  8663  		mem := v_1
  8664  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8665  			break
  8666  		}
  8667  		v.reset(OpARM64MOVBload)
  8668  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8669  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8670  		v.AddArg2(ptr, mem)
  8671  		return true
  8672  	}
  8673  	// match: (MOVBload [off] {sym} (SB) _)
  8674  	// cond: symIsRO(sym)
  8675  	// result: (MOVDconst [int64(int8(read8(sym, int64(off))))])
  8676  	for {
  8677  		off := auxIntToInt32(v.AuxInt)
  8678  		sym := auxToSym(v.Aux)
  8679  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  8680  			break
  8681  		}
  8682  		v.reset(OpARM64MOVDconst)
  8683  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, int64(off)))))
  8684  		return true
  8685  	}
  8686  	return false
  8687  }
  8688  func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
  8689  	v_2 := v.Args[2]
  8690  	v_1 := v.Args[1]
  8691  	v_0 := v.Args[0]
  8692  	// match: (MOVBloadidx ptr (MOVDconst [c]) mem)
  8693  	// cond: is32Bit(c)
  8694  	// result: (MOVBload [int32(c)] ptr mem)
  8695  	for {
  8696  		ptr := v_0
  8697  		if v_1.Op != OpARM64MOVDconst {
  8698  			break
  8699  		}
  8700  		c := auxIntToInt64(v_1.AuxInt)
  8701  		mem := v_2
  8702  		if !(is32Bit(c)) {
  8703  			break
  8704  		}
  8705  		v.reset(OpARM64MOVBload)
  8706  		v.AuxInt = int32ToAuxInt(int32(c))
  8707  		v.AddArg2(ptr, mem)
  8708  		return true
  8709  	}
  8710  	// match: (MOVBloadidx (MOVDconst [c]) ptr mem)
  8711  	// cond: is32Bit(c)
  8712  	// result: (MOVBload [int32(c)] ptr mem)
  8713  	for {
  8714  		if v_0.Op != OpARM64MOVDconst {
  8715  			break
  8716  		}
  8717  		c := auxIntToInt64(v_0.AuxInt)
  8718  		ptr := v_1
  8719  		mem := v_2
  8720  		if !(is32Bit(c)) {
  8721  			break
  8722  		}
  8723  		v.reset(OpARM64MOVBload)
  8724  		v.AuxInt = int32ToAuxInt(int32(c))
  8725  		v.AddArg2(ptr, mem)
  8726  		return true
  8727  	}
  8728  	return false
  8729  }
  8730  func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
  8731  	v_0 := v.Args[0]
  8732  	// match: (MOVBreg (MOVDconst [c]))
  8733  	// result: (MOVDconst [int64(int8(c))])
  8734  	for {
  8735  		if v_0.Op != OpARM64MOVDconst {
  8736  			break
  8737  		}
  8738  		c := auxIntToInt64(v_0.AuxInt)
  8739  		v.reset(OpARM64MOVDconst)
  8740  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8741  		return true
  8742  	}
  8743  	// match: (MOVBreg x)
  8744  	// cond: v.Type.Size() <= 1
  8745  	// result: x
  8746  	for {
  8747  		x := v_0
  8748  		if !(v.Type.Size() <= 1) {
  8749  			break
  8750  		}
  8751  		v.copyOf(x)
  8752  		return true
  8753  	}
  8754  	// match: (MOVBreg <t> (ANDconst x [c]))
  8755  	// cond: uint64(c) & uint64(0xffffffffffffff80) == 0
  8756  	// result: (ANDconst <t> x [c])
  8757  	for {
  8758  		t := v.Type
  8759  		if v_0.Op != OpARM64ANDconst {
  8760  			break
  8761  		}
  8762  		c := auxIntToInt64(v_0.AuxInt)
  8763  		x := v_0.Args[0]
  8764  		if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
  8765  			break
  8766  		}
  8767  		v.reset(OpARM64ANDconst)
  8768  		v.Type = t
  8769  		v.AuxInt = int64ToAuxInt(c)
  8770  		v.AddArg(x)
  8771  		return true
  8772  	}
  8773  	// match: (MOVBreg (SLLconst [lc] x))
  8774  	// cond: lc < 8
  8775  	// result: (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
  8776  	for {
  8777  		if v_0.Op != OpARM64SLLconst {
  8778  			break
  8779  		}
  8780  		lc := auxIntToInt64(v_0.AuxInt)
  8781  		x := v_0.Args[0]
  8782  		if !(lc < 8) {
  8783  			break
  8784  		}
  8785  		v.reset(OpARM64SBFIZ)
  8786  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
  8787  		v.AddArg(x)
  8788  		return true
  8789  	}
  8790  	// match: (MOVBreg (SBFX [bfc] x))
  8791  	// cond: bfc.width() <= 8
  8792  	// result: (SBFX [bfc] x)
  8793  	for {
  8794  		if v_0.Op != OpARM64SBFX {
  8795  			break
  8796  		}
  8797  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  8798  		x := v_0.Args[0]
  8799  		if !(bfc.width() <= 8) {
  8800  			break
  8801  		}
  8802  		v.reset(OpARM64SBFX)
  8803  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  8804  		v.AddArg(x)
  8805  		return true
  8806  	}
  8807  	return false
  8808  }
  8809  func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
  8810  	v_2 := v.Args[2]
  8811  	v_1 := v.Args[1]
  8812  	v_0 := v.Args[0]
  8813  	b := v.Block
  8814  	config := b.Func.Config
  8815  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8816  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8817  	// result: (MOVBstore [off1+int32(off2)] {sym} ptr val mem)
  8818  	for {
  8819  		off1 := auxIntToInt32(v.AuxInt)
  8820  		sym := auxToSym(v.Aux)
  8821  		if v_0.Op != OpARM64ADDconst {
  8822  			break
  8823  		}
  8824  		off2 := auxIntToInt64(v_0.AuxInt)
  8825  		ptr := v_0.Args[0]
  8826  		val := v_1
  8827  		mem := v_2
  8828  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8829  			break
  8830  		}
  8831  		v.reset(OpARM64MOVBstore)
  8832  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8833  		v.Aux = symToAux(sym)
  8834  		v.AddArg3(ptr, val, mem)
  8835  		return true
  8836  	}
  8837  	// match: (MOVBstore [off] {sym} (ADD ptr idx) val mem)
  8838  	// cond: off == 0 && sym == nil
  8839  	// result: (MOVBstoreidx ptr idx val mem)
  8840  	for {
  8841  		off := auxIntToInt32(v.AuxInt)
  8842  		sym := auxToSym(v.Aux)
  8843  		if v_0.Op != OpARM64ADD {
  8844  			break
  8845  		}
  8846  		idx := v_0.Args[1]
  8847  		ptr := v_0.Args[0]
  8848  		val := v_1
  8849  		mem := v_2
  8850  		if !(off == 0 && sym == nil) {
  8851  			break
  8852  		}
  8853  		v.reset(OpARM64MOVBstoreidx)
  8854  		v.AddArg4(ptr, idx, val, mem)
  8855  		return true
  8856  	}
  8857  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  8858  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  8859  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8860  	for {
  8861  		off1 := auxIntToInt32(v.AuxInt)
  8862  		sym1 := auxToSym(v.Aux)
  8863  		if v_0.Op != OpARM64MOVDaddr {
  8864  			break
  8865  		}
  8866  		off2 := auxIntToInt32(v_0.AuxInt)
  8867  		sym2 := auxToSym(v_0.Aux)
  8868  		ptr := v_0.Args[0]
  8869  		val := v_1
  8870  		mem := v_2
  8871  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  8872  			break
  8873  		}
  8874  		v.reset(OpARM64MOVBstore)
  8875  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8876  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8877  		v.AddArg3(ptr, val, mem)
  8878  		return true
  8879  	}
  8880  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8881  	// result: (MOVBstore [off] {sym} ptr x mem)
  8882  	for {
  8883  		off := auxIntToInt32(v.AuxInt)
  8884  		sym := auxToSym(v.Aux)
  8885  		ptr := v_0
  8886  		if v_1.Op != OpARM64MOVBreg {
  8887  			break
  8888  		}
  8889  		x := v_1.Args[0]
  8890  		mem := v_2
  8891  		v.reset(OpARM64MOVBstore)
  8892  		v.AuxInt = int32ToAuxInt(off)
  8893  		v.Aux = symToAux(sym)
  8894  		v.AddArg3(ptr, x, mem)
  8895  		return true
  8896  	}
  8897  	// match: (MOVBstore [off] {sym} ptr (MOVBUreg x) mem)
  8898  	// result: (MOVBstore [off] {sym} ptr x mem)
  8899  	for {
  8900  		off := auxIntToInt32(v.AuxInt)
  8901  		sym := auxToSym(v.Aux)
  8902  		ptr := v_0
  8903  		if v_1.Op != OpARM64MOVBUreg {
  8904  			break
  8905  		}
  8906  		x := v_1.Args[0]
  8907  		mem := v_2
  8908  		v.reset(OpARM64MOVBstore)
  8909  		v.AuxInt = int32ToAuxInt(off)
  8910  		v.Aux = symToAux(sym)
  8911  		v.AddArg3(ptr, x, mem)
  8912  		return true
  8913  	}
  8914  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  8915  	// result: (MOVBstore [off] {sym} ptr x mem)
  8916  	for {
  8917  		off := auxIntToInt32(v.AuxInt)
  8918  		sym := auxToSym(v.Aux)
  8919  		ptr := v_0
  8920  		if v_1.Op != OpARM64MOVHreg {
  8921  			break
  8922  		}
  8923  		x := v_1.Args[0]
  8924  		mem := v_2
  8925  		v.reset(OpARM64MOVBstore)
  8926  		v.AuxInt = int32ToAuxInt(off)
  8927  		v.Aux = symToAux(sym)
  8928  		v.AddArg3(ptr, x, mem)
  8929  		return true
  8930  	}
  8931  	// match: (MOVBstore [off] {sym} ptr (MOVHUreg x) mem)
  8932  	// result: (MOVBstore [off] {sym} ptr x mem)
  8933  	for {
  8934  		off := auxIntToInt32(v.AuxInt)
  8935  		sym := auxToSym(v.Aux)
  8936  		ptr := v_0
  8937  		if v_1.Op != OpARM64MOVHUreg {
  8938  			break
  8939  		}
  8940  		x := v_1.Args[0]
  8941  		mem := v_2
  8942  		v.reset(OpARM64MOVBstore)
  8943  		v.AuxInt = int32ToAuxInt(off)
  8944  		v.Aux = symToAux(sym)
  8945  		v.AddArg3(ptr, x, mem)
  8946  		return true
  8947  	}
  8948  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  8949  	// result: (MOVBstore [off] {sym} ptr x mem)
  8950  	for {
  8951  		off := auxIntToInt32(v.AuxInt)
  8952  		sym := auxToSym(v.Aux)
  8953  		ptr := v_0
  8954  		if v_1.Op != OpARM64MOVWreg {
  8955  			break
  8956  		}
  8957  		x := v_1.Args[0]
  8958  		mem := v_2
  8959  		v.reset(OpARM64MOVBstore)
  8960  		v.AuxInt = int32ToAuxInt(off)
  8961  		v.Aux = symToAux(sym)
  8962  		v.AddArg3(ptr, x, mem)
  8963  		return true
  8964  	}
  8965  	// match: (MOVBstore [off] {sym} ptr (MOVWUreg x) mem)
  8966  	// result: (MOVBstore [off] {sym} ptr x mem)
  8967  	for {
  8968  		off := auxIntToInt32(v.AuxInt)
  8969  		sym := auxToSym(v.Aux)
  8970  		ptr := v_0
  8971  		if v_1.Op != OpARM64MOVWUreg {
  8972  			break
  8973  		}
  8974  		x := v_1.Args[0]
  8975  		mem := v_2
  8976  		v.reset(OpARM64MOVBstore)
  8977  		v.AuxInt = int32ToAuxInt(off)
  8978  		v.Aux = symToAux(sym)
  8979  		v.AddArg3(ptr, x, mem)
  8980  		return true
  8981  	}
  8982  	return false
  8983  }
  8984  func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
  8985  	v_3 := v.Args[3]
  8986  	v_2 := v.Args[2]
  8987  	v_1 := v.Args[1]
  8988  	v_0 := v.Args[0]
  8989  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  8990  	// cond: is32Bit(c)
  8991  	// result: (MOVBstore [int32(c)] ptr val mem)
  8992  	for {
  8993  		ptr := v_0
  8994  		if v_1.Op != OpARM64MOVDconst {
  8995  			break
  8996  		}
  8997  		c := auxIntToInt64(v_1.AuxInt)
  8998  		val := v_2
  8999  		mem := v_3
  9000  		if !(is32Bit(c)) {
  9001  			break
  9002  		}
  9003  		v.reset(OpARM64MOVBstore)
  9004  		v.AuxInt = int32ToAuxInt(int32(c))
  9005  		v.AddArg3(ptr, val, mem)
  9006  		return true
  9007  	}
  9008  	// match: (MOVBstoreidx (MOVDconst [c]) idx val mem)
  9009  	// cond: is32Bit(c)
  9010  	// result: (MOVBstore [int32(c)] idx val mem)
  9011  	for {
  9012  		if v_0.Op != OpARM64MOVDconst {
  9013  			break
  9014  		}
  9015  		c := auxIntToInt64(v_0.AuxInt)
  9016  		idx := v_1
  9017  		val := v_2
  9018  		mem := v_3
  9019  		if !(is32Bit(c)) {
  9020  			break
  9021  		}
  9022  		v.reset(OpARM64MOVBstore)
  9023  		v.AuxInt = int32ToAuxInt(int32(c))
  9024  		v.AddArg3(idx, val, mem)
  9025  		return true
  9026  	}
  9027  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
  9028  	// result: (MOVBstoreidx ptr idx x mem)
  9029  	for {
  9030  		ptr := v_0
  9031  		idx := v_1
  9032  		if v_2.Op != OpARM64MOVBreg {
  9033  			break
  9034  		}
  9035  		x := v_2.Args[0]
  9036  		mem := v_3
  9037  		v.reset(OpARM64MOVBstoreidx)
  9038  		v.AddArg4(ptr, idx, x, mem)
  9039  		return true
  9040  	}
  9041  	// match: (MOVBstoreidx ptr idx (MOVBUreg x) mem)
  9042  	// result: (MOVBstoreidx ptr idx x mem)
  9043  	for {
  9044  		ptr := v_0
  9045  		idx := v_1
  9046  		if v_2.Op != OpARM64MOVBUreg {
  9047  			break
  9048  		}
  9049  		x := v_2.Args[0]
  9050  		mem := v_3
  9051  		v.reset(OpARM64MOVBstoreidx)
  9052  		v.AddArg4(ptr, idx, x, mem)
  9053  		return true
  9054  	}
  9055  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
  9056  	// result: (MOVBstoreidx ptr idx x mem)
  9057  	for {
  9058  		ptr := v_0
  9059  		idx := v_1
  9060  		if v_2.Op != OpARM64MOVHreg {
  9061  			break
  9062  		}
  9063  		x := v_2.Args[0]
  9064  		mem := v_3
  9065  		v.reset(OpARM64MOVBstoreidx)
  9066  		v.AddArg4(ptr, idx, x, mem)
  9067  		return true
  9068  	}
  9069  	// match: (MOVBstoreidx ptr idx (MOVHUreg x) mem)
  9070  	// result: (MOVBstoreidx ptr idx x mem)
  9071  	for {
  9072  		ptr := v_0
  9073  		idx := v_1
  9074  		if v_2.Op != OpARM64MOVHUreg {
  9075  			break
  9076  		}
  9077  		x := v_2.Args[0]
  9078  		mem := v_3
  9079  		v.reset(OpARM64MOVBstoreidx)
  9080  		v.AddArg4(ptr, idx, x, mem)
  9081  		return true
  9082  	}
  9083  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
  9084  	// result: (MOVBstoreidx ptr idx x mem)
  9085  	for {
  9086  		ptr := v_0
  9087  		idx := v_1
  9088  		if v_2.Op != OpARM64MOVWreg {
  9089  			break
  9090  		}
  9091  		x := v_2.Args[0]
  9092  		mem := v_3
  9093  		v.reset(OpARM64MOVBstoreidx)
  9094  		v.AddArg4(ptr, idx, x, mem)
  9095  		return true
  9096  	}
  9097  	// match: (MOVBstoreidx ptr idx (MOVWUreg x) mem)
  9098  	// result: (MOVBstoreidx ptr idx x mem)
  9099  	for {
  9100  		ptr := v_0
  9101  		idx := v_1
  9102  		if v_2.Op != OpARM64MOVWUreg {
  9103  			break
  9104  		}
  9105  		x := v_2.Args[0]
  9106  		mem := v_3
  9107  		v.reset(OpARM64MOVBstoreidx)
  9108  		v.AddArg4(ptr, idx, x, mem)
  9109  		return true
  9110  	}
  9111  	return false
  9112  }
  9113  func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
  9114  	v_1 := v.Args[1]
  9115  	v_0 := v.Args[0]
  9116  	b := v.Block
  9117  	config := b.Func.Config
  9118  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr val _))
  9119  	// result: (FMOVDfpgp val)
  9120  	for {
  9121  		off := auxIntToInt32(v.AuxInt)
  9122  		sym := auxToSym(v.Aux)
  9123  		ptr := v_0
  9124  		if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9125  			break
  9126  		}
  9127  		val := v_1.Args[1]
  9128  		if ptr != v_1.Args[0] {
  9129  			break
  9130  		}
  9131  		v.reset(OpARM64FMOVDfpgp)
  9132  		v.AddArg(val)
  9133  		return true
  9134  	}
  9135  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9136  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9137  	// result: (MOVDload [off1+int32(off2)] {sym} ptr mem)
  9138  	for {
  9139  		off1 := auxIntToInt32(v.AuxInt)
  9140  		sym := auxToSym(v.Aux)
  9141  		if v_0.Op != OpARM64ADDconst {
  9142  			break
  9143  		}
  9144  		off2 := auxIntToInt64(v_0.AuxInt)
  9145  		ptr := v_0.Args[0]
  9146  		mem := v_1
  9147  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9148  			break
  9149  		}
  9150  		v.reset(OpARM64MOVDload)
  9151  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9152  		v.Aux = symToAux(sym)
  9153  		v.AddArg2(ptr, mem)
  9154  		return true
  9155  	}
  9156  	// match: (MOVDload [off] {sym} (ADD ptr idx) mem)
  9157  	// cond: off == 0 && sym == nil
  9158  	// result: (MOVDloadidx ptr idx mem)
  9159  	for {
  9160  		off := auxIntToInt32(v.AuxInt)
  9161  		sym := auxToSym(v.Aux)
  9162  		if v_0.Op != OpARM64ADD {
  9163  			break
  9164  		}
  9165  		idx := v_0.Args[1]
  9166  		ptr := v_0.Args[0]
  9167  		mem := v_1
  9168  		if !(off == 0 && sym == nil) {
  9169  			break
  9170  		}
  9171  		v.reset(OpARM64MOVDloadidx)
  9172  		v.AddArg3(ptr, idx, mem)
  9173  		return true
  9174  	}
  9175  	// match: (MOVDload [off] {sym} (ADDshiftLL [3] ptr idx) mem)
  9176  	// cond: off == 0 && sym == nil
  9177  	// result: (MOVDloadidx8 ptr idx mem)
  9178  	for {
  9179  		off := auxIntToInt32(v.AuxInt)
  9180  		sym := auxToSym(v.Aux)
  9181  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9182  			break
  9183  		}
  9184  		idx := v_0.Args[1]
  9185  		ptr := v_0.Args[0]
  9186  		mem := v_1
  9187  		if !(off == 0 && sym == nil) {
  9188  			break
  9189  		}
  9190  		v.reset(OpARM64MOVDloadidx8)
  9191  		v.AddArg3(ptr, idx, mem)
  9192  		return true
  9193  	}
  9194  	// match: (MOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9195  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9196  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9197  	for {
  9198  		off1 := auxIntToInt32(v.AuxInt)
  9199  		sym1 := auxToSym(v.Aux)
  9200  		if v_0.Op != OpARM64MOVDaddr {
  9201  			break
  9202  		}
  9203  		off2 := auxIntToInt32(v_0.AuxInt)
  9204  		sym2 := auxToSym(v_0.Aux)
  9205  		ptr := v_0.Args[0]
  9206  		mem := v_1
  9207  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9208  			break
  9209  		}
  9210  		v.reset(OpARM64MOVDload)
  9211  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9212  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9213  		v.AddArg2(ptr, mem)
  9214  		return true
  9215  	}
  9216  	// match: (MOVDload [off] {sym} (SB) _)
  9217  	// cond: symIsRO(sym)
  9218  	// result: (MOVDconst [int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9219  	for {
  9220  		off := auxIntToInt32(v.AuxInt)
  9221  		sym := auxToSym(v.Aux)
  9222  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9223  			break
  9224  		}
  9225  		v.reset(OpARM64MOVDconst)
  9226  		v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9227  		return true
  9228  	}
  9229  	return false
  9230  }
  9231  func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
  9232  	v_2 := v.Args[2]
  9233  	v_1 := v.Args[1]
  9234  	v_0 := v.Args[0]
  9235  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  9236  	// cond: is32Bit(c)
  9237  	// result: (MOVDload [int32(c)] ptr mem)
  9238  	for {
  9239  		ptr := v_0
  9240  		if v_1.Op != OpARM64MOVDconst {
  9241  			break
  9242  		}
  9243  		c := auxIntToInt64(v_1.AuxInt)
  9244  		mem := v_2
  9245  		if !(is32Bit(c)) {
  9246  			break
  9247  		}
  9248  		v.reset(OpARM64MOVDload)
  9249  		v.AuxInt = int32ToAuxInt(int32(c))
  9250  		v.AddArg2(ptr, mem)
  9251  		return true
  9252  	}
  9253  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  9254  	// cond: is32Bit(c)
  9255  	// result: (MOVDload [int32(c)] ptr mem)
  9256  	for {
  9257  		if v_0.Op != OpARM64MOVDconst {
  9258  			break
  9259  		}
  9260  		c := auxIntToInt64(v_0.AuxInt)
  9261  		ptr := v_1
  9262  		mem := v_2
  9263  		if !(is32Bit(c)) {
  9264  			break
  9265  		}
  9266  		v.reset(OpARM64MOVDload)
  9267  		v.AuxInt = int32ToAuxInt(int32(c))
  9268  		v.AddArg2(ptr, mem)
  9269  		return true
  9270  	}
  9271  	// match: (MOVDloadidx ptr (SLLconst [3] idx) mem)
  9272  	// result: (MOVDloadidx8 ptr idx mem)
  9273  	for {
  9274  		ptr := v_0
  9275  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9276  			break
  9277  		}
  9278  		idx := v_1.Args[0]
  9279  		mem := v_2
  9280  		v.reset(OpARM64MOVDloadidx8)
  9281  		v.AddArg3(ptr, idx, mem)
  9282  		return true
  9283  	}
  9284  	// match: (MOVDloadidx (SLLconst [3] idx) ptr mem)
  9285  	// result: (MOVDloadidx8 ptr idx mem)
  9286  	for {
  9287  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9288  			break
  9289  		}
  9290  		idx := v_0.Args[0]
  9291  		ptr := v_1
  9292  		mem := v_2
  9293  		v.reset(OpARM64MOVDloadidx8)
  9294  		v.AddArg3(ptr, idx, mem)
  9295  		return true
  9296  	}
  9297  	return false
  9298  }
  9299  func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
  9300  	v_2 := v.Args[2]
  9301  	v_1 := v.Args[1]
  9302  	v_0 := v.Args[0]
  9303  	// match: (MOVDloadidx8 ptr (MOVDconst [c]) mem)
  9304  	// cond: is32Bit(c<<3)
  9305  	// result: (MOVDload [int32(c)<<3] ptr mem)
  9306  	for {
  9307  		ptr := v_0
  9308  		if v_1.Op != OpARM64MOVDconst {
  9309  			break
  9310  		}
  9311  		c := auxIntToInt64(v_1.AuxInt)
  9312  		mem := v_2
  9313  		if !(is32Bit(c << 3)) {
  9314  			break
  9315  		}
  9316  		v.reset(OpARM64MOVDload)
  9317  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9318  		v.AddArg2(ptr, mem)
  9319  		return true
  9320  	}
  9321  	return false
  9322  }
  9323  func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
  9324  	v_0 := v.Args[0]
  9325  	// match: (MOVDnop (MOVDconst [c]))
  9326  	// result: (MOVDconst [c])
  9327  	for {
  9328  		if v_0.Op != OpARM64MOVDconst {
  9329  			break
  9330  		}
  9331  		c := auxIntToInt64(v_0.AuxInt)
  9332  		v.reset(OpARM64MOVDconst)
  9333  		v.AuxInt = int64ToAuxInt(c)
  9334  		return true
  9335  	}
  9336  	return false
  9337  }
  9338  func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
  9339  	v_0 := v.Args[0]
  9340  	// match: (MOVDreg x)
  9341  	// cond: x.Uses == 1
  9342  	// result: (MOVDnop x)
  9343  	for {
  9344  		x := v_0
  9345  		if !(x.Uses == 1) {
  9346  			break
  9347  		}
  9348  		v.reset(OpARM64MOVDnop)
  9349  		v.AddArg(x)
  9350  		return true
  9351  	}
  9352  	// match: (MOVDreg (MOVDconst [c]))
  9353  	// result: (MOVDconst [c])
  9354  	for {
  9355  		if v_0.Op != OpARM64MOVDconst {
  9356  			break
  9357  		}
  9358  		c := auxIntToInt64(v_0.AuxInt)
  9359  		v.reset(OpARM64MOVDconst)
  9360  		v.AuxInt = int64ToAuxInt(c)
  9361  		return true
  9362  	}
  9363  	return false
  9364  }
  9365  func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
  9366  	v_2 := v.Args[2]
  9367  	v_1 := v.Args[1]
  9368  	v_0 := v.Args[0]
  9369  	b := v.Block
  9370  	config := b.Func.Config
  9371  	// match: (MOVDstore [off] {sym} ptr (FMOVDfpgp val) mem)
  9372  	// result: (FMOVDstore [off] {sym} ptr val mem)
  9373  	for {
  9374  		off := auxIntToInt32(v.AuxInt)
  9375  		sym := auxToSym(v.Aux)
  9376  		ptr := v_0
  9377  		if v_1.Op != OpARM64FMOVDfpgp {
  9378  			break
  9379  		}
  9380  		val := v_1.Args[0]
  9381  		mem := v_2
  9382  		v.reset(OpARM64FMOVDstore)
  9383  		v.AuxInt = int32ToAuxInt(off)
  9384  		v.Aux = symToAux(sym)
  9385  		v.AddArg3(ptr, val, mem)
  9386  		return true
  9387  	}
  9388  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9389  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9390  	// result: (MOVDstore [off1+int32(off2)] {sym} ptr val mem)
  9391  	for {
  9392  		off1 := auxIntToInt32(v.AuxInt)
  9393  		sym := auxToSym(v.Aux)
  9394  		if v_0.Op != OpARM64ADDconst {
  9395  			break
  9396  		}
  9397  		off2 := auxIntToInt64(v_0.AuxInt)
  9398  		ptr := v_0.Args[0]
  9399  		val := v_1
  9400  		mem := v_2
  9401  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9402  			break
  9403  		}
  9404  		v.reset(OpARM64MOVDstore)
  9405  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9406  		v.Aux = symToAux(sym)
  9407  		v.AddArg3(ptr, val, mem)
  9408  		return true
  9409  	}
  9410  	// match: (MOVDstore [off] {sym} (ADD ptr idx) val mem)
  9411  	// cond: off == 0 && sym == nil
  9412  	// result: (MOVDstoreidx ptr idx val mem)
  9413  	for {
  9414  		off := auxIntToInt32(v.AuxInt)
  9415  		sym := auxToSym(v.Aux)
  9416  		if v_0.Op != OpARM64ADD {
  9417  			break
  9418  		}
  9419  		idx := v_0.Args[1]
  9420  		ptr := v_0.Args[0]
  9421  		val := v_1
  9422  		mem := v_2
  9423  		if !(off == 0 && sym == nil) {
  9424  			break
  9425  		}
  9426  		v.reset(OpARM64MOVDstoreidx)
  9427  		v.AddArg4(ptr, idx, val, mem)
  9428  		return true
  9429  	}
  9430  	// match: (MOVDstore [off] {sym} (ADDshiftLL [3] ptr idx) val mem)
  9431  	// cond: off == 0 && sym == nil
  9432  	// result: (MOVDstoreidx8 ptr idx val mem)
  9433  	for {
  9434  		off := auxIntToInt32(v.AuxInt)
  9435  		sym := auxToSym(v.Aux)
  9436  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
  9437  			break
  9438  		}
  9439  		idx := v_0.Args[1]
  9440  		ptr := v_0.Args[0]
  9441  		val := v_1
  9442  		mem := v_2
  9443  		if !(off == 0 && sym == nil) {
  9444  			break
  9445  		}
  9446  		v.reset(OpARM64MOVDstoreidx8)
  9447  		v.AddArg4(ptr, idx, val, mem)
  9448  		return true
  9449  	}
  9450  	// match: (MOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
  9451  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9452  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9453  	for {
  9454  		off1 := auxIntToInt32(v.AuxInt)
  9455  		sym1 := auxToSym(v.Aux)
  9456  		if v_0.Op != OpARM64MOVDaddr {
  9457  			break
  9458  		}
  9459  		off2 := auxIntToInt32(v_0.AuxInt)
  9460  		sym2 := auxToSym(v_0.Aux)
  9461  		ptr := v_0.Args[0]
  9462  		val := v_1
  9463  		mem := v_2
  9464  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9465  			break
  9466  		}
  9467  		v.reset(OpARM64MOVDstore)
  9468  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9469  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9470  		v.AddArg3(ptr, val, mem)
  9471  		return true
  9472  	}
  9473  	return false
  9474  }
  9475  func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
  9476  	v_3 := v.Args[3]
  9477  	v_2 := v.Args[2]
  9478  	v_1 := v.Args[1]
  9479  	v_0 := v.Args[0]
  9480  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  9481  	// cond: is32Bit(c)
  9482  	// result: (MOVDstore [int32(c)] ptr val mem)
  9483  	for {
  9484  		ptr := v_0
  9485  		if v_1.Op != OpARM64MOVDconst {
  9486  			break
  9487  		}
  9488  		c := auxIntToInt64(v_1.AuxInt)
  9489  		val := v_2
  9490  		mem := v_3
  9491  		if !(is32Bit(c)) {
  9492  			break
  9493  		}
  9494  		v.reset(OpARM64MOVDstore)
  9495  		v.AuxInt = int32ToAuxInt(int32(c))
  9496  		v.AddArg3(ptr, val, mem)
  9497  		return true
  9498  	}
  9499  	// match: (MOVDstoreidx (MOVDconst [c]) idx val mem)
  9500  	// cond: is32Bit(c)
  9501  	// result: (MOVDstore [int32(c)] idx val mem)
  9502  	for {
  9503  		if v_0.Op != OpARM64MOVDconst {
  9504  			break
  9505  		}
  9506  		c := auxIntToInt64(v_0.AuxInt)
  9507  		idx := v_1
  9508  		val := v_2
  9509  		mem := v_3
  9510  		if !(is32Bit(c)) {
  9511  			break
  9512  		}
  9513  		v.reset(OpARM64MOVDstore)
  9514  		v.AuxInt = int32ToAuxInt(int32(c))
  9515  		v.AddArg3(idx, val, mem)
  9516  		return true
  9517  	}
  9518  	// match: (MOVDstoreidx ptr (SLLconst [3] idx) val mem)
  9519  	// result: (MOVDstoreidx8 ptr idx val mem)
  9520  	for {
  9521  		ptr := v_0
  9522  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
  9523  			break
  9524  		}
  9525  		idx := v_1.Args[0]
  9526  		val := v_2
  9527  		mem := v_3
  9528  		v.reset(OpARM64MOVDstoreidx8)
  9529  		v.AddArg4(ptr, idx, val, mem)
  9530  		return true
  9531  	}
  9532  	// match: (MOVDstoreidx (SLLconst [3] idx) ptr val mem)
  9533  	// result: (MOVDstoreidx8 ptr idx val mem)
  9534  	for {
  9535  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
  9536  			break
  9537  		}
  9538  		idx := v_0.Args[0]
  9539  		ptr := v_1
  9540  		val := v_2
  9541  		mem := v_3
  9542  		v.reset(OpARM64MOVDstoreidx8)
  9543  		v.AddArg4(ptr, idx, val, mem)
  9544  		return true
  9545  	}
  9546  	return false
  9547  }
  9548  func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
  9549  	v_3 := v.Args[3]
  9550  	v_2 := v.Args[2]
  9551  	v_1 := v.Args[1]
  9552  	v_0 := v.Args[0]
  9553  	// match: (MOVDstoreidx8 ptr (MOVDconst [c]) val mem)
  9554  	// cond: is32Bit(c<<3)
  9555  	// result: (MOVDstore [int32(c)<<3] ptr val mem)
  9556  	for {
  9557  		ptr := v_0
  9558  		if v_1.Op != OpARM64MOVDconst {
  9559  			break
  9560  		}
  9561  		c := auxIntToInt64(v_1.AuxInt)
  9562  		val := v_2
  9563  		mem := v_3
  9564  		if !(is32Bit(c << 3)) {
  9565  			break
  9566  		}
  9567  		v.reset(OpARM64MOVDstore)
  9568  		v.AuxInt = int32ToAuxInt(int32(c) << 3)
  9569  		v.AddArg3(ptr, val, mem)
  9570  		return true
  9571  	}
  9572  	return false
  9573  }
  9574  func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
  9575  	v_1 := v.Args[1]
  9576  	v_0 := v.Args[0]
  9577  	b := v.Block
  9578  	config := b.Func.Config
  9579  	// match: (MOVHUload [off1] {sym} (ADDconst [off2] ptr) mem)
  9580  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9581  	// result: (MOVHUload [off1+int32(off2)] {sym} ptr mem)
  9582  	for {
  9583  		off1 := auxIntToInt32(v.AuxInt)
  9584  		sym := auxToSym(v.Aux)
  9585  		if v_0.Op != OpARM64ADDconst {
  9586  			break
  9587  		}
  9588  		off2 := auxIntToInt64(v_0.AuxInt)
  9589  		ptr := v_0.Args[0]
  9590  		mem := v_1
  9591  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9592  			break
  9593  		}
  9594  		v.reset(OpARM64MOVHUload)
  9595  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9596  		v.Aux = symToAux(sym)
  9597  		v.AddArg2(ptr, mem)
  9598  		return true
  9599  	}
  9600  	// match: (MOVHUload [off] {sym} (ADD ptr idx) mem)
  9601  	// cond: off == 0 && sym == nil
  9602  	// result: (MOVHUloadidx ptr idx mem)
  9603  	for {
  9604  		off := auxIntToInt32(v.AuxInt)
  9605  		sym := auxToSym(v.Aux)
  9606  		if v_0.Op != OpARM64ADD {
  9607  			break
  9608  		}
  9609  		idx := v_0.Args[1]
  9610  		ptr := v_0.Args[0]
  9611  		mem := v_1
  9612  		if !(off == 0 && sym == nil) {
  9613  			break
  9614  		}
  9615  		v.reset(OpARM64MOVHUloadidx)
  9616  		v.AddArg3(ptr, idx, mem)
  9617  		return true
  9618  	}
  9619  	// match: (MOVHUload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
  9620  	// cond: off == 0 && sym == nil
  9621  	// result: (MOVHUloadidx2 ptr idx mem)
  9622  	for {
  9623  		off := auxIntToInt32(v.AuxInt)
  9624  		sym := auxToSym(v.Aux)
  9625  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
  9626  			break
  9627  		}
  9628  		idx := v_0.Args[1]
  9629  		ptr := v_0.Args[0]
  9630  		mem := v_1
  9631  		if !(off == 0 && sym == nil) {
  9632  			break
  9633  		}
  9634  		v.reset(OpARM64MOVHUloadidx2)
  9635  		v.AddArg3(ptr, idx, mem)
  9636  		return true
  9637  	}
  9638  	// match: (MOVHUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9639  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9640  	// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9641  	for {
  9642  		off1 := auxIntToInt32(v.AuxInt)
  9643  		sym1 := auxToSym(v.Aux)
  9644  		if v_0.Op != OpARM64MOVDaddr {
  9645  			break
  9646  		}
  9647  		off2 := auxIntToInt32(v_0.AuxInt)
  9648  		sym2 := auxToSym(v_0.Aux)
  9649  		ptr := v_0.Args[0]
  9650  		mem := v_1
  9651  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9652  			break
  9653  		}
  9654  		v.reset(OpARM64MOVHUload)
  9655  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9656  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9657  		v.AddArg2(ptr, mem)
  9658  		return true
  9659  	}
  9660  	// match: (MOVHUload [off] {sym} (SB) _)
  9661  	// cond: symIsRO(sym)
  9662  	// result: (MOVDconst [int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  9663  	for {
  9664  		off := auxIntToInt32(v.AuxInt)
  9665  		sym := auxToSym(v.Aux)
  9666  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9667  			break
  9668  		}
  9669  		v.reset(OpARM64MOVDconst)
  9670  		v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  9671  		return true
  9672  	}
  9673  	return false
  9674  }
  9675  func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
  9676  	v_2 := v.Args[2]
  9677  	v_1 := v.Args[1]
  9678  	v_0 := v.Args[0]
  9679  	// match: (MOVHUloadidx ptr (MOVDconst [c]) mem)
  9680  	// cond: is32Bit(c)
  9681  	// result: (MOVHUload [int32(c)] ptr mem)
  9682  	for {
  9683  		ptr := v_0
  9684  		if v_1.Op != OpARM64MOVDconst {
  9685  			break
  9686  		}
  9687  		c := auxIntToInt64(v_1.AuxInt)
  9688  		mem := v_2
  9689  		if !(is32Bit(c)) {
  9690  			break
  9691  		}
  9692  		v.reset(OpARM64MOVHUload)
  9693  		v.AuxInt = int32ToAuxInt(int32(c))
  9694  		v.AddArg2(ptr, mem)
  9695  		return true
  9696  	}
  9697  	// match: (MOVHUloadidx (MOVDconst [c]) ptr mem)
  9698  	// cond: is32Bit(c)
  9699  	// result: (MOVHUload [int32(c)] ptr mem)
  9700  	for {
  9701  		if v_0.Op != OpARM64MOVDconst {
  9702  			break
  9703  		}
  9704  		c := auxIntToInt64(v_0.AuxInt)
  9705  		ptr := v_1
  9706  		mem := v_2
  9707  		if !(is32Bit(c)) {
  9708  			break
  9709  		}
  9710  		v.reset(OpARM64MOVHUload)
  9711  		v.AuxInt = int32ToAuxInt(int32(c))
  9712  		v.AddArg2(ptr, mem)
  9713  		return true
  9714  	}
  9715  	// match: (MOVHUloadidx ptr (SLLconst [1] idx) mem)
  9716  	// result: (MOVHUloadidx2 ptr idx mem)
  9717  	for {
  9718  		ptr := v_0
  9719  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
  9720  			break
  9721  		}
  9722  		idx := v_1.Args[0]
  9723  		mem := v_2
  9724  		v.reset(OpARM64MOVHUloadidx2)
  9725  		v.AddArg3(ptr, idx, mem)
  9726  		return true
  9727  	}
  9728  	// match: (MOVHUloadidx ptr (ADD idx idx) mem)
  9729  	// result: (MOVHUloadidx2 ptr idx mem)
  9730  	for {
  9731  		ptr := v_0
  9732  		if v_1.Op != OpARM64ADD {
  9733  			break
  9734  		}
  9735  		idx := v_1.Args[1]
  9736  		if idx != v_1.Args[0] {
  9737  			break
  9738  		}
  9739  		mem := v_2
  9740  		v.reset(OpARM64MOVHUloadidx2)
  9741  		v.AddArg3(ptr, idx, mem)
  9742  		return true
  9743  	}
  9744  	// match: (MOVHUloadidx (ADD idx idx) ptr mem)
  9745  	// result: (MOVHUloadidx2 ptr idx mem)
  9746  	for {
  9747  		if v_0.Op != OpARM64ADD {
  9748  			break
  9749  		}
  9750  		idx := v_0.Args[1]
  9751  		if idx != v_0.Args[0] {
  9752  			break
  9753  		}
  9754  		ptr := v_1
  9755  		mem := v_2
  9756  		v.reset(OpARM64MOVHUloadidx2)
  9757  		v.AddArg3(ptr, idx, mem)
  9758  		return true
  9759  	}
  9760  	return false
  9761  }
  9762  func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
  9763  	v_2 := v.Args[2]
  9764  	v_1 := v.Args[1]
  9765  	v_0 := v.Args[0]
  9766  	// match: (MOVHUloadidx2 ptr (MOVDconst [c]) mem)
  9767  	// cond: is32Bit(c<<1)
  9768  	// result: (MOVHUload [int32(c)<<1] ptr mem)
  9769  	for {
  9770  		ptr := v_0
  9771  		if v_1.Op != OpARM64MOVDconst {
  9772  			break
  9773  		}
  9774  		c := auxIntToInt64(v_1.AuxInt)
  9775  		mem := v_2
  9776  		if !(is32Bit(c << 1)) {
  9777  			break
  9778  		}
  9779  		v.reset(OpARM64MOVHUload)
  9780  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
  9781  		v.AddArg2(ptr, mem)
  9782  		return true
  9783  	}
  9784  	return false
  9785  }
  9786  func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
  9787  	v_0 := v.Args[0]
  9788  	// match: (MOVHUreg (ANDconst [c] x))
  9789  	// result: (ANDconst [c&(1<<16-1)] x)
  9790  	for {
  9791  		if v_0.Op != OpARM64ANDconst {
  9792  			break
  9793  		}
  9794  		c := auxIntToInt64(v_0.AuxInt)
  9795  		x := v_0.Args[0]
  9796  		v.reset(OpARM64ANDconst)
  9797  		v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
  9798  		v.AddArg(x)
  9799  		return true
  9800  	}
  9801  	// match: (MOVHUreg (MOVDconst [c]))
  9802  	// result: (MOVDconst [int64(uint16(c))])
  9803  	for {
  9804  		if v_0.Op != OpARM64MOVDconst {
  9805  			break
  9806  		}
  9807  		c := auxIntToInt64(v_0.AuxInt)
  9808  		v.reset(OpARM64MOVDconst)
  9809  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9810  		return true
  9811  	}
  9812  	// match: (MOVHUreg x)
  9813  	// cond: v.Type.Size() <= 2
  9814  	// result: x
  9815  	for {
  9816  		x := v_0
  9817  		if !(v.Type.Size() <= 2) {
  9818  			break
  9819  		}
  9820  		v.copyOf(x)
  9821  		return true
  9822  	}
  9823  	// match: (MOVHUreg (SLLconst [lc] x))
  9824  	// cond: lc >= 16
  9825  	// result: (MOVDconst [0])
  9826  	for {
  9827  		if v_0.Op != OpARM64SLLconst {
  9828  			break
  9829  		}
  9830  		lc := auxIntToInt64(v_0.AuxInt)
  9831  		if !(lc >= 16) {
  9832  			break
  9833  		}
  9834  		v.reset(OpARM64MOVDconst)
  9835  		v.AuxInt = int64ToAuxInt(0)
  9836  		return true
  9837  	}
  9838  	// match: (MOVHUreg (SLLconst [lc] x))
  9839  	// cond: lc < 16
  9840  	// result: (UBFIZ [armBFAuxInt(lc, 16-lc)] x)
  9841  	for {
  9842  		if v_0.Op != OpARM64SLLconst {
  9843  			break
  9844  		}
  9845  		lc := auxIntToInt64(v_0.AuxInt)
  9846  		x := v_0.Args[0]
  9847  		if !(lc < 16) {
  9848  			break
  9849  		}
  9850  		v.reset(OpARM64UBFIZ)
  9851  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
  9852  		v.AddArg(x)
  9853  		return true
  9854  	}
  9855  	// match: (MOVHUreg (SRLconst [rc] x))
  9856  	// cond: rc < 16
  9857  	// result: (UBFX [armBFAuxInt(rc, 16)] x)
  9858  	for {
  9859  		if v_0.Op != OpARM64SRLconst {
  9860  			break
  9861  		}
  9862  		rc := auxIntToInt64(v_0.AuxInt)
  9863  		x := v_0.Args[0]
  9864  		if !(rc < 16) {
  9865  			break
  9866  		}
  9867  		v.reset(OpARM64UBFX)
  9868  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
  9869  		v.AddArg(x)
  9870  		return true
  9871  	}
  9872  	// match: (MOVHUreg (UBFX [bfc] x))
  9873  	// cond: bfc.width() <= 16
  9874  	// result: (UBFX [bfc] x)
  9875  	for {
  9876  		if v_0.Op != OpARM64UBFX {
  9877  			break
  9878  		}
  9879  		bfc := auxIntToArm64BitField(v_0.AuxInt)
  9880  		x := v_0.Args[0]
  9881  		if !(bfc.width() <= 16) {
  9882  			break
  9883  		}
  9884  		v.reset(OpARM64UBFX)
  9885  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
  9886  		v.AddArg(x)
  9887  		return true
  9888  	}
  9889  	return false
  9890  }
  9891  func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
  9892  	v_1 := v.Args[1]
  9893  	v_0 := v.Args[0]
  9894  	b := v.Block
  9895  	config := b.Func.Config
  9896  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  9897  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9898  	// result: (MOVHload [off1+int32(off2)] {sym} ptr mem)
  9899  	for {
  9900  		off1 := auxIntToInt32(v.AuxInt)
  9901  		sym := auxToSym(v.Aux)
  9902  		if v_0.Op != OpARM64ADDconst {
  9903  			break
  9904  		}
  9905  		off2 := auxIntToInt64(v_0.AuxInt)
  9906  		ptr := v_0.Args[0]
  9907  		mem := v_1
  9908  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9909  			break
  9910  		}
  9911  		v.reset(OpARM64MOVHload)
  9912  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9913  		v.Aux = symToAux(sym)
  9914  		v.AddArg2(ptr, mem)
  9915  		return true
  9916  	}
  9917  	// match: (MOVHload [off] {sym} (ADD ptr idx) mem)
  9918  	// cond: off == 0 && sym == nil
  9919  	// result: (MOVHloadidx ptr idx mem)
  9920  	for {
  9921  		off := auxIntToInt32(v.AuxInt)
  9922  		sym := auxToSym(v.Aux)
  9923  		if v_0.Op != OpARM64ADD {
  9924  			break
  9925  		}
  9926  		idx := v_0.Args[1]
  9927  		ptr := v_0.Args[0]
  9928  		mem := v_1
  9929  		if !(off == 0 && sym == nil) {
  9930  			break
  9931  		}
  9932  		v.reset(OpARM64MOVHloadidx)
  9933  		v.AddArg3(ptr, idx, mem)
  9934  		return true
  9935  	}
  9936  	// match: (MOVHload [off] {sym} (ADDshiftLL [1] ptr idx) mem)
  9937  	// cond: off == 0 && sym == nil
  9938  	// result: (MOVHloadidx2 ptr idx mem)
  9939  	for {
  9940  		off := auxIntToInt32(v.AuxInt)
  9941  		sym := auxToSym(v.Aux)
  9942  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
  9943  			break
  9944  		}
  9945  		idx := v_0.Args[1]
  9946  		ptr := v_0.Args[0]
  9947  		mem := v_1
  9948  		if !(off == 0 && sym == nil) {
  9949  			break
  9950  		}
  9951  		v.reset(OpARM64MOVHloadidx2)
  9952  		v.AddArg3(ptr, idx, mem)
  9953  		return true
  9954  	}
  9955  	// match: (MOVHload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
  9956  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
  9957  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9958  	for {
  9959  		off1 := auxIntToInt32(v.AuxInt)
  9960  		sym1 := auxToSym(v.Aux)
  9961  		if v_0.Op != OpARM64MOVDaddr {
  9962  			break
  9963  		}
  9964  		off2 := auxIntToInt32(v_0.AuxInt)
  9965  		sym2 := auxToSym(v_0.Aux)
  9966  		ptr := v_0.Args[0]
  9967  		mem := v_1
  9968  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
  9969  			break
  9970  		}
  9971  		v.reset(OpARM64MOVHload)
  9972  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9973  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9974  		v.AddArg2(ptr, mem)
  9975  		return true
  9976  	}
  9977  	// match: (MOVHload [off] {sym} (SB) _)
  9978  	// cond: symIsRO(sym)
  9979  	// result: (MOVDconst [int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
  9980  	for {
  9981  		off := auxIntToInt32(v.AuxInt)
  9982  		sym := auxToSym(v.Aux)
  9983  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  9984  			break
  9985  		}
  9986  		v.reset(OpARM64MOVDconst)
  9987  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
  9988  		return true
  9989  	}
  9990  	return false
  9991  }
  9992  func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
  9993  	v_2 := v.Args[2]
  9994  	v_1 := v.Args[1]
  9995  	v_0 := v.Args[0]
  9996  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
  9997  	// cond: is32Bit(c)
  9998  	// result: (MOVHload [int32(c)] ptr mem)
  9999  	for {
 10000  		ptr := v_0
 10001  		if v_1.Op != OpARM64MOVDconst {
 10002  			break
 10003  		}
 10004  		c := auxIntToInt64(v_1.AuxInt)
 10005  		mem := v_2
 10006  		if !(is32Bit(c)) {
 10007  			break
 10008  		}
 10009  		v.reset(OpARM64MOVHload)
 10010  		v.AuxInt = int32ToAuxInt(int32(c))
 10011  		v.AddArg2(ptr, mem)
 10012  		return true
 10013  	}
 10014  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 10015  	// cond: is32Bit(c)
 10016  	// result: (MOVHload [int32(c)] ptr mem)
 10017  	for {
 10018  		if v_0.Op != OpARM64MOVDconst {
 10019  			break
 10020  		}
 10021  		c := auxIntToInt64(v_0.AuxInt)
 10022  		ptr := v_1
 10023  		mem := v_2
 10024  		if !(is32Bit(c)) {
 10025  			break
 10026  		}
 10027  		v.reset(OpARM64MOVHload)
 10028  		v.AuxInt = int32ToAuxInt(int32(c))
 10029  		v.AddArg2(ptr, mem)
 10030  		return true
 10031  	}
 10032  	// match: (MOVHloadidx ptr (SLLconst [1] idx) mem)
 10033  	// result: (MOVHloadidx2 ptr idx mem)
 10034  	for {
 10035  		ptr := v_0
 10036  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10037  			break
 10038  		}
 10039  		idx := v_1.Args[0]
 10040  		mem := v_2
 10041  		v.reset(OpARM64MOVHloadidx2)
 10042  		v.AddArg3(ptr, idx, mem)
 10043  		return true
 10044  	}
 10045  	// match: (MOVHloadidx ptr (ADD idx idx) mem)
 10046  	// result: (MOVHloadidx2 ptr idx mem)
 10047  	for {
 10048  		ptr := v_0
 10049  		if v_1.Op != OpARM64ADD {
 10050  			break
 10051  		}
 10052  		idx := v_1.Args[1]
 10053  		if idx != v_1.Args[0] {
 10054  			break
 10055  		}
 10056  		mem := v_2
 10057  		v.reset(OpARM64MOVHloadidx2)
 10058  		v.AddArg3(ptr, idx, mem)
 10059  		return true
 10060  	}
 10061  	// match: (MOVHloadidx (ADD idx idx) ptr mem)
 10062  	// result: (MOVHloadidx2 ptr idx mem)
 10063  	for {
 10064  		if v_0.Op != OpARM64ADD {
 10065  			break
 10066  		}
 10067  		idx := v_0.Args[1]
 10068  		if idx != v_0.Args[0] {
 10069  			break
 10070  		}
 10071  		ptr := v_1
 10072  		mem := v_2
 10073  		v.reset(OpARM64MOVHloadidx2)
 10074  		v.AddArg3(ptr, idx, mem)
 10075  		return true
 10076  	}
 10077  	return false
 10078  }
 10079  func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
 10080  	v_2 := v.Args[2]
 10081  	v_1 := v.Args[1]
 10082  	v_0 := v.Args[0]
 10083  	// match: (MOVHloadidx2 ptr (MOVDconst [c]) mem)
 10084  	// cond: is32Bit(c<<1)
 10085  	// result: (MOVHload [int32(c)<<1] ptr mem)
 10086  	for {
 10087  		ptr := v_0
 10088  		if v_1.Op != OpARM64MOVDconst {
 10089  			break
 10090  		}
 10091  		c := auxIntToInt64(v_1.AuxInt)
 10092  		mem := v_2
 10093  		if !(is32Bit(c << 1)) {
 10094  			break
 10095  		}
 10096  		v.reset(OpARM64MOVHload)
 10097  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10098  		v.AddArg2(ptr, mem)
 10099  		return true
 10100  	}
 10101  	return false
 10102  }
 10103  func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
 10104  	v_0 := v.Args[0]
 10105  	// match: (MOVHreg (MOVDconst [c]))
 10106  	// result: (MOVDconst [int64(int16(c))])
 10107  	for {
 10108  		if v_0.Op != OpARM64MOVDconst {
 10109  			break
 10110  		}
 10111  		c := auxIntToInt64(v_0.AuxInt)
 10112  		v.reset(OpARM64MOVDconst)
 10113  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 10114  		return true
 10115  	}
 10116  	// match: (MOVHreg x)
 10117  	// cond: v.Type.Size() <= 2
 10118  	// result: x
 10119  	for {
 10120  		x := v_0
 10121  		if !(v.Type.Size() <= 2) {
 10122  			break
 10123  		}
 10124  		v.copyOf(x)
 10125  		return true
 10126  	}
 10127  	// match: (MOVHreg <t> (ANDconst x [c]))
 10128  	// cond: uint64(c) & uint64(0xffffffffffff8000) == 0
 10129  	// result: (ANDconst <t> x [c])
 10130  	for {
 10131  		t := v.Type
 10132  		if v_0.Op != OpARM64ANDconst {
 10133  			break
 10134  		}
 10135  		c := auxIntToInt64(v_0.AuxInt)
 10136  		x := v_0.Args[0]
 10137  		if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
 10138  			break
 10139  		}
 10140  		v.reset(OpARM64ANDconst)
 10141  		v.Type = t
 10142  		v.AuxInt = int64ToAuxInt(c)
 10143  		v.AddArg(x)
 10144  		return true
 10145  	}
 10146  	// match: (MOVHreg (SLLconst [lc] x))
 10147  	// cond: lc < 16
 10148  	// result: (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
 10149  	for {
 10150  		if v_0.Op != OpARM64SLLconst {
 10151  			break
 10152  		}
 10153  		lc := auxIntToInt64(v_0.AuxInt)
 10154  		x := v_0.Args[0]
 10155  		if !(lc < 16) {
 10156  			break
 10157  		}
 10158  		v.reset(OpARM64SBFIZ)
 10159  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
 10160  		v.AddArg(x)
 10161  		return true
 10162  	}
 10163  	// match: (MOVHreg (SBFX [bfc] x))
 10164  	// cond: bfc.width() <= 16
 10165  	// result: (SBFX [bfc] x)
 10166  	for {
 10167  		if v_0.Op != OpARM64SBFX {
 10168  			break
 10169  		}
 10170  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10171  		x := v_0.Args[0]
 10172  		if !(bfc.width() <= 16) {
 10173  			break
 10174  		}
 10175  		v.reset(OpARM64SBFX)
 10176  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10177  		v.AddArg(x)
 10178  		return true
 10179  	}
 10180  	return false
 10181  }
 10182  func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
 10183  	v_2 := v.Args[2]
 10184  	v_1 := v.Args[1]
 10185  	v_0 := v.Args[0]
 10186  	b := v.Block
 10187  	config := b.Func.Config
 10188  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10189  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10190  	// result: (MOVHstore [off1+int32(off2)] {sym} ptr val mem)
 10191  	for {
 10192  		off1 := auxIntToInt32(v.AuxInt)
 10193  		sym := auxToSym(v.Aux)
 10194  		if v_0.Op != OpARM64ADDconst {
 10195  			break
 10196  		}
 10197  		off2 := auxIntToInt64(v_0.AuxInt)
 10198  		ptr := v_0.Args[0]
 10199  		val := v_1
 10200  		mem := v_2
 10201  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10202  			break
 10203  		}
 10204  		v.reset(OpARM64MOVHstore)
 10205  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10206  		v.Aux = symToAux(sym)
 10207  		v.AddArg3(ptr, val, mem)
 10208  		return true
 10209  	}
 10210  	// match: (MOVHstore [off] {sym} (ADD ptr idx) val mem)
 10211  	// cond: off == 0 && sym == nil
 10212  	// result: (MOVHstoreidx ptr idx val mem)
 10213  	for {
 10214  		off := auxIntToInt32(v.AuxInt)
 10215  		sym := auxToSym(v.Aux)
 10216  		if v_0.Op != OpARM64ADD {
 10217  			break
 10218  		}
 10219  		idx := v_0.Args[1]
 10220  		ptr := v_0.Args[0]
 10221  		val := v_1
 10222  		mem := v_2
 10223  		if !(off == 0 && sym == nil) {
 10224  			break
 10225  		}
 10226  		v.reset(OpARM64MOVHstoreidx)
 10227  		v.AddArg4(ptr, idx, val, mem)
 10228  		return true
 10229  	}
 10230  	// match: (MOVHstore [off] {sym} (ADDshiftLL [1] ptr idx) val mem)
 10231  	// cond: off == 0 && sym == nil
 10232  	// result: (MOVHstoreidx2 ptr idx val mem)
 10233  	for {
 10234  		off := auxIntToInt32(v.AuxInt)
 10235  		sym := auxToSym(v.Aux)
 10236  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
 10237  			break
 10238  		}
 10239  		idx := v_0.Args[1]
 10240  		ptr := v_0.Args[0]
 10241  		val := v_1
 10242  		mem := v_2
 10243  		if !(off == 0 && sym == nil) {
 10244  			break
 10245  		}
 10246  		v.reset(OpARM64MOVHstoreidx2)
 10247  		v.AddArg4(ptr, idx, val, mem)
 10248  		return true
 10249  	}
 10250  	// match: (MOVHstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 10251  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10252  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10253  	for {
 10254  		off1 := auxIntToInt32(v.AuxInt)
 10255  		sym1 := auxToSym(v.Aux)
 10256  		if v_0.Op != OpARM64MOVDaddr {
 10257  			break
 10258  		}
 10259  		off2 := auxIntToInt32(v_0.AuxInt)
 10260  		sym2 := auxToSym(v_0.Aux)
 10261  		ptr := v_0.Args[0]
 10262  		val := v_1
 10263  		mem := v_2
 10264  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10265  			break
 10266  		}
 10267  		v.reset(OpARM64MOVHstore)
 10268  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10269  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10270  		v.AddArg3(ptr, val, mem)
 10271  		return true
 10272  	}
 10273  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10274  	// result: (MOVHstore [off] {sym} ptr x mem)
 10275  	for {
 10276  		off := auxIntToInt32(v.AuxInt)
 10277  		sym := auxToSym(v.Aux)
 10278  		ptr := v_0
 10279  		if v_1.Op != OpARM64MOVHreg {
 10280  			break
 10281  		}
 10282  		x := v_1.Args[0]
 10283  		mem := v_2
 10284  		v.reset(OpARM64MOVHstore)
 10285  		v.AuxInt = int32ToAuxInt(off)
 10286  		v.Aux = symToAux(sym)
 10287  		v.AddArg3(ptr, x, mem)
 10288  		return true
 10289  	}
 10290  	// match: (MOVHstore [off] {sym} ptr (MOVHUreg x) mem)
 10291  	// result: (MOVHstore [off] {sym} ptr x mem)
 10292  	for {
 10293  		off := auxIntToInt32(v.AuxInt)
 10294  		sym := auxToSym(v.Aux)
 10295  		ptr := v_0
 10296  		if v_1.Op != OpARM64MOVHUreg {
 10297  			break
 10298  		}
 10299  		x := v_1.Args[0]
 10300  		mem := v_2
 10301  		v.reset(OpARM64MOVHstore)
 10302  		v.AuxInt = int32ToAuxInt(off)
 10303  		v.Aux = symToAux(sym)
 10304  		v.AddArg3(ptr, x, mem)
 10305  		return true
 10306  	}
 10307  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 10308  	// result: (MOVHstore [off] {sym} ptr x mem)
 10309  	for {
 10310  		off := auxIntToInt32(v.AuxInt)
 10311  		sym := auxToSym(v.Aux)
 10312  		ptr := v_0
 10313  		if v_1.Op != OpARM64MOVWreg {
 10314  			break
 10315  		}
 10316  		x := v_1.Args[0]
 10317  		mem := v_2
 10318  		v.reset(OpARM64MOVHstore)
 10319  		v.AuxInt = int32ToAuxInt(off)
 10320  		v.Aux = symToAux(sym)
 10321  		v.AddArg3(ptr, x, mem)
 10322  		return true
 10323  	}
 10324  	// match: (MOVHstore [off] {sym} ptr (MOVWUreg x) mem)
 10325  	// result: (MOVHstore [off] {sym} ptr x mem)
 10326  	for {
 10327  		off := auxIntToInt32(v.AuxInt)
 10328  		sym := auxToSym(v.Aux)
 10329  		ptr := v_0
 10330  		if v_1.Op != OpARM64MOVWUreg {
 10331  			break
 10332  		}
 10333  		x := v_1.Args[0]
 10334  		mem := v_2
 10335  		v.reset(OpARM64MOVHstore)
 10336  		v.AuxInt = int32ToAuxInt(off)
 10337  		v.Aux = symToAux(sym)
 10338  		v.AddArg3(ptr, x, mem)
 10339  		return true
 10340  	}
 10341  	return false
 10342  }
 10343  func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
 10344  	v_3 := v.Args[3]
 10345  	v_2 := v.Args[2]
 10346  	v_1 := v.Args[1]
 10347  	v_0 := v.Args[0]
 10348  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10349  	// cond: is32Bit(c)
 10350  	// result: (MOVHstore [int32(c)] ptr val mem)
 10351  	for {
 10352  		ptr := v_0
 10353  		if v_1.Op != OpARM64MOVDconst {
 10354  			break
 10355  		}
 10356  		c := auxIntToInt64(v_1.AuxInt)
 10357  		val := v_2
 10358  		mem := v_3
 10359  		if !(is32Bit(c)) {
 10360  			break
 10361  		}
 10362  		v.reset(OpARM64MOVHstore)
 10363  		v.AuxInt = int32ToAuxInt(int32(c))
 10364  		v.AddArg3(ptr, val, mem)
 10365  		return true
 10366  	}
 10367  	// match: (MOVHstoreidx (MOVDconst [c]) idx val mem)
 10368  	// cond: is32Bit(c)
 10369  	// result: (MOVHstore [int32(c)] idx val mem)
 10370  	for {
 10371  		if v_0.Op != OpARM64MOVDconst {
 10372  			break
 10373  		}
 10374  		c := auxIntToInt64(v_0.AuxInt)
 10375  		idx := v_1
 10376  		val := v_2
 10377  		mem := v_3
 10378  		if !(is32Bit(c)) {
 10379  			break
 10380  		}
 10381  		v.reset(OpARM64MOVHstore)
 10382  		v.AuxInt = int32ToAuxInt(int32(c))
 10383  		v.AddArg3(idx, val, mem)
 10384  		return true
 10385  	}
 10386  	// match: (MOVHstoreidx ptr (SLLconst [1] idx) val mem)
 10387  	// result: (MOVHstoreidx2 ptr idx val mem)
 10388  	for {
 10389  		ptr := v_0
 10390  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
 10391  			break
 10392  		}
 10393  		idx := v_1.Args[0]
 10394  		val := v_2
 10395  		mem := v_3
 10396  		v.reset(OpARM64MOVHstoreidx2)
 10397  		v.AddArg4(ptr, idx, val, mem)
 10398  		return true
 10399  	}
 10400  	// match: (MOVHstoreidx ptr (ADD idx idx) val mem)
 10401  	// result: (MOVHstoreidx2 ptr idx val mem)
 10402  	for {
 10403  		ptr := v_0
 10404  		if v_1.Op != OpARM64ADD {
 10405  			break
 10406  		}
 10407  		idx := v_1.Args[1]
 10408  		if idx != v_1.Args[0] {
 10409  			break
 10410  		}
 10411  		val := v_2
 10412  		mem := v_3
 10413  		v.reset(OpARM64MOVHstoreidx2)
 10414  		v.AddArg4(ptr, idx, val, mem)
 10415  		return true
 10416  	}
 10417  	// match: (MOVHstoreidx (SLLconst [1] idx) ptr val mem)
 10418  	// result: (MOVHstoreidx2 ptr idx val mem)
 10419  	for {
 10420  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
 10421  			break
 10422  		}
 10423  		idx := v_0.Args[0]
 10424  		ptr := v_1
 10425  		val := v_2
 10426  		mem := v_3
 10427  		v.reset(OpARM64MOVHstoreidx2)
 10428  		v.AddArg4(ptr, idx, val, mem)
 10429  		return true
 10430  	}
 10431  	// match: (MOVHstoreidx (ADD idx idx) ptr val mem)
 10432  	// result: (MOVHstoreidx2 ptr idx val mem)
 10433  	for {
 10434  		if v_0.Op != OpARM64ADD {
 10435  			break
 10436  		}
 10437  		idx := v_0.Args[1]
 10438  		if idx != v_0.Args[0] {
 10439  			break
 10440  		}
 10441  		ptr := v_1
 10442  		val := v_2
 10443  		mem := v_3
 10444  		v.reset(OpARM64MOVHstoreidx2)
 10445  		v.AddArg4(ptr, idx, val, mem)
 10446  		return true
 10447  	}
 10448  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 10449  	// result: (MOVHstoreidx ptr idx x mem)
 10450  	for {
 10451  		ptr := v_0
 10452  		idx := v_1
 10453  		if v_2.Op != OpARM64MOVHreg {
 10454  			break
 10455  		}
 10456  		x := v_2.Args[0]
 10457  		mem := v_3
 10458  		v.reset(OpARM64MOVHstoreidx)
 10459  		v.AddArg4(ptr, idx, x, mem)
 10460  		return true
 10461  	}
 10462  	// match: (MOVHstoreidx ptr idx (MOVHUreg x) mem)
 10463  	// result: (MOVHstoreidx ptr idx x mem)
 10464  	for {
 10465  		ptr := v_0
 10466  		idx := v_1
 10467  		if v_2.Op != OpARM64MOVHUreg {
 10468  			break
 10469  		}
 10470  		x := v_2.Args[0]
 10471  		mem := v_3
 10472  		v.reset(OpARM64MOVHstoreidx)
 10473  		v.AddArg4(ptr, idx, x, mem)
 10474  		return true
 10475  	}
 10476  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 10477  	// result: (MOVHstoreidx ptr idx x mem)
 10478  	for {
 10479  		ptr := v_0
 10480  		idx := v_1
 10481  		if v_2.Op != OpARM64MOVWreg {
 10482  			break
 10483  		}
 10484  		x := v_2.Args[0]
 10485  		mem := v_3
 10486  		v.reset(OpARM64MOVHstoreidx)
 10487  		v.AddArg4(ptr, idx, x, mem)
 10488  		return true
 10489  	}
 10490  	// match: (MOVHstoreidx ptr idx (MOVWUreg x) mem)
 10491  	// result: (MOVHstoreidx ptr idx x mem)
 10492  	for {
 10493  		ptr := v_0
 10494  		idx := v_1
 10495  		if v_2.Op != OpARM64MOVWUreg {
 10496  			break
 10497  		}
 10498  		x := v_2.Args[0]
 10499  		mem := v_3
 10500  		v.reset(OpARM64MOVHstoreidx)
 10501  		v.AddArg4(ptr, idx, x, mem)
 10502  		return true
 10503  	}
 10504  	return false
 10505  }
 10506  func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
 10507  	v_3 := v.Args[3]
 10508  	v_2 := v.Args[2]
 10509  	v_1 := v.Args[1]
 10510  	v_0 := v.Args[0]
 10511  	// match: (MOVHstoreidx2 ptr (MOVDconst [c]) val mem)
 10512  	// cond: is32Bit(c<<1)
 10513  	// result: (MOVHstore [int32(c)<<1] ptr val mem)
 10514  	for {
 10515  		ptr := v_0
 10516  		if v_1.Op != OpARM64MOVDconst {
 10517  			break
 10518  		}
 10519  		c := auxIntToInt64(v_1.AuxInt)
 10520  		val := v_2
 10521  		mem := v_3
 10522  		if !(is32Bit(c << 1)) {
 10523  			break
 10524  		}
 10525  		v.reset(OpARM64MOVHstore)
 10526  		v.AuxInt = int32ToAuxInt(int32(c) << 1)
 10527  		v.AddArg3(ptr, val, mem)
 10528  		return true
 10529  	}
 10530  	// match: (MOVHstoreidx2 ptr idx (MOVHreg x) mem)
 10531  	// result: (MOVHstoreidx2 ptr idx x mem)
 10532  	for {
 10533  		ptr := v_0
 10534  		idx := v_1
 10535  		if v_2.Op != OpARM64MOVHreg {
 10536  			break
 10537  		}
 10538  		x := v_2.Args[0]
 10539  		mem := v_3
 10540  		v.reset(OpARM64MOVHstoreidx2)
 10541  		v.AddArg4(ptr, idx, x, mem)
 10542  		return true
 10543  	}
 10544  	// match: (MOVHstoreidx2 ptr idx (MOVHUreg x) mem)
 10545  	// result: (MOVHstoreidx2 ptr idx x mem)
 10546  	for {
 10547  		ptr := v_0
 10548  		idx := v_1
 10549  		if v_2.Op != OpARM64MOVHUreg {
 10550  			break
 10551  		}
 10552  		x := v_2.Args[0]
 10553  		mem := v_3
 10554  		v.reset(OpARM64MOVHstoreidx2)
 10555  		v.AddArg4(ptr, idx, x, mem)
 10556  		return true
 10557  	}
 10558  	// match: (MOVHstoreidx2 ptr idx (MOVWreg x) mem)
 10559  	// result: (MOVHstoreidx2 ptr idx x mem)
 10560  	for {
 10561  		ptr := v_0
 10562  		idx := v_1
 10563  		if v_2.Op != OpARM64MOVWreg {
 10564  			break
 10565  		}
 10566  		x := v_2.Args[0]
 10567  		mem := v_3
 10568  		v.reset(OpARM64MOVHstoreidx2)
 10569  		v.AddArg4(ptr, idx, x, mem)
 10570  		return true
 10571  	}
 10572  	// match: (MOVHstoreidx2 ptr idx (MOVWUreg x) mem)
 10573  	// result: (MOVHstoreidx2 ptr idx x mem)
 10574  	for {
 10575  		ptr := v_0
 10576  		idx := v_1
 10577  		if v_2.Op != OpARM64MOVWUreg {
 10578  			break
 10579  		}
 10580  		x := v_2.Args[0]
 10581  		mem := v_3
 10582  		v.reset(OpARM64MOVHstoreidx2)
 10583  		v.AddArg4(ptr, idx, x, mem)
 10584  		return true
 10585  	}
 10586  	return false
 10587  }
 10588  func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
 10589  	v_1 := v.Args[1]
 10590  	v_0 := v.Args[0]
 10591  	b := v.Block
 10592  	config := b.Func.Config
 10593  	// match: (MOVWUload [off] {sym} ptr (FMOVSstore [off] {sym} ptr val _))
 10594  	// result: (FMOVSfpgp val)
 10595  	for {
 10596  		off := auxIntToInt32(v.AuxInt)
 10597  		sym := auxToSym(v.Aux)
 10598  		ptr := v_0
 10599  		if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10600  			break
 10601  		}
 10602  		val := v_1.Args[1]
 10603  		if ptr != v_1.Args[0] {
 10604  			break
 10605  		}
 10606  		v.reset(OpARM64FMOVSfpgp)
 10607  		v.AddArg(val)
 10608  		return true
 10609  	}
 10610  	// match: (MOVWUload [off1] {sym} (ADDconst [off2] ptr) mem)
 10611  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10612  	// result: (MOVWUload [off1+int32(off2)] {sym} ptr mem)
 10613  	for {
 10614  		off1 := auxIntToInt32(v.AuxInt)
 10615  		sym := auxToSym(v.Aux)
 10616  		if v_0.Op != OpARM64ADDconst {
 10617  			break
 10618  		}
 10619  		off2 := auxIntToInt64(v_0.AuxInt)
 10620  		ptr := v_0.Args[0]
 10621  		mem := v_1
 10622  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10623  			break
 10624  		}
 10625  		v.reset(OpARM64MOVWUload)
 10626  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10627  		v.Aux = symToAux(sym)
 10628  		v.AddArg2(ptr, mem)
 10629  		return true
 10630  	}
 10631  	// match: (MOVWUload [off] {sym} (ADD ptr idx) mem)
 10632  	// cond: off == 0 && sym == nil
 10633  	// result: (MOVWUloadidx ptr idx mem)
 10634  	for {
 10635  		off := auxIntToInt32(v.AuxInt)
 10636  		sym := auxToSym(v.Aux)
 10637  		if v_0.Op != OpARM64ADD {
 10638  			break
 10639  		}
 10640  		idx := v_0.Args[1]
 10641  		ptr := v_0.Args[0]
 10642  		mem := v_1
 10643  		if !(off == 0 && sym == nil) {
 10644  			break
 10645  		}
 10646  		v.reset(OpARM64MOVWUloadidx)
 10647  		v.AddArg3(ptr, idx, mem)
 10648  		return true
 10649  	}
 10650  	// match: (MOVWUload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 10651  	// cond: off == 0 && sym == nil
 10652  	// result: (MOVWUloadidx4 ptr idx mem)
 10653  	for {
 10654  		off := auxIntToInt32(v.AuxInt)
 10655  		sym := auxToSym(v.Aux)
 10656  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 10657  			break
 10658  		}
 10659  		idx := v_0.Args[1]
 10660  		ptr := v_0.Args[0]
 10661  		mem := v_1
 10662  		if !(off == 0 && sym == nil) {
 10663  			break
 10664  		}
 10665  		v.reset(OpARM64MOVWUloadidx4)
 10666  		v.AddArg3(ptr, idx, mem)
 10667  		return true
 10668  	}
 10669  	// match: (MOVWUload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10670  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10671  	// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10672  	for {
 10673  		off1 := auxIntToInt32(v.AuxInt)
 10674  		sym1 := auxToSym(v.Aux)
 10675  		if v_0.Op != OpARM64MOVDaddr {
 10676  			break
 10677  		}
 10678  		off2 := auxIntToInt32(v_0.AuxInt)
 10679  		sym2 := auxToSym(v_0.Aux)
 10680  		ptr := v_0.Args[0]
 10681  		mem := v_1
 10682  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10683  			break
 10684  		}
 10685  		v.reset(OpARM64MOVWUload)
 10686  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10687  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10688  		v.AddArg2(ptr, mem)
 10689  		return true
 10690  	}
 10691  	// match: (MOVWUload [off] {sym} (SB) _)
 10692  	// cond: symIsRO(sym)
 10693  	// result: (MOVDconst [int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
 10694  	for {
 10695  		off := auxIntToInt32(v.AuxInt)
 10696  		sym := auxToSym(v.Aux)
 10697  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10698  			break
 10699  		}
 10700  		v.reset(OpARM64MOVDconst)
 10701  		v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
 10702  		return true
 10703  	}
 10704  	return false
 10705  }
 10706  func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
 10707  	v_2 := v.Args[2]
 10708  	v_1 := v.Args[1]
 10709  	v_0 := v.Args[0]
 10710  	// match: (MOVWUloadidx ptr (MOVDconst [c]) mem)
 10711  	// cond: is32Bit(c)
 10712  	// result: (MOVWUload [int32(c)] ptr mem)
 10713  	for {
 10714  		ptr := v_0
 10715  		if v_1.Op != OpARM64MOVDconst {
 10716  			break
 10717  		}
 10718  		c := auxIntToInt64(v_1.AuxInt)
 10719  		mem := v_2
 10720  		if !(is32Bit(c)) {
 10721  			break
 10722  		}
 10723  		v.reset(OpARM64MOVWUload)
 10724  		v.AuxInt = int32ToAuxInt(int32(c))
 10725  		v.AddArg2(ptr, mem)
 10726  		return true
 10727  	}
 10728  	// match: (MOVWUloadidx (MOVDconst [c]) ptr mem)
 10729  	// cond: is32Bit(c)
 10730  	// result: (MOVWUload [int32(c)] ptr mem)
 10731  	for {
 10732  		if v_0.Op != OpARM64MOVDconst {
 10733  			break
 10734  		}
 10735  		c := auxIntToInt64(v_0.AuxInt)
 10736  		ptr := v_1
 10737  		mem := v_2
 10738  		if !(is32Bit(c)) {
 10739  			break
 10740  		}
 10741  		v.reset(OpARM64MOVWUload)
 10742  		v.AuxInt = int32ToAuxInt(int32(c))
 10743  		v.AddArg2(ptr, mem)
 10744  		return true
 10745  	}
 10746  	// match: (MOVWUloadidx ptr (SLLconst [2] idx) mem)
 10747  	// result: (MOVWUloadidx4 ptr idx mem)
 10748  	for {
 10749  		ptr := v_0
 10750  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 10751  			break
 10752  		}
 10753  		idx := v_1.Args[0]
 10754  		mem := v_2
 10755  		v.reset(OpARM64MOVWUloadidx4)
 10756  		v.AddArg3(ptr, idx, mem)
 10757  		return true
 10758  	}
 10759  	// match: (MOVWUloadidx (SLLconst [2] idx) ptr mem)
 10760  	// result: (MOVWUloadidx4 ptr idx mem)
 10761  	for {
 10762  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 10763  			break
 10764  		}
 10765  		idx := v_0.Args[0]
 10766  		ptr := v_1
 10767  		mem := v_2
 10768  		v.reset(OpARM64MOVWUloadidx4)
 10769  		v.AddArg3(ptr, idx, mem)
 10770  		return true
 10771  	}
 10772  	return false
 10773  }
 10774  func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
 10775  	v_2 := v.Args[2]
 10776  	v_1 := v.Args[1]
 10777  	v_0 := v.Args[0]
 10778  	// match: (MOVWUloadidx4 ptr (MOVDconst [c]) mem)
 10779  	// cond: is32Bit(c<<2)
 10780  	// result: (MOVWUload [int32(c)<<2] ptr mem)
 10781  	for {
 10782  		ptr := v_0
 10783  		if v_1.Op != OpARM64MOVDconst {
 10784  			break
 10785  		}
 10786  		c := auxIntToInt64(v_1.AuxInt)
 10787  		mem := v_2
 10788  		if !(is32Bit(c << 2)) {
 10789  			break
 10790  		}
 10791  		v.reset(OpARM64MOVWUload)
 10792  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 10793  		v.AddArg2(ptr, mem)
 10794  		return true
 10795  	}
 10796  	return false
 10797  }
 10798  func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
 10799  	v_0 := v.Args[0]
 10800  	// match: (MOVWUreg (ANDconst [c] x))
 10801  	// result: (ANDconst [c&(1<<32-1)] x)
 10802  	for {
 10803  		if v_0.Op != OpARM64ANDconst {
 10804  			break
 10805  		}
 10806  		c := auxIntToInt64(v_0.AuxInt)
 10807  		x := v_0.Args[0]
 10808  		v.reset(OpARM64ANDconst)
 10809  		v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
 10810  		v.AddArg(x)
 10811  		return true
 10812  	}
 10813  	// match: (MOVWUreg (MOVDconst [c]))
 10814  	// result: (MOVDconst [int64(uint32(c))])
 10815  	for {
 10816  		if v_0.Op != OpARM64MOVDconst {
 10817  			break
 10818  		}
 10819  		c := auxIntToInt64(v_0.AuxInt)
 10820  		v.reset(OpARM64MOVDconst)
 10821  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10822  		return true
 10823  	}
 10824  	// match: (MOVWUreg x)
 10825  	// cond: v.Type.Size() <= 4
 10826  	// result: x
 10827  	for {
 10828  		x := v_0
 10829  		if !(v.Type.Size() <= 4) {
 10830  			break
 10831  		}
 10832  		v.copyOf(x)
 10833  		return true
 10834  	}
 10835  	// match: (MOVWUreg (SLLconst [lc] x))
 10836  	// cond: lc >= 32
 10837  	// result: (MOVDconst [0])
 10838  	for {
 10839  		if v_0.Op != OpARM64SLLconst {
 10840  			break
 10841  		}
 10842  		lc := auxIntToInt64(v_0.AuxInt)
 10843  		if !(lc >= 32) {
 10844  			break
 10845  		}
 10846  		v.reset(OpARM64MOVDconst)
 10847  		v.AuxInt = int64ToAuxInt(0)
 10848  		return true
 10849  	}
 10850  	// match: (MOVWUreg (SLLconst [lc] x))
 10851  	// cond: lc < 32
 10852  	// result: (UBFIZ [armBFAuxInt(lc, 32-lc)] x)
 10853  	for {
 10854  		if v_0.Op != OpARM64SLLconst {
 10855  			break
 10856  		}
 10857  		lc := auxIntToInt64(v_0.AuxInt)
 10858  		x := v_0.Args[0]
 10859  		if !(lc < 32) {
 10860  			break
 10861  		}
 10862  		v.reset(OpARM64UBFIZ)
 10863  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 10864  		v.AddArg(x)
 10865  		return true
 10866  	}
 10867  	// match: (MOVWUreg (SRLconst [rc] x))
 10868  	// cond: rc < 32
 10869  	// result: (UBFX [armBFAuxInt(rc, 32)] x)
 10870  	for {
 10871  		if v_0.Op != OpARM64SRLconst {
 10872  			break
 10873  		}
 10874  		rc := auxIntToInt64(v_0.AuxInt)
 10875  		x := v_0.Args[0]
 10876  		if !(rc < 32) {
 10877  			break
 10878  		}
 10879  		v.reset(OpARM64UBFX)
 10880  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
 10881  		v.AddArg(x)
 10882  		return true
 10883  	}
 10884  	// match: (MOVWUreg (UBFX [bfc] x))
 10885  	// cond: bfc.width() <= 32
 10886  	// result: (UBFX [bfc] x)
 10887  	for {
 10888  		if v_0.Op != OpARM64UBFX {
 10889  			break
 10890  		}
 10891  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 10892  		x := v_0.Args[0]
 10893  		if !(bfc.width() <= 32) {
 10894  			break
 10895  		}
 10896  		v.reset(OpARM64UBFX)
 10897  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 10898  		v.AddArg(x)
 10899  		return true
 10900  	}
 10901  	return false
 10902  }
 10903  func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
 10904  	v_1 := v.Args[1]
 10905  	v_0 := v.Args[0]
 10906  	b := v.Block
 10907  	config := b.Func.Config
 10908  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 10909  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10910  	// result: (MOVWload [off1+int32(off2)] {sym} ptr mem)
 10911  	for {
 10912  		off1 := auxIntToInt32(v.AuxInt)
 10913  		sym := auxToSym(v.Aux)
 10914  		if v_0.Op != OpARM64ADDconst {
 10915  			break
 10916  		}
 10917  		off2 := auxIntToInt64(v_0.AuxInt)
 10918  		ptr := v_0.Args[0]
 10919  		mem := v_1
 10920  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10921  			break
 10922  		}
 10923  		v.reset(OpARM64MOVWload)
 10924  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10925  		v.Aux = symToAux(sym)
 10926  		v.AddArg2(ptr, mem)
 10927  		return true
 10928  	}
 10929  	// match: (MOVWload [off] {sym} (ADD ptr idx) mem)
 10930  	// cond: off == 0 && sym == nil
 10931  	// result: (MOVWloadidx ptr idx mem)
 10932  	for {
 10933  		off := auxIntToInt32(v.AuxInt)
 10934  		sym := auxToSym(v.Aux)
 10935  		if v_0.Op != OpARM64ADD {
 10936  			break
 10937  		}
 10938  		idx := v_0.Args[1]
 10939  		ptr := v_0.Args[0]
 10940  		mem := v_1
 10941  		if !(off == 0 && sym == nil) {
 10942  			break
 10943  		}
 10944  		v.reset(OpARM64MOVWloadidx)
 10945  		v.AddArg3(ptr, idx, mem)
 10946  		return true
 10947  	}
 10948  	// match: (MOVWload [off] {sym} (ADDshiftLL [2] ptr idx) mem)
 10949  	// cond: off == 0 && sym == nil
 10950  	// result: (MOVWloadidx4 ptr idx mem)
 10951  	for {
 10952  		off := auxIntToInt32(v.AuxInt)
 10953  		sym := auxToSym(v.Aux)
 10954  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 10955  			break
 10956  		}
 10957  		idx := v_0.Args[1]
 10958  		ptr := v_0.Args[0]
 10959  		mem := v_1
 10960  		if !(off == 0 && sym == nil) {
 10961  			break
 10962  		}
 10963  		v.reset(OpARM64MOVWloadidx4)
 10964  		v.AddArg3(ptr, idx, mem)
 10965  		return true
 10966  	}
 10967  	// match: (MOVWload [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) mem)
 10968  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 10969  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10970  	for {
 10971  		off1 := auxIntToInt32(v.AuxInt)
 10972  		sym1 := auxToSym(v.Aux)
 10973  		if v_0.Op != OpARM64MOVDaddr {
 10974  			break
 10975  		}
 10976  		off2 := auxIntToInt32(v_0.AuxInt)
 10977  		sym2 := auxToSym(v_0.Aux)
 10978  		ptr := v_0.Args[0]
 10979  		mem := v_1
 10980  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 10981  			break
 10982  		}
 10983  		v.reset(OpARM64MOVWload)
 10984  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10985  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10986  		v.AddArg2(ptr, mem)
 10987  		return true
 10988  	}
 10989  	// match: (MOVWload [off] {sym} (SB) _)
 10990  	// cond: symIsRO(sym)
 10991  	// result: (MOVDconst [int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
 10992  	for {
 10993  		off := auxIntToInt32(v.AuxInt)
 10994  		sym := auxToSym(v.Aux)
 10995  		if v_0.Op != OpSB || !(symIsRO(sym)) {
 10996  			break
 10997  		}
 10998  		v.reset(OpARM64MOVDconst)
 10999  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))))
 11000  		return true
 11001  	}
 11002  	return false
 11003  }
 11004  func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
 11005  	v_2 := v.Args[2]
 11006  	v_1 := v.Args[1]
 11007  	v_0 := v.Args[0]
 11008  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 11009  	// cond: is32Bit(c)
 11010  	// result: (MOVWload [int32(c)] ptr mem)
 11011  	for {
 11012  		ptr := v_0
 11013  		if v_1.Op != OpARM64MOVDconst {
 11014  			break
 11015  		}
 11016  		c := auxIntToInt64(v_1.AuxInt)
 11017  		mem := v_2
 11018  		if !(is32Bit(c)) {
 11019  			break
 11020  		}
 11021  		v.reset(OpARM64MOVWload)
 11022  		v.AuxInt = int32ToAuxInt(int32(c))
 11023  		v.AddArg2(ptr, mem)
 11024  		return true
 11025  	}
 11026  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 11027  	// cond: is32Bit(c)
 11028  	// result: (MOVWload [int32(c)] ptr mem)
 11029  	for {
 11030  		if v_0.Op != OpARM64MOVDconst {
 11031  			break
 11032  		}
 11033  		c := auxIntToInt64(v_0.AuxInt)
 11034  		ptr := v_1
 11035  		mem := v_2
 11036  		if !(is32Bit(c)) {
 11037  			break
 11038  		}
 11039  		v.reset(OpARM64MOVWload)
 11040  		v.AuxInt = int32ToAuxInt(int32(c))
 11041  		v.AddArg2(ptr, mem)
 11042  		return true
 11043  	}
 11044  	// match: (MOVWloadidx ptr (SLLconst [2] idx) mem)
 11045  	// result: (MOVWloadidx4 ptr idx mem)
 11046  	for {
 11047  		ptr := v_0
 11048  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11049  			break
 11050  		}
 11051  		idx := v_1.Args[0]
 11052  		mem := v_2
 11053  		v.reset(OpARM64MOVWloadidx4)
 11054  		v.AddArg3(ptr, idx, mem)
 11055  		return true
 11056  	}
 11057  	// match: (MOVWloadidx (SLLconst [2] idx) ptr mem)
 11058  	// result: (MOVWloadidx4 ptr idx mem)
 11059  	for {
 11060  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11061  			break
 11062  		}
 11063  		idx := v_0.Args[0]
 11064  		ptr := v_1
 11065  		mem := v_2
 11066  		v.reset(OpARM64MOVWloadidx4)
 11067  		v.AddArg3(ptr, idx, mem)
 11068  		return true
 11069  	}
 11070  	return false
 11071  }
 11072  func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
 11073  	v_2 := v.Args[2]
 11074  	v_1 := v.Args[1]
 11075  	v_0 := v.Args[0]
 11076  	// match: (MOVWloadidx4 ptr (MOVDconst [c]) mem)
 11077  	// cond: is32Bit(c<<2)
 11078  	// result: (MOVWload [int32(c)<<2] ptr mem)
 11079  	for {
 11080  		ptr := v_0
 11081  		if v_1.Op != OpARM64MOVDconst {
 11082  			break
 11083  		}
 11084  		c := auxIntToInt64(v_1.AuxInt)
 11085  		mem := v_2
 11086  		if !(is32Bit(c << 2)) {
 11087  			break
 11088  		}
 11089  		v.reset(OpARM64MOVWload)
 11090  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11091  		v.AddArg2(ptr, mem)
 11092  		return true
 11093  	}
 11094  	return false
 11095  }
 11096  func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
 11097  	v_0 := v.Args[0]
 11098  	// match: (MOVWreg (MOVDconst [c]))
 11099  	// result: (MOVDconst [int64(int32(c))])
 11100  	for {
 11101  		if v_0.Op != OpARM64MOVDconst {
 11102  			break
 11103  		}
 11104  		c := auxIntToInt64(v_0.AuxInt)
 11105  		v.reset(OpARM64MOVDconst)
 11106  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 11107  		return true
 11108  	}
 11109  	// match: (MOVWreg x)
 11110  	// cond: v.Type.Size() <= 4
 11111  	// result: x
 11112  	for {
 11113  		x := v_0
 11114  		if !(v.Type.Size() <= 4) {
 11115  			break
 11116  		}
 11117  		v.copyOf(x)
 11118  		return true
 11119  	}
 11120  	// match: (MOVWreg <t> (ANDconst x [c]))
 11121  	// cond: uint64(c) & uint64(0xffffffff80000000) == 0
 11122  	// result: (ANDconst <t> x [c])
 11123  	for {
 11124  		t := v.Type
 11125  		if v_0.Op != OpARM64ANDconst {
 11126  			break
 11127  		}
 11128  		c := auxIntToInt64(v_0.AuxInt)
 11129  		x := v_0.Args[0]
 11130  		if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
 11131  			break
 11132  		}
 11133  		v.reset(OpARM64ANDconst)
 11134  		v.Type = t
 11135  		v.AuxInt = int64ToAuxInt(c)
 11136  		v.AddArg(x)
 11137  		return true
 11138  	}
 11139  	// match: (MOVWreg (SLLconst [lc] x))
 11140  	// cond: lc < 32
 11141  	// result: (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
 11142  	for {
 11143  		if v_0.Op != OpARM64SLLconst {
 11144  			break
 11145  		}
 11146  		lc := auxIntToInt64(v_0.AuxInt)
 11147  		x := v_0.Args[0]
 11148  		if !(lc < 32) {
 11149  			break
 11150  		}
 11151  		v.reset(OpARM64SBFIZ)
 11152  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
 11153  		v.AddArg(x)
 11154  		return true
 11155  	}
 11156  	// match: (MOVWreg (SBFX [bfc] x))
 11157  	// cond: bfc.width() <= 32
 11158  	// result: (SBFX [bfc] x)
 11159  	for {
 11160  		if v_0.Op != OpARM64SBFX {
 11161  			break
 11162  		}
 11163  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 11164  		x := v_0.Args[0]
 11165  		if !(bfc.width() <= 32) {
 11166  			break
 11167  		}
 11168  		v.reset(OpARM64SBFX)
 11169  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 11170  		v.AddArg(x)
 11171  		return true
 11172  	}
 11173  	return false
 11174  }
 11175  func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
 11176  	v_2 := v.Args[2]
 11177  	v_1 := v.Args[1]
 11178  	v_0 := v.Args[0]
 11179  	b := v.Block
 11180  	config := b.Func.Config
 11181  	// match: (MOVWstore [off] {sym} ptr (FMOVSfpgp val) mem)
 11182  	// result: (FMOVSstore [off] {sym} ptr val mem)
 11183  	for {
 11184  		off := auxIntToInt32(v.AuxInt)
 11185  		sym := auxToSym(v.Aux)
 11186  		ptr := v_0
 11187  		if v_1.Op != OpARM64FMOVSfpgp {
 11188  			break
 11189  		}
 11190  		val := v_1.Args[0]
 11191  		mem := v_2
 11192  		v.reset(OpARM64FMOVSstore)
 11193  		v.AuxInt = int32ToAuxInt(off)
 11194  		v.Aux = symToAux(sym)
 11195  		v.AddArg3(ptr, val, mem)
 11196  		return true
 11197  	}
 11198  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 11199  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11200  	// result: (MOVWstore [off1+int32(off2)] {sym} ptr val mem)
 11201  	for {
 11202  		off1 := auxIntToInt32(v.AuxInt)
 11203  		sym := auxToSym(v.Aux)
 11204  		if v_0.Op != OpARM64ADDconst {
 11205  			break
 11206  		}
 11207  		off2 := auxIntToInt64(v_0.AuxInt)
 11208  		ptr := v_0.Args[0]
 11209  		val := v_1
 11210  		mem := v_2
 11211  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11212  			break
 11213  		}
 11214  		v.reset(OpARM64MOVWstore)
 11215  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11216  		v.Aux = symToAux(sym)
 11217  		v.AddArg3(ptr, val, mem)
 11218  		return true
 11219  	}
 11220  	// match: (MOVWstore [off] {sym} (ADD ptr idx) val mem)
 11221  	// cond: off == 0 && sym == nil
 11222  	// result: (MOVWstoreidx ptr idx val mem)
 11223  	for {
 11224  		off := auxIntToInt32(v.AuxInt)
 11225  		sym := auxToSym(v.Aux)
 11226  		if v_0.Op != OpARM64ADD {
 11227  			break
 11228  		}
 11229  		idx := v_0.Args[1]
 11230  		ptr := v_0.Args[0]
 11231  		val := v_1
 11232  		mem := v_2
 11233  		if !(off == 0 && sym == nil) {
 11234  			break
 11235  		}
 11236  		v.reset(OpARM64MOVWstoreidx)
 11237  		v.AddArg4(ptr, idx, val, mem)
 11238  		return true
 11239  	}
 11240  	// match: (MOVWstore [off] {sym} (ADDshiftLL [2] ptr idx) val mem)
 11241  	// cond: off == 0 && sym == nil
 11242  	// result: (MOVWstoreidx4 ptr idx val mem)
 11243  	for {
 11244  		off := auxIntToInt32(v.AuxInt)
 11245  		sym := auxToSym(v.Aux)
 11246  		if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
 11247  			break
 11248  		}
 11249  		idx := v_0.Args[1]
 11250  		ptr := v_0.Args[0]
 11251  		val := v_1
 11252  		mem := v_2
 11253  		if !(off == 0 && sym == nil) {
 11254  			break
 11255  		}
 11256  		v.reset(OpARM64MOVWstoreidx4)
 11257  		v.AddArg4(ptr, idx, val, mem)
 11258  		return true
 11259  	}
 11260  	// match: (MOVWstore [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val mem)
 11261  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 11262  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11263  	for {
 11264  		off1 := auxIntToInt32(v.AuxInt)
 11265  		sym1 := auxToSym(v.Aux)
 11266  		if v_0.Op != OpARM64MOVDaddr {
 11267  			break
 11268  		}
 11269  		off2 := auxIntToInt32(v_0.AuxInt)
 11270  		sym2 := auxToSym(v_0.Aux)
 11271  		ptr := v_0.Args[0]
 11272  		val := v_1
 11273  		mem := v_2
 11274  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 11275  			break
 11276  		}
 11277  		v.reset(OpARM64MOVWstore)
 11278  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11279  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11280  		v.AddArg3(ptr, val, mem)
 11281  		return true
 11282  	}
 11283  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 11284  	// result: (MOVWstore [off] {sym} ptr x mem)
 11285  	for {
 11286  		off := auxIntToInt32(v.AuxInt)
 11287  		sym := auxToSym(v.Aux)
 11288  		ptr := v_0
 11289  		if v_1.Op != OpARM64MOVWreg {
 11290  			break
 11291  		}
 11292  		x := v_1.Args[0]
 11293  		mem := v_2
 11294  		v.reset(OpARM64MOVWstore)
 11295  		v.AuxInt = int32ToAuxInt(off)
 11296  		v.Aux = symToAux(sym)
 11297  		v.AddArg3(ptr, x, mem)
 11298  		return true
 11299  	}
 11300  	// match: (MOVWstore [off] {sym} ptr (MOVWUreg x) mem)
 11301  	// result: (MOVWstore [off] {sym} ptr x mem)
 11302  	for {
 11303  		off := auxIntToInt32(v.AuxInt)
 11304  		sym := auxToSym(v.Aux)
 11305  		ptr := v_0
 11306  		if v_1.Op != OpARM64MOVWUreg {
 11307  			break
 11308  		}
 11309  		x := v_1.Args[0]
 11310  		mem := v_2
 11311  		v.reset(OpARM64MOVWstore)
 11312  		v.AuxInt = int32ToAuxInt(off)
 11313  		v.Aux = symToAux(sym)
 11314  		v.AddArg3(ptr, x, mem)
 11315  		return true
 11316  	}
 11317  	return false
 11318  }
 11319  func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
 11320  	v_3 := v.Args[3]
 11321  	v_2 := v.Args[2]
 11322  	v_1 := v.Args[1]
 11323  	v_0 := v.Args[0]
 11324  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 11325  	// cond: is32Bit(c)
 11326  	// result: (MOVWstore [int32(c)] ptr val mem)
 11327  	for {
 11328  		ptr := v_0
 11329  		if v_1.Op != OpARM64MOVDconst {
 11330  			break
 11331  		}
 11332  		c := auxIntToInt64(v_1.AuxInt)
 11333  		val := v_2
 11334  		mem := v_3
 11335  		if !(is32Bit(c)) {
 11336  			break
 11337  		}
 11338  		v.reset(OpARM64MOVWstore)
 11339  		v.AuxInt = int32ToAuxInt(int32(c))
 11340  		v.AddArg3(ptr, val, mem)
 11341  		return true
 11342  	}
 11343  	// match: (MOVWstoreidx (MOVDconst [c]) idx val mem)
 11344  	// cond: is32Bit(c)
 11345  	// result: (MOVWstore [int32(c)] idx val mem)
 11346  	for {
 11347  		if v_0.Op != OpARM64MOVDconst {
 11348  			break
 11349  		}
 11350  		c := auxIntToInt64(v_0.AuxInt)
 11351  		idx := v_1
 11352  		val := v_2
 11353  		mem := v_3
 11354  		if !(is32Bit(c)) {
 11355  			break
 11356  		}
 11357  		v.reset(OpARM64MOVWstore)
 11358  		v.AuxInt = int32ToAuxInt(int32(c))
 11359  		v.AddArg3(idx, val, mem)
 11360  		return true
 11361  	}
 11362  	// match: (MOVWstoreidx ptr (SLLconst [2] idx) val mem)
 11363  	// result: (MOVWstoreidx4 ptr idx val mem)
 11364  	for {
 11365  		ptr := v_0
 11366  		if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
 11367  			break
 11368  		}
 11369  		idx := v_1.Args[0]
 11370  		val := v_2
 11371  		mem := v_3
 11372  		v.reset(OpARM64MOVWstoreidx4)
 11373  		v.AddArg4(ptr, idx, val, mem)
 11374  		return true
 11375  	}
 11376  	// match: (MOVWstoreidx (SLLconst [2] idx) ptr val mem)
 11377  	// result: (MOVWstoreidx4 ptr idx val mem)
 11378  	for {
 11379  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
 11380  			break
 11381  		}
 11382  		idx := v_0.Args[0]
 11383  		ptr := v_1
 11384  		val := v_2
 11385  		mem := v_3
 11386  		v.reset(OpARM64MOVWstoreidx4)
 11387  		v.AddArg4(ptr, idx, val, mem)
 11388  		return true
 11389  	}
 11390  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 11391  	// result: (MOVWstoreidx ptr idx x mem)
 11392  	for {
 11393  		ptr := v_0
 11394  		idx := v_1
 11395  		if v_2.Op != OpARM64MOVWreg {
 11396  			break
 11397  		}
 11398  		x := v_2.Args[0]
 11399  		mem := v_3
 11400  		v.reset(OpARM64MOVWstoreidx)
 11401  		v.AddArg4(ptr, idx, x, mem)
 11402  		return true
 11403  	}
 11404  	// match: (MOVWstoreidx ptr idx (MOVWUreg x) mem)
 11405  	// result: (MOVWstoreidx ptr idx x mem)
 11406  	for {
 11407  		ptr := v_0
 11408  		idx := v_1
 11409  		if v_2.Op != OpARM64MOVWUreg {
 11410  			break
 11411  		}
 11412  		x := v_2.Args[0]
 11413  		mem := v_3
 11414  		v.reset(OpARM64MOVWstoreidx)
 11415  		v.AddArg4(ptr, idx, x, mem)
 11416  		return true
 11417  	}
 11418  	return false
 11419  }
 11420  func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
 11421  	v_3 := v.Args[3]
 11422  	v_2 := v.Args[2]
 11423  	v_1 := v.Args[1]
 11424  	v_0 := v.Args[0]
 11425  	// match: (MOVWstoreidx4 ptr (MOVDconst [c]) val mem)
 11426  	// cond: is32Bit(c<<2)
 11427  	// result: (MOVWstore [int32(c)<<2] ptr val mem)
 11428  	for {
 11429  		ptr := v_0
 11430  		if v_1.Op != OpARM64MOVDconst {
 11431  			break
 11432  		}
 11433  		c := auxIntToInt64(v_1.AuxInt)
 11434  		val := v_2
 11435  		mem := v_3
 11436  		if !(is32Bit(c << 2)) {
 11437  			break
 11438  		}
 11439  		v.reset(OpARM64MOVWstore)
 11440  		v.AuxInt = int32ToAuxInt(int32(c) << 2)
 11441  		v.AddArg3(ptr, val, mem)
 11442  		return true
 11443  	}
 11444  	// match: (MOVWstoreidx4 ptr idx (MOVWreg x) mem)
 11445  	// result: (MOVWstoreidx4 ptr idx x mem)
 11446  	for {
 11447  		ptr := v_0
 11448  		idx := v_1
 11449  		if v_2.Op != OpARM64MOVWreg {
 11450  			break
 11451  		}
 11452  		x := v_2.Args[0]
 11453  		mem := v_3
 11454  		v.reset(OpARM64MOVWstoreidx4)
 11455  		v.AddArg4(ptr, idx, x, mem)
 11456  		return true
 11457  	}
 11458  	// match: (MOVWstoreidx4 ptr idx (MOVWUreg x) mem)
 11459  	// result: (MOVWstoreidx4 ptr idx x mem)
 11460  	for {
 11461  		ptr := v_0
 11462  		idx := v_1
 11463  		if v_2.Op != OpARM64MOVWUreg {
 11464  			break
 11465  		}
 11466  		x := v_2.Args[0]
 11467  		mem := v_3
 11468  		v.reset(OpARM64MOVWstoreidx4)
 11469  		v.AddArg4(ptr, idx, x, mem)
 11470  		return true
 11471  	}
 11472  	return false
 11473  }
 11474  func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
 11475  	v_2 := v.Args[2]
 11476  	v_1 := v.Args[1]
 11477  	v_0 := v.Args[0]
 11478  	b := v.Block
 11479  	// match: (MSUB a x (MOVDconst [-1]))
 11480  	// result: (ADD a x)
 11481  	for {
 11482  		a := v_0
 11483  		x := v_1
 11484  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
 11485  			break
 11486  		}
 11487  		v.reset(OpARM64ADD)
 11488  		v.AddArg2(a, x)
 11489  		return true
 11490  	}
 11491  	// match: (MSUB a _ (MOVDconst [0]))
 11492  	// result: a
 11493  	for {
 11494  		a := v_0
 11495  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
 11496  			break
 11497  		}
 11498  		v.copyOf(a)
 11499  		return true
 11500  	}
 11501  	// match: (MSUB a x (MOVDconst [1]))
 11502  	// result: (SUB a x)
 11503  	for {
 11504  		a := v_0
 11505  		x := v_1
 11506  		if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
 11507  			break
 11508  		}
 11509  		v.reset(OpARM64SUB)
 11510  		v.AddArg2(a, x)
 11511  		return true
 11512  	}
 11513  	// match: (MSUB a x (MOVDconst [c]))
 11514  	// cond: isPowerOfTwo(c)
 11515  	// result: (SUBshiftLL a x [log64(c)])
 11516  	for {
 11517  		a := v_0
 11518  		x := v_1
 11519  		if v_2.Op != OpARM64MOVDconst {
 11520  			break
 11521  		}
 11522  		c := auxIntToInt64(v_2.AuxInt)
 11523  		if !(isPowerOfTwo(c)) {
 11524  			break
 11525  		}
 11526  		v.reset(OpARM64SUBshiftLL)
 11527  		v.AuxInt = int64ToAuxInt(log64(c))
 11528  		v.AddArg2(a, x)
 11529  		return true
 11530  	}
 11531  	// match: (MSUB a x (MOVDconst [c]))
 11532  	// cond: isPowerOfTwo(c-1) && c>=3
 11533  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 11534  	for {
 11535  		a := v_0
 11536  		x := v_1
 11537  		if v_2.Op != OpARM64MOVDconst {
 11538  			break
 11539  		}
 11540  		c := auxIntToInt64(v_2.AuxInt)
 11541  		if !(isPowerOfTwo(c-1) && c >= 3) {
 11542  			break
 11543  		}
 11544  		v.reset(OpARM64SUB)
 11545  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11546  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 11547  		v0.AddArg2(x, x)
 11548  		v.AddArg2(a, v0)
 11549  		return true
 11550  	}
 11551  	// match: (MSUB a x (MOVDconst [c]))
 11552  	// cond: isPowerOfTwo(c+1) && c>=7
 11553  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 11554  	for {
 11555  		a := v_0
 11556  		x := v_1
 11557  		if v_2.Op != OpARM64MOVDconst {
 11558  			break
 11559  		}
 11560  		c := auxIntToInt64(v_2.AuxInt)
 11561  		if !(isPowerOfTwo(c+1) && c >= 7) {
 11562  			break
 11563  		}
 11564  		v.reset(OpARM64ADD)
 11565  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11566  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 11567  		v0.AddArg2(x, x)
 11568  		v.AddArg2(a, v0)
 11569  		return true
 11570  	}
 11571  	// match: (MSUB a x (MOVDconst [c]))
 11572  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 11573  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 11574  	for {
 11575  		a := v_0
 11576  		x := v_1
 11577  		if v_2.Op != OpARM64MOVDconst {
 11578  			break
 11579  		}
 11580  		c := auxIntToInt64(v_2.AuxInt)
 11581  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 11582  			break
 11583  		}
 11584  		v.reset(OpARM64ADDshiftLL)
 11585  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 11586  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11587  		v0.AuxInt = int64ToAuxInt(2)
 11588  		v0.AddArg2(x, x)
 11589  		v.AddArg2(a, v0)
 11590  		return true
 11591  	}
 11592  	// match: (MSUB a x (MOVDconst [c]))
 11593  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 11594  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 11595  	for {
 11596  		a := v_0
 11597  		x := v_1
 11598  		if v_2.Op != OpARM64MOVDconst {
 11599  			break
 11600  		}
 11601  		c := auxIntToInt64(v_2.AuxInt)
 11602  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 11603  			break
 11604  		}
 11605  		v.reset(OpARM64SUBshiftLL)
 11606  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 11607  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11608  		v0.AuxInt = int64ToAuxInt(2)
 11609  		v0.AddArg2(x, x)
 11610  		v.AddArg2(a, v0)
 11611  		return true
 11612  	}
 11613  	// match: (MSUB a x (MOVDconst [c]))
 11614  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 11615  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 11616  	for {
 11617  		a := v_0
 11618  		x := v_1
 11619  		if v_2.Op != OpARM64MOVDconst {
 11620  			break
 11621  		}
 11622  		c := auxIntToInt64(v_2.AuxInt)
 11623  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 11624  			break
 11625  		}
 11626  		v.reset(OpARM64ADDshiftLL)
 11627  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 11628  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11629  		v0.AuxInt = int64ToAuxInt(3)
 11630  		v0.AddArg2(x, x)
 11631  		v.AddArg2(a, v0)
 11632  		return true
 11633  	}
 11634  	// match: (MSUB a x (MOVDconst [c]))
 11635  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 11636  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 11637  	for {
 11638  		a := v_0
 11639  		x := v_1
 11640  		if v_2.Op != OpARM64MOVDconst {
 11641  			break
 11642  		}
 11643  		c := auxIntToInt64(v_2.AuxInt)
 11644  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 11645  			break
 11646  		}
 11647  		v.reset(OpARM64SUBshiftLL)
 11648  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 11649  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11650  		v0.AuxInt = int64ToAuxInt(3)
 11651  		v0.AddArg2(x, x)
 11652  		v.AddArg2(a, v0)
 11653  		return true
 11654  	}
 11655  	// match: (MSUB a (MOVDconst [-1]) x)
 11656  	// result: (ADD a x)
 11657  	for {
 11658  		a := v_0
 11659  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 11660  			break
 11661  		}
 11662  		x := v_2
 11663  		v.reset(OpARM64ADD)
 11664  		v.AddArg2(a, x)
 11665  		return true
 11666  	}
 11667  	// match: (MSUB a (MOVDconst [0]) _)
 11668  	// result: a
 11669  	for {
 11670  		a := v_0
 11671  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 11672  			break
 11673  		}
 11674  		v.copyOf(a)
 11675  		return true
 11676  	}
 11677  	// match: (MSUB a (MOVDconst [1]) x)
 11678  	// result: (SUB a x)
 11679  	for {
 11680  		a := v_0
 11681  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 11682  			break
 11683  		}
 11684  		x := v_2
 11685  		v.reset(OpARM64SUB)
 11686  		v.AddArg2(a, x)
 11687  		return true
 11688  	}
 11689  	// match: (MSUB a (MOVDconst [c]) x)
 11690  	// cond: isPowerOfTwo(c)
 11691  	// result: (SUBshiftLL a x [log64(c)])
 11692  	for {
 11693  		a := v_0
 11694  		if v_1.Op != OpARM64MOVDconst {
 11695  			break
 11696  		}
 11697  		c := auxIntToInt64(v_1.AuxInt)
 11698  		x := v_2
 11699  		if !(isPowerOfTwo(c)) {
 11700  			break
 11701  		}
 11702  		v.reset(OpARM64SUBshiftLL)
 11703  		v.AuxInt = int64ToAuxInt(log64(c))
 11704  		v.AddArg2(a, x)
 11705  		return true
 11706  	}
 11707  	// match: (MSUB a (MOVDconst [c]) x)
 11708  	// cond: isPowerOfTwo(c-1) && c>=3
 11709  	// result: (SUB a (ADDshiftLL <x.Type> x x [log64(c-1)]))
 11710  	for {
 11711  		a := v_0
 11712  		if v_1.Op != OpARM64MOVDconst {
 11713  			break
 11714  		}
 11715  		c := auxIntToInt64(v_1.AuxInt)
 11716  		x := v_2
 11717  		if !(isPowerOfTwo(c-1) && c >= 3) {
 11718  			break
 11719  		}
 11720  		v.reset(OpARM64SUB)
 11721  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11722  		v0.AuxInt = int64ToAuxInt(log64(c - 1))
 11723  		v0.AddArg2(x, x)
 11724  		v.AddArg2(a, v0)
 11725  		return true
 11726  	}
 11727  	// match: (MSUB a (MOVDconst [c]) x)
 11728  	// cond: isPowerOfTwo(c+1) && c>=7
 11729  	// result: (ADD a (SUBshiftLL <x.Type> x x [log64(c+1)]))
 11730  	for {
 11731  		a := v_0
 11732  		if v_1.Op != OpARM64MOVDconst {
 11733  			break
 11734  		}
 11735  		c := auxIntToInt64(v_1.AuxInt)
 11736  		x := v_2
 11737  		if !(isPowerOfTwo(c+1) && c >= 7) {
 11738  			break
 11739  		}
 11740  		v.reset(OpARM64ADD)
 11741  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11742  		v0.AuxInt = int64ToAuxInt(log64(c + 1))
 11743  		v0.AddArg2(x, x)
 11744  		v.AddArg2(a, v0)
 11745  		return true
 11746  	}
 11747  	// match: (MSUB a (MOVDconst [c]) x)
 11748  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
 11749  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)])
 11750  	for {
 11751  		a := v_0
 11752  		if v_1.Op != OpARM64MOVDconst {
 11753  			break
 11754  		}
 11755  		c := auxIntToInt64(v_1.AuxInt)
 11756  		x := v_2
 11757  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
 11758  			break
 11759  		}
 11760  		v.reset(OpARM64ADDshiftLL)
 11761  		v.AuxInt = int64ToAuxInt(log64(c / 3))
 11762  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11763  		v0.AuxInt = int64ToAuxInt(2)
 11764  		v0.AddArg2(x, x)
 11765  		v.AddArg2(a, v0)
 11766  		return true
 11767  	}
 11768  	// match: (MSUB a (MOVDconst [c]) x)
 11769  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
 11770  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)])
 11771  	for {
 11772  		a := v_0
 11773  		if v_1.Op != OpARM64MOVDconst {
 11774  			break
 11775  		}
 11776  		c := auxIntToInt64(v_1.AuxInt)
 11777  		x := v_2
 11778  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
 11779  			break
 11780  		}
 11781  		v.reset(OpARM64SUBshiftLL)
 11782  		v.AuxInt = int64ToAuxInt(log64(c / 5))
 11783  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11784  		v0.AuxInt = int64ToAuxInt(2)
 11785  		v0.AddArg2(x, x)
 11786  		v.AddArg2(a, v0)
 11787  		return true
 11788  	}
 11789  	// match: (MSUB a (MOVDconst [c]) x)
 11790  	// cond: c%7 == 0 && isPowerOfTwo(c/7)
 11791  	// result: (ADDshiftLL a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)])
 11792  	for {
 11793  		a := v_0
 11794  		if v_1.Op != OpARM64MOVDconst {
 11795  			break
 11796  		}
 11797  		c := auxIntToInt64(v_1.AuxInt)
 11798  		x := v_2
 11799  		if !(c%7 == 0 && isPowerOfTwo(c/7)) {
 11800  			break
 11801  		}
 11802  		v.reset(OpARM64ADDshiftLL)
 11803  		v.AuxInt = int64ToAuxInt(log64(c / 7))
 11804  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11805  		v0.AuxInt = int64ToAuxInt(3)
 11806  		v0.AddArg2(x, x)
 11807  		v.AddArg2(a, v0)
 11808  		return true
 11809  	}
 11810  	// match: (MSUB a (MOVDconst [c]) x)
 11811  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
 11812  	// result: (SUBshiftLL a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)])
 11813  	for {
 11814  		a := v_0
 11815  		if v_1.Op != OpARM64MOVDconst {
 11816  			break
 11817  		}
 11818  		c := auxIntToInt64(v_1.AuxInt)
 11819  		x := v_2
 11820  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
 11821  			break
 11822  		}
 11823  		v.reset(OpARM64SUBshiftLL)
 11824  		v.AuxInt = int64ToAuxInt(log64(c / 9))
 11825  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11826  		v0.AuxInt = int64ToAuxInt(3)
 11827  		v0.AddArg2(x, x)
 11828  		v.AddArg2(a, v0)
 11829  		return true
 11830  	}
 11831  	// match: (MSUB (MOVDconst [c]) x y)
 11832  	// result: (ADDconst [c] (MNEG <x.Type> x y))
 11833  	for {
 11834  		if v_0.Op != OpARM64MOVDconst {
 11835  			break
 11836  		}
 11837  		c := auxIntToInt64(v_0.AuxInt)
 11838  		x := v_1
 11839  		y := v_2
 11840  		v.reset(OpARM64ADDconst)
 11841  		v.AuxInt = int64ToAuxInt(c)
 11842  		v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
 11843  		v0.AddArg2(x, y)
 11844  		v.AddArg(v0)
 11845  		return true
 11846  	}
 11847  	// match: (MSUB a (MOVDconst [c]) (MOVDconst [d]))
 11848  	// result: (SUBconst [c*d] a)
 11849  	for {
 11850  		a := v_0
 11851  		if v_1.Op != OpARM64MOVDconst {
 11852  			break
 11853  		}
 11854  		c := auxIntToInt64(v_1.AuxInt)
 11855  		if v_2.Op != OpARM64MOVDconst {
 11856  			break
 11857  		}
 11858  		d := auxIntToInt64(v_2.AuxInt)
 11859  		v.reset(OpARM64SUBconst)
 11860  		v.AuxInt = int64ToAuxInt(c * d)
 11861  		v.AddArg(a)
 11862  		return true
 11863  	}
 11864  	return false
 11865  }
 11866  func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
 11867  	v_2 := v.Args[2]
 11868  	v_1 := v.Args[1]
 11869  	v_0 := v.Args[0]
 11870  	b := v.Block
 11871  	// match: (MSUBW a x (MOVDconst [c]))
 11872  	// cond: int32(c)==-1
 11873  	// result: (MOVWUreg (ADD <a.Type> a x))
 11874  	for {
 11875  		a := v_0
 11876  		x := v_1
 11877  		if v_2.Op != OpARM64MOVDconst {
 11878  			break
 11879  		}
 11880  		c := auxIntToInt64(v_2.AuxInt)
 11881  		if !(int32(c) == -1) {
 11882  			break
 11883  		}
 11884  		v.reset(OpARM64MOVWUreg)
 11885  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 11886  		v0.AddArg2(a, x)
 11887  		v.AddArg(v0)
 11888  		return true
 11889  	}
 11890  	// match: (MSUBW a _ (MOVDconst [c]))
 11891  	// cond: int32(c)==0
 11892  	// result: (MOVWUreg a)
 11893  	for {
 11894  		a := v_0
 11895  		if v_2.Op != OpARM64MOVDconst {
 11896  			break
 11897  		}
 11898  		c := auxIntToInt64(v_2.AuxInt)
 11899  		if !(int32(c) == 0) {
 11900  			break
 11901  		}
 11902  		v.reset(OpARM64MOVWUreg)
 11903  		v.AddArg(a)
 11904  		return true
 11905  	}
 11906  	// match: (MSUBW a x (MOVDconst [c]))
 11907  	// cond: int32(c)==1
 11908  	// result: (MOVWUreg (SUB <a.Type> a x))
 11909  	for {
 11910  		a := v_0
 11911  		x := v_1
 11912  		if v_2.Op != OpARM64MOVDconst {
 11913  			break
 11914  		}
 11915  		c := auxIntToInt64(v_2.AuxInt)
 11916  		if !(int32(c) == 1) {
 11917  			break
 11918  		}
 11919  		v.reset(OpARM64MOVWUreg)
 11920  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 11921  		v0.AddArg2(a, x)
 11922  		v.AddArg(v0)
 11923  		return true
 11924  	}
 11925  	// match: (MSUBW a x (MOVDconst [c]))
 11926  	// cond: isPowerOfTwo(c)
 11927  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 11928  	for {
 11929  		a := v_0
 11930  		x := v_1
 11931  		if v_2.Op != OpARM64MOVDconst {
 11932  			break
 11933  		}
 11934  		c := auxIntToInt64(v_2.AuxInt)
 11935  		if !(isPowerOfTwo(c)) {
 11936  			break
 11937  		}
 11938  		v.reset(OpARM64MOVWUreg)
 11939  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 11940  		v0.AuxInt = int64ToAuxInt(log64(c))
 11941  		v0.AddArg2(a, x)
 11942  		v.AddArg(v0)
 11943  		return true
 11944  	}
 11945  	// match: (MSUBW a x (MOVDconst [c]))
 11946  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 11947  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 11948  	for {
 11949  		a := v_0
 11950  		x := v_1
 11951  		if v_2.Op != OpARM64MOVDconst {
 11952  			break
 11953  		}
 11954  		c := auxIntToInt64(v_2.AuxInt)
 11955  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 11956  			break
 11957  		}
 11958  		v.reset(OpARM64MOVWUreg)
 11959  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 11960  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 11961  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 11962  		v1.AddArg2(x, x)
 11963  		v0.AddArg2(a, v1)
 11964  		v.AddArg(v0)
 11965  		return true
 11966  	}
 11967  	// match: (MSUBW a x (MOVDconst [c]))
 11968  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 11969  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 11970  	for {
 11971  		a := v_0
 11972  		x := v_1
 11973  		if v_2.Op != OpARM64MOVDconst {
 11974  			break
 11975  		}
 11976  		c := auxIntToInt64(v_2.AuxInt)
 11977  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 11978  			break
 11979  		}
 11980  		v.reset(OpARM64MOVWUreg)
 11981  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 11982  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 11983  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 11984  		v1.AddArg2(x, x)
 11985  		v0.AddArg2(a, v1)
 11986  		v.AddArg(v0)
 11987  		return true
 11988  	}
 11989  	// match: (MSUBW a x (MOVDconst [c]))
 11990  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 11991  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 11992  	for {
 11993  		a := v_0
 11994  		x := v_1
 11995  		if v_2.Op != OpARM64MOVDconst {
 11996  			break
 11997  		}
 11998  		c := auxIntToInt64(v_2.AuxInt)
 11999  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12000  			break
 12001  		}
 12002  		v.reset(OpARM64MOVWUreg)
 12003  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12004  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12005  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12006  		v1.AuxInt = int64ToAuxInt(2)
 12007  		v1.AddArg2(x, x)
 12008  		v0.AddArg2(a, v1)
 12009  		v.AddArg(v0)
 12010  		return true
 12011  	}
 12012  	// match: (MSUBW a x (MOVDconst [c]))
 12013  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12014  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12015  	for {
 12016  		a := v_0
 12017  		x := v_1
 12018  		if v_2.Op != OpARM64MOVDconst {
 12019  			break
 12020  		}
 12021  		c := auxIntToInt64(v_2.AuxInt)
 12022  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12023  			break
 12024  		}
 12025  		v.reset(OpARM64MOVWUreg)
 12026  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12027  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12028  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12029  		v1.AuxInt = int64ToAuxInt(2)
 12030  		v1.AddArg2(x, x)
 12031  		v0.AddArg2(a, v1)
 12032  		v.AddArg(v0)
 12033  		return true
 12034  	}
 12035  	// match: (MSUBW a x (MOVDconst [c]))
 12036  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12037  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12038  	for {
 12039  		a := v_0
 12040  		x := v_1
 12041  		if v_2.Op != OpARM64MOVDconst {
 12042  			break
 12043  		}
 12044  		c := auxIntToInt64(v_2.AuxInt)
 12045  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12046  			break
 12047  		}
 12048  		v.reset(OpARM64MOVWUreg)
 12049  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12050  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12051  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12052  		v1.AuxInt = int64ToAuxInt(3)
 12053  		v1.AddArg2(x, x)
 12054  		v0.AddArg2(a, v1)
 12055  		v.AddArg(v0)
 12056  		return true
 12057  	}
 12058  	// match: (MSUBW a x (MOVDconst [c]))
 12059  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12060  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12061  	for {
 12062  		a := v_0
 12063  		x := v_1
 12064  		if v_2.Op != OpARM64MOVDconst {
 12065  			break
 12066  		}
 12067  		c := auxIntToInt64(v_2.AuxInt)
 12068  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12069  			break
 12070  		}
 12071  		v.reset(OpARM64MOVWUreg)
 12072  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12073  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12074  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12075  		v1.AuxInt = int64ToAuxInt(3)
 12076  		v1.AddArg2(x, x)
 12077  		v0.AddArg2(a, v1)
 12078  		v.AddArg(v0)
 12079  		return true
 12080  	}
 12081  	// match: (MSUBW a (MOVDconst [c]) x)
 12082  	// cond: int32(c)==-1
 12083  	// result: (MOVWUreg (ADD <a.Type> a x))
 12084  	for {
 12085  		a := v_0
 12086  		if v_1.Op != OpARM64MOVDconst {
 12087  			break
 12088  		}
 12089  		c := auxIntToInt64(v_1.AuxInt)
 12090  		x := v_2
 12091  		if !(int32(c) == -1) {
 12092  			break
 12093  		}
 12094  		v.reset(OpARM64MOVWUreg)
 12095  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12096  		v0.AddArg2(a, x)
 12097  		v.AddArg(v0)
 12098  		return true
 12099  	}
 12100  	// match: (MSUBW a (MOVDconst [c]) _)
 12101  	// cond: int32(c)==0
 12102  	// result: (MOVWUreg a)
 12103  	for {
 12104  		a := v_0
 12105  		if v_1.Op != OpARM64MOVDconst {
 12106  			break
 12107  		}
 12108  		c := auxIntToInt64(v_1.AuxInt)
 12109  		if !(int32(c) == 0) {
 12110  			break
 12111  		}
 12112  		v.reset(OpARM64MOVWUreg)
 12113  		v.AddArg(a)
 12114  		return true
 12115  	}
 12116  	// match: (MSUBW a (MOVDconst [c]) x)
 12117  	// cond: int32(c)==1
 12118  	// result: (MOVWUreg (SUB <a.Type> a x))
 12119  	for {
 12120  		a := v_0
 12121  		if v_1.Op != OpARM64MOVDconst {
 12122  			break
 12123  		}
 12124  		c := auxIntToInt64(v_1.AuxInt)
 12125  		x := v_2
 12126  		if !(int32(c) == 1) {
 12127  			break
 12128  		}
 12129  		v.reset(OpARM64MOVWUreg)
 12130  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12131  		v0.AddArg2(a, x)
 12132  		v.AddArg(v0)
 12133  		return true
 12134  	}
 12135  	// match: (MSUBW a (MOVDconst [c]) x)
 12136  	// cond: isPowerOfTwo(c)
 12137  	// result: (MOVWUreg (SUBshiftLL <a.Type> a x [log64(c)]))
 12138  	for {
 12139  		a := v_0
 12140  		if v_1.Op != OpARM64MOVDconst {
 12141  			break
 12142  		}
 12143  		c := auxIntToInt64(v_1.AuxInt)
 12144  		x := v_2
 12145  		if !(isPowerOfTwo(c)) {
 12146  			break
 12147  		}
 12148  		v.reset(OpARM64MOVWUreg)
 12149  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12150  		v0.AuxInt = int64ToAuxInt(log64(c))
 12151  		v0.AddArg2(a, x)
 12152  		v.AddArg(v0)
 12153  		return true
 12154  	}
 12155  	// match: (MSUBW a (MOVDconst [c]) x)
 12156  	// cond: isPowerOfTwo(c-1) && int32(c)>=3
 12157  	// result: (MOVWUreg (SUB <a.Type> a (ADDshiftLL <x.Type> x x [log64(c-1)])))
 12158  	for {
 12159  		a := v_0
 12160  		if v_1.Op != OpARM64MOVDconst {
 12161  			break
 12162  		}
 12163  		c := auxIntToInt64(v_1.AuxInt)
 12164  		x := v_2
 12165  		if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
 12166  			break
 12167  		}
 12168  		v.reset(OpARM64MOVWUreg)
 12169  		v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
 12170  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12171  		v1.AuxInt = int64ToAuxInt(log64(c - 1))
 12172  		v1.AddArg2(x, x)
 12173  		v0.AddArg2(a, v1)
 12174  		v.AddArg(v0)
 12175  		return true
 12176  	}
 12177  	// match: (MSUBW a (MOVDconst [c]) x)
 12178  	// cond: isPowerOfTwo(c+1) && int32(c)>=7
 12179  	// result: (MOVWUreg (ADD <a.Type> a (SUBshiftLL <x.Type> x x [log64(c+1)])))
 12180  	for {
 12181  		a := v_0
 12182  		if v_1.Op != OpARM64MOVDconst {
 12183  			break
 12184  		}
 12185  		c := auxIntToInt64(v_1.AuxInt)
 12186  		x := v_2
 12187  		if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
 12188  			break
 12189  		}
 12190  		v.reset(OpARM64MOVWUreg)
 12191  		v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
 12192  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12193  		v1.AuxInt = int64ToAuxInt(log64(c + 1))
 12194  		v1.AddArg2(x, x)
 12195  		v0.AddArg2(a, v1)
 12196  		v.AddArg(v0)
 12197  		return true
 12198  	}
 12199  	// match: (MSUBW a (MOVDconst [c]) x)
 12200  	// cond: c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)
 12201  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [2]) [log64(c/3)]))
 12202  	for {
 12203  		a := v_0
 12204  		if v_1.Op != OpARM64MOVDconst {
 12205  			break
 12206  		}
 12207  		c := auxIntToInt64(v_1.AuxInt)
 12208  		x := v_2
 12209  		if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
 12210  			break
 12211  		}
 12212  		v.reset(OpARM64MOVWUreg)
 12213  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12214  		v0.AuxInt = int64ToAuxInt(log64(c / 3))
 12215  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12216  		v1.AuxInt = int64ToAuxInt(2)
 12217  		v1.AddArg2(x, x)
 12218  		v0.AddArg2(a, v1)
 12219  		v.AddArg(v0)
 12220  		return true
 12221  	}
 12222  	// match: (MSUBW a (MOVDconst [c]) x)
 12223  	// cond: c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)
 12224  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [2]) [log64(c/5)]))
 12225  	for {
 12226  		a := v_0
 12227  		if v_1.Op != OpARM64MOVDconst {
 12228  			break
 12229  		}
 12230  		c := auxIntToInt64(v_1.AuxInt)
 12231  		x := v_2
 12232  		if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
 12233  			break
 12234  		}
 12235  		v.reset(OpARM64MOVWUreg)
 12236  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12237  		v0.AuxInt = int64ToAuxInt(log64(c / 5))
 12238  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12239  		v1.AuxInt = int64ToAuxInt(2)
 12240  		v1.AddArg2(x, x)
 12241  		v0.AddArg2(a, v1)
 12242  		v.AddArg(v0)
 12243  		return true
 12244  	}
 12245  	// match: (MSUBW a (MOVDconst [c]) x)
 12246  	// cond: c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)
 12247  	// result: (MOVWUreg (ADDshiftLL <a.Type> a (SUBshiftLL <x.Type> x x [3]) [log64(c/7)]))
 12248  	for {
 12249  		a := v_0
 12250  		if v_1.Op != OpARM64MOVDconst {
 12251  			break
 12252  		}
 12253  		c := auxIntToInt64(v_1.AuxInt)
 12254  		x := v_2
 12255  		if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
 12256  			break
 12257  		}
 12258  		v.reset(OpARM64MOVWUreg)
 12259  		v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
 12260  		v0.AuxInt = int64ToAuxInt(log64(c / 7))
 12261  		v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
 12262  		v1.AuxInt = int64ToAuxInt(3)
 12263  		v1.AddArg2(x, x)
 12264  		v0.AddArg2(a, v1)
 12265  		v.AddArg(v0)
 12266  		return true
 12267  	}
 12268  	// match: (MSUBW a (MOVDconst [c]) x)
 12269  	// cond: c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)
 12270  	// result: (MOVWUreg (SUBshiftLL <a.Type> a (ADDshiftLL <x.Type> x x [3]) [log64(c/9)]))
 12271  	for {
 12272  		a := v_0
 12273  		if v_1.Op != OpARM64MOVDconst {
 12274  			break
 12275  		}
 12276  		c := auxIntToInt64(v_1.AuxInt)
 12277  		x := v_2
 12278  		if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
 12279  			break
 12280  		}
 12281  		v.reset(OpARM64MOVWUreg)
 12282  		v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
 12283  		v0.AuxInt = int64ToAuxInt(log64(c / 9))
 12284  		v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
 12285  		v1.AuxInt = int64ToAuxInt(3)
 12286  		v1.AddArg2(x, x)
 12287  		v0.AddArg2(a, v1)
 12288  		v.AddArg(v0)
 12289  		return true
 12290  	}
 12291  	// match: (MSUBW (MOVDconst [c]) x y)
 12292  	// result: (MOVWUreg (ADDconst <x.Type> [c] (MNEGW <x.Type> x y)))
 12293  	for {
 12294  		if v_0.Op != OpARM64MOVDconst {
 12295  			break
 12296  		}
 12297  		c := auxIntToInt64(v_0.AuxInt)
 12298  		x := v_1
 12299  		y := v_2
 12300  		v.reset(OpARM64MOVWUreg)
 12301  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
 12302  		v0.AuxInt = int64ToAuxInt(c)
 12303  		v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
 12304  		v1.AddArg2(x, y)
 12305  		v0.AddArg(v1)
 12306  		v.AddArg(v0)
 12307  		return true
 12308  	}
 12309  	// match: (MSUBW a (MOVDconst [c]) (MOVDconst [d]))
 12310  	// result: (MOVWUreg (SUBconst <a.Type> [c*d] a))
 12311  	for {
 12312  		a := v_0
 12313  		if v_1.Op != OpARM64MOVDconst {
 12314  			break
 12315  		}
 12316  		c := auxIntToInt64(v_1.AuxInt)
 12317  		if v_2.Op != OpARM64MOVDconst {
 12318  			break
 12319  		}
 12320  		d := auxIntToInt64(v_2.AuxInt)
 12321  		v.reset(OpARM64MOVWUreg)
 12322  		v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
 12323  		v0.AuxInt = int64ToAuxInt(c * d)
 12324  		v0.AddArg(a)
 12325  		v.AddArg(v0)
 12326  		return true
 12327  	}
 12328  	return false
 12329  }
 12330  func rewriteValueARM64_OpARM64MUL(v *Value) bool {
 12331  	v_1 := v.Args[1]
 12332  	v_0 := v.Args[0]
 12333  	b := v.Block
 12334  	config := b.Func.Config
 12335  	// match: (MUL (NEG x) y)
 12336  	// result: (MNEG x y)
 12337  	for {
 12338  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12339  			if v_0.Op != OpARM64NEG {
 12340  				continue
 12341  			}
 12342  			x := v_0.Args[0]
 12343  			y := v_1
 12344  			v.reset(OpARM64MNEG)
 12345  			v.AddArg2(x, y)
 12346  			return true
 12347  		}
 12348  		break
 12349  	}
 12350  	// match: (MUL _ (MOVDconst [0]))
 12351  	// result: (MOVDconst [0])
 12352  	for {
 12353  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12354  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 12355  				continue
 12356  			}
 12357  			v.reset(OpARM64MOVDconst)
 12358  			v.AuxInt = int64ToAuxInt(0)
 12359  			return true
 12360  		}
 12361  		break
 12362  	}
 12363  	// match: (MUL x (MOVDconst [1]))
 12364  	// result: x
 12365  	for {
 12366  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12367  			x := v_0
 12368  			if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 12369  				continue
 12370  			}
 12371  			v.copyOf(x)
 12372  			return true
 12373  		}
 12374  		break
 12375  	}
 12376  	// match: (MUL x (MOVDconst [c]))
 12377  	// cond: canMulStrengthReduce(config, c)
 12378  	// result: {mulStrengthReduce(v, x, c)}
 12379  	for {
 12380  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12381  			x := v_0
 12382  			if v_1.Op != OpARM64MOVDconst {
 12383  				continue
 12384  			}
 12385  			c := auxIntToInt64(v_1.AuxInt)
 12386  			if !(canMulStrengthReduce(config, c)) {
 12387  				continue
 12388  			}
 12389  			v.copyOf(mulStrengthReduce(v, x, c))
 12390  			return true
 12391  		}
 12392  		break
 12393  	}
 12394  	// match: (MUL (MOVDconst [c]) (MOVDconst [d]))
 12395  	// result: (MOVDconst [c*d])
 12396  	for {
 12397  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12398  			if v_0.Op != OpARM64MOVDconst {
 12399  				continue
 12400  			}
 12401  			c := auxIntToInt64(v_0.AuxInt)
 12402  			if v_1.Op != OpARM64MOVDconst {
 12403  				continue
 12404  			}
 12405  			d := auxIntToInt64(v_1.AuxInt)
 12406  			v.reset(OpARM64MOVDconst)
 12407  			v.AuxInt = int64ToAuxInt(c * d)
 12408  			return true
 12409  		}
 12410  		break
 12411  	}
 12412  	return false
 12413  }
 12414  func rewriteValueARM64_OpARM64MULW(v *Value) bool {
 12415  	v_1 := v.Args[1]
 12416  	v_0 := v.Args[0]
 12417  	b := v.Block
 12418  	config := b.Func.Config
 12419  	// match: (MULW (NEG x) y)
 12420  	// result: (MNEGW x y)
 12421  	for {
 12422  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12423  			if v_0.Op != OpARM64NEG {
 12424  				continue
 12425  			}
 12426  			x := v_0.Args[0]
 12427  			y := v_1
 12428  			v.reset(OpARM64MNEGW)
 12429  			v.AddArg2(x, y)
 12430  			return true
 12431  		}
 12432  		break
 12433  	}
 12434  	// match: (MULW _ (MOVDconst [c]))
 12435  	// cond: int32(c)==0
 12436  	// result: (MOVDconst [0])
 12437  	for {
 12438  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12439  			if v_1.Op != OpARM64MOVDconst {
 12440  				continue
 12441  			}
 12442  			c := auxIntToInt64(v_1.AuxInt)
 12443  			if !(int32(c) == 0) {
 12444  				continue
 12445  			}
 12446  			v.reset(OpARM64MOVDconst)
 12447  			v.AuxInt = int64ToAuxInt(0)
 12448  			return true
 12449  		}
 12450  		break
 12451  	}
 12452  	// match: (MULW x (MOVDconst [c]))
 12453  	// cond: int32(c)==1
 12454  	// result: (MOVWUreg x)
 12455  	for {
 12456  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12457  			x := v_0
 12458  			if v_1.Op != OpARM64MOVDconst {
 12459  				continue
 12460  			}
 12461  			c := auxIntToInt64(v_1.AuxInt)
 12462  			if !(int32(c) == 1) {
 12463  				continue
 12464  			}
 12465  			v.reset(OpARM64MOVWUreg)
 12466  			v.AddArg(x)
 12467  			return true
 12468  		}
 12469  		break
 12470  	}
 12471  	// match: (MULW x (MOVDconst [c]))
 12472  	// cond: v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))
 12473  	// result: {mulStrengthReduce32(v, x, int32(c))}
 12474  	for {
 12475  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12476  			x := v_0
 12477  			if v_1.Op != OpARM64MOVDconst {
 12478  				continue
 12479  			}
 12480  			c := auxIntToInt64(v_1.AuxInt)
 12481  			if !(v.Type.Size() <= 4 && canMulStrengthReduce32(config, int32(c))) {
 12482  				continue
 12483  			}
 12484  			v.copyOf(mulStrengthReduce32(v, x, int32(c)))
 12485  			return true
 12486  		}
 12487  		break
 12488  	}
 12489  	// match: (MULW (MOVDconst [c]) (MOVDconst [d]))
 12490  	// result: (MOVDconst [int64(uint32(c*d))])
 12491  	for {
 12492  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12493  			if v_0.Op != OpARM64MOVDconst {
 12494  				continue
 12495  			}
 12496  			c := auxIntToInt64(v_0.AuxInt)
 12497  			if v_1.Op != OpARM64MOVDconst {
 12498  				continue
 12499  			}
 12500  			d := auxIntToInt64(v_1.AuxInt)
 12501  			v.reset(OpARM64MOVDconst)
 12502  			v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
 12503  			return true
 12504  		}
 12505  		break
 12506  	}
 12507  	return false
 12508  }
 12509  func rewriteValueARM64_OpARM64MVN(v *Value) bool {
 12510  	v_0 := v.Args[0]
 12511  	// match: (MVN (XOR x y))
 12512  	// result: (EON x y)
 12513  	for {
 12514  		if v_0.Op != OpARM64XOR {
 12515  			break
 12516  		}
 12517  		y := v_0.Args[1]
 12518  		x := v_0.Args[0]
 12519  		v.reset(OpARM64EON)
 12520  		v.AddArg2(x, y)
 12521  		return true
 12522  	}
 12523  	// match: (MVN (MOVDconst [c]))
 12524  	// result: (MOVDconst [^c])
 12525  	for {
 12526  		if v_0.Op != OpARM64MOVDconst {
 12527  			break
 12528  		}
 12529  		c := auxIntToInt64(v_0.AuxInt)
 12530  		v.reset(OpARM64MOVDconst)
 12531  		v.AuxInt = int64ToAuxInt(^c)
 12532  		return true
 12533  	}
 12534  	// match: (MVN x:(SLLconst [c] y))
 12535  	// cond: clobberIfDead(x)
 12536  	// result: (MVNshiftLL [c] y)
 12537  	for {
 12538  		x := v_0
 12539  		if x.Op != OpARM64SLLconst {
 12540  			break
 12541  		}
 12542  		c := auxIntToInt64(x.AuxInt)
 12543  		y := x.Args[0]
 12544  		if !(clobberIfDead(x)) {
 12545  			break
 12546  		}
 12547  		v.reset(OpARM64MVNshiftLL)
 12548  		v.AuxInt = int64ToAuxInt(c)
 12549  		v.AddArg(y)
 12550  		return true
 12551  	}
 12552  	// match: (MVN x:(SRLconst [c] y))
 12553  	// cond: clobberIfDead(x)
 12554  	// result: (MVNshiftRL [c] y)
 12555  	for {
 12556  		x := v_0
 12557  		if x.Op != OpARM64SRLconst {
 12558  			break
 12559  		}
 12560  		c := auxIntToInt64(x.AuxInt)
 12561  		y := x.Args[0]
 12562  		if !(clobberIfDead(x)) {
 12563  			break
 12564  		}
 12565  		v.reset(OpARM64MVNshiftRL)
 12566  		v.AuxInt = int64ToAuxInt(c)
 12567  		v.AddArg(y)
 12568  		return true
 12569  	}
 12570  	// match: (MVN x:(SRAconst [c] y))
 12571  	// cond: clobberIfDead(x)
 12572  	// result: (MVNshiftRA [c] y)
 12573  	for {
 12574  		x := v_0
 12575  		if x.Op != OpARM64SRAconst {
 12576  			break
 12577  		}
 12578  		c := auxIntToInt64(x.AuxInt)
 12579  		y := x.Args[0]
 12580  		if !(clobberIfDead(x)) {
 12581  			break
 12582  		}
 12583  		v.reset(OpARM64MVNshiftRA)
 12584  		v.AuxInt = int64ToAuxInt(c)
 12585  		v.AddArg(y)
 12586  		return true
 12587  	}
 12588  	// match: (MVN x:(RORconst [c] y))
 12589  	// cond: clobberIfDead(x)
 12590  	// result: (MVNshiftRO [c] y)
 12591  	for {
 12592  		x := v_0
 12593  		if x.Op != OpARM64RORconst {
 12594  			break
 12595  		}
 12596  		c := auxIntToInt64(x.AuxInt)
 12597  		y := x.Args[0]
 12598  		if !(clobberIfDead(x)) {
 12599  			break
 12600  		}
 12601  		v.reset(OpARM64MVNshiftRO)
 12602  		v.AuxInt = int64ToAuxInt(c)
 12603  		v.AddArg(y)
 12604  		return true
 12605  	}
 12606  	return false
 12607  }
 12608  func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
 12609  	v_0 := v.Args[0]
 12610  	// match: (MVNshiftLL (MOVDconst [c]) [d])
 12611  	// result: (MOVDconst [^int64(uint64(c)<<uint64(d))])
 12612  	for {
 12613  		d := auxIntToInt64(v.AuxInt)
 12614  		if v_0.Op != OpARM64MOVDconst {
 12615  			break
 12616  		}
 12617  		c := auxIntToInt64(v_0.AuxInt)
 12618  		v.reset(OpARM64MOVDconst)
 12619  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 12620  		return true
 12621  	}
 12622  	return false
 12623  }
 12624  func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
 12625  	v_0 := v.Args[0]
 12626  	// match: (MVNshiftRA (MOVDconst [c]) [d])
 12627  	// result: (MOVDconst [^(c>>uint64(d))])
 12628  	for {
 12629  		d := auxIntToInt64(v.AuxInt)
 12630  		if v_0.Op != OpARM64MOVDconst {
 12631  			break
 12632  		}
 12633  		c := auxIntToInt64(v_0.AuxInt)
 12634  		v.reset(OpARM64MOVDconst)
 12635  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 12636  		return true
 12637  	}
 12638  	return false
 12639  }
 12640  func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
 12641  	v_0 := v.Args[0]
 12642  	// match: (MVNshiftRL (MOVDconst [c]) [d])
 12643  	// result: (MOVDconst [^int64(uint64(c)>>uint64(d))])
 12644  	for {
 12645  		d := auxIntToInt64(v.AuxInt)
 12646  		if v_0.Op != OpARM64MOVDconst {
 12647  			break
 12648  		}
 12649  		c := auxIntToInt64(v_0.AuxInt)
 12650  		v.reset(OpARM64MOVDconst)
 12651  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 12652  		return true
 12653  	}
 12654  	return false
 12655  }
 12656  func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
 12657  	v_0 := v.Args[0]
 12658  	// match: (MVNshiftRO (MOVDconst [c]) [d])
 12659  	// result: (MOVDconst [^rotateRight64(c, d)])
 12660  	for {
 12661  		d := auxIntToInt64(v.AuxInt)
 12662  		if v_0.Op != OpARM64MOVDconst {
 12663  			break
 12664  		}
 12665  		c := auxIntToInt64(v_0.AuxInt)
 12666  		v.reset(OpARM64MOVDconst)
 12667  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 12668  		return true
 12669  	}
 12670  	return false
 12671  }
 12672  func rewriteValueARM64_OpARM64NEG(v *Value) bool {
 12673  	v_0 := v.Args[0]
 12674  	// match: (NEG (MUL x y))
 12675  	// result: (MNEG x y)
 12676  	for {
 12677  		if v_0.Op != OpARM64MUL {
 12678  			break
 12679  		}
 12680  		y := v_0.Args[1]
 12681  		x := v_0.Args[0]
 12682  		v.reset(OpARM64MNEG)
 12683  		v.AddArg2(x, y)
 12684  		return true
 12685  	}
 12686  	// match: (NEG (MULW x y))
 12687  	// cond: v.Type.Size() <= 4
 12688  	// result: (MNEGW x y)
 12689  	for {
 12690  		if v_0.Op != OpARM64MULW {
 12691  			break
 12692  		}
 12693  		y := v_0.Args[1]
 12694  		x := v_0.Args[0]
 12695  		if !(v.Type.Size() <= 4) {
 12696  			break
 12697  		}
 12698  		v.reset(OpARM64MNEGW)
 12699  		v.AddArg2(x, y)
 12700  		return true
 12701  	}
 12702  	// match: (NEG (NEG x))
 12703  	// result: x
 12704  	for {
 12705  		if v_0.Op != OpARM64NEG {
 12706  			break
 12707  		}
 12708  		x := v_0.Args[0]
 12709  		v.copyOf(x)
 12710  		return true
 12711  	}
 12712  	// match: (NEG (MOVDconst [c]))
 12713  	// result: (MOVDconst [-c])
 12714  	for {
 12715  		if v_0.Op != OpARM64MOVDconst {
 12716  			break
 12717  		}
 12718  		c := auxIntToInt64(v_0.AuxInt)
 12719  		v.reset(OpARM64MOVDconst)
 12720  		v.AuxInt = int64ToAuxInt(-c)
 12721  		return true
 12722  	}
 12723  	// match: (NEG x:(SLLconst [c] y))
 12724  	// cond: clobberIfDead(x)
 12725  	// result: (NEGshiftLL [c] y)
 12726  	for {
 12727  		x := v_0
 12728  		if x.Op != OpARM64SLLconst {
 12729  			break
 12730  		}
 12731  		c := auxIntToInt64(x.AuxInt)
 12732  		y := x.Args[0]
 12733  		if !(clobberIfDead(x)) {
 12734  			break
 12735  		}
 12736  		v.reset(OpARM64NEGshiftLL)
 12737  		v.AuxInt = int64ToAuxInt(c)
 12738  		v.AddArg(y)
 12739  		return true
 12740  	}
 12741  	// match: (NEG x:(SRLconst [c] y))
 12742  	// cond: clobberIfDead(x)
 12743  	// result: (NEGshiftRL [c] y)
 12744  	for {
 12745  		x := v_0
 12746  		if x.Op != OpARM64SRLconst {
 12747  			break
 12748  		}
 12749  		c := auxIntToInt64(x.AuxInt)
 12750  		y := x.Args[0]
 12751  		if !(clobberIfDead(x)) {
 12752  			break
 12753  		}
 12754  		v.reset(OpARM64NEGshiftRL)
 12755  		v.AuxInt = int64ToAuxInt(c)
 12756  		v.AddArg(y)
 12757  		return true
 12758  	}
 12759  	// match: (NEG x:(SRAconst [c] y))
 12760  	// cond: clobberIfDead(x)
 12761  	// result: (NEGshiftRA [c] y)
 12762  	for {
 12763  		x := v_0
 12764  		if x.Op != OpARM64SRAconst {
 12765  			break
 12766  		}
 12767  		c := auxIntToInt64(x.AuxInt)
 12768  		y := x.Args[0]
 12769  		if !(clobberIfDead(x)) {
 12770  			break
 12771  		}
 12772  		v.reset(OpARM64NEGshiftRA)
 12773  		v.AuxInt = int64ToAuxInt(c)
 12774  		v.AddArg(y)
 12775  		return true
 12776  	}
 12777  	return false
 12778  }
 12779  func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
 12780  	v_0 := v.Args[0]
 12781  	// match: (NEGshiftLL (MOVDconst [c]) [d])
 12782  	// result: (MOVDconst [-int64(uint64(c)<<uint64(d))])
 12783  	for {
 12784  		d := auxIntToInt64(v.AuxInt)
 12785  		if v_0.Op != OpARM64MOVDconst {
 12786  			break
 12787  		}
 12788  		c := auxIntToInt64(v_0.AuxInt)
 12789  		v.reset(OpARM64MOVDconst)
 12790  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
 12791  		return true
 12792  	}
 12793  	return false
 12794  }
 12795  func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
 12796  	v_0 := v.Args[0]
 12797  	// match: (NEGshiftRA (MOVDconst [c]) [d])
 12798  	// result: (MOVDconst [-(c>>uint64(d))])
 12799  	for {
 12800  		d := auxIntToInt64(v.AuxInt)
 12801  		if v_0.Op != OpARM64MOVDconst {
 12802  			break
 12803  		}
 12804  		c := auxIntToInt64(v_0.AuxInt)
 12805  		v.reset(OpARM64MOVDconst)
 12806  		v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
 12807  		return true
 12808  	}
 12809  	return false
 12810  }
 12811  func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
 12812  	v_0 := v.Args[0]
 12813  	// match: (NEGshiftRL (MOVDconst [c]) [d])
 12814  	// result: (MOVDconst [-int64(uint64(c)>>uint64(d))])
 12815  	for {
 12816  		d := auxIntToInt64(v.AuxInt)
 12817  		if v_0.Op != OpARM64MOVDconst {
 12818  			break
 12819  		}
 12820  		c := auxIntToInt64(v_0.AuxInt)
 12821  		v.reset(OpARM64MOVDconst)
 12822  		v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
 12823  		return true
 12824  	}
 12825  	return false
 12826  }
 12827  func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
 12828  	v_0 := v.Args[0]
 12829  	b := v.Block
 12830  	// match: (NotEqual (CMPconst [0] z:(AND x y)))
 12831  	// cond: z.Uses == 1
 12832  	// result: (NotEqual (TST x y))
 12833  	for {
 12834  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 12835  			break
 12836  		}
 12837  		z := v_0.Args[0]
 12838  		if z.Op != OpARM64AND {
 12839  			break
 12840  		}
 12841  		y := z.Args[1]
 12842  		x := z.Args[0]
 12843  		if !(z.Uses == 1) {
 12844  			break
 12845  		}
 12846  		v.reset(OpARM64NotEqual)
 12847  		v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
 12848  		v0.AddArg2(x, y)
 12849  		v.AddArg(v0)
 12850  		return true
 12851  	}
 12852  	// match: (NotEqual (CMPWconst [0] x:(ANDconst [c] y)))
 12853  	// cond: x.Uses == 1
 12854  	// result: (NotEqual (TSTWconst [int32(c)] y))
 12855  	for {
 12856  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 12857  			break
 12858  		}
 12859  		x := v_0.Args[0]
 12860  		if x.Op != OpARM64ANDconst {
 12861  			break
 12862  		}
 12863  		c := auxIntToInt64(x.AuxInt)
 12864  		y := x.Args[0]
 12865  		if !(x.Uses == 1) {
 12866  			break
 12867  		}
 12868  		v.reset(OpARM64NotEqual)
 12869  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 12870  		v0.AuxInt = int32ToAuxInt(int32(c))
 12871  		v0.AddArg(y)
 12872  		v.AddArg(v0)
 12873  		return true
 12874  	}
 12875  	// match: (NotEqual (CMPWconst [0] z:(AND x y)))
 12876  	// cond: z.Uses == 1
 12877  	// result: (NotEqual (TSTW x y))
 12878  	for {
 12879  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 12880  			break
 12881  		}
 12882  		z := v_0.Args[0]
 12883  		if z.Op != OpARM64AND {
 12884  			break
 12885  		}
 12886  		y := z.Args[1]
 12887  		x := z.Args[0]
 12888  		if !(z.Uses == 1) {
 12889  			break
 12890  		}
 12891  		v.reset(OpARM64NotEqual)
 12892  		v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
 12893  		v0.AddArg2(x, y)
 12894  		v.AddArg(v0)
 12895  		return true
 12896  	}
 12897  	// match: (NotEqual (CMPconst [0] x:(ANDconst [c] y)))
 12898  	// cond: x.Uses == 1
 12899  	// result: (NotEqual (TSTconst [c] y))
 12900  	for {
 12901  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 12902  			break
 12903  		}
 12904  		x := v_0.Args[0]
 12905  		if x.Op != OpARM64ANDconst {
 12906  			break
 12907  		}
 12908  		c := auxIntToInt64(x.AuxInt)
 12909  		y := x.Args[0]
 12910  		if !(x.Uses == 1) {
 12911  			break
 12912  		}
 12913  		v.reset(OpARM64NotEqual)
 12914  		v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
 12915  		v0.AuxInt = int64ToAuxInt(c)
 12916  		v0.AddArg(y)
 12917  		v.AddArg(v0)
 12918  		return true
 12919  	}
 12920  	// match: (NotEqual (CMP x z:(NEG y)))
 12921  	// cond: z.Uses == 1
 12922  	// result: (NotEqual (CMN x y))
 12923  	for {
 12924  		if v_0.Op != OpARM64CMP {
 12925  			break
 12926  		}
 12927  		_ = v_0.Args[1]
 12928  		x := v_0.Args[0]
 12929  		z := v_0.Args[1]
 12930  		if z.Op != OpARM64NEG {
 12931  			break
 12932  		}
 12933  		y := z.Args[0]
 12934  		if !(z.Uses == 1) {
 12935  			break
 12936  		}
 12937  		v.reset(OpARM64NotEqual)
 12938  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 12939  		v0.AddArg2(x, y)
 12940  		v.AddArg(v0)
 12941  		return true
 12942  	}
 12943  	// match: (NotEqual (CMPW x z:(NEG y)))
 12944  	// cond: z.Uses == 1
 12945  	// result: (NotEqual (CMNW x y))
 12946  	for {
 12947  		if v_0.Op != OpARM64CMPW {
 12948  			break
 12949  		}
 12950  		_ = v_0.Args[1]
 12951  		x := v_0.Args[0]
 12952  		z := v_0.Args[1]
 12953  		if z.Op != OpARM64NEG {
 12954  			break
 12955  		}
 12956  		y := z.Args[0]
 12957  		if !(z.Uses == 1) {
 12958  			break
 12959  		}
 12960  		v.reset(OpARM64NotEqual)
 12961  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 12962  		v0.AddArg2(x, y)
 12963  		v.AddArg(v0)
 12964  		return true
 12965  	}
 12966  	// match: (NotEqual (CMPconst [0] x:(ADDconst [c] y)))
 12967  	// cond: x.Uses == 1
 12968  	// result: (NotEqual (CMNconst [c] y))
 12969  	for {
 12970  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 12971  			break
 12972  		}
 12973  		x := v_0.Args[0]
 12974  		if x.Op != OpARM64ADDconst {
 12975  			break
 12976  		}
 12977  		c := auxIntToInt64(x.AuxInt)
 12978  		y := x.Args[0]
 12979  		if !(x.Uses == 1) {
 12980  			break
 12981  		}
 12982  		v.reset(OpARM64NotEqual)
 12983  		v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
 12984  		v0.AuxInt = int64ToAuxInt(c)
 12985  		v0.AddArg(y)
 12986  		v.AddArg(v0)
 12987  		return true
 12988  	}
 12989  	// match: (NotEqual (CMPWconst [0] x:(ADDconst [c] y)))
 12990  	// cond: x.Uses == 1
 12991  	// result: (NotEqual (CMNWconst [int32(c)] y))
 12992  	for {
 12993  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 12994  			break
 12995  		}
 12996  		x := v_0.Args[0]
 12997  		if x.Op != OpARM64ADDconst {
 12998  			break
 12999  		}
 13000  		c := auxIntToInt64(x.AuxInt)
 13001  		y := x.Args[0]
 13002  		if !(x.Uses == 1) {
 13003  			break
 13004  		}
 13005  		v.reset(OpARM64NotEqual)
 13006  		v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
 13007  		v0.AuxInt = int32ToAuxInt(int32(c))
 13008  		v0.AddArg(y)
 13009  		v.AddArg(v0)
 13010  		return true
 13011  	}
 13012  	// match: (NotEqual (CMPconst [0] z:(ADD x y)))
 13013  	// cond: z.Uses == 1
 13014  	// result: (NotEqual (CMN x y))
 13015  	for {
 13016  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13017  			break
 13018  		}
 13019  		z := v_0.Args[0]
 13020  		if z.Op != OpARM64ADD {
 13021  			break
 13022  		}
 13023  		y := z.Args[1]
 13024  		x := z.Args[0]
 13025  		if !(z.Uses == 1) {
 13026  			break
 13027  		}
 13028  		v.reset(OpARM64NotEqual)
 13029  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13030  		v0.AddArg2(x, y)
 13031  		v.AddArg(v0)
 13032  		return true
 13033  	}
 13034  	// match: (NotEqual (CMPWconst [0] z:(ADD x y)))
 13035  	// cond: z.Uses == 1
 13036  	// result: (NotEqual (CMNW x y))
 13037  	for {
 13038  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13039  			break
 13040  		}
 13041  		z := v_0.Args[0]
 13042  		if z.Op != OpARM64ADD {
 13043  			break
 13044  		}
 13045  		y := z.Args[1]
 13046  		x := z.Args[0]
 13047  		if !(z.Uses == 1) {
 13048  			break
 13049  		}
 13050  		v.reset(OpARM64NotEqual)
 13051  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13052  		v0.AddArg2(x, y)
 13053  		v.AddArg(v0)
 13054  		return true
 13055  	}
 13056  	// match: (NotEqual (CMPconst [0] z:(MADD a x y)))
 13057  	// cond: z.Uses == 1
 13058  	// result: (NotEqual (CMN a (MUL <x.Type> x y)))
 13059  	for {
 13060  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13061  			break
 13062  		}
 13063  		z := v_0.Args[0]
 13064  		if z.Op != OpARM64MADD {
 13065  			break
 13066  		}
 13067  		y := z.Args[2]
 13068  		a := z.Args[0]
 13069  		x := z.Args[1]
 13070  		if !(z.Uses == 1) {
 13071  			break
 13072  		}
 13073  		v.reset(OpARM64NotEqual)
 13074  		v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
 13075  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13076  		v1.AddArg2(x, y)
 13077  		v0.AddArg2(a, v1)
 13078  		v.AddArg(v0)
 13079  		return true
 13080  	}
 13081  	// match: (NotEqual (CMPconst [0] z:(MSUB a x y)))
 13082  	// cond: z.Uses == 1
 13083  	// result: (NotEqual (CMP a (MUL <x.Type> x y)))
 13084  	for {
 13085  		if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
 13086  			break
 13087  		}
 13088  		z := v_0.Args[0]
 13089  		if z.Op != OpARM64MSUB {
 13090  			break
 13091  		}
 13092  		y := z.Args[2]
 13093  		a := z.Args[0]
 13094  		x := z.Args[1]
 13095  		if !(z.Uses == 1) {
 13096  			break
 13097  		}
 13098  		v.reset(OpARM64NotEqual)
 13099  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 13100  		v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
 13101  		v1.AddArg2(x, y)
 13102  		v0.AddArg2(a, v1)
 13103  		v.AddArg(v0)
 13104  		return true
 13105  	}
 13106  	// match: (NotEqual (CMPWconst [0] z:(MADDW a x y)))
 13107  	// cond: z.Uses == 1
 13108  	// result: (NotEqual (CMNW a (MULW <x.Type> x y)))
 13109  	for {
 13110  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13111  			break
 13112  		}
 13113  		z := v_0.Args[0]
 13114  		if z.Op != OpARM64MADDW {
 13115  			break
 13116  		}
 13117  		y := z.Args[2]
 13118  		a := z.Args[0]
 13119  		x := z.Args[1]
 13120  		if !(z.Uses == 1) {
 13121  			break
 13122  		}
 13123  		v.reset(OpARM64NotEqual)
 13124  		v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
 13125  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13126  		v1.AddArg2(x, y)
 13127  		v0.AddArg2(a, v1)
 13128  		v.AddArg(v0)
 13129  		return true
 13130  	}
 13131  	// match: (NotEqual (CMPWconst [0] z:(MSUBW a x y)))
 13132  	// cond: z.Uses == 1
 13133  	// result: (NotEqual (CMPW a (MULW <x.Type> x y)))
 13134  	for {
 13135  		if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
 13136  			break
 13137  		}
 13138  		z := v_0.Args[0]
 13139  		if z.Op != OpARM64MSUBW {
 13140  			break
 13141  		}
 13142  		y := z.Args[2]
 13143  		a := z.Args[0]
 13144  		x := z.Args[1]
 13145  		if !(z.Uses == 1) {
 13146  			break
 13147  		}
 13148  		v.reset(OpARM64NotEqual)
 13149  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 13150  		v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
 13151  		v1.AddArg2(x, y)
 13152  		v0.AddArg2(a, v1)
 13153  		v.AddArg(v0)
 13154  		return true
 13155  	}
 13156  	// match: (NotEqual (FlagConstant [fc]))
 13157  	// result: (MOVDconst [b2i(fc.ne())])
 13158  	for {
 13159  		if v_0.Op != OpARM64FlagConstant {
 13160  			break
 13161  		}
 13162  		fc := auxIntToFlagConstant(v_0.AuxInt)
 13163  		v.reset(OpARM64MOVDconst)
 13164  		v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
 13165  		return true
 13166  	}
 13167  	// match: (NotEqual (InvertFlags x))
 13168  	// result: (NotEqual x)
 13169  	for {
 13170  		if v_0.Op != OpARM64InvertFlags {
 13171  			break
 13172  		}
 13173  		x := v_0.Args[0]
 13174  		v.reset(OpARM64NotEqual)
 13175  		v.AddArg(x)
 13176  		return true
 13177  	}
 13178  	return false
 13179  }
 13180  func rewriteValueARM64_OpARM64OR(v *Value) bool {
 13181  	v_1 := v.Args[1]
 13182  	v_0 := v.Args[0]
 13183  	// match: (OR x (MOVDconst [c]))
 13184  	// result: (ORconst [c] x)
 13185  	for {
 13186  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13187  			x := v_0
 13188  			if v_1.Op != OpARM64MOVDconst {
 13189  				continue
 13190  			}
 13191  			c := auxIntToInt64(v_1.AuxInt)
 13192  			v.reset(OpARM64ORconst)
 13193  			v.AuxInt = int64ToAuxInt(c)
 13194  			v.AddArg(x)
 13195  			return true
 13196  		}
 13197  		break
 13198  	}
 13199  	// match: (OR x x)
 13200  	// result: x
 13201  	for {
 13202  		x := v_0
 13203  		if x != v_1 {
 13204  			break
 13205  		}
 13206  		v.copyOf(x)
 13207  		return true
 13208  	}
 13209  	// match: (OR x (MVN y))
 13210  	// result: (ORN x y)
 13211  	for {
 13212  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13213  			x := v_0
 13214  			if v_1.Op != OpARM64MVN {
 13215  				continue
 13216  			}
 13217  			y := v_1.Args[0]
 13218  			v.reset(OpARM64ORN)
 13219  			v.AddArg2(x, y)
 13220  			return true
 13221  		}
 13222  		break
 13223  	}
 13224  	// match: (OR x0 x1:(SLLconst [c] y))
 13225  	// cond: clobberIfDead(x1)
 13226  	// result: (ORshiftLL x0 y [c])
 13227  	for {
 13228  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13229  			x0 := v_0
 13230  			x1 := v_1
 13231  			if x1.Op != OpARM64SLLconst {
 13232  				continue
 13233  			}
 13234  			c := auxIntToInt64(x1.AuxInt)
 13235  			y := x1.Args[0]
 13236  			if !(clobberIfDead(x1)) {
 13237  				continue
 13238  			}
 13239  			v.reset(OpARM64ORshiftLL)
 13240  			v.AuxInt = int64ToAuxInt(c)
 13241  			v.AddArg2(x0, y)
 13242  			return true
 13243  		}
 13244  		break
 13245  	}
 13246  	// match: (OR x0 x1:(SRLconst [c] y))
 13247  	// cond: clobberIfDead(x1)
 13248  	// result: (ORshiftRL x0 y [c])
 13249  	for {
 13250  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13251  			x0 := v_0
 13252  			x1 := v_1
 13253  			if x1.Op != OpARM64SRLconst {
 13254  				continue
 13255  			}
 13256  			c := auxIntToInt64(x1.AuxInt)
 13257  			y := x1.Args[0]
 13258  			if !(clobberIfDead(x1)) {
 13259  				continue
 13260  			}
 13261  			v.reset(OpARM64ORshiftRL)
 13262  			v.AuxInt = int64ToAuxInt(c)
 13263  			v.AddArg2(x0, y)
 13264  			return true
 13265  		}
 13266  		break
 13267  	}
 13268  	// match: (OR x0 x1:(SRAconst [c] y))
 13269  	// cond: clobberIfDead(x1)
 13270  	// result: (ORshiftRA x0 y [c])
 13271  	for {
 13272  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13273  			x0 := v_0
 13274  			x1 := v_1
 13275  			if x1.Op != OpARM64SRAconst {
 13276  				continue
 13277  			}
 13278  			c := auxIntToInt64(x1.AuxInt)
 13279  			y := x1.Args[0]
 13280  			if !(clobberIfDead(x1)) {
 13281  				continue
 13282  			}
 13283  			v.reset(OpARM64ORshiftRA)
 13284  			v.AuxInt = int64ToAuxInt(c)
 13285  			v.AddArg2(x0, y)
 13286  			return true
 13287  		}
 13288  		break
 13289  	}
 13290  	// match: (OR x0 x1:(RORconst [c] y))
 13291  	// cond: clobberIfDead(x1)
 13292  	// result: (ORshiftRO x0 y [c])
 13293  	for {
 13294  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13295  			x0 := v_0
 13296  			x1 := v_1
 13297  			if x1.Op != OpARM64RORconst {
 13298  				continue
 13299  			}
 13300  			c := auxIntToInt64(x1.AuxInt)
 13301  			y := x1.Args[0]
 13302  			if !(clobberIfDead(x1)) {
 13303  				continue
 13304  			}
 13305  			v.reset(OpARM64ORshiftRO)
 13306  			v.AuxInt = int64ToAuxInt(c)
 13307  			v.AddArg2(x0, y)
 13308  			return true
 13309  		}
 13310  		break
 13311  	}
 13312  	// match: (OR (UBFIZ [bfc] x) (ANDconst [ac] y))
 13313  	// cond: ac == ^((1<<uint(bfc.width())-1) << uint(bfc.lsb()))
 13314  	// result: (BFI [bfc] y x)
 13315  	for {
 13316  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13317  			if v_0.Op != OpARM64UBFIZ {
 13318  				continue
 13319  			}
 13320  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13321  			x := v_0.Args[0]
 13322  			if v_1.Op != OpARM64ANDconst {
 13323  				continue
 13324  			}
 13325  			ac := auxIntToInt64(v_1.AuxInt)
 13326  			y := v_1.Args[0]
 13327  			if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
 13328  				continue
 13329  			}
 13330  			v.reset(OpARM64BFI)
 13331  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13332  			v.AddArg2(y, x)
 13333  			return true
 13334  		}
 13335  		break
 13336  	}
 13337  	// match: (OR (UBFX [bfc] x) (ANDconst [ac] y))
 13338  	// cond: ac == ^(1<<uint(bfc.width())-1)
 13339  	// result: (BFXIL [bfc] y x)
 13340  	for {
 13341  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13342  			if v_0.Op != OpARM64UBFX {
 13343  				continue
 13344  			}
 13345  			bfc := auxIntToArm64BitField(v_0.AuxInt)
 13346  			x := v_0.Args[0]
 13347  			if v_1.Op != OpARM64ANDconst {
 13348  				continue
 13349  			}
 13350  			ac := auxIntToInt64(v_1.AuxInt)
 13351  			y := v_1.Args[0]
 13352  			if !(ac == ^(1<<uint(bfc.width()) - 1)) {
 13353  				continue
 13354  			}
 13355  			v.reset(OpARM64BFXIL)
 13356  			v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13357  			v.AddArg2(y, x)
 13358  			return true
 13359  		}
 13360  		break
 13361  	}
 13362  	return false
 13363  }
 13364  func rewriteValueARM64_OpARM64ORN(v *Value) bool {
 13365  	v_1 := v.Args[1]
 13366  	v_0 := v.Args[0]
 13367  	// match: (ORN x (MOVDconst [c]))
 13368  	// result: (ORconst [^c] x)
 13369  	for {
 13370  		x := v_0
 13371  		if v_1.Op != OpARM64MOVDconst {
 13372  			break
 13373  		}
 13374  		c := auxIntToInt64(v_1.AuxInt)
 13375  		v.reset(OpARM64ORconst)
 13376  		v.AuxInt = int64ToAuxInt(^c)
 13377  		v.AddArg(x)
 13378  		return true
 13379  	}
 13380  	// match: (ORN x x)
 13381  	// result: (MOVDconst [-1])
 13382  	for {
 13383  		x := v_0
 13384  		if x != v_1 {
 13385  			break
 13386  		}
 13387  		v.reset(OpARM64MOVDconst)
 13388  		v.AuxInt = int64ToAuxInt(-1)
 13389  		return true
 13390  	}
 13391  	// match: (ORN x0 x1:(SLLconst [c] y))
 13392  	// cond: clobberIfDead(x1)
 13393  	// result: (ORNshiftLL x0 y [c])
 13394  	for {
 13395  		x0 := v_0
 13396  		x1 := v_1
 13397  		if x1.Op != OpARM64SLLconst {
 13398  			break
 13399  		}
 13400  		c := auxIntToInt64(x1.AuxInt)
 13401  		y := x1.Args[0]
 13402  		if !(clobberIfDead(x1)) {
 13403  			break
 13404  		}
 13405  		v.reset(OpARM64ORNshiftLL)
 13406  		v.AuxInt = int64ToAuxInt(c)
 13407  		v.AddArg2(x0, y)
 13408  		return true
 13409  	}
 13410  	// match: (ORN x0 x1:(SRLconst [c] y))
 13411  	// cond: clobberIfDead(x1)
 13412  	// result: (ORNshiftRL x0 y [c])
 13413  	for {
 13414  		x0 := v_0
 13415  		x1 := v_1
 13416  		if x1.Op != OpARM64SRLconst {
 13417  			break
 13418  		}
 13419  		c := auxIntToInt64(x1.AuxInt)
 13420  		y := x1.Args[0]
 13421  		if !(clobberIfDead(x1)) {
 13422  			break
 13423  		}
 13424  		v.reset(OpARM64ORNshiftRL)
 13425  		v.AuxInt = int64ToAuxInt(c)
 13426  		v.AddArg2(x0, y)
 13427  		return true
 13428  	}
 13429  	// match: (ORN x0 x1:(SRAconst [c] y))
 13430  	// cond: clobberIfDead(x1)
 13431  	// result: (ORNshiftRA x0 y [c])
 13432  	for {
 13433  		x0 := v_0
 13434  		x1 := v_1
 13435  		if x1.Op != OpARM64SRAconst {
 13436  			break
 13437  		}
 13438  		c := auxIntToInt64(x1.AuxInt)
 13439  		y := x1.Args[0]
 13440  		if !(clobberIfDead(x1)) {
 13441  			break
 13442  		}
 13443  		v.reset(OpARM64ORNshiftRA)
 13444  		v.AuxInt = int64ToAuxInt(c)
 13445  		v.AddArg2(x0, y)
 13446  		return true
 13447  	}
 13448  	// match: (ORN x0 x1:(RORconst [c] y))
 13449  	// cond: clobberIfDead(x1)
 13450  	// result: (ORNshiftRO x0 y [c])
 13451  	for {
 13452  		x0 := v_0
 13453  		x1 := v_1
 13454  		if x1.Op != OpARM64RORconst {
 13455  			break
 13456  		}
 13457  		c := auxIntToInt64(x1.AuxInt)
 13458  		y := x1.Args[0]
 13459  		if !(clobberIfDead(x1)) {
 13460  			break
 13461  		}
 13462  		v.reset(OpARM64ORNshiftRO)
 13463  		v.AuxInt = int64ToAuxInt(c)
 13464  		v.AddArg2(x0, y)
 13465  		return true
 13466  	}
 13467  	return false
 13468  }
 13469  func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
 13470  	v_1 := v.Args[1]
 13471  	v_0 := v.Args[0]
 13472  	// match: (ORNshiftLL x (MOVDconst [c]) [d])
 13473  	// result: (ORconst x [^int64(uint64(c)<<uint64(d))])
 13474  	for {
 13475  		d := auxIntToInt64(v.AuxInt)
 13476  		x := v_0
 13477  		if v_1.Op != OpARM64MOVDconst {
 13478  			break
 13479  		}
 13480  		c := auxIntToInt64(v_1.AuxInt)
 13481  		v.reset(OpARM64ORconst)
 13482  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
 13483  		v.AddArg(x)
 13484  		return true
 13485  	}
 13486  	// match: (ORNshiftLL (SLLconst x [c]) x [c])
 13487  	// result: (MOVDconst [-1])
 13488  	for {
 13489  		c := auxIntToInt64(v.AuxInt)
 13490  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 13491  			break
 13492  		}
 13493  		x := v_0.Args[0]
 13494  		if x != v_1 {
 13495  			break
 13496  		}
 13497  		v.reset(OpARM64MOVDconst)
 13498  		v.AuxInt = int64ToAuxInt(-1)
 13499  		return true
 13500  	}
 13501  	return false
 13502  }
 13503  func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
 13504  	v_1 := v.Args[1]
 13505  	v_0 := v.Args[0]
 13506  	// match: (ORNshiftRA x (MOVDconst [c]) [d])
 13507  	// result: (ORconst x [^(c>>uint64(d))])
 13508  	for {
 13509  		d := auxIntToInt64(v.AuxInt)
 13510  		x := v_0
 13511  		if v_1.Op != OpARM64MOVDconst {
 13512  			break
 13513  		}
 13514  		c := auxIntToInt64(v_1.AuxInt)
 13515  		v.reset(OpARM64ORconst)
 13516  		v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
 13517  		v.AddArg(x)
 13518  		return true
 13519  	}
 13520  	// match: (ORNshiftRA (SRAconst x [c]) x [c])
 13521  	// result: (MOVDconst [-1])
 13522  	for {
 13523  		c := auxIntToInt64(v.AuxInt)
 13524  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 13525  			break
 13526  		}
 13527  		x := v_0.Args[0]
 13528  		if x != v_1 {
 13529  			break
 13530  		}
 13531  		v.reset(OpARM64MOVDconst)
 13532  		v.AuxInt = int64ToAuxInt(-1)
 13533  		return true
 13534  	}
 13535  	return false
 13536  }
 13537  func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
 13538  	v_1 := v.Args[1]
 13539  	v_0 := v.Args[0]
 13540  	// match: (ORNshiftRL x (MOVDconst [c]) [d])
 13541  	// result: (ORconst x [^int64(uint64(c)>>uint64(d))])
 13542  	for {
 13543  		d := auxIntToInt64(v.AuxInt)
 13544  		x := v_0
 13545  		if v_1.Op != OpARM64MOVDconst {
 13546  			break
 13547  		}
 13548  		c := auxIntToInt64(v_1.AuxInt)
 13549  		v.reset(OpARM64ORconst)
 13550  		v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
 13551  		v.AddArg(x)
 13552  		return true
 13553  	}
 13554  	// match: (ORNshiftRL (SRLconst x [c]) x [c])
 13555  	// result: (MOVDconst [-1])
 13556  	for {
 13557  		c := auxIntToInt64(v.AuxInt)
 13558  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 13559  			break
 13560  		}
 13561  		x := v_0.Args[0]
 13562  		if x != v_1 {
 13563  			break
 13564  		}
 13565  		v.reset(OpARM64MOVDconst)
 13566  		v.AuxInt = int64ToAuxInt(-1)
 13567  		return true
 13568  	}
 13569  	return false
 13570  }
 13571  func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
 13572  	v_1 := v.Args[1]
 13573  	v_0 := v.Args[0]
 13574  	// match: (ORNshiftRO x (MOVDconst [c]) [d])
 13575  	// result: (ORconst x [^rotateRight64(c, d)])
 13576  	for {
 13577  		d := auxIntToInt64(v.AuxInt)
 13578  		x := v_0
 13579  		if v_1.Op != OpARM64MOVDconst {
 13580  			break
 13581  		}
 13582  		c := auxIntToInt64(v_1.AuxInt)
 13583  		v.reset(OpARM64ORconst)
 13584  		v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
 13585  		v.AddArg(x)
 13586  		return true
 13587  	}
 13588  	// match: (ORNshiftRO (RORconst x [c]) x [c])
 13589  	// result: (MOVDconst [-1])
 13590  	for {
 13591  		c := auxIntToInt64(v.AuxInt)
 13592  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 13593  			break
 13594  		}
 13595  		x := v_0.Args[0]
 13596  		if x != v_1 {
 13597  			break
 13598  		}
 13599  		v.reset(OpARM64MOVDconst)
 13600  		v.AuxInt = int64ToAuxInt(-1)
 13601  		return true
 13602  	}
 13603  	return false
 13604  }
 13605  func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
 13606  	v_0 := v.Args[0]
 13607  	// match: (ORconst [0] x)
 13608  	// result: x
 13609  	for {
 13610  		if auxIntToInt64(v.AuxInt) != 0 {
 13611  			break
 13612  		}
 13613  		x := v_0
 13614  		v.copyOf(x)
 13615  		return true
 13616  	}
 13617  	// match: (ORconst [-1] _)
 13618  	// result: (MOVDconst [-1])
 13619  	for {
 13620  		if auxIntToInt64(v.AuxInt) != -1 {
 13621  			break
 13622  		}
 13623  		v.reset(OpARM64MOVDconst)
 13624  		v.AuxInt = int64ToAuxInt(-1)
 13625  		return true
 13626  	}
 13627  	// match: (ORconst [c] (MOVDconst [d]))
 13628  	// result: (MOVDconst [c|d])
 13629  	for {
 13630  		c := auxIntToInt64(v.AuxInt)
 13631  		if v_0.Op != OpARM64MOVDconst {
 13632  			break
 13633  		}
 13634  		d := auxIntToInt64(v_0.AuxInt)
 13635  		v.reset(OpARM64MOVDconst)
 13636  		v.AuxInt = int64ToAuxInt(c | d)
 13637  		return true
 13638  	}
 13639  	// match: (ORconst [c] (ORconst [d] x))
 13640  	// result: (ORconst [c|d] x)
 13641  	for {
 13642  		c := auxIntToInt64(v.AuxInt)
 13643  		if v_0.Op != OpARM64ORconst {
 13644  			break
 13645  		}
 13646  		d := auxIntToInt64(v_0.AuxInt)
 13647  		x := v_0.Args[0]
 13648  		v.reset(OpARM64ORconst)
 13649  		v.AuxInt = int64ToAuxInt(c | d)
 13650  		v.AddArg(x)
 13651  		return true
 13652  	}
 13653  	// match: (ORconst [c1] (ANDconst [c2] x))
 13654  	// cond: c2|c1 == ^0
 13655  	// result: (ORconst [c1] x)
 13656  	for {
 13657  		c1 := auxIntToInt64(v.AuxInt)
 13658  		if v_0.Op != OpARM64ANDconst {
 13659  			break
 13660  		}
 13661  		c2 := auxIntToInt64(v_0.AuxInt)
 13662  		x := v_0.Args[0]
 13663  		if !(c2|c1 == ^0) {
 13664  			break
 13665  		}
 13666  		v.reset(OpARM64ORconst)
 13667  		v.AuxInt = int64ToAuxInt(c1)
 13668  		v.AddArg(x)
 13669  		return true
 13670  	}
 13671  	return false
 13672  }
 13673  func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
 13674  	v_1 := v.Args[1]
 13675  	v_0 := v.Args[0]
 13676  	b := v.Block
 13677  	typ := &b.Func.Config.Types
 13678  	// match: (ORshiftLL (MOVDconst [c]) x [d])
 13679  	// result: (ORconst [c] (SLLconst <x.Type> x [d]))
 13680  	for {
 13681  		d := auxIntToInt64(v.AuxInt)
 13682  		if v_0.Op != OpARM64MOVDconst {
 13683  			break
 13684  		}
 13685  		c := auxIntToInt64(v_0.AuxInt)
 13686  		x := v_1
 13687  		v.reset(OpARM64ORconst)
 13688  		v.AuxInt = int64ToAuxInt(c)
 13689  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 13690  		v0.AuxInt = int64ToAuxInt(d)
 13691  		v0.AddArg(x)
 13692  		v.AddArg(v0)
 13693  		return true
 13694  	}
 13695  	// match: (ORshiftLL x (MOVDconst [c]) [d])
 13696  	// result: (ORconst x [int64(uint64(c)<<uint64(d))])
 13697  	for {
 13698  		d := auxIntToInt64(v.AuxInt)
 13699  		x := v_0
 13700  		if v_1.Op != OpARM64MOVDconst {
 13701  			break
 13702  		}
 13703  		c := auxIntToInt64(v_1.AuxInt)
 13704  		v.reset(OpARM64ORconst)
 13705  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 13706  		v.AddArg(x)
 13707  		return true
 13708  	}
 13709  	// match: (ORshiftLL y:(SLLconst x [c]) x [c])
 13710  	// result: y
 13711  	for {
 13712  		c := auxIntToInt64(v.AuxInt)
 13713  		y := v_0
 13714  		if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
 13715  			break
 13716  		}
 13717  		x := y.Args[0]
 13718  		if x != v_1 {
 13719  			break
 13720  		}
 13721  		v.copyOf(y)
 13722  		return true
 13723  	}
 13724  	// match: (ORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 13725  	// result: (REV16W x)
 13726  	for {
 13727  		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) {
 13728  			break
 13729  		}
 13730  		x := v_0.Args[0]
 13731  		if x != v_1 {
 13732  			break
 13733  		}
 13734  		v.reset(OpARM64REV16W)
 13735  		v.AddArg(x)
 13736  		return true
 13737  	}
 13738  	// match: (ORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 13739  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 13740  	// result: (REV16W x)
 13741  	for {
 13742  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 13743  			break
 13744  		}
 13745  		v_0_0 := v_0.Args[0]
 13746  		if v_0_0.Op != OpARM64ANDconst {
 13747  			break
 13748  		}
 13749  		c1 := auxIntToInt64(v_0_0.AuxInt)
 13750  		x := v_0_0.Args[0]
 13751  		if v_1.Op != OpARM64ANDconst {
 13752  			break
 13753  		}
 13754  		c2 := auxIntToInt64(v_1.AuxInt)
 13755  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 13756  			break
 13757  		}
 13758  		v.reset(OpARM64REV16W)
 13759  		v.AddArg(x)
 13760  		return true
 13761  	}
 13762  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 13763  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 13764  	// result: (REV16 x)
 13765  	for {
 13766  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 13767  			break
 13768  		}
 13769  		v_0_0 := v_0.Args[0]
 13770  		if v_0_0.Op != OpARM64ANDconst {
 13771  			break
 13772  		}
 13773  		c1 := auxIntToInt64(v_0_0.AuxInt)
 13774  		x := v_0_0.Args[0]
 13775  		if v_1.Op != OpARM64ANDconst {
 13776  			break
 13777  		}
 13778  		c2 := auxIntToInt64(v_1.AuxInt)
 13779  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 13780  			break
 13781  		}
 13782  		v.reset(OpARM64REV16)
 13783  		v.AddArg(x)
 13784  		return true
 13785  	}
 13786  	// match: (ORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 13787  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 13788  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 13789  	for {
 13790  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 13791  			break
 13792  		}
 13793  		v_0_0 := v_0.Args[0]
 13794  		if v_0_0.Op != OpARM64ANDconst {
 13795  			break
 13796  		}
 13797  		c1 := auxIntToInt64(v_0_0.AuxInt)
 13798  		x := v_0_0.Args[0]
 13799  		if v_1.Op != OpARM64ANDconst {
 13800  			break
 13801  		}
 13802  		c2 := auxIntToInt64(v_1.AuxInt)
 13803  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 13804  			break
 13805  		}
 13806  		v.reset(OpARM64REV16)
 13807  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 13808  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 13809  		v0.AddArg(x)
 13810  		v.AddArg(v0)
 13811  		return true
 13812  	}
 13813  	// match: ( ORshiftLL [c] (SRLconst x [64-c]) x2)
 13814  	// result: (EXTRconst [64-c] x2 x)
 13815  	for {
 13816  		c := auxIntToInt64(v.AuxInt)
 13817  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 13818  			break
 13819  		}
 13820  		x := v_0.Args[0]
 13821  		x2 := v_1
 13822  		v.reset(OpARM64EXTRconst)
 13823  		v.AuxInt = int64ToAuxInt(64 - c)
 13824  		v.AddArg2(x2, x)
 13825  		return true
 13826  	}
 13827  	// match: ( ORshiftLL <t> [c] (UBFX [bfc] x) x2)
 13828  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 13829  	// result: (EXTRWconst [32-c] x2 x)
 13830  	for {
 13831  		t := v.Type
 13832  		c := auxIntToInt64(v.AuxInt)
 13833  		if v_0.Op != OpARM64UBFX {
 13834  			break
 13835  		}
 13836  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 13837  		x := v_0.Args[0]
 13838  		x2 := v_1
 13839  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 13840  			break
 13841  		}
 13842  		v.reset(OpARM64EXTRWconst)
 13843  		v.AuxInt = int64ToAuxInt(32 - c)
 13844  		v.AddArg2(x2, x)
 13845  		return true
 13846  	}
 13847  	// match: (ORshiftLL [s] (ANDconst [xc] x) (ANDconst [yc] y))
 13848  	// cond: xc == ^(yc << s) && yc & (yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64
 13849  	// result: (BFI [armBFAuxInt(s, log64(yc+1))] x y)
 13850  	for {
 13851  		s := auxIntToInt64(v.AuxInt)
 13852  		if v_0.Op != OpARM64ANDconst {
 13853  			break
 13854  		}
 13855  		xc := auxIntToInt64(v_0.AuxInt)
 13856  		x := v_0.Args[0]
 13857  		if v_1.Op != OpARM64ANDconst {
 13858  			break
 13859  		}
 13860  		yc := auxIntToInt64(v_1.AuxInt)
 13861  		y := v_1.Args[0]
 13862  		if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
 13863  			break
 13864  		}
 13865  		v.reset(OpARM64BFI)
 13866  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
 13867  		v.AddArg2(x, y)
 13868  		return true
 13869  	}
 13870  	// match: (ORshiftLL [sc] (UBFX [bfc] x) (SRLconst [sc] y))
 13871  	// cond: sc == bfc.width()
 13872  	// result: (BFXIL [bfc] y x)
 13873  	for {
 13874  		sc := auxIntToInt64(v.AuxInt)
 13875  		if v_0.Op != OpARM64UBFX {
 13876  			break
 13877  		}
 13878  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 13879  		x := v_0.Args[0]
 13880  		if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
 13881  			break
 13882  		}
 13883  		y := v_1.Args[0]
 13884  		if !(sc == bfc.width()) {
 13885  			break
 13886  		}
 13887  		v.reset(OpARM64BFXIL)
 13888  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 13889  		v.AddArg2(y, x)
 13890  		return true
 13891  	}
 13892  	return false
 13893  }
 13894  func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
 13895  	v_1 := v.Args[1]
 13896  	v_0 := v.Args[0]
 13897  	b := v.Block
 13898  	// match: (ORshiftRA (MOVDconst [c]) x [d])
 13899  	// result: (ORconst [c] (SRAconst <x.Type> x [d]))
 13900  	for {
 13901  		d := auxIntToInt64(v.AuxInt)
 13902  		if v_0.Op != OpARM64MOVDconst {
 13903  			break
 13904  		}
 13905  		c := auxIntToInt64(v_0.AuxInt)
 13906  		x := v_1
 13907  		v.reset(OpARM64ORconst)
 13908  		v.AuxInt = int64ToAuxInt(c)
 13909  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 13910  		v0.AuxInt = int64ToAuxInt(d)
 13911  		v0.AddArg(x)
 13912  		v.AddArg(v0)
 13913  		return true
 13914  	}
 13915  	// match: (ORshiftRA x (MOVDconst [c]) [d])
 13916  	// result: (ORconst x [c>>uint64(d)])
 13917  	for {
 13918  		d := auxIntToInt64(v.AuxInt)
 13919  		x := v_0
 13920  		if v_1.Op != OpARM64MOVDconst {
 13921  			break
 13922  		}
 13923  		c := auxIntToInt64(v_1.AuxInt)
 13924  		v.reset(OpARM64ORconst)
 13925  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 13926  		v.AddArg(x)
 13927  		return true
 13928  	}
 13929  	// match: (ORshiftRA y:(SRAconst x [c]) x [c])
 13930  	// result: y
 13931  	for {
 13932  		c := auxIntToInt64(v.AuxInt)
 13933  		y := v_0
 13934  		if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
 13935  			break
 13936  		}
 13937  		x := y.Args[0]
 13938  		if x != v_1 {
 13939  			break
 13940  		}
 13941  		v.copyOf(y)
 13942  		return true
 13943  	}
 13944  	return false
 13945  }
 13946  func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
 13947  	v_1 := v.Args[1]
 13948  	v_0 := v.Args[0]
 13949  	b := v.Block
 13950  	// match: (ORshiftRL (MOVDconst [c]) x [d])
 13951  	// result: (ORconst [c] (SRLconst <x.Type> x [d]))
 13952  	for {
 13953  		d := auxIntToInt64(v.AuxInt)
 13954  		if v_0.Op != OpARM64MOVDconst {
 13955  			break
 13956  		}
 13957  		c := auxIntToInt64(v_0.AuxInt)
 13958  		x := v_1
 13959  		v.reset(OpARM64ORconst)
 13960  		v.AuxInt = int64ToAuxInt(c)
 13961  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 13962  		v0.AuxInt = int64ToAuxInt(d)
 13963  		v0.AddArg(x)
 13964  		v.AddArg(v0)
 13965  		return true
 13966  	}
 13967  	// match: (ORshiftRL x (MOVDconst [c]) [d])
 13968  	// result: (ORconst x [int64(uint64(c)>>uint64(d))])
 13969  	for {
 13970  		d := auxIntToInt64(v.AuxInt)
 13971  		x := v_0
 13972  		if v_1.Op != OpARM64MOVDconst {
 13973  			break
 13974  		}
 13975  		c := auxIntToInt64(v_1.AuxInt)
 13976  		v.reset(OpARM64ORconst)
 13977  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 13978  		v.AddArg(x)
 13979  		return true
 13980  	}
 13981  	// match: (ORshiftRL y:(SRLconst x [c]) x [c])
 13982  	// result: y
 13983  	for {
 13984  		c := auxIntToInt64(v.AuxInt)
 13985  		y := v_0
 13986  		if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
 13987  			break
 13988  		}
 13989  		x := y.Args[0]
 13990  		if x != v_1 {
 13991  			break
 13992  		}
 13993  		v.copyOf(y)
 13994  		return true
 13995  	}
 13996  	// match: (ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
 13997  	// cond: lc > rc && ac == ^((1<<uint(64-lc)-1) << uint64(lc-rc))
 13998  	// result: (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
 13999  	for {
 14000  		rc := auxIntToInt64(v.AuxInt)
 14001  		if v_0.Op != OpARM64ANDconst {
 14002  			break
 14003  		}
 14004  		ac := auxIntToInt64(v_0.AuxInt)
 14005  		x := v_0.Args[0]
 14006  		if v_1.Op != OpARM64SLLconst {
 14007  			break
 14008  		}
 14009  		lc := auxIntToInt64(v_1.AuxInt)
 14010  		y := v_1.Args[0]
 14011  		if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
 14012  			break
 14013  		}
 14014  		v.reset(OpARM64BFI)
 14015  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14016  		v.AddArg2(x, y)
 14017  		return true
 14018  	}
 14019  	// match: (ORshiftRL [rc] (ANDconst [ac] y) (SLLconst [lc] x))
 14020  	// cond: lc < rc && ac == ^((1<<uint(64-rc)-1))
 14021  	// result: (BFXIL [armBFAuxInt(rc-lc, 64-rc)] y x)
 14022  	for {
 14023  		rc := auxIntToInt64(v.AuxInt)
 14024  		if v_0.Op != OpARM64ANDconst {
 14025  			break
 14026  		}
 14027  		ac := auxIntToInt64(v_0.AuxInt)
 14028  		y := v_0.Args[0]
 14029  		if v_1.Op != OpARM64SLLconst {
 14030  			break
 14031  		}
 14032  		lc := auxIntToInt64(v_1.AuxInt)
 14033  		x := v_1.Args[0]
 14034  		if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
 14035  			break
 14036  		}
 14037  		v.reset(OpARM64BFXIL)
 14038  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14039  		v.AddArg2(y, x)
 14040  		return true
 14041  	}
 14042  	return false
 14043  }
 14044  func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
 14045  	v_1 := v.Args[1]
 14046  	v_0 := v.Args[0]
 14047  	b := v.Block
 14048  	// match: (ORshiftRO (MOVDconst [c]) x [d])
 14049  	// result: (ORconst [c] (RORconst <x.Type> x [d]))
 14050  	for {
 14051  		d := auxIntToInt64(v.AuxInt)
 14052  		if v_0.Op != OpARM64MOVDconst {
 14053  			break
 14054  		}
 14055  		c := auxIntToInt64(v_0.AuxInt)
 14056  		x := v_1
 14057  		v.reset(OpARM64ORconst)
 14058  		v.AuxInt = int64ToAuxInt(c)
 14059  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 14060  		v0.AuxInt = int64ToAuxInt(d)
 14061  		v0.AddArg(x)
 14062  		v.AddArg(v0)
 14063  		return true
 14064  	}
 14065  	// match: (ORshiftRO x (MOVDconst [c]) [d])
 14066  	// result: (ORconst x [rotateRight64(c, d)])
 14067  	for {
 14068  		d := auxIntToInt64(v.AuxInt)
 14069  		x := v_0
 14070  		if v_1.Op != OpARM64MOVDconst {
 14071  			break
 14072  		}
 14073  		c := auxIntToInt64(v_1.AuxInt)
 14074  		v.reset(OpARM64ORconst)
 14075  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 14076  		v.AddArg(x)
 14077  		return true
 14078  	}
 14079  	// match: (ORshiftRO y:(RORconst x [c]) x [c])
 14080  	// result: y
 14081  	for {
 14082  		c := auxIntToInt64(v.AuxInt)
 14083  		y := v_0
 14084  		if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
 14085  			break
 14086  		}
 14087  		x := y.Args[0]
 14088  		if x != v_1 {
 14089  			break
 14090  		}
 14091  		v.copyOf(y)
 14092  		return true
 14093  	}
 14094  	return false
 14095  }
 14096  func rewriteValueARM64_OpARM64REV(v *Value) bool {
 14097  	v_0 := v.Args[0]
 14098  	// match: (REV (REV p))
 14099  	// result: p
 14100  	for {
 14101  		if v_0.Op != OpARM64REV {
 14102  			break
 14103  		}
 14104  		p := v_0.Args[0]
 14105  		v.copyOf(p)
 14106  		return true
 14107  	}
 14108  	return false
 14109  }
 14110  func rewriteValueARM64_OpARM64REVW(v *Value) bool {
 14111  	v_0 := v.Args[0]
 14112  	// match: (REVW (REVW p))
 14113  	// result: p
 14114  	for {
 14115  		if v_0.Op != OpARM64REVW {
 14116  			break
 14117  		}
 14118  		p := v_0.Args[0]
 14119  		v.copyOf(p)
 14120  		return true
 14121  	}
 14122  	return false
 14123  }
 14124  func rewriteValueARM64_OpARM64ROR(v *Value) bool {
 14125  	v_1 := v.Args[1]
 14126  	v_0 := v.Args[0]
 14127  	// match: (ROR x (MOVDconst [c]))
 14128  	// result: (RORconst x [c&63])
 14129  	for {
 14130  		x := v_0
 14131  		if v_1.Op != OpARM64MOVDconst {
 14132  			break
 14133  		}
 14134  		c := auxIntToInt64(v_1.AuxInt)
 14135  		v.reset(OpARM64RORconst)
 14136  		v.AuxInt = int64ToAuxInt(c & 63)
 14137  		v.AddArg(x)
 14138  		return true
 14139  	}
 14140  	return false
 14141  }
 14142  func rewriteValueARM64_OpARM64RORW(v *Value) bool {
 14143  	v_1 := v.Args[1]
 14144  	v_0 := v.Args[0]
 14145  	// match: (RORW x (MOVDconst [c]))
 14146  	// result: (RORWconst x [c&31])
 14147  	for {
 14148  		x := v_0
 14149  		if v_1.Op != OpARM64MOVDconst {
 14150  			break
 14151  		}
 14152  		c := auxIntToInt64(v_1.AuxInt)
 14153  		v.reset(OpARM64RORWconst)
 14154  		v.AuxInt = int64ToAuxInt(c & 31)
 14155  		v.AddArg(x)
 14156  		return true
 14157  	}
 14158  	return false
 14159  }
 14160  func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
 14161  	v_2 := v.Args[2]
 14162  	v_1 := v.Args[1]
 14163  	v_0 := v.Args[0]
 14164  	b := v.Block
 14165  	typ := &b.Func.Config.Types
 14166  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> bo)))))
 14167  	// result: (SBCSflags x y bo)
 14168  	for {
 14169  		x := v_0
 14170  		y := v_1
 14171  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14172  			break
 14173  		}
 14174  		v_2_0 := v_2.Args[0]
 14175  		if v_2_0.Op != OpARM64NEGSflags {
 14176  			break
 14177  		}
 14178  		v_2_0_0 := v_2_0.Args[0]
 14179  		if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
 14180  			break
 14181  		}
 14182  		v_2_0_0_0 := v_2_0_0.Args[0]
 14183  		if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
 14184  			break
 14185  		}
 14186  		bo := v_2_0_0_0.Args[0]
 14187  		v.reset(OpARM64SBCSflags)
 14188  		v.AddArg3(x, y, bo)
 14189  		return true
 14190  	}
 14191  	// match: (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags (MOVDconst [0]))))
 14192  	// result: (SUBSflags x y)
 14193  	for {
 14194  		x := v_0
 14195  		y := v_1
 14196  		if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
 14197  			break
 14198  		}
 14199  		v_2_0 := v_2.Args[0]
 14200  		if v_2_0.Op != OpARM64NEGSflags {
 14201  			break
 14202  		}
 14203  		v_2_0_0 := v_2_0.Args[0]
 14204  		if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 14205  			break
 14206  		}
 14207  		v.reset(OpARM64SUBSflags)
 14208  		v.AddArg2(x, y)
 14209  		return true
 14210  	}
 14211  	return false
 14212  }
 14213  func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
 14214  	v_0 := v.Args[0]
 14215  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14216  	// cond: s.Uses == 1 && sc <= bfc.lsb()
 14217  	// result: (SBFX [armBFAuxInt(bfc.lsb() - sc, bfc.width())] x)
 14218  	for {
 14219  		bfc := auxIntToArm64BitField(v.AuxInt)
 14220  		s := v_0
 14221  		if s.Op != OpARM64SLLconst {
 14222  			break
 14223  		}
 14224  		sc := auxIntToInt64(s.AuxInt)
 14225  		x := s.Args[0]
 14226  		if !(s.Uses == 1 && sc <= bfc.lsb()) {
 14227  			break
 14228  		}
 14229  		v.reset(OpARM64SBFX)
 14230  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14231  		v.AddArg(x)
 14232  		return true
 14233  	}
 14234  	// match: (SBFX [bfc] s:(SLLconst [sc] x))
 14235  	// cond: s.Uses == 1 && sc > bfc.lsb()
 14236  	// result: (SBFIZ [armBFAuxInt(sc - bfc.lsb(), bfc.width() - (sc-bfc.lsb()))] x)
 14237  	for {
 14238  		bfc := auxIntToArm64BitField(v.AuxInt)
 14239  		s := v_0
 14240  		if s.Op != OpARM64SLLconst {
 14241  			break
 14242  		}
 14243  		sc := auxIntToInt64(s.AuxInt)
 14244  		x := s.Args[0]
 14245  		if !(s.Uses == 1 && sc > bfc.lsb()) {
 14246  			break
 14247  		}
 14248  		v.reset(OpARM64SBFIZ)
 14249  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
 14250  		v.AddArg(x)
 14251  		return true
 14252  	}
 14253  	return false
 14254  }
 14255  func rewriteValueARM64_OpARM64SLL(v *Value) bool {
 14256  	v_1 := v.Args[1]
 14257  	v_0 := v.Args[0]
 14258  	// match: (SLL x (MOVDconst [c]))
 14259  	// result: (SLLconst x [c&63])
 14260  	for {
 14261  		x := v_0
 14262  		if v_1.Op != OpARM64MOVDconst {
 14263  			break
 14264  		}
 14265  		c := auxIntToInt64(v_1.AuxInt)
 14266  		v.reset(OpARM64SLLconst)
 14267  		v.AuxInt = int64ToAuxInt(c & 63)
 14268  		v.AddArg(x)
 14269  		return true
 14270  	}
 14271  	// match: (SLL x (ANDconst [63] y))
 14272  	// result: (SLL x y)
 14273  	for {
 14274  		x := v_0
 14275  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14276  			break
 14277  		}
 14278  		y := v_1.Args[0]
 14279  		v.reset(OpARM64SLL)
 14280  		v.AddArg2(x, y)
 14281  		return true
 14282  	}
 14283  	return false
 14284  }
 14285  func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
 14286  	v_0 := v.Args[0]
 14287  	// match: (SLLconst [c] (MOVDconst [d]))
 14288  	// result: (MOVDconst [d<<uint64(c)])
 14289  	for {
 14290  		c := auxIntToInt64(v.AuxInt)
 14291  		if v_0.Op != OpARM64MOVDconst {
 14292  			break
 14293  		}
 14294  		d := auxIntToInt64(v_0.AuxInt)
 14295  		v.reset(OpARM64MOVDconst)
 14296  		v.AuxInt = int64ToAuxInt(d << uint64(c))
 14297  		return true
 14298  	}
 14299  	// match: (SLLconst [c] (SRLconst [c] x))
 14300  	// cond: 0 < c && c < 64
 14301  	// result: (ANDconst [^(1<<uint(c)-1)] x)
 14302  	for {
 14303  		c := auxIntToInt64(v.AuxInt)
 14304  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 14305  			break
 14306  		}
 14307  		x := v_0.Args[0]
 14308  		if !(0 < c && c < 64) {
 14309  			break
 14310  		}
 14311  		v.reset(OpARM64ANDconst)
 14312  		v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
 14313  		v.AddArg(x)
 14314  		return true
 14315  	}
 14316  	// match: (SLLconst [lc] (MOVWreg x))
 14317  	// result: (SBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14318  	for {
 14319  		lc := auxIntToInt64(v.AuxInt)
 14320  		if v_0.Op != OpARM64MOVWreg {
 14321  			break
 14322  		}
 14323  		x := v_0.Args[0]
 14324  		v.reset(OpARM64SBFIZ)
 14325  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14326  		v.AddArg(x)
 14327  		return true
 14328  	}
 14329  	// match: (SLLconst [lc] (MOVHreg x))
 14330  	// result: (SBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14331  	for {
 14332  		lc := auxIntToInt64(v.AuxInt)
 14333  		if v_0.Op != OpARM64MOVHreg {
 14334  			break
 14335  		}
 14336  		x := v_0.Args[0]
 14337  		v.reset(OpARM64SBFIZ)
 14338  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14339  		v.AddArg(x)
 14340  		return true
 14341  	}
 14342  	// match: (SLLconst [lc] (MOVBreg x))
 14343  	// result: (SBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14344  	for {
 14345  		lc := auxIntToInt64(v.AuxInt)
 14346  		if v_0.Op != OpARM64MOVBreg {
 14347  			break
 14348  		}
 14349  		x := v_0.Args[0]
 14350  		v.reset(OpARM64SBFIZ)
 14351  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14352  		v.AddArg(x)
 14353  		return true
 14354  	}
 14355  	// match: (SLLconst [lc] (MOVWUreg x))
 14356  	// result: (UBFIZ [armBFAuxInt(lc, min(32, 64-lc))] x)
 14357  	for {
 14358  		lc := auxIntToInt64(v.AuxInt)
 14359  		if v_0.Op != OpARM64MOVWUreg {
 14360  			break
 14361  		}
 14362  		x := v_0.Args[0]
 14363  		v.reset(OpARM64UBFIZ)
 14364  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
 14365  		v.AddArg(x)
 14366  		return true
 14367  	}
 14368  	// match: (SLLconst [lc] (MOVHUreg x))
 14369  	// result: (UBFIZ [armBFAuxInt(lc, min(16, 64-lc))] x)
 14370  	for {
 14371  		lc := auxIntToInt64(v.AuxInt)
 14372  		if v_0.Op != OpARM64MOVHUreg {
 14373  			break
 14374  		}
 14375  		x := v_0.Args[0]
 14376  		v.reset(OpARM64UBFIZ)
 14377  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
 14378  		v.AddArg(x)
 14379  		return true
 14380  	}
 14381  	// match: (SLLconst [lc] (MOVBUreg x))
 14382  	// result: (UBFIZ [armBFAuxInt(lc, min(8, 64-lc))] x)
 14383  	for {
 14384  		lc := auxIntToInt64(v.AuxInt)
 14385  		if v_0.Op != OpARM64MOVBUreg {
 14386  			break
 14387  		}
 14388  		x := v_0.Args[0]
 14389  		v.reset(OpARM64UBFIZ)
 14390  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
 14391  		v.AddArg(x)
 14392  		return true
 14393  	}
 14394  	// match: (SLLconst [sc] (ANDconst [ac] x))
 14395  	// cond: isARM64BFMask(sc, ac, 0)
 14396  	// result: (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
 14397  	for {
 14398  		sc := auxIntToInt64(v.AuxInt)
 14399  		if v_0.Op != OpARM64ANDconst {
 14400  			break
 14401  		}
 14402  		ac := auxIntToInt64(v_0.AuxInt)
 14403  		x := v_0.Args[0]
 14404  		if !(isARM64BFMask(sc, ac, 0)) {
 14405  			break
 14406  		}
 14407  		v.reset(OpARM64UBFIZ)
 14408  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
 14409  		v.AddArg(x)
 14410  		return true
 14411  	}
 14412  	// match: (SLLconst [sc] (UBFIZ [bfc] x))
 14413  	// cond: sc+bfc.width()+bfc.lsb() < 64
 14414  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 14415  	for {
 14416  		sc := auxIntToInt64(v.AuxInt)
 14417  		if v_0.Op != OpARM64UBFIZ {
 14418  			break
 14419  		}
 14420  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14421  		x := v_0.Args[0]
 14422  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 14423  			break
 14424  		}
 14425  		v.reset(OpARM64UBFIZ)
 14426  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 14427  		v.AddArg(x)
 14428  		return true
 14429  	}
 14430  	return false
 14431  }
 14432  func rewriteValueARM64_OpARM64SRA(v *Value) bool {
 14433  	v_1 := v.Args[1]
 14434  	v_0 := v.Args[0]
 14435  	// match: (SRA x (MOVDconst [c]))
 14436  	// result: (SRAconst x [c&63])
 14437  	for {
 14438  		x := v_0
 14439  		if v_1.Op != OpARM64MOVDconst {
 14440  			break
 14441  		}
 14442  		c := auxIntToInt64(v_1.AuxInt)
 14443  		v.reset(OpARM64SRAconst)
 14444  		v.AuxInt = int64ToAuxInt(c & 63)
 14445  		v.AddArg(x)
 14446  		return true
 14447  	}
 14448  	// match: (SRA x (ANDconst [63] y))
 14449  	// result: (SRA x y)
 14450  	for {
 14451  		x := v_0
 14452  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14453  			break
 14454  		}
 14455  		y := v_1.Args[0]
 14456  		v.reset(OpARM64SRA)
 14457  		v.AddArg2(x, y)
 14458  		return true
 14459  	}
 14460  	return false
 14461  }
 14462  func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
 14463  	v_0 := v.Args[0]
 14464  	// match: (SRAconst [c] (MOVDconst [d]))
 14465  	// result: (MOVDconst [d>>uint64(c)])
 14466  	for {
 14467  		c := auxIntToInt64(v.AuxInt)
 14468  		if v_0.Op != OpARM64MOVDconst {
 14469  			break
 14470  		}
 14471  		d := auxIntToInt64(v_0.AuxInt)
 14472  		v.reset(OpARM64MOVDconst)
 14473  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 14474  		return true
 14475  	}
 14476  	// match: (SRAconst [rc] (SLLconst [lc] x))
 14477  	// cond: lc > rc
 14478  	// result: (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 14479  	for {
 14480  		rc := auxIntToInt64(v.AuxInt)
 14481  		if v_0.Op != OpARM64SLLconst {
 14482  			break
 14483  		}
 14484  		lc := auxIntToInt64(v_0.AuxInt)
 14485  		x := v_0.Args[0]
 14486  		if !(lc > rc) {
 14487  			break
 14488  		}
 14489  		v.reset(OpARM64SBFIZ)
 14490  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14491  		v.AddArg(x)
 14492  		return true
 14493  	}
 14494  	// match: (SRAconst [rc] (SLLconst [lc] x))
 14495  	// cond: lc <= rc
 14496  	// result: (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 14497  	for {
 14498  		rc := auxIntToInt64(v.AuxInt)
 14499  		if v_0.Op != OpARM64SLLconst {
 14500  			break
 14501  		}
 14502  		lc := auxIntToInt64(v_0.AuxInt)
 14503  		x := v_0.Args[0]
 14504  		if !(lc <= rc) {
 14505  			break
 14506  		}
 14507  		v.reset(OpARM64SBFX)
 14508  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14509  		v.AddArg(x)
 14510  		return true
 14511  	}
 14512  	// match: (SRAconst [rc] (MOVWreg x))
 14513  	// cond: rc < 32
 14514  	// result: (SBFX [armBFAuxInt(rc, 32-rc)] x)
 14515  	for {
 14516  		rc := auxIntToInt64(v.AuxInt)
 14517  		if v_0.Op != OpARM64MOVWreg {
 14518  			break
 14519  		}
 14520  		x := v_0.Args[0]
 14521  		if !(rc < 32) {
 14522  			break
 14523  		}
 14524  		v.reset(OpARM64SBFX)
 14525  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 14526  		v.AddArg(x)
 14527  		return true
 14528  	}
 14529  	// match: (SRAconst [rc] (MOVHreg x))
 14530  	// cond: rc < 16
 14531  	// result: (SBFX [armBFAuxInt(rc, 16-rc)] x)
 14532  	for {
 14533  		rc := auxIntToInt64(v.AuxInt)
 14534  		if v_0.Op != OpARM64MOVHreg {
 14535  			break
 14536  		}
 14537  		x := v_0.Args[0]
 14538  		if !(rc < 16) {
 14539  			break
 14540  		}
 14541  		v.reset(OpARM64SBFX)
 14542  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 14543  		v.AddArg(x)
 14544  		return true
 14545  	}
 14546  	// match: (SRAconst [rc] (MOVBreg x))
 14547  	// cond: rc < 8
 14548  	// result: (SBFX [armBFAuxInt(rc, 8-rc)] x)
 14549  	for {
 14550  		rc := auxIntToInt64(v.AuxInt)
 14551  		if v_0.Op != OpARM64MOVBreg {
 14552  			break
 14553  		}
 14554  		x := v_0.Args[0]
 14555  		if !(rc < 8) {
 14556  			break
 14557  		}
 14558  		v.reset(OpARM64SBFX)
 14559  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 14560  		v.AddArg(x)
 14561  		return true
 14562  	}
 14563  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 14564  	// cond: sc < bfc.lsb()
 14565  	// result: (SBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 14566  	for {
 14567  		sc := auxIntToInt64(v.AuxInt)
 14568  		if v_0.Op != OpARM64SBFIZ {
 14569  			break
 14570  		}
 14571  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14572  		x := v_0.Args[0]
 14573  		if !(sc < bfc.lsb()) {
 14574  			break
 14575  		}
 14576  		v.reset(OpARM64SBFIZ)
 14577  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14578  		v.AddArg(x)
 14579  		return true
 14580  	}
 14581  	// match: (SRAconst [sc] (SBFIZ [bfc] x))
 14582  	// cond: sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()
 14583  	// result: (SBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 14584  	for {
 14585  		sc := auxIntToInt64(v.AuxInt)
 14586  		if v_0.Op != OpARM64SBFIZ {
 14587  			break
 14588  		}
 14589  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14590  		x := v_0.Args[0]
 14591  		if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 14592  			break
 14593  		}
 14594  		v.reset(OpARM64SBFX)
 14595  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 14596  		v.AddArg(x)
 14597  		return true
 14598  	}
 14599  	return false
 14600  }
 14601  func rewriteValueARM64_OpARM64SRL(v *Value) bool {
 14602  	v_1 := v.Args[1]
 14603  	v_0 := v.Args[0]
 14604  	// match: (SRL x (MOVDconst [c]))
 14605  	// result: (SRLconst x [c&63])
 14606  	for {
 14607  		x := v_0
 14608  		if v_1.Op != OpARM64MOVDconst {
 14609  			break
 14610  		}
 14611  		c := auxIntToInt64(v_1.AuxInt)
 14612  		v.reset(OpARM64SRLconst)
 14613  		v.AuxInt = int64ToAuxInt(c & 63)
 14614  		v.AddArg(x)
 14615  		return true
 14616  	}
 14617  	// match: (SRL x (ANDconst [63] y))
 14618  	// result: (SRL x y)
 14619  	for {
 14620  		x := v_0
 14621  		if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
 14622  			break
 14623  		}
 14624  		y := v_1.Args[0]
 14625  		v.reset(OpARM64SRL)
 14626  		v.AddArg2(x, y)
 14627  		return true
 14628  	}
 14629  	return false
 14630  }
 14631  func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
 14632  	v_0 := v.Args[0]
 14633  	// match: (SRLconst [c] (MOVDconst [d]))
 14634  	// result: (MOVDconst [int64(uint64(d)>>uint64(c))])
 14635  	for {
 14636  		c := auxIntToInt64(v.AuxInt)
 14637  		if v_0.Op != OpARM64MOVDconst {
 14638  			break
 14639  		}
 14640  		d := auxIntToInt64(v_0.AuxInt)
 14641  		v.reset(OpARM64MOVDconst)
 14642  		v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
 14643  		return true
 14644  	}
 14645  	// match: (SRLconst [c] (SLLconst [c] x))
 14646  	// cond: 0 < c && c < 64
 14647  	// result: (ANDconst [1<<uint(64-c)-1] x)
 14648  	for {
 14649  		c := auxIntToInt64(v.AuxInt)
 14650  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 14651  			break
 14652  		}
 14653  		x := v_0.Args[0]
 14654  		if !(0 < c && c < 64) {
 14655  			break
 14656  		}
 14657  		v.reset(OpARM64ANDconst)
 14658  		v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
 14659  		v.AddArg(x)
 14660  		return true
 14661  	}
 14662  	// match: (SRLconst [rc] (MOVWUreg x))
 14663  	// cond: rc >= 32
 14664  	// result: (MOVDconst [0])
 14665  	for {
 14666  		rc := auxIntToInt64(v.AuxInt)
 14667  		if v_0.Op != OpARM64MOVWUreg {
 14668  			break
 14669  		}
 14670  		if !(rc >= 32) {
 14671  			break
 14672  		}
 14673  		v.reset(OpARM64MOVDconst)
 14674  		v.AuxInt = int64ToAuxInt(0)
 14675  		return true
 14676  	}
 14677  	// match: (SRLconst [rc] (MOVHUreg x))
 14678  	// cond: rc >= 16
 14679  	// result: (MOVDconst [0])
 14680  	for {
 14681  		rc := auxIntToInt64(v.AuxInt)
 14682  		if v_0.Op != OpARM64MOVHUreg {
 14683  			break
 14684  		}
 14685  		if !(rc >= 16) {
 14686  			break
 14687  		}
 14688  		v.reset(OpARM64MOVDconst)
 14689  		v.AuxInt = int64ToAuxInt(0)
 14690  		return true
 14691  	}
 14692  	// match: (SRLconst [rc] (MOVBUreg x))
 14693  	// cond: rc >= 8
 14694  	// result: (MOVDconst [0])
 14695  	for {
 14696  		rc := auxIntToInt64(v.AuxInt)
 14697  		if v_0.Op != OpARM64MOVBUreg {
 14698  			break
 14699  		}
 14700  		if !(rc >= 8) {
 14701  			break
 14702  		}
 14703  		v.reset(OpARM64MOVDconst)
 14704  		v.AuxInt = int64ToAuxInt(0)
 14705  		return true
 14706  	}
 14707  	// match: (SRLconst [rc] (SLLconst [lc] x))
 14708  	// cond: lc > rc
 14709  	// result: (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
 14710  	for {
 14711  		rc := auxIntToInt64(v.AuxInt)
 14712  		if v_0.Op != OpARM64SLLconst {
 14713  			break
 14714  		}
 14715  		lc := auxIntToInt64(v_0.AuxInt)
 14716  		x := v_0.Args[0]
 14717  		if !(lc > rc) {
 14718  			break
 14719  		}
 14720  		v.reset(OpARM64UBFIZ)
 14721  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
 14722  		v.AddArg(x)
 14723  		return true
 14724  	}
 14725  	// match: (SRLconst [rc] (SLLconst [lc] x))
 14726  	// cond: lc < rc
 14727  	// result: (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
 14728  	for {
 14729  		rc := auxIntToInt64(v.AuxInt)
 14730  		if v_0.Op != OpARM64SLLconst {
 14731  			break
 14732  		}
 14733  		lc := auxIntToInt64(v_0.AuxInt)
 14734  		x := v_0.Args[0]
 14735  		if !(lc < rc) {
 14736  			break
 14737  		}
 14738  		v.reset(OpARM64UBFX)
 14739  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
 14740  		v.AddArg(x)
 14741  		return true
 14742  	}
 14743  	// match: (SRLconst [rc] (MOVWUreg x))
 14744  	// cond: rc < 32
 14745  	// result: (UBFX [armBFAuxInt(rc, 32-rc)] x)
 14746  	for {
 14747  		rc := auxIntToInt64(v.AuxInt)
 14748  		if v_0.Op != OpARM64MOVWUreg {
 14749  			break
 14750  		}
 14751  		x := v_0.Args[0]
 14752  		if !(rc < 32) {
 14753  			break
 14754  		}
 14755  		v.reset(OpARM64UBFX)
 14756  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
 14757  		v.AddArg(x)
 14758  		return true
 14759  	}
 14760  	// match: (SRLconst [rc] (MOVHUreg x))
 14761  	// cond: rc < 16
 14762  	// result: (UBFX [armBFAuxInt(rc, 16-rc)] x)
 14763  	for {
 14764  		rc := auxIntToInt64(v.AuxInt)
 14765  		if v_0.Op != OpARM64MOVHUreg {
 14766  			break
 14767  		}
 14768  		x := v_0.Args[0]
 14769  		if !(rc < 16) {
 14770  			break
 14771  		}
 14772  		v.reset(OpARM64UBFX)
 14773  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
 14774  		v.AddArg(x)
 14775  		return true
 14776  	}
 14777  	// match: (SRLconst [rc] (MOVBUreg x))
 14778  	// cond: rc < 8
 14779  	// result: (UBFX [armBFAuxInt(rc, 8-rc)] x)
 14780  	for {
 14781  		rc := auxIntToInt64(v.AuxInt)
 14782  		if v_0.Op != OpARM64MOVBUreg {
 14783  			break
 14784  		}
 14785  		x := v_0.Args[0]
 14786  		if !(rc < 8) {
 14787  			break
 14788  		}
 14789  		v.reset(OpARM64UBFX)
 14790  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
 14791  		v.AddArg(x)
 14792  		return true
 14793  	}
 14794  	// match: (SRLconst [sc] (ANDconst [ac] x))
 14795  	// cond: isARM64BFMask(sc, ac, sc)
 14796  	// result: (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
 14797  	for {
 14798  		sc := auxIntToInt64(v.AuxInt)
 14799  		if v_0.Op != OpARM64ANDconst {
 14800  			break
 14801  		}
 14802  		ac := auxIntToInt64(v_0.AuxInt)
 14803  		x := v_0.Args[0]
 14804  		if !(isARM64BFMask(sc, ac, sc)) {
 14805  			break
 14806  		}
 14807  		v.reset(OpARM64UBFX)
 14808  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
 14809  		v.AddArg(x)
 14810  		return true
 14811  	}
 14812  	// match: (SRLconst [sc] (UBFX [bfc] x))
 14813  	// cond: sc < bfc.width()
 14814  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 14815  	for {
 14816  		sc := auxIntToInt64(v.AuxInt)
 14817  		if v_0.Op != OpARM64UBFX {
 14818  			break
 14819  		}
 14820  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14821  		x := v_0.Args[0]
 14822  		if !(sc < bfc.width()) {
 14823  			break
 14824  		}
 14825  		v.reset(OpARM64UBFX)
 14826  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 14827  		v.AddArg(x)
 14828  		return true
 14829  	}
 14830  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 14831  	// cond: sc == bfc.lsb()
 14832  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 14833  	for {
 14834  		sc := auxIntToInt64(v.AuxInt)
 14835  		if v_0.Op != OpARM64UBFIZ {
 14836  			break
 14837  		}
 14838  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14839  		x := v_0.Args[0]
 14840  		if !(sc == bfc.lsb()) {
 14841  			break
 14842  		}
 14843  		v.reset(OpARM64ANDconst)
 14844  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 14845  		v.AddArg(x)
 14846  		return true
 14847  	}
 14848  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 14849  	// cond: sc < bfc.lsb()
 14850  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 14851  	for {
 14852  		sc := auxIntToInt64(v.AuxInt)
 14853  		if v_0.Op != OpARM64UBFIZ {
 14854  			break
 14855  		}
 14856  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14857  		x := v_0.Args[0]
 14858  		if !(sc < bfc.lsb()) {
 14859  			break
 14860  		}
 14861  		v.reset(OpARM64UBFIZ)
 14862  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 14863  		v.AddArg(x)
 14864  		return true
 14865  	}
 14866  	// match: (SRLconst [sc] (UBFIZ [bfc] x))
 14867  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 14868  	// result: (UBFX [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 14869  	for {
 14870  		sc := auxIntToInt64(v.AuxInt)
 14871  		if v_0.Op != OpARM64UBFIZ {
 14872  			break
 14873  		}
 14874  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 14875  		x := v_0.Args[0]
 14876  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 14877  			break
 14878  		}
 14879  		v.reset(OpARM64UBFX)
 14880  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 14881  		v.AddArg(x)
 14882  		return true
 14883  	}
 14884  	return false
 14885  }
 14886  func rewriteValueARM64_OpARM64STP(v *Value) bool {
 14887  	v_3 := v.Args[3]
 14888  	v_2 := v.Args[2]
 14889  	v_1 := v.Args[1]
 14890  	v_0 := v.Args[0]
 14891  	b := v.Block
 14892  	config := b.Func.Config
 14893  	// match: (STP [off1] {sym} (ADDconst [off2] ptr) val1 val2 mem)
 14894  	// cond: is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 14895  	// result: (STP [off1+int32(off2)] {sym} ptr val1 val2 mem)
 14896  	for {
 14897  		off1 := auxIntToInt32(v.AuxInt)
 14898  		sym := auxToSym(v.Aux)
 14899  		if v_0.Op != OpARM64ADDconst {
 14900  			break
 14901  		}
 14902  		off2 := auxIntToInt64(v_0.AuxInt)
 14903  		ptr := v_0.Args[0]
 14904  		val1 := v_1
 14905  		val2 := v_2
 14906  		mem := v_3
 14907  		if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 14908  			break
 14909  		}
 14910  		v.reset(OpARM64STP)
 14911  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 14912  		v.Aux = symToAux(sym)
 14913  		v.AddArg4(ptr, val1, val2, mem)
 14914  		return true
 14915  	}
 14916  	// match: (STP [off1] {sym1} (MOVDaddr [off2] {sym2} ptr) val1 val2 mem)
 14917  	// cond: canMergeSym(sym1,sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)
 14918  	// result: (STP [off1+off2] {mergeSym(sym1,sym2)} ptr val1 val2 mem)
 14919  	for {
 14920  		off1 := auxIntToInt32(v.AuxInt)
 14921  		sym1 := auxToSym(v.Aux)
 14922  		if v_0.Op != OpARM64MOVDaddr {
 14923  			break
 14924  		}
 14925  		off2 := auxIntToInt32(v_0.AuxInt)
 14926  		sym2 := auxToSym(v_0.Aux)
 14927  		ptr := v_0.Args[0]
 14928  		val1 := v_1
 14929  		val2 := v_2
 14930  		mem := v_3
 14931  		if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
 14932  			break
 14933  		}
 14934  		v.reset(OpARM64STP)
 14935  		v.AuxInt = int32ToAuxInt(off1 + off2)
 14936  		v.Aux = symToAux(mergeSym(sym1, sym2))
 14937  		v.AddArg4(ptr, val1, val2, mem)
 14938  		return true
 14939  	}
 14940  	return false
 14941  }
 14942  func rewriteValueARM64_OpARM64SUB(v *Value) bool {
 14943  	v_1 := v.Args[1]
 14944  	v_0 := v.Args[0]
 14945  	b := v.Block
 14946  	// match: (SUB x (MOVDconst [c]))
 14947  	// result: (SUBconst [c] x)
 14948  	for {
 14949  		x := v_0
 14950  		if v_1.Op != OpARM64MOVDconst {
 14951  			break
 14952  		}
 14953  		c := auxIntToInt64(v_1.AuxInt)
 14954  		v.reset(OpARM64SUBconst)
 14955  		v.AuxInt = int64ToAuxInt(c)
 14956  		v.AddArg(x)
 14957  		return true
 14958  	}
 14959  	// match: (SUB a l:(MUL x y))
 14960  	// cond: l.Uses==1 && clobber(l)
 14961  	// result: (MSUB a x y)
 14962  	for {
 14963  		a := v_0
 14964  		l := v_1
 14965  		if l.Op != OpARM64MUL {
 14966  			break
 14967  		}
 14968  		y := l.Args[1]
 14969  		x := l.Args[0]
 14970  		if !(l.Uses == 1 && clobber(l)) {
 14971  			break
 14972  		}
 14973  		v.reset(OpARM64MSUB)
 14974  		v.AddArg3(a, x, y)
 14975  		return true
 14976  	}
 14977  	// match: (SUB a l:(MNEG x y))
 14978  	// cond: l.Uses==1 && clobber(l)
 14979  	// result: (MADD a x y)
 14980  	for {
 14981  		a := v_0
 14982  		l := v_1
 14983  		if l.Op != OpARM64MNEG {
 14984  			break
 14985  		}
 14986  		y := l.Args[1]
 14987  		x := l.Args[0]
 14988  		if !(l.Uses == 1 && clobber(l)) {
 14989  			break
 14990  		}
 14991  		v.reset(OpARM64MADD)
 14992  		v.AddArg3(a, x, y)
 14993  		return true
 14994  	}
 14995  	// match: (SUB a l:(MULW x y))
 14996  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 14997  	// result: (MSUBW a x y)
 14998  	for {
 14999  		a := v_0
 15000  		l := v_1
 15001  		if l.Op != OpARM64MULW {
 15002  			break
 15003  		}
 15004  		y := l.Args[1]
 15005  		x := l.Args[0]
 15006  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15007  			break
 15008  		}
 15009  		v.reset(OpARM64MSUBW)
 15010  		v.AddArg3(a, x, y)
 15011  		return true
 15012  	}
 15013  	// match: (SUB a l:(MNEGW x y))
 15014  	// cond: v.Type.Size() <= 4 && l.Uses==1 && clobber(l)
 15015  	// result: (MADDW a x y)
 15016  	for {
 15017  		a := v_0
 15018  		l := v_1
 15019  		if l.Op != OpARM64MNEGW {
 15020  			break
 15021  		}
 15022  		y := l.Args[1]
 15023  		x := l.Args[0]
 15024  		if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
 15025  			break
 15026  		}
 15027  		v.reset(OpARM64MADDW)
 15028  		v.AddArg3(a, x, y)
 15029  		return true
 15030  	}
 15031  	// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
 15032  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15033  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15034  	for {
 15035  		t := v.Type
 15036  		a := v_0
 15037  		p := v_1
 15038  		if p.Op != OpARM64ADDconst {
 15039  			break
 15040  		}
 15041  		c := auxIntToInt64(p.AuxInt)
 15042  		m := p.Args[0]
 15043  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15044  			break
 15045  		}
 15046  		v.reset(OpARM64SUBconst)
 15047  		v.AuxInt = int64ToAuxInt(c)
 15048  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15049  		v0.AddArg2(a, m)
 15050  		v.AddArg(v0)
 15051  		return true
 15052  	}
 15053  	// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
 15054  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15055  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15056  	for {
 15057  		t := v.Type
 15058  		a := v_0
 15059  		p := v_1
 15060  		if p.Op != OpARM64ADDconst {
 15061  			break
 15062  		}
 15063  		c := auxIntToInt64(p.AuxInt)
 15064  		m := p.Args[0]
 15065  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15066  			break
 15067  		}
 15068  		v.reset(OpARM64SUBconst)
 15069  		v.AuxInt = int64ToAuxInt(c)
 15070  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15071  		v0.AddArg2(a, m)
 15072  		v.AddArg(v0)
 15073  		return true
 15074  	}
 15075  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
 15076  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15077  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15078  	for {
 15079  		t := v.Type
 15080  		a := v_0
 15081  		p := v_1
 15082  		if p.Op != OpARM64ADDconst {
 15083  			break
 15084  		}
 15085  		c := auxIntToInt64(p.AuxInt)
 15086  		m := p.Args[0]
 15087  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15088  			break
 15089  		}
 15090  		v.reset(OpARM64SUBconst)
 15091  		v.AuxInt = int64ToAuxInt(c)
 15092  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15093  		v0.AddArg2(a, m)
 15094  		v.AddArg(v0)
 15095  		return true
 15096  	}
 15097  	// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
 15098  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15099  	// result: (SUBconst [c] (SUB <v.Type> a m))
 15100  	for {
 15101  		t := v.Type
 15102  		a := v_0
 15103  		p := v_1
 15104  		if p.Op != OpARM64ADDconst {
 15105  			break
 15106  		}
 15107  		c := auxIntToInt64(p.AuxInt)
 15108  		m := p.Args[0]
 15109  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15110  			break
 15111  		}
 15112  		v.reset(OpARM64SUBconst)
 15113  		v.AuxInt = int64ToAuxInt(c)
 15114  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15115  		v0.AddArg2(a, m)
 15116  		v.AddArg(v0)
 15117  		return true
 15118  	}
 15119  	// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
 15120  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15121  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15122  	for {
 15123  		t := v.Type
 15124  		a := v_0
 15125  		p := v_1
 15126  		if p.Op != OpARM64SUBconst {
 15127  			break
 15128  		}
 15129  		c := auxIntToInt64(p.AuxInt)
 15130  		m := p.Args[0]
 15131  		if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15132  			break
 15133  		}
 15134  		v.reset(OpARM64ADDconst)
 15135  		v.AuxInt = int64ToAuxInt(c)
 15136  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15137  		v0.AddArg2(a, m)
 15138  		v.AddArg(v0)
 15139  		return true
 15140  	}
 15141  	// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
 15142  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15143  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15144  	for {
 15145  		t := v.Type
 15146  		a := v_0
 15147  		p := v_1
 15148  		if p.Op != OpARM64SUBconst {
 15149  			break
 15150  		}
 15151  		c := auxIntToInt64(p.AuxInt)
 15152  		m := p.Args[0]
 15153  		if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15154  			break
 15155  		}
 15156  		v.reset(OpARM64ADDconst)
 15157  		v.AuxInt = int64ToAuxInt(c)
 15158  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15159  		v0.AddArg2(a, m)
 15160  		v.AddArg(v0)
 15161  		return true
 15162  	}
 15163  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
 15164  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15165  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15166  	for {
 15167  		t := v.Type
 15168  		a := v_0
 15169  		p := v_1
 15170  		if p.Op != OpARM64SUBconst {
 15171  			break
 15172  		}
 15173  		c := auxIntToInt64(p.AuxInt)
 15174  		m := p.Args[0]
 15175  		if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15176  			break
 15177  		}
 15178  		v.reset(OpARM64ADDconst)
 15179  		v.AuxInt = int64ToAuxInt(c)
 15180  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15181  		v0.AddArg2(a, m)
 15182  		v.AddArg(v0)
 15183  		return true
 15184  	}
 15185  	// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
 15186  	// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
 15187  	// result: (ADDconst [c] (SUB <v.Type> a m))
 15188  	for {
 15189  		t := v.Type
 15190  		a := v_0
 15191  		p := v_1
 15192  		if p.Op != OpARM64SUBconst {
 15193  			break
 15194  		}
 15195  		c := auxIntToInt64(p.AuxInt)
 15196  		m := p.Args[0]
 15197  		if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
 15198  			break
 15199  		}
 15200  		v.reset(OpARM64ADDconst)
 15201  		v.AuxInt = int64ToAuxInt(c)
 15202  		v0 := b.NewValue0(v.Pos, OpARM64SUB, v.Type)
 15203  		v0.AddArg2(a, m)
 15204  		v.AddArg(v0)
 15205  		return true
 15206  	}
 15207  	// match: (SUB x x)
 15208  	// result: (MOVDconst [0])
 15209  	for {
 15210  		x := v_0
 15211  		if x != v_1 {
 15212  			break
 15213  		}
 15214  		v.reset(OpARM64MOVDconst)
 15215  		v.AuxInt = int64ToAuxInt(0)
 15216  		return true
 15217  	}
 15218  	// match: (SUB x (SUB y z))
 15219  	// result: (SUB (ADD <v.Type> x z) y)
 15220  	for {
 15221  		x := v_0
 15222  		if v_1.Op != OpARM64SUB {
 15223  			break
 15224  		}
 15225  		z := v_1.Args[1]
 15226  		y := v_1.Args[0]
 15227  		v.reset(OpARM64SUB)
 15228  		v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
 15229  		v0.AddArg2(x, z)
 15230  		v.AddArg2(v0, y)
 15231  		return true
 15232  	}
 15233  	// match: (SUB (SUB x y) z)
 15234  	// result: (SUB x (ADD <y.Type> y z))
 15235  	for {
 15236  		if v_0.Op != OpARM64SUB {
 15237  			break
 15238  		}
 15239  		y := v_0.Args[1]
 15240  		x := v_0.Args[0]
 15241  		z := v_1
 15242  		v.reset(OpARM64SUB)
 15243  		v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
 15244  		v0.AddArg2(y, z)
 15245  		v.AddArg2(x, v0)
 15246  		return true
 15247  	}
 15248  	// match: (SUB x0 x1:(SLLconst [c] y))
 15249  	// cond: clobberIfDead(x1)
 15250  	// result: (SUBshiftLL x0 y [c])
 15251  	for {
 15252  		x0 := v_0
 15253  		x1 := v_1
 15254  		if x1.Op != OpARM64SLLconst {
 15255  			break
 15256  		}
 15257  		c := auxIntToInt64(x1.AuxInt)
 15258  		y := x1.Args[0]
 15259  		if !(clobberIfDead(x1)) {
 15260  			break
 15261  		}
 15262  		v.reset(OpARM64SUBshiftLL)
 15263  		v.AuxInt = int64ToAuxInt(c)
 15264  		v.AddArg2(x0, y)
 15265  		return true
 15266  	}
 15267  	// match: (SUB x0 x1:(SRLconst [c] y))
 15268  	// cond: clobberIfDead(x1)
 15269  	// result: (SUBshiftRL x0 y [c])
 15270  	for {
 15271  		x0 := v_0
 15272  		x1 := v_1
 15273  		if x1.Op != OpARM64SRLconst {
 15274  			break
 15275  		}
 15276  		c := auxIntToInt64(x1.AuxInt)
 15277  		y := x1.Args[0]
 15278  		if !(clobberIfDead(x1)) {
 15279  			break
 15280  		}
 15281  		v.reset(OpARM64SUBshiftRL)
 15282  		v.AuxInt = int64ToAuxInt(c)
 15283  		v.AddArg2(x0, y)
 15284  		return true
 15285  	}
 15286  	// match: (SUB x0 x1:(SRAconst [c] y))
 15287  	// cond: clobberIfDead(x1)
 15288  	// result: (SUBshiftRA x0 y [c])
 15289  	for {
 15290  		x0 := v_0
 15291  		x1 := v_1
 15292  		if x1.Op != OpARM64SRAconst {
 15293  			break
 15294  		}
 15295  		c := auxIntToInt64(x1.AuxInt)
 15296  		y := x1.Args[0]
 15297  		if !(clobberIfDead(x1)) {
 15298  			break
 15299  		}
 15300  		v.reset(OpARM64SUBshiftRA)
 15301  		v.AuxInt = int64ToAuxInt(c)
 15302  		v.AddArg2(x0, y)
 15303  		return true
 15304  	}
 15305  	return false
 15306  }
 15307  func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
 15308  	v_0 := v.Args[0]
 15309  	// match: (SUBconst [0] x)
 15310  	// result: x
 15311  	for {
 15312  		if auxIntToInt64(v.AuxInt) != 0 {
 15313  			break
 15314  		}
 15315  		x := v_0
 15316  		v.copyOf(x)
 15317  		return true
 15318  	}
 15319  	// match: (SUBconst [c] (MOVDconst [d]))
 15320  	// result: (MOVDconst [d-c])
 15321  	for {
 15322  		c := auxIntToInt64(v.AuxInt)
 15323  		if v_0.Op != OpARM64MOVDconst {
 15324  			break
 15325  		}
 15326  		d := auxIntToInt64(v_0.AuxInt)
 15327  		v.reset(OpARM64MOVDconst)
 15328  		v.AuxInt = int64ToAuxInt(d - c)
 15329  		return true
 15330  	}
 15331  	// match: (SUBconst [c] (SUBconst [d] x))
 15332  	// result: (ADDconst [-c-d] x)
 15333  	for {
 15334  		c := auxIntToInt64(v.AuxInt)
 15335  		if v_0.Op != OpARM64SUBconst {
 15336  			break
 15337  		}
 15338  		d := auxIntToInt64(v_0.AuxInt)
 15339  		x := v_0.Args[0]
 15340  		v.reset(OpARM64ADDconst)
 15341  		v.AuxInt = int64ToAuxInt(-c - d)
 15342  		v.AddArg(x)
 15343  		return true
 15344  	}
 15345  	// match: (SUBconst [c] (ADDconst [d] x))
 15346  	// result: (ADDconst [-c+d] x)
 15347  	for {
 15348  		c := auxIntToInt64(v.AuxInt)
 15349  		if v_0.Op != OpARM64ADDconst {
 15350  			break
 15351  		}
 15352  		d := auxIntToInt64(v_0.AuxInt)
 15353  		x := v_0.Args[0]
 15354  		v.reset(OpARM64ADDconst)
 15355  		v.AuxInt = int64ToAuxInt(-c + d)
 15356  		v.AddArg(x)
 15357  		return true
 15358  	}
 15359  	return false
 15360  }
 15361  func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
 15362  	v_1 := v.Args[1]
 15363  	v_0 := v.Args[0]
 15364  	// match: (SUBshiftLL x (MOVDconst [c]) [d])
 15365  	// result: (SUBconst x [int64(uint64(c)<<uint64(d))])
 15366  	for {
 15367  		d := auxIntToInt64(v.AuxInt)
 15368  		x := v_0
 15369  		if v_1.Op != OpARM64MOVDconst {
 15370  			break
 15371  		}
 15372  		c := auxIntToInt64(v_1.AuxInt)
 15373  		v.reset(OpARM64SUBconst)
 15374  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15375  		v.AddArg(x)
 15376  		return true
 15377  	}
 15378  	// match: (SUBshiftLL (SLLconst x [c]) x [c])
 15379  	// result: (MOVDconst [0])
 15380  	for {
 15381  		c := auxIntToInt64(v.AuxInt)
 15382  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 15383  			break
 15384  		}
 15385  		x := v_0.Args[0]
 15386  		if x != v_1 {
 15387  			break
 15388  		}
 15389  		v.reset(OpARM64MOVDconst)
 15390  		v.AuxInt = int64ToAuxInt(0)
 15391  		return true
 15392  	}
 15393  	return false
 15394  }
 15395  func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
 15396  	v_1 := v.Args[1]
 15397  	v_0 := v.Args[0]
 15398  	// match: (SUBshiftRA x (MOVDconst [c]) [d])
 15399  	// result: (SUBconst x [c>>uint64(d)])
 15400  	for {
 15401  		d := auxIntToInt64(v.AuxInt)
 15402  		x := v_0
 15403  		if v_1.Op != OpARM64MOVDconst {
 15404  			break
 15405  		}
 15406  		c := auxIntToInt64(v_1.AuxInt)
 15407  		v.reset(OpARM64SUBconst)
 15408  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15409  		v.AddArg(x)
 15410  		return true
 15411  	}
 15412  	// match: (SUBshiftRA (SRAconst x [c]) x [c])
 15413  	// result: (MOVDconst [0])
 15414  	for {
 15415  		c := auxIntToInt64(v.AuxInt)
 15416  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 15417  			break
 15418  		}
 15419  		x := v_0.Args[0]
 15420  		if x != v_1 {
 15421  			break
 15422  		}
 15423  		v.reset(OpARM64MOVDconst)
 15424  		v.AuxInt = int64ToAuxInt(0)
 15425  		return true
 15426  	}
 15427  	return false
 15428  }
 15429  func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
 15430  	v_1 := v.Args[1]
 15431  	v_0 := v.Args[0]
 15432  	// match: (SUBshiftRL x (MOVDconst [c]) [d])
 15433  	// result: (SUBconst x [int64(uint64(c)>>uint64(d))])
 15434  	for {
 15435  		d := auxIntToInt64(v.AuxInt)
 15436  		x := v_0
 15437  		if v_1.Op != OpARM64MOVDconst {
 15438  			break
 15439  		}
 15440  		c := auxIntToInt64(v_1.AuxInt)
 15441  		v.reset(OpARM64SUBconst)
 15442  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15443  		v.AddArg(x)
 15444  		return true
 15445  	}
 15446  	// match: (SUBshiftRL (SRLconst x [c]) x [c])
 15447  	// result: (MOVDconst [0])
 15448  	for {
 15449  		c := auxIntToInt64(v.AuxInt)
 15450  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 15451  			break
 15452  		}
 15453  		x := v_0.Args[0]
 15454  		if x != v_1 {
 15455  			break
 15456  		}
 15457  		v.reset(OpARM64MOVDconst)
 15458  		v.AuxInt = int64ToAuxInt(0)
 15459  		return true
 15460  	}
 15461  	return false
 15462  }
 15463  func rewriteValueARM64_OpARM64TST(v *Value) bool {
 15464  	v_1 := v.Args[1]
 15465  	v_0 := v.Args[0]
 15466  	// match: (TST x (MOVDconst [c]))
 15467  	// result: (TSTconst [c] x)
 15468  	for {
 15469  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15470  			x := v_0
 15471  			if v_1.Op != OpARM64MOVDconst {
 15472  				continue
 15473  			}
 15474  			c := auxIntToInt64(v_1.AuxInt)
 15475  			v.reset(OpARM64TSTconst)
 15476  			v.AuxInt = int64ToAuxInt(c)
 15477  			v.AddArg(x)
 15478  			return true
 15479  		}
 15480  		break
 15481  	}
 15482  	// match: (TST x0 x1:(SLLconst [c] y))
 15483  	// cond: clobberIfDead(x1)
 15484  	// result: (TSTshiftLL x0 y [c])
 15485  	for {
 15486  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15487  			x0 := v_0
 15488  			x1 := v_1
 15489  			if x1.Op != OpARM64SLLconst {
 15490  				continue
 15491  			}
 15492  			c := auxIntToInt64(x1.AuxInt)
 15493  			y := x1.Args[0]
 15494  			if !(clobberIfDead(x1)) {
 15495  				continue
 15496  			}
 15497  			v.reset(OpARM64TSTshiftLL)
 15498  			v.AuxInt = int64ToAuxInt(c)
 15499  			v.AddArg2(x0, y)
 15500  			return true
 15501  		}
 15502  		break
 15503  	}
 15504  	// match: (TST x0 x1:(SRLconst [c] y))
 15505  	// cond: clobberIfDead(x1)
 15506  	// result: (TSTshiftRL x0 y [c])
 15507  	for {
 15508  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15509  			x0 := v_0
 15510  			x1 := v_1
 15511  			if x1.Op != OpARM64SRLconst {
 15512  				continue
 15513  			}
 15514  			c := auxIntToInt64(x1.AuxInt)
 15515  			y := x1.Args[0]
 15516  			if !(clobberIfDead(x1)) {
 15517  				continue
 15518  			}
 15519  			v.reset(OpARM64TSTshiftRL)
 15520  			v.AuxInt = int64ToAuxInt(c)
 15521  			v.AddArg2(x0, y)
 15522  			return true
 15523  		}
 15524  		break
 15525  	}
 15526  	// match: (TST x0 x1:(SRAconst [c] y))
 15527  	// cond: clobberIfDead(x1)
 15528  	// result: (TSTshiftRA x0 y [c])
 15529  	for {
 15530  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15531  			x0 := v_0
 15532  			x1 := v_1
 15533  			if x1.Op != OpARM64SRAconst {
 15534  				continue
 15535  			}
 15536  			c := auxIntToInt64(x1.AuxInt)
 15537  			y := x1.Args[0]
 15538  			if !(clobberIfDead(x1)) {
 15539  				continue
 15540  			}
 15541  			v.reset(OpARM64TSTshiftRA)
 15542  			v.AuxInt = int64ToAuxInt(c)
 15543  			v.AddArg2(x0, y)
 15544  			return true
 15545  		}
 15546  		break
 15547  	}
 15548  	// match: (TST x0 x1:(RORconst [c] y))
 15549  	// cond: clobberIfDead(x1)
 15550  	// result: (TSTshiftRO x0 y [c])
 15551  	for {
 15552  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15553  			x0 := v_0
 15554  			x1 := v_1
 15555  			if x1.Op != OpARM64RORconst {
 15556  				continue
 15557  			}
 15558  			c := auxIntToInt64(x1.AuxInt)
 15559  			y := x1.Args[0]
 15560  			if !(clobberIfDead(x1)) {
 15561  				continue
 15562  			}
 15563  			v.reset(OpARM64TSTshiftRO)
 15564  			v.AuxInt = int64ToAuxInt(c)
 15565  			v.AddArg2(x0, y)
 15566  			return true
 15567  		}
 15568  		break
 15569  	}
 15570  	return false
 15571  }
 15572  func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
 15573  	v_1 := v.Args[1]
 15574  	v_0 := v.Args[0]
 15575  	// match: (TSTW x (MOVDconst [c]))
 15576  	// result: (TSTWconst [int32(c)] x)
 15577  	for {
 15578  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15579  			x := v_0
 15580  			if v_1.Op != OpARM64MOVDconst {
 15581  				continue
 15582  			}
 15583  			c := auxIntToInt64(v_1.AuxInt)
 15584  			v.reset(OpARM64TSTWconst)
 15585  			v.AuxInt = int32ToAuxInt(int32(c))
 15586  			v.AddArg(x)
 15587  			return true
 15588  		}
 15589  		break
 15590  	}
 15591  	return false
 15592  }
 15593  func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
 15594  	v_0 := v.Args[0]
 15595  	// match: (TSTWconst (MOVDconst [x]) [y])
 15596  	// result: (FlagConstant [logicFlags32(int32(x)&y)])
 15597  	for {
 15598  		y := auxIntToInt32(v.AuxInt)
 15599  		if v_0.Op != OpARM64MOVDconst {
 15600  			break
 15601  		}
 15602  		x := auxIntToInt64(v_0.AuxInt)
 15603  		v.reset(OpARM64FlagConstant)
 15604  		v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
 15605  		return true
 15606  	}
 15607  	return false
 15608  }
 15609  func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
 15610  	v_0 := v.Args[0]
 15611  	// match: (TSTconst (MOVDconst [x]) [y])
 15612  	// result: (FlagConstant [logicFlags64(x&y)])
 15613  	for {
 15614  		y := auxIntToInt64(v.AuxInt)
 15615  		if v_0.Op != OpARM64MOVDconst {
 15616  			break
 15617  		}
 15618  		x := auxIntToInt64(v_0.AuxInt)
 15619  		v.reset(OpARM64FlagConstant)
 15620  		v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
 15621  		return true
 15622  	}
 15623  	return false
 15624  }
 15625  func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
 15626  	v_1 := v.Args[1]
 15627  	v_0 := v.Args[0]
 15628  	b := v.Block
 15629  	// match: (TSTshiftLL (MOVDconst [c]) x [d])
 15630  	// result: (TSTconst [c] (SLLconst <x.Type> x [d]))
 15631  	for {
 15632  		d := auxIntToInt64(v.AuxInt)
 15633  		if v_0.Op != OpARM64MOVDconst {
 15634  			break
 15635  		}
 15636  		c := auxIntToInt64(v_0.AuxInt)
 15637  		x := v_1
 15638  		v.reset(OpARM64TSTconst)
 15639  		v.AuxInt = int64ToAuxInt(c)
 15640  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 15641  		v0.AuxInt = int64ToAuxInt(d)
 15642  		v0.AddArg(x)
 15643  		v.AddArg(v0)
 15644  		return true
 15645  	}
 15646  	// match: (TSTshiftLL x (MOVDconst [c]) [d])
 15647  	// result: (TSTconst x [int64(uint64(c)<<uint64(d))])
 15648  	for {
 15649  		d := auxIntToInt64(v.AuxInt)
 15650  		x := v_0
 15651  		if v_1.Op != OpARM64MOVDconst {
 15652  			break
 15653  		}
 15654  		c := auxIntToInt64(v_1.AuxInt)
 15655  		v.reset(OpARM64TSTconst)
 15656  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 15657  		v.AddArg(x)
 15658  		return true
 15659  	}
 15660  	return false
 15661  }
 15662  func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
 15663  	v_1 := v.Args[1]
 15664  	v_0 := v.Args[0]
 15665  	b := v.Block
 15666  	// match: (TSTshiftRA (MOVDconst [c]) x [d])
 15667  	// result: (TSTconst [c] (SRAconst <x.Type> x [d]))
 15668  	for {
 15669  		d := auxIntToInt64(v.AuxInt)
 15670  		if v_0.Op != OpARM64MOVDconst {
 15671  			break
 15672  		}
 15673  		c := auxIntToInt64(v_0.AuxInt)
 15674  		x := v_1
 15675  		v.reset(OpARM64TSTconst)
 15676  		v.AuxInt = int64ToAuxInt(c)
 15677  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 15678  		v0.AuxInt = int64ToAuxInt(d)
 15679  		v0.AddArg(x)
 15680  		v.AddArg(v0)
 15681  		return true
 15682  	}
 15683  	// match: (TSTshiftRA x (MOVDconst [c]) [d])
 15684  	// result: (TSTconst x [c>>uint64(d)])
 15685  	for {
 15686  		d := auxIntToInt64(v.AuxInt)
 15687  		x := v_0
 15688  		if v_1.Op != OpARM64MOVDconst {
 15689  			break
 15690  		}
 15691  		c := auxIntToInt64(v_1.AuxInt)
 15692  		v.reset(OpARM64TSTconst)
 15693  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 15694  		v.AddArg(x)
 15695  		return true
 15696  	}
 15697  	return false
 15698  }
 15699  func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
 15700  	v_1 := v.Args[1]
 15701  	v_0 := v.Args[0]
 15702  	b := v.Block
 15703  	// match: (TSTshiftRL (MOVDconst [c]) x [d])
 15704  	// result: (TSTconst [c] (SRLconst <x.Type> x [d]))
 15705  	for {
 15706  		d := auxIntToInt64(v.AuxInt)
 15707  		if v_0.Op != OpARM64MOVDconst {
 15708  			break
 15709  		}
 15710  		c := auxIntToInt64(v_0.AuxInt)
 15711  		x := v_1
 15712  		v.reset(OpARM64TSTconst)
 15713  		v.AuxInt = int64ToAuxInt(c)
 15714  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 15715  		v0.AuxInt = int64ToAuxInt(d)
 15716  		v0.AddArg(x)
 15717  		v.AddArg(v0)
 15718  		return true
 15719  	}
 15720  	// match: (TSTshiftRL x (MOVDconst [c]) [d])
 15721  	// result: (TSTconst x [int64(uint64(c)>>uint64(d))])
 15722  	for {
 15723  		d := auxIntToInt64(v.AuxInt)
 15724  		x := v_0
 15725  		if v_1.Op != OpARM64MOVDconst {
 15726  			break
 15727  		}
 15728  		c := auxIntToInt64(v_1.AuxInt)
 15729  		v.reset(OpARM64TSTconst)
 15730  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 15731  		v.AddArg(x)
 15732  		return true
 15733  	}
 15734  	return false
 15735  }
 15736  func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
 15737  	v_1 := v.Args[1]
 15738  	v_0 := v.Args[0]
 15739  	b := v.Block
 15740  	// match: (TSTshiftRO (MOVDconst [c]) x [d])
 15741  	// result: (TSTconst [c] (RORconst <x.Type> x [d]))
 15742  	for {
 15743  		d := auxIntToInt64(v.AuxInt)
 15744  		if v_0.Op != OpARM64MOVDconst {
 15745  			break
 15746  		}
 15747  		c := auxIntToInt64(v_0.AuxInt)
 15748  		x := v_1
 15749  		v.reset(OpARM64TSTconst)
 15750  		v.AuxInt = int64ToAuxInt(c)
 15751  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 15752  		v0.AuxInt = int64ToAuxInt(d)
 15753  		v0.AddArg(x)
 15754  		v.AddArg(v0)
 15755  		return true
 15756  	}
 15757  	// match: (TSTshiftRO x (MOVDconst [c]) [d])
 15758  	// result: (TSTconst x [rotateRight64(c, d)])
 15759  	for {
 15760  		d := auxIntToInt64(v.AuxInt)
 15761  		x := v_0
 15762  		if v_1.Op != OpARM64MOVDconst {
 15763  			break
 15764  		}
 15765  		c := auxIntToInt64(v_1.AuxInt)
 15766  		v.reset(OpARM64TSTconst)
 15767  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 15768  		v.AddArg(x)
 15769  		return true
 15770  	}
 15771  	return false
 15772  }
 15773  func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
 15774  	v_0 := v.Args[0]
 15775  	// match: (UBFIZ [bfc] (SLLconst [sc] x))
 15776  	// cond: sc < bfc.width()
 15777  	// result: (UBFIZ [armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc)] x)
 15778  	for {
 15779  		bfc := auxIntToArm64BitField(v.AuxInt)
 15780  		if v_0.Op != OpARM64SLLconst {
 15781  			break
 15782  		}
 15783  		sc := auxIntToInt64(v_0.AuxInt)
 15784  		x := v_0.Args[0]
 15785  		if !(sc < bfc.width()) {
 15786  			break
 15787  		}
 15788  		v.reset(OpARM64UBFIZ)
 15789  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
 15790  		v.AddArg(x)
 15791  		return true
 15792  	}
 15793  	return false
 15794  }
 15795  func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
 15796  	v_0 := v.Args[0]
 15797  	// match: (UBFX [bfc] (ANDconst [c] x))
 15798  	// cond: isARM64BFMask(0, c, 0) && bfc.lsb() + bfc.width() <= arm64BFWidth(c, 0)
 15799  	// result: (UBFX [bfc] x)
 15800  	for {
 15801  		bfc := auxIntToArm64BitField(v.AuxInt)
 15802  		if v_0.Op != OpARM64ANDconst {
 15803  			break
 15804  		}
 15805  		c := auxIntToInt64(v_0.AuxInt)
 15806  		x := v_0.Args[0]
 15807  		if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
 15808  			break
 15809  		}
 15810  		v.reset(OpARM64UBFX)
 15811  		v.AuxInt = arm64BitFieldToAuxInt(bfc)
 15812  		v.AddArg(x)
 15813  		return true
 15814  	}
 15815  	// match: (UBFX [bfc] e:(MOVWUreg x))
 15816  	// cond: e.Uses == 1 && bfc.lsb() < 32
 15817  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb()))] x)
 15818  	for {
 15819  		bfc := auxIntToArm64BitField(v.AuxInt)
 15820  		e := v_0
 15821  		if e.Op != OpARM64MOVWUreg {
 15822  			break
 15823  		}
 15824  		x := e.Args[0]
 15825  		if !(e.Uses == 1 && bfc.lsb() < 32) {
 15826  			break
 15827  		}
 15828  		v.reset(OpARM64UBFX)
 15829  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
 15830  		v.AddArg(x)
 15831  		return true
 15832  	}
 15833  	// match: (UBFX [bfc] e:(MOVHUreg x))
 15834  	// cond: e.Uses == 1 && bfc.lsb() < 16
 15835  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb()))] x)
 15836  	for {
 15837  		bfc := auxIntToArm64BitField(v.AuxInt)
 15838  		e := v_0
 15839  		if e.Op != OpARM64MOVHUreg {
 15840  			break
 15841  		}
 15842  		x := e.Args[0]
 15843  		if !(e.Uses == 1 && bfc.lsb() < 16) {
 15844  			break
 15845  		}
 15846  		v.reset(OpARM64UBFX)
 15847  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
 15848  		v.AddArg(x)
 15849  		return true
 15850  	}
 15851  	// match: (UBFX [bfc] e:(MOVBUreg x))
 15852  	// cond: e.Uses == 1 && bfc.lsb() < 8
 15853  	// result: (UBFX [armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb()))] x)
 15854  	for {
 15855  		bfc := auxIntToArm64BitField(v.AuxInt)
 15856  		e := v_0
 15857  		if e.Op != OpARM64MOVBUreg {
 15858  			break
 15859  		}
 15860  		x := e.Args[0]
 15861  		if !(e.Uses == 1 && bfc.lsb() < 8) {
 15862  			break
 15863  		}
 15864  		v.reset(OpARM64UBFX)
 15865  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
 15866  		v.AddArg(x)
 15867  		return true
 15868  	}
 15869  	// match: (UBFX [bfc] (SRLconst [sc] x))
 15870  	// cond: sc+bfc.width()+bfc.lsb() < 64
 15871  	// result: (UBFX [armBFAuxInt(bfc.lsb()+sc, bfc.width())] x)
 15872  	for {
 15873  		bfc := auxIntToArm64BitField(v.AuxInt)
 15874  		if v_0.Op != OpARM64SRLconst {
 15875  			break
 15876  		}
 15877  		sc := auxIntToInt64(v_0.AuxInt)
 15878  		x := v_0.Args[0]
 15879  		if !(sc+bfc.width()+bfc.lsb() < 64) {
 15880  			break
 15881  		}
 15882  		v.reset(OpARM64UBFX)
 15883  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
 15884  		v.AddArg(x)
 15885  		return true
 15886  	}
 15887  	// match: (UBFX [bfc] (SLLconst [sc] x))
 15888  	// cond: sc == bfc.lsb()
 15889  	// result: (ANDconst [1<<uint(bfc.width())-1] x)
 15890  	for {
 15891  		bfc := auxIntToArm64BitField(v.AuxInt)
 15892  		if v_0.Op != OpARM64SLLconst {
 15893  			break
 15894  		}
 15895  		sc := auxIntToInt64(v_0.AuxInt)
 15896  		x := v_0.Args[0]
 15897  		if !(sc == bfc.lsb()) {
 15898  			break
 15899  		}
 15900  		v.reset(OpARM64ANDconst)
 15901  		v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
 15902  		v.AddArg(x)
 15903  		return true
 15904  	}
 15905  	// match: (UBFX [bfc] (SLLconst [sc] x))
 15906  	// cond: sc < bfc.lsb()
 15907  	// result: (UBFX [armBFAuxInt(bfc.lsb()-sc, bfc.width())] x)
 15908  	for {
 15909  		bfc := auxIntToArm64BitField(v.AuxInt)
 15910  		if v_0.Op != OpARM64SLLconst {
 15911  			break
 15912  		}
 15913  		sc := auxIntToInt64(v_0.AuxInt)
 15914  		x := v_0.Args[0]
 15915  		if !(sc < bfc.lsb()) {
 15916  			break
 15917  		}
 15918  		v.reset(OpARM64UBFX)
 15919  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
 15920  		v.AddArg(x)
 15921  		return true
 15922  	}
 15923  	// match: (UBFX [bfc] (SLLconst [sc] x))
 15924  	// cond: sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()
 15925  	// result: (UBFIZ [armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc)] x)
 15926  	for {
 15927  		bfc := auxIntToArm64BitField(v.AuxInt)
 15928  		if v_0.Op != OpARM64SLLconst {
 15929  			break
 15930  		}
 15931  		sc := auxIntToInt64(v_0.AuxInt)
 15932  		x := v_0.Args[0]
 15933  		if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
 15934  			break
 15935  		}
 15936  		v.reset(OpARM64UBFIZ)
 15937  		v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
 15938  		v.AddArg(x)
 15939  		return true
 15940  	}
 15941  	return false
 15942  }
 15943  func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
 15944  	v_1 := v.Args[1]
 15945  	v_0 := v.Args[0]
 15946  	// match: (UDIV x (MOVDconst [1]))
 15947  	// result: x
 15948  	for {
 15949  		x := v_0
 15950  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 15951  			break
 15952  		}
 15953  		v.copyOf(x)
 15954  		return true
 15955  	}
 15956  	// match: (UDIV x (MOVDconst [c]))
 15957  	// cond: isPowerOfTwo(c)
 15958  	// result: (SRLconst [log64(c)] x)
 15959  	for {
 15960  		x := v_0
 15961  		if v_1.Op != OpARM64MOVDconst {
 15962  			break
 15963  		}
 15964  		c := auxIntToInt64(v_1.AuxInt)
 15965  		if !(isPowerOfTwo(c)) {
 15966  			break
 15967  		}
 15968  		v.reset(OpARM64SRLconst)
 15969  		v.AuxInt = int64ToAuxInt(log64(c))
 15970  		v.AddArg(x)
 15971  		return true
 15972  	}
 15973  	// match: (UDIV (MOVDconst [c]) (MOVDconst [d]))
 15974  	// cond: d != 0
 15975  	// result: (MOVDconst [int64(uint64(c)/uint64(d))])
 15976  	for {
 15977  		if v_0.Op != OpARM64MOVDconst {
 15978  			break
 15979  		}
 15980  		c := auxIntToInt64(v_0.AuxInt)
 15981  		if v_1.Op != OpARM64MOVDconst {
 15982  			break
 15983  		}
 15984  		d := auxIntToInt64(v_1.AuxInt)
 15985  		if !(d != 0) {
 15986  			break
 15987  		}
 15988  		v.reset(OpARM64MOVDconst)
 15989  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
 15990  		return true
 15991  	}
 15992  	return false
 15993  }
 15994  func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
 15995  	v_1 := v.Args[1]
 15996  	v_0 := v.Args[0]
 15997  	b := v.Block
 15998  	// match: (UDIVW x (MOVDconst [c]))
 15999  	// cond: uint32(c)==1
 16000  	// result: (MOVWUreg x)
 16001  	for {
 16002  		x := v_0
 16003  		if v_1.Op != OpARM64MOVDconst {
 16004  			break
 16005  		}
 16006  		c := auxIntToInt64(v_1.AuxInt)
 16007  		if !(uint32(c) == 1) {
 16008  			break
 16009  		}
 16010  		v.reset(OpARM64MOVWUreg)
 16011  		v.AddArg(x)
 16012  		return true
 16013  	}
 16014  	// match: (UDIVW x (MOVDconst [c]))
 16015  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16016  	// result: (SRLconst [log64(c)] (MOVWUreg <v.Type> x))
 16017  	for {
 16018  		x := v_0
 16019  		if v_1.Op != OpARM64MOVDconst {
 16020  			break
 16021  		}
 16022  		c := auxIntToInt64(v_1.AuxInt)
 16023  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16024  			break
 16025  		}
 16026  		v.reset(OpARM64SRLconst)
 16027  		v.AuxInt = int64ToAuxInt(log64(c))
 16028  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
 16029  		v0.AddArg(x)
 16030  		v.AddArg(v0)
 16031  		return true
 16032  	}
 16033  	// match: (UDIVW (MOVDconst [c]) (MOVDconst [d]))
 16034  	// cond: d != 0
 16035  	// result: (MOVDconst [int64(uint32(c)/uint32(d))])
 16036  	for {
 16037  		if v_0.Op != OpARM64MOVDconst {
 16038  			break
 16039  		}
 16040  		c := auxIntToInt64(v_0.AuxInt)
 16041  		if v_1.Op != OpARM64MOVDconst {
 16042  			break
 16043  		}
 16044  		d := auxIntToInt64(v_1.AuxInt)
 16045  		if !(d != 0) {
 16046  			break
 16047  		}
 16048  		v.reset(OpARM64MOVDconst)
 16049  		v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
 16050  		return true
 16051  	}
 16052  	return false
 16053  }
 16054  func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
 16055  	v_1 := v.Args[1]
 16056  	v_0 := v.Args[0]
 16057  	b := v.Block
 16058  	typ := &b.Func.Config.Types
 16059  	// match: (UMOD <typ.UInt64> x y)
 16060  	// result: (MSUB <typ.UInt64> x y (UDIV <typ.UInt64> x y))
 16061  	for {
 16062  		if v.Type != typ.UInt64 {
 16063  			break
 16064  		}
 16065  		x := v_0
 16066  		y := v_1
 16067  		v.reset(OpARM64MSUB)
 16068  		v.Type = typ.UInt64
 16069  		v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
 16070  		v0.AddArg2(x, y)
 16071  		v.AddArg3(x, y, v0)
 16072  		return true
 16073  	}
 16074  	// match: (UMOD _ (MOVDconst [1]))
 16075  	// result: (MOVDconst [0])
 16076  	for {
 16077  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 16078  			break
 16079  		}
 16080  		v.reset(OpARM64MOVDconst)
 16081  		v.AuxInt = int64ToAuxInt(0)
 16082  		return true
 16083  	}
 16084  	// match: (UMOD x (MOVDconst [c]))
 16085  	// cond: isPowerOfTwo(c)
 16086  	// result: (ANDconst [c-1] x)
 16087  	for {
 16088  		x := v_0
 16089  		if v_1.Op != OpARM64MOVDconst {
 16090  			break
 16091  		}
 16092  		c := auxIntToInt64(v_1.AuxInt)
 16093  		if !(isPowerOfTwo(c)) {
 16094  			break
 16095  		}
 16096  		v.reset(OpARM64ANDconst)
 16097  		v.AuxInt = int64ToAuxInt(c - 1)
 16098  		v.AddArg(x)
 16099  		return true
 16100  	}
 16101  	// match: (UMOD (MOVDconst [c]) (MOVDconst [d]))
 16102  	// cond: d != 0
 16103  	// result: (MOVDconst [int64(uint64(c)%uint64(d))])
 16104  	for {
 16105  		if v_0.Op != OpARM64MOVDconst {
 16106  			break
 16107  		}
 16108  		c := auxIntToInt64(v_0.AuxInt)
 16109  		if v_1.Op != OpARM64MOVDconst {
 16110  			break
 16111  		}
 16112  		d := auxIntToInt64(v_1.AuxInt)
 16113  		if !(d != 0) {
 16114  			break
 16115  		}
 16116  		v.reset(OpARM64MOVDconst)
 16117  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 16118  		return true
 16119  	}
 16120  	return false
 16121  }
 16122  func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
 16123  	v_1 := v.Args[1]
 16124  	v_0 := v.Args[0]
 16125  	b := v.Block
 16126  	typ := &b.Func.Config.Types
 16127  	// match: (UMODW <typ.UInt32> x y)
 16128  	// result: (MSUBW <typ.UInt32> x y (UDIVW <typ.UInt32> x y))
 16129  	for {
 16130  		if v.Type != typ.UInt32 {
 16131  			break
 16132  		}
 16133  		x := v_0
 16134  		y := v_1
 16135  		v.reset(OpARM64MSUBW)
 16136  		v.Type = typ.UInt32
 16137  		v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
 16138  		v0.AddArg2(x, y)
 16139  		v.AddArg3(x, y, v0)
 16140  		return true
 16141  	}
 16142  	// match: (UMODW _ (MOVDconst [c]))
 16143  	// cond: uint32(c)==1
 16144  	// result: (MOVDconst [0])
 16145  	for {
 16146  		if v_1.Op != OpARM64MOVDconst {
 16147  			break
 16148  		}
 16149  		c := auxIntToInt64(v_1.AuxInt)
 16150  		if !(uint32(c) == 1) {
 16151  			break
 16152  		}
 16153  		v.reset(OpARM64MOVDconst)
 16154  		v.AuxInt = int64ToAuxInt(0)
 16155  		return true
 16156  	}
 16157  	// match: (UMODW x (MOVDconst [c]))
 16158  	// cond: isPowerOfTwo(c) && is32Bit(c)
 16159  	// result: (ANDconst [c-1] x)
 16160  	for {
 16161  		x := v_0
 16162  		if v_1.Op != OpARM64MOVDconst {
 16163  			break
 16164  		}
 16165  		c := auxIntToInt64(v_1.AuxInt)
 16166  		if !(isPowerOfTwo(c) && is32Bit(c)) {
 16167  			break
 16168  		}
 16169  		v.reset(OpARM64ANDconst)
 16170  		v.AuxInt = int64ToAuxInt(c - 1)
 16171  		v.AddArg(x)
 16172  		return true
 16173  	}
 16174  	// match: (UMODW (MOVDconst [c]) (MOVDconst [d]))
 16175  	// cond: d != 0
 16176  	// result: (MOVDconst [int64(uint32(c)%uint32(d))])
 16177  	for {
 16178  		if v_0.Op != OpARM64MOVDconst {
 16179  			break
 16180  		}
 16181  		c := auxIntToInt64(v_0.AuxInt)
 16182  		if v_1.Op != OpARM64MOVDconst {
 16183  			break
 16184  		}
 16185  		d := auxIntToInt64(v_1.AuxInt)
 16186  		if !(d != 0) {
 16187  			break
 16188  		}
 16189  		v.reset(OpARM64MOVDconst)
 16190  		v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
 16191  		return true
 16192  	}
 16193  	return false
 16194  }
 16195  func rewriteValueARM64_OpARM64XOR(v *Value) bool {
 16196  	v_1 := v.Args[1]
 16197  	v_0 := v.Args[0]
 16198  	// match: (XOR x (MOVDconst [c]))
 16199  	// result: (XORconst [c] x)
 16200  	for {
 16201  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16202  			x := v_0
 16203  			if v_1.Op != OpARM64MOVDconst {
 16204  				continue
 16205  			}
 16206  			c := auxIntToInt64(v_1.AuxInt)
 16207  			v.reset(OpARM64XORconst)
 16208  			v.AuxInt = int64ToAuxInt(c)
 16209  			v.AddArg(x)
 16210  			return true
 16211  		}
 16212  		break
 16213  	}
 16214  	// match: (XOR x x)
 16215  	// result: (MOVDconst [0])
 16216  	for {
 16217  		x := v_0
 16218  		if x != v_1 {
 16219  			break
 16220  		}
 16221  		v.reset(OpARM64MOVDconst)
 16222  		v.AuxInt = int64ToAuxInt(0)
 16223  		return true
 16224  	}
 16225  	// match: (XOR x (MVN y))
 16226  	// result: (EON x y)
 16227  	for {
 16228  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16229  			x := v_0
 16230  			if v_1.Op != OpARM64MVN {
 16231  				continue
 16232  			}
 16233  			y := v_1.Args[0]
 16234  			v.reset(OpARM64EON)
 16235  			v.AddArg2(x, y)
 16236  			return true
 16237  		}
 16238  		break
 16239  	}
 16240  	// match: (XOR x0 x1:(SLLconst [c] y))
 16241  	// cond: clobberIfDead(x1)
 16242  	// result: (XORshiftLL x0 y [c])
 16243  	for {
 16244  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16245  			x0 := v_0
 16246  			x1 := v_1
 16247  			if x1.Op != OpARM64SLLconst {
 16248  				continue
 16249  			}
 16250  			c := auxIntToInt64(x1.AuxInt)
 16251  			y := x1.Args[0]
 16252  			if !(clobberIfDead(x1)) {
 16253  				continue
 16254  			}
 16255  			v.reset(OpARM64XORshiftLL)
 16256  			v.AuxInt = int64ToAuxInt(c)
 16257  			v.AddArg2(x0, y)
 16258  			return true
 16259  		}
 16260  		break
 16261  	}
 16262  	// match: (XOR x0 x1:(SRLconst [c] y))
 16263  	// cond: clobberIfDead(x1)
 16264  	// result: (XORshiftRL x0 y [c])
 16265  	for {
 16266  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16267  			x0 := v_0
 16268  			x1 := v_1
 16269  			if x1.Op != OpARM64SRLconst {
 16270  				continue
 16271  			}
 16272  			c := auxIntToInt64(x1.AuxInt)
 16273  			y := x1.Args[0]
 16274  			if !(clobberIfDead(x1)) {
 16275  				continue
 16276  			}
 16277  			v.reset(OpARM64XORshiftRL)
 16278  			v.AuxInt = int64ToAuxInt(c)
 16279  			v.AddArg2(x0, y)
 16280  			return true
 16281  		}
 16282  		break
 16283  	}
 16284  	// match: (XOR x0 x1:(SRAconst [c] y))
 16285  	// cond: clobberIfDead(x1)
 16286  	// result: (XORshiftRA x0 y [c])
 16287  	for {
 16288  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16289  			x0 := v_0
 16290  			x1 := v_1
 16291  			if x1.Op != OpARM64SRAconst {
 16292  				continue
 16293  			}
 16294  			c := auxIntToInt64(x1.AuxInt)
 16295  			y := x1.Args[0]
 16296  			if !(clobberIfDead(x1)) {
 16297  				continue
 16298  			}
 16299  			v.reset(OpARM64XORshiftRA)
 16300  			v.AuxInt = int64ToAuxInt(c)
 16301  			v.AddArg2(x0, y)
 16302  			return true
 16303  		}
 16304  		break
 16305  	}
 16306  	// match: (XOR x0 x1:(RORconst [c] y))
 16307  	// cond: clobberIfDead(x1)
 16308  	// result: (XORshiftRO x0 y [c])
 16309  	for {
 16310  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 16311  			x0 := v_0
 16312  			x1 := v_1
 16313  			if x1.Op != OpARM64RORconst {
 16314  				continue
 16315  			}
 16316  			c := auxIntToInt64(x1.AuxInt)
 16317  			y := x1.Args[0]
 16318  			if !(clobberIfDead(x1)) {
 16319  				continue
 16320  			}
 16321  			v.reset(OpARM64XORshiftRO)
 16322  			v.AuxInt = int64ToAuxInt(c)
 16323  			v.AddArg2(x0, y)
 16324  			return true
 16325  		}
 16326  		break
 16327  	}
 16328  	return false
 16329  }
 16330  func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
 16331  	v_0 := v.Args[0]
 16332  	// match: (XORconst [0] x)
 16333  	// result: x
 16334  	for {
 16335  		if auxIntToInt64(v.AuxInt) != 0 {
 16336  			break
 16337  		}
 16338  		x := v_0
 16339  		v.copyOf(x)
 16340  		return true
 16341  	}
 16342  	// match: (XORconst [-1] x)
 16343  	// result: (MVN x)
 16344  	for {
 16345  		if auxIntToInt64(v.AuxInt) != -1 {
 16346  			break
 16347  		}
 16348  		x := v_0
 16349  		v.reset(OpARM64MVN)
 16350  		v.AddArg(x)
 16351  		return true
 16352  	}
 16353  	// match: (XORconst [c] (MOVDconst [d]))
 16354  	// result: (MOVDconst [c^d])
 16355  	for {
 16356  		c := auxIntToInt64(v.AuxInt)
 16357  		if v_0.Op != OpARM64MOVDconst {
 16358  			break
 16359  		}
 16360  		d := auxIntToInt64(v_0.AuxInt)
 16361  		v.reset(OpARM64MOVDconst)
 16362  		v.AuxInt = int64ToAuxInt(c ^ d)
 16363  		return true
 16364  	}
 16365  	// match: (XORconst [c] (XORconst [d] x))
 16366  	// result: (XORconst [c^d] x)
 16367  	for {
 16368  		c := auxIntToInt64(v.AuxInt)
 16369  		if v_0.Op != OpARM64XORconst {
 16370  			break
 16371  		}
 16372  		d := auxIntToInt64(v_0.AuxInt)
 16373  		x := v_0.Args[0]
 16374  		v.reset(OpARM64XORconst)
 16375  		v.AuxInt = int64ToAuxInt(c ^ d)
 16376  		v.AddArg(x)
 16377  		return true
 16378  	}
 16379  	return false
 16380  }
 16381  func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
 16382  	v_1 := v.Args[1]
 16383  	v_0 := v.Args[0]
 16384  	b := v.Block
 16385  	typ := &b.Func.Config.Types
 16386  	// match: (XORshiftLL (MOVDconst [c]) x [d])
 16387  	// result: (XORconst [c] (SLLconst <x.Type> x [d]))
 16388  	for {
 16389  		d := auxIntToInt64(v.AuxInt)
 16390  		if v_0.Op != OpARM64MOVDconst {
 16391  			break
 16392  		}
 16393  		c := auxIntToInt64(v_0.AuxInt)
 16394  		x := v_1
 16395  		v.reset(OpARM64XORconst)
 16396  		v.AuxInt = int64ToAuxInt(c)
 16397  		v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
 16398  		v0.AuxInt = int64ToAuxInt(d)
 16399  		v0.AddArg(x)
 16400  		v.AddArg(v0)
 16401  		return true
 16402  	}
 16403  	// match: (XORshiftLL x (MOVDconst [c]) [d])
 16404  	// result: (XORconst x [int64(uint64(c)<<uint64(d))])
 16405  	for {
 16406  		d := auxIntToInt64(v.AuxInt)
 16407  		x := v_0
 16408  		if v_1.Op != OpARM64MOVDconst {
 16409  			break
 16410  		}
 16411  		c := auxIntToInt64(v_1.AuxInt)
 16412  		v.reset(OpARM64XORconst)
 16413  		v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
 16414  		v.AddArg(x)
 16415  		return true
 16416  	}
 16417  	// match: (XORshiftLL (SLLconst x [c]) x [c])
 16418  	// result: (MOVDconst [0])
 16419  	for {
 16420  		c := auxIntToInt64(v.AuxInt)
 16421  		if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
 16422  			break
 16423  		}
 16424  		x := v_0.Args[0]
 16425  		if x != v_1 {
 16426  			break
 16427  		}
 16428  		v.reset(OpARM64MOVDconst)
 16429  		v.AuxInt = int64ToAuxInt(0)
 16430  		return true
 16431  	}
 16432  	// match: (XORshiftLL <typ.UInt16> [8] (UBFX <typ.UInt16> [armBFAuxInt(8, 8)] x) x)
 16433  	// result: (REV16W x)
 16434  	for {
 16435  		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) {
 16436  			break
 16437  		}
 16438  		x := v_0.Args[0]
 16439  		if x != v_1 {
 16440  			break
 16441  		}
 16442  		v.reset(OpARM64REV16W)
 16443  		v.AddArg(x)
 16444  		return true
 16445  	}
 16446  	// match: (XORshiftLL [8] (UBFX [armBFAuxInt(8, 24)] (ANDconst [c1] x)) (ANDconst [c2] x))
 16447  	// cond: uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff
 16448  	// result: (REV16W x)
 16449  	for {
 16450  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
 16451  			break
 16452  		}
 16453  		v_0_0 := v_0.Args[0]
 16454  		if v_0_0.Op != OpARM64ANDconst {
 16455  			break
 16456  		}
 16457  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16458  		x := v_0_0.Args[0]
 16459  		if v_1.Op != OpARM64ANDconst {
 16460  			break
 16461  		}
 16462  		c2 := auxIntToInt64(v_1.AuxInt)
 16463  		if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
 16464  			break
 16465  		}
 16466  		v.reset(OpARM64REV16W)
 16467  		v.AddArg(x)
 16468  		return true
 16469  	}
 16470  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 16471  	// cond: (uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff)
 16472  	// result: (REV16 x)
 16473  	for {
 16474  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 16475  			break
 16476  		}
 16477  		v_0_0 := v_0.Args[0]
 16478  		if v_0_0.Op != OpARM64ANDconst {
 16479  			break
 16480  		}
 16481  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16482  		x := v_0_0.Args[0]
 16483  		if v_1.Op != OpARM64ANDconst {
 16484  			break
 16485  		}
 16486  		c2 := auxIntToInt64(v_1.AuxInt)
 16487  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
 16488  			break
 16489  		}
 16490  		v.reset(OpARM64REV16)
 16491  		v.AddArg(x)
 16492  		return true
 16493  	}
 16494  	// match: (XORshiftLL [8] (SRLconst [8] (ANDconst [c1] x)) (ANDconst [c2] x))
 16495  	// cond: (uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff)
 16496  	// result: (REV16 (ANDconst <x.Type> [0xffffffff] x))
 16497  	for {
 16498  		if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
 16499  			break
 16500  		}
 16501  		v_0_0 := v_0.Args[0]
 16502  		if v_0_0.Op != OpARM64ANDconst {
 16503  			break
 16504  		}
 16505  		c1 := auxIntToInt64(v_0_0.AuxInt)
 16506  		x := v_0_0.Args[0]
 16507  		if v_1.Op != OpARM64ANDconst {
 16508  			break
 16509  		}
 16510  		c2 := auxIntToInt64(v_1.AuxInt)
 16511  		if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
 16512  			break
 16513  		}
 16514  		v.reset(OpARM64REV16)
 16515  		v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
 16516  		v0.AuxInt = int64ToAuxInt(0xffffffff)
 16517  		v0.AddArg(x)
 16518  		v.AddArg(v0)
 16519  		return true
 16520  	}
 16521  	// match: (XORshiftLL [c] (SRLconst x [64-c]) x2)
 16522  	// result: (EXTRconst [64-c] x2 x)
 16523  	for {
 16524  		c := auxIntToInt64(v.AuxInt)
 16525  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
 16526  			break
 16527  		}
 16528  		x := v_0.Args[0]
 16529  		x2 := v_1
 16530  		v.reset(OpARM64EXTRconst)
 16531  		v.AuxInt = int64ToAuxInt(64 - c)
 16532  		v.AddArg2(x2, x)
 16533  		return true
 16534  	}
 16535  	// match: (XORshiftLL <t> [c] (UBFX [bfc] x) x2)
 16536  	// cond: c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
 16537  	// result: (EXTRWconst [32-c] x2 x)
 16538  	for {
 16539  		t := v.Type
 16540  		c := auxIntToInt64(v.AuxInt)
 16541  		if v_0.Op != OpARM64UBFX {
 16542  			break
 16543  		}
 16544  		bfc := auxIntToArm64BitField(v_0.AuxInt)
 16545  		x := v_0.Args[0]
 16546  		x2 := v_1
 16547  		if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
 16548  			break
 16549  		}
 16550  		v.reset(OpARM64EXTRWconst)
 16551  		v.AuxInt = int64ToAuxInt(32 - c)
 16552  		v.AddArg2(x2, x)
 16553  		return true
 16554  	}
 16555  	return false
 16556  }
 16557  func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
 16558  	v_1 := v.Args[1]
 16559  	v_0 := v.Args[0]
 16560  	b := v.Block
 16561  	// match: (XORshiftRA (MOVDconst [c]) x [d])
 16562  	// result: (XORconst [c] (SRAconst <x.Type> x [d]))
 16563  	for {
 16564  		d := auxIntToInt64(v.AuxInt)
 16565  		if v_0.Op != OpARM64MOVDconst {
 16566  			break
 16567  		}
 16568  		c := auxIntToInt64(v_0.AuxInt)
 16569  		x := v_1
 16570  		v.reset(OpARM64XORconst)
 16571  		v.AuxInt = int64ToAuxInt(c)
 16572  		v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
 16573  		v0.AuxInt = int64ToAuxInt(d)
 16574  		v0.AddArg(x)
 16575  		v.AddArg(v0)
 16576  		return true
 16577  	}
 16578  	// match: (XORshiftRA x (MOVDconst [c]) [d])
 16579  	// result: (XORconst x [c>>uint64(d)])
 16580  	for {
 16581  		d := auxIntToInt64(v.AuxInt)
 16582  		x := v_0
 16583  		if v_1.Op != OpARM64MOVDconst {
 16584  			break
 16585  		}
 16586  		c := auxIntToInt64(v_1.AuxInt)
 16587  		v.reset(OpARM64XORconst)
 16588  		v.AuxInt = int64ToAuxInt(c >> uint64(d))
 16589  		v.AddArg(x)
 16590  		return true
 16591  	}
 16592  	// match: (XORshiftRA (SRAconst x [c]) x [c])
 16593  	// result: (MOVDconst [0])
 16594  	for {
 16595  		c := auxIntToInt64(v.AuxInt)
 16596  		if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
 16597  			break
 16598  		}
 16599  		x := v_0.Args[0]
 16600  		if x != v_1 {
 16601  			break
 16602  		}
 16603  		v.reset(OpARM64MOVDconst)
 16604  		v.AuxInt = int64ToAuxInt(0)
 16605  		return true
 16606  	}
 16607  	return false
 16608  }
 16609  func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
 16610  	v_1 := v.Args[1]
 16611  	v_0 := v.Args[0]
 16612  	b := v.Block
 16613  	// match: (XORshiftRL (MOVDconst [c]) x [d])
 16614  	// result: (XORconst [c] (SRLconst <x.Type> x [d]))
 16615  	for {
 16616  		d := auxIntToInt64(v.AuxInt)
 16617  		if v_0.Op != OpARM64MOVDconst {
 16618  			break
 16619  		}
 16620  		c := auxIntToInt64(v_0.AuxInt)
 16621  		x := v_1
 16622  		v.reset(OpARM64XORconst)
 16623  		v.AuxInt = int64ToAuxInt(c)
 16624  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
 16625  		v0.AuxInt = int64ToAuxInt(d)
 16626  		v0.AddArg(x)
 16627  		v.AddArg(v0)
 16628  		return true
 16629  	}
 16630  	// match: (XORshiftRL x (MOVDconst [c]) [d])
 16631  	// result: (XORconst x [int64(uint64(c)>>uint64(d))])
 16632  	for {
 16633  		d := auxIntToInt64(v.AuxInt)
 16634  		x := v_0
 16635  		if v_1.Op != OpARM64MOVDconst {
 16636  			break
 16637  		}
 16638  		c := auxIntToInt64(v_1.AuxInt)
 16639  		v.reset(OpARM64XORconst)
 16640  		v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
 16641  		v.AddArg(x)
 16642  		return true
 16643  	}
 16644  	// match: (XORshiftRL (SRLconst x [c]) x [c])
 16645  	// result: (MOVDconst [0])
 16646  	for {
 16647  		c := auxIntToInt64(v.AuxInt)
 16648  		if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
 16649  			break
 16650  		}
 16651  		x := v_0.Args[0]
 16652  		if x != v_1 {
 16653  			break
 16654  		}
 16655  		v.reset(OpARM64MOVDconst)
 16656  		v.AuxInt = int64ToAuxInt(0)
 16657  		return true
 16658  	}
 16659  	return false
 16660  }
 16661  func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
 16662  	v_1 := v.Args[1]
 16663  	v_0 := v.Args[0]
 16664  	b := v.Block
 16665  	// match: (XORshiftRO (MOVDconst [c]) x [d])
 16666  	// result: (XORconst [c] (RORconst <x.Type> x [d]))
 16667  	for {
 16668  		d := auxIntToInt64(v.AuxInt)
 16669  		if v_0.Op != OpARM64MOVDconst {
 16670  			break
 16671  		}
 16672  		c := auxIntToInt64(v_0.AuxInt)
 16673  		x := v_1
 16674  		v.reset(OpARM64XORconst)
 16675  		v.AuxInt = int64ToAuxInt(c)
 16676  		v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
 16677  		v0.AuxInt = int64ToAuxInt(d)
 16678  		v0.AddArg(x)
 16679  		v.AddArg(v0)
 16680  		return true
 16681  	}
 16682  	// match: (XORshiftRO x (MOVDconst [c]) [d])
 16683  	// result: (XORconst x [rotateRight64(c, d)])
 16684  	for {
 16685  		d := auxIntToInt64(v.AuxInt)
 16686  		x := v_0
 16687  		if v_1.Op != OpARM64MOVDconst {
 16688  			break
 16689  		}
 16690  		c := auxIntToInt64(v_1.AuxInt)
 16691  		v.reset(OpARM64XORconst)
 16692  		v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
 16693  		v.AddArg(x)
 16694  		return true
 16695  	}
 16696  	// match: (XORshiftRO (RORconst x [c]) x [c])
 16697  	// result: (MOVDconst [0])
 16698  	for {
 16699  		c := auxIntToInt64(v.AuxInt)
 16700  		if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
 16701  			break
 16702  		}
 16703  		x := v_0.Args[0]
 16704  		if x != v_1 {
 16705  			break
 16706  		}
 16707  		v.reset(OpARM64MOVDconst)
 16708  		v.AuxInt = int64ToAuxInt(0)
 16709  		return true
 16710  	}
 16711  	return false
 16712  }
 16713  func rewriteValueARM64_OpAddr(v *Value) bool {
 16714  	v_0 := v.Args[0]
 16715  	// match: (Addr {sym} base)
 16716  	// result: (MOVDaddr {sym} base)
 16717  	for {
 16718  		sym := auxToSym(v.Aux)
 16719  		base := v_0
 16720  		v.reset(OpARM64MOVDaddr)
 16721  		v.Aux = symToAux(sym)
 16722  		v.AddArg(base)
 16723  		return true
 16724  	}
 16725  }
 16726  func rewriteValueARM64_OpAvg64u(v *Value) bool {
 16727  	v_1 := v.Args[1]
 16728  	v_0 := v.Args[0]
 16729  	b := v.Block
 16730  	// match: (Avg64u <t> x y)
 16731  	// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
 16732  	for {
 16733  		t := v.Type
 16734  		x := v_0
 16735  		y := v_1
 16736  		v.reset(OpARM64ADD)
 16737  		v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
 16738  		v0.AuxInt = int64ToAuxInt(1)
 16739  		v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
 16740  		v1.AddArg2(x, y)
 16741  		v0.AddArg(v1)
 16742  		v.AddArg2(v0, y)
 16743  		return true
 16744  	}
 16745  }
 16746  func rewriteValueARM64_OpBitLen16(v *Value) bool {
 16747  	v_0 := v.Args[0]
 16748  	b := v.Block
 16749  	typ := &b.Func.Config.Types
 16750  	// match: (BitLen16 x)
 16751  	// result: (BitLen64 (ZeroExt16to64 x))
 16752  	for {
 16753  		x := v_0
 16754  		v.reset(OpBitLen64)
 16755  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 16756  		v0.AddArg(x)
 16757  		v.AddArg(v0)
 16758  		return true
 16759  	}
 16760  }
 16761  func rewriteValueARM64_OpBitLen32(v *Value) bool {
 16762  	v_0 := v.Args[0]
 16763  	b := v.Block
 16764  	typ := &b.Func.Config.Types
 16765  	// match: (BitLen32 x)
 16766  	// result: (SUB (MOVDconst [32]) (CLZW <typ.Int> x))
 16767  	for {
 16768  		x := v_0
 16769  		v.reset(OpARM64SUB)
 16770  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 16771  		v0.AuxInt = int64ToAuxInt(32)
 16772  		v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
 16773  		v1.AddArg(x)
 16774  		v.AddArg2(v0, v1)
 16775  		return true
 16776  	}
 16777  }
 16778  func rewriteValueARM64_OpBitLen64(v *Value) bool {
 16779  	v_0 := v.Args[0]
 16780  	b := v.Block
 16781  	typ := &b.Func.Config.Types
 16782  	// match: (BitLen64 x)
 16783  	// result: (SUB (MOVDconst [64]) (CLZ <typ.Int> x))
 16784  	for {
 16785  		x := v_0
 16786  		v.reset(OpARM64SUB)
 16787  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 16788  		v0.AuxInt = int64ToAuxInt(64)
 16789  		v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
 16790  		v1.AddArg(x)
 16791  		v.AddArg2(v0, v1)
 16792  		return true
 16793  	}
 16794  }
 16795  func rewriteValueARM64_OpBitLen8(v *Value) bool {
 16796  	v_0 := v.Args[0]
 16797  	b := v.Block
 16798  	typ := &b.Func.Config.Types
 16799  	// match: (BitLen8 x)
 16800  	// result: (BitLen64 (ZeroExt8to64 x))
 16801  	for {
 16802  		x := v_0
 16803  		v.reset(OpBitLen64)
 16804  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 16805  		v0.AddArg(x)
 16806  		v.AddArg(v0)
 16807  		return true
 16808  	}
 16809  }
 16810  func rewriteValueARM64_OpBitRev16(v *Value) bool {
 16811  	v_0 := v.Args[0]
 16812  	b := v.Block
 16813  	typ := &b.Func.Config.Types
 16814  	// match: (BitRev16 x)
 16815  	// result: (SRLconst [48] (RBIT <typ.UInt64> x))
 16816  	for {
 16817  		x := v_0
 16818  		v.reset(OpARM64SRLconst)
 16819  		v.AuxInt = int64ToAuxInt(48)
 16820  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 16821  		v0.AddArg(x)
 16822  		v.AddArg(v0)
 16823  		return true
 16824  	}
 16825  }
 16826  func rewriteValueARM64_OpBitRev8(v *Value) bool {
 16827  	v_0 := v.Args[0]
 16828  	b := v.Block
 16829  	typ := &b.Func.Config.Types
 16830  	// match: (BitRev8 x)
 16831  	// result: (SRLconst [56] (RBIT <typ.UInt64> x))
 16832  	for {
 16833  		x := v_0
 16834  		v.reset(OpARM64SRLconst)
 16835  		v.AuxInt = int64ToAuxInt(56)
 16836  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
 16837  		v0.AddArg(x)
 16838  		v.AddArg(v0)
 16839  		return true
 16840  	}
 16841  }
 16842  func rewriteValueARM64_OpCondSelect(v *Value) bool {
 16843  	v_2 := v.Args[2]
 16844  	v_1 := v.Args[1]
 16845  	v_0 := v.Args[0]
 16846  	b := v.Block
 16847  	// match: (CondSelect x y boolval)
 16848  	// cond: flagArg(boolval) != nil
 16849  	// result: (CSEL [boolval.Op] x y flagArg(boolval))
 16850  	for {
 16851  		x := v_0
 16852  		y := v_1
 16853  		boolval := v_2
 16854  		if !(flagArg(boolval) != nil) {
 16855  			break
 16856  		}
 16857  		v.reset(OpARM64CSEL)
 16858  		v.AuxInt = opToAuxInt(boolval.Op)
 16859  		v.AddArg3(x, y, flagArg(boolval))
 16860  		return true
 16861  	}
 16862  	// match: (CondSelect x y boolval)
 16863  	// cond: flagArg(boolval) == nil
 16864  	// result: (CSEL [OpARM64NotEqual] x y (TSTWconst [1] boolval))
 16865  	for {
 16866  		x := v_0
 16867  		y := v_1
 16868  		boolval := v_2
 16869  		if !(flagArg(boolval) == nil) {
 16870  			break
 16871  		}
 16872  		v.reset(OpARM64CSEL)
 16873  		v.AuxInt = opToAuxInt(OpARM64NotEqual)
 16874  		v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
 16875  		v0.AuxInt = int32ToAuxInt(1)
 16876  		v0.AddArg(boolval)
 16877  		v.AddArg3(x, y, v0)
 16878  		return true
 16879  	}
 16880  	return false
 16881  }
 16882  func rewriteValueARM64_OpConst16(v *Value) bool {
 16883  	// match: (Const16 [val])
 16884  	// result: (MOVDconst [int64(val)])
 16885  	for {
 16886  		val := auxIntToInt16(v.AuxInt)
 16887  		v.reset(OpARM64MOVDconst)
 16888  		v.AuxInt = int64ToAuxInt(int64(val))
 16889  		return true
 16890  	}
 16891  }
 16892  func rewriteValueARM64_OpConst32(v *Value) bool {
 16893  	// match: (Const32 [val])
 16894  	// result: (MOVDconst [int64(val)])
 16895  	for {
 16896  		val := auxIntToInt32(v.AuxInt)
 16897  		v.reset(OpARM64MOVDconst)
 16898  		v.AuxInt = int64ToAuxInt(int64(val))
 16899  		return true
 16900  	}
 16901  }
 16902  func rewriteValueARM64_OpConst32F(v *Value) bool {
 16903  	// match: (Const32F [val])
 16904  	// result: (FMOVSconst [float64(val)])
 16905  	for {
 16906  		val := auxIntToFloat32(v.AuxInt)
 16907  		v.reset(OpARM64FMOVSconst)
 16908  		v.AuxInt = float64ToAuxInt(float64(val))
 16909  		return true
 16910  	}
 16911  }
 16912  func rewriteValueARM64_OpConst64(v *Value) bool {
 16913  	// match: (Const64 [val])
 16914  	// result: (MOVDconst [int64(val)])
 16915  	for {
 16916  		val := auxIntToInt64(v.AuxInt)
 16917  		v.reset(OpARM64MOVDconst)
 16918  		v.AuxInt = int64ToAuxInt(int64(val))
 16919  		return true
 16920  	}
 16921  }
 16922  func rewriteValueARM64_OpConst64F(v *Value) bool {
 16923  	// match: (Const64F [val])
 16924  	// result: (FMOVDconst [float64(val)])
 16925  	for {
 16926  		val := auxIntToFloat64(v.AuxInt)
 16927  		v.reset(OpARM64FMOVDconst)
 16928  		v.AuxInt = float64ToAuxInt(float64(val))
 16929  		return true
 16930  	}
 16931  }
 16932  func rewriteValueARM64_OpConst8(v *Value) bool {
 16933  	// match: (Const8 [val])
 16934  	// result: (MOVDconst [int64(val)])
 16935  	for {
 16936  		val := auxIntToInt8(v.AuxInt)
 16937  		v.reset(OpARM64MOVDconst)
 16938  		v.AuxInt = int64ToAuxInt(int64(val))
 16939  		return true
 16940  	}
 16941  }
 16942  func rewriteValueARM64_OpConstBool(v *Value) bool {
 16943  	// match: (ConstBool [t])
 16944  	// result: (MOVDconst [b2i(t)])
 16945  	for {
 16946  		t := auxIntToBool(v.AuxInt)
 16947  		v.reset(OpARM64MOVDconst)
 16948  		v.AuxInt = int64ToAuxInt(b2i(t))
 16949  		return true
 16950  	}
 16951  }
 16952  func rewriteValueARM64_OpConstNil(v *Value) bool {
 16953  	// match: (ConstNil)
 16954  	// result: (MOVDconst [0])
 16955  	for {
 16956  		v.reset(OpARM64MOVDconst)
 16957  		v.AuxInt = int64ToAuxInt(0)
 16958  		return true
 16959  	}
 16960  }
 16961  func rewriteValueARM64_OpCtz16(v *Value) bool {
 16962  	v_0 := v.Args[0]
 16963  	b := v.Block
 16964  	typ := &b.Func.Config.Types
 16965  	// match: (Ctz16 <t> x)
 16966  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x10000] x)))
 16967  	for {
 16968  		t := v.Type
 16969  		x := v_0
 16970  		v.reset(OpARM64CLZW)
 16971  		v.Type = t
 16972  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 16973  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 16974  		v1.AuxInt = int64ToAuxInt(0x10000)
 16975  		v1.AddArg(x)
 16976  		v0.AddArg(v1)
 16977  		v.AddArg(v0)
 16978  		return true
 16979  	}
 16980  }
 16981  func rewriteValueARM64_OpCtz32(v *Value) bool {
 16982  	v_0 := v.Args[0]
 16983  	b := v.Block
 16984  	// match: (Ctz32 <t> x)
 16985  	// result: (CLZW (RBITW <t> x))
 16986  	for {
 16987  		t := v.Type
 16988  		x := v_0
 16989  		v.reset(OpARM64CLZW)
 16990  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
 16991  		v0.AddArg(x)
 16992  		v.AddArg(v0)
 16993  		return true
 16994  	}
 16995  }
 16996  func rewriteValueARM64_OpCtz64(v *Value) bool {
 16997  	v_0 := v.Args[0]
 16998  	b := v.Block
 16999  	// match: (Ctz64 <t> x)
 17000  	// result: (CLZ (RBIT <t> x))
 17001  	for {
 17002  		t := v.Type
 17003  		x := v_0
 17004  		v.reset(OpARM64CLZ)
 17005  		v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
 17006  		v0.AddArg(x)
 17007  		v.AddArg(v0)
 17008  		return true
 17009  	}
 17010  }
 17011  func rewriteValueARM64_OpCtz8(v *Value) bool {
 17012  	v_0 := v.Args[0]
 17013  	b := v.Block
 17014  	typ := &b.Func.Config.Types
 17015  	// match: (Ctz8 <t> x)
 17016  	// result: (CLZW <t> (RBITW <typ.UInt32> (ORconst <typ.UInt32> [0x100] x)))
 17017  	for {
 17018  		t := v.Type
 17019  		x := v_0
 17020  		v.reset(OpARM64CLZW)
 17021  		v.Type = t
 17022  		v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
 17023  		v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
 17024  		v1.AuxInt = int64ToAuxInt(0x100)
 17025  		v1.AddArg(x)
 17026  		v0.AddArg(v1)
 17027  		v.AddArg(v0)
 17028  		return true
 17029  	}
 17030  }
 17031  func rewriteValueARM64_OpDiv16(v *Value) bool {
 17032  	v_1 := v.Args[1]
 17033  	v_0 := v.Args[0]
 17034  	b := v.Block
 17035  	typ := &b.Func.Config.Types
 17036  	// match: (Div16 [false] x y)
 17037  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
 17038  	for {
 17039  		if auxIntToBool(v.AuxInt) != false {
 17040  			break
 17041  		}
 17042  		x := v_0
 17043  		y := v_1
 17044  		v.reset(OpARM64DIVW)
 17045  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17046  		v0.AddArg(x)
 17047  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17048  		v1.AddArg(y)
 17049  		v.AddArg2(v0, v1)
 17050  		return true
 17051  	}
 17052  	return false
 17053  }
 17054  func rewriteValueARM64_OpDiv16u(v *Value) bool {
 17055  	v_1 := v.Args[1]
 17056  	v_0 := v.Args[0]
 17057  	b := v.Block
 17058  	typ := &b.Func.Config.Types
 17059  	// match: (Div16u x y)
 17060  	// result: (UDIVW (ZeroExt16to32 x) (ZeroExt16to32 y))
 17061  	for {
 17062  		x := v_0
 17063  		y := v_1
 17064  		v.reset(OpARM64UDIVW)
 17065  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17066  		v0.AddArg(x)
 17067  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17068  		v1.AddArg(y)
 17069  		v.AddArg2(v0, v1)
 17070  		return true
 17071  	}
 17072  }
 17073  func rewriteValueARM64_OpDiv32(v *Value) bool {
 17074  	v_1 := v.Args[1]
 17075  	v_0 := v.Args[0]
 17076  	// match: (Div32 [false] x y)
 17077  	// result: (DIVW x y)
 17078  	for {
 17079  		if auxIntToBool(v.AuxInt) != false {
 17080  			break
 17081  		}
 17082  		x := v_0
 17083  		y := v_1
 17084  		v.reset(OpARM64DIVW)
 17085  		v.AddArg2(x, y)
 17086  		return true
 17087  	}
 17088  	return false
 17089  }
 17090  func rewriteValueARM64_OpDiv64(v *Value) bool {
 17091  	v_1 := v.Args[1]
 17092  	v_0 := v.Args[0]
 17093  	// match: (Div64 [false] x y)
 17094  	// result: (DIV x y)
 17095  	for {
 17096  		if auxIntToBool(v.AuxInt) != false {
 17097  			break
 17098  		}
 17099  		x := v_0
 17100  		y := v_1
 17101  		v.reset(OpARM64DIV)
 17102  		v.AddArg2(x, y)
 17103  		return true
 17104  	}
 17105  	return false
 17106  }
 17107  func rewriteValueARM64_OpDiv8(v *Value) bool {
 17108  	v_1 := v.Args[1]
 17109  	v_0 := v.Args[0]
 17110  	b := v.Block
 17111  	typ := &b.Func.Config.Types
 17112  	// match: (Div8 x y)
 17113  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
 17114  	for {
 17115  		x := v_0
 17116  		y := v_1
 17117  		v.reset(OpARM64DIVW)
 17118  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17119  		v0.AddArg(x)
 17120  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17121  		v1.AddArg(y)
 17122  		v.AddArg2(v0, v1)
 17123  		return true
 17124  	}
 17125  }
 17126  func rewriteValueARM64_OpDiv8u(v *Value) bool {
 17127  	v_1 := v.Args[1]
 17128  	v_0 := v.Args[0]
 17129  	b := v.Block
 17130  	typ := &b.Func.Config.Types
 17131  	// match: (Div8u x y)
 17132  	// result: (UDIVW (ZeroExt8to32 x) (ZeroExt8to32 y))
 17133  	for {
 17134  		x := v_0
 17135  		y := v_1
 17136  		v.reset(OpARM64UDIVW)
 17137  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17138  		v0.AddArg(x)
 17139  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17140  		v1.AddArg(y)
 17141  		v.AddArg2(v0, v1)
 17142  		return true
 17143  	}
 17144  }
 17145  func rewriteValueARM64_OpEq16(v *Value) bool {
 17146  	v_1 := v.Args[1]
 17147  	v_0 := v.Args[0]
 17148  	b := v.Block
 17149  	typ := &b.Func.Config.Types
 17150  	// match: (Eq16 x y)
 17151  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17152  	for {
 17153  		x := v_0
 17154  		y := v_1
 17155  		v.reset(OpARM64Equal)
 17156  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17157  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17158  		v1.AddArg(x)
 17159  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17160  		v2.AddArg(y)
 17161  		v0.AddArg2(v1, v2)
 17162  		v.AddArg(v0)
 17163  		return true
 17164  	}
 17165  }
 17166  func rewriteValueARM64_OpEq32(v *Value) bool {
 17167  	v_1 := v.Args[1]
 17168  	v_0 := v.Args[0]
 17169  	b := v.Block
 17170  	// match: (Eq32 x y)
 17171  	// result: (Equal (CMPW x y))
 17172  	for {
 17173  		x := v_0
 17174  		y := v_1
 17175  		v.reset(OpARM64Equal)
 17176  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17177  		v0.AddArg2(x, y)
 17178  		v.AddArg(v0)
 17179  		return true
 17180  	}
 17181  }
 17182  func rewriteValueARM64_OpEq32F(v *Value) bool {
 17183  	v_1 := v.Args[1]
 17184  	v_0 := v.Args[0]
 17185  	b := v.Block
 17186  	// match: (Eq32F x y)
 17187  	// result: (Equal (FCMPS x y))
 17188  	for {
 17189  		x := v_0
 17190  		y := v_1
 17191  		v.reset(OpARM64Equal)
 17192  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17193  		v0.AddArg2(x, y)
 17194  		v.AddArg(v0)
 17195  		return true
 17196  	}
 17197  }
 17198  func rewriteValueARM64_OpEq64(v *Value) bool {
 17199  	v_1 := v.Args[1]
 17200  	v_0 := v.Args[0]
 17201  	b := v.Block
 17202  	// match: (Eq64 x y)
 17203  	// result: (Equal (CMP x y))
 17204  	for {
 17205  		x := v_0
 17206  		y := v_1
 17207  		v.reset(OpARM64Equal)
 17208  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17209  		v0.AddArg2(x, y)
 17210  		v.AddArg(v0)
 17211  		return true
 17212  	}
 17213  }
 17214  func rewriteValueARM64_OpEq64F(v *Value) bool {
 17215  	v_1 := v.Args[1]
 17216  	v_0 := v.Args[0]
 17217  	b := v.Block
 17218  	// match: (Eq64F x y)
 17219  	// result: (Equal (FCMPD x y))
 17220  	for {
 17221  		x := v_0
 17222  		y := v_1
 17223  		v.reset(OpARM64Equal)
 17224  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17225  		v0.AddArg2(x, y)
 17226  		v.AddArg(v0)
 17227  		return true
 17228  	}
 17229  }
 17230  func rewriteValueARM64_OpEq8(v *Value) bool {
 17231  	v_1 := v.Args[1]
 17232  	v_0 := v.Args[0]
 17233  	b := v.Block
 17234  	typ := &b.Func.Config.Types
 17235  	// match: (Eq8 x y)
 17236  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17237  	for {
 17238  		x := v_0
 17239  		y := v_1
 17240  		v.reset(OpARM64Equal)
 17241  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17242  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17243  		v1.AddArg(x)
 17244  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17245  		v2.AddArg(y)
 17246  		v0.AddArg2(v1, v2)
 17247  		v.AddArg(v0)
 17248  		return true
 17249  	}
 17250  }
 17251  func rewriteValueARM64_OpEqB(v *Value) bool {
 17252  	v_1 := v.Args[1]
 17253  	v_0 := v.Args[0]
 17254  	b := v.Block
 17255  	typ := &b.Func.Config.Types
 17256  	// match: (EqB x y)
 17257  	// result: (XOR (MOVDconst [1]) (XOR <typ.Bool> x y))
 17258  	for {
 17259  		x := v_0
 17260  		y := v_1
 17261  		v.reset(OpARM64XOR)
 17262  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17263  		v0.AuxInt = int64ToAuxInt(1)
 17264  		v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
 17265  		v1.AddArg2(x, y)
 17266  		v.AddArg2(v0, v1)
 17267  		return true
 17268  	}
 17269  }
 17270  func rewriteValueARM64_OpEqPtr(v *Value) bool {
 17271  	v_1 := v.Args[1]
 17272  	v_0 := v.Args[0]
 17273  	b := v.Block
 17274  	// match: (EqPtr x y)
 17275  	// result: (Equal (CMP x y))
 17276  	for {
 17277  		x := v_0
 17278  		y := v_1
 17279  		v.reset(OpARM64Equal)
 17280  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17281  		v0.AddArg2(x, y)
 17282  		v.AddArg(v0)
 17283  		return true
 17284  	}
 17285  }
 17286  func rewriteValueARM64_OpFMA(v *Value) bool {
 17287  	v_2 := v.Args[2]
 17288  	v_1 := v.Args[1]
 17289  	v_0 := v.Args[0]
 17290  	// match: (FMA x y z)
 17291  	// result: (FMADDD z x y)
 17292  	for {
 17293  		x := v_0
 17294  		y := v_1
 17295  		z := v_2
 17296  		v.reset(OpARM64FMADDD)
 17297  		v.AddArg3(z, x, y)
 17298  		return true
 17299  	}
 17300  }
 17301  func rewriteValueARM64_OpHmul32(v *Value) bool {
 17302  	v_1 := v.Args[1]
 17303  	v_0 := v.Args[0]
 17304  	b := v.Block
 17305  	typ := &b.Func.Config.Types
 17306  	// match: (Hmul32 x y)
 17307  	// result: (SRAconst (MULL <typ.Int64> x y) [32])
 17308  	for {
 17309  		x := v_0
 17310  		y := v_1
 17311  		v.reset(OpARM64SRAconst)
 17312  		v.AuxInt = int64ToAuxInt(32)
 17313  		v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
 17314  		v0.AddArg2(x, y)
 17315  		v.AddArg(v0)
 17316  		return true
 17317  	}
 17318  }
 17319  func rewriteValueARM64_OpHmul32u(v *Value) bool {
 17320  	v_1 := v.Args[1]
 17321  	v_0 := v.Args[0]
 17322  	b := v.Block
 17323  	typ := &b.Func.Config.Types
 17324  	// match: (Hmul32u x y)
 17325  	// result: (SRAconst (UMULL <typ.UInt64> x y) [32])
 17326  	for {
 17327  		x := v_0
 17328  		y := v_1
 17329  		v.reset(OpARM64SRAconst)
 17330  		v.AuxInt = int64ToAuxInt(32)
 17331  		v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
 17332  		v0.AddArg2(x, y)
 17333  		v.AddArg(v0)
 17334  		return true
 17335  	}
 17336  }
 17337  func rewriteValueARM64_OpIsInBounds(v *Value) bool {
 17338  	v_1 := v.Args[1]
 17339  	v_0 := v.Args[0]
 17340  	b := v.Block
 17341  	// match: (IsInBounds idx len)
 17342  	// result: (LessThanU (CMP idx len))
 17343  	for {
 17344  		idx := v_0
 17345  		len := v_1
 17346  		v.reset(OpARM64LessThanU)
 17347  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17348  		v0.AddArg2(idx, len)
 17349  		v.AddArg(v0)
 17350  		return true
 17351  	}
 17352  }
 17353  func rewriteValueARM64_OpIsNonNil(v *Value) bool {
 17354  	v_0 := v.Args[0]
 17355  	b := v.Block
 17356  	// match: (IsNonNil ptr)
 17357  	// result: (NotEqual (CMPconst [0] ptr))
 17358  	for {
 17359  		ptr := v_0
 17360  		v.reset(OpARM64NotEqual)
 17361  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 17362  		v0.AuxInt = int64ToAuxInt(0)
 17363  		v0.AddArg(ptr)
 17364  		v.AddArg(v0)
 17365  		return true
 17366  	}
 17367  }
 17368  func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
 17369  	v_1 := v.Args[1]
 17370  	v_0 := v.Args[0]
 17371  	b := v.Block
 17372  	// match: (IsSliceInBounds idx len)
 17373  	// result: (LessEqualU (CMP idx len))
 17374  	for {
 17375  		idx := v_0
 17376  		len := v_1
 17377  		v.reset(OpARM64LessEqualU)
 17378  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17379  		v0.AddArg2(idx, len)
 17380  		v.AddArg(v0)
 17381  		return true
 17382  	}
 17383  }
 17384  func rewriteValueARM64_OpLeq16(v *Value) bool {
 17385  	v_1 := v.Args[1]
 17386  	v_0 := v.Args[0]
 17387  	b := v.Block
 17388  	typ := &b.Func.Config.Types
 17389  	// match: (Leq16 x y)
 17390  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 17391  	for {
 17392  		x := v_0
 17393  		y := v_1
 17394  		v.reset(OpARM64LessEqual)
 17395  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17396  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17397  		v1.AddArg(x)
 17398  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17399  		v2.AddArg(y)
 17400  		v0.AddArg2(v1, v2)
 17401  		v.AddArg(v0)
 17402  		return true
 17403  	}
 17404  }
 17405  func rewriteValueARM64_OpLeq16U(v *Value) bool {
 17406  	v_1 := v.Args[1]
 17407  	v_0 := v.Args[0]
 17408  	b := v.Block
 17409  	typ := &b.Func.Config.Types
 17410  	// match: (Leq16U x zero:(MOVDconst [0]))
 17411  	// result: (Eq16 x zero)
 17412  	for {
 17413  		x := v_0
 17414  		zero := v_1
 17415  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17416  			break
 17417  		}
 17418  		v.reset(OpEq16)
 17419  		v.AddArg2(x, zero)
 17420  		return true
 17421  	}
 17422  	// match: (Leq16U (MOVDconst [1]) x)
 17423  	// result: (Neq16 (MOVDconst [0]) x)
 17424  	for {
 17425  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17426  			break
 17427  		}
 17428  		x := v_1
 17429  		v.reset(OpNeq16)
 17430  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17431  		v0.AuxInt = int64ToAuxInt(0)
 17432  		v.AddArg2(v0, x)
 17433  		return true
 17434  	}
 17435  	// match: (Leq16U x y)
 17436  	// result: (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17437  	for {
 17438  		x := v_0
 17439  		y := v_1
 17440  		v.reset(OpARM64LessEqualU)
 17441  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17442  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17443  		v1.AddArg(x)
 17444  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17445  		v2.AddArg(y)
 17446  		v0.AddArg2(v1, v2)
 17447  		v.AddArg(v0)
 17448  		return true
 17449  	}
 17450  }
 17451  func rewriteValueARM64_OpLeq32(v *Value) bool {
 17452  	v_1 := v.Args[1]
 17453  	v_0 := v.Args[0]
 17454  	b := v.Block
 17455  	// match: (Leq32 x y)
 17456  	// result: (LessEqual (CMPW x y))
 17457  	for {
 17458  		x := v_0
 17459  		y := v_1
 17460  		v.reset(OpARM64LessEqual)
 17461  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17462  		v0.AddArg2(x, y)
 17463  		v.AddArg(v0)
 17464  		return true
 17465  	}
 17466  }
 17467  func rewriteValueARM64_OpLeq32F(v *Value) bool {
 17468  	v_1 := v.Args[1]
 17469  	v_0 := v.Args[0]
 17470  	b := v.Block
 17471  	// match: (Leq32F x y)
 17472  	// result: (LessEqualF (FCMPS x y))
 17473  	for {
 17474  		x := v_0
 17475  		y := v_1
 17476  		v.reset(OpARM64LessEqualF)
 17477  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17478  		v0.AddArg2(x, y)
 17479  		v.AddArg(v0)
 17480  		return true
 17481  	}
 17482  }
 17483  func rewriteValueARM64_OpLeq32U(v *Value) bool {
 17484  	v_1 := v.Args[1]
 17485  	v_0 := v.Args[0]
 17486  	b := v.Block
 17487  	typ := &b.Func.Config.Types
 17488  	// match: (Leq32U x zero:(MOVDconst [0]))
 17489  	// result: (Eq32 x zero)
 17490  	for {
 17491  		x := v_0
 17492  		zero := v_1
 17493  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17494  			break
 17495  		}
 17496  		v.reset(OpEq32)
 17497  		v.AddArg2(x, zero)
 17498  		return true
 17499  	}
 17500  	// match: (Leq32U (MOVDconst [1]) x)
 17501  	// result: (Neq32 (MOVDconst [0]) x)
 17502  	for {
 17503  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17504  			break
 17505  		}
 17506  		x := v_1
 17507  		v.reset(OpNeq32)
 17508  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17509  		v0.AuxInt = int64ToAuxInt(0)
 17510  		v.AddArg2(v0, x)
 17511  		return true
 17512  	}
 17513  	// match: (Leq32U x y)
 17514  	// result: (LessEqualU (CMPW x y))
 17515  	for {
 17516  		x := v_0
 17517  		y := v_1
 17518  		v.reset(OpARM64LessEqualU)
 17519  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17520  		v0.AddArg2(x, y)
 17521  		v.AddArg(v0)
 17522  		return true
 17523  	}
 17524  }
 17525  func rewriteValueARM64_OpLeq64(v *Value) bool {
 17526  	v_1 := v.Args[1]
 17527  	v_0 := v.Args[0]
 17528  	b := v.Block
 17529  	// match: (Leq64 x y)
 17530  	// result: (LessEqual (CMP x y))
 17531  	for {
 17532  		x := v_0
 17533  		y := v_1
 17534  		v.reset(OpARM64LessEqual)
 17535  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17536  		v0.AddArg2(x, y)
 17537  		v.AddArg(v0)
 17538  		return true
 17539  	}
 17540  }
 17541  func rewriteValueARM64_OpLeq64F(v *Value) bool {
 17542  	v_1 := v.Args[1]
 17543  	v_0 := v.Args[0]
 17544  	b := v.Block
 17545  	// match: (Leq64F x y)
 17546  	// result: (LessEqualF (FCMPD x y))
 17547  	for {
 17548  		x := v_0
 17549  		y := v_1
 17550  		v.reset(OpARM64LessEqualF)
 17551  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17552  		v0.AddArg2(x, y)
 17553  		v.AddArg(v0)
 17554  		return true
 17555  	}
 17556  }
 17557  func rewriteValueARM64_OpLeq64U(v *Value) bool {
 17558  	v_1 := v.Args[1]
 17559  	v_0 := v.Args[0]
 17560  	b := v.Block
 17561  	typ := &b.Func.Config.Types
 17562  	// match: (Leq64U x zero:(MOVDconst [0]))
 17563  	// result: (Eq64 x zero)
 17564  	for {
 17565  		x := v_0
 17566  		zero := v_1
 17567  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17568  			break
 17569  		}
 17570  		v.reset(OpEq64)
 17571  		v.AddArg2(x, zero)
 17572  		return true
 17573  	}
 17574  	// match: (Leq64U (MOVDconst [1]) x)
 17575  	// result: (Neq64 (MOVDconst [0]) x)
 17576  	for {
 17577  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17578  			break
 17579  		}
 17580  		x := v_1
 17581  		v.reset(OpNeq64)
 17582  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17583  		v0.AuxInt = int64ToAuxInt(0)
 17584  		v.AddArg2(v0, x)
 17585  		return true
 17586  	}
 17587  	// match: (Leq64U x y)
 17588  	// result: (LessEqualU (CMP x y))
 17589  	for {
 17590  		x := v_0
 17591  		y := v_1
 17592  		v.reset(OpARM64LessEqualU)
 17593  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17594  		v0.AddArg2(x, y)
 17595  		v.AddArg(v0)
 17596  		return true
 17597  	}
 17598  }
 17599  func rewriteValueARM64_OpLeq8(v *Value) bool {
 17600  	v_1 := v.Args[1]
 17601  	v_0 := v.Args[0]
 17602  	b := v.Block
 17603  	typ := &b.Func.Config.Types
 17604  	// match: (Leq8 x y)
 17605  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 17606  	for {
 17607  		x := v_0
 17608  		y := v_1
 17609  		v.reset(OpARM64LessEqual)
 17610  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17611  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17612  		v1.AddArg(x)
 17613  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17614  		v2.AddArg(y)
 17615  		v0.AddArg2(v1, v2)
 17616  		v.AddArg(v0)
 17617  		return true
 17618  	}
 17619  }
 17620  func rewriteValueARM64_OpLeq8U(v *Value) bool {
 17621  	v_1 := v.Args[1]
 17622  	v_0 := v.Args[0]
 17623  	b := v.Block
 17624  	typ := &b.Func.Config.Types
 17625  	// match: (Leq8U x zero:(MOVDconst [0]))
 17626  	// result: (Eq8 x zero)
 17627  	for {
 17628  		x := v_0
 17629  		zero := v_1
 17630  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17631  			break
 17632  		}
 17633  		v.reset(OpEq8)
 17634  		v.AddArg2(x, zero)
 17635  		return true
 17636  	}
 17637  	// match: (Leq8U (MOVDconst [1]) x)
 17638  	// result: (Neq8 (MOVDconst [0]) x)
 17639  	for {
 17640  		if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
 17641  			break
 17642  		}
 17643  		x := v_1
 17644  		v.reset(OpNeq8)
 17645  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17646  		v0.AuxInt = int64ToAuxInt(0)
 17647  		v.AddArg2(v0, x)
 17648  		return true
 17649  	}
 17650  	// match: (Leq8U x y)
 17651  	// result: (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17652  	for {
 17653  		x := v_0
 17654  		y := v_1
 17655  		v.reset(OpARM64LessEqualU)
 17656  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17657  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17658  		v1.AddArg(x)
 17659  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17660  		v2.AddArg(y)
 17661  		v0.AddArg2(v1, v2)
 17662  		v.AddArg(v0)
 17663  		return true
 17664  	}
 17665  }
 17666  func rewriteValueARM64_OpLess16(v *Value) bool {
 17667  	v_1 := v.Args[1]
 17668  	v_0 := v.Args[0]
 17669  	b := v.Block
 17670  	typ := &b.Func.Config.Types
 17671  	// match: (Less16 x y)
 17672  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
 17673  	for {
 17674  		x := v_0
 17675  		y := v_1
 17676  		v.reset(OpARM64LessThan)
 17677  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17678  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17679  		v1.AddArg(x)
 17680  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 17681  		v2.AddArg(y)
 17682  		v0.AddArg2(v1, v2)
 17683  		v.AddArg(v0)
 17684  		return true
 17685  	}
 17686  }
 17687  func rewriteValueARM64_OpLess16U(v *Value) bool {
 17688  	v_1 := v.Args[1]
 17689  	v_0 := v.Args[0]
 17690  	b := v.Block
 17691  	typ := &b.Func.Config.Types
 17692  	// match: (Less16U zero:(MOVDconst [0]) x)
 17693  	// result: (Neq16 zero x)
 17694  	for {
 17695  		zero := v_0
 17696  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17697  			break
 17698  		}
 17699  		x := v_1
 17700  		v.reset(OpNeq16)
 17701  		v.AddArg2(zero, x)
 17702  		return true
 17703  	}
 17704  	// match: (Less16U x (MOVDconst [1]))
 17705  	// result: (Eq16 x (MOVDconst [0]))
 17706  	for {
 17707  		x := v_0
 17708  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17709  			break
 17710  		}
 17711  		v.reset(OpEq16)
 17712  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17713  		v0.AuxInt = int64ToAuxInt(0)
 17714  		v.AddArg2(x, v0)
 17715  		return true
 17716  	}
 17717  	// match: (Less16U x y)
 17718  	// result: (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 17719  	for {
 17720  		x := v_0
 17721  		y := v_1
 17722  		v.reset(OpARM64LessThanU)
 17723  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17724  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17725  		v1.AddArg(x)
 17726  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 17727  		v2.AddArg(y)
 17728  		v0.AddArg2(v1, v2)
 17729  		v.AddArg(v0)
 17730  		return true
 17731  	}
 17732  }
 17733  func rewriteValueARM64_OpLess32(v *Value) bool {
 17734  	v_1 := v.Args[1]
 17735  	v_0 := v.Args[0]
 17736  	b := v.Block
 17737  	// match: (Less32 x y)
 17738  	// result: (LessThan (CMPW x y))
 17739  	for {
 17740  		x := v_0
 17741  		y := v_1
 17742  		v.reset(OpARM64LessThan)
 17743  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17744  		v0.AddArg2(x, y)
 17745  		v.AddArg(v0)
 17746  		return true
 17747  	}
 17748  }
 17749  func rewriteValueARM64_OpLess32F(v *Value) bool {
 17750  	v_1 := v.Args[1]
 17751  	v_0 := v.Args[0]
 17752  	b := v.Block
 17753  	// match: (Less32F x y)
 17754  	// result: (LessThanF (FCMPS x y))
 17755  	for {
 17756  		x := v_0
 17757  		y := v_1
 17758  		v.reset(OpARM64LessThanF)
 17759  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 17760  		v0.AddArg2(x, y)
 17761  		v.AddArg(v0)
 17762  		return true
 17763  	}
 17764  }
 17765  func rewriteValueARM64_OpLess32U(v *Value) bool {
 17766  	v_1 := v.Args[1]
 17767  	v_0 := v.Args[0]
 17768  	b := v.Block
 17769  	typ := &b.Func.Config.Types
 17770  	// match: (Less32U zero:(MOVDconst [0]) x)
 17771  	// result: (Neq32 zero x)
 17772  	for {
 17773  		zero := v_0
 17774  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17775  			break
 17776  		}
 17777  		x := v_1
 17778  		v.reset(OpNeq32)
 17779  		v.AddArg2(zero, x)
 17780  		return true
 17781  	}
 17782  	// match: (Less32U x (MOVDconst [1]))
 17783  	// result: (Eq32 x (MOVDconst [0]))
 17784  	for {
 17785  		x := v_0
 17786  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17787  			break
 17788  		}
 17789  		v.reset(OpEq32)
 17790  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17791  		v0.AuxInt = int64ToAuxInt(0)
 17792  		v.AddArg2(x, v0)
 17793  		return true
 17794  	}
 17795  	// match: (Less32U x y)
 17796  	// result: (LessThanU (CMPW x y))
 17797  	for {
 17798  		x := v_0
 17799  		y := v_1
 17800  		v.reset(OpARM64LessThanU)
 17801  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17802  		v0.AddArg2(x, y)
 17803  		v.AddArg(v0)
 17804  		return true
 17805  	}
 17806  }
 17807  func rewriteValueARM64_OpLess64(v *Value) bool {
 17808  	v_1 := v.Args[1]
 17809  	v_0 := v.Args[0]
 17810  	b := v.Block
 17811  	// match: (Less64 x y)
 17812  	// result: (LessThan (CMP x y))
 17813  	for {
 17814  		x := v_0
 17815  		y := v_1
 17816  		v.reset(OpARM64LessThan)
 17817  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17818  		v0.AddArg2(x, y)
 17819  		v.AddArg(v0)
 17820  		return true
 17821  	}
 17822  }
 17823  func rewriteValueARM64_OpLess64F(v *Value) bool {
 17824  	v_1 := v.Args[1]
 17825  	v_0 := v.Args[0]
 17826  	b := v.Block
 17827  	// match: (Less64F x y)
 17828  	// result: (LessThanF (FCMPD x y))
 17829  	for {
 17830  		x := v_0
 17831  		y := v_1
 17832  		v.reset(OpARM64LessThanF)
 17833  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 17834  		v0.AddArg2(x, y)
 17835  		v.AddArg(v0)
 17836  		return true
 17837  	}
 17838  }
 17839  func rewriteValueARM64_OpLess64U(v *Value) bool {
 17840  	v_1 := v.Args[1]
 17841  	v_0 := v.Args[0]
 17842  	b := v.Block
 17843  	typ := &b.Func.Config.Types
 17844  	// match: (Less64U zero:(MOVDconst [0]) x)
 17845  	// result: (Neq64 zero x)
 17846  	for {
 17847  		zero := v_0
 17848  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17849  			break
 17850  		}
 17851  		x := v_1
 17852  		v.reset(OpNeq64)
 17853  		v.AddArg2(zero, x)
 17854  		return true
 17855  	}
 17856  	// match: (Less64U x (MOVDconst [1]))
 17857  	// result: (Eq64 x (MOVDconst [0]))
 17858  	for {
 17859  		x := v_0
 17860  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17861  			break
 17862  		}
 17863  		v.reset(OpEq64)
 17864  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17865  		v0.AuxInt = int64ToAuxInt(0)
 17866  		v.AddArg2(x, v0)
 17867  		return true
 17868  	}
 17869  	// match: (Less64U x y)
 17870  	// result: (LessThanU (CMP x y))
 17871  	for {
 17872  		x := v_0
 17873  		y := v_1
 17874  		v.reset(OpARM64LessThanU)
 17875  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 17876  		v0.AddArg2(x, y)
 17877  		v.AddArg(v0)
 17878  		return true
 17879  	}
 17880  }
 17881  func rewriteValueARM64_OpLess8(v *Value) bool {
 17882  	v_1 := v.Args[1]
 17883  	v_0 := v.Args[0]
 17884  	b := v.Block
 17885  	typ := &b.Func.Config.Types
 17886  	// match: (Less8 x y)
 17887  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
 17888  	for {
 17889  		x := v_0
 17890  		y := v_1
 17891  		v.reset(OpARM64LessThan)
 17892  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17893  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17894  		v1.AddArg(x)
 17895  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 17896  		v2.AddArg(y)
 17897  		v0.AddArg2(v1, v2)
 17898  		v.AddArg(v0)
 17899  		return true
 17900  	}
 17901  }
 17902  func rewriteValueARM64_OpLess8U(v *Value) bool {
 17903  	v_1 := v.Args[1]
 17904  	v_0 := v.Args[0]
 17905  	b := v.Block
 17906  	typ := &b.Func.Config.Types
 17907  	// match: (Less8U zero:(MOVDconst [0]) x)
 17908  	// result: (Neq8 zero x)
 17909  	for {
 17910  		zero := v_0
 17911  		if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
 17912  			break
 17913  		}
 17914  		x := v_1
 17915  		v.reset(OpNeq8)
 17916  		v.AddArg2(zero, x)
 17917  		return true
 17918  	}
 17919  	// match: (Less8U x (MOVDconst [1]))
 17920  	// result: (Eq8 x (MOVDconst [0]))
 17921  	for {
 17922  		x := v_0
 17923  		if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
 17924  			break
 17925  		}
 17926  		v.reset(OpEq8)
 17927  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 17928  		v0.AuxInt = int64ToAuxInt(0)
 17929  		v.AddArg2(x, v0)
 17930  		return true
 17931  	}
 17932  	// match: (Less8U x y)
 17933  	// result: (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 17934  	for {
 17935  		x := v_0
 17936  		y := v_1
 17937  		v.reset(OpARM64LessThanU)
 17938  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 17939  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17940  		v1.AddArg(x)
 17941  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 17942  		v2.AddArg(y)
 17943  		v0.AddArg2(v1, v2)
 17944  		v.AddArg(v0)
 17945  		return true
 17946  	}
 17947  }
 17948  func rewriteValueARM64_OpLoad(v *Value) bool {
 17949  	v_1 := v.Args[1]
 17950  	v_0 := v.Args[0]
 17951  	// match: (Load <t> ptr mem)
 17952  	// cond: t.IsBoolean()
 17953  	// result: (MOVBUload ptr mem)
 17954  	for {
 17955  		t := v.Type
 17956  		ptr := v_0
 17957  		mem := v_1
 17958  		if !(t.IsBoolean()) {
 17959  			break
 17960  		}
 17961  		v.reset(OpARM64MOVBUload)
 17962  		v.AddArg2(ptr, mem)
 17963  		return true
 17964  	}
 17965  	// match: (Load <t> ptr mem)
 17966  	// cond: (is8BitInt(t) && t.IsSigned())
 17967  	// result: (MOVBload ptr mem)
 17968  	for {
 17969  		t := v.Type
 17970  		ptr := v_0
 17971  		mem := v_1
 17972  		if !(is8BitInt(t) && t.IsSigned()) {
 17973  			break
 17974  		}
 17975  		v.reset(OpARM64MOVBload)
 17976  		v.AddArg2(ptr, mem)
 17977  		return true
 17978  	}
 17979  	// match: (Load <t> ptr mem)
 17980  	// cond: (is8BitInt(t) && !t.IsSigned())
 17981  	// result: (MOVBUload ptr mem)
 17982  	for {
 17983  		t := v.Type
 17984  		ptr := v_0
 17985  		mem := v_1
 17986  		if !(is8BitInt(t) && !t.IsSigned()) {
 17987  			break
 17988  		}
 17989  		v.reset(OpARM64MOVBUload)
 17990  		v.AddArg2(ptr, mem)
 17991  		return true
 17992  	}
 17993  	// match: (Load <t> ptr mem)
 17994  	// cond: (is16BitInt(t) && t.IsSigned())
 17995  	// result: (MOVHload ptr mem)
 17996  	for {
 17997  		t := v.Type
 17998  		ptr := v_0
 17999  		mem := v_1
 18000  		if !(is16BitInt(t) && t.IsSigned()) {
 18001  			break
 18002  		}
 18003  		v.reset(OpARM64MOVHload)
 18004  		v.AddArg2(ptr, mem)
 18005  		return true
 18006  	}
 18007  	// match: (Load <t> ptr mem)
 18008  	// cond: (is16BitInt(t) && !t.IsSigned())
 18009  	// result: (MOVHUload ptr mem)
 18010  	for {
 18011  		t := v.Type
 18012  		ptr := v_0
 18013  		mem := v_1
 18014  		if !(is16BitInt(t) && !t.IsSigned()) {
 18015  			break
 18016  		}
 18017  		v.reset(OpARM64MOVHUload)
 18018  		v.AddArg2(ptr, mem)
 18019  		return true
 18020  	}
 18021  	// match: (Load <t> ptr mem)
 18022  	// cond: (is32BitInt(t) && t.IsSigned())
 18023  	// result: (MOVWload ptr mem)
 18024  	for {
 18025  		t := v.Type
 18026  		ptr := v_0
 18027  		mem := v_1
 18028  		if !(is32BitInt(t) && t.IsSigned()) {
 18029  			break
 18030  		}
 18031  		v.reset(OpARM64MOVWload)
 18032  		v.AddArg2(ptr, mem)
 18033  		return true
 18034  	}
 18035  	// match: (Load <t> ptr mem)
 18036  	// cond: (is32BitInt(t) && !t.IsSigned())
 18037  	// result: (MOVWUload ptr mem)
 18038  	for {
 18039  		t := v.Type
 18040  		ptr := v_0
 18041  		mem := v_1
 18042  		if !(is32BitInt(t) && !t.IsSigned()) {
 18043  			break
 18044  		}
 18045  		v.reset(OpARM64MOVWUload)
 18046  		v.AddArg2(ptr, mem)
 18047  		return true
 18048  	}
 18049  	// match: (Load <t> ptr mem)
 18050  	// cond: (is64BitInt(t) || isPtr(t))
 18051  	// result: (MOVDload ptr mem)
 18052  	for {
 18053  		t := v.Type
 18054  		ptr := v_0
 18055  		mem := v_1
 18056  		if !(is64BitInt(t) || isPtr(t)) {
 18057  			break
 18058  		}
 18059  		v.reset(OpARM64MOVDload)
 18060  		v.AddArg2(ptr, mem)
 18061  		return true
 18062  	}
 18063  	// match: (Load <t> ptr mem)
 18064  	// cond: is32BitFloat(t)
 18065  	// result: (FMOVSload ptr mem)
 18066  	for {
 18067  		t := v.Type
 18068  		ptr := v_0
 18069  		mem := v_1
 18070  		if !(is32BitFloat(t)) {
 18071  			break
 18072  		}
 18073  		v.reset(OpARM64FMOVSload)
 18074  		v.AddArg2(ptr, mem)
 18075  		return true
 18076  	}
 18077  	// match: (Load <t> ptr mem)
 18078  	// cond: is64BitFloat(t)
 18079  	// result: (FMOVDload ptr mem)
 18080  	for {
 18081  		t := v.Type
 18082  		ptr := v_0
 18083  		mem := v_1
 18084  		if !(is64BitFloat(t)) {
 18085  			break
 18086  		}
 18087  		v.reset(OpARM64FMOVDload)
 18088  		v.AddArg2(ptr, mem)
 18089  		return true
 18090  	}
 18091  	return false
 18092  }
 18093  func rewriteValueARM64_OpLocalAddr(v *Value) bool {
 18094  	v_1 := v.Args[1]
 18095  	v_0 := v.Args[0]
 18096  	b := v.Block
 18097  	typ := &b.Func.Config.Types
 18098  	// match: (LocalAddr <t> {sym} base mem)
 18099  	// cond: t.Elem().HasPointers()
 18100  	// result: (MOVDaddr {sym} (SPanchored base mem))
 18101  	for {
 18102  		t := v.Type
 18103  		sym := auxToSym(v.Aux)
 18104  		base := v_0
 18105  		mem := v_1
 18106  		if !(t.Elem().HasPointers()) {
 18107  			break
 18108  		}
 18109  		v.reset(OpARM64MOVDaddr)
 18110  		v.Aux = symToAux(sym)
 18111  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
 18112  		v0.AddArg2(base, mem)
 18113  		v.AddArg(v0)
 18114  		return true
 18115  	}
 18116  	// match: (LocalAddr <t> {sym} base _)
 18117  	// cond: !t.Elem().HasPointers()
 18118  	// result: (MOVDaddr {sym} base)
 18119  	for {
 18120  		t := v.Type
 18121  		sym := auxToSym(v.Aux)
 18122  		base := v_0
 18123  		if !(!t.Elem().HasPointers()) {
 18124  			break
 18125  		}
 18126  		v.reset(OpARM64MOVDaddr)
 18127  		v.Aux = symToAux(sym)
 18128  		v.AddArg(base)
 18129  		return true
 18130  	}
 18131  	return false
 18132  }
 18133  func rewriteValueARM64_OpLsh16x16(v *Value) bool {
 18134  	v_1 := v.Args[1]
 18135  	v_0 := v.Args[0]
 18136  	b := v.Block
 18137  	typ := &b.Func.Config.Types
 18138  	// match: (Lsh16x16 <t> x y)
 18139  	// cond: shiftIsBounded(v)
 18140  	// result: (SLL <t> x y)
 18141  	for {
 18142  		t := v.Type
 18143  		x := v_0
 18144  		y := v_1
 18145  		if !(shiftIsBounded(v)) {
 18146  			break
 18147  		}
 18148  		v.reset(OpARM64SLL)
 18149  		v.Type = t
 18150  		v.AddArg2(x, y)
 18151  		return true
 18152  	}
 18153  	// match: (Lsh16x16 <t> x y)
 18154  	// cond: !shiftIsBounded(v)
 18155  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18156  	for {
 18157  		t := v.Type
 18158  		x := v_0
 18159  		y := v_1
 18160  		if !(!shiftIsBounded(v)) {
 18161  			break
 18162  		}
 18163  		v.reset(OpARM64CSEL)
 18164  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18165  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18166  		v0.AddArg2(x, y)
 18167  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18168  		v1.AuxInt = int64ToAuxInt(0)
 18169  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18170  		v2.AuxInt = int64ToAuxInt(64)
 18171  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18172  		v3.AddArg(y)
 18173  		v2.AddArg(v3)
 18174  		v.AddArg3(v0, v1, v2)
 18175  		return true
 18176  	}
 18177  	return false
 18178  }
 18179  func rewriteValueARM64_OpLsh16x32(v *Value) bool {
 18180  	v_1 := v.Args[1]
 18181  	v_0 := v.Args[0]
 18182  	b := v.Block
 18183  	typ := &b.Func.Config.Types
 18184  	// match: (Lsh16x32 <t> x y)
 18185  	// cond: shiftIsBounded(v)
 18186  	// result: (SLL <t> x y)
 18187  	for {
 18188  		t := v.Type
 18189  		x := v_0
 18190  		y := v_1
 18191  		if !(shiftIsBounded(v)) {
 18192  			break
 18193  		}
 18194  		v.reset(OpARM64SLL)
 18195  		v.Type = t
 18196  		v.AddArg2(x, y)
 18197  		return true
 18198  	}
 18199  	// match: (Lsh16x32 <t> x y)
 18200  	// cond: !shiftIsBounded(v)
 18201  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18202  	for {
 18203  		t := v.Type
 18204  		x := v_0
 18205  		y := v_1
 18206  		if !(!shiftIsBounded(v)) {
 18207  			break
 18208  		}
 18209  		v.reset(OpARM64CSEL)
 18210  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18211  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18212  		v0.AddArg2(x, y)
 18213  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18214  		v1.AuxInt = int64ToAuxInt(0)
 18215  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18216  		v2.AuxInt = int64ToAuxInt(64)
 18217  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18218  		v3.AddArg(y)
 18219  		v2.AddArg(v3)
 18220  		v.AddArg3(v0, v1, v2)
 18221  		return true
 18222  	}
 18223  	return false
 18224  }
 18225  func rewriteValueARM64_OpLsh16x64(v *Value) bool {
 18226  	v_1 := v.Args[1]
 18227  	v_0 := v.Args[0]
 18228  	b := v.Block
 18229  	// match: (Lsh16x64 <t> x y)
 18230  	// cond: shiftIsBounded(v)
 18231  	// result: (SLL <t> x y)
 18232  	for {
 18233  		t := v.Type
 18234  		x := v_0
 18235  		y := v_1
 18236  		if !(shiftIsBounded(v)) {
 18237  			break
 18238  		}
 18239  		v.reset(OpARM64SLL)
 18240  		v.Type = t
 18241  		v.AddArg2(x, y)
 18242  		return true
 18243  	}
 18244  	// match: (Lsh16x64 <t> x y)
 18245  	// cond: !shiftIsBounded(v)
 18246  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18247  	for {
 18248  		t := v.Type
 18249  		x := v_0
 18250  		y := v_1
 18251  		if !(!shiftIsBounded(v)) {
 18252  			break
 18253  		}
 18254  		v.reset(OpARM64CSEL)
 18255  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18256  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18257  		v0.AddArg2(x, y)
 18258  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18259  		v1.AuxInt = int64ToAuxInt(0)
 18260  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18261  		v2.AuxInt = int64ToAuxInt(64)
 18262  		v2.AddArg(y)
 18263  		v.AddArg3(v0, v1, v2)
 18264  		return true
 18265  	}
 18266  	return false
 18267  }
 18268  func rewriteValueARM64_OpLsh16x8(v *Value) bool {
 18269  	v_1 := v.Args[1]
 18270  	v_0 := v.Args[0]
 18271  	b := v.Block
 18272  	typ := &b.Func.Config.Types
 18273  	// match: (Lsh16x8 <t> x y)
 18274  	// cond: shiftIsBounded(v)
 18275  	// result: (SLL <t> x y)
 18276  	for {
 18277  		t := v.Type
 18278  		x := v_0
 18279  		y := v_1
 18280  		if !(shiftIsBounded(v)) {
 18281  			break
 18282  		}
 18283  		v.reset(OpARM64SLL)
 18284  		v.Type = t
 18285  		v.AddArg2(x, y)
 18286  		return true
 18287  	}
 18288  	// match: (Lsh16x8 <t> x y)
 18289  	// cond: !shiftIsBounded(v)
 18290  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18291  	for {
 18292  		t := v.Type
 18293  		x := v_0
 18294  		y := v_1
 18295  		if !(!shiftIsBounded(v)) {
 18296  			break
 18297  		}
 18298  		v.reset(OpARM64CSEL)
 18299  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18300  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18301  		v0.AddArg2(x, y)
 18302  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18303  		v1.AuxInt = int64ToAuxInt(0)
 18304  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18305  		v2.AuxInt = int64ToAuxInt(64)
 18306  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18307  		v3.AddArg(y)
 18308  		v2.AddArg(v3)
 18309  		v.AddArg3(v0, v1, v2)
 18310  		return true
 18311  	}
 18312  	return false
 18313  }
 18314  func rewriteValueARM64_OpLsh32x16(v *Value) bool {
 18315  	v_1 := v.Args[1]
 18316  	v_0 := v.Args[0]
 18317  	b := v.Block
 18318  	typ := &b.Func.Config.Types
 18319  	// match: (Lsh32x16 <t> x y)
 18320  	// cond: shiftIsBounded(v)
 18321  	// result: (SLL <t> x y)
 18322  	for {
 18323  		t := v.Type
 18324  		x := v_0
 18325  		y := v_1
 18326  		if !(shiftIsBounded(v)) {
 18327  			break
 18328  		}
 18329  		v.reset(OpARM64SLL)
 18330  		v.Type = t
 18331  		v.AddArg2(x, y)
 18332  		return true
 18333  	}
 18334  	// match: (Lsh32x16 <t> x y)
 18335  	// cond: !shiftIsBounded(v)
 18336  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18337  	for {
 18338  		t := v.Type
 18339  		x := v_0
 18340  		y := v_1
 18341  		if !(!shiftIsBounded(v)) {
 18342  			break
 18343  		}
 18344  		v.reset(OpARM64CSEL)
 18345  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18346  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18347  		v0.AddArg2(x, y)
 18348  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18349  		v1.AuxInt = int64ToAuxInt(0)
 18350  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18351  		v2.AuxInt = int64ToAuxInt(64)
 18352  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18353  		v3.AddArg(y)
 18354  		v2.AddArg(v3)
 18355  		v.AddArg3(v0, v1, v2)
 18356  		return true
 18357  	}
 18358  	return false
 18359  }
 18360  func rewriteValueARM64_OpLsh32x32(v *Value) bool {
 18361  	v_1 := v.Args[1]
 18362  	v_0 := v.Args[0]
 18363  	b := v.Block
 18364  	typ := &b.Func.Config.Types
 18365  	// match: (Lsh32x32 <t> x y)
 18366  	// cond: shiftIsBounded(v)
 18367  	// result: (SLL <t> x y)
 18368  	for {
 18369  		t := v.Type
 18370  		x := v_0
 18371  		y := v_1
 18372  		if !(shiftIsBounded(v)) {
 18373  			break
 18374  		}
 18375  		v.reset(OpARM64SLL)
 18376  		v.Type = t
 18377  		v.AddArg2(x, y)
 18378  		return true
 18379  	}
 18380  	// match: (Lsh32x32 <t> x y)
 18381  	// cond: !shiftIsBounded(v)
 18382  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18383  	for {
 18384  		t := v.Type
 18385  		x := v_0
 18386  		y := v_1
 18387  		if !(!shiftIsBounded(v)) {
 18388  			break
 18389  		}
 18390  		v.reset(OpARM64CSEL)
 18391  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18392  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18393  		v0.AddArg2(x, y)
 18394  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18395  		v1.AuxInt = int64ToAuxInt(0)
 18396  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18397  		v2.AuxInt = int64ToAuxInt(64)
 18398  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18399  		v3.AddArg(y)
 18400  		v2.AddArg(v3)
 18401  		v.AddArg3(v0, v1, v2)
 18402  		return true
 18403  	}
 18404  	return false
 18405  }
 18406  func rewriteValueARM64_OpLsh32x64(v *Value) bool {
 18407  	v_1 := v.Args[1]
 18408  	v_0 := v.Args[0]
 18409  	b := v.Block
 18410  	// match: (Lsh32x64 <t> x y)
 18411  	// cond: shiftIsBounded(v)
 18412  	// result: (SLL <t> x y)
 18413  	for {
 18414  		t := v.Type
 18415  		x := v_0
 18416  		y := v_1
 18417  		if !(shiftIsBounded(v)) {
 18418  			break
 18419  		}
 18420  		v.reset(OpARM64SLL)
 18421  		v.Type = t
 18422  		v.AddArg2(x, y)
 18423  		return true
 18424  	}
 18425  	// match: (Lsh32x64 <t> x y)
 18426  	// cond: !shiftIsBounded(v)
 18427  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18428  	for {
 18429  		t := v.Type
 18430  		x := v_0
 18431  		y := v_1
 18432  		if !(!shiftIsBounded(v)) {
 18433  			break
 18434  		}
 18435  		v.reset(OpARM64CSEL)
 18436  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18437  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18438  		v0.AddArg2(x, y)
 18439  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18440  		v1.AuxInt = int64ToAuxInt(0)
 18441  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18442  		v2.AuxInt = int64ToAuxInt(64)
 18443  		v2.AddArg(y)
 18444  		v.AddArg3(v0, v1, v2)
 18445  		return true
 18446  	}
 18447  	return false
 18448  }
 18449  func rewriteValueARM64_OpLsh32x8(v *Value) bool {
 18450  	v_1 := v.Args[1]
 18451  	v_0 := v.Args[0]
 18452  	b := v.Block
 18453  	typ := &b.Func.Config.Types
 18454  	// match: (Lsh32x8 <t> x y)
 18455  	// cond: shiftIsBounded(v)
 18456  	// result: (SLL <t> x y)
 18457  	for {
 18458  		t := v.Type
 18459  		x := v_0
 18460  		y := v_1
 18461  		if !(shiftIsBounded(v)) {
 18462  			break
 18463  		}
 18464  		v.reset(OpARM64SLL)
 18465  		v.Type = t
 18466  		v.AddArg2(x, y)
 18467  		return true
 18468  	}
 18469  	// match: (Lsh32x8 <t> x y)
 18470  	// cond: !shiftIsBounded(v)
 18471  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18472  	for {
 18473  		t := v.Type
 18474  		x := v_0
 18475  		y := v_1
 18476  		if !(!shiftIsBounded(v)) {
 18477  			break
 18478  		}
 18479  		v.reset(OpARM64CSEL)
 18480  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18481  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18482  		v0.AddArg2(x, y)
 18483  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18484  		v1.AuxInt = int64ToAuxInt(0)
 18485  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18486  		v2.AuxInt = int64ToAuxInt(64)
 18487  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18488  		v3.AddArg(y)
 18489  		v2.AddArg(v3)
 18490  		v.AddArg3(v0, v1, v2)
 18491  		return true
 18492  	}
 18493  	return false
 18494  }
 18495  func rewriteValueARM64_OpLsh64x16(v *Value) bool {
 18496  	v_1 := v.Args[1]
 18497  	v_0 := v.Args[0]
 18498  	b := v.Block
 18499  	typ := &b.Func.Config.Types
 18500  	// match: (Lsh64x16 <t> x y)
 18501  	// cond: shiftIsBounded(v)
 18502  	// result: (SLL <t> x y)
 18503  	for {
 18504  		t := v.Type
 18505  		x := v_0
 18506  		y := v_1
 18507  		if !(shiftIsBounded(v)) {
 18508  			break
 18509  		}
 18510  		v.reset(OpARM64SLL)
 18511  		v.Type = t
 18512  		v.AddArg2(x, y)
 18513  		return true
 18514  	}
 18515  	// match: (Lsh64x16 <t> x y)
 18516  	// cond: !shiftIsBounded(v)
 18517  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18518  	for {
 18519  		t := v.Type
 18520  		x := v_0
 18521  		y := v_1
 18522  		if !(!shiftIsBounded(v)) {
 18523  			break
 18524  		}
 18525  		v.reset(OpARM64CSEL)
 18526  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18527  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18528  		v0.AddArg2(x, y)
 18529  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18530  		v1.AuxInt = int64ToAuxInt(0)
 18531  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18532  		v2.AuxInt = int64ToAuxInt(64)
 18533  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18534  		v3.AddArg(y)
 18535  		v2.AddArg(v3)
 18536  		v.AddArg3(v0, v1, v2)
 18537  		return true
 18538  	}
 18539  	return false
 18540  }
 18541  func rewriteValueARM64_OpLsh64x32(v *Value) bool {
 18542  	v_1 := v.Args[1]
 18543  	v_0 := v.Args[0]
 18544  	b := v.Block
 18545  	typ := &b.Func.Config.Types
 18546  	// match: (Lsh64x32 <t> x y)
 18547  	// cond: shiftIsBounded(v)
 18548  	// result: (SLL <t> x y)
 18549  	for {
 18550  		t := v.Type
 18551  		x := v_0
 18552  		y := v_1
 18553  		if !(shiftIsBounded(v)) {
 18554  			break
 18555  		}
 18556  		v.reset(OpARM64SLL)
 18557  		v.Type = t
 18558  		v.AddArg2(x, y)
 18559  		return true
 18560  	}
 18561  	// match: (Lsh64x32 <t> x y)
 18562  	// cond: !shiftIsBounded(v)
 18563  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18564  	for {
 18565  		t := v.Type
 18566  		x := v_0
 18567  		y := v_1
 18568  		if !(!shiftIsBounded(v)) {
 18569  			break
 18570  		}
 18571  		v.reset(OpARM64CSEL)
 18572  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18573  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18574  		v0.AddArg2(x, y)
 18575  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18576  		v1.AuxInt = int64ToAuxInt(0)
 18577  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18578  		v2.AuxInt = int64ToAuxInt(64)
 18579  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18580  		v3.AddArg(y)
 18581  		v2.AddArg(v3)
 18582  		v.AddArg3(v0, v1, v2)
 18583  		return true
 18584  	}
 18585  	return false
 18586  }
 18587  func rewriteValueARM64_OpLsh64x64(v *Value) bool {
 18588  	v_1 := v.Args[1]
 18589  	v_0 := v.Args[0]
 18590  	b := v.Block
 18591  	// match: (Lsh64x64 <t> x y)
 18592  	// cond: shiftIsBounded(v)
 18593  	// result: (SLL <t> x y)
 18594  	for {
 18595  		t := v.Type
 18596  		x := v_0
 18597  		y := v_1
 18598  		if !(shiftIsBounded(v)) {
 18599  			break
 18600  		}
 18601  		v.reset(OpARM64SLL)
 18602  		v.Type = t
 18603  		v.AddArg2(x, y)
 18604  		return true
 18605  	}
 18606  	// match: (Lsh64x64 <t> x y)
 18607  	// cond: !shiftIsBounded(v)
 18608  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18609  	for {
 18610  		t := v.Type
 18611  		x := v_0
 18612  		y := v_1
 18613  		if !(!shiftIsBounded(v)) {
 18614  			break
 18615  		}
 18616  		v.reset(OpARM64CSEL)
 18617  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18618  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18619  		v0.AddArg2(x, y)
 18620  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18621  		v1.AuxInt = int64ToAuxInt(0)
 18622  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18623  		v2.AuxInt = int64ToAuxInt(64)
 18624  		v2.AddArg(y)
 18625  		v.AddArg3(v0, v1, v2)
 18626  		return true
 18627  	}
 18628  	return false
 18629  }
 18630  func rewriteValueARM64_OpLsh64x8(v *Value) bool {
 18631  	v_1 := v.Args[1]
 18632  	v_0 := v.Args[0]
 18633  	b := v.Block
 18634  	typ := &b.Func.Config.Types
 18635  	// match: (Lsh64x8 <t> x y)
 18636  	// cond: shiftIsBounded(v)
 18637  	// result: (SLL <t> x y)
 18638  	for {
 18639  		t := v.Type
 18640  		x := v_0
 18641  		y := v_1
 18642  		if !(shiftIsBounded(v)) {
 18643  			break
 18644  		}
 18645  		v.reset(OpARM64SLL)
 18646  		v.Type = t
 18647  		v.AddArg2(x, y)
 18648  		return true
 18649  	}
 18650  	// match: (Lsh64x8 <t> x y)
 18651  	// cond: !shiftIsBounded(v)
 18652  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18653  	for {
 18654  		t := v.Type
 18655  		x := v_0
 18656  		y := v_1
 18657  		if !(!shiftIsBounded(v)) {
 18658  			break
 18659  		}
 18660  		v.reset(OpARM64CSEL)
 18661  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18662  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18663  		v0.AddArg2(x, y)
 18664  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18665  		v1.AuxInt = int64ToAuxInt(0)
 18666  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18667  		v2.AuxInt = int64ToAuxInt(64)
 18668  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18669  		v3.AddArg(y)
 18670  		v2.AddArg(v3)
 18671  		v.AddArg3(v0, v1, v2)
 18672  		return true
 18673  	}
 18674  	return false
 18675  }
 18676  func rewriteValueARM64_OpLsh8x16(v *Value) bool {
 18677  	v_1 := v.Args[1]
 18678  	v_0 := v.Args[0]
 18679  	b := v.Block
 18680  	typ := &b.Func.Config.Types
 18681  	// match: (Lsh8x16 <t> x y)
 18682  	// cond: shiftIsBounded(v)
 18683  	// result: (SLL <t> x y)
 18684  	for {
 18685  		t := v.Type
 18686  		x := v_0
 18687  		y := v_1
 18688  		if !(shiftIsBounded(v)) {
 18689  			break
 18690  		}
 18691  		v.reset(OpARM64SLL)
 18692  		v.Type = t
 18693  		v.AddArg2(x, y)
 18694  		return true
 18695  	}
 18696  	// match: (Lsh8x16 <t> x y)
 18697  	// cond: !shiftIsBounded(v)
 18698  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 18699  	for {
 18700  		t := v.Type
 18701  		x := v_0
 18702  		y := v_1
 18703  		if !(!shiftIsBounded(v)) {
 18704  			break
 18705  		}
 18706  		v.reset(OpARM64CSEL)
 18707  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18708  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18709  		v0.AddArg2(x, y)
 18710  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18711  		v1.AuxInt = int64ToAuxInt(0)
 18712  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18713  		v2.AuxInt = int64ToAuxInt(64)
 18714  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 18715  		v3.AddArg(y)
 18716  		v2.AddArg(v3)
 18717  		v.AddArg3(v0, v1, v2)
 18718  		return true
 18719  	}
 18720  	return false
 18721  }
 18722  func rewriteValueARM64_OpLsh8x32(v *Value) bool {
 18723  	v_1 := v.Args[1]
 18724  	v_0 := v.Args[0]
 18725  	b := v.Block
 18726  	typ := &b.Func.Config.Types
 18727  	// match: (Lsh8x32 <t> x y)
 18728  	// cond: shiftIsBounded(v)
 18729  	// result: (SLL <t> x y)
 18730  	for {
 18731  		t := v.Type
 18732  		x := v_0
 18733  		y := v_1
 18734  		if !(shiftIsBounded(v)) {
 18735  			break
 18736  		}
 18737  		v.reset(OpARM64SLL)
 18738  		v.Type = t
 18739  		v.AddArg2(x, y)
 18740  		return true
 18741  	}
 18742  	// match: (Lsh8x32 <t> x y)
 18743  	// cond: !shiftIsBounded(v)
 18744  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 18745  	for {
 18746  		t := v.Type
 18747  		x := v_0
 18748  		y := v_1
 18749  		if !(!shiftIsBounded(v)) {
 18750  			break
 18751  		}
 18752  		v.reset(OpARM64CSEL)
 18753  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18754  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18755  		v0.AddArg2(x, y)
 18756  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18757  		v1.AuxInt = int64ToAuxInt(0)
 18758  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18759  		v2.AuxInt = int64ToAuxInt(64)
 18760  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 18761  		v3.AddArg(y)
 18762  		v2.AddArg(v3)
 18763  		v.AddArg3(v0, v1, v2)
 18764  		return true
 18765  	}
 18766  	return false
 18767  }
 18768  func rewriteValueARM64_OpLsh8x64(v *Value) bool {
 18769  	v_1 := v.Args[1]
 18770  	v_0 := v.Args[0]
 18771  	b := v.Block
 18772  	// match: (Lsh8x64 <t> x y)
 18773  	// cond: shiftIsBounded(v)
 18774  	// result: (SLL <t> x y)
 18775  	for {
 18776  		t := v.Type
 18777  		x := v_0
 18778  		y := v_1
 18779  		if !(shiftIsBounded(v)) {
 18780  			break
 18781  		}
 18782  		v.reset(OpARM64SLL)
 18783  		v.Type = t
 18784  		v.AddArg2(x, y)
 18785  		return true
 18786  	}
 18787  	// match: (Lsh8x64 <t> x y)
 18788  	// cond: !shiftIsBounded(v)
 18789  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 18790  	for {
 18791  		t := v.Type
 18792  		x := v_0
 18793  		y := v_1
 18794  		if !(!shiftIsBounded(v)) {
 18795  			break
 18796  		}
 18797  		v.reset(OpARM64CSEL)
 18798  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18799  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18800  		v0.AddArg2(x, y)
 18801  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18802  		v1.AuxInt = int64ToAuxInt(0)
 18803  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18804  		v2.AuxInt = int64ToAuxInt(64)
 18805  		v2.AddArg(y)
 18806  		v.AddArg3(v0, v1, v2)
 18807  		return true
 18808  	}
 18809  	return false
 18810  }
 18811  func rewriteValueARM64_OpLsh8x8(v *Value) bool {
 18812  	v_1 := v.Args[1]
 18813  	v_0 := v.Args[0]
 18814  	b := v.Block
 18815  	typ := &b.Func.Config.Types
 18816  	// match: (Lsh8x8 <t> x y)
 18817  	// cond: shiftIsBounded(v)
 18818  	// result: (SLL <t> x y)
 18819  	for {
 18820  		t := v.Type
 18821  		x := v_0
 18822  		y := v_1
 18823  		if !(shiftIsBounded(v)) {
 18824  			break
 18825  		}
 18826  		v.reset(OpARM64SLL)
 18827  		v.Type = t
 18828  		v.AddArg2(x, y)
 18829  		return true
 18830  	}
 18831  	// match: (Lsh8x8 <t> x y)
 18832  	// cond: !shiftIsBounded(v)
 18833  	// result: (CSEL [OpARM64LessThanU] (SLL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 18834  	for {
 18835  		t := v.Type
 18836  		x := v_0
 18837  		y := v_1
 18838  		if !(!shiftIsBounded(v)) {
 18839  			break
 18840  		}
 18841  		v.reset(OpARM64CSEL)
 18842  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 18843  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 18844  		v0.AddArg2(x, y)
 18845  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 18846  		v1.AuxInt = int64ToAuxInt(0)
 18847  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 18848  		v2.AuxInt = int64ToAuxInt(64)
 18849  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 18850  		v3.AddArg(y)
 18851  		v2.AddArg(v3)
 18852  		v.AddArg3(v0, v1, v2)
 18853  		return true
 18854  	}
 18855  	return false
 18856  }
 18857  func rewriteValueARM64_OpMod16(v *Value) bool {
 18858  	v_1 := v.Args[1]
 18859  	v_0 := v.Args[0]
 18860  	b := v.Block
 18861  	typ := &b.Func.Config.Types
 18862  	// match: (Mod16 x y)
 18863  	// result: (MODW (SignExt16to32 x) (SignExt16to32 y))
 18864  	for {
 18865  		x := v_0
 18866  		y := v_1
 18867  		v.reset(OpARM64MODW)
 18868  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18869  		v0.AddArg(x)
 18870  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 18871  		v1.AddArg(y)
 18872  		v.AddArg2(v0, v1)
 18873  		return true
 18874  	}
 18875  }
 18876  func rewriteValueARM64_OpMod16u(v *Value) bool {
 18877  	v_1 := v.Args[1]
 18878  	v_0 := v.Args[0]
 18879  	b := v.Block
 18880  	typ := &b.Func.Config.Types
 18881  	// match: (Mod16u x y)
 18882  	// result: (UMODW (ZeroExt16to32 x) (ZeroExt16to32 y))
 18883  	for {
 18884  		x := v_0
 18885  		y := v_1
 18886  		v.reset(OpARM64UMODW)
 18887  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18888  		v0.AddArg(x)
 18889  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 18890  		v1.AddArg(y)
 18891  		v.AddArg2(v0, v1)
 18892  		return true
 18893  	}
 18894  }
 18895  func rewriteValueARM64_OpMod32(v *Value) bool {
 18896  	v_1 := v.Args[1]
 18897  	v_0 := v.Args[0]
 18898  	// match: (Mod32 x y)
 18899  	// result: (MODW x y)
 18900  	for {
 18901  		x := v_0
 18902  		y := v_1
 18903  		v.reset(OpARM64MODW)
 18904  		v.AddArg2(x, y)
 18905  		return true
 18906  	}
 18907  }
 18908  func rewriteValueARM64_OpMod64(v *Value) bool {
 18909  	v_1 := v.Args[1]
 18910  	v_0 := v.Args[0]
 18911  	// match: (Mod64 x y)
 18912  	// result: (MOD x y)
 18913  	for {
 18914  		x := v_0
 18915  		y := v_1
 18916  		v.reset(OpARM64MOD)
 18917  		v.AddArg2(x, y)
 18918  		return true
 18919  	}
 18920  }
 18921  func rewriteValueARM64_OpMod8(v *Value) bool {
 18922  	v_1 := v.Args[1]
 18923  	v_0 := v.Args[0]
 18924  	b := v.Block
 18925  	typ := &b.Func.Config.Types
 18926  	// match: (Mod8 x y)
 18927  	// result: (MODW (SignExt8to32 x) (SignExt8to32 y))
 18928  	for {
 18929  		x := v_0
 18930  		y := v_1
 18931  		v.reset(OpARM64MODW)
 18932  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18933  		v0.AddArg(x)
 18934  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 18935  		v1.AddArg(y)
 18936  		v.AddArg2(v0, v1)
 18937  		return true
 18938  	}
 18939  }
 18940  func rewriteValueARM64_OpMod8u(v *Value) bool {
 18941  	v_1 := v.Args[1]
 18942  	v_0 := v.Args[0]
 18943  	b := v.Block
 18944  	typ := &b.Func.Config.Types
 18945  	// match: (Mod8u x y)
 18946  	// result: (UMODW (ZeroExt8to32 x) (ZeroExt8to32 y))
 18947  	for {
 18948  		x := v_0
 18949  		y := v_1
 18950  		v.reset(OpARM64UMODW)
 18951  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18952  		v0.AddArg(x)
 18953  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 18954  		v1.AddArg(y)
 18955  		v.AddArg2(v0, v1)
 18956  		return true
 18957  	}
 18958  }
 18959  func rewriteValueARM64_OpMove(v *Value) bool {
 18960  	v_2 := v.Args[2]
 18961  	v_1 := v.Args[1]
 18962  	v_0 := v.Args[0]
 18963  	b := v.Block
 18964  	typ := &b.Func.Config.Types
 18965  	// match: (Move [0] _ _ mem)
 18966  	// result: mem
 18967  	for {
 18968  		if auxIntToInt64(v.AuxInt) != 0 {
 18969  			break
 18970  		}
 18971  		mem := v_2
 18972  		v.copyOf(mem)
 18973  		return true
 18974  	}
 18975  	// match: (Move [1] dst src mem)
 18976  	// result: (MOVBstore dst (MOVBUload src mem) mem)
 18977  	for {
 18978  		if auxIntToInt64(v.AuxInt) != 1 {
 18979  			break
 18980  		}
 18981  		dst := v_0
 18982  		src := v_1
 18983  		mem := v_2
 18984  		v.reset(OpARM64MOVBstore)
 18985  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 18986  		v0.AddArg2(src, mem)
 18987  		v.AddArg3(dst, v0, mem)
 18988  		return true
 18989  	}
 18990  	// match: (Move [2] dst src mem)
 18991  	// result: (MOVHstore dst (MOVHUload src mem) mem)
 18992  	for {
 18993  		if auxIntToInt64(v.AuxInt) != 2 {
 18994  			break
 18995  		}
 18996  		dst := v_0
 18997  		src := v_1
 18998  		mem := v_2
 18999  		v.reset(OpARM64MOVHstore)
 19000  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19001  		v0.AddArg2(src, mem)
 19002  		v.AddArg3(dst, v0, mem)
 19003  		return true
 19004  	}
 19005  	// match: (Move [3] dst src mem)
 19006  	// result: (MOVBstore [2] dst (MOVBUload [2] src mem) (MOVHstore dst (MOVHUload src mem) mem))
 19007  	for {
 19008  		if auxIntToInt64(v.AuxInt) != 3 {
 19009  			break
 19010  		}
 19011  		dst := v_0
 19012  		src := v_1
 19013  		mem := v_2
 19014  		v.reset(OpARM64MOVBstore)
 19015  		v.AuxInt = int32ToAuxInt(2)
 19016  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19017  		v0.AuxInt = int32ToAuxInt(2)
 19018  		v0.AddArg2(src, mem)
 19019  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 19020  		v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19021  		v2.AddArg2(src, mem)
 19022  		v1.AddArg3(dst, v2, mem)
 19023  		v.AddArg3(dst, v0, v1)
 19024  		return true
 19025  	}
 19026  	// match: (Move [4] dst src mem)
 19027  	// result: (MOVWstore dst (MOVWUload src mem) mem)
 19028  	for {
 19029  		if auxIntToInt64(v.AuxInt) != 4 {
 19030  			break
 19031  		}
 19032  		dst := v_0
 19033  		src := v_1
 19034  		mem := v_2
 19035  		v.reset(OpARM64MOVWstore)
 19036  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19037  		v0.AddArg2(src, mem)
 19038  		v.AddArg3(dst, v0, mem)
 19039  		return true
 19040  	}
 19041  	// match: (Move [5] dst src mem)
 19042  	// result: (MOVBstore [4] dst (MOVBUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19043  	for {
 19044  		if auxIntToInt64(v.AuxInt) != 5 {
 19045  			break
 19046  		}
 19047  		dst := v_0
 19048  		src := v_1
 19049  		mem := v_2
 19050  		v.reset(OpARM64MOVBstore)
 19051  		v.AuxInt = int32ToAuxInt(4)
 19052  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19053  		v0.AuxInt = int32ToAuxInt(4)
 19054  		v0.AddArg2(src, mem)
 19055  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19056  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19057  		v2.AddArg2(src, mem)
 19058  		v1.AddArg3(dst, v2, mem)
 19059  		v.AddArg3(dst, v0, v1)
 19060  		return true
 19061  	}
 19062  	// match: (Move [6] dst src mem)
 19063  	// result: (MOVHstore [4] dst (MOVHUload [4] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19064  	for {
 19065  		if auxIntToInt64(v.AuxInt) != 6 {
 19066  			break
 19067  		}
 19068  		dst := v_0
 19069  		src := v_1
 19070  		mem := v_2
 19071  		v.reset(OpARM64MOVHstore)
 19072  		v.AuxInt = int32ToAuxInt(4)
 19073  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19074  		v0.AuxInt = int32ToAuxInt(4)
 19075  		v0.AddArg2(src, mem)
 19076  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19077  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19078  		v2.AddArg2(src, mem)
 19079  		v1.AddArg3(dst, v2, mem)
 19080  		v.AddArg3(dst, v0, v1)
 19081  		return true
 19082  	}
 19083  	// match: (Move [7] dst src mem)
 19084  	// result: (MOVWstore [3] dst (MOVWUload [3] src mem) (MOVWstore dst (MOVWUload src mem) mem))
 19085  	for {
 19086  		if auxIntToInt64(v.AuxInt) != 7 {
 19087  			break
 19088  		}
 19089  		dst := v_0
 19090  		src := v_1
 19091  		mem := v_2
 19092  		v.reset(OpARM64MOVWstore)
 19093  		v.AuxInt = int32ToAuxInt(3)
 19094  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19095  		v0.AuxInt = int32ToAuxInt(3)
 19096  		v0.AddArg2(src, mem)
 19097  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 19098  		v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19099  		v2.AddArg2(src, mem)
 19100  		v1.AddArg3(dst, v2, mem)
 19101  		v.AddArg3(dst, v0, v1)
 19102  		return true
 19103  	}
 19104  	// match: (Move [8] dst src mem)
 19105  	// result: (MOVDstore dst (MOVDload src mem) mem)
 19106  	for {
 19107  		if auxIntToInt64(v.AuxInt) != 8 {
 19108  			break
 19109  		}
 19110  		dst := v_0
 19111  		src := v_1
 19112  		mem := v_2
 19113  		v.reset(OpARM64MOVDstore)
 19114  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19115  		v0.AddArg2(src, mem)
 19116  		v.AddArg3(dst, v0, mem)
 19117  		return true
 19118  	}
 19119  	// match: (Move [9] dst src mem)
 19120  	// result: (MOVBstore [8] dst (MOVBUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19121  	for {
 19122  		if auxIntToInt64(v.AuxInt) != 9 {
 19123  			break
 19124  		}
 19125  		dst := v_0
 19126  		src := v_1
 19127  		mem := v_2
 19128  		v.reset(OpARM64MOVBstore)
 19129  		v.AuxInt = int32ToAuxInt(8)
 19130  		v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
 19131  		v0.AuxInt = int32ToAuxInt(8)
 19132  		v0.AddArg2(src, mem)
 19133  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19134  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19135  		v2.AddArg2(src, mem)
 19136  		v1.AddArg3(dst, v2, mem)
 19137  		v.AddArg3(dst, v0, v1)
 19138  		return true
 19139  	}
 19140  	// match: (Move [10] dst src mem)
 19141  	// result: (MOVHstore [8] dst (MOVHUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19142  	for {
 19143  		if auxIntToInt64(v.AuxInt) != 10 {
 19144  			break
 19145  		}
 19146  		dst := v_0
 19147  		src := v_1
 19148  		mem := v_2
 19149  		v.reset(OpARM64MOVHstore)
 19150  		v.AuxInt = int32ToAuxInt(8)
 19151  		v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
 19152  		v0.AuxInt = int32ToAuxInt(8)
 19153  		v0.AddArg2(src, mem)
 19154  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19155  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19156  		v2.AddArg2(src, mem)
 19157  		v1.AddArg3(dst, v2, mem)
 19158  		v.AddArg3(dst, v0, v1)
 19159  		return true
 19160  	}
 19161  	// match: (Move [11] dst src mem)
 19162  	// result: (MOVDstore [3] dst (MOVDload [3] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19163  	for {
 19164  		if auxIntToInt64(v.AuxInt) != 11 {
 19165  			break
 19166  		}
 19167  		dst := v_0
 19168  		src := v_1
 19169  		mem := v_2
 19170  		v.reset(OpARM64MOVDstore)
 19171  		v.AuxInt = int32ToAuxInt(3)
 19172  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19173  		v0.AuxInt = int32ToAuxInt(3)
 19174  		v0.AddArg2(src, mem)
 19175  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19176  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19177  		v2.AddArg2(src, mem)
 19178  		v1.AddArg3(dst, v2, mem)
 19179  		v.AddArg3(dst, v0, v1)
 19180  		return true
 19181  	}
 19182  	// match: (Move [12] dst src mem)
 19183  	// result: (MOVWstore [8] dst (MOVWUload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19184  	for {
 19185  		if auxIntToInt64(v.AuxInt) != 12 {
 19186  			break
 19187  		}
 19188  		dst := v_0
 19189  		src := v_1
 19190  		mem := v_2
 19191  		v.reset(OpARM64MOVWstore)
 19192  		v.AuxInt = int32ToAuxInt(8)
 19193  		v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
 19194  		v0.AuxInt = int32ToAuxInt(8)
 19195  		v0.AddArg2(src, mem)
 19196  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19197  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19198  		v2.AddArg2(src, mem)
 19199  		v1.AddArg3(dst, v2, mem)
 19200  		v.AddArg3(dst, v0, v1)
 19201  		return true
 19202  	}
 19203  	// match: (Move [13] dst src mem)
 19204  	// result: (MOVDstore [5] dst (MOVDload [5] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19205  	for {
 19206  		if auxIntToInt64(v.AuxInt) != 13 {
 19207  			break
 19208  		}
 19209  		dst := v_0
 19210  		src := v_1
 19211  		mem := v_2
 19212  		v.reset(OpARM64MOVDstore)
 19213  		v.AuxInt = int32ToAuxInt(5)
 19214  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19215  		v0.AuxInt = int32ToAuxInt(5)
 19216  		v0.AddArg2(src, mem)
 19217  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19218  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19219  		v2.AddArg2(src, mem)
 19220  		v1.AddArg3(dst, v2, mem)
 19221  		v.AddArg3(dst, v0, v1)
 19222  		return true
 19223  	}
 19224  	// match: (Move [14] dst src mem)
 19225  	// result: (MOVDstore [6] dst (MOVDload [6] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19226  	for {
 19227  		if auxIntToInt64(v.AuxInt) != 14 {
 19228  			break
 19229  		}
 19230  		dst := v_0
 19231  		src := v_1
 19232  		mem := v_2
 19233  		v.reset(OpARM64MOVDstore)
 19234  		v.AuxInt = int32ToAuxInt(6)
 19235  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19236  		v0.AuxInt = int32ToAuxInt(6)
 19237  		v0.AddArg2(src, mem)
 19238  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19239  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19240  		v2.AddArg2(src, mem)
 19241  		v1.AddArg3(dst, v2, mem)
 19242  		v.AddArg3(dst, v0, v1)
 19243  		return true
 19244  	}
 19245  	// match: (Move [15] dst src mem)
 19246  	// result: (MOVDstore [7] dst (MOVDload [7] src mem) (MOVDstore dst (MOVDload src mem) mem))
 19247  	for {
 19248  		if auxIntToInt64(v.AuxInt) != 15 {
 19249  			break
 19250  		}
 19251  		dst := v_0
 19252  		src := v_1
 19253  		mem := v_2
 19254  		v.reset(OpARM64MOVDstore)
 19255  		v.AuxInt = int32ToAuxInt(7)
 19256  		v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19257  		v0.AuxInt = int32ToAuxInt(7)
 19258  		v0.AddArg2(src, mem)
 19259  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 19260  		v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
 19261  		v2.AddArg2(src, mem)
 19262  		v1.AddArg3(dst, v2, mem)
 19263  		v.AddArg3(dst, v0, v1)
 19264  		return true
 19265  	}
 19266  	// match: (Move [16] dst src mem)
 19267  	// result: (STP dst (Select0 <typ.UInt64> (LDP src mem)) (Select1 <typ.UInt64> (LDP src mem)) mem)
 19268  	for {
 19269  		if auxIntToInt64(v.AuxInt) != 16 {
 19270  			break
 19271  		}
 19272  		dst := v_0
 19273  		src := v_1
 19274  		mem := v_2
 19275  		v.reset(OpARM64STP)
 19276  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19277  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19278  		v1.AddArg2(src, mem)
 19279  		v0.AddArg(v1)
 19280  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19281  		v2.AddArg(v1)
 19282  		v.AddArg4(dst, v0, v2, mem)
 19283  		return true
 19284  	}
 19285  	// match: (Move [32] dst src mem)
 19286  	// 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))
 19287  	for {
 19288  		if auxIntToInt64(v.AuxInt) != 32 {
 19289  			break
 19290  		}
 19291  		dst := v_0
 19292  		src := v_1
 19293  		mem := v_2
 19294  		v.reset(OpARM64STP)
 19295  		v.AuxInt = int32ToAuxInt(16)
 19296  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19297  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19298  		v1.AuxInt = int32ToAuxInt(16)
 19299  		v1.AddArg2(src, mem)
 19300  		v0.AddArg(v1)
 19301  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19302  		v2.AddArg(v1)
 19303  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19304  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19305  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19306  		v5.AddArg2(src, mem)
 19307  		v4.AddArg(v5)
 19308  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19309  		v6.AddArg(v5)
 19310  		v3.AddArg4(dst, v4, v6, mem)
 19311  		v.AddArg4(dst, v0, v2, v3)
 19312  		return true
 19313  	}
 19314  	// match: (Move [48] dst src mem)
 19315  	// 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)))
 19316  	for {
 19317  		if auxIntToInt64(v.AuxInt) != 48 {
 19318  			break
 19319  		}
 19320  		dst := v_0
 19321  		src := v_1
 19322  		mem := v_2
 19323  		v.reset(OpARM64STP)
 19324  		v.AuxInt = int32ToAuxInt(32)
 19325  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19326  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19327  		v1.AuxInt = int32ToAuxInt(32)
 19328  		v1.AddArg2(src, mem)
 19329  		v0.AddArg(v1)
 19330  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19331  		v2.AddArg(v1)
 19332  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19333  		v3.AuxInt = int32ToAuxInt(16)
 19334  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19335  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19336  		v5.AuxInt = int32ToAuxInt(16)
 19337  		v5.AddArg2(src, mem)
 19338  		v4.AddArg(v5)
 19339  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19340  		v6.AddArg(v5)
 19341  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19342  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19343  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19344  		v9.AddArg2(src, mem)
 19345  		v8.AddArg(v9)
 19346  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19347  		v10.AddArg(v9)
 19348  		v7.AddArg4(dst, v8, v10, mem)
 19349  		v3.AddArg4(dst, v4, v6, v7)
 19350  		v.AddArg4(dst, v0, v2, v3)
 19351  		return true
 19352  	}
 19353  	// match: (Move [64] dst src mem)
 19354  	// 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))))
 19355  	for {
 19356  		if auxIntToInt64(v.AuxInt) != 64 {
 19357  			break
 19358  		}
 19359  		dst := v_0
 19360  		src := v_1
 19361  		mem := v_2
 19362  		v.reset(OpARM64STP)
 19363  		v.AuxInt = int32ToAuxInt(48)
 19364  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19365  		v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19366  		v1.AuxInt = int32ToAuxInt(48)
 19367  		v1.AddArg2(src, mem)
 19368  		v0.AddArg(v1)
 19369  		v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19370  		v2.AddArg(v1)
 19371  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19372  		v3.AuxInt = int32ToAuxInt(32)
 19373  		v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19374  		v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19375  		v5.AuxInt = int32ToAuxInt(32)
 19376  		v5.AddArg2(src, mem)
 19377  		v4.AddArg(v5)
 19378  		v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19379  		v6.AddArg(v5)
 19380  		v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19381  		v7.AuxInt = int32ToAuxInt(16)
 19382  		v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19383  		v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19384  		v9.AuxInt = int32ToAuxInt(16)
 19385  		v9.AddArg2(src, mem)
 19386  		v8.AddArg(v9)
 19387  		v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19388  		v10.AddArg(v9)
 19389  		v11 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 19390  		v12 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 19391  		v13 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
 19392  		v13.AddArg2(src, mem)
 19393  		v12.AddArg(v13)
 19394  		v14 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
 19395  		v14.AddArg(v13)
 19396  		v11.AddArg4(dst, v12, v14, mem)
 19397  		v7.AddArg4(dst, v8, v10, v11)
 19398  		v3.AddArg4(dst, v4, v6, v7)
 19399  		v.AddArg4(dst, v0, v2, v3)
 19400  		return true
 19401  	}
 19402  	// match: (Move [s] dst src mem)
 19403  	// cond: s%16 != 0 && s%16 <= 8 && s > 16
 19404  	// result: (Move [8] (OffPtr <dst.Type> dst [s-8]) (OffPtr <src.Type> src [s-8]) (Move [s-s%16] dst src mem))
 19405  	for {
 19406  		s := auxIntToInt64(v.AuxInt)
 19407  		dst := v_0
 19408  		src := v_1
 19409  		mem := v_2
 19410  		if !(s%16 != 0 && s%16 <= 8 && s > 16) {
 19411  			break
 19412  		}
 19413  		v.reset(OpMove)
 19414  		v.AuxInt = int64ToAuxInt(8)
 19415  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 19416  		v0.AuxInt = int64ToAuxInt(s - 8)
 19417  		v0.AddArg(dst)
 19418  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 19419  		v1.AuxInt = int64ToAuxInt(s - 8)
 19420  		v1.AddArg(src)
 19421  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 19422  		v2.AuxInt = int64ToAuxInt(s - s%16)
 19423  		v2.AddArg3(dst, src, mem)
 19424  		v.AddArg3(v0, v1, v2)
 19425  		return true
 19426  	}
 19427  	// match: (Move [s] dst src mem)
 19428  	// cond: s%16 != 0 && s%16 > 8 && s > 16
 19429  	// result: (Move [16] (OffPtr <dst.Type> dst [s-16]) (OffPtr <src.Type> src [s-16]) (Move [s-s%16] dst src mem))
 19430  	for {
 19431  		s := auxIntToInt64(v.AuxInt)
 19432  		dst := v_0
 19433  		src := v_1
 19434  		mem := v_2
 19435  		if !(s%16 != 0 && s%16 > 8 && s > 16) {
 19436  			break
 19437  		}
 19438  		v.reset(OpMove)
 19439  		v.AuxInt = int64ToAuxInt(16)
 19440  		v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
 19441  		v0.AuxInt = int64ToAuxInt(s - 16)
 19442  		v0.AddArg(dst)
 19443  		v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
 19444  		v1.AuxInt = int64ToAuxInt(s - 16)
 19445  		v1.AddArg(src)
 19446  		v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
 19447  		v2.AuxInt = int64ToAuxInt(s - s%16)
 19448  		v2.AddArg3(dst, src, mem)
 19449  		v.AddArg3(v0, v1, v2)
 19450  		return true
 19451  	}
 19452  	// match: (Move [s] dst src mem)
 19453  	// cond: s > 64 && s <= 16*64 && s%16 == 0 && logLargeCopy(v, s)
 19454  	// result: (DUFFCOPY [8 * (64 - s/16)] dst src mem)
 19455  	for {
 19456  		s := auxIntToInt64(v.AuxInt)
 19457  		dst := v_0
 19458  		src := v_1
 19459  		mem := v_2
 19460  		if !(s > 64 && s <= 16*64 && s%16 == 0 && logLargeCopy(v, s)) {
 19461  			break
 19462  		}
 19463  		v.reset(OpARM64DUFFCOPY)
 19464  		v.AuxInt = int64ToAuxInt(8 * (64 - s/16))
 19465  		v.AddArg3(dst, src, mem)
 19466  		return true
 19467  	}
 19468  	// match: (Move [s] dst src mem)
 19469  	// cond: s%16 == 0 && s > 16*64 && logLargeCopy(v, s)
 19470  	// result: (LoweredMove dst src (ADDconst <src.Type> src [s-16]) mem)
 19471  	for {
 19472  		s := auxIntToInt64(v.AuxInt)
 19473  		dst := v_0
 19474  		src := v_1
 19475  		mem := v_2
 19476  		if !(s%16 == 0 && s > 16*64 && logLargeCopy(v, s)) {
 19477  			break
 19478  		}
 19479  		v.reset(OpARM64LoweredMove)
 19480  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, src.Type)
 19481  		v0.AuxInt = int64ToAuxInt(s - 16)
 19482  		v0.AddArg(src)
 19483  		v.AddArg4(dst, src, v0, mem)
 19484  		return true
 19485  	}
 19486  	return false
 19487  }
 19488  func rewriteValueARM64_OpNeq16(v *Value) bool {
 19489  	v_1 := v.Args[1]
 19490  	v_0 := v.Args[0]
 19491  	b := v.Block
 19492  	typ := &b.Func.Config.Types
 19493  	// match: (Neq16 x y)
 19494  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
 19495  	for {
 19496  		x := v_0
 19497  		y := v_1
 19498  		v.reset(OpARM64NotEqual)
 19499  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19500  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19501  		v1.AddArg(x)
 19502  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19503  		v2.AddArg(y)
 19504  		v0.AddArg2(v1, v2)
 19505  		v.AddArg(v0)
 19506  		return true
 19507  	}
 19508  }
 19509  func rewriteValueARM64_OpNeq32(v *Value) bool {
 19510  	v_1 := v.Args[1]
 19511  	v_0 := v.Args[0]
 19512  	b := v.Block
 19513  	// match: (Neq32 x y)
 19514  	// result: (NotEqual (CMPW x y))
 19515  	for {
 19516  		x := v_0
 19517  		y := v_1
 19518  		v.reset(OpARM64NotEqual)
 19519  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19520  		v0.AddArg2(x, y)
 19521  		v.AddArg(v0)
 19522  		return true
 19523  	}
 19524  }
 19525  func rewriteValueARM64_OpNeq32F(v *Value) bool {
 19526  	v_1 := v.Args[1]
 19527  	v_0 := v.Args[0]
 19528  	b := v.Block
 19529  	// match: (Neq32F x y)
 19530  	// result: (NotEqual (FCMPS x y))
 19531  	for {
 19532  		x := v_0
 19533  		y := v_1
 19534  		v.reset(OpARM64NotEqual)
 19535  		v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
 19536  		v0.AddArg2(x, y)
 19537  		v.AddArg(v0)
 19538  		return true
 19539  	}
 19540  }
 19541  func rewriteValueARM64_OpNeq64(v *Value) bool {
 19542  	v_1 := v.Args[1]
 19543  	v_0 := v.Args[0]
 19544  	b := v.Block
 19545  	// match: (Neq64 x y)
 19546  	// result: (NotEqual (CMP x y))
 19547  	for {
 19548  		x := v_0
 19549  		y := v_1
 19550  		v.reset(OpARM64NotEqual)
 19551  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19552  		v0.AddArg2(x, y)
 19553  		v.AddArg(v0)
 19554  		return true
 19555  	}
 19556  }
 19557  func rewriteValueARM64_OpNeq64F(v *Value) bool {
 19558  	v_1 := v.Args[1]
 19559  	v_0 := v.Args[0]
 19560  	b := v.Block
 19561  	// match: (Neq64F x y)
 19562  	// result: (NotEqual (FCMPD x y))
 19563  	for {
 19564  		x := v_0
 19565  		y := v_1
 19566  		v.reset(OpARM64NotEqual)
 19567  		v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
 19568  		v0.AddArg2(x, y)
 19569  		v.AddArg(v0)
 19570  		return true
 19571  	}
 19572  }
 19573  func rewriteValueARM64_OpNeq8(v *Value) bool {
 19574  	v_1 := v.Args[1]
 19575  	v_0 := v.Args[0]
 19576  	b := v.Block
 19577  	typ := &b.Func.Config.Types
 19578  	// match: (Neq8 x y)
 19579  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
 19580  	for {
 19581  		x := v_0
 19582  		y := v_1
 19583  		v.reset(OpARM64NotEqual)
 19584  		v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
 19585  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19586  		v1.AddArg(x)
 19587  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 19588  		v2.AddArg(y)
 19589  		v0.AddArg2(v1, v2)
 19590  		v.AddArg(v0)
 19591  		return true
 19592  	}
 19593  }
 19594  func rewriteValueARM64_OpNeqPtr(v *Value) bool {
 19595  	v_1 := v.Args[1]
 19596  	v_0 := v.Args[0]
 19597  	b := v.Block
 19598  	// match: (NeqPtr x y)
 19599  	// result: (NotEqual (CMP x y))
 19600  	for {
 19601  		x := v_0
 19602  		y := v_1
 19603  		v.reset(OpARM64NotEqual)
 19604  		v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
 19605  		v0.AddArg2(x, y)
 19606  		v.AddArg(v0)
 19607  		return true
 19608  	}
 19609  }
 19610  func rewriteValueARM64_OpNot(v *Value) bool {
 19611  	v_0 := v.Args[0]
 19612  	b := v.Block
 19613  	typ := &b.Func.Config.Types
 19614  	// match: (Not x)
 19615  	// result: (XOR (MOVDconst [1]) x)
 19616  	for {
 19617  		x := v_0
 19618  		v.reset(OpARM64XOR)
 19619  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19620  		v0.AuxInt = int64ToAuxInt(1)
 19621  		v.AddArg2(v0, x)
 19622  		return true
 19623  	}
 19624  }
 19625  func rewriteValueARM64_OpOffPtr(v *Value) bool {
 19626  	v_0 := v.Args[0]
 19627  	// match: (OffPtr [off] ptr:(SP))
 19628  	// cond: is32Bit(off)
 19629  	// result: (MOVDaddr [int32(off)] ptr)
 19630  	for {
 19631  		off := auxIntToInt64(v.AuxInt)
 19632  		ptr := v_0
 19633  		if ptr.Op != OpSP || !(is32Bit(off)) {
 19634  			break
 19635  		}
 19636  		v.reset(OpARM64MOVDaddr)
 19637  		v.AuxInt = int32ToAuxInt(int32(off))
 19638  		v.AddArg(ptr)
 19639  		return true
 19640  	}
 19641  	// match: (OffPtr [off] ptr)
 19642  	// result: (ADDconst [off] ptr)
 19643  	for {
 19644  		off := auxIntToInt64(v.AuxInt)
 19645  		ptr := v_0
 19646  		v.reset(OpARM64ADDconst)
 19647  		v.AuxInt = int64ToAuxInt(off)
 19648  		v.AddArg(ptr)
 19649  		return true
 19650  	}
 19651  }
 19652  func rewriteValueARM64_OpPanicBounds(v *Value) bool {
 19653  	v_2 := v.Args[2]
 19654  	v_1 := v.Args[1]
 19655  	v_0 := v.Args[0]
 19656  	// match: (PanicBounds [kind] x y mem)
 19657  	// cond: boundsABI(kind) == 0
 19658  	// result: (LoweredPanicBoundsA [kind] x y mem)
 19659  	for {
 19660  		kind := auxIntToInt64(v.AuxInt)
 19661  		x := v_0
 19662  		y := v_1
 19663  		mem := v_2
 19664  		if !(boundsABI(kind) == 0) {
 19665  			break
 19666  		}
 19667  		v.reset(OpARM64LoweredPanicBoundsA)
 19668  		v.AuxInt = int64ToAuxInt(kind)
 19669  		v.AddArg3(x, y, mem)
 19670  		return true
 19671  	}
 19672  	// match: (PanicBounds [kind] x y mem)
 19673  	// cond: boundsABI(kind) == 1
 19674  	// result: (LoweredPanicBoundsB [kind] x y mem)
 19675  	for {
 19676  		kind := auxIntToInt64(v.AuxInt)
 19677  		x := v_0
 19678  		y := v_1
 19679  		mem := v_2
 19680  		if !(boundsABI(kind) == 1) {
 19681  			break
 19682  		}
 19683  		v.reset(OpARM64LoweredPanicBoundsB)
 19684  		v.AuxInt = int64ToAuxInt(kind)
 19685  		v.AddArg3(x, y, mem)
 19686  		return true
 19687  	}
 19688  	// match: (PanicBounds [kind] x y mem)
 19689  	// cond: boundsABI(kind) == 2
 19690  	// result: (LoweredPanicBoundsC [kind] x y mem)
 19691  	for {
 19692  		kind := auxIntToInt64(v.AuxInt)
 19693  		x := v_0
 19694  		y := v_1
 19695  		mem := v_2
 19696  		if !(boundsABI(kind) == 2) {
 19697  			break
 19698  		}
 19699  		v.reset(OpARM64LoweredPanicBoundsC)
 19700  		v.AuxInt = int64ToAuxInt(kind)
 19701  		v.AddArg3(x, y, mem)
 19702  		return true
 19703  	}
 19704  	return false
 19705  }
 19706  func rewriteValueARM64_OpPopCount16(v *Value) bool {
 19707  	v_0 := v.Args[0]
 19708  	b := v.Block
 19709  	typ := &b.Func.Config.Types
 19710  	// match: (PopCount16 <t> x)
 19711  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt16to64 x)))))
 19712  	for {
 19713  		t := v.Type
 19714  		x := v_0
 19715  		v.reset(OpARM64FMOVDfpgp)
 19716  		v.Type = t
 19717  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 19718  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 19719  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 19720  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19721  		v3.AddArg(x)
 19722  		v2.AddArg(v3)
 19723  		v1.AddArg(v2)
 19724  		v0.AddArg(v1)
 19725  		v.AddArg(v0)
 19726  		return true
 19727  	}
 19728  }
 19729  func rewriteValueARM64_OpPopCount32(v *Value) bool {
 19730  	v_0 := v.Args[0]
 19731  	b := v.Block
 19732  	typ := &b.Func.Config.Types
 19733  	// match: (PopCount32 <t> x)
 19734  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> (ZeroExt32to64 x)))))
 19735  	for {
 19736  		t := v.Type
 19737  		x := v_0
 19738  		v.reset(OpARM64FMOVDfpgp)
 19739  		v.Type = t
 19740  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 19741  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 19742  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 19743  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 19744  		v3.AddArg(x)
 19745  		v2.AddArg(v3)
 19746  		v1.AddArg(v2)
 19747  		v0.AddArg(v1)
 19748  		v.AddArg(v0)
 19749  		return true
 19750  	}
 19751  }
 19752  func rewriteValueARM64_OpPopCount64(v *Value) bool {
 19753  	v_0 := v.Args[0]
 19754  	b := v.Block
 19755  	typ := &b.Func.Config.Types
 19756  	// match: (PopCount64 <t> x)
 19757  	// result: (FMOVDfpgp <t> (VUADDLV <typ.Float64> (VCNT <typ.Float64> (FMOVDgpfp <typ.Float64> x))))
 19758  	for {
 19759  		t := v.Type
 19760  		x := v_0
 19761  		v.reset(OpARM64FMOVDfpgp)
 19762  		v.Type = t
 19763  		v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
 19764  		v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
 19765  		v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
 19766  		v2.AddArg(x)
 19767  		v1.AddArg(v2)
 19768  		v0.AddArg(v1)
 19769  		v.AddArg(v0)
 19770  		return true
 19771  	}
 19772  }
 19773  func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
 19774  	v_1 := v.Args[1]
 19775  	v_0 := v.Args[0]
 19776  	// match: (PrefetchCache addr mem)
 19777  	// result: (PRFM [0] addr mem)
 19778  	for {
 19779  		addr := v_0
 19780  		mem := v_1
 19781  		v.reset(OpARM64PRFM)
 19782  		v.AuxInt = int64ToAuxInt(0)
 19783  		v.AddArg2(addr, mem)
 19784  		return true
 19785  	}
 19786  }
 19787  func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
 19788  	v_1 := v.Args[1]
 19789  	v_0 := v.Args[0]
 19790  	// match: (PrefetchCacheStreamed addr mem)
 19791  	// result: (PRFM [1] addr mem)
 19792  	for {
 19793  		addr := v_0
 19794  		mem := v_1
 19795  		v.reset(OpARM64PRFM)
 19796  		v.AuxInt = int64ToAuxInt(1)
 19797  		v.AddArg2(addr, mem)
 19798  		return true
 19799  	}
 19800  }
 19801  func rewriteValueARM64_OpPubBarrier(v *Value) bool {
 19802  	v_0 := v.Args[0]
 19803  	// match: (PubBarrier mem)
 19804  	// result: (DMB [0xe] mem)
 19805  	for {
 19806  		mem := v_0
 19807  		v.reset(OpARM64DMB)
 19808  		v.AuxInt = int64ToAuxInt(0xe)
 19809  		v.AddArg(mem)
 19810  		return true
 19811  	}
 19812  }
 19813  func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
 19814  	v_1 := v.Args[1]
 19815  	v_0 := v.Args[0]
 19816  	b := v.Block
 19817  	typ := &b.Func.Config.Types
 19818  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 19819  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 19820  	for {
 19821  		t := v.Type
 19822  		x := v_0
 19823  		if v_1.Op != OpARM64MOVDconst {
 19824  			break
 19825  		}
 19826  		c := auxIntToInt64(v_1.AuxInt)
 19827  		v.reset(OpOr16)
 19828  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 19829  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19830  		v1.AuxInt = int64ToAuxInt(c & 15)
 19831  		v0.AddArg2(x, v1)
 19832  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 19833  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19834  		v3.AuxInt = int64ToAuxInt(-c & 15)
 19835  		v2.AddArg2(x, v3)
 19836  		v.AddArg2(v0, v2)
 19837  		return true
 19838  	}
 19839  	// match: (RotateLeft16 <t> x y)
 19840  	// result: (RORW <t> (ORshiftLL <typ.UInt32> (ZeroExt16to32 x) (ZeroExt16to32 x) [16]) (NEG <typ.Int64> y))
 19841  	for {
 19842  		t := v.Type
 19843  		x := v_0
 19844  		y := v_1
 19845  		v.reset(OpARM64RORW)
 19846  		v.Type = t
 19847  		v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
 19848  		v0.AuxInt = int64ToAuxInt(16)
 19849  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 19850  		v1.AddArg(x)
 19851  		v0.AddArg2(v1, v1)
 19852  		v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 19853  		v2.AddArg(y)
 19854  		v.AddArg2(v0, v2)
 19855  		return true
 19856  	}
 19857  }
 19858  func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
 19859  	v_1 := v.Args[1]
 19860  	v_0 := v.Args[0]
 19861  	b := v.Block
 19862  	// match: (RotateLeft32 x y)
 19863  	// result: (RORW x (NEG <y.Type> y))
 19864  	for {
 19865  		x := v_0
 19866  		y := v_1
 19867  		v.reset(OpARM64RORW)
 19868  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 19869  		v0.AddArg(y)
 19870  		v.AddArg2(x, v0)
 19871  		return true
 19872  	}
 19873  }
 19874  func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
 19875  	v_1 := v.Args[1]
 19876  	v_0 := v.Args[0]
 19877  	b := v.Block
 19878  	// match: (RotateLeft64 x y)
 19879  	// result: (ROR x (NEG <y.Type> y))
 19880  	for {
 19881  		x := v_0
 19882  		y := v_1
 19883  		v.reset(OpARM64ROR)
 19884  		v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
 19885  		v0.AddArg(y)
 19886  		v.AddArg2(x, v0)
 19887  		return true
 19888  	}
 19889  }
 19890  func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
 19891  	v_1 := v.Args[1]
 19892  	v_0 := v.Args[0]
 19893  	b := v.Block
 19894  	typ := &b.Func.Config.Types
 19895  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 19896  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 19897  	for {
 19898  		t := v.Type
 19899  		x := v_0
 19900  		if v_1.Op != OpARM64MOVDconst {
 19901  			break
 19902  		}
 19903  		c := auxIntToInt64(v_1.AuxInt)
 19904  		v.reset(OpOr8)
 19905  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 19906  		v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19907  		v1.AuxInt = int64ToAuxInt(c & 7)
 19908  		v0.AddArg2(x, v1)
 19909  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 19910  		v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 19911  		v3.AuxInt = int64ToAuxInt(-c & 7)
 19912  		v2.AddArg2(x, v3)
 19913  		v.AddArg2(v0, v2)
 19914  		return true
 19915  	}
 19916  	// match: (RotateLeft8 <t> x y)
 19917  	// result: (OR <t> (SLL <t> x (ANDconst <typ.Int64> [7] y)) (SRL <t> (ZeroExt8to64 x) (ANDconst <typ.Int64> [7] (NEG <typ.Int64> y))))
 19918  	for {
 19919  		t := v.Type
 19920  		x := v_0
 19921  		y := v_1
 19922  		v.reset(OpARM64OR)
 19923  		v.Type = t
 19924  		v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
 19925  		v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 19926  		v1.AuxInt = int64ToAuxInt(7)
 19927  		v1.AddArg(y)
 19928  		v0.AddArg2(x, v1)
 19929  		v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
 19930  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 19931  		v3.AddArg(x)
 19932  		v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
 19933  		v4.AuxInt = int64ToAuxInt(7)
 19934  		v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
 19935  		v5.AddArg(y)
 19936  		v4.AddArg(v5)
 19937  		v2.AddArg2(v3, v4)
 19938  		v.AddArg2(v0, v2)
 19939  		return true
 19940  	}
 19941  }
 19942  func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
 19943  	v_1 := v.Args[1]
 19944  	v_0 := v.Args[0]
 19945  	b := v.Block
 19946  	typ := &b.Func.Config.Types
 19947  	// match: (Rsh16Ux16 <t> x y)
 19948  	// cond: shiftIsBounded(v)
 19949  	// result: (SRL <t> (ZeroExt16to64 x) y)
 19950  	for {
 19951  		t := v.Type
 19952  		x := v_0
 19953  		y := v_1
 19954  		if !(shiftIsBounded(v)) {
 19955  			break
 19956  		}
 19957  		v.reset(OpARM64SRL)
 19958  		v.Type = t
 19959  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19960  		v0.AddArg(x)
 19961  		v.AddArg2(v0, y)
 19962  		return true
 19963  	}
 19964  	// match: (Rsh16Ux16 <t> x y)
 19965  	// cond: !shiftIsBounded(v)
 19966  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 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(OpARM64CSEL)
 19975  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 19976  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 19977  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19978  		v1.AddArg(x)
 19979  		v0.AddArg2(v1, y)
 19980  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 19981  		v2.AuxInt = int64ToAuxInt(0)
 19982  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 19983  		v3.AuxInt = int64ToAuxInt(64)
 19984  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 19985  		v4.AddArg(y)
 19986  		v3.AddArg(v4)
 19987  		v.AddArg3(v0, v2, v3)
 19988  		return true
 19989  	}
 19990  	return false
 19991  }
 19992  func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
 19993  	v_1 := v.Args[1]
 19994  	v_0 := v.Args[0]
 19995  	b := v.Block
 19996  	typ := &b.Func.Config.Types
 19997  	// match: (Rsh16Ux32 <t> x y)
 19998  	// cond: shiftIsBounded(v)
 19999  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20000  	for {
 20001  		t := v.Type
 20002  		x := v_0
 20003  		y := v_1
 20004  		if !(shiftIsBounded(v)) {
 20005  			break
 20006  		}
 20007  		v.reset(OpARM64SRL)
 20008  		v.Type = t
 20009  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20010  		v0.AddArg(x)
 20011  		v.AddArg2(v0, y)
 20012  		return true
 20013  	}
 20014  	// match: (Rsh16Ux32 <t> x y)
 20015  	// cond: !shiftIsBounded(v)
 20016  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20017  	for {
 20018  		t := v.Type
 20019  		x := v_0
 20020  		y := v_1
 20021  		if !(!shiftIsBounded(v)) {
 20022  			break
 20023  		}
 20024  		v.reset(OpARM64CSEL)
 20025  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20026  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20027  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20028  		v1.AddArg(x)
 20029  		v0.AddArg2(v1, y)
 20030  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20031  		v2.AuxInt = int64ToAuxInt(0)
 20032  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20033  		v3.AuxInt = int64ToAuxInt(64)
 20034  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20035  		v4.AddArg(y)
 20036  		v3.AddArg(v4)
 20037  		v.AddArg3(v0, v2, v3)
 20038  		return true
 20039  	}
 20040  	return false
 20041  }
 20042  func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
 20043  	v_1 := v.Args[1]
 20044  	v_0 := v.Args[0]
 20045  	b := v.Block
 20046  	typ := &b.Func.Config.Types
 20047  	// match: (Rsh16Ux64 <t> x y)
 20048  	// cond: shiftIsBounded(v)
 20049  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20050  	for {
 20051  		t := v.Type
 20052  		x := v_0
 20053  		y := v_1
 20054  		if !(shiftIsBounded(v)) {
 20055  			break
 20056  		}
 20057  		v.reset(OpARM64SRL)
 20058  		v.Type = t
 20059  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20060  		v0.AddArg(x)
 20061  		v.AddArg2(v0, y)
 20062  		return true
 20063  	}
 20064  	// match: (Rsh16Ux64 <t> x y)
 20065  	// cond: !shiftIsBounded(v)
 20066  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 20067  	for {
 20068  		t := v.Type
 20069  		x := v_0
 20070  		y := v_1
 20071  		if !(!shiftIsBounded(v)) {
 20072  			break
 20073  		}
 20074  		v.reset(OpARM64CSEL)
 20075  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20076  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20077  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20078  		v1.AddArg(x)
 20079  		v0.AddArg2(v1, y)
 20080  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20081  		v2.AuxInt = int64ToAuxInt(0)
 20082  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20083  		v3.AuxInt = int64ToAuxInt(64)
 20084  		v3.AddArg(y)
 20085  		v.AddArg3(v0, v2, v3)
 20086  		return true
 20087  	}
 20088  	return false
 20089  }
 20090  func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
 20091  	v_1 := v.Args[1]
 20092  	v_0 := v.Args[0]
 20093  	b := v.Block
 20094  	typ := &b.Func.Config.Types
 20095  	// match: (Rsh16Ux8 <t> x y)
 20096  	// cond: shiftIsBounded(v)
 20097  	// result: (SRL <t> (ZeroExt16to64 x) y)
 20098  	for {
 20099  		t := v.Type
 20100  		x := v_0
 20101  		y := v_1
 20102  		if !(shiftIsBounded(v)) {
 20103  			break
 20104  		}
 20105  		v.reset(OpARM64SRL)
 20106  		v.Type = t
 20107  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20108  		v0.AddArg(x)
 20109  		v.AddArg2(v0, y)
 20110  		return true
 20111  	}
 20112  	// match: (Rsh16Ux8 <t> x y)
 20113  	// cond: !shiftIsBounded(v)
 20114  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt16to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20115  	for {
 20116  		t := v.Type
 20117  		x := v_0
 20118  		y := v_1
 20119  		if !(!shiftIsBounded(v)) {
 20120  			break
 20121  		}
 20122  		v.reset(OpARM64CSEL)
 20123  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20124  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20125  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20126  		v1.AddArg(x)
 20127  		v0.AddArg2(v1, y)
 20128  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20129  		v2.AuxInt = int64ToAuxInt(0)
 20130  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20131  		v3.AuxInt = int64ToAuxInt(64)
 20132  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20133  		v4.AddArg(y)
 20134  		v3.AddArg(v4)
 20135  		v.AddArg3(v0, v2, v3)
 20136  		return true
 20137  	}
 20138  	return false
 20139  }
 20140  func rewriteValueARM64_OpRsh16x16(v *Value) bool {
 20141  	v_1 := v.Args[1]
 20142  	v_0 := v.Args[0]
 20143  	b := v.Block
 20144  	typ := &b.Func.Config.Types
 20145  	// match: (Rsh16x16 <t> x y)
 20146  	// cond: shiftIsBounded(v)
 20147  	// result: (SRA <t> (SignExt16to64 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(OpARM64SRA)
 20156  		v.Type = t
 20157  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20158  		v0.AddArg(x)
 20159  		v.AddArg2(v0, y)
 20160  		return true
 20161  	}
 20162  	// match: (Rsh16x16 x y)
 20163  	// cond: !shiftIsBounded(v)
 20164  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20165  	for {
 20166  		x := v_0
 20167  		y := v_1
 20168  		if !(!shiftIsBounded(v)) {
 20169  			break
 20170  		}
 20171  		v.reset(OpARM64SRA)
 20172  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20173  		v0.AddArg(x)
 20174  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20175  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20176  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20177  		v2.AuxInt = int64ToAuxInt(63)
 20178  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20179  		v3.AuxInt = int64ToAuxInt(64)
 20180  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20181  		v4.AddArg(y)
 20182  		v3.AddArg(v4)
 20183  		v1.AddArg3(y, v2, v3)
 20184  		v.AddArg2(v0, v1)
 20185  		return true
 20186  	}
 20187  	return false
 20188  }
 20189  func rewriteValueARM64_OpRsh16x32(v *Value) bool {
 20190  	v_1 := v.Args[1]
 20191  	v_0 := v.Args[0]
 20192  	b := v.Block
 20193  	typ := &b.Func.Config.Types
 20194  	// match: (Rsh16x32 <t> x y)
 20195  	// cond: shiftIsBounded(v)
 20196  	// result: (SRA <t> (SignExt16to64 x) y)
 20197  	for {
 20198  		t := v.Type
 20199  		x := v_0
 20200  		y := v_1
 20201  		if !(shiftIsBounded(v)) {
 20202  			break
 20203  		}
 20204  		v.reset(OpARM64SRA)
 20205  		v.Type = t
 20206  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20207  		v0.AddArg(x)
 20208  		v.AddArg2(v0, y)
 20209  		return true
 20210  	}
 20211  	// match: (Rsh16x32 x y)
 20212  	// cond: !shiftIsBounded(v)
 20213  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20214  	for {
 20215  		x := v_0
 20216  		y := v_1
 20217  		if !(!shiftIsBounded(v)) {
 20218  			break
 20219  		}
 20220  		v.reset(OpARM64SRA)
 20221  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20222  		v0.AddArg(x)
 20223  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20224  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20225  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20226  		v2.AuxInt = int64ToAuxInt(63)
 20227  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20228  		v3.AuxInt = int64ToAuxInt(64)
 20229  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20230  		v4.AddArg(y)
 20231  		v3.AddArg(v4)
 20232  		v1.AddArg3(y, v2, v3)
 20233  		v.AddArg2(v0, v1)
 20234  		return true
 20235  	}
 20236  	return false
 20237  }
 20238  func rewriteValueARM64_OpRsh16x64(v *Value) bool {
 20239  	v_1 := v.Args[1]
 20240  	v_0 := v.Args[0]
 20241  	b := v.Block
 20242  	typ := &b.Func.Config.Types
 20243  	// match: (Rsh16x64 <t> x y)
 20244  	// cond: shiftIsBounded(v)
 20245  	// result: (SRA <t> (SignExt16to64 x) y)
 20246  	for {
 20247  		t := v.Type
 20248  		x := v_0
 20249  		y := v_1
 20250  		if !(shiftIsBounded(v)) {
 20251  			break
 20252  		}
 20253  		v.reset(OpARM64SRA)
 20254  		v.Type = t
 20255  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20256  		v0.AddArg(x)
 20257  		v.AddArg2(v0, y)
 20258  		return true
 20259  	}
 20260  	// match: (Rsh16x64 x y)
 20261  	// cond: !shiftIsBounded(v)
 20262  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 20263  	for {
 20264  		x := v_0
 20265  		y := v_1
 20266  		if !(!shiftIsBounded(v)) {
 20267  			break
 20268  		}
 20269  		v.reset(OpARM64SRA)
 20270  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20271  		v0.AddArg(x)
 20272  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20273  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20274  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20275  		v2.AuxInt = int64ToAuxInt(63)
 20276  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20277  		v3.AuxInt = int64ToAuxInt(64)
 20278  		v3.AddArg(y)
 20279  		v1.AddArg3(y, v2, v3)
 20280  		v.AddArg2(v0, v1)
 20281  		return true
 20282  	}
 20283  	return false
 20284  }
 20285  func rewriteValueARM64_OpRsh16x8(v *Value) bool {
 20286  	v_1 := v.Args[1]
 20287  	v_0 := v.Args[0]
 20288  	b := v.Block
 20289  	typ := &b.Func.Config.Types
 20290  	// match: (Rsh16x8 <t> x y)
 20291  	// cond: shiftIsBounded(v)
 20292  	// result: (SRA <t> (SignExt16to64 x) y)
 20293  	for {
 20294  		t := v.Type
 20295  		x := v_0
 20296  		y := v_1
 20297  		if !(shiftIsBounded(v)) {
 20298  			break
 20299  		}
 20300  		v.reset(OpARM64SRA)
 20301  		v.Type = t
 20302  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20303  		v0.AddArg(x)
 20304  		v.AddArg2(v0, y)
 20305  		return true
 20306  	}
 20307  	// match: (Rsh16x8 x y)
 20308  	// cond: !shiftIsBounded(v)
 20309  	// result: (SRA (SignExt16to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 20310  	for {
 20311  		x := v_0
 20312  		y := v_1
 20313  		if !(!shiftIsBounded(v)) {
 20314  			break
 20315  		}
 20316  		v.reset(OpARM64SRA)
 20317  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
 20318  		v0.AddArg(x)
 20319  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20320  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20321  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20322  		v2.AuxInt = int64ToAuxInt(63)
 20323  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20324  		v3.AuxInt = int64ToAuxInt(64)
 20325  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20326  		v4.AddArg(y)
 20327  		v3.AddArg(v4)
 20328  		v1.AddArg3(y, v2, v3)
 20329  		v.AddArg2(v0, v1)
 20330  		return true
 20331  	}
 20332  	return false
 20333  }
 20334  func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
 20335  	v_1 := v.Args[1]
 20336  	v_0 := v.Args[0]
 20337  	b := v.Block
 20338  	typ := &b.Func.Config.Types
 20339  	// match: (Rsh32Ux16 <t> x y)
 20340  	// cond: shiftIsBounded(v)
 20341  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20342  	for {
 20343  		t := v.Type
 20344  		x := v_0
 20345  		y := v_1
 20346  		if !(shiftIsBounded(v)) {
 20347  			break
 20348  		}
 20349  		v.reset(OpARM64SRL)
 20350  		v.Type = t
 20351  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20352  		v0.AddArg(x)
 20353  		v.AddArg2(v0, y)
 20354  		return true
 20355  	}
 20356  	// match: (Rsh32Ux16 <t> x y)
 20357  	// cond: !shiftIsBounded(v)
 20358  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20359  	for {
 20360  		t := v.Type
 20361  		x := v_0
 20362  		y := v_1
 20363  		if !(!shiftIsBounded(v)) {
 20364  			break
 20365  		}
 20366  		v.reset(OpARM64CSEL)
 20367  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20368  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20369  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20370  		v1.AddArg(x)
 20371  		v0.AddArg2(v1, y)
 20372  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20373  		v2.AuxInt = int64ToAuxInt(0)
 20374  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20375  		v3.AuxInt = int64ToAuxInt(64)
 20376  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20377  		v4.AddArg(y)
 20378  		v3.AddArg(v4)
 20379  		v.AddArg3(v0, v2, v3)
 20380  		return true
 20381  	}
 20382  	return false
 20383  }
 20384  func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
 20385  	v_1 := v.Args[1]
 20386  	v_0 := v.Args[0]
 20387  	b := v.Block
 20388  	typ := &b.Func.Config.Types
 20389  	// match: (Rsh32Ux32 <t> x y)
 20390  	// cond: shiftIsBounded(v)
 20391  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20392  	for {
 20393  		t := v.Type
 20394  		x := v_0
 20395  		y := v_1
 20396  		if !(shiftIsBounded(v)) {
 20397  			break
 20398  		}
 20399  		v.reset(OpARM64SRL)
 20400  		v.Type = t
 20401  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20402  		v0.AddArg(x)
 20403  		v.AddArg2(v0, y)
 20404  		return true
 20405  	}
 20406  	// match: (Rsh32Ux32 <t> x y)
 20407  	// cond: !shiftIsBounded(v)
 20408  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20409  	for {
 20410  		t := v.Type
 20411  		x := v_0
 20412  		y := v_1
 20413  		if !(!shiftIsBounded(v)) {
 20414  			break
 20415  		}
 20416  		v.reset(OpARM64CSEL)
 20417  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20418  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20419  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20420  		v1.AddArg(x)
 20421  		v0.AddArg2(v1, y)
 20422  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20423  		v2.AuxInt = int64ToAuxInt(0)
 20424  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20425  		v3.AuxInt = int64ToAuxInt(64)
 20426  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20427  		v4.AddArg(y)
 20428  		v3.AddArg(v4)
 20429  		v.AddArg3(v0, v2, v3)
 20430  		return true
 20431  	}
 20432  	return false
 20433  }
 20434  func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
 20435  	v_1 := v.Args[1]
 20436  	v_0 := v.Args[0]
 20437  	b := v.Block
 20438  	typ := &b.Func.Config.Types
 20439  	// match: (Rsh32Ux64 <t> x y)
 20440  	// cond: shiftIsBounded(v)
 20441  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20442  	for {
 20443  		t := v.Type
 20444  		x := v_0
 20445  		y := v_1
 20446  		if !(shiftIsBounded(v)) {
 20447  			break
 20448  		}
 20449  		v.reset(OpARM64SRL)
 20450  		v.Type = t
 20451  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20452  		v0.AddArg(x)
 20453  		v.AddArg2(v0, y)
 20454  		return true
 20455  	}
 20456  	// match: (Rsh32Ux64 <t> x y)
 20457  	// cond: !shiftIsBounded(v)
 20458  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 20459  	for {
 20460  		t := v.Type
 20461  		x := v_0
 20462  		y := v_1
 20463  		if !(!shiftIsBounded(v)) {
 20464  			break
 20465  		}
 20466  		v.reset(OpARM64CSEL)
 20467  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20468  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20469  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20470  		v1.AddArg(x)
 20471  		v0.AddArg2(v1, y)
 20472  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20473  		v2.AuxInt = int64ToAuxInt(0)
 20474  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20475  		v3.AuxInt = int64ToAuxInt(64)
 20476  		v3.AddArg(y)
 20477  		v.AddArg3(v0, v2, v3)
 20478  		return true
 20479  	}
 20480  	return false
 20481  }
 20482  func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
 20483  	v_1 := v.Args[1]
 20484  	v_0 := v.Args[0]
 20485  	b := v.Block
 20486  	typ := &b.Func.Config.Types
 20487  	// match: (Rsh32Ux8 <t> x y)
 20488  	// cond: shiftIsBounded(v)
 20489  	// result: (SRL <t> (ZeroExt32to64 x) y)
 20490  	for {
 20491  		t := v.Type
 20492  		x := v_0
 20493  		y := v_1
 20494  		if !(shiftIsBounded(v)) {
 20495  			break
 20496  		}
 20497  		v.reset(OpARM64SRL)
 20498  		v.Type = t
 20499  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20500  		v0.AddArg(x)
 20501  		v.AddArg2(v0, y)
 20502  		return true
 20503  	}
 20504  	// match: (Rsh32Ux8 <t> x y)
 20505  	// cond: !shiftIsBounded(v)
 20506  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt32to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20507  	for {
 20508  		t := v.Type
 20509  		x := v_0
 20510  		y := v_1
 20511  		if !(!shiftIsBounded(v)) {
 20512  			break
 20513  		}
 20514  		v.reset(OpARM64CSEL)
 20515  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20516  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20517  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20518  		v1.AddArg(x)
 20519  		v0.AddArg2(v1, y)
 20520  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 20521  		v2.AuxInt = int64ToAuxInt(0)
 20522  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20523  		v3.AuxInt = int64ToAuxInt(64)
 20524  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20525  		v4.AddArg(y)
 20526  		v3.AddArg(v4)
 20527  		v.AddArg3(v0, v2, v3)
 20528  		return true
 20529  	}
 20530  	return false
 20531  }
 20532  func rewriteValueARM64_OpRsh32x16(v *Value) bool {
 20533  	v_1 := v.Args[1]
 20534  	v_0 := v.Args[0]
 20535  	b := v.Block
 20536  	typ := &b.Func.Config.Types
 20537  	// match: (Rsh32x16 <t> x y)
 20538  	// cond: shiftIsBounded(v)
 20539  	// result: (SRA <t> (SignExt32to64 x) y)
 20540  	for {
 20541  		t := v.Type
 20542  		x := v_0
 20543  		y := v_1
 20544  		if !(shiftIsBounded(v)) {
 20545  			break
 20546  		}
 20547  		v.reset(OpARM64SRA)
 20548  		v.Type = t
 20549  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20550  		v0.AddArg(x)
 20551  		v.AddArg2(v0, y)
 20552  		return true
 20553  	}
 20554  	// match: (Rsh32x16 x y)
 20555  	// cond: !shiftIsBounded(v)
 20556  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20557  	for {
 20558  		x := v_0
 20559  		y := v_1
 20560  		if !(!shiftIsBounded(v)) {
 20561  			break
 20562  		}
 20563  		v.reset(OpARM64SRA)
 20564  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20565  		v0.AddArg(x)
 20566  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20567  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20568  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20569  		v2.AuxInt = int64ToAuxInt(63)
 20570  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20571  		v3.AuxInt = int64ToAuxInt(64)
 20572  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20573  		v4.AddArg(y)
 20574  		v3.AddArg(v4)
 20575  		v1.AddArg3(y, v2, v3)
 20576  		v.AddArg2(v0, v1)
 20577  		return true
 20578  	}
 20579  	return false
 20580  }
 20581  func rewriteValueARM64_OpRsh32x32(v *Value) bool {
 20582  	v_1 := v.Args[1]
 20583  	v_0 := v.Args[0]
 20584  	b := v.Block
 20585  	typ := &b.Func.Config.Types
 20586  	// match: (Rsh32x32 <t> x y)
 20587  	// cond: shiftIsBounded(v)
 20588  	// result: (SRA <t> (SignExt32to64 x) y)
 20589  	for {
 20590  		t := v.Type
 20591  		x := v_0
 20592  		y := v_1
 20593  		if !(shiftIsBounded(v)) {
 20594  			break
 20595  		}
 20596  		v.reset(OpARM64SRA)
 20597  		v.Type = t
 20598  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20599  		v0.AddArg(x)
 20600  		v.AddArg2(v0, y)
 20601  		return true
 20602  	}
 20603  	// match: (Rsh32x32 x y)
 20604  	// cond: !shiftIsBounded(v)
 20605  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20606  	for {
 20607  		x := v_0
 20608  		y := v_1
 20609  		if !(!shiftIsBounded(v)) {
 20610  			break
 20611  		}
 20612  		v.reset(OpARM64SRA)
 20613  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20614  		v0.AddArg(x)
 20615  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20616  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20617  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20618  		v2.AuxInt = int64ToAuxInt(63)
 20619  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20620  		v3.AuxInt = int64ToAuxInt(64)
 20621  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20622  		v4.AddArg(y)
 20623  		v3.AddArg(v4)
 20624  		v1.AddArg3(y, v2, v3)
 20625  		v.AddArg2(v0, v1)
 20626  		return true
 20627  	}
 20628  	return false
 20629  }
 20630  func rewriteValueARM64_OpRsh32x64(v *Value) bool {
 20631  	v_1 := v.Args[1]
 20632  	v_0 := v.Args[0]
 20633  	b := v.Block
 20634  	typ := &b.Func.Config.Types
 20635  	// match: (Rsh32x64 <t> x y)
 20636  	// cond: shiftIsBounded(v)
 20637  	// result: (SRA <t> (SignExt32to64 x) y)
 20638  	for {
 20639  		t := v.Type
 20640  		x := v_0
 20641  		y := v_1
 20642  		if !(shiftIsBounded(v)) {
 20643  			break
 20644  		}
 20645  		v.reset(OpARM64SRA)
 20646  		v.Type = t
 20647  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20648  		v0.AddArg(x)
 20649  		v.AddArg2(v0, y)
 20650  		return true
 20651  	}
 20652  	// match: (Rsh32x64 x y)
 20653  	// cond: !shiftIsBounded(v)
 20654  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 20655  	for {
 20656  		x := v_0
 20657  		y := v_1
 20658  		if !(!shiftIsBounded(v)) {
 20659  			break
 20660  		}
 20661  		v.reset(OpARM64SRA)
 20662  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20663  		v0.AddArg(x)
 20664  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20665  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20666  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20667  		v2.AuxInt = int64ToAuxInt(63)
 20668  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20669  		v3.AuxInt = int64ToAuxInt(64)
 20670  		v3.AddArg(y)
 20671  		v1.AddArg3(y, v2, v3)
 20672  		v.AddArg2(v0, v1)
 20673  		return true
 20674  	}
 20675  	return false
 20676  }
 20677  func rewriteValueARM64_OpRsh32x8(v *Value) bool {
 20678  	v_1 := v.Args[1]
 20679  	v_0 := v.Args[0]
 20680  	b := v.Block
 20681  	typ := &b.Func.Config.Types
 20682  	// match: (Rsh32x8 <t> x y)
 20683  	// cond: shiftIsBounded(v)
 20684  	// result: (SRA <t> (SignExt32to64 x) y)
 20685  	for {
 20686  		t := v.Type
 20687  		x := v_0
 20688  		y := v_1
 20689  		if !(shiftIsBounded(v)) {
 20690  			break
 20691  		}
 20692  		v.reset(OpARM64SRA)
 20693  		v.Type = t
 20694  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20695  		v0.AddArg(x)
 20696  		v.AddArg2(v0, y)
 20697  		return true
 20698  	}
 20699  	// match: (Rsh32x8 x y)
 20700  	// cond: !shiftIsBounded(v)
 20701  	// result: (SRA (SignExt32to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 20702  	for {
 20703  		x := v_0
 20704  		y := v_1
 20705  		if !(!shiftIsBounded(v)) {
 20706  			break
 20707  		}
 20708  		v.reset(OpARM64SRA)
 20709  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
 20710  		v0.AddArg(x)
 20711  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20712  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 20713  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20714  		v2.AuxInt = int64ToAuxInt(63)
 20715  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20716  		v3.AuxInt = int64ToAuxInt(64)
 20717  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20718  		v4.AddArg(y)
 20719  		v3.AddArg(v4)
 20720  		v1.AddArg3(y, v2, v3)
 20721  		v.AddArg2(v0, v1)
 20722  		return true
 20723  	}
 20724  	return false
 20725  }
 20726  func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
 20727  	v_1 := v.Args[1]
 20728  	v_0 := v.Args[0]
 20729  	b := v.Block
 20730  	typ := &b.Func.Config.Types
 20731  	// match: (Rsh64Ux16 <t> x y)
 20732  	// cond: shiftIsBounded(v)
 20733  	// result: (SRL <t> x y)
 20734  	for {
 20735  		t := v.Type
 20736  		x := v_0
 20737  		y := v_1
 20738  		if !(shiftIsBounded(v)) {
 20739  			break
 20740  		}
 20741  		v.reset(OpARM64SRL)
 20742  		v.Type = t
 20743  		v.AddArg2(x, y)
 20744  		return true
 20745  	}
 20746  	// match: (Rsh64Ux16 <t> x y)
 20747  	// cond: !shiftIsBounded(v)
 20748  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 20749  	for {
 20750  		t := v.Type
 20751  		x := v_0
 20752  		y := v_1
 20753  		if !(!shiftIsBounded(v)) {
 20754  			break
 20755  		}
 20756  		v.reset(OpARM64CSEL)
 20757  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20758  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20759  		v0.AddArg2(x, y)
 20760  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20761  		v1.AuxInt = int64ToAuxInt(0)
 20762  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20763  		v2.AuxInt = int64ToAuxInt(64)
 20764  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20765  		v3.AddArg(y)
 20766  		v2.AddArg(v3)
 20767  		v.AddArg3(v0, v1, v2)
 20768  		return true
 20769  	}
 20770  	return false
 20771  }
 20772  func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
 20773  	v_1 := v.Args[1]
 20774  	v_0 := v.Args[0]
 20775  	b := v.Block
 20776  	typ := &b.Func.Config.Types
 20777  	// match: (Rsh64Ux32 <t> x y)
 20778  	// cond: shiftIsBounded(v)
 20779  	// result: (SRL <t> x y)
 20780  	for {
 20781  		t := v.Type
 20782  		x := v_0
 20783  		y := v_1
 20784  		if !(shiftIsBounded(v)) {
 20785  			break
 20786  		}
 20787  		v.reset(OpARM64SRL)
 20788  		v.Type = t
 20789  		v.AddArg2(x, y)
 20790  		return true
 20791  	}
 20792  	// match: (Rsh64Ux32 <t> x y)
 20793  	// cond: !shiftIsBounded(v)
 20794  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 20795  	for {
 20796  		t := v.Type
 20797  		x := v_0
 20798  		y := v_1
 20799  		if !(!shiftIsBounded(v)) {
 20800  			break
 20801  		}
 20802  		v.reset(OpARM64CSEL)
 20803  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20804  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20805  		v0.AddArg2(x, y)
 20806  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20807  		v1.AuxInt = int64ToAuxInt(0)
 20808  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20809  		v2.AuxInt = int64ToAuxInt(64)
 20810  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20811  		v3.AddArg(y)
 20812  		v2.AddArg(v3)
 20813  		v.AddArg3(v0, v1, v2)
 20814  		return true
 20815  	}
 20816  	return false
 20817  }
 20818  func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
 20819  	v_1 := v.Args[1]
 20820  	v_0 := v.Args[0]
 20821  	b := v.Block
 20822  	// match: (Rsh64Ux64 <t> x y)
 20823  	// cond: shiftIsBounded(v)
 20824  	// result: (SRL <t> x y)
 20825  	for {
 20826  		t := v.Type
 20827  		x := v_0
 20828  		y := v_1
 20829  		if !(shiftIsBounded(v)) {
 20830  			break
 20831  		}
 20832  		v.reset(OpARM64SRL)
 20833  		v.Type = t
 20834  		v.AddArg2(x, y)
 20835  		return true
 20836  	}
 20837  	// match: (Rsh64Ux64 <t> x y)
 20838  	// cond: !shiftIsBounded(v)
 20839  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] y))
 20840  	for {
 20841  		t := v.Type
 20842  		x := v_0
 20843  		y := v_1
 20844  		if !(!shiftIsBounded(v)) {
 20845  			break
 20846  		}
 20847  		v.reset(OpARM64CSEL)
 20848  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20849  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20850  		v0.AddArg2(x, y)
 20851  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20852  		v1.AuxInt = int64ToAuxInt(0)
 20853  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20854  		v2.AuxInt = int64ToAuxInt(64)
 20855  		v2.AddArg(y)
 20856  		v.AddArg3(v0, v1, v2)
 20857  		return true
 20858  	}
 20859  	return false
 20860  }
 20861  func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
 20862  	v_1 := v.Args[1]
 20863  	v_0 := v.Args[0]
 20864  	b := v.Block
 20865  	typ := &b.Func.Config.Types
 20866  	// match: (Rsh64Ux8 <t> x y)
 20867  	// cond: shiftIsBounded(v)
 20868  	// result: (SRL <t> x y)
 20869  	for {
 20870  		t := v.Type
 20871  		x := v_0
 20872  		y := v_1
 20873  		if !(shiftIsBounded(v)) {
 20874  			break
 20875  		}
 20876  		v.reset(OpARM64SRL)
 20877  		v.Type = t
 20878  		v.AddArg2(x, y)
 20879  		return true
 20880  	}
 20881  	// match: (Rsh64Ux8 <t> x y)
 20882  	// cond: !shiftIsBounded(v)
 20883  	// result: (CSEL [OpARM64LessThanU] (SRL <t> x y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 20884  	for {
 20885  		t := v.Type
 20886  		x := v_0
 20887  		y := v_1
 20888  		if !(!shiftIsBounded(v)) {
 20889  			break
 20890  		}
 20891  		v.reset(OpARM64CSEL)
 20892  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 20893  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 20894  		v0.AddArg2(x, y)
 20895  		v1 := b.NewValue0(v.Pos, OpConst64, t)
 20896  		v1.AuxInt = int64ToAuxInt(0)
 20897  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20898  		v2.AuxInt = int64ToAuxInt(64)
 20899  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 20900  		v3.AddArg(y)
 20901  		v2.AddArg(v3)
 20902  		v.AddArg3(v0, v1, v2)
 20903  		return true
 20904  	}
 20905  	return false
 20906  }
 20907  func rewriteValueARM64_OpRsh64x16(v *Value) bool {
 20908  	v_1 := v.Args[1]
 20909  	v_0 := v.Args[0]
 20910  	b := v.Block
 20911  	typ := &b.Func.Config.Types
 20912  	// match: (Rsh64x16 <t> x y)
 20913  	// cond: shiftIsBounded(v)
 20914  	// result: (SRA <t> x y)
 20915  	for {
 20916  		t := v.Type
 20917  		x := v_0
 20918  		y := v_1
 20919  		if !(shiftIsBounded(v)) {
 20920  			break
 20921  		}
 20922  		v.reset(OpARM64SRA)
 20923  		v.Type = t
 20924  		v.AddArg2(x, y)
 20925  		return true
 20926  	}
 20927  	// match: (Rsh64x16 x y)
 20928  	// cond: !shiftIsBounded(v)
 20929  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 20930  	for {
 20931  		x := v_0
 20932  		y := v_1
 20933  		if !(!shiftIsBounded(v)) {
 20934  			break
 20935  		}
 20936  		v.reset(OpARM64SRA)
 20937  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20938  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 20939  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20940  		v1.AuxInt = int64ToAuxInt(63)
 20941  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20942  		v2.AuxInt = int64ToAuxInt(64)
 20943  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 20944  		v3.AddArg(y)
 20945  		v2.AddArg(v3)
 20946  		v0.AddArg3(y, v1, v2)
 20947  		v.AddArg2(x, v0)
 20948  		return true
 20949  	}
 20950  	return false
 20951  }
 20952  func rewriteValueARM64_OpRsh64x32(v *Value) bool {
 20953  	v_1 := v.Args[1]
 20954  	v_0 := v.Args[0]
 20955  	b := v.Block
 20956  	typ := &b.Func.Config.Types
 20957  	// match: (Rsh64x32 <t> x y)
 20958  	// cond: shiftIsBounded(v)
 20959  	// result: (SRA <t> x y)
 20960  	for {
 20961  		t := v.Type
 20962  		x := v_0
 20963  		y := v_1
 20964  		if !(shiftIsBounded(v)) {
 20965  			break
 20966  		}
 20967  		v.reset(OpARM64SRA)
 20968  		v.Type = t
 20969  		v.AddArg2(x, y)
 20970  		return true
 20971  	}
 20972  	// match: (Rsh64x32 x y)
 20973  	// cond: !shiftIsBounded(v)
 20974  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 20975  	for {
 20976  		x := v_0
 20977  		y := v_1
 20978  		if !(!shiftIsBounded(v)) {
 20979  			break
 20980  		}
 20981  		v.reset(OpARM64SRA)
 20982  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 20983  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 20984  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 20985  		v1.AuxInt = int64ToAuxInt(63)
 20986  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 20987  		v2.AuxInt = int64ToAuxInt(64)
 20988  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 20989  		v3.AddArg(y)
 20990  		v2.AddArg(v3)
 20991  		v0.AddArg3(y, v1, v2)
 20992  		v.AddArg2(x, v0)
 20993  		return true
 20994  	}
 20995  	return false
 20996  }
 20997  func rewriteValueARM64_OpRsh64x64(v *Value) bool {
 20998  	v_1 := v.Args[1]
 20999  	v_0 := v.Args[0]
 21000  	b := v.Block
 21001  	// match: (Rsh64x64 <t> x y)
 21002  	// cond: shiftIsBounded(v)
 21003  	// result: (SRA <t> x y)
 21004  	for {
 21005  		t := v.Type
 21006  		x := v_0
 21007  		y := v_1
 21008  		if !(shiftIsBounded(v)) {
 21009  			break
 21010  		}
 21011  		v.reset(OpARM64SRA)
 21012  		v.Type = t
 21013  		v.AddArg2(x, y)
 21014  		return true
 21015  	}
 21016  	// match: (Rsh64x64 x y)
 21017  	// cond: !shiftIsBounded(v)
 21018  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21019  	for {
 21020  		x := v_0
 21021  		y := v_1
 21022  		if !(!shiftIsBounded(v)) {
 21023  			break
 21024  		}
 21025  		v.reset(OpARM64SRA)
 21026  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21027  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21028  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21029  		v1.AuxInt = int64ToAuxInt(63)
 21030  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21031  		v2.AuxInt = int64ToAuxInt(64)
 21032  		v2.AddArg(y)
 21033  		v0.AddArg3(y, v1, v2)
 21034  		v.AddArg2(x, v0)
 21035  		return true
 21036  	}
 21037  	return false
 21038  }
 21039  func rewriteValueARM64_OpRsh64x8(v *Value) bool {
 21040  	v_1 := v.Args[1]
 21041  	v_0 := v.Args[0]
 21042  	b := v.Block
 21043  	typ := &b.Func.Config.Types
 21044  	// match: (Rsh64x8 <t> x y)
 21045  	// cond: shiftIsBounded(v)
 21046  	// result: (SRA <t> x y)
 21047  	for {
 21048  		t := v.Type
 21049  		x := v_0
 21050  		y := v_1
 21051  		if !(shiftIsBounded(v)) {
 21052  			break
 21053  		}
 21054  		v.reset(OpARM64SRA)
 21055  		v.Type = t
 21056  		v.AddArg2(x, y)
 21057  		return true
 21058  	}
 21059  	// match: (Rsh64x8 x y)
 21060  	// cond: !shiftIsBounded(v)
 21061  	// result: (SRA x (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21062  	for {
 21063  		x := v_0
 21064  		y := v_1
 21065  		if !(!shiftIsBounded(v)) {
 21066  			break
 21067  		}
 21068  		v.reset(OpARM64SRA)
 21069  		v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21070  		v0.AuxInt = opToAuxInt(OpARM64LessThanU)
 21071  		v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21072  		v1.AuxInt = int64ToAuxInt(63)
 21073  		v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21074  		v2.AuxInt = int64ToAuxInt(64)
 21075  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21076  		v3.AddArg(y)
 21077  		v2.AddArg(v3)
 21078  		v0.AddArg3(y, v1, v2)
 21079  		v.AddArg2(x, v0)
 21080  		return true
 21081  	}
 21082  	return false
 21083  }
 21084  func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
 21085  	v_1 := v.Args[1]
 21086  	v_0 := v.Args[0]
 21087  	b := v.Block
 21088  	typ := &b.Func.Config.Types
 21089  	// match: (Rsh8Ux16 <t> x y)
 21090  	// cond: shiftIsBounded(v)
 21091  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21092  	for {
 21093  		t := v.Type
 21094  		x := v_0
 21095  		y := v_1
 21096  		if !(shiftIsBounded(v)) {
 21097  			break
 21098  		}
 21099  		v.reset(OpARM64SRL)
 21100  		v.Type = t
 21101  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21102  		v0.AddArg(x)
 21103  		v.AddArg2(v0, y)
 21104  		return true
 21105  	}
 21106  	// match: (Rsh8Ux16 <t> x y)
 21107  	// cond: !shiftIsBounded(v)
 21108  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt16to64 y)))
 21109  	for {
 21110  		t := v.Type
 21111  		x := v_0
 21112  		y := v_1
 21113  		if !(!shiftIsBounded(v)) {
 21114  			break
 21115  		}
 21116  		v.reset(OpARM64CSEL)
 21117  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21118  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21119  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21120  		v1.AddArg(x)
 21121  		v0.AddArg2(v1, y)
 21122  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21123  		v2.AuxInt = int64ToAuxInt(0)
 21124  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21125  		v3.AuxInt = int64ToAuxInt(64)
 21126  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21127  		v4.AddArg(y)
 21128  		v3.AddArg(v4)
 21129  		v.AddArg3(v0, v2, v3)
 21130  		return true
 21131  	}
 21132  	return false
 21133  }
 21134  func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
 21135  	v_1 := v.Args[1]
 21136  	v_0 := v.Args[0]
 21137  	b := v.Block
 21138  	typ := &b.Func.Config.Types
 21139  	// match: (Rsh8Ux32 <t> x y)
 21140  	// cond: shiftIsBounded(v)
 21141  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21142  	for {
 21143  		t := v.Type
 21144  		x := v_0
 21145  		y := v_1
 21146  		if !(shiftIsBounded(v)) {
 21147  			break
 21148  		}
 21149  		v.reset(OpARM64SRL)
 21150  		v.Type = t
 21151  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21152  		v0.AddArg(x)
 21153  		v.AddArg2(v0, y)
 21154  		return true
 21155  	}
 21156  	// match: (Rsh8Ux32 <t> x y)
 21157  	// cond: !shiftIsBounded(v)
 21158  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt32to64 y)))
 21159  	for {
 21160  		t := v.Type
 21161  		x := v_0
 21162  		y := v_1
 21163  		if !(!shiftIsBounded(v)) {
 21164  			break
 21165  		}
 21166  		v.reset(OpARM64CSEL)
 21167  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21168  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21169  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21170  		v1.AddArg(x)
 21171  		v0.AddArg2(v1, y)
 21172  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21173  		v2.AuxInt = int64ToAuxInt(0)
 21174  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21175  		v3.AuxInt = int64ToAuxInt(64)
 21176  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21177  		v4.AddArg(y)
 21178  		v3.AddArg(v4)
 21179  		v.AddArg3(v0, v2, v3)
 21180  		return true
 21181  	}
 21182  	return false
 21183  }
 21184  func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
 21185  	v_1 := v.Args[1]
 21186  	v_0 := v.Args[0]
 21187  	b := v.Block
 21188  	typ := &b.Func.Config.Types
 21189  	// match: (Rsh8Ux64 <t> x y)
 21190  	// cond: shiftIsBounded(v)
 21191  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21192  	for {
 21193  		t := v.Type
 21194  		x := v_0
 21195  		y := v_1
 21196  		if !(shiftIsBounded(v)) {
 21197  			break
 21198  		}
 21199  		v.reset(OpARM64SRL)
 21200  		v.Type = t
 21201  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21202  		v0.AddArg(x)
 21203  		v.AddArg2(v0, y)
 21204  		return true
 21205  	}
 21206  	// match: (Rsh8Ux64 <t> x y)
 21207  	// cond: !shiftIsBounded(v)
 21208  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] y))
 21209  	for {
 21210  		t := v.Type
 21211  		x := v_0
 21212  		y := v_1
 21213  		if !(!shiftIsBounded(v)) {
 21214  			break
 21215  		}
 21216  		v.reset(OpARM64CSEL)
 21217  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21218  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21219  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21220  		v1.AddArg(x)
 21221  		v0.AddArg2(v1, y)
 21222  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21223  		v2.AuxInt = int64ToAuxInt(0)
 21224  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21225  		v3.AuxInt = int64ToAuxInt(64)
 21226  		v3.AddArg(y)
 21227  		v.AddArg3(v0, v2, v3)
 21228  		return true
 21229  	}
 21230  	return false
 21231  }
 21232  func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
 21233  	v_1 := v.Args[1]
 21234  	v_0 := v.Args[0]
 21235  	b := v.Block
 21236  	typ := &b.Func.Config.Types
 21237  	// match: (Rsh8Ux8 <t> x y)
 21238  	// cond: shiftIsBounded(v)
 21239  	// result: (SRL <t> (ZeroExt8to64 x) y)
 21240  	for {
 21241  		t := v.Type
 21242  		x := v_0
 21243  		y := v_1
 21244  		if !(shiftIsBounded(v)) {
 21245  			break
 21246  		}
 21247  		v.reset(OpARM64SRL)
 21248  		v.Type = t
 21249  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21250  		v0.AddArg(x)
 21251  		v.AddArg2(v0, y)
 21252  		return true
 21253  	}
 21254  	// match: (Rsh8Ux8 <t> x y)
 21255  	// cond: !shiftIsBounded(v)
 21256  	// result: (CSEL [OpARM64LessThanU] (SRL <t> (ZeroExt8to64 x) y) (Const64 <t> [0]) (CMPconst [64] (ZeroExt8to64 y)))
 21257  	for {
 21258  		t := v.Type
 21259  		x := v_0
 21260  		y := v_1
 21261  		if !(!shiftIsBounded(v)) {
 21262  			break
 21263  		}
 21264  		v.reset(OpARM64CSEL)
 21265  		v.AuxInt = opToAuxInt(OpARM64LessThanU)
 21266  		v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
 21267  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21268  		v1.AddArg(x)
 21269  		v0.AddArg2(v1, y)
 21270  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 21271  		v2.AuxInt = int64ToAuxInt(0)
 21272  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21273  		v3.AuxInt = int64ToAuxInt(64)
 21274  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21275  		v4.AddArg(y)
 21276  		v3.AddArg(v4)
 21277  		v.AddArg3(v0, v2, v3)
 21278  		return true
 21279  	}
 21280  	return false
 21281  }
 21282  func rewriteValueARM64_OpRsh8x16(v *Value) bool {
 21283  	v_1 := v.Args[1]
 21284  	v_0 := v.Args[0]
 21285  	b := v.Block
 21286  	typ := &b.Func.Config.Types
 21287  	// match: (Rsh8x16 <t> x y)
 21288  	// cond: shiftIsBounded(v)
 21289  	// result: (SRA <t> (SignExt8to64 x) y)
 21290  	for {
 21291  		t := v.Type
 21292  		x := v_0
 21293  		y := v_1
 21294  		if !(shiftIsBounded(v)) {
 21295  			break
 21296  		}
 21297  		v.reset(OpARM64SRA)
 21298  		v.Type = t
 21299  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21300  		v0.AddArg(x)
 21301  		v.AddArg2(v0, y)
 21302  		return true
 21303  	}
 21304  	// match: (Rsh8x16 x y)
 21305  	// cond: !shiftIsBounded(v)
 21306  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt16to64 y))))
 21307  	for {
 21308  		x := v_0
 21309  		y := v_1
 21310  		if !(!shiftIsBounded(v)) {
 21311  			break
 21312  		}
 21313  		v.reset(OpARM64SRA)
 21314  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21315  		v0.AddArg(x)
 21316  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21317  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21318  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21319  		v2.AuxInt = int64ToAuxInt(63)
 21320  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21321  		v3.AuxInt = int64ToAuxInt(64)
 21322  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 21323  		v4.AddArg(y)
 21324  		v3.AddArg(v4)
 21325  		v1.AddArg3(y, v2, v3)
 21326  		v.AddArg2(v0, v1)
 21327  		return true
 21328  	}
 21329  	return false
 21330  }
 21331  func rewriteValueARM64_OpRsh8x32(v *Value) bool {
 21332  	v_1 := v.Args[1]
 21333  	v_0 := v.Args[0]
 21334  	b := v.Block
 21335  	typ := &b.Func.Config.Types
 21336  	// match: (Rsh8x32 <t> x y)
 21337  	// cond: shiftIsBounded(v)
 21338  	// result: (SRA <t> (SignExt8to64 x) y)
 21339  	for {
 21340  		t := v.Type
 21341  		x := v_0
 21342  		y := v_1
 21343  		if !(shiftIsBounded(v)) {
 21344  			break
 21345  		}
 21346  		v.reset(OpARM64SRA)
 21347  		v.Type = t
 21348  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21349  		v0.AddArg(x)
 21350  		v.AddArg2(v0, y)
 21351  		return true
 21352  	}
 21353  	// match: (Rsh8x32 x y)
 21354  	// cond: !shiftIsBounded(v)
 21355  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt32to64 y))))
 21356  	for {
 21357  		x := v_0
 21358  		y := v_1
 21359  		if !(!shiftIsBounded(v)) {
 21360  			break
 21361  		}
 21362  		v.reset(OpARM64SRA)
 21363  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21364  		v0.AddArg(x)
 21365  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21366  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21367  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21368  		v2.AuxInt = int64ToAuxInt(63)
 21369  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21370  		v3.AuxInt = int64ToAuxInt(64)
 21371  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
 21372  		v4.AddArg(y)
 21373  		v3.AddArg(v4)
 21374  		v1.AddArg3(y, v2, v3)
 21375  		v.AddArg2(v0, v1)
 21376  		return true
 21377  	}
 21378  	return false
 21379  }
 21380  func rewriteValueARM64_OpRsh8x64(v *Value) bool {
 21381  	v_1 := v.Args[1]
 21382  	v_0 := v.Args[0]
 21383  	b := v.Block
 21384  	typ := &b.Func.Config.Types
 21385  	// match: (Rsh8x64 <t> x y)
 21386  	// cond: shiftIsBounded(v)
 21387  	// result: (SRA <t> (SignExt8to64 x) y)
 21388  	for {
 21389  		t := v.Type
 21390  		x := v_0
 21391  		y := v_1
 21392  		if !(shiftIsBounded(v)) {
 21393  			break
 21394  		}
 21395  		v.reset(OpARM64SRA)
 21396  		v.Type = t
 21397  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21398  		v0.AddArg(x)
 21399  		v.AddArg2(v0, y)
 21400  		return true
 21401  	}
 21402  	// match: (Rsh8x64 x y)
 21403  	// cond: !shiftIsBounded(v)
 21404  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] y)))
 21405  	for {
 21406  		x := v_0
 21407  		y := v_1
 21408  		if !(!shiftIsBounded(v)) {
 21409  			break
 21410  		}
 21411  		v.reset(OpARM64SRA)
 21412  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21413  		v0.AddArg(x)
 21414  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21415  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21416  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21417  		v2.AuxInt = int64ToAuxInt(63)
 21418  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21419  		v3.AuxInt = int64ToAuxInt(64)
 21420  		v3.AddArg(y)
 21421  		v1.AddArg3(y, v2, v3)
 21422  		v.AddArg2(v0, v1)
 21423  		return true
 21424  	}
 21425  	return false
 21426  }
 21427  func rewriteValueARM64_OpRsh8x8(v *Value) bool {
 21428  	v_1 := v.Args[1]
 21429  	v_0 := v.Args[0]
 21430  	b := v.Block
 21431  	typ := &b.Func.Config.Types
 21432  	// match: (Rsh8x8 <t> x y)
 21433  	// cond: shiftIsBounded(v)
 21434  	// result: (SRA <t> (SignExt8to64 x) y)
 21435  	for {
 21436  		t := v.Type
 21437  		x := v_0
 21438  		y := v_1
 21439  		if !(shiftIsBounded(v)) {
 21440  			break
 21441  		}
 21442  		v.reset(OpARM64SRA)
 21443  		v.Type = t
 21444  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21445  		v0.AddArg(x)
 21446  		v.AddArg2(v0, y)
 21447  		return true
 21448  	}
 21449  	// match: (Rsh8x8 x y)
 21450  	// cond: !shiftIsBounded(v)
 21451  	// result: (SRA (SignExt8to64 x) (CSEL [OpARM64LessThanU] <y.Type> y (Const64 <y.Type> [63]) (CMPconst [64] (ZeroExt8to64 y))))
 21452  	for {
 21453  		x := v_0
 21454  		y := v_1
 21455  		if !(!shiftIsBounded(v)) {
 21456  			break
 21457  		}
 21458  		v.reset(OpARM64SRA)
 21459  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
 21460  		v0.AddArg(x)
 21461  		v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
 21462  		v1.AuxInt = opToAuxInt(OpARM64LessThanU)
 21463  		v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
 21464  		v2.AuxInt = int64ToAuxInt(63)
 21465  		v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21466  		v3.AuxInt = int64ToAuxInt(64)
 21467  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 21468  		v4.AddArg(y)
 21469  		v3.AddArg(v4)
 21470  		v1.AddArg3(y, v2, v3)
 21471  		v.AddArg2(v0, v1)
 21472  		return true
 21473  	}
 21474  	return false
 21475  }
 21476  func rewriteValueARM64_OpSelect0(v *Value) bool {
 21477  	v_0 := v.Args[0]
 21478  	b := v.Block
 21479  	typ := &b.Func.Config.Types
 21480  	// match: (Select0 (Mul64uhilo x y))
 21481  	// result: (UMULH x y)
 21482  	for {
 21483  		if v_0.Op != OpMul64uhilo {
 21484  			break
 21485  		}
 21486  		y := v_0.Args[1]
 21487  		x := v_0.Args[0]
 21488  		v.reset(OpARM64UMULH)
 21489  		v.AddArg2(x, y)
 21490  		return true
 21491  	}
 21492  	// match: (Select0 (Add64carry x y c))
 21493  	// result: (Select0 <typ.UInt64> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c))))
 21494  	for {
 21495  		if v_0.Op != OpAdd64carry {
 21496  			break
 21497  		}
 21498  		c := v_0.Args[2]
 21499  		x := v_0.Args[0]
 21500  		y := v_0.Args[1]
 21501  		v.reset(OpSelect0)
 21502  		v.Type = typ.UInt64
 21503  		v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21504  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21505  		v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21506  		v2.AuxInt = int64ToAuxInt(-1)
 21507  		v2.AddArg(c)
 21508  		v1.AddArg(v2)
 21509  		v0.AddArg3(x, y, v1)
 21510  		v.AddArg(v0)
 21511  		return true
 21512  	}
 21513  	// match: (Select0 (Sub64borrow x y bo))
 21514  	// result: (Select0 <typ.UInt64> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))
 21515  	for {
 21516  		if v_0.Op != OpSub64borrow {
 21517  			break
 21518  		}
 21519  		bo := v_0.Args[2]
 21520  		x := v_0.Args[0]
 21521  		y := v_0.Args[1]
 21522  		v.reset(OpSelect0)
 21523  		v.Type = typ.UInt64
 21524  		v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21525  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21526  		v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21527  		v2.AddArg(bo)
 21528  		v1.AddArg(v2)
 21529  		v0.AddArg3(x, y, v1)
 21530  		v.AddArg(v0)
 21531  		return true
 21532  	}
 21533  	// match: (Select0 (Mul64uover x y))
 21534  	// result: (MUL x y)
 21535  	for {
 21536  		if v_0.Op != OpMul64uover {
 21537  			break
 21538  		}
 21539  		y := v_0.Args[1]
 21540  		x := v_0.Args[0]
 21541  		v.reset(OpARM64MUL)
 21542  		v.AddArg2(x, y)
 21543  		return true
 21544  	}
 21545  	return false
 21546  }
 21547  func rewriteValueARM64_OpSelect1(v *Value) bool {
 21548  	v_0 := v.Args[0]
 21549  	b := v.Block
 21550  	typ := &b.Func.Config.Types
 21551  	// match: (Select1 (Mul64uhilo x y))
 21552  	// result: (MUL x y)
 21553  	for {
 21554  		if v_0.Op != OpMul64uhilo {
 21555  			break
 21556  		}
 21557  		y := v_0.Args[1]
 21558  		x := v_0.Args[0]
 21559  		v.reset(OpARM64MUL)
 21560  		v.AddArg2(x, y)
 21561  		return true
 21562  	}
 21563  	// match: (Select1 (Add64carry x y c))
 21564  	// result: (ADCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] c)))))
 21565  	for {
 21566  		if v_0.Op != OpAdd64carry {
 21567  			break
 21568  		}
 21569  		c := v_0.Args[2]
 21570  		x := v_0.Args[0]
 21571  		y := v_0.Args[1]
 21572  		v.reset(OpARM64ADCzerocarry)
 21573  		v.Type = typ.UInt64
 21574  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21575  		v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21576  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21577  		v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21578  		v3.AuxInt = int64ToAuxInt(-1)
 21579  		v3.AddArg(c)
 21580  		v2.AddArg(v3)
 21581  		v1.AddArg3(x, y, v2)
 21582  		v0.AddArg(v1)
 21583  		v.AddArg(v0)
 21584  		return true
 21585  	}
 21586  	// match: (Select1 (Sub64borrow x y bo))
 21587  	// result: (NEG <typ.UInt64> (NGCzerocarry <typ.UInt64> (Select1 <types.TypeFlags> (SBCSflags x y (Select1 <types.TypeFlags> (NEGSflags bo))))))
 21588  	for {
 21589  		if v_0.Op != OpSub64borrow {
 21590  			break
 21591  		}
 21592  		bo := v_0.Args[2]
 21593  		x := v_0.Args[0]
 21594  		y := v_0.Args[1]
 21595  		v.reset(OpARM64NEG)
 21596  		v.Type = typ.UInt64
 21597  		v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
 21598  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21599  		v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21600  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 21601  		v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
 21602  		v4.AddArg(bo)
 21603  		v3.AddArg(v4)
 21604  		v2.AddArg3(x, y, v3)
 21605  		v1.AddArg(v2)
 21606  		v0.AddArg(v1)
 21607  		v.AddArg(v0)
 21608  		return true
 21609  	}
 21610  	// match: (Select1 (Mul64uover x y))
 21611  	// result: (NotEqual (CMPconst (UMULH <typ.UInt64> x y) [0]))
 21612  	for {
 21613  		if v_0.Op != OpMul64uover {
 21614  			break
 21615  		}
 21616  		y := v_0.Args[1]
 21617  		x := v_0.Args[0]
 21618  		v.reset(OpARM64NotEqual)
 21619  		v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
 21620  		v0.AuxInt = int64ToAuxInt(0)
 21621  		v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
 21622  		v1.AddArg2(x, y)
 21623  		v0.AddArg(v1)
 21624  		v.AddArg(v0)
 21625  		return true
 21626  	}
 21627  	return false
 21628  }
 21629  func rewriteValueARM64_OpSelectN(v *Value) bool {
 21630  	v_0 := v.Args[0]
 21631  	b := v.Block
 21632  	config := b.Func.Config
 21633  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 21634  	// 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)
 21635  	// result: (Move [sz] dst src mem)
 21636  	for {
 21637  		if auxIntToInt64(v.AuxInt) != 0 {
 21638  			break
 21639  		}
 21640  		call := v_0
 21641  		if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
 21642  			break
 21643  		}
 21644  		sym := auxToCall(call.Aux)
 21645  		s1 := call.Args[0]
 21646  		if s1.Op != OpARM64MOVDstore {
 21647  			break
 21648  		}
 21649  		_ = s1.Args[2]
 21650  		s1_1 := s1.Args[1]
 21651  		if s1_1.Op != OpARM64MOVDconst {
 21652  			break
 21653  		}
 21654  		sz := auxIntToInt64(s1_1.AuxInt)
 21655  		s2 := s1.Args[2]
 21656  		if s2.Op != OpARM64MOVDstore {
 21657  			break
 21658  		}
 21659  		_ = s2.Args[2]
 21660  		src := s2.Args[1]
 21661  		s3 := s2.Args[2]
 21662  		if s3.Op != OpARM64MOVDstore {
 21663  			break
 21664  		}
 21665  		mem := s3.Args[2]
 21666  		dst := s3.Args[1]
 21667  		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)) {
 21668  			break
 21669  		}
 21670  		v.reset(OpMove)
 21671  		v.AuxInt = int64ToAuxInt(sz)
 21672  		v.AddArg3(dst, src, mem)
 21673  		return true
 21674  	}
 21675  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 21676  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 21677  	// result: (Move [sz] dst src mem)
 21678  	for {
 21679  		if auxIntToInt64(v.AuxInt) != 0 {
 21680  			break
 21681  		}
 21682  		call := v_0
 21683  		if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
 21684  			break
 21685  		}
 21686  		sym := auxToCall(call.Aux)
 21687  		mem := call.Args[3]
 21688  		dst := call.Args[0]
 21689  		src := call.Args[1]
 21690  		call_2 := call.Args[2]
 21691  		if call_2.Op != OpARM64MOVDconst {
 21692  			break
 21693  		}
 21694  		sz := auxIntToInt64(call_2.AuxInt)
 21695  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 21696  			break
 21697  		}
 21698  		v.reset(OpMove)
 21699  		v.AuxInt = int64ToAuxInt(sz)
 21700  		v.AddArg3(dst, src, mem)
 21701  		return true
 21702  	}
 21703  	return false
 21704  }
 21705  func rewriteValueARM64_OpSlicemask(v *Value) bool {
 21706  	v_0 := v.Args[0]
 21707  	b := v.Block
 21708  	// match: (Slicemask <t> x)
 21709  	// result: (SRAconst (NEG <t> x) [63])
 21710  	for {
 21711  		t := v.Type
 21712  		x := v_0
 21713  		v.reset(OpARM64SRAconst)
 21714  		v.AuxInt = int64ToAuxInt(63)
 21715  		v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
 21716  		v0.AddArg(x)
 21717  		v.AddArg(v0)
 21718  		return true
 21719  	}
 21720  }
 21721  func rewriteValueARM64_OpStore(v *Value) bool {
 21722  	v_2 := v.Args[2]
 21723  	v_1 := v.Args[1]
 21724  	v_0 := v.Args[0]
 21725  	// match: (Store {t} ptr val mem)
 21726  	// cond: t.Size() == 1
 21727  	// result: (MOVBstore ptr val mem)
 21728  	for {
 21729  		t := auxToType(v.Aux)
 21730  		ptr := v_0
 21731  		val := v_1
 21732  		mem := v_2
 21733  		if !(t.Size() == 1) {
 21734  			break
 21735  		}
 21736  		v.reset(OpARM64MOVBstore)
 21737  		v.AddArg3(ptr, val, mem)
 21738  		return true
 21739  	}
 21740  	// match: (Store {t} ptr val mem)
 21741  	// cond: t.Size() == 2
 21742  	// result: (MOVHstore ptr val mem)
 21743  	for {
 21744  		t := auxToType(v.Aux)
 21745  		ptr := v_0
 21746  		val := v_1
 21747  		mem := v_2
 21748  		if !(t.Size() == 2) {
 21749  			break
 21750  		}
 21751  		v.reset(OpARM64MOVHstore)
 21752  		v.AddArg3(ptr, val, mem)
 21753  		return true
 21754  	}
 21755  	// match: (Store {t} ptr val mem)
 21756  	// cond: t.Size() == 4 && !t.IsFloat()
 21757  	// result: (MOVWstore ptr val mem)
 21758  	for {
 21759  		t := auxToType(v.Aux)
 21760  		ptr := v_0
 21761  		val := v_1
 21762  		mem := v_2
 21763  		if !(t.Size() == 4 && !t.IsFloat()) {
 21764  			break
 21765  		}
 21766  		v.reset(OpARM64MOVWstore)
 21767  		v.AddArg3(ptr, val, mem)
 21768  		return true
 21769  	}
 21770  	// match: (Store {t} ptr val mem)
 21771  	// cond: t.Size() == 8 && !t.IsFloat()
 21772  	// result: (MOVDstore ptr val mem)
 21773  	for {
 21774  		t := auxToType(v.Aux)
 21775  		ptr := v_0
 21776  		val := v_1
 21777  		mem := v_2
 21778  		if !(t.Size() == 8 && !t.IsFloat()) {
 21779  			break
 21780  		}
 21781  		v.reset(OpARM64MOVDstore)
 21782  		v.AddArg3(ptr, val, mem)
 21783  		return true
 21784  	}
 21785  	// match: (Store {t} ptr val mem)
 21786  	// cond: t.Size() == 4 && t.IsFloat()
 21787  	// result: (FMOVSstore ptr val mem)
 21788  	for {
 21789  		t := auxToType(v.Aux)
 21790  		ptr := v_0
 21791  		val := v_1
 21792  		mem := v_2
 21793  		if !(t.Size() == 4 && t.IsFloat()) {
 21794  			break
 21795  		}
 21796  		v.reset(OpARM64FMOVSstore)
 21797  		v.AddArg3(ptr, val, mem)
 21798  		return true
 21799  	}
 21800  	// match: (Store {t} ptr val mem)
 21801  	// cond: t.Size() == 8 && t.IsFloat()
 21802  	// result: (FMOVDstore ptr val mem)
 21803  	for {
 21804  		t := auxToType(v.Aux)
 21805  		ptr := v_0
 21806  		val := v_1
 21807  		mem := v_2
 21808  		if !(t.Size() == 8 && t.IsFloat()) {
 21809  			break
 21810  		}
 21811  		v.reset(OpARM64FMOVDstore)
 21812  		v.AddArg3(ptr, val, mem)
 21813  		return true
 21814  	}
 21815  	return false
 21816  }
 21817  func rewriteValueARM64_OpZero(v *Value) bool {
 21818  	v_1 := v.Args[1]
 21819  	v_0 := v.Args[0]
 21820  	b := v.Block
 21821  	typ := &b.Func.Config.Types
 21822  	// match: (Zero [0] _ mem)
 21823  	// result: mem
 21824  	for {
 21825  		if auxIntToInt64(v.AuxInt) != 0 {
 21826  			break
 21827  		}
 21828  		mem := v_1
 21829  		v.copyOf(mem)
 21830  		return true
 21831  	}
 21832  	// match: (Zero [1] ptr mem)
 21833  	// result: (MOVBstore ptr (MOVDconst [0]) mem)
 21834  	for {
 21835  		if auxIntToInt64(v.AuxInt) != 1 {
 21836  			break
 21837  		}
 21838  		ptr := v_0
 21839  		mem := v_1
 21840  		v.reset(OpARM64MOVBstore)
 21841  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21842  		v0.AuxInt = int64ToAuxInt(0)
 21843  		v.AddArg3(ptr, v0, mem)
 21844  		return true
 21845  	}
 21846  	// match: (Zero [2] ptr mem)
 21847  	// result: (MOVHstore ptr (MOVDconst [0]) mem)
 21848  	for {
 21849  		if auxIntToInt64(v.AuxInt) != 2 {
 21850  			break
 21851  		}
 21852  		ptr := v_0
 21853  		mem := v_1
 21854  		v.reset(OpARM64MOVHstore)
 21855  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21856  		v0.AuxInt = int64ToAuxInt(0)
 21857  		v.AddArg3(ptr, v0, mem)
 21858  		return true
 21859  	}
 21860  	// match: (Zero [4] ptr mem)
 21861  	// result: (MOVWstore ptr (MOVDconst [0]) mem)
 21862  	for {
 21863  		if auxIntToInt64(v.AuxInt) != 4 {
 21864  			break
 21865  		}
 21866  		ptr := v_0
 21867  		mem := v_1
 21868  		v.reset(OpARM64MOVWstore)
 21869  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21870  		v0.AuxInt = int64ToAuxInt(0)
 21871  		v.AddArg3(ptr, v0, mem)
 21872  		return true
 21873  	}
 21874  	// match: (Zero [3] ptr mem)
 21875  	// result: (MOVBstore [2] ptr (MOVDconst [0]) (MOVHstore ptr (MOVDconst [0]) mem))
 21876  	for {
 21877  		if auxIntToInt64(v.AuxInt) != 3 {
 21878  			break
 21879  		}
 21880  		ptr := v_0
 21881  		mem := v_1
 21882  		v.reset(OpARM64MOVBstore)
 21883  		v.AuxInt = int32ToAuxInt(2)
 21884  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21885  		v0.AuxInt = int64ToAuxInt(0)
 21886  		v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
 21887  		v1.AddArg3(ptr, v0, mem)
 21888  		v.AddArg3(ptr, v0, v1)
 21889  		return true
 21890  	}
 21891  	// match: (Zero [5] ptr mem)
 21892  	// result: (MOVBstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 21893  	for {
 21894  		if auxIntToInt64(v.AuxInt) != 5 {
 21895  			break
 21896  		}
 21897  		ptr := v_0
 21898  		mem := v_1
 21899  		v.reset(OpARM64MOVBstore)
 21900  		v.AuxInt = int32ToAuxInt(4)
 21901  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21902  		v0.AuxInt = int64ToAuxInt(0)
 21903  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21904  		v1.AddArg3(ptr, v0, mem)
 21905  		v.AddArg3(ptr, v0, v1)
 21906  		return true
 21907  	}
 21908  	// match: (Zero [6] ptr mem)
 21909  	// result: (MOVHstore [4] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 21910  	for {
 21911  		if auxIntToInt64(v.AuxInt) != 6 {
 21912  			break
 21913  		}
 21914  		ptr := v_0
 21915  		mem := v_1
 21916  		v.reset(OpARM64MOVHstore)
 21917  		v.AuxInt = int32ToAuxInt(4)
 21918  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21919  		v0.AuxInt = int64ToAuxInt(0)
 21920  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21921  		v1.AddArg3(ptr, v0, mem)
 21922  		v.AddArg3(ptr, v0, v1)
 21923  		return true
 21924  	}
 21925  	// match: (Zero [7] ptr mem)
 21926  	// result: (MOVWstore [3] ptr (MOVDconst [0]) (MOVWstore ptr (MOVDconst [0]) mem))
 21927  	for {
 21928  		if auxIntToInt64(v.AuxInt) != 7 {
 21929  			break
 21930  		}
 21931  		ptr := v_0
 21932  		mem := v_1
 21933  		v.reset(OpARM64MOVWstore)
 21934  		v.AuxInt = int32ToAuxInt(3)
 21935  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21936  		v0.AuxInt = int64ToAuxInt(0)
 21937  		v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
 21938  		v1.AddArg3(ptr, v0, mem)
 21939  		v.AddArg3(ptr, v0, v1)
 21940  		return true
 21941  	}
 21942  	// match: (Zero [8] ptr mem)
 21943  	// result: (MOVDstore ptr (MOVDconst [0]) mem)
 21944  	for {
 21945  		if auxIntToInt64(v.AuxInt) != 8 {
 21946  			break
 21947  		}
 21948  		ptr := v_0
 21949  		mem := v_1
 21950  		v.reset(OpARM64MOVDstore)
 21951  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21952  		v0.AuxInt = int64ToAuxInt(0)
 21953  		v.AddArg3(ptr, v0, mem)
 21954  		return true
 21955  	}
 21956  	// match: (Zero [9] ptr mem)
 21957  	// result: (MOVBstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 21958  	for {
 21959  		if auxIntToInt64(v.AuxInt) != 9 {
 21960  			break
 21961  		}
 21962  		ptr := v_0
 21963  		mem := v_1
 21964  		v.reset(OpARM64MOVBstore)
 21965  		v.AuxInt = int32ToAuxInt(8)
 21966  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21967  		v0.AuxInt = int64ToAuxInt(0)
 21968  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21969  		v1.AddArg3(ptr, v0, mem)
 21970  		v.AddArg3(ptr, v0, v1)
 21971  		return true
 21972  	}
 21973  	// match: (Zero [10] ptr mem)
 21974  	// result: (MOVHstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 21975  	for {
 21976  		if auxIntToInt64(v.AuxInt) != 10 {
 21977  			break
 21978  		}
 21979  		ptr := v_0
 21980  		mem := v_1
 21981  		v.reset(OpARM64MOVHstore)
 21982  		v.AuxInt = int32ToAuxInt(8)
 21983  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 21984  		v0.AuxInt = int64ToAuxInt(0)
 21985  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 21986  		v1.AddArg3(ptr, v0, mem)
 21987  		v.AddArg3(ptr, v0, v1)
 21988  		return true
 21989  	}
 21990  	// match: (Zero [11] ptr mem)
 21991  	// result: (MOVDstore [3] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 21992  	for {
 21993  		if auxIntToInt64(v.AuxInt) != 11 {
 21994  			break
 21995  		}
 21996  		ptr := v_0
 21997  		mem := v_1
 21998  		v.reset(OpARM64MOVDstore)
 21999  		v.AuxInt = int32ToAuxInt(3)
 22000  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22001  		v0.AuxInt = int64ToAuxInt(0)
 22002  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22003  		v1.AddArg3(ptr, v0, mem)
 22004  		v.AddArg3(ptr, v0, v1)
 22005  		return true
 22006  	}
 22007  	// match: (Zero [12] ptr mem)
 22008  	// result: (MOVWstore [8] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22009  	for {
 22010  		if auxIntToInt64(v.AuxInt) != 12 {
 22011  			break
 22012  		}
 22013  		ptr := v_0
 22014  		mem := v_1
 22015  		v.reset(OpARM64MOVWstore)
 22016  		v.AuxInt = int32ToAuxInt(8)
 22017  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22018  		v0.AuxInt = int64ToAuxInt(0)
 22019  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22020  		v1.AddArg3(ptr, v0, mem)
 22021  		v.AddArg3(ptr, v0, v1)
 22022  		return true
 22023  	}
 22024  	// match: (Zero [13] ptr mem)
 22025  	// result: (MOVDstore [5] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22026  	for {
 22027  		if auxIntToInt64(v.AuxInt) != 13 {
 22028  			break
 22029  		}
 22030  		ptr := v_0
 22031  		mem := v_1
 22032  		v.reset(OpARM64MOVDstore)
 22033  		v.AuxInt = int32ToAuxInt(5)
 22034  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22035  		v0.AuxInt = int64ToAuxInt(0)
 22036  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22037  		v1.AddArg3(ptr, v0, mem)
 22038  		v.AddArg3(ptr, v0, v1)
 22039  		return true
 22040  	}
 22041  	// match: (Zero [14] ptr mem)
 22042  	// result: (MOVDstore [6] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22043  	for {
 22044  		if auxIntToInt64(v.AuxInt) != 14 {
 22045  			break
 22046  		}
 22047  		ptr := v_0
 22048  		mem := v_1
 22049  		v.reset(OpARM64MOVDstore)
 22050  		v.AuxInt = int32ToAuxInt(6)
 22051  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22052  		v0.AuxInt = int64ToAuxInt(0)
 22053  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22054  		v1.AddArg3(ptr, v0, mem)
 22055  		v.AddArg3(ptr, v0, v1)
 22056  		return true
 22057  	}
 22058  	// match: (Zero [15] ptr mem)
 22059  	// result: (MOVDstore [7] ptr (MOVDconst [0]) (MOVDstore ptr (MOVDconst [0]) mem))
 22060  	for {
 22061  		if auxIntToInt64(v.AuxInt) != 15 {
 22062  			break
 22063  		}
 22064  		ptr := v_0
 22065  		mem := v_1
 22066  		v.reset(OpARM64MOVDstore)
 22067  		v.AuxInt = int32ToAuxInt(7)
 22068  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22069  		v0.AuxInt = int64ToAuxInt(0)
 22070  		v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
 22071  		v1.AddArg3(ptr, v0, mem)
 22072  		v.AddArg3(ptr, v0, v1)
 22073  		return true
 22074  	}
 22075  	// match: (Zero [16] ptr mem)
 22076  	// result: (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)
 22077  	for {
 22078  		if auxIntToInt64(v.AuxInt) != 16 {
 22079  			break
 22080  		}
 22081  		ptr := v_0
 22082  		mem := v_1
 22083  		v.reset(OpARM64STP)
 22084  		v.AuxInt = int32ToAuxInt(0)
 22085  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22086  		v0.AuxInt = int64ToAuxInt(0)
 22087  		v.AddArg4(ptr, v0, v0, mem)
 22088  		return true
 22089  	}
 22090  	// match: (Zero [32] ptr mem)
 22091  	// result: (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem))
 22092  	for {
 22093  		if auxIntToInt64(v.AuxInt) != 32 {
 22094  			break
 22095  		}
 22096  		ptr := v_0
 22097  		mem := v_1
 22098  		v.reset(OpARM64STP)
 22099  		v.AuxInt = int32ToAuxInt(16)
 22100  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22101  		v0.AuxInt = int64ToAuxInt(0)
 22102  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22103  		v1.AuxInt = int32ToAuxInt(0)
 22104  		v1.AddArg4(ptr, v0, v0, mem)
 22105  		v.AddArg4(ptr, v0, v0, v1)
 22106  		return true
 22107  	}
 22108  	// match: (Zero [48] ptr mem)
 22109  	// result: (STP [32] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [16] ptr (MOVDconst [0]) (MOVDconst [0]) (STP [0] ptr (MOVDconst [0]) (MOVDconst [0]) mem)))
 22110  	for {
 22111  		if auxIntToInt64(v.AuxInt) != 48 {
 22112  			break
 22113  		}
 22114  		ptr := v_0
 22115  		mem := v_1
 22116  		v.reset(OpARM64STP)
 22117  		v.AuxInt = int32ToAuxInt(32)
 22118  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22119  		v0.AuxInt = int64ToAuxInt(0)
 22120  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22121  		v1.AuxInt = int32ToAuxInt(16)
 22122  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22123  		v2.AuxInt = int32ToAuxInt(0)
 22124  		v2.AddArg4(ptr, v0, v0, mem)
 22125  		v1.AddArg4(ptr, v0, v0, v2)
 22126  		v.AddArg4(ptr, v0, v0, v1)
 22127  		return true
 22128  	}
 22129  	// match: (Zero [64] ptr mem)
 22130  	// 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))))
 22131  	for {
 22132  		if auxIntToInt64(v.AuxInt) != 64 {
 22133  			break
 22134  		}
 22135  		ptr := v_0
 22136  		mem := v_1
 22137  		v.reset(OpARM64STP)
 22138  		v.AuxInt = int32ToAuxInt(48)
 22139  		v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
 22140  		v0.AuxInt = int64ToAuxInt(0)
 22141  		v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22142  		v1.AuxInt = int32ToAuxInt(32)
 22143  		v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22144  		v2.AuxInt = int32ToAuxInt(16)
 22145  		v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
 22146  		v3.AuxInt = int32ToAuxInt(0)
 22147  		v3.AddArg4(ptr, v0, v0, mem)
 22148  		v2.AddArg4(ptr, v0, v0, v3)
 22149  		v1.AddArg4(ptr, v0, v0, v2)
 22150  		v.AddArg4(ptr, v0, v0, v1)
 22151  		return true
 22152  	}
 22153  	// match: (Zero [s] ptr mem)
 22154  	// cond: s%16 != 0 && s%16 <= 8 && s > 16
 22155  	// result: (Zero [8] (OffPtr <ptr.Type> ptr [s-8]) (Zero [s-s%16] ptr mem))
 22156  	for {
 22157  		s := auxIntToInt64(v.AuxInt)
 22158  		ptr := v_0
 22159  		mem := v_1
 22160  		if !(s%16 != 0 && s%16 <= 8 && s > 16) {
 22161  			break
 22162  		}
 22163  		v.reset(OpZero)
 22164  		v.AuxInt = int64ToAuxInt(8)
 22165  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 22166  		v0.AuxInt = int64ToAuxInt(s - 8)
 22167  		v0.AddArg(ptr)
 22168  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 22169  		v1.AuxInt = int64ToAuxInt(s - s%16)
 22170  		v1.AddArg2(ptr, mem)
 22171  		v.AddArg2(v0, v1)
 22172  		return true
 22173  	}
 22174  	// match: (Zero [s] ptr mem)
 22175  	// cond: s%16 != 0 && s%16 > 8 && s > 16
 22176  	// result: (Zero [16] (OffPtr <ptr.Type> ptr [s-16]) (Zero [s-s%16] ptr mem))
 22177  	for {
 22178  		s := auxIntToInt64(v.AuxInt)
 22179  		ptr := v_0
 22180  		mem := v_1
 22181  		if !(s%16 != 0 && s%16 > 8 && s > 16) {
 22182  			break
 22183  		}
 22184  		v.reset(OpZero)
 22185  		v.AuxInt = int64ToAuxInt(16)
 22186  		v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
 22187  		v0.AuxInt = int64ToAuxInt(s - 16)
 22188  		v0.AddArg(ptr)
 22189  		v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
 22190  		v1.AuxInt = int64ToAuxInt(s - s%16)
 22191  		v1.AddArg2(ptr, mem)
 22192  		v.AddArg2(v0, v1)
 22193  		return true
 22194  	}
 22195  	// match: (Zero [s] ptr mem)
 22196  	// cond: s%16 == 0 && s > 64 && s <= 16*64
 22197  	// result: (DUFFZERO [4 * (64 - s/16)] ptr mem)
 22198  	for {
 22199  		s := auxIntToInt64(v.AuxInt)
 22200  		ptr := v_0
 22201  		mem := v_1
 22202  		if !(s%16 == 0 && s > 64 && s <= 16*64) {
 22203  			break
 22204  		}
 22205  		v.reset(OpARM64DUFFZERO)
 22206  		v.AuxInt = int64ToAuxInt(4 * (64 - s/16))
 22207  		v.AddArg2(ptr, mem)
 22208  		return true
 22209  	}
 22210  	// match: (Zero [s] ptr mem)
 22211  	// cond: s%16 == 0 && s > 16*64
 22212  	// result: (LoweredZero ptr (ADDconst <ptr.Type> [s-16] ptr) mem)
 22213  	for {
 22214  		s := auxIntToInt64(v.AuxInt)
 22215  		ptr := v_0
 22216  		mem := v_1
 22217  		if !(s%16 == 0 && s > 16*64) {
 22218  			break
 22219  		}
 22220  		v.reset(OpARM64LoweredZero)
 22221  		v0 := b.NewValue0(v.Pos, OpARM64ADDconst, ptr.Type)
 22222  		v0.AuxInt = int64ToAuxInt(s - 16)
 22223  		v0.AddArg(ptr)
 22224  		v.AddArg3(ptr, v0, mem)
 22225  		return true
 22226  	}
 22227  	return false
 22228  }
 22229  func rewriteBlockARM64(b *Block) bool {
 22230  	typ := &b.Func.Config.Types
 22231  	switch b.Kind {
 22232  	case BlockARM64EQ:
 22233  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 22234  		// cond: z.Uses == 1
 22235  		// result: (EQ (TST x y) yes no)
 22236  		for b.Controls[0].Op == OpARM64CMPconst {
 22237  			v_0 := b.Controls[0]
 22238  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22239  				break
 22240  			}
 22241  			z := v_0.Args[0]
 22242  			if z.Op != OpARM64AND {
 22243  				break
 22244  			}
 22245  			_ = z.Args[1]
 22246  			z_0 := z.Args[0]
 22247  			z_1 := z.Args[1]
 22248  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22249  				x := z_0
 22250  				y := z_1
 22251  				if !(z.Uses == 1) {
 22252  					continue
 22253  				}
 22254  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 22255  				v0.AddArg2(x, y)
 22256  				b.resetWithControl(BlockARM64EQ, v0)
 22257  				return true
 22258  			}
 22259  			break
 22260  		}
 22261  		// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
 22262  		// cond: x.Uses == 1
 22263  		// result: (EQ (TSTconst [c] y) yes no)
 22264  		for b.Controls[0].Op == OpARM64CMPconst {
 22265  			v_0 := b.Controls[0]
 22266  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22267  				break
 22268  			}
 22269  			x := v_0.Args[0]
 22270  			if x.Op != OpARM64ANDconst {
 22271  				break
 22272  			}
 22273  			c := auxIntToInt64(x.AuxInt)
 22274  			y := x.Args[0]
 22275  			if !(x.Uses == 1) {
 22276  				break
 22277  			}
 22278  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 22279  			v0.AuxInt = int64ToAuxInt(c)
 22280  			v0.AddArg(y)
 22281  			b.resetWithControl(BlockARM64EQ, v0)
 22282  			return true
 22283  		}
 22284  		// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
 22285  		// cond: z.Uses == 1
 22286  		// result: (EQ (TSTW x y) yes no)
 22287  		for b.Controls[0].Op == OpARM64CMPWconst {
 22288  			v_0 := b.Controls[0]
 22289  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22290  				break
 22291  			}
 22292  			z := v_0.Args[0]
 22293  			if z.Op != OpARM64AND {
 22294  				break
 22295  			}
 22296  			_ = z.Args[1]
 22297  			z_0 := z.Args[0]
 22298  			z_1 := z.Args[1]
 22299  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22300  				x := z_0
 22301  				y := z_1
 22302  				if !(z.Uses == 1) {
 22303  					continue
 22304  				}
 22305  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 22306  				v0.AddArg2(x, y)
 22307  				b.resetWithControl(BlockARM64EQ, v0)
 22308  				return true
 22309  			}
 22310  			break
 22311  		}
 22312  		// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 22313  		// cond: x.Uses == 1
 22314  		// result: (EQ (TSTWconst [int32(c)] y) yes no)
 22315  		for b.Controls[0].Op == OpARM64CMPWconst {
 22316  			v_0 := b.Controls[0]
 22317  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22318  				break
 22319  			}
 22320  			x := v_0.Args[0]
 22321  			if x.Op != OpARM64ANDconst {
 22322  				break
 22323  			}
 22324  			c := auxIntToInt64(x.AuxInt)
 22325  			y := x.Args[0]
 22326  			if !(x.Uses == 1) {
 22327  				break
 22328  			}
 22329  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 22330  			v0.AuxInt = int32ToAuxInt(int32(c))
 22331  			v0.AddArg(y)
 22332  			b.resetWithControl(BlockARM64EQ, v0)
 22333  			return true
 22334  		}
 22335  		// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
 22336  		// cond: x.Uses == 1
 22337  		// result: (EQ (CMNconst [c] y) yes no)
 22338  		for b.Controls[0].Op == OpARM64CMPconst {
 22339  			v_0 := b.Controls[0]
 22340  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22341  				break
 22342  			}
 22343  			x := v_0.Args[0]
 22344  			if x.Op != OpARM64ADDconst {
 22345  				break
 22346  			}
 22347  			c := auxIntToInt64(x.AuxInt)
 22348  			y := x.Args[0]
 22349  			if !(x.Uses == 1) {
 22350  				break
 22351  			}
 22352  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 22353  			v0.AuxInt = int64ToAuxInt(c)
 22354  			v0.AddArg(y)
 22355  			b.resetWithControl(BlockARM64EQ, v0)
 22356  			return true
 22357  		}
 22358  		// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 22359  		// cond: x.Uses == 1
 22360  		// result: (EQ (CMNWconst [int32(c)] y) yes no)
 22361  		for b.Controls[0].Op == OpARM64CMPWconst {
 22362  			v_0 := b.Controls[0]
 22363  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22364  				break
 22365  			}
 22366  			x := v_0.Args[0]
 22367  			if x.Op != OpARM64ADDconst {
 22368  				break
 22369  			}
 22370  			c := auxIntToInt64(x.AuxInt)
 22371  			y := x.Args[0]
 22372  			if !(x.Uses == 1) {
 22373  				break
 22374  			}
 22375  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 22376  			v0.AuxInt = int32ToAuxInt(int32(c))
 22377  			v0.AddArg(y)
 22378  			b.resetWithControl(BlockARM64EQ, v0)
 22379  			return true
 22380  		}
 22381  		// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
 22382  		// cond: z.Uses == 1
 22383  		// result: (EQ (CMN x y) yes no)
 22384  		for b.Controls[0].Op == OpARM64CMPconst {
 22385  			v_0 := b.Controls[0]
 22386  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22387  				break
 22388  			}
 22389  			z := v_0.Args[0]
 22390  			if z.Op != OpARM64ADD {
 22391  				break
 22392  			}
 22393  			_ = z.Args[1]
 22394  			z_0 := z.Args[0]
 22395  			z_1 := z.Args[1]
 22396  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22397  				x := z_0
 22398  				y := z_1
 22399  				if !(z.Uses == 1) {
 22400  					continue
 22401  				}
 22402  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22403  				v0.AddArg2(x, y)
 22404  				b.resetWithControl(BlockARM64EQ, v0)
 22405  				return true
 22406  			}
 22407  			break
 22408  		}
 22409  		// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
 22410  		// cond: z.Uses == 1
 22411  		// result: (EQ (CMNW x y) yes no)
 22412  		for b.Controls[0].Op == OpARM64CMPWconst {
 22413  			v_0 := b.Controls[0]
 22414  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22415  				break
 22416  			}
 22417  			z := v_0.Args[0]
 22418  			if z.Op != OpARM64ADD {
 22419  				break
 22420  			}
 22421  			_ = z.Args[1]
 22422  			z_0 := z.Args[0]
 22423  			z_1 := z.Args[1]
 22424  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22425  				x := z_0
 22426  				y := z_1
 22427  				if !(z.Uses == 1) {
 22428  					continue
 22429  				}
 22430  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22431  				v0.AddArg2(x, y)
 22432  				b.resetWithControl(BlockARM64EQ, v0)
 22433  				return true
 22434  			}
 22435  			break
 22436  		}
 22437  		// match: (EQ (CMP x z:(NEG y)) yes no)
 22438  		// cond: z.Uses == 1
 22439  		// result: (EQ (CMN x y) yes no)
 22440  		for b.Controls[0].Op == OpARM64CMP {
 22441  			v_0 := b.Controls[0]
 22442  			_ = v_0.Args[1]
 22443  			x := v_0.Args[0]
 22444  			z := v_0.Args[1]
 22445  			if z.Op != OpARM64NEG {
 22446  				break
 22447  			}
 22448  			y := z.Args[0]
 22449  			if !(z.Uses == 1) {
 22450  				break
 22451  			}
 22452  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22453  			v0.AddArg2(x, y)
 22454  			b.resetWithControl(BlockARM64EQ, v0)
 22455  			return true
 22456  		}
 22457  		// match: (EQ (CMPW x z:(NEG y)) yes no)
 22458  		// cond: z.Uses == 1
 22459  		// result: (EQ (CMNW x y) yes no)
 22460  		for b.Controls[0].Op == OpARM64CMPW {
 22461  			v_0 := b.Controls[0]
 22462  			_ = v_0.Args[1]
 22463  			x := v_0.Args[0]
 22464  			z := v_0.Args[1]
 22465  			if z.Op != OpARM64NEG {
 22466  				break
 22467  			}
 22468  			y := z.Args[0]
 22469  			if !(z.Uses == 1) {
 22470  				break
 22471  			}
 22472  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22473  			v0.AddArg2(x, y)
 22474  			b.resetWithControl(BlockARM64EQ, v0)
 22475  			return true
 22476  		}
 22477  		// match: (EQ (CMPconst [0] x) yes no)
 22478  		// result: (Z x yes no)
 22479  		for b.Controls[0].Op == OpARM64CMPconst {
 22480  			v_0 := b.Controls[0]
 22481  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22482  				break
 22483  			}
 22484  			x := v_0.Args[0]
 22485  			b.resetWithControl(BlockARM64Z, x)
 22486  			return true
 22487  		}
 22488  		// match: (EQ (CMPWconst [0] x) yes no)
 22489  		// result: (ZW x yes no)
 22490  		for b.Controls[0].Op == OpARM64CMPWconst {
 22491  			v_0 := b.Controls[0]
 22492  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22493  				break
 22494  			}
 22495  			x := v_0.Args[0]
 22496  			b.resetWithControl(BlockARM64ZW, x)
 22497  			return true
 22498  		}
 22499  		// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
 22500  		// cond: z.Uses==1
 22501  		// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
 22502  		for b.Controls[0].Op == OpARM64CMPconst {
 22503  			v_0 := b.Controls[0]
 22504  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22505  				break
 22506  			}
 22507  			z := v_0.Args[0]
 22508  			if z.Op != OpARM64MADD {
 22509  				break
 22510  			}
 22511  			y := z.Args[2]
 22512  			a := z.Args[0]
 22513  			x := z.Args[1]
 22514  			if !(z.Uses == 1) {
 22515  				break
 22516  			}
 22517  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22518  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22519  			v1.AddArg2(x, y)
 22520  			v0.AddArg2(a, v1)
 22521  			b.resetWithControl(BlockARM64EQ, v0)
 22522  			return true
 22523  		}
 22524  		// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
 22525  		// cond: z.Uses==1
 22526  		// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
 22527  		for b.Controls[0].Op == OpARM64CMPconst {
 22528  			v_0 := b.Controls[0]
 22529  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22530  				break
 22531  			}
 22532  			z := v_0.Args[0]
 22533  			if z.Op != OpARM64MSUB {
 22534  				break
 22535  			}
 22536  			y := z.Args[2]
 22537  			a := z.Args[0]
 22538  			x := z.Args[1]
 22539  			if !(z.Uses == 1) {
 22540  				break
 22541  			}
 22542  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 22543  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22544  			v1.AddArg2(x, y)
 22545  			v0.AddArg2(a, v1)
 22546  			b.resetWithControl(BlockARM64EQ, v0)
 22547  			return true
 22548  		}
 22549  		// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
 22550  		// cond: z.Uses==1
 22551  		// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
 22552  		for b.Controls[0].Op == OpARM64CMPWconst {
 22553  			v_0 := b.Controls[0]
 22554  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22555  				break
 22556  			}
 22557  			z := v_0.Args[0]
 22558  			if z.Op != OpARM64MADDW {
 22559  				break
 22560  			}
 22561  			y := z.Args[2]
 22562  			a := z.Args[0]
 22563  			x := z.Args[1]
 22564  			if !(z.Uses == 1) {
 22565  				break
 22566  			}
 22567  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22568  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22569  			v1.AddArg2(x, y)
 22570  			v0.AddArg2(a, v1)
 22571  			b.resetWithControl(BlockARM64EQ, v0)
 22572  			return true
 22573  		}
 22574  		// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
 22575  		// cond: z.Uses==1
 22576  		// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
 22577  		for b.Controls[0].Op == OpARM64CMPWconst {
 22578  			v_0 := b.Controls[0]
 22579  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22580  				break
 22581  			}
 22582  			z := v_0.Args[0]
 22583  			if z.Op != OpARM64MSUBW {
 22584  				break
 22585  			}
 22586  			y := z.Args[2]
 22587  			a := z.Args[0]
 22588  			x := z.Args[1]
 22589  			if !(z.Uses == 1) {
 22590  				break
 22591  			}
 22592  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 22593  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22594  			v1.AddArg2(x, y)
 22595  			v0.AddArg2(a, v1)
 22596  			b.resetWithControl(BlockARM64EQ, v0)
 22597  			return true
 22598  		}
 22599  		// match: (EQ (TSTconst [c] x) yes no)
 22600  		// cond: oneBit(c)
 22601  		// result: (TBZ [int64(ntz64(c))] x yes no)
 22602  		for b.Controls[0].Op == OpARM64TSTconst {
 22603  			v_0 := b.Controls[0]
 22604  			c := auxIntToInt64(v_0.AuxInt)
 22605  			x := v_0.Args[0]
 22606  			if !(oneBit(c)) {
 22607  				break
 22608  			}
 22609  			b.resetWithControl(BlockARM64TBZ, x)
 22610  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 22611  			return true
 22612  		}
 22613  		// match: (EQ (TSTWconst [c] x) yes no)
 22614  		// cond: oneBit(int64(uint32(c)))
 22615  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 22616  		for b.Controls[0].Op == OpARM64TSTWconst {
 22617  			v_0 := b.Controls[0]
 22618  			c := auxIntToInt32(v_0.AuxInt)
 22619  			x := v_0.Args[0]
 22620  			if !(oneBit(int64(uint32(c)))) {
 22621  				break
 22622  			}
 22623  			b.resetWithControl(BlockARM64TBZ, x)
 22624  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 22625  			return true
 22626  		}
 22627  		// match: (EQ (FlagConstant [fc]) yes no)
 22628  		// cond: fc.eq()
 22629  		// result: (First yes no)
 22630  		for b.Controls[0].Op == OpARM64FlagConstant {
 22631  			v_0 := b.Controls[0]
 22632  			fc := auxIntToFlagConstant(v_0.AuxInt)
 22633  			if !(fc.eq()) {
 22634  				break
 22635  			}
 22636  			b.Reset(BlockFirst)
 22637  			return true
 22638  		}
 22639  		// match: (EQ (FlagConstant [fc]) yes no)
 22640  		// cond: !fc.eq()
 22641  		// result: (First no yes)
 22642  		for b.Controls[0].Op == OpARM64FlagConstant {
 22643  			v_0 := b.Controls[0]
 22644  			fc := auxIntToFlagConstant(v_0.AuxInt)
 22645  			if !(!fc.eq()) {
 22646  				break
 22647  			}
 22648  			b.Reset(BlockFirst)
 22649  			b.swapSuccessors()
 22650  			return true
 22651  		}
 22652  		// match: (EQ (InvertFlags cmp) yes no)
 22653  		// result: (EQ cmp yes no)
 22654  		for b.Controls[0].Op == OpARM64InvertFlags {
 22655  			v_0 := b.Controls[0]
 22656  			cmp := v_0.Args[0]
 22657  			b.resetWithControl(BlockARM64EQ, cmp)
 22658  			return true
 22659  		}
 22660  	case BlockARM64FGE:
 22661  		// match: (FGE (InvertFlags cmp) yes no)
 22662  		// result: (FLE cmp yes no)
 22663  		for b.Controls[0].Op == OpARM64InvertFlags {
 22664  			v_0 := b.Controls[0]
 22665  			cmp := v_0.Args[0]
 22666  			b.resetWithControl(BlockARM64FLE, cmp)
 22667  			return true
 22668  		}
 22669  	case BlockARM64FGT:
 22670  		// match: (FGT (InvertFlags cmp) yes no)
 22671  		// result: (FLT cmp yes no)
 22672  		for b.Controls[0].Op == OpARM64InvertFlags {
 22673  			v_0 := b.Controls[0]
 22674  			cmp := v_0.Args[0]
 22675  			b.resetWithControl(BlockARM64FLT, cmp)
 22676  			return true
 22677  		}
 22678  	case BlockARM64FLE:
 22679  		// match: (FLE (InvertFlags cmp) yes no)
 22680  		// result: (FGE cmp yes no)
 22681  		for b.Controls[0].Op == OpARM64InvertFlags {
 22682  			v_0 := b.Controls[0]
 22683  			cmp := v_0.Args[0]
 22684  			b.resetWithControl(BlockARM64FGE, cmp)
 22685  			return true
 22686  		}
 22687  	case BlockARM64FLT:
 22688  		// match: (FLT (InvertFlags cmp) yes no)
 22689  		// result: (FGT cmp yes no)
 22690  		for b.Controls[0].Op == OpARM64InvertFlags {
 22691  			v_0 := b.Controls[0]
 22692  			cmp := v_0.Args[0]
 22693  			b.resetWithControl(BlockARM64FGT, cmp)
 22694  			return true
 22695  		}
 22696  	case BlockARM64GE:
 22697  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 22698  		// cond: z.Uses == 1
 22699  		// result: (GE (TST x y) yes no)
 22700  		for b.Controls[0].Op == OpARM64CMPconst {
 22701  			v_0 := b.Controls[0]
 22702  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22703  				break
 22704  			}
 22705  			z := v_0.Args[0]
 22706  			if z.Op != OpARM64AND {
 22707  				break
 22708  			}
 22709  			_ = z.Args[1]
 22710  			z_0 := z.Args[0]
 22711  			z_1 := z.Args[1]
 22712  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22713  				x := z_0
 22714  				y := z_1
 22715  				if !(z.Uses == 1) {
 22716  					continue
 22717  				}
 22718  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 22719  				v0.AddArg2(x, y)
 22720  				b.resetWithControl(BlockARM64GE, v0)
 22721  				return true
 22722  			}
 22723  			break
 22724  		}
 22725  		// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 22726  		// cond: x.Uses == 1
 22727  		// result: (GE (TSTconst [c] y) yes no)
 22728  		for b.Controls[0].Op == OpARM64CMPconst {
 22729  			v_0 := b.Controls[0]
 22730  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22731  				break
 22732  			}
 22733  			x := v_0.Args[0]
 22734  			if x.Op != OpARM64ANDconst {
 22735  				break
 22736  			}
 22737  			c := auxIntToInt64(x.AuxInt)
 22738  			y := x.Args[0]
 22739  			if !(x.Uses == 1) {
 22740  				break
 22741  			}
 22742  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 22743  			v0.AuxInt = int64ToAuxInt(c)
 22744  			v0.AddArg(y)
 22745  			b.resetWithControl(BlockARM64GE, v0)
 22746  			return true
 22747  		}
 22748  		// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
 22749  		// cond: z.Uses == 1
 22750  		// result: (GE (TSTW x y) yes no)
 22751  		for b.Controls[0].Op == OpARM64CMPWconst {
 22752  			v_0 := b.Controls[0]
 22753  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22754  				break
 22755  			}
 22756  			z := v_0.Args[0]
 22757  			if z.Op != OpARM64AND {
 22758  				break
 22759  			}
 22760  			_ = z.Args[1]
 22761  			z_0 := z.Args[0]
 22762  			z_1 := z.Args[1]
 22763  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22764  				x := z_0
 22765  				y := z_1
 22766  				if !(z.Uses == 1) {
 22767  					continue
 22768  				}
 22769  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 22770  				v0.AddArg2(x, y)
 22771  				b.resetWithControl(BlockARM64GE, v0)
 22772  				return true
 22773  			}
 22774  			break
 22775  		}
 22776  		// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 22777  		// cond: x.Uses == 1
 22778  		// result: (GE (TSTWconst [int32(c)] y) yes no)
 22779  		for b.Controls[0].Op == OpARM64CMPWconst {
 22780  			v_0 := b.Controls[0]
 22781  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22782  				break
 22783  			}
 22784  			x := v_0.Args[0]
 22785  			if x.Op != OpARM64ANDconst {
 22786  				break
 22787  			}
 22788  			c := auxIntToInt64(x.AuxInt)
 22789  			y := x.Args[0]
 22790  			if !(x.Uses == 1) {
 22791  				break
 22792  			}
 22793  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 22794  			v0.AuxInt = int32ToAuxInt(int32(c))
 22795  			v0.AddArg(y)
 22796  			b.resetWithControl(BlockARM64GE, v0)
 22797  			return true
 22798  		}
 22799  		// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 22800  		// cond: x.Uses == 1
 22801  		// result: (GEnoov (CMNconst [c] y) yes no)
 22802  		for b.Controls[0].Op == OpARM64CMPconst {
 22803  			v_0 := b.Controls[0]
 22804  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22805  				break
 22806  			}
 22807  			x := v_0.Args[0]
 22808  			if x.Op != OpARM64ADDconst {
 22809  				break
 22810  			}
 22811  			c := auxIntToInt64(x.AuxInt)
 22812  			y := x.Args[0]
 22813  			if !(x.Uses == 1) {
 22814  				break
 22815  			}
 22816  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 22817  			v0.AuxInt = int64ToAuxInt(c)
 22818  			v0.AddArg(y)
 22819  			b.resetWithControl(BlockARM64GEnoov, v0)
 22820  			return true
 22821  		}
 22822  		// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 22823  		// cond: x.Uses == 1
 22824  		// result: (GEnoov (CMNWconst [int32(c)] y) yes no)
 22825  		for b.Controls[0].Op == OpARM64CMPWconst {
 22826  			v_0 := b.Controls[0]
 22827  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22828  				break
 22829  			}
 22830  			x := v_0.Args[0]
 22831  			if x.Op != OpARM64ADDconst {
 22832  				break
 22833  			}
 22834  			c := auxIntToInt64(x.AuxInt)
 22835  			y := x.Args[0]
 22836  			if !(x.Uses == 1) {
 22837  				break
 22838  			}
 22839  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 22840  			v0.AuxInt = int32ToAuxInt(int32(c))
 22841  			v0.AddArg(y)
 22842  			b.resetWithControl(BlockARM64GEnoov, v0)
 22843  			return true
 22844  		}
 22845  		// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
 22846  		// cond: z.Uses == 1
 22847  		// result: (GEnoov (CMN x y) yes no)
 22848  		for b.Controls[0].Op == OpARM64CMPconst {
 22849  			v_0 := b.Controls[0]
 22850  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22851  				break
 22852  			}
 22853  			z := v_0.Args[0]
 22854  			if z.Op != OpARM64ADD {
 22855  				break
 22856  			}
 22857  			_ = z.Args[1]
 22858  			z_0 := z.Args[0]
 22859  			z_1 := z.Args[1]
 22860  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22861  				x := z_0
 22862  				y := z_1
 22863  				if !(z.Uses == 1) {
 22864  					continue
 22865  				}
 22866  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22867  				v0.AddArg2(x, y)
 22868  				b.resetWithControl(BlockARM64GEnoov, v0)
 22869  				return true
 22870  			}
 22871  			break
 22872  		}
 22873  		// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
 22874  		// cond: z.Uses == 1
 22875  		// result: (GEnoov (CMNW x y) yes no)
 22876  		for b.Controls[0].Op == OpARM64CMPWconst {
 22877  			v_0 := b.Controls[0]
 22878  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22879  				break
 22880  			}
 22881  			z := v_0.Args[0]
 22882  			if z.Op != OpARM64ADD {
 22883  				break
 22884  			}
 22885  			_ = z.Args[1]
 22886  			z_0 := z.Args[0]
 22887  			z_1 := z.Args[1]
 22888  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 22889  				x := z_0
 22890  				y := z_1
 22891  				if !(z.Uses == 1) {
 22892  					continue
 22893  				}
 22894  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22895  				v0.AddArg2(x, y)
 22896  				b.resetWithControl(BlockARM64GEnoov, v0)
 22897  				return true
 22898  			}
 22899  			break
 22900  		}
 22901  		// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
 22902  		// cond: z.Uses==1
 22903  		// result: (GEnoov (CMN a (MUL <x.Type> x y)) yes no)
 22904  		for b.Controls[0].Op == OpARM64CMPconst {
 22905  			v_0 := b.Controls[0]
 22906  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22907  				break
 22908  			}
 22909  			z := v_0.Args[0]
 22910  			if z.Op != OpARM64MADD {
 22911  				break
 22912  			}
 22913  			y := z.Args[2]
 22914  			a := z.Args[0]
 22915  			x := z.Args[1]
 22916  			if !(z.Uses == 1) {
 22917  				break
 22918  			}
 22919  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 22920  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22921  			v1.AddArg2(x, y)
 22922  			v0.AddArg2(a, v1)
 22923  			b.resetWithControl(BlockARM64GEnoov, v0)
 22924  			return true
 22925  		}
 22926  		// match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
 22927  		// cond: z.Uses==1
 22928  		// result: (GEnoov (CMP a (MUL <x.Type> x y)) yes no)
 22929  		for b.Controls[0].Op == OpARM64CMPconst {
 22930  			v_0 := b.Controls[0]
 22931  			if auxIntToInt64(v_0.AuxInt) != 0 {
 22932  				break
 22933  			}
 22934  			z := v_0.Args[0]
 22935  			if z.Op != OpARM64MSUB {
 22936  				break
 22937  			}
 22938  			y := z.Args[2]
 22939  			a := z.Args[0]
 22940  			x := z.Args[1]
 22941  			if !(z.Uses == 1) {
 22942  				break
 22943  			}
 22944  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 22945  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 22946  			v1.AddArg2(x, y)
 22947  			v0.AddArg2(a, v1)
 22948  			b.resetWithControl(BlockARM64GEnoov, v0)
 22949  			return true
 22950  		}
 22951  		// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
 22952  		// cond: z.Uses==1
 22953  		// result: (GEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 22954  		for b.Controls[0].Op == OpARM64CMPWconst {
 22955  			v_0 := b.Controls[0]
 22956  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22957  				break
 22958  			}
 22959  			z := v_0.Args[0]
 22960  			if z.Op != OpARM64MADDW {
 22961  				break
 22962  			}
 22963  			y := z.Args[2]
 22964  			a := z.Args[0]
 22965  			x := z.Args[1]
 22966  			if !(z.Uses == 1) {
 22967  				break
 22968  			}
 22969  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 22970  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22971  			v1.AddArg2(x, y)
 22972  			v0.AddArg2(a, v1)
 22973  			b.resetWithControl(BlockARM64GEnoov, v0)
 22974  			return true
 22975  		}
 22976  		// match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 22977  		// cond: z.Uses==1
 22978  		// result: (GEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 22979  		for b.Controls[0].Op == OpARM64CMPWconst {
 22980  			v_0 := b.Controls[0]
 22981  			if auxIntToInt32(v_0.AuxInt) != 0 {
 22982  				break
 22983  			}
 22984  			z := v_0.Args[0]
 22985  			if z.Op != OpARM64MSUBW {
 22986  				break
 22987  			}
 22988  			y := z.Args[2]
 22989  			a := z.Args[0]
 22990  			x := z.Args[1]
 22991  			if !(z.Uses == 1) {
 22992  				break
 22993  			}
 22994  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 22995  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 22996  			v1.AddArg2(x, y)
 22997  			v0.AddArg2(a, v1)
 22998  			b.resetWithControl(BlockARM64GEnoov, v0)
 22999  			return true
 23000  		}
 23001  		// match: (GE (CMPWconst [0] x) yes no)
 23002  		// result: (TBZ [31] x yes no)
 23003  		for b.Controls[0].Op == OpARM64CMPWconst {
 23004  			v_0 := b.Controls[0]
 23005  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23006  				break
 23007  			}
 23008  			x := v_0.Args[0]
 23009  			b.resetWithControl(BlockARM64TBZ, x)
 23010  			b.AuxInt = int64ToAuxInt(31)
 23011  			return true
 23012  		}
 23013  		// match: (GE (CMPconst [0] x) yes no)
 23014  		// result: (TBZ [63] x yes no)
 23015  		for b.Controls[0].Op == OpARM64CMPconst {
 23016  			v_0 := b.Controls[0]
 23017  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23018  				break
 23019  			}
 23020  			x := v_0.Args[0]
 23021  			b.resetWithControl(BlockARM64TBZ, x)
 23022  			b.AuxInt = int64ToAuxInt(63)
 23023  			return true
 23024  		}
 23025  		// match: (GE (FlagConstant [fc]) yes no)
 23026  		// cond: fc.ge()
 23027  		// result: (First yes no)
 23028  		for b.Controls[0].Op == OpARM64FlagConstant {
 23029  			v_0 := b.Controls[0]
 23030  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23031  			if !(fc.ge()) {
 23032  				break
 23033  			}
 23034  			b.Reset(BlockFirst)
 23035  			return true
 23036  		}
 23037  		// match: (GE (FlagConstant [fc]) yes no)
 23038  		// cond: !fc.ge()
 23039  		// result: (First no yes)
 23040  		for b.Controls[0].Op == OpARM64FlagConstant {
 23041  			v_0 := b.Controls[0]
 23042  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23043  			if !(!fc.ge()) {
 23044  				break
 23045  			}
 23046  			b.Reset(BlockFirst)
 23047  			b.swapSuccessors()
 23048  			return true
 23049  		}
 23050  		// match: (GE (InvertFlags cmp) yes no)
 23051  		// result: (LE cmp yes no)
 23052  		for b.Controls[0].Op == OpARM64InvertFlags {
 23053  			v_0 := b.Controls[0]
 23054  			cmp := v_0.Args[0]
 23055  			b.resetWithControl(BlockARM64LE, cmp)
 23056  			return true
 23057  		}
 23058  	case BlockARM64GEnoov:
 23059  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23060  		// cond: fc.geNoov()
 23061  		// result: (First yes no)
 23062  		for b.Controls[0].Op == OpARM64FlagConstant {
 23063  			v_0 := b.Controls[0]
 23064  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23065  			if !(fc.geNoov()) {
 23066  				break
 23067  			}
 23068  			b.Reset(BlockFirst)
 23069  			return true
 23070  		}
 23071  		// match: (GEnoov (FlagConstant [fc]) yes no)
 23072  		// cond: !fc.geNoov()
 23073  		// result: (First no yes)
 23074  		for b.Controls[0].Op == OpARM64FlagConstant {
 23075  			v_0 := b.Controls[0]
 23076  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23077  			if !(!fc.geNoov()) {
 23078  				break
 23079  			}
 23080  			b.Reset(BlockFirst)
 23081  			b.swapSuccessors()
 23082  			return true
 23083  		}
 23084  		// match: (GEnoov (InvertFlags cmp) yes no)
 23085  		// result: (LEnoov cmp yes no)
 23086  		for b.Controls[0].Op == OpARM64InvertFlags {
 23087  			v_0 := b.Controls[0]
 23088  			cmp := v_0.Args[0]
 23089  			b.resetWithControl(BlockARM64LEnoov, cmp)
 23090  			return true
 23091  		}
 23092  	case BlockARM64GT:
 23093  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 23094  		// cond: z.Uses == 1
 23095  		// result: (GT (TST x y) yes no)
 23096  		for b.Controls[0].Op == OpARM64CMPconst {
 23097  			v_0 := b.Controls[0]
 23098  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23099  				break
 23100  			}
 23101  			z := v_0.Args[0]
 23102  			if z.Op != OpARM64AND {
 23103  				break
 23104  			}
 23105  			_ = z.Args[1]
 23106  			z_0 := z.Args[0]
 23107  			z_1 := z.Args[1]
 23108  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23109  				x := z_0
 23110  				y := z_1
 23111  				if !(z.Uses == 1) {
 23112  					continue
 23113  				}
 23114  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23115  				v0.AddArg2(x, y)
 23116  				b.resetWithControl(BlockARM64GT, v0)
 23117  				return true
 23118  			}
 23119  			break
 23120  		}
 23121  		// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23122  		// cond: x.Uses == 1
 23123  		// result: (GT (TSTconst [c] y) yes no)
 23124  		for b.Controls[0].Op == OpARM64CMPconst {
 23125  			v_0 := b.Controls[0]
 23126  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23127  				break
 23128  			}
 23129  			x := v_0.Args[0]
 23130  			if x.Op != OpARM64ANDconst {
 23131  				break
 23132  			}
 23133  			c := auxIntToInt64(x.AuxInt)
 23134  			y := x.Args[0]
 23135  			if !(x.Uses == 1) {
 23136  				break
 23137  			}
 23138  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23139  			v0.AuxInt = int64ToAuxInt(c)
 23140  			v0.AddArg(y)
 23141  			b.resetWithControl(BlockARM64GT, v0)
 23142  			return true
 23143  		}
 23144  		// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
 23145  		// cond: z.Uses == 1
 23146  		// result: (GT (TSTW x y) yes no)
 23147  		for b.Controls[0].Op == OpARM64CMPWconst {
 23148  			v_0 := b.Controls[0]
 23149  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23150  				break
 23151  			}
 23152  			z := v_0.Args[0]
 23153  			if z.Op != OpARM64AND {
 23154  				break
 23155  			}
 23156  			_ = z.Args[1]
 23157  			z_0 := z.Args[0]
 23158  			z_1 := z.Args[1]
 23159  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23160  				x := z_0
 23161  				y := z_1
 23162  				if !(z.Uses == 1) {
 23163  					continue
 23164  				}
 23165  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23166  				v0.AddArg2(x, y)
 23167  				b.resetWithControl(BlockARM64GT, v0)
 23168  				return true
 23169  			}
 23170  			break
 23171  		}
 23172  		// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23173  		// cond: x.Uses == 1
 23174  		// result: (GT (TSTWconst [int32(c)] y) yes no)
 23175  		for b.Controls[0].Op == OpARM64CMPWconst {
 23176  			v_0 := b.Controls[0]
 23177  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23178  				break
 23179  			}
 23180  			x := v_0.Args[0]
 23181  			if x.Op != OpARM64ANDconst {
 23182  				break
 23183  			}
 23184  			c := auxIntToInt64(x.AuxInt)
 23185  			y := x.Args[0]
 23186  			if !(x.Uses == 1) {
 23187  				break
 23188  			}
 23189  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23190  			v0.AuxInt = int32ToAuxInt(int32(c))
 23191  			v0.AddArg(y)
 23192  			b.resetWithControl(BlockARM64GT, v0)
 23193  			return true
 23194  		}
 23195  		// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23196  		// cond: x.Uses == 1
 23197  		// result: (GTnoov (CMNconst [c] y) yes no)
 23198  		for b.Controls[0].Op == OpARM64CMPconst {
 23199  			v_0 := b.Controls[0]
 23200  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23201  				break
 23202  			}
 23203  			x := v_0.Args[0]
 23204  			if x.Op != OpARM64ADDconst {
 23205  				break
 23206  			}
 23207  			c := auxIntToInt64(x.AuxInt)
 23208  			y := x.Args[0]
 23209  			if !(x.Uses == 1) {
 23210  				break
 23211  			}
 23212  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23213  			v0.AuxInt = int64ToAuxInt(c)
 23214  			v0.AddArg(y)
 23215  			b.resetWithControl(BlockARM64GTnoov, v0)
 23216  			return true
 23217  		}
 23218  		// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23219  		// cond: x.Uses == 1
 23220  		// result: (GTnoov (CMNWconst [int32(c)] y) yes no)
 23221  		for b.Controls[0].Op == OpARM64CMPWconst {
 23222  			v_0 := b.Controls[0]
 23223  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23224  				break
 23225  			}
 23226  			x := v_0.Args[0]
 23227  			if x.Op != OpARM64ADDconst {
 23228  				break
 23229  			}
 23230  			c := auxIntToInt64(x.AuxInt)
 23231  			y := x.Args[0]
 23232  			if !(x.Uses == 1) {
 23233  				break
 23234  			}
 23235  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23236  			v0.AuxInt = int32ToAuxInt(int32(c))
 23237  			v0.AddArg(y)
 23238  			b.resetWithControl(BlockARM64GTnoov, v0)
 23239  			return true
 23240  		}
 23241  		// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
 23242  		// cond: z.Uses == 1
 23243  		// result: (GTnoov (CMN x y) yes no)
 23244  		for b.Controls[0].Op == OpARM64CMPconst {
 23245  			v_0 := b.Controls[0]
 23246  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23247  				break
 23248  			}
 23249  			z := v_0.Args[0]
 23250  			if z.Op != OpARM64ADD {
 23251  				break
 23252  			}
 23253  			_ = z.Args[1]
 23254  			z_0 := z.Args[0]
 23255  			z_1 := z.Args[1]
 23256  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23257  				x := z_0
 23258  				y := z_1
 23259  				if !(z.Uses == 1) {
 23260  					continue
 23261  				}
 23262  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23263  				v0.AddArg2(x, y)
 23264  				b.resetWithControl(BlockARM64GTnoov, v0)
 23265  				return true
 23266  			}
 23267  			break
 23268  		}
 23269  		// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
 23270  		// cond: z.Uses == 1
 23271  		// result: (GTnoov (CMNW x y) yes no)
 23272  		for b.Controls[0].Op == OpARM64CMPWconst {
 23273  			v_0 := b.Controls[0]
 23274  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23275  				break
 23276  			}
 23277  			z := v_0.Args[0]
 23278  			if z.Op != OpARM64ADD {
 23279  				break
 23280  			}
 23281  			_ = z.Args[1]
 23282  			z_0 := z.Args[0]
 23283  			z_1 := z.Args[1]
 23284  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23285  				x := z_0
 23286  				y := z_1
 23287  				if !(z.Uses == 1) {
 23288  					continue
 23289  				}
 23290  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23291  				v0.AddArg2(x, y)
 23292  				b.resetWithControl(BlockARM64GTnoov, v0)
 23293  				return true
 23294  			}
 23295  			break
 23296  		}
 23297  		// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
 23298  		// cond: z.Uses==1
 23299  		// result: (GTnoov (CMN a (MUL <x.Type> x y)) yes no)
 23300  		for b.Controls[0].Op == OpARM64CMPconst {
 23301  			v_0 := b.Controls[0]
 23302  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23303  				break
 23304  			}
 23305  			z := v_0.Args[0]
 23306  			if z.Op != OpARM64MADD {
 23307  				break
 23308  			}
 23309  			y := z.Args[2]
 23310  			a := z.Args[0]
 23311  			x := z.Args[1]
 23312  			if !(z.Uses == 1) {
 23313  				break
 23314  			}
 23315  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23316  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23317  			v1.AddArg2(x, y)
 23318  			v0.AddArg2(a, v1)
 23319  			b.resetWithControl(BlockARM64GTnoov, v0)
 23320  			return true
 23321  		}
 23322  		// match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
 23323  		// cond: z.Uses==1
 23324  		// result: (GTnoov (CMP a (MUL <x.Type> x y)) yes no)
 23325  		for b.Controls[0].Op == OpARM64CMPconst {
 23326  			v_0 := b.Controls[0]
 23327  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23328  				break
 23329  			}
 23330  			z := v_0.Args[0]
 23331  			if z.Op != OpARM64MSUB {
 23332  				break
 23333  			}
 23334  			y := z.Args[2]
 23335  			a := z.Args[0]
 23336  			x := z.Args[1]
 23337  			if !(z.Uses == 1) {
 23338  				break
 23339  			}
 23340  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23341  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23342  			v1.AddArg2(x, y)
 23343  			v0.AddArg2(a, v1)
 23344  			b.resetWithControl(BlockARM64GTnoov, v0)
 23345  			return true
 23346  		}
 23347  		// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
 23348  		// cond: z.Uses==1
 23349  		// result: (GTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23350  		for b.Controls[0].Op == OpARM64CMPWconst {
 23351  			v_0 := b.Controls[0]
 23352  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23353  				break
 23354  			}
 23355  			z := v_0.Args[0]
 23356  			if z.Op != OpARM64MADDW {
 23357  				break
 23358  			}
 23359  			y := z.Args[2]
 23360  			a := z.Args[0]
 23361  			x := z.Args[1]
 23362  			if !(z.Uses == 1) {
 23363  				break
 23364  			}
 23365  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23366  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23367  			v1.AddArg2(x, y)
 23368  			v0.AddArg2(a, v1)
 23369  			b.resetWithControl(BlockARM64GTnoov, v0)
 23370  			return true
 23371  		}
 23372  		// match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23373  		// cond: z.Uses==1
 23374  		// result: (GTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23375  		for b.Controls[0].Op == OpARM64CMPWconst {
 23376  			v_0 := b.Controls[0]
 23377  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23378  				break
 23379  			}
 23380  			z := v_0.Args[0]
 23381  			if z.Op != OpARM64MSUBW {
 23382  				break
 23383  			}
 23384  			y := z.Args[2]
 23385  			a := z.Args[0]
 23386  			x := z.Args[1]
 23387  			if !(z.Uses == 1) {
 23388  				break
 23389  			}
 23390  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23391  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23392  			v1.AddArg2(x, y)
 23393  			v0.AddArg2(a, v1)
 23394  			b.resetWithControl(BlockARM64GTnoov, v0)
 23395  			return true
 23396  		}
 23397  		// match: (GT (FlagConstant [fc]) yes no)
 23398  		// cond: fc.gt()
 23399  		// result: (First yes no)
 23400  		for b.Controls[0].Op == OpARM64FlagConstant {
 23401  			v_0 := b.Controls[0]
 23402  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23403  			if !(fc.gt()) {
 23404  				break
 23405  			}
 23406  			b.Reset(BlockFirst)
 23407  			return true
 23408  		}
 23409  		// match: (GT (FlagConstant [fc]) yes no)
 23410  		// cond: !fc.gt()
 23411  		// result: (First no yes)
 23412  		for b.Controls[0].Op == OpARM64FlagConstant {
 23413  			v_0 := b.Controls[0]
 23414  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23415  			if !(!fc.gt()) {
 23416  				break
 23417  			}
 23418  			b.Reset(BlockFirst)
 23419  			b.swapSuccessors()
 23420  			return true
 23421  		}
 23422  		// match: (GT (InvertFlags cmp) yes no)
 23423  		// result: (LT cmp yes no)
 23424  		for b.Controls[0].Op == OpARM64InvertFlags {
 23425  			v_0 := b.Controls[0]
 23426  			cmp := v_0.Args[0]
 23427  			b.resetWithControl(BlockARM64LT, cmp)
 23428  			return true
 23429  		}
 23430  	case BlockARM64GTnoov:
 23431  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23432  		// cond: fc.gtNoov()
 23433  		// result: (First yes no)
 23434  		for b.Controls[0].Op == OpARM64FlagConstant {
 23435  			v_0 := b.Controls[0]
 23436  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23437  			if !(fc.gtNoov()) {
 23438  				break
 23439  			}
 23440  			b.Reset(BlockFirst)
 23441  			return true
 23442  		}
 23443  		// match: (GTnoov (FlagConstant [fc]) yes no)
 23444  		// cond: !fc.gtNoov()
 23445  		// result: (First no yes)
 23446  		for b.Controls[0].Op == OpARM64FlagConstant {
 23447  			v_0 := b.Controls[0]
 23448  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23449  			if !(!fc.gtNoov()) {
 23450  				break
 23451  			}
 23452  			b.Reset(BlockFirst)
 23453  			b.swapSuccessors()
 23454  			return true
 23455  		}
 23456  		// match: (GTnoov (InvertFlags cmp) yes no)
 23457  		// result: (LTnoov cmp yes no)
 23458  		for b.Controls[0].Op == OpARM64InvertFlags {
 23459  			v_0 := b.Controls[0]
 23460  			cmp := v_0.Args[0]
 23461  			b.resetWithControl(BlockARM64LTnoov, cmp)
 23462  			return true
 23463  		}
 23464  	case BlockIf:
 23465  		// match: (If (Equal cc) yes no)
 23466  		// result: (EQ cc yes no)
 23467  		for b.Controls[0].Op == OpARM64Equal {
 23468  			v_0 := b.Controls[0]
 23469  			cc := v_0.Args[0]
 23470  			b.resetWithControl(BlockARM64EQ, cc)
 23471  			return true
 23472  		}
 23473  		// match: (If (NotEqual cc) yes no)
 23474  		// result: (NE cc yes no)
 23475  		for b.Controls[0].Op == OpARM64NotEqual {
 23476  			v_0 := b.Controls[0]
 23477  			cc := v_0.Args[0]
 23478  			b.resetWithControl(BlockARM64NE, cc)
 23479  			return true
 23480  		}
 23481  		// match: (If (LessThan cc) yes no)
 23482  		// result: (LT cc yes no)
 23483  		for b.Controls[0].Op == OpARM64LessThan {
 23484  			v_0 := b.Controls[0]
 23485  			cc := v_0.Args[0]
 23486  			b.resetWithControl(BlockARM64LT, cc)
 23487  			return true
 23488  		}
 23489  		// match: (If (LessThanU cc) yes no)
 23490  		// result: (ULT cc yes no)
 23491  		for b.Controls[0].Op == OpARM64LessThanU {
 23492  			v_0 := b.Controls[0]
 23493  			cc := v_0.Args[0]
 23494  			b.resetWithControl(BlockARM64ULT, cc)
 23495  			return true
 23496  		}
 23497  		// match: (If (LessEqual cc) yes no)
 23498  		// result: (LE cc yes no)
 23499  		for b.Controls[0].Op == OpARM64LessEqual {
 23500  			v_0 := b.Controls[0]
 23501  			cc := v_0.Args[0]
 23502  			b.resetWithControl(BlockARM64LE, cc)
 23503  			return true
 23504  		}
 23505  		// match: (If (LessEqualU cc) yes no)
 23506  		// result: (ULE cc yes no)
 23507  		for b.Controls[0].Op == OpARM64LessEqualU {
 23508  			v_0 := b.Controls[0]
 23509  			cc := v_0.Args[0]
 23510  			b.resetWithControl(BlockARM64ULE, cc)
 23511  			return true
 23512  		}
 23513  		// match: (If (GreaterThan cc) yes no)
 23514  		// result: (GT cc yes no)
 23515  		for b.Controls[0].Op == OpARM64GreaterThan {
 23516  			v_0 := b.Controls[0]
 23517  			cc := v_0.Args[0]
 23518  			b.resetWithControl(BlockARM64GT, cc)
 23519  			return true
 23520  		}
 23521  		// match: (If (GreaterThanU cc) yes no)
 23522  		// result: (UGT cc yes no)
 23523  		for b.Controls[0].Op == OpARM64GreaterThanU {
 23524  			v_0 := b.Controls[0]
 23525  			cc := v_0.Args[0]
 23526  			b.resetWithControl(BlockARM64UGT, cc)
 23527  			return true
 23528  		}
 23529  		// match: (If (GreaterEqual cc) yes no)
 23530  		// result: (GE cc yes no)
 23531  		for b.Controls[0].Op == OpARM64GreaterEqual {
 23532  			v_0 := b.Controls[0]
 23533  			cc := v_0.Args[0]
 23534  			b.resetWithControl(BlockARM64GE, cc)
 23535  			return true
 23536  		}
 23537  		// match: (If (GreaterEqualU cc) yes no)
 23538  		// result: (UGE cc yes no)
 23539  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 23540  			v_0 := b.Controls[0]
 23541  			cc := v_0.Args[0]
 23542  			b.resetWithControl(BlockARM64UGE, cc)
 23543  			return true
 23544  		}
 23545  		// match: (If (LessThanF cc) yes no)
 23546  		// result: (FLT cc yes no)
 23547  		for b.Controls[0].Op == OpARM64LessThanF {
 23548  			v_0 := b.Controls[0]
 23549  			cc := v_0.Args[0]
 23550  			b.resetWithControl(BlockARM64FLT, cc)
 23551  			return true
 23552  		}
 23553  		// match: (If (LessEqualF cc) yes no)
 23554  		// result: (FLE cc yes no)
 23555  		for b.Controls[0].Op == OpARM64LessEqualF {
 23556  			v_0 := b.Controls[0]
 23557  			cc := v_0.Args[0]
 23558  			b.resetWithControl(BlockARM64FLE, cc)
 23559  			return true
 23560  		}
 23561  		// match: (If (GreaterThanF cc) yes no)
 23562  		// result: (FGT cc yes no)
 23563  		for b.Controls[0].Op == OpARM64GreaterThanF {
 23564  			v_0 := b.Controls[0]
 23565  			cc := v_0.Args[0]
 23566  			b.resetWithControl(BlockARM64FGT, cc)
 23567  			return true
 23568  		}
 23569  		// match: (If (GreaterEqualF cc) yes no)
 23570  		// result: (FGE cc yes no)
 23571  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 23572  			v_0 := b.Controls[0]
 23573  			cc := v_0.Args[0]
 23574  			b.resetWithControl(BlockARM64FGE, cc)
 23575  			return true
 23576  		}
 23577  		// match: (If cond yes no)
 23578  		// result: (TBNZ [0] cond yes no)
 23579  		for {
 23580  			cond := b.Controls[0]
 23581  			b.resetWithControl(BlockARM64TBNZ, cond)
 23582  			b.AuxInt = int64ToAuxInt(0)
 23583  			return true
 23584  		}
 23585  	case BlockJumpTable:
 23586  		// match: (JumpTable idx)
 23587  		// result: (JUMPTABLE {makeJumpTableSym(b)} idx (MOVDaddr <typ.Uintptr> {makeJumpTableSym(b)} (SB)))
 23588  		for {
 23589  			idx := b.Controls[0]
 23590  			v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
 23591  			v0.Aux = symToAux(makeJumpTableSym(b))
 23592  			v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
 23593  			v0.AddArg(v1)
 23594  			b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
 23595  			b.Aux = symToAux(makeJumpTableSym(b))
 23596  			return true
 23597  		}
 23598  	case BlockARM64LE:
 23599  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 23600  		// cond: z.Uses == 1
 23601  		// result: (LE (TST x y) yes no)
 23602  		for b.Controls[0].Op == OpARM64CMPconst {
 23603  			v_0 := b.Controls[0]
 23604  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23605  				break
 23606  			}
 23607  			z := v_0.Args[0]
 23608  			if z.Op != OpARM64AND {
 23609  				break
 23610  			}
 23611  			_ = z.Args[1]
 23612  			z_0 := z.Args[0]
 23613  			z_1 := z.Args[1]
 23614  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23615  				x := z_0
 23616  				y := z_1
 23617  				if !(z.Uses == 1) {
 23618  					continue
 23619  				}
 23620  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23621  				v0.AddArg2(x, y)
 23622  				b.resetWithControl(BlockARM64LE, v0)
 23623  				return true
 23624  			}
 23625  			break
 23626  		}
 23627  		// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 23628  		// cond: x.Uses == 1
 23629  		// result: (LE (TSTconst [c] y) yes no)
 23630  		for b.Controls[0].Op == OpARM64CMPconst {
 23631  			v_0 := b.Controls[0]
 23632  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23633  				break
 23634  			}
 23635  			x := v_0.Args[0]
 23636  			if x.Op != OpARM64ANDconst {
 23637  				break
 23638  			}
 23639  			c := auxIntToInt64(x.AuxInt)
 23640  			y := x.Args[0]
 23641  			if !(x.Uses == 1) {
 23642  				break
 23643  			}
 23644  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 23645  			v0.AuxInt = int64ToAuxInt(c)
 23646  			v0.AddArg(y)
 23647  			b.resetWithControl(BlockARM64LE, v0)
 23648  			return true
 23649  		}
 23650  		// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
 23651  		// cond: z.Uses == 1
 23652  		// result: (LE (TSTW x y) yes no)
 23653  		for b.Controls[0].Op == OpARM64CMPWconst {
 23654  			v_0 := b.Controls[0]
 23655  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23656  				break
 23657  			}
 23658  			z := v_0.Args[0]
 23659  			if z.Op != OpARM64AND {
 23660  				break
 23661  			}
 23662  			_ = z.Args[1]
 23663  			z_0 := z.Args[0]
 23664  			z_1 := z.Args[1]
 23665  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23666  				x := z_0
 23667  				y := z_1
 23668  				if !(z.Uses == 1) {
 23669  					continue
 23670  				}
 23671  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 23672  				v0.AddArg2(x, y)
 23673  				b.resetWithControl(BlockARM64LE, v0)
 23674  				return true
 23675  			}
 23676  			break
 23677  		}
 23678  		// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 23679  		// cond: x.Uses == 1
 23680  		// result: (LE (TSTWconst [int32(c)] y) yes no)
 23681  		for b.Controls[0].Op == OpARM64CMPWconst {
 23682  			v_0 := b.Controls[0]
 23683  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23684  				break
 23685  			}
 23686  			x := v_0.Args[0]
 23687  			if x.Op != OpARM64ANDconst {
 23688  				break
 23689  			}
 23690  			c := auxIntToInt64(x.AuxInt)
 23691  			y := x.Args[0]
 23692  			if !(x.Uses == 1) {
 23693  				break
 23694  			}
 23695  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 23696  			v0.AuxInt = int32ToAuxInt(int32(c))
 23697  			v0.AddArg(y)
 23698  			b.resetWithControl(BlockARM64LE, v0)
 23699  			return true
 23700  		}
 23701  		// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 23702  		// cond: x.Uses == 1
 23703  		// result: (LEnoov (CMNconst [c] y) yes no)
 23704  		for b.Controls[0].Op == OpARM64CMPconst {
 23705  			v_0 := b.Controls[0]
 23706  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23707  				break
 23708  			}
 23709  			x := v_0.Args[0]
 23710  			if x.Op != OpARM64ADDconst {
 23711  				break
 23712  			}
 23713  			c := auxIntToInt64(x.AuxInt)
 23714  			y := x.Args[0]
 23715  			if !(x.Uses == 1) {
 23716  				break
 23717  			}
 23718  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 23719  			v0.AuxInt = int64ToAuxInt(c)
 23720  			v0.AddArg(y)
 23721  			b.resetWithControl(BlockARM64LEnoov, v0)
 23722  			return true
 23723  		}
 23724  		// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 23725  		// cond: x.Uses == 1
 23726  		// result: (LEnoov (CMNWconst [int32(c)] y) yes no)
 23727  		for b.Controls[0].Op == OpARM64CMPWconst {
 23728  			v_0 := b.Controls[0]
 23729  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23730  				break
 23731  			}
 23732  			x := v_0.Args[0]
 23733  			if x.Op != OpARM64ADDconst {
 23734  				break
 23735  			}
 23736  			c := auxIntToInt64(x.AuxInt)
 23737  			y := x.Args[0]
 23738  			if !(x.Uses == 1) {
 23739  				break
 23740  			}
 23741  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 23742  			v0.AuxInt = int32ToAuxInt(int32(c))
 23743  			v0.AddArg(y)
 23744  			b.resetWithControl(BlockARM64LEnoov, v0)
 23745  			return true
 23746  		}
 23747  		// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
 23748  		// cond: z.Uses == 1
 23749  		// result: (LEnoov (CMN x y) yes no)
 23750  		for b.Controls[0].Op == OpARM64CMPconst {
 23751  			v_0 := b.Controls[0]
 23752  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23753  				break
 23754  			}
 23755  			z := v_0.Args[0]
 23756  			if z.Op != OpARM64ADD {
 23757  				break
 23758  			}
 23759  			_ = z.Args[1]
 23760  			z_0 := z.Args[0]
 23761  			z_1 := z.Args[1]
 23762  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23763  				x := z_0
 23764  				y := z_1
 23765  				if !(z.Uses == 1) {
 23766  					continue
 23767  				}
 23768  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23769  				v0.AddArg2(x, y)
 23770  				b.resetWithControl(BlockARM64LEnoov, v0)
 23771  				return true
 23772  			}
 23773  			break
 23774  		}
 23775  		// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
 23776  		// cond: z.Uses == 1
 23777  		// result: (LEnoov (CMNW x y) yes no)
 23778  		for b.Controls[0].Op == OpARM64CMPWconst {
 23779  			v_0 := b.Controls[0]
 23780  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23781  				break
 23782  			}
 23783  			z := v_0.Args[0]
 23784  			if z.Op != OpARM64ADD {
 23785  				break
 23786  			}
 23787  			_ = z.Args[1]
 23788  			z_0 := z.Args[0]
 23789  			z_1 := z.Args[1]
 23790  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23791  				x := z_0
 23792  				y := z_1
 23793  				if !(z.Uses == 1) {
 23794  					continue
 23795  				}
 23796  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23797  				v0.AddArg2(x, y)
 23798  				b.resetWithControl(BlockARM64LEnoov, v0)
 23799  				return true
 23800  			}
 23801  			break
 23802  		}
 23803  		// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
 23804  		// cond: z.Uses==1
 23805  		// result: (LEnoov (CMN a (MUL <x.Type> x y)) yes no)
 23806  		for b.Controls[0].Op == OpARM64CMPconst {
 23807  			v_0 := b.Controls[0]
 23808  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23809  				break
 23810  			}
 23811  			z := v_0.Args[0]
 23812  			if z.Op != OpARM64MADD {
 23813  				break
 23814  			}
 23815  			y := z.Args[2]
 23816  			a := z.Args[0]
 23817  			x := z.Args[1]
 23818  			if !(z.Uses == 1) {
 23819  				break
 23820  			}
 23821  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 23822  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23823  			v1.AddArg2(x, y)
 23824  			v0.AddArg2(a, v1)
 23825  			b.resetWithControl(BlockARM64LEnoov, v0)
 23826  			return true
 23827  		}
 23828  		// match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
 23829  		// cond: z.Uses==1
 23830  		// result: (LEnoov (CMP a (MUL <x.Type> x y)) yes no)
 23831  		for b.Controls[0].Op == OpARM64CMPconst {
 23832  			v_0 := b.Controls[0]
 23833  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23834  				break
 23835  			}
 23836  			z := v_0.Args[0]
 23837  			if z.Op != OpARM64MSUB {
 23838  				break
 23839  			}
 23840  			y := z.Args[2]
 23841  			a := z.Args[0]
 23842  			x := z.Args[1]
 23843  			if !(z.Uses == 1) {
 23844  				break
 23845  			}
 23846  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 23847  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 23848  			v1.AddArg2(x, y)
 23849  			v0.AddArg2(a, v1)
 23850  			b.resetWithControl(BlockARM64LEnoov, v0)
 23851  			return true
 23852  		}
 23853  		// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
 23854  		// cond: z.Uses==1
 23855  		// result: (LEnoov (CMNW a (MULW <x.Type> x y)) yes no)
 23856  		for b.Controls[0].Op == OpARM64CMPWconst {
 23857  			v_0 := b.Controls[0]
 23858  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23859  				break
 23860  			}
 23861  			z := v_0.Args[0]
 23862  			if z.Op != OpARM64MADDW {
 23863  				break
 23864  			}
 23865  			y := z.Args[2]
 23866  			a := z.Args[0]
 23867  			x := z.Args[1]
 23868  			if !(z.Uses == 1) {
 23869  				break
 23870  			}
 23871  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 23872  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23873  			v1.AddArg2(x, y)
 23874  			v0.AddArg2(a, v1)
 23875  			b.resetWithControl(BlockARM64LEnoov, v0)
 23876  			return true
 23877  		}
 23878  		// match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 23879  		// cond: z.Uses==1
 23880  		// result: (LEnoov (CMPW a (MULW <x.Type> x y)) yes no)
 23881  		for b.Controls[0].Op == OpARM64CMPWconst {
 23882  			v_0 := b.Controls[0]
 23883  			if auxIntToInt32(v_0.AuxInt) != 0 {
 23884  				break
 23885  			}
 23886  			z := v_0.Args[0]
 23887  			if z.Op != OpARM64MSUBW {
 23888  				break
 23889  			}
 23890  			y := z.Args[2]
 23891  			a := z.Args[0]
 23892  			x := z.Args[1]
 23893  			if !(z.Uses == 1) {
 23894  				break
 23895  			}
 23896  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 23897  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 23898  			v1.AddArg2(x, y)
 23899  			v0.AddArg2(a, v1)
 23900  			b.resetWithControl(BlockARM64LEnoov, v0)
 23901  			return true
 23902  		}
 23903  		// match: (LE (FlagConstant [fc]) yes no)
 23904  		// cond: fc.le()
 23905  		// result: (First yes no)
 23906  		for b.Controls[0].Op == OpARM64FlagConstant {
 23907  			v_0 := b.Controls[0]
 23908  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23909  			if !(fc.le()) {
 23910  				break
 23911  			}
 23912  			b.Reset(BlockFirst)
 23913  			return true
 23914  		}
 23915  		// match: (LE (FlagConstant [fc]) yes no)
 23916  		// cond: !fc.le()
 23917  		// result: (First no yes)
 23918  		for b.Controls[0].Op == OpARM64FlagConstant {
 23919  			v_0 := b.Controls[0]
 23920  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23921  			if !(!fc.le()) {
 23922  				break
 23923  			}
 23924  			b.Reset(BlockFirst)
 23925  			b.swapSuccessors()
 23926  			return true
 23927  		}
 23928  		// match: (LE (InvertFlags cmp) yes no)
 23929  		// result: (GE cmp yes no)
 23930  		for b.Controls[0].Op == OpARM64InvertFlags {
 23931  			v_0 := b.Controls[0]
 23932  			cmp := v_0.Args[0]
 23933  			b.resetWithControl(BlockARM64GE, cmp)
 23934  			return true
 23935  		}
 23936  	case BlockARM64LEnoov:
 23937  		// match: (LEnoov (FlagConstant [fc]) yes no)
 23938  		// cond: fc.leNoov()
 23939  		// result: (First yes no)
 23940  		for b.Controls[0].Op == OpARM64FlagConstant {
 23941  			v_0 := b.Controls[0]
 23942  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23943  			if !(fc.leNoov()) {
 23944  				break
 23945  			}
 23946  			b.Reset(BlockFirst)
 23947  			return true
 23948  		}
 23949  		// match: (LEnoov (FlagConstant [fc]) yes no)
 23950  		// cond: !fc.leNoov()
 23951  		// result: (First no yes)
 23952  		for b.Controls[0].Op == OpARM64FlagConstant {
 23953  			v_0 := b.Controls[0]
 23954  			fc := auxIntToFlagConstant(v_0.AuxInt)
 23955  			if !(!fc.leNoov()) {
 23956  				break
 23957  			}
 23958  			b.Reset(BlockFirst)
 23959  			b.swapSuccessors()
 23960  			return true
 23961  		}
 23962  		// match: (LEnoov (InvertFlags cmp) yes no)
 23963  		// result: (GEnoov cmp yes no)
 23964  		for b.Controls[0].Op == OpARM64InvertFlags {
 23965  			v_0 := b.Controls[0]
 23966  			cmp := v_0.Args[0]
 23967  			b.resetWithControl(BlockARM64GEnoov, cmp)
 23968  			return true
 23969  		}
 23970  	case BlockARM64LT:
 23971  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 23972  		// cond: z.Uses == 1
 23973  		// result: (LT (TST x y) yes no)
 23974  		for b.Controls[0].Op == OpARM64CMPconst {
 23975  			v_0 := b.Controls[0]
 23976  			if auxIntToInt64(v_0.AuxInt) != 0 {
 23977  				break
 23978  			}
 23979  			z := v_0.Args[0]
 23980  			if z.Op != OpARM64AND {
 23981  				break
 23982  			}
 23983  			_ = z.Args[1]
 23984  			z_0 := z.Args[0]
 23985  			z_1 := z.Args[1]
 23986  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 23987  				x := z_0
 23988  				y := z_1
 23989  				if !(z.Uses == 1) {
 23990  					continue
 23991  				}
 23992  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 23993  				v0.AddArg2(x, y)
 23994  				b.resetWithControl(BlockARM64LT, v0)
 23995  				return true
 23996  			}
 23997  			break
 23998  		}
 23999  		// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24000  		// cond: x.Uses == 1
 24001  		// result: (LT (TSTconst [c] y) yes no)
 24002  		for b.Controls[0].Op == OpARM64CMPconst {
 24003  			v_0 := b.Controls[0]
 24004  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24005  				break
 24006  			}
 24007  			x := v_0.Args[0]
 24008  			if x.Op != OpARM64ANDconst {
 24009  				break
 24010  			}
 24011  			c := auxIntToInt64(x.AuxInt)
 24012  			y := x.Args[0]
 24013  			if !(x.Uses == 1) {
 24014  				break
 24015  			}
 24016  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24017  			v0.AuxInt = int64ToAuxInt(c)
 24018  			v0.AddArg(y)
 24019  			b.resetWithControl(BlockARM64LT, v0)
 24020  			return true
 24021  		}
 24022  		// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
 24023  		// cond: z.Uses == 1
 24024  		// result: (LT (TSTW x y) yes no)
 24025  		for b.Controls[0].Op == OpARM64CMPWconst {
 24026  			v_0 := b.Controls[0]
 24027  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24028  				break
 24029  			}
 24030  			z := v_0.Args[0]
 24031  			if z.Op != OpARM64AND {
 24032  				break
 24033  			}
 24034  			_ = z.Args[1]
 24035  			z_0 := z.Args[0]
 24036  			z_1 := z.Args[1]
 24037  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24038  				x := z_0
 24039  				y := z_1
 24040  				if !(z.Uses == 1) {
 24041  					continue
 24042  				}
 24043  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24044  				v0.AddArg2(x, y)
 24045  				b.resetWithControl(BlockARM64LT, v0)
 24046  				return true
 24047  			}
 24048  			break
 24049  		}
 24050  		// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24051  		// cond: x.Uses == 1
 24052  		// result: (LT (TSTWconst [int32(c)] y) yes no)
 24053  		for b.Controls[0].Op == OpARM64CMPWconst {
 24054  			v_0 := b.Controls[0]
 24055  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24056  				break
 24057  			}
 24058  			x := v_0.Args[0]
 24059  			if x.Op != OpARM64ANDconst {
 24060  				break
 24061  			}
 24062  			c := auxIntToInt64(x.AuxInt)
 24063  			y := x.Args[0]
 24064  			if !(x.Uses == 1) {
 24065  				break
 24066  			}
 24067  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24068  			v0.AuxInt = int32ToAuxInt(int32(c))
 24069  			v0.AddArg(y)
 24070  			b.resetWithControl(BlockARM64LT, v0)
 24071  			return true
 24072  		}
 24073  		// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24074  		// cond: x.Uses == 1
 24075  		// result: (LTnoov (CMNconst [c] y) yes no)
 24076  		for b.Controls[0].Op == OpARM64CMPconst {
 24077  			v_0 := b.Controls[0]
 24078  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24079  				break
 24080  			}
 24081  			x := v_0.Args[0]
 24082  			if x.Op != OpARM64ADDconst {
 24083  				break
 24084  			}
 24085  			c := auxIntToInt64(x.AuxInt)
 24086  			y := x.Args[0]
 24087  			if !(x.Uses == 1) {
 24088  				break
 24089  			}
 24090  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24091  			v0.AuxInt = int64ToAuxInt(c)
 24092  			v0.AddArg(y)
 24093  			b.resetWithControl(BlockARM64LTnoov, v0)
 24094  			return true
 24095  		}
 24096  		// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24097  		// cond: x.Uses == 1
 24098  		// result: (LTnoov (CMNWconst [int32(c)] y) yes no)
 24099  		for b.Controls[0].Op == OpARM64CMPWconst {
 24100  			v_0 := b.Controls[0]
 24101  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24102  				break
 24103  			}
 24104  			x := v_0.Args[0]
 24105  			if x.Op != OpARM64ADDconst {
 24106  				break
 24107  			}
 24108  			c := auxIntToInt64(x.AuxInt)
 24109  			y := x.Args[0]
 24110  			if !(x.Uses == 1) {
 24111  				break
 24112  			}
 24113  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24114  			v0.AuxInt = int32ToAuxInt(int32(c))
 24115  			v0.AddArg(y)
 24116  			b.resetWithControl(BlockARM64LTnoov, v0)
 24117  			return true
 24118  		}
 24119  		// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
 24120  		// cond: z.Uses == 1
 24121  		// result: (LTnoov (CMN x y) yes no)
 24122  		for b.Controls[0].Op == OpARM64CMPconst {
 24123  			v_0 := b.Controls[0]
 24124  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24125  				break
 24126  			}
 24127  			z := v_0.Args[0]
 24128  			if z.Op != OpARM64ADD {
 24129  				break
 24130  			}
 24131  			_ = z.Args[1]
 24132  			z_0 := z.Args[0]
 24133  			z_1 := z.Args[1]
 24134  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24135  				x := z_0
 24136  				y := z_1
 24137  				if !(z.Uses == 1) {
 24138  					continue
 24139  				}
 24140  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24141  				v0.AddArg2(x, y)
 24142  				b.resetWithControl(BlockARM64LTnoov, v0)
 24143  				return true
 24144  			}
 24145  			break
 24146  		}
 24147  		// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
 24148  		// cond: z.Uses == 1
 24149  		// result: (LTnoov (CMNW x y) yes no)
 24150  		for b.Controls[0].Op == OpARM64CMPWconst {
 24151  			v_0 := b.Controls[0]
 24152  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24153  				break
 24154  			}
 24155  			z := v_0.Args[0]
 24156  			if z.Op != OpARM64ADD {
 24157  				break
 24158  			}
 24159  			_ = z.Args[1]
 24160  			z_0 := z.Args[0]
 24161  			z_1 := z.Args[1]
 24162  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24163  				x := z_0
 24164  				y := z_1
 24165  				if !(z.Uses == 1) {
 24166  					continue
 24167  				}
 24168  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24169  				v0.AddArg2(x, y)
 24170  				b.resetWithControl(BlockARM64LTnoov, v0)
 24171  				return true
 24172  			}
 24173  			break
 24174  		}
 24175  		// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
 24176  		// cond: z.Uses==1
 24177  		// result: (LTnoov (CMN a (MUL <x.Type> x y)) yes no)
 24178  		for b.Controls[0].Op == OpARM64CMPconst {
 24179  			v_0 := b.Controls[0]
 24180  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24181  				break
 24182  			}
 24183  			z := v_0.Args[0]
 24184  			if z.Op != OpARM64MADD {
 24185  				break
 24186  			}
 24187  			y := z.Args[2]
 24188  			a := z.Args[0]
 24189  			x := z.Args[1]
 24190  			if !(z.Uses == 1) {
 24191  				break
 24192  			}
 24193  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24194  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24195  			v1.AddArg2(x, y)
 24196  			v0.AddArg2(a, v1)
 24197  			b.resetWithControl(BlockARM64LTnoov, v0)
 24198  			return true
 24199  		}
 24200  		// match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
 24201  		// cond: z.Uses==1
 24202  		// result: (LTnoov (CMP a (MUL <x.Type> x y)) yes no)
 24203  		for b.Controls[0].Op == OpARM64CMPconst {
 24204  			v_0 := b.Controls[0]
 24205  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24206  				break
 24207  			}
 24208  			z := v_0.Args[0]
 24209  			if z.Op != OpARM64MSUB {
 24210  				break
 24211  			}
 24212  			y := z.Args[2]
 24213  			a := z.Args[0]
 24214  			x := z.Args[1]
 24215  			if !(z.Uses == 1) {
 24216  				break
 24217  			}
 24218  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24219  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24220  			v1.AddArg2(x, y)
 24221  			v0.AddArg2(a, v1)
 24222  			b.resetWithControl(BlockARM64LTnoov, v0)
 24223  			return true
 24224  		}
 24225  		// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
 24226  		// cond: z.Uses==1
 24227  		// result: (LTnoov (CMNW a (MULW <x.Type> x y)) yes no)
 24228  		for b.Controls[0].Op == OpARM64CMPWconst {
 24229  			v_0 := b.Controls[0]
 24230  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24231  				break
 24232  			}
 24233  			z := v_0.Args[0]
 24234  			if z.Op != OpARM64MADDW {
 24235  				break
 24236  			}
 24237  			y := z.Args[2]
 24238  			a := z.Args[0]
 24239  			x := z.Args[1]
 24240  			if !(z.Uses == 1) {
 24241  				break
 24242  			}
 24243  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24244  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24245  			v1.AddArg2(x, y)
 24246  			v0.AddArg2(a, v1)
 24247  			b.resetWithControl(BlockARM64LTnoov, v0)
 24248  			return true
 24249  		}
 24250  		// match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24251  		// cond: z.Uses==1
 24252  		// result: (LTnoov (CMPW a (MULW <x.Type> x y)) yes no)
 24253  		for b.Controls[0].Op == OpARM64CMPWconst {
 24254  			v_0 := b.Controls[0]
 24255  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24256  				break
 24257  			}
 24258  			z := v_0.Args[0]
 24259  			if z.Op != OpARM64MSUBW {
 24260  				break
 24261  			}
 24262  			y := z.Args[2]
 24263  			a := z.Args[0]
 24264  			x := z.Args[1]
 24265  			if !(z.Uses == 1) {
 24266  				break
 24267  			}
 24268  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24269  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24270  			v1.AddArg2(x, y)
 24271  			v0.AddArg2(a, v1)
 24272  			b.resetWithControl(BlockARM64LTnoov, v0)
 24273  			return true
 24274  		}
 24275  		// match: (LT (CMPWconst [0] x) yes no)
 24276  		// result: (TBNZ [31] x yes no)
 24277  		for b.Controls[0].Op == OpARM64CMPWconst {
 24278  			v_0 := b.Controls[0]
 24279  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24280  				break
 24281  			}
 24282  			x := v_0.Args[0]
 24283  			b.resetWithControl(BlockARM64TBNZ, x)
 24284  			b.AuxInt = int64ToAuxInt(31)
 24285  			return true
 24286  		}
 24287  		// match: (LT (CMPconst [0] x) yes no)
 24288  		// result: (TBNZ [63] x yes no)
 24289  		for b.Controls[0].Op == OpARM64CMPconst {
 24290  			v_0 := b.Controls[0]
 24291  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24292  				break
 24293  			}
 24294  			x := v_0.Args[0]
 24295  			b.resetWithControl(BlockARM64TBNZ, x)
 24296  			b.AuxInt = int64ToAuxInt(63)
 24297  			return true
 24298  		}
 24299  		// match: (LT (FlagConstant [fc]) yes no)
 24300  		// cond: fc.lt()
 24301  		// result: (First yes no)
 24302  		for b.Controls[0].Op == OpARM64FlagConstant {
 24303  			v_0 := b.Controls[0]
 24304  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24305  			if !(fc.lt()) {
 24306  				break
 24307  			}
 24308  			b.Reset(BlockFirst)
 24309  			return true
 24310  		}
 24311  		// match: (LT (FlagConstant [fc]) yes no)
 24312  		// cond: !fc.lt()
 24313  		// result: (First no yes)
 24314  		for b.Controls[0].Op == OpARM64FlagConstant {
 24315  			v_0 := b.Controls[0]
 24316  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24317  			if !(!fc.lt()) {
 24318  				break
 24319  			}
 24320  			b.Reset(BlockFirst)
 24321  			b.swapSuccessors()
 24322  			return true
 24323  		}
 24324  		// match: (LT (InvertFlags cmp) yes no)
 24325  		// result: (GT cmp yes no)
 24326  		for b.Controls[0].Op == OpARM64InvertFlags {
 24327  			v_0 := b.Controls[0]
 24328  			cmp := v_0.Args[0]
 24329  			b.resetWithControl(BlockARM64GT, cmp)
 24330  			return true
 24331  		}
 24332  	case BlockARM64LTnoov:
 24333  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24334  		// cond: fc.ltNoov()
 24335  		// result: (First yes no)
 24336  		for b.Controls[0].Op == OpARM64FlagConstant {
 24337  			v_0 := b.Controls[0]
 24338  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24339  			if !(fc.ltNoov()) {
 24340  				break
 24341  			}
 24342  			b.Reset(BlockFirst)
 24343  			return true
 24344  		}
 24345  		// match: (LTnoov (FlagConstant [fc]) yes no)
 24346  		// cond: !fc.ltNoov()
 24347  		// result: (First no yes)
 24348  		for b.Controls[0].Op == OpARM64FlagConstant {
 24349  			v_0 := b.Controls[0]
 24350  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24351  			if !(!fc.ltNoov()) {
 24352  				break
 24353  			}
 24354  			b.Reset(BlockFirst)
 24355  			b.swapSuccessors()
 24356  			return true
 24357  		}
 24358  		// match: (LTnoov (InvertFlags cmp) yes no)
 24359  		// result: (GTnoov cmp yes no)
 24360  		for b.Controls[0].Op == OpARM64InvertFlags {
 24361  			v_0 := b.Controls[0]
 24362  			cmp := v_0.Args[0]
 24363  			b.resetWithControl(BlockARM64GTnoov, cmp)
 24364  			return true
 24365  		}
 24366  	case BlockARM64NE:
 24367  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 24368  		// cond: z.Uses == 1
 24369  		// result: (NE (TST x y) yes no)
 24370  		for b.Controls[0].Op == OpARM64CMPconst {
 24371  			v_0 := b.Controls[0]
 24372  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24373  				break
 24374  			}
 24375  			z := v_0.Args[0]
 24376  			if z.Op != OpARM64AND {
 24377  				break
 24378  			}
 24379  			_ = z.Args[1]
 24380  			z_0 := z.Args[0]
 24381  			z_1 := z.Args[1]
 24382  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24383  				x := z_0
 24384  				y := z_1
 24385  				if !(z.Uses == 1) {
 24386  					continue
 24387  				}
 24388  				v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
 24389  				v0.AddArg2(x, y)
 24390  				b.resetWithControl(BlockARM64NE, v0)
 24391  				return true
 24392  			}
 24393  			break
 24394  		}
 24395  		// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
 24396  		// cond: x.Uses == 1
 24397  		// result: (NE (TSTconst [c] y) yes no)
 24398  		for b.Controls[0].Op == OpARM64CMPconst {
 24399  			v_0 := b.Controls[0]
 24400  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24401  				break
 24402  			}
 24403  			x := v_0.Args[0]
 24404  			if x.Op != OpARM64ANDconst {
 24405  				break
 24406  			}
 24407  			c := auxIntToInt64(x.AuxInt)
 24408  			y := x.Args[0]
 24409  			if !(x.Uses == 1) {
 24410  				break
 24411  			}
 24412  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
 24413  			v0.AuxInt = int64ToAuxInt(c)
 24414  			v0.AddArg(y)
 24415  			b.resetWithControl(BlockARM64NE, v0)
 24416  			return true
 24417  		}
 24418  		// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
 24419  		// cond: z.Uses == 1
 24420  		// result: (NE (TSTW x y) yes no)
 24421  		for b.Controls[0].Op == OpARM64CMPWconst {
 24422  			v_0 := b.Controls[0]
 24423  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24424  				break
 24425  			}
 24426  			z := v_0.Args[0]
 24427  			if z.Op != OpARM64AND {
 24428  				break
 24429  			}
 24430  			_ = z.Args[1]
 24431  			z_0 := z.Args[0]
 24432  			z_1 := z.Args[1]
 24433  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24434  				x := z_0
 24435  				y := z_1
 24436  				if !(z.Uses == 1) {
 24437  					continue
 24438  				}
 24439  				v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
 24440  				v0.AddArg2(x, y)
 24441  				b.resetWithControl(BlockARM64NE, v0)
 24442  				return true
 24443  			}
 24444  			break
 24445  		}
 24446  		// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
 24447  		// cond: x.Uses == 1
 24448  		// result: (NE (TSTWconst [int32(c)] y) yes no)
 24449  		for b.Controls[0].Op == OpARM64CMPWconst {
 24450  			v_0 := b.Controls[0]
 24451  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24452  				break
 24453  			}
 24454  			x := v_0.Args[0]
 24455  			if x.Op != OpARM64ANDconst {
 24456  				break
 24457  			}
 24458  			c := auxIntToInt64(x.AuxInt)
 24459  			y := x.Args[0]
 24460  			if !(x.Uses == 1) {
 24461  				break
 24462  			}
 24463  			v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
 24464  			v0.AuxInt = int32ToAuxInt(int32(c))
 24465  			v0.AddArg(y)
 24466  			b.resetWithControl(BlockARM64NE, v0)
 24467  			return true
 24468  		}
 24469  		// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
 24470  		// cond: x.Uses == 1
 24471  		// result: (NE (CMNconst [c] y) yes no)
 24472  		for b.Controls[0].Op == OpARM64CMPconst {
 24473  			v_0 := b.Controls[0]
 24474  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24475  				break
 24476  			}
 24477  			x := v_0.Args[0]
 24478  			if x.Op != OpARM64ADDconst {
 24479  				break
 24480  			}
 24481  			c := auxIntToInt64(x.AuxInt)
 24482  			y := x.Args[0]
 24483  			if !(x.Uses == 1) {
 24484  				break
 24485  			}
 24486  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
 24487  			v0.AuxInt = int64ToAuxInt(c)
 24488  			v0.AddArg(y)
 24489  			b.resetWithControl(BlockARM64NE, v0)
 24490  			return true
 24491  		}
 24492  		// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
 24493  		// cond: x.Uses == 1
 24494  		// result: (NE (CMNWconst [int32(c)] y) yes no)
 24495  		for b.Controls[0].Op == OpARM64CMPWconst {
 24496  			v_0 := b.Controls[0]
 24497  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24498  				break
 24499  			}
 24500  			x := v_0.Args[0]
 24501  			if x.Op != OpARM64ADDconst {
 24502  				break
 24503  			}
 24504  			c := auxIntToInt64(x.AuxInt)
 24505  			y := x.Args[0]
 24506  			if !(x.Uses == 1) {
 24507  				break
 24508  			}
 24509  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
 24510  			v0.AuxInt = int32ToAuxInt(int32(c))
 24511  			v0.AddArg(y)
 24512  			b.resetWithControl(BlockARM64NE, v0)
 24513  			return true
 24514  		}
 24515  		// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
 24516  		// cond: z.Uses == 1
 24517  		// result: (NE (CMN x y) yes no)
 24518  		for b.Controls[0].Op == OpARM64CMPconst {
 24519  			v_0 := b.Controls[0]
 24520  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24521  				break
 24522  			}
 24523  			z := v_0.Args[0]
 24524  			if z.Op != OpARM64ADD {
 24525  				break
 24526  			}
 24527  			_ = z.Args[1]
 24528  			z_0 := z.Args[0]
 24529  			z_1 := z.Args[1]
 24530  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24531  				x := z_0
 24532  				y := z_1
 24533  				if !(z.Uses == 1) {
 24534  					continue
 24535  				}
 24536  				v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24537  				v0.AddArg2(x, y)
 24538  				b.resetWithControl(BlockARM64NE, v0)
 24539  				return true
 24540  			}
 24541  			break
 24542  		}
 24543  		// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
 24544  		// cond: z.Uses == 1
 24545  		// result: (NE (CMNW x y) yes no)
 24546  		for b.Controls[0].Op == OpARM64CMPWconst {
 24547  			v_0 := b.Controls[0]
 24548  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24549  				break
 24550  			}
 24551  			z := v_0.Args[0]
 24552  			if z.Op != OpARM64ADD {
 24553  				break
 24554  			}
 24555  			_ = z.Args[1]
 24556  			z_0 := z.Args[0]
 24557  			z_1 := z.Args[1]
 24558  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 24559  				x := z_0
 24560  				y := z_1
 24561  				if !(z.Uses == 1) {
 24562  					continue
 24563  				}
 24564  				v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24565  				v0.AddArg2(x, y)
 24566  				b.resetWithControl(BlockARM64NE, v0)
 24567  				return true
 24568  			}
 24569  			break
 24570  		}
 24571  		// match: (NE (CMP x z:(NEG y)) yes no)
 24572  		// cond: z.Uses == 1
 24573  		// result: (NE (CMN x y) yes no)
 24574  		for b.Controls[0].Op == OpARM64CMP {
 24575  			v_0 := b.Controls[0]
 24576  			_ = v_0.Args[1]
 24577  			x := v_0.Args[0]
 24578  			z := v_0.Args[1]
 24579  			if z.Op != OpARM64NEG {
 24580  				break
 24581  			}
 24582  			y := z.Args[0]
 24583  			if !(z.Uses == 1) {
 24584  				break
 24585  			}
 24586  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24587  			v0.AddArg2(x, y)
 24588  			b.resetWithControl(BlockARM64NE, v0)
 24589  			return true
 24590  		}
 24591  		// match: (NE (CMPW x z:(NEG y)) yes no)
 24592  		// cond: z.Uses == 1
 24593  		// result: (NE (CMNW x y) yes no)
 24594  		for b.Controls[0].Op == OpARM64CMPW {
 24595  			v_0 := b.Controls[0]
 24596  			_ = v_0.Args[1]
 24597  			x := v_0.Args[0]
 24598  			z := v_0.Args[1]
 24599  			if z.Op != OpARM64NEG {
 24600  				break
 24601  			}
 24602  			y := z.Args[0]
 24603  			if !(z.Uses == 1) {
 24604  				break
 24605  			}
 24606  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24607  			v0.AddArg2(x, y)
 24608  			b.resetWithControl(BlockARM64NE, v0)
 24609  			return true
 24610  		}
 24611  		// match: (NE (CMPconst [0] x) yes no)
 24612  		// result: (NZ x yes no)
 24613  		for b.Controls[0].Op == OpARM64CMPconst {
 24614  			v_0 := b.Controls[0]
 24615  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24616  				break
 24617  			}
 24618  			x := v_0.Args[0]
 24619  			b.resetWithControl(BlockARM64NZ, x)
 24620  			return true
 24621  		}
 24622  		// match: (NE (CMPWconst [0] x) yes no)
 24623  		// result: (NZW x yes no)
 24624  		for b.Controls[0].Op == OpARM64CMPWconst {
 24625  			v_0 := b.Controls[0]
 24626  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24627  				break
 24628  			}
 24629  			x := v_0.Args[0]
 24630  			b.resetWithControl(BlockARM64NZW, x)
 24631  			return true
 24632  		}
 24633  		// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
 24634  		// cond: z.Uses==1
 24635  		// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
 24636  		for b.Controls[0].Op == OpARM64CMPconst {
 24637  			v_0 := b.Controls[0]
 24638  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24639  				break
 24640  			}
 24641  			z := v_0.Args[0]
 24642  			if z.Op != OpARM64MADD {
 24643  				break
 24644  			}
 24645  			y := z.Args[2]
 24646  			a := z.Args[0]
 24647  			x := z.Args[1]
 24648  			if !(z.Uses == 1) {
 24649  				break
 24650  			}
 24651  			v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
 24652  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24653  			v1.AddArg2(x, y)
 24654  			v0.AddArg2(a, v1)
 24655  			b.resetWithControl(BlockARM64NE, v0)
 24656  			return true
 24657  		}
 24658  		// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
 24659  		// cond: z.Uses==1
 24660  		// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
 24661  		for b.Controls[0].Op == OpARM64CMPconst {
 24662  			v_0 := b.Controls[0]
 24663  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24664  				break
 24665  			}
 24666  			z := v_0.Args[0]
 24667  			if z.Op != OpARM64MSUB {
 24668  				break
 24669  			}
 24670  			y := z.Args[2]
 24671  			a := z.Args[0]
 24672  			x := z.Args[1]
 24673  			if !(z.Uses == 1) {
 24674  				break
 24675  			}
 24676  			v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
 24677  			v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
 24678  			v1.AddArg2(x, y)
 24679  			v0.AddArg2(a, v1)
 24680  			b.resetWithControl(BlockARM64NE, v0)
 24681  			return true
 24682  		}
 24683  		// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
 24684  		// cond: z.Uses==1
 24685  		// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
 24686  		for b.Controls[0].Op == OpARM64CMPWconst {
 24687  			v_0 := b.Controls[0]
 24688  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24689  				break
 24690  			}
 24691  			z := v_0.Args[0]
 24692  			if z.Op != OpARM64MADDW {
 24693  				break
 24694  			}
 24695  			y := z.Args[2]
 24696  			a := z.Args[0]
 24697  			x := z.Args[1]
 24698  			if !(z.Uses == 1) {
 24699  				break
 24700  			}
 24701  			v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
 24702  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24703  			v1.AddArg2(x, y)
 24704  			v0.AddArg2(a, v1)
 24705  			b.resetWithControl(BlockARM64NE, v0)
 24706  			return true
 24707  		}
 24708  		// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
 24709  		// cond: z.Uses==1
 24710  		// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
 24711  		for b.Controls[0].Op == OpARM64CMPWconst {
 24712  			v_0 := b.Controls[0]
 24713  			if auxIntToInt32(v_0.AuxInt) != 0 {
 24714  				break
 24715  			}
 24716  			z := v_0.Args[0]
 24717  			if z.Op != OpARM64MSUBW {
 24718  				break
 24719  			}
 24720  			y := z.Args[2]
 24721  			a := z.Args[0]
 24722  			x := z.Args[1]
 24723  			if !(z.Uses == 1) {
 24724  				break
 24725  			}
 24726  			v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
 24727  			v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
 24728  			v1.AddArg2(x, y)
 24729  			v0.AddArg2(a, v1)
 24730  			b.resetWithControl(BlockARM64NE, v0)
 24731  			return true
 24732  		}
 24733  		// match: (NE (TSTconst [c] x) yes no)
 24734  		// cond: oneBit(c)
 24735  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 24736  		for b.Controls[0].Op == OpARM64TSTconst {
 24737  			v_0 := b.Controls[0]
 24738  			c := auxIntToInt64(v_0.AuxInt)
 24739  			x := v_0.Args[0]
 24740  			if !(oneBit(c)) {
 24741  				break
 24742  			}
 24743  			b.resetWithControl(BlockARM64TBNZ, x)
 24744  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 24745  			return true
 24746  		}
 24747  		// match: (NE (TSTWconst [c] x) yes no)
 24748  		// cond: oneBit(int64(uint32(c)))
 24749  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 24750  		for b.Controls[0].Op == OpARM64TSTWconst {
 24751  			v_0 := b.Controls[0]
 24752  			c := auxIntToInt32(v_0.AuxInt)
 24753  			x := v_0.Args[0]
 24754  			if !(oneBit(int64(uint32(c)))) {
 24755  				break
 24756  			}
 24757  			b.resetWithControl(BlockARM64TBNZ, x)
 24758  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 24759  			return true
 24760  		}
 24761  		// match: (NE (FlagConstant [fc]) yes no)
 24762  		// cond: fc.ne()
 24763  		// result: (First yes no)
 24764  		for b.Controls[0].Op == OpARM64FlagConstant {
 24765  			v_0 := b.Controls[0]
 24766  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24767  			if !(fc.ne()) {
 24768  				break
 24769  			}
 24770  			b.Reset(BlockFirst)
 24771  			return true
 24772  		}
 24773  		// match: (NE (FlagConstant [fc]) yes no)
 24774  		// cond: !fc.ne()
 24775  		// result: (First no yes)
 24776  		for b.Controls[0].Op == OpARM64FlagConstant {
 24777  			v_0 := b.Controls[0]
 24778  			fc := auxIntToFlagConstant(v_0.AuxInt)
 24779  			if !(!fc.ne()) {
 24780  				break
 24781  			}
 24782  			b.Reset(BlockFirst)
 24783  			b.swapSuccessors()
 24784  			return true
 24785  		}
 24786  		// match: (NE (InvertFlags cmp) yes no)
 24787  		// result: (NE cmp yes no)
 24788  		for b.Controls[0].Op == OpARM64InvertFlags {
 24789  			v_0 := b.Controls[0]
 24790  			cmp := v_0.Args[0]
 24791  			b.resetWithControl(BlockARM64NE, cmp)
 24792  			return true
 24793  		}
 24794  	case BlockARM64NZ:
 24795  		// match: (NZ (Equal cc) yes no)
 24796  		// result: (EQ cc yes no)
 24797  		for b.Controls[0].Op == OpARM64Equal {
 24798  			v_0 := b.Controls[0]
 24799  			cc := v_0.Args[0]
 24800  			b.resetWithControl(BlockARM64EQ, cc)
 24801  			return true
 24802  		}
 24803  		// match: (NZ (NotEqual cc) yes no)
 24804  		// result: (NE cc yes no)
 24805  		for b.Controls[0].Op == OpARM64NotEqual {
 24806  			v_0 := b.Controls[0]
 24807  			cc := v_0.Args[0]
 24808  			b.resetWithControl(BlockARM64NE, cc)
 24809  			return true
 24810  		}
 24811  		// match: (NZ (LessThan cc) yes no)
 24812  		// result: (LT cc yes no)
 24813  		for b.Controls[0].Op == OpARM64LessThan {
 24814  			v_0 := b.Controls[0]
 24815  			cc := v_0.Args[0]
 24816  			b.resetWithControl(BlockARM64LT, cc)
 24817  			return true
 24818  		}
 24819  		// match: (NZ (LessThanU cc) yes no)
 24820  		// result: (ULT cc yes no)
 24821  		for b.Controls[0].Op == OpARM64LessThanU {
 24822  			v_0 := b.Controls[0]
 24823  			cc := v_0.Args[0]
 24824  			b.resetWithControl(BlockARM64ULT, cc)
 24825  			return true
 24826  		}
 24827  		// match: (NZ (LessEqual cc) yes no)
 24828  		// result: (LE cc yes no)
 24829  		for b.Controls[0].Op == OpARM64LessEqual {
 24830  			v_0 := b.Controls[0]
 24831  			cc := v_0.Args[0]
 24832  			b.resetWithControl(BlockARM64LE, cc)
 24833  			return true
 24834  		}
 24835  		// match: (NZ (LessEqualU cc) yes no)
 24836  		// result: (ULE cc yes no)
 24837  		for b.Controls[0].Op == OpARM64LessEqualU {
 24838  			v_0 := b.Controls[0]
 24839  			cc := v_0.Args[0]
 24840  			b.resetWithControl(BlockARM64ULE, cc)
 24841  			return true
 24842  		}
 24843  		// match: (NZ (GreaterThan cc) yes no)
 24844  		// result: (GT cc yes no)
 24845  		for b.Controls[0].Op == OpARM64GreaterThan {
 24846  			v_0 := b.Controls[0]
 24847  			cc := v_0.Args[0]
 24848  			b.resetWithControl(BlockARM64GT, cc)
 24849  			return true
 24850  		}
 24851  		// match: (NZ (GreaterThanU cc) yes no)
 24852  		// result: (UGT cc yes no)
 24853  		for b.Controls[0].Op == OpARM64GreaterThanU {
 24854  			v_0 := b.Controls[0]
 24855  			cc := v_0.Args[0]
 24856  			b.resetWithControl(BlockARM64UGT, cc)
 24857  			return true
 24858  		}
 24859  		// match: (NZ (GreaterEqual cc) yes no)
 24860  		// result: (GE cc yes no)
 24861  		for b.Controls[0].Op == OpARM64GreaterEqual {
 24862  			v_0 := b.Controls[0]
 24863  			cc := v_0.Args[0]
 24864  			b.resetWithControl(BlockARM64GE, cc)
 24865  			return true
 24866  		}
 24867  		// match: (NZ (GreaterEqualU cc) yes no)
 24868  		// result: (UGE cc yes no)
 24869  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 24870  			v_0 := b.Controls[0]
 24871  			cc := v_0.Args[0]
 24872  			b.resetWithControl(BlockARM64UGE, cc)
 24873  			return true
 24874  		}
 24875  		// match: (NZ (LessThanF cc) yes no)
 24876  		// result: (FLT cc yes no)
 24877  		for b.Controls[0].Op == OpARM64LessThanF {
 24878  			v_0 := b.Controls[0]
 24879  			cc := v_0.Args[0]
 24880  			b.resetWithControl(BlockARM64FLT, cc)
 24881  			return true
 24882  		}
 24883  		// match: (NZ (LessEqualF cc) yes no)
 24884  		// result: (FLE cc yes no)
 24885  		for b.Controls[0].Op == OpARM64LessEqualF {
 24886  			v_0 := b.Controls[0]
 24887  			cc := v_0.Args[0]
 24888  			b.resetWithControl(BlockARM64FLE, cc)
 24889  			return true
 24890  		}
 24891  		// match: (NZ (GreaterThanF cc) yes no)
 24892  		// result: (FGT cc yes no)
 24893  		for b.Controls[0].Op == OpARM64GreaterThanF {
 24894  			v_0 := b.Controls[0]
 24895  			cc := v_0.Args[0]
 24896  			b.resetWithControl(BlockARM64FGT, cc)
 24897  			return true
 24898  		}
 24899  		// match: (NZ (GreaterEqualF cc) yes no)
 24900  		// result: (FGE cc yes no)
 24901  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 24902  			v_0 := b.Controls[0]
 24903  			cc := v_0.Args[0]
 24904  			b.resetWithControl(BlockARM64FGE, cc)
 24905  			return true
 24906  		}
 24907  		// match: (NZ (ANDconst [c] x) yes no)
 24908  		// cond: oneBit(c)
 24909  		// result: (TBNZ [int64(ntz64(c))] x yes no)
 24910  		for b.Controls[0].Op == OpARM64ANDconst {
 24911  			v_0 := b.Controls[0]
 24912  			c := auxIntToInt64(v_0.AuxInt)
 24913  			x := v_0.Args[0]
 24914  			if !(oneBit(c)) {
 24915  				break
 24916  			}
 24917  			b.resetWithControl(BlockARM64TBNZ, x)
 24918  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 24919  			return true
 24920  		}
 24921  		// match: (NZ (MOVDconst [0]) yes no)
 24922  		// result: (First no yes)
 24923  		for b.Controls[0].Op == OpARM64MOVDconst {
 24924  			v_0 := b.Controls[0]
 24925  			if auxIntToInt64(v_0.AuxInt) != 0 {
 24926  				break
 24927  			}
 24928  			b.Reset(BlockFirst)
 24929  			b.swapSuccessors()
 24930  			return true
 24931  		}
 24932  		// match: (NZ (MOVDconst [c]) yes no)
 24933  		// cond: c != 0
 24934  		// result: (First yes no)
 24935  		for b.Controls[0].Op == OpARM64MOVDconst {
 24936  			v_0 := b.Controls[0]
 24937  			c := auxIntToInt64(v_0.AuxInt)
 24938  			if !(c != 0) {
 24939  				break
 24940  			}
 24941  			b.Reset(BlockFirst)
 24942  			return true
 24943  		}
 24944  	case BlockARM64NZW:
 24945  		// match: (NZW (ANDconst [c] x) yes no)
 24946  		// cond: oneBit(int64(uint32(c)))
 24947  		// result: (TBNZ [int64(ntz64(int64(uint32(c))))] x yes no)
 24948  		for b.Controls[0].Op == OpARM64ANDconst {
 24949  			v_0 := b.Controls[0]
 24950  			c := auxIntToInt64(v_0.AuxInt)
 24951  			x := v_0.Args[0]
 24952  			if !(oneBit(int64(uint32(c)))) {
 24953  				break
 24954  			}
 24955  			b.resetWithControl(BlockARM64TBNZ, x)
 24956  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 24957  			return true
 24958  		}
 24959  		// match: (NZW (MOVDconst [c]) yes no)
 24960  		// cond: int32(c) == 0
 24961  		// result: (First no yes)
 24962  		for b.Controls[0].Op == OpARM64MOVDconst {
 24963  			v_0 := b.Controls[0]
 24964  			c := auxIntToInt64(v_0.AuxInt)
 24965  			if !(int32(c) == 0) {
 24966  				break
 24967  			}
 24968  			b.Reset(BlockFirst)
 24969  			b.swapSuccessors()
 24970  			return true
 24971  		}
 24972  		// match: (NZW (MOVDconst [c]) yes no)
 24973  		// cond: int32(c) != 0
 24974  		// result: (First yes no)
 24975  		for b.Controls[0].Op == OpARM64MOVDconst {
 24976  			v_0 := b.Controls[0]
 24977  			c := auxIntToInt64(v_0.AuxInt)
 24978  			if !(int32(c) != 0) {
 24979  				break
 24980  			}
 24981  			b.Reset(BlockFirst)
 24982  			return true
 24983  		}
 24984  	case BlockARM64TBNZ:
 24985  		// match: (TBNZ [0] (Equal cc) yes no)
 24986  		// result: (EQ cc yes no)
 24987  		for b.Controls[0].Op == OpARM64Equal {
 24988  			v_0 := b.Controls[0]
 24989  			cc := v_0.Args[0]
 24990  			if auxIntToInt64(b.AuxInt) != 0 {
 24991  				break
 24992  			}
 24993  			b.resetWithControl(BlockARM64EQ, cc)
 24994  			return true
 24995  		}
 24996  		// match: (TBNZ [0] (NotEqual cc) yes no)
 24997  		// result: (NE cc yes no)
 24998  		for b.Controls[0].Op == OpARM64NotEqual {
 24999  			v_0 := b.Controls[0]
 25000  			cc := v_0.Args[0]
 25001  			if auxIntToInt64(b.AuxInt) != 0 {
 25002  				break
 25003  			}
 25004  			b.resetWithControl(BlockARM64NE, cc)
 25005  			return true
 25006  		}
 25007  		// match: (TBNZ [0] (LessThan cc) yes no)
 25008  		// result: (LT cc yes no)
 25009  		for b.Controls[0].Op == OpARM64LessThan {
 25010  			v_0 := b.Controls[0]
 25011  			cc := v_0.Args[0]
 25012  			if auxIntToInt64(b.AuxInt) != 0 {
 25013  				break
 25014  			}
 25015  			b.resetWithControl(BlockARM64LT, cc)
 25016  			return true
 25017  		}
 25018  		// match: (TBNZ [0] (LessThanU cc) yes no)
 25019  		// result: (ULT cc yes no)
 25020  		for b.Controls[0].Op == OpARM64LessThanU {
 25021  			v_0 := b.Controls[0]
 25022  			cc := v_0.Args[0]
 25023  			if auxIntToInt64(b.AuxInt) != 0 {
 25024  				break
 25025  			}
 25026  			b.resetWithControl(BlockARM64ULT, cc)
 25027  			return true
 25028  		}
 25029  		// match: (TBNZ [0] (LessEqual cc) yes no)
 25030  		// result: (LE cc yes no)
 25031  		for b.Controls[0].Op == OpARM64LessEqual {
 25032  			v_0 := b.Controls[0]
 25033  			cc := v_0.Args[0]
 25034  			if auxIntToInt64(b.AuxInt) != 0 {
 25035  				break
 25036  			}
 25037  			b.resetWithControl(BlockARM64LE, cc)
 25038  			return true
 25039  		}
 25040  		// match: (TBNZ [0] (LessEqualU cc) yes no)
 25041  		// result: (ULE cc yes no)
 25042  		for b.Controls[0].Op == OpARM64LessEqualU {
 25043  			v_0 := b.Controls[0]
 25044  			cc := v_0.Args[0]
 25045  			if auxIntToInt64(b.AuxInt) != 0 {
 25046  				break
 25047  			}
 25048  			b.resetWithControl(BlockARM64ULE, cc)
 25049  			return true
 25050  		}
 25051  		// match: (TBNZ [0] (GreaterThan cc) yes no)
 25052  		// result: (GT cc yes no)
 25053  		for b.Controls[0].Op == OpARM64GreaterThan {
 25054  			v_0 := b.Controls[0]
 25055  			cc := v_0.Args[0]
 25056  			if auxIntToInt64(b.AuxInt) != 0 {
 25057  				break
 25058  			}
 25059  			b.resetWithControl(BlockARM64GT, cc)
 25060  			return true
 25061  		}
 25062  		// match: (TBNZ [0] (GreaterThanU cc) yes no)
 25063  		// result: (UGT cc yes no)
 25064  		for b.Controls[0].Op == OpARM64GreaterThanU {
 25065  			v_0 := b.Controls[0]
 25066  			cc := v_0.Args[0]
 25067  			if auxIntToInt64(b.AuxInt) != 0 {
 25068  				break
 25069  			}
 25070  			b.resetWithControl(BlockARM64UGT, cc)
 25071  			return true
 25072  		}
 25073  		// match: (TBNZ [0] (GreaterEqual cc) yes no)
 25074  		// result: (GE cc yes no)
 25075  		for b.Controls[0].Op == OpARM64GreaterEqual {
 25076  			v_0 := b.Controls[0]
 25077  			cc := v_0.Args[0]
 25078  			if auxIntToInt64(b.AuxInt) != 0 {
 25079  				break
 25080  			}
 25081  			b.resetWithControl(BlockARM64GE, cc)
 25082  			return true
 25083  		}
 25084  		// match: (TBNZ [0] (GreaterEqualU cc) yes no)
 25085  		// result: (UGE cc yes no)
 25086  		for b.Controls[0].Op == OpARM64GreaterEqualU {
 25087  			v_0 := b.Controls[0]
 25088  			cc := v_0.Args[0]
 25089  			if auxIntToInt64(b.AuxInt) != 0 {
 25090  				break
 25091  			}
 25092  			b.resetWithControl(BlockARM64UGE, cc)
 25093  			return true
 25094  		}
 25095  		// match: (TBNZ [0] (LessThanF cc) yes no)
 25096  		// result: (FLT cc yes no)
 25097  		for b.Controls[0].Op == OpARM64LessThanF {
 25098  			v_0 := b.Controls[0]
 25099  			cc := v_0.Args[0]
 25100  			if auxIntToInt64(b.AuxInt) != 0 {
 25101  				break
 25102  			}
 25103  			b.resetWithControl(BlockARM64FLT, cc)
 25104  			return true
 25105  		}
 25106  		// match: (TBNZ [0] (LessEqualF cc) yes no)
 25107  		// result: (FLE cc yes no)
 25108  		for b.Controls[0].Op == OpARM64LessEqualF {
 25109  			v_0 := b.Controls[0]
 25110  			cc := v_0.Args[0]
 25111  			if auxIntToInt64(b.AuxInt) != 0 {
 25112  				break
 25113  			}
 25114  			b.resetWithControl(BlockARM64FLE, cc)
 25115  			return true
 25116  		}
 25117  		// match: (TBNZ [0] (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  			if auxIntToInt64(b.AuxInt) != 0 {
 25123  				break
 25124  			}
 25125  			b.resetWithControl(BlockARM64FGT, cc)
 25126  			return true
 25127  		}
 25128  		// match: (TBNZ [0] (GreaterEqualF cc) yes no)
 25129  		// result: (FGE cc yes no)
 25130  		for b.Controls[0].Op == OpARM64GreaterEqualF {
 25131  			v_0 := b.Controls[0]
 25132  			cc := v_0.Args[0]
 25133  			if auxIntToInt64(b.AuxInt) != 0 {
 25134  				break
 25135  			}
 25136  			b.resetWithControl(BlockARM64FGE, cc)
 25137  			return true
 25138  		}
 25139  	case BlockARM64UGE:
 25140  		// match: (UGE (FlagConstant [fc]) yes no)
 25141  		// cond: fc.uge()
 25142  		// result: (First yes no)
 25143  		for b.Controls[0].Op == OpARM64FlagConstant {
 25144  			v_0 := b.Controls[0]
 25145  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25146  			if !(fc.uge()) {
 25147  				break
 25148  			}
 25149  			b.Reset(BlockFirst)
 25150  			return true
 25151  		}
 25152  		// match: (UGE (FlagConstant [fc]) yes no)
 25153  		// cond: !fc.uge()
 25154  		// result: (First no yes)
 25155  		for b.Controls[0].Op == OpARM64FlagConstant {
 25156  			v_0 := b.Controls[0]
 25157  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25158  			if !(!fc.uge()) {
 25159  				break
 25160  			}
 25161  			b.Reset(BlockFirst)
 25162  			b.swapSuccessors()
 25163  			return true
 25164  		}
 25165  		// match: (UGE (InvertFlags cmp) yes no)
 25166  		// result: (ULE cmp yes no)
 25167  		for b.Controls[0].Op == OpARM64InvertFlags {
 25168  			v_0 := b.Controls[0]
 25169  			cmp := v_0.Args[0]
 25170  			b.resetWithControl(BlockARM64ULE, cmp)
 25171  			return true
 25172  		}
 25173  	case BlockARM64UGT:
 25174  		// match: (UGT (FlagConstant [fc]) yes no)
 25175  		// cond: fc.ugt()
 25176  		// result: (First yes no)
 25177  		for b.Controls[0].Op == OpARM64FlagConstant {
 25178  			v_0 := b.Controls[0]
 25179  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25180  			if !(fc.ugt()) {
 25181  				break
 25182  			}
 25183  			b.Reset(BlockFirst)
 25184  			return true
 25185  		}
 25186  		// match: (UGT (FlagConstant [fc]) yes no)
 25187  		// cond: !fc.ugt()
 25188  		// result: (First no yes)
 25189  		for b.Controls[0].Op == OpARM64FlagConstant {
 25190  			v_0 := b.Controls[0]
 25191  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25192  			if !(!fc.ugt()) {
 25193  				break
 25194  			}
 25195  			b.Reset(BlockFirst)
 25196  			b.swapSuccessors()
 25197  			return true
 25198  		}
 25199  		// match: (UGT (InvertFlags cmp) yes no)
 25200  		// result: (ULT cmp yes no)
 25201  		for b.Controls[0].Op == OpARM64InvertFlags {
 25202  			v_0 := b.Controls[0]
 25203  			cmp := v_0.Args[0]
 25204  			b.resetWithControl(BlockARM64ULT, cmp)
 25205  			return true
 25206  		}
 25207  	case BlockARM64ULE:
 25208  		// match: (ULE (FlagConstant [fc]) yes no)
 25209  		// cond: fc.ule()
 25210  		// result: (First yes no)
 25211  		for b.Controls[0].Op == OpARM64FlagConstant {
 25212  			v_0 := b.Controls[0]
 25213  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25214  			if !(fc.ule()) {
 25215  				break
 25216  			}
 25217  			b.Reset(BlockFirst)
 25218  			return true
 25219  		}
 25220  		// match: (ULE (FlagConstant [fc]) yes no)
 25221  		// cond: !fc.ule()
 25222  		// result: (First no yes)
 25223  		for b.Controls[0].Op == OpARM64FlagConstant {
 25224  			v_0 := b.Controls[0]
 25225  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25226  			if !(!fc.ule()) {
 25227  				break
 25228  			}
 25229  			b.Reset(BlockFirst)
 25230  			b.swapSuccessors()
 25231  			return true
 25232  		}
 25233  		// match: (ULE (InvertFlags cmp) yes no)
 25234  		// result: (UGE cmp yes no)
 25235  		for b.Controls[0].Op == OpARM64InvertFlags {
 25236  			v_0 := b.Controls[0]
 25237  			cmp := v_0.Args[0]
 25238  			b.resetWithControl(BlockARM64UGE, cmp)
 25239  			return true
 25240  		}
 25241  	case BlockARM64ULT:
 25242  		// match: (ULT (FlagConstant [fc]) yes no)
 25243  		// cond: fc.ult()
 25244  		// result: (First yes no)
 25245  		for b.Controls[0].Op == OpARM64FlagConstant {
 25246  			v_0 := b.Controls[0]
 25247  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25248  			if !(fc.ult()) {
 25249  				break
 25250  			}
 25251  			b.Reset(BlockFirst)
 25252  			return true
 25253  		}
 25254  		// match: (ULT (FlagConstant [fc]) yes no)
 25255  		// cond: !fc.ult()
 25256  		// result: (First no yes)
 25257  		for b.Controls[0].Op == OpARM64FlagConstant {
 25258  			v_0 := b.Controls[0]
 25259  			fc := auxIntToFlagConstant(v_0.AuxInt)
 25260  			if !(!fc.ult()) {
 25261  				break
 25262  			}
 25263  			b.Reset(BlockFirst)
 25264  			b.swapSuccessors()
 25265  			return true
 25266  		}
 25267  		// match: (ULT (InvertFlags cmp) yes no)
 25268  		// result: (UGT cmp yes no)
 25269  		for b.Controls[0].Op == OpARM64InvertFlags {
 25270  			v_0 := b.Controls[0]
 25271  			cmp := v_0.Args[0]
 25272  			b.resetWithControl(BlockARM64UGT, cmp)
 25273  			return true
 25274  		}
 25275  	case BlockARM64Z:
 25276  		// match: (Z (ANDconst [c] x) yes no)
 25277  		// cond: oneBit(c)
 25278  		// result: (TBZ [int64(ntz64(c))] x yes no)
 25279  		for b.Controls[0].Op == OpARM64ANDconst {
 25280  			v_0 := b.Controls[0]
 25281  			c := auxIntToInt64(v_0.AuxInt)
 25282  			x := v_0.Args[0]
 25283  			if !(oneBit(c)) {
 25284  				break
 25285  			}
 25286  			b.resetWithControl(BlockARM64TBZ, x)
 25287  			b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
 25288  			return true
 25289  		}
 25290  		// match: (Z (MOVDconst [0]) yes no)
 25291  		// result: (First yes no)
 25292  		for b.Controls[0].Op == OpARM64MOVDconst {
 25293  			v_0 := b.Controls[0]
 25294  			if auxIntToInt64(v_0.AuxInt) != 0 {
 25295  				break
 25296  			}
 25297  			b.Reset(BlockFirst)
 25298  			return true
 25299  		}
 25300  		// match: (Z (MOVDconst [c]) yes no)
 25301  		// cond: c != 0
 25302  		// result: (First no yes)
 25303  		for b.Controls[0].Op == OpARM64MOVDconst {
 25304  			v_0 := b.Controls[0]
 25305  			c := auxIntToInt64(v_0.AuxInt)
 25306  			if !(c != 0) {
 25307  				break
 25308  			}
 25309  			b.Reset(BlockFirst)
 25310  			b.swapSuccessors()
 25311  			return true
 25312  		}
 25313  	case BlockARM64ZW:
 25314  		// match: (ZW (ANDconst [c] x) yes no)
 25315  		// cond: oneBit(int64(uint32(c)))
 25316  		// result: (TBZ [int64(ntz64(int64(uint32(c))))] x yes no)
 25317  		for b.Controls[0].Op == OpARM64ANDconst {
 25318  			v_0 := b.Controls[0]
 25319  			c := auxIntToInt64(v_0.AuxInt)
 25320  			x := v_0.Args[0]
 25321  			if !(oneBit(int64(uint32(c)))) {
 25322  				break
 25323  			}
 25324  			b.resetWithControl(BlockARM64TBZ, x)
 25325  			b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
 25326  			return true
 25327  		}
 25328  		// match: (ZW (MOVDconst [c]) yes no)
 25329  		// cond: int32(c) == 0
 25330  		// result: (First yes no)
 25331  		for b.Controls[0].Op == OpARM64MOVDconst {
 25332  			v_0 := b.Controls[0]
 25333  			c := auxIntToInt64(v_0.AuxInt)
 25334  			if !(int32(c) == 0) {
 25335  				break
 25336  			}
 25337  			b.Reset(BlockFirst)
 25338  			return true
 25339  		}
 25340  		// match: (ZW (MOVDconst [c]) yes no)
 25341  		// cond: int32(c) != 0
 25342  		// result: (First no yes)
 25343  		for b.Controls[0].Op == OpARM64MOVDconst {
 25344  			v_0 := b.Controls[0]
 25345  			c := auxIntToInt64(v_0.AuxInt)
 25346  			if !(int32(c) != 0) {
 25347  				break
 25348  			}
 25349  			b.Reset(BlockFirst)
 25350  			b.swapSuccessors()
 25351  			return true
 25352  		}
 25353  	}
 25354  	return false
 25355  }
 25356  

View as plain text