Black Lives Matter. Support the Equal Justice Initiative.

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

Documentation: cmd/compile/internal/ssa

     1  // Code generated from gen/generic.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "math"
     7  import "cmd/compile/internal/types"
     8  
     9  func rewriteValuegeneric(v *Value) bool {
    10  	switch v.Op {
    11  	case OpAdd16:
    12  		return rewriteValuegeneric_OpAdd16(v)
    13  	case OpAdd32:
    14  		return rewriteValuegeneric_OpAdd32(v)
    15  	case OpAdd32F:
    16  		return rewriteValuegeneric_OpAdd32F(v)
    17  	case OpAdd64:
    18  		return rewriteValuegeneric_OpAdd64(v)
    19  	case OpAdd64F:
    20  		return rewriteValuegeneric_OpAdd64F(v)
    21  	case OpAdd8:
    22  		return rewriteValuegeneric_OpAdd8(v)
    23  	case OpAddPtr:
    24  		return rewriteValuegeneric_OpAddPtr(v)
    25  	case OpAnd16:
    26  		return rewriteValuegeneric_OpAnd16(v)
    27  	case OpAnd32:
    28  		return rewriteValuegeneric_OpAnd32(v)
    29  	case OpAnd64:
    30  		return rewriteValuegeneric_OpAnd64(v)
    31  	case OpAnd8:
    32  		return rewriteValuegeneric_OpAnd8(v)
    33  	case OpAndB:
    34  		return rewriteValuegeneric_OpAndB(v)
    35  	case OpArraySelect:
    36  		return rewriteValuegeneric_OpArraySelect(v)
    37  	case OpCom16:
    38  		return rewriteValuegeneric_OpCom16(v)
    39  	case OpCom32:
    40  		return rewriteValuegeneric_OpCom32(v)
    41  	case OpCom64:
    42  		return rewriteValuegeneric_OpCom64(v)
    43  	case OpCom8:
    44  		return rewriteValuegeneric_OpCom8(v)
    45  	case OpConstInterface:
    46  		return rewriteValuegeneric_OpConstInterface(v)
    47  	case OpConstSlice:
    48  		return rewriteValuegeneric_OpConstSlice(v)
    49  	case OpConstString:
    50  		return rewriteValuegeneric_OpConstString(v)
    51  	case OpConvert:
    52  		return rewriteValuegeneric_OpConvert(v)
    53  	case OpCtz16:
    54  		return rewriteValuegeneric_OpCtz16(v)
    55  	case OpCtz32:
    56  		return rewriteValuegeneric_OpCtz32(v)
    57  	case OpCtz64:
    58  		return rewriteValuegeneric_OpCtz64(v)
    59  	case OpCtz8:
    60  		return rewriteValuegeneric_OpCtz8(v)
    61  	case OpCvt32Fto32:
    62  		return rewriteValuegeneric_OpCvt32Fto32(v)
    63  	case OpCvt32Fto64:
    64  		return rewriteValuegeneric_OpCvt32Fto64(v)
    65  	case OpCvt32Fto64F:
    66  		return rewriteValuegeneric_OpCvt32Fto64F(v)
    67  	case OpCvt32to32F:
    68  		return rewriteValuegeneric_OpCvt32to32F(v)
    69  	case OpCvt32to64F:
    70  		return rewriteValuegeneric_OpCvt32to64F(v)
    71  	case OpCvt64Fto32:
    72  		return rewriteValuegeneric_OpCvt64Fto32(v)
    73  	case OpCvt64Fto32F:
    74  		return rewriteValuegeneric_OpCvt64Fto32F(v)
    75  	case OpCvt64Fto64:
    76  		return rewriteValuegeneric_OpCvt64Fto64(v)
    77  	case OpCvt64to32F:
    78  		return rewriteValuegeneric_OpCvt64to32F(v)
    79  	case OpCvt64to64F:
    80  		return rewriteValuegeneric_OpCvt64to64F(v)
    81  	case OpCvtBoolToUint8:
    82  		return rewriteValuegeneric_OpCvtBoolToUint8(v)
    83  	case OpDiv16:
    84  		return rewriteValuegeneric_OpDiv16(v)
    85  	case OpDiv16u:
    86  		return rewriteValuegeneric_OpDiv16u(v)
    87  	case OpDiv32:
    88  		return rewriteValuegeneric_OpDiv32(v)
    89  	case OpDiv32F:
    90  		return rewriteValuegeneric_OpDiv32F(v)
    91  	case OpDiv32u:
    92  		return rewriteValuegeneric_OpDiv32u(v)
    93  	case OpDiv64:
    94  		return rewriteValuegeneric_OpDiv64(v)
    95  	case OpDiv64F:
    96  		return rewriteValuegeneric_OpDiv64F(v)
    97  	case OpDiv64u:
    98  		return rewriteValuegeneric_OpDiv64u(v)
    99  	case OpDiv8:
   100  		return rewriteValuegeneric_OpDiv8(v)
   101  	case OpDiv8u:
   102  		return rewriteValuegeneric_OpDiv8u(v)
   103  	case OpEq16:
   104  		return rewriteValuegeneric_OpEq16(v)
   105  	case OpEq32:
   106  		return rewriteValuegeneric_OpEq32(v)
   107  	case OpEq32F:
   108  		return rewriteValuegeneric_OpEq32F(v)
   109  	case OpEq64:
   110  		return rewriteValuegeneric_OpEq64(v)
   111  	case OpEq64F:
   112  		return rewriteValuegeneric_OpEq64F(v)
   113  	case OpEq8:
   114  		return rewriteValuegeneric_OpEq8(v)
   115  	case OpEqB:
   116  		return rewriteValuegeneric_OpEqB(v)
   117  	case OpEqInter:
   118  		return rewriteValuegeneric_OpEqInter(v)
   119  	case OpEqPtr:
   120  		return rewriteValuegeneric_OpEqPtr(v)
   121  	case OpEqSlice:
   122  		return rewriteValuegeneric_OpEqSlice(v)
   123  	case OpIMake:
   124  		return rewriteValuegeneric_OpIMake(v)
   125  	case OpInterCall:
   126  		return rewriteValuegeneric_OpInterCall(v)
   127  	case OpInterLECall:
   128  		return rewriteValuegeneric_OpInterLECall(v)
   129  	case OpIsInBounds:
   130  		return rewriteValuegeneric_OpIsInBounds(v)
   131  	case OpIsNonNil:
   132  		return rewriteValuegeneric_OpIsNonNil(v)
   133  	case OpIsSliceInBounds:
   134  		return rewriteValuegeneric_OpIsSliceInBounds(v)
   135  	case OpLeq16:
   136  		return rewriteValuegeneric_OpLeq16(v)
   137  	case OpLeq16U:
   138  		return rewriteValuegeneric_OpLeq16U(v)
   139  	case OpLeq32:
   140  		return rewriteValuegeneric_OpLeq32(v)
   141  	case OpLeq32F:
   142  		return rewriteValuegeneric_OpLeq32F(v)
   143  	case OpLeq32U:
   144  		return rewriteValuegeneric_OpLeq32U(v)
   145  	case OpLeq64:
   146  		return rewriteValuegeneric_OpLeq64(v)
   147  	case OpLeq64F:
   148  		return rewriteValuegeneric_OpLeq64F(v)
   149  	case OpLeq64U:
   150  		return rewriteValuegeneric_OpLeq64U(v)
   151  	case OpLeq8:
   152  		return rewriteValuegeneric_OpLeq8(v)
   153  	case OpLeq8U:
   154  		return rewriteValuegeneric_OpLeq8U(v)
   155  	case OpLess16:
   156  		return rewriteValuegeneric_OpLess16(v)
   157  	case OpLess16U:
   158  		return rewriteValuegeneric_OpLess16U(v)
   159  	case OpLess32:
   160  		return rewriteValuegeneric_OpLess32(v)
   161  	case OpLess32F:
   162  		return rewriteValuegeneric_OpLess32F(v)
   163  	case OpLess32U:
   164  		return rewriteValuegeneric_OpLess32U(v)
   165  	case OpLess64:
   166  		return rewriteValuegeneric_OpLess64(v)
   167  	case OpLess64F:
   168  		return rewriteValuegeneric_OpLess64F(v)
   169  	case OpLess64U:
   170  		return rewriteValuegeneric_OpLess64U(v)
   171  	case OpLess8:
   172  		return rewriteValuegeneric_OpLess8(v)
   173  	case OpLess8U:
   174  		return rewriteValuegeneric_OpLess8U(v)
   175  	case OpLoad:
   176  		return rewriteValuegeneric_OpLoad(v)
   177  	case OpLsh16x16:
   178  		return rewriteValuegeneric_OpLsh16x16(v)
   179  	case OpLsh16x32:
   180  		return rewriteValuegeneric_OpLsh16x32(v)
   181  	case OpLsh16x64:
   182  		return rewriteValuegeneric_OpLsh16x64(v)
   183  	case OpLsh16x8:
   184  		return rewriteValuegeneric_OpLsh16x8(v)
   185  	case OpLsh32x16:
   186  		return rewriteValuegeneric_OpLsh32x16(v)
   187  	case OpLsh32x32:
   188  		return rewriteValuegeneric_OpLsh32x32(v)
   189  	case OpLsh32x64:
   190  		return rewriteValuegeneric_OpLsh32x64(v)
   191  	case OpLsh32x8:
   192  		return rewriteValuegeneric_OpLsh32x8(v)
   193  	case OpLsh64x16:
   194  		return rewriteValuegeneric_OpLsh64x16(v)
   195  	case OpLsh64x32:
   196  		return rewriteValuegeneric_OpLsh64x32(v)
   197  	case OpLsh64x64:
   198  		return rewriteValuegeneric_OpLsh64x64(v)
   199  	case OpLsh64x8:
   200  		return rewriteValuegeneric_OpLsh64x8(v)
   201  	case OpLsh8x16:
   202  		return rewriteValuegeneric_OpLsh8x16(v)
   203  	case OpLsh8x32:
   204  		return rewriteValuegeneric_OpLsh8x32(v)
   205  	case OpLsh8x64:
   206  		return rewriteValuegeneric_OpLsh8x64(v)
   207  	case OpLsh8x8:
   208  		return rewriteValuegeneric_OpLsh8x8(v)
   209  	case OpMod16:
   210  		return rewriteValuegeneric_OpMod16(v)
   211  	case OpMod16u:
   212  		return rewriteValuegeneric_OpMod16u(v)
   213  	case OpMod32:
   214  		return rewriteValuegeneric_OpMod32(v)
   215  	case OpMod32u:
   216  		return rewriteValuegeneric_OpMod32u(v)
   217  	case OpMod64:
   218  		return rewriteValuegeneric_OpMod64(v)
   219  	case OpMod64u:
   220  		return rewriteValuegeneric_OpMod64u(v)
   221  	case OpMod8:
   222  		return rewriteValuegeneric_OpMod8(v)
   223  	case OpMod8u:
   224  		return rewriteValuegeneric_OpMod8u(v)
   225  	case OpMove:
   226  		return rewriteValuegeneric_OpMove(v)
   227  	case OpMul16:
   228  		return rewriteValuegeneric_OpMul16(v)
   229  	case OpMul32:
   230  		return rewriteValuegeneric_OpMul32(v)
   231  	case OpMul32F:
   232  		return rewriteValuegeneric_OpMul32F(v)
   233  	case OpMul64:
   234  		return rewriteValuegeneric_OpMul64(v)
   235  	case OpMul64F:
   236  		return rewriteValuegeneric_OpMul64F(v)
   237  	case OpMul8:
   238  		return rewriteValuegeneric_OpMul8(v)
   239  	case OpNeg16:
   240  		return rewriteValuegeneric_OpNeg16(v)
   241  	case OpNeg32:
   242  		return rewriteValuegeneric_OpNeg32(v)
   243  	case OpNeg32F:
   244  		return rewriteValuegeneric_OpNeg32F(v)
   245  	case OpNeg64:
   246  		return rewriteValuegeneric_OpNeg64(v)
   247  	case OpNeg64F:
   248  		return rewriteValuegeneric_OpNeg64F(v)
   249  	case OpNeg8:
   250  		return rewriteValuegeneric_OpNeg8(v)
   251  	case OpNeq16:
   252  		return rewriteValuegeneric_OpNeq16(v)
   253  	case OpNeq32:
   254  		return rewriteValuegeneric_OpNeq32(v)
   255  	case OpNeq32F:
   256  		return rewriteValuegeneric_OpNeq32F(v)
   257  	case OpNeq64:
   258  		return rewriteValuegeneric_OpNeq64(v)
   259  	case OpNeq64F:
   260  		return rewriteValuegeneric_OpNeq64F(v)
   261  	case OpNeq8:
   262  		return rewriteValuegeneric_OpNeq8(v)
   263  	case OpNeqB:
   264  		return rewriteValuegeneric_OpNeqB(v)
   265  	case OpNeqInter:
   266  		return rewriteValuegeneric_OpNeqInter(v)
   267  	case OpNeqPtr:
   268  		return rewriteValuegeneric_OpNeqPtr(v)
   269  	case OpNeqSlice:
   270  		return rewriteValuegeneric_OpNeqSlice(v)
   271  	case OpNilCheck:
   272  		return rewriteValuegeneric_OpNilCheck(v)
   273  	case OpNot:
   274  		return rewriteValuegeneric_OpNot(v)
   275  	case OpOffPtr:
   276  		return rewriteValuegeneric_OpOffPtr(v)
   277  	case OpOr16:
   278  		return rewriteValuegeneric_OpOr16(v)
   279  	case OpOr32:
   280  		return rewriteValuegeneric_OpOr32(v)
   281  	case OpOr64:
   282  		return rewriteValuegeneric_OpOr64(v)
   283  	case OpOr8:
   284  		return rewriteValuegeneric_OpOr8(v)
   285  	case OpOrB:
   286  		return rewriteValuegeneric_OpOrB(v)
   287  	case OpPhi:
   288  		return rewriteValuegeneric_OpPhi(v)
   289  	case OpPtrIndex:
   290  		return rewriteValuegeneric_OpPtrIndex(v)
   291  	case OpRotateLeft16:
   292  		return rewriteValuegeneric_OpRotateLeft16(v)
   293  	case OpRotateLeft32:
   294  		return rewriteValuegeneric_OpRotateLeft32(v)
   295  	case OpRotateLeft64:
   296  		return rewriteValuegeneric_OpRotateLeft64(v)
   297  	case OpRotateLeft8:
   298  		return rewriteValuegeneric_OpRotateLeft8(v)
   299  	case OpRound32F:
   300  		return rewriteValuegeneric_OpRound32F(v)
   301  	case OpRound64F:
   302  		return rewriteValuegeneric_OpRound64F(v)
   303  	case OpRsh16Ux16:
   304  		return rewriteValuegeneric_OpRsh16Ux16(v)
   305  	case OpRsh16Ux32:
   306  		return rewriteValuegeneric_OpRsh16Ux32(v)
   307  	case OpRsh16Ux64:
   308  		return rewriteValuegeneric_OpRsh16Ux64(v)
   309  	case OpRsh16Ux8:
   310  		return rewriteValuegeneric_OpRsh16Ux8(v)
   311  	case OpRsh16x16:
   312  		return rewriteValuegeneric_OpRsh16x16(v)
   313  	case OpRsh16x32:
   314  		return rewriteValuegeneric_OpRsh16x32(v)
   315  	case OpRsh16x64:
   316  		return rewriteValuegeneric_OpRsh16x64(v)
   317  	case OpRsh16x8:
   318  		return rewriteValuegeneric_OpRsh16x8(v)
   319  	case OpRsh32Ux16:
   320  		return rewriteValuegeneric_OpRsh32Ux16(v)
   321  	case OpRsh32Ux32:
   322  		return rewriteValuegeneric_OpRsh32Ux32(v)
   323  	case OpRsh32Ux64:
   324  		return rewriteValuegeneric_OpRsh32Ux64(v)
   325  	case OpRsh32Ux8:
   326  		return rewriteValuegeneric_OpRsh32Ux8(v)
   327  	case OpRsh32x16:
   328  		return rewriteValuegeneric_OpRsh32x16(v)
   329  	case OpRsh32x32:
   330  		return rewriteValuegeneric_OpRsh32x32(v)
   331  	case OpRsh32x64:
   332  		return rewriteValuegeneric_OpRsh32x64(v)
   333  	case OpRsh32x8:
   334  		return rewriteValuegeneric_OpRsh32x8(v)
   335  	case OpRsh64Ux16:
   336  		return rewriteValuegeneric_OpRsh64Ux16(v)
   337  	case OpRsh64Ux32:
   338  		return rewriteValuegeneric_OpRsh64Ux32(v)
   339  	case OpRsh64Ux64:
   340  		return rewriteValuegeneric_OpRsh64Ux64(v)
   341  	case OpRsh64Ux8:
   342  		return rewriteValuegeneric_OpRsh64Ux8(v)
   343  	case OpRsh64x16:
   344  		return rewriteValuegeneric_OpRsh64x16(v)
   345  	case OpRsh64x32:
   346  		return rewriteValuegeneric_OpRsh64x32(v)
   347  	case OpRsh64x64:
   348  		return rewriteValuegeneric_OpRsh64x64(v)
   349  	case OpRsh64x8:
   350  		return rewriteValuegeneric_OpRsh64x8(v)
   351  	case OpRsh8Ux16:
   352  		return rewriteValuegeneric_OpRsh8Ux16(v)
   353  	case OpRsh8Ux32:
   354  		return rewriteValuegeneric_OpRsh8Ux32(v)
   355  	case OpRsh8Ux64:
   356  		return rewriteValuegeneric_OpRsh8Ux64(v)
   357  	case OpRsh8Ux8:
   358  		return rewriteValuegeneric_OpRsh8Ux8(v)
   359  	case OpRsh8x16:
   360  		return rewriteValuegeneric_OpRsh8x16(v)
   361  	case OpRsh8x32:
   362  		return rewriteValuegeneric_OpRsh8x32(v)
   363  	case OpRsh8x64:
   364  		return rewriteValuegeneric_OpRsh8x64(v)
   365  	case OpRsh8x8:
   366  		return rewriteValuegeneric_OpRsh8x8(v)
   367  	case OpSelect0:
   368  		return rewriteValuegeneric_OpSelect0(v)
   369  	case OpSelect1:
   370  		return rewriteValuegeneric_OpSelect1(v)
   371  	case OpSelectN:
   372  		return rewriteValuegeneric_OpSelectN(v)
   373  	case OpSignExt16to32:
   374  		return rewriteValuegeneric_OpSignExt16to32(v)
   375  	case OpSignExt16to64:
   376  		return rewriteValuegeneric_OpSignExt16to64(v)
   377  	case OpSignExt32to64:
   378  		return rewriteValuegeneric_OpSignExt32to64(v)
   379  	case OpSignExt8to16:
   380  		return rewriteValuegeneric_OpSignExt8to16(v)
   381  	case OpSignExt8to32:
   382  		return rewriteValuegeneric_OpSignExt8to32(v)
   383  	case OpSignExt8to64:
   384  		return rewriteValuegeneric_OpSignExt8to64(v)
   385  	case OpSliceCap:
   386  		return rewriteValuegeneric_OpSliceCap(v)
   387  	case OpSliceLen:
   388  		return rewriteValuegeneric_OpSliceLen(v)
   389  	case OpSlicePtr:
   390  		return rewriteValuegeneric_OpSlicePtr(v)
   391  	case OpSlicemask:
   392  		return rewriteValuegeneric_OpSlicemask(v)
   393  	case OpSqrt:
   394  		return rewriteValuegeneric_OpSqrt(v)
   395  	case OpStaticCall:
   396  		return rewriteValuegeneric_OpStaticCall(v)
   397  	case OpStaticLECall:
   398  		return rewriteValuegeneric_OpStaticLECall(v)
   399  	case OpStore:
   400  		return rewriteValuegeneric_OpStore(v)
   401  	case OpStringLen:
   402  		return rewriteValuegeneric_OpStringLen(v)
   403  	case OpStringPtr:
   404  		return rewriteValuegeneric_OpStringPtr(v)
   405  	case OpStructSelect:
   406  		return rewriteValuegeneric_OpStructSelect(v)
   407  	case OpSub16:
   408  		return rewriteValuegeneric_OpSub16(v)
   409  	case OpSub32:
   410  		return rewriteValuegeneric_OpSub32(v)
   411  	case OpSub32F:
   412  		return rewriteValuegeneric_OpSub32F(v)
   413  	case OpSub64:
   414  		return rewriteValuegeneric_OpSub64(v)
   415  	case OpSub64F:
   416  		return rewriteValuegeneric_OpSub64F(v)
   417  	case OpSub8:
   418  		return rewriteValuegeneric_OpSub8(v)
   419  	case OpTrunc16to8:
   420  		return rewriteValuegeneric_OpTrunc16to8(v)
   421  	case OpTrunc32to16:
   422  		return rewriteValuegeneric_OpTrunc32to16(v)
   423  	case OpTrunc32to8:
   424  		return rewriteValuegeneric_OpTrunc32to8(v)
   425  	case OpTrunc64to16:
   426  		return rewriteValuegeneric_OpTrunc64to16(v)
   427  	case OpTrunc64to32:
   428  		return rewriteValuegeneric_OpTrunc64to32(v)
   429  	case OpTrunc64to8:
   430  		return rewriteValuegeneric_OpTrunc64to8(v)
   431  	case OpXor16:
   432  		return rewriteValuegeneric_OpXor16(v)
   433  	case OpXor32:
   434  		return rewriteValuegeneric_OpXor32(v)
   435  	case OpXor64:
   436  		return rewriteValuegeneric_OpXor64(v)
   437  	case OpXor8:
   438  		return rewriteValuegeneric_OpXor8(v)
   439  	case OpZero:
   440  		return rewriteValuegeneric_OpZero(v)
   441  	case OpZeroExt16to32:
   442  		return rewriteValuegeneric_OpZeroExt16to32(v)
   443  	case OpZeroExt16to64:
   444  		return rewriteValuegeneric_OpZeroExt16to64(v)
   445  	case OpZeroExt32to64:
   446  		return rewriteValuegeneric_OpZeroExt32to64(v)
   447  	case OpZeroExt8to16:
   448  		return rewriteValuegeneric_OpZeroExt8to16(v)
   449  	case OpZeroExt8to32:
   450  		return rewriteValuegeneric_OpZeroExt8to32(v)
   451  	case OpZeroExt8to64:
   452  		return rewriteValuegeneric_OpZeroExt8to64(v)
   453  	}
   454  	return false
   455  }
   456  func rewriteValuegeneric_OpAdd16(v *Value) bool {
   457  	v_1 := v.Args[1]
   458  	v_0 := v.Args[0]
   459  	b := v.Block
   460  	// match: (Add16 (Const16 [c]) (Const16 [d]))
   461  	// result: (Const16 [c+d])
   462  	for {
   463  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   464  			if v_0.Op != OpConst16 {
   465  				continue
   466  			}
   467  			c := auxIntToInt16(v_0.AuxInt)
   468  			if v_1.Op != OpConst16 {
   469  				continue
   470  			}
   471  			d := auxIntToInt16(v_1.AuxInt)
   472  			v.reset(OpConst16)
   473  			v.AuxInt = int16ToAuxInt(c + d)
   474  			return true
   475  		}
   476  		break
   477  	}
   478  	// match: (Add16 <t> (Mul16 x y) (Mul16 x z))
   479  	// result: (Mul16 x (Add16 <t> y z))
   480  	for {
   481  		t := v.Type
   482  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   483  			if v_0.Op != OpMul16 {
   484  				continue
   485  			}
   486  			_ = v_0.Args[1]
   487  			v_0_0 := v_0.Args[0]
   488  			v_0_1 := v_0.Args[1]
   489  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
   490  				x := v_0_0
   491  				y := v_0_1
   492  				if v_1.Op != OpMul16 {
   493  					continue
   494  				}
   495  				_ = v_1.Args[1]
   496  				v_1_0 := v_1.Args[0]
   497  				v_1_1 := v_1.Args[1]
   498  				for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
   499  					if x != v_1_0 {
   500  						continue
   501  					}
   502  					z := v_1_1
   503  					v.reset(OpMul16)
   504  					v0 := b.NewValue0(v.Pos, OpAdd16, t)
   505  					v0.AddArg2(y, z)
   506  					v.AddArg2(x, v0)
   507  					return true
   508  				}
   509  			}
   510  		}
   511  		break
   512  	}
   513  	// match: (Add16 (Const16 [0]) x)
   514  	// result: x
   515  	for {
   516  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   517  			if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
   518  				continue
   519  			}
   520  			x := v_1
   521  			v.copyOf(x)
   522  			return true
   523  		}
   524  		break
   525  	}
   526  	// match: (Add16 (Const16 [1]) (Com16 x))
   527  	// result: (Neg16 x)
   528  	for {
   529  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   530  			if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 || v_1.Op != OpCom16 {
   531  				continue
   532  			}
   533  			x := v_1.Args[0]
   534  			v.reset(OpNeg16)
   535  			v.AddArg(x)
   536  			return true
   537  		}
   538  		break
   539  	}
   540  	// match: (Add16 (Add16 i:(Const16 <t>) z) x)
   541  	// cond: (z.Op != OpConst16 && x.Op != OpConst16)
   542  	// result: (Add16 i (Add16 <t> z x))
   543  	for {
   544  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   545  			if v_0.Op != OpAdd16 {
   546  				continue
   547  			}
   548  			_ = v_0.Args[1]
   549  			v_0_0 := v_0.Args[0]
   550  			v_0_1 := v_0.Args[1]
   551  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
   552  				i := v_0_0
   553  				if i.Op != OpConst16 {
   554  					continue
   555  				}
   556  				t := i.Type
   557  				z := v_0_1
   558  				x := v_1
   559  				if !(z.Op != OpConst16 && x.Op != OpConst16) {
   560  					continue
   561  				}
   562  				v.reset(OpAdd16)
   563  				v0 := b.NewValue0(v.Pos, OpAdd16, t)
   564  				v0.AddArg2(z, x)
   565  				v.AddArg2(i, v0)
   566  				return true
   567  			}
   568  		}
   569  		break
   570  	}
   571  	// match: (Add16 (Sub16 i:(Const16 <t>) z) x)
   572  	// cond: (z.Op != OpConst16 && x.Op != OpConst16)
   573  	// result: (Add16 i (Sub16 <t> x z))
   574  	for {
   575  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   576  			if v_0.Op != OpSub16 {
   577  				continue
   578  			}
   579  			z := v_0.Args[1]
   580  			i := v_0.Args[0]
   581  			if i.Op != OpConst16 {
   582  				continue
   583  			}
   584  			t := i.Type
   585  			x := v_1
   586  			if !(z.Op != OpConst16 && x.Op != OpConst16) {
   587  				continue
   588  			}
   589  			v.reset(OpAdd16)
   590  			v0 := b.NewValue0(v.Pos, OpSub16, t)
   591  			v0.AddArg2(x, z)
   592  			v.AddArg2(i, v0)
   593  			return true
   594  		}
   595  		break
   596  	}
   597  	// match: (Add16 (Const16 <t> [c]) (Add16 (Const16 <t> [d]) x))
   598  	// result: (Add16 (Const16 <t> [c+d]) x)
   599  	for {
   600  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   601  			if v_0.Op != OpConst16 {
   602  				continue
   603  			}
   604  			t := v_0.Type
   605  			c := auxIntToInt16(v_0.AuxInt)
   606  			if v_1.Op != OpAdd16 {
   607  				continue
   608  			}
   609  			_ = v_1.Args[1]
   610  			v_1_0 := v_1.Args[0]
   611  			v_1_1 := v_1.Args[1]
   612  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
   613  				if v_1_0.Op != OpConst16 || v_1_0.Type != t {
   614  					continue
   615  				}
   616  				d := auxIntToInt16(v_1_0.AuxInt)
   617  				x := v_1_1
   618  				v.reset(OpAdd16)
   619  				v0 := b.NewValue0(v.Pos, OpConst16, t)
   620  				v0.AuxInt = int16ToAuxInt(c + d)
   621  				v.AddArg2(v0, x)
   622  				return true
   623  			}
   624  		}
   625  		break
   626  	}
   627  	// match: (Add16 (Const16 <t> [c]) (Sub16 (Const16 <t> [d]) x))
   628  	// result: (Sub16 (Const16 <t> [c+d]) x)
   629  	for {
   630  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   631  			if v_0.Op != OpConst16 {
   632  				continue
   633  			}
   634  			t := v_0.Type
   635  			c := auxIntToInt16(v_0.AuxInt)
   636  			if v_1.Op != OpSub16 {
   637  				continue
   638  			}
   639  			x := v_1.Args[1]
   640  			v_1_0 := v_1.Args[0]
   641  			if v_1_0.Op != OpConst16 || v_1_0.Type != t {
   642  				continue
   643  			}
   644  			d := auxIntToInt16(v_1_0.AuxInt)
   645  			v.reset(OpSub16)
   646  			v0 := b.NewValue0(v.Pos, OpConst16, t)
   647  			v0.AuxInt = int16ToAuxInt(c + d)
   648  			v.AddArg2(v0, x)
   649  			return true
   650  		}
   651  		break
   652  	}
   653  	return false
   654  }
   655  func rewriteValuegeneric_OpAdd32(v *Value) bool {
   656  	v_1 := v.Args[1]
   657  	v_0 := v.Args[0]
   658  	b := v.Block
   659  	// match: (Add32 (Const32 [c]) (Const32 [d]))
   660  	// result: (Const32 [c+d])
   661  	for {
   662  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   663  			if v_0.Op != OpConst32 {
   664  				continue
   665  			}
   666  			c := auxIntToInt32(v_0.AuxInt)
   667  			if v_1.Op != OpConst32 {
   668  				continue
   669  			}
   670  			d := auxIntToInt32(v_1.AuxInt)
   671  			v.reset(OpConst32)
   672  			v.AuxInt = int32ToAuxInt(c + d)
   673  			return true
   674  		}
   675  		break
   676  	}
   677  	// match: (Add32 <t> (Mul32 x y) (Mul32 x z))
   678  	// result: (Mul32 x (Add32 <t> y z))
   679  	for {
   680  		t := v.Type
   681  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   682  			if v_0.Op != OpMul32 {
   683  				continue
   684  			}
   685  			_ = v_0.Args[1]
   686  			v_0_0 := v_0.Args[0]
   687  			v_0_1 := v_0.Args[1]
   688  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
   689  				x := v_0_0
   690  				y := v_0_1
   691  				if v_1.Op != OpMul32 {
   692  					continue
   693  				}
   694  				_ = v_1.Args[1]
   695  				v_1_0 := v_1.Args[0]
   696  				v_1_1 := v_1.Args[1]
   697  				for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
   698  					if x != v_1_0 {
   699  						continue
   700  					}
   701  					z := v_1_1
   702  					v.reset(OpMul32)
   703  					v0 := b.NewValue0(v.Pos, OpAdd32, t)
   704  					v0.AddArg2(y, z)
   705  					v.AddArg2(x, v0)
   706  					return true
   707  				}
   708  			}
   709  		}
   710  		break
   711  	}
   712  	// match: (Add32 (Const32 [0]) x)
   713  	// result: x
   714  	for {
   715  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   716  			if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
   717  				continue
   718  			}
   719  			x := v_1
   720  			v.copyOf(x)
   721  			return true
   722  		}
   723  		break
   724  	}
   725  	// match: (Add32 (Const32 [1]) (Com32 x))
   726  	// result: (Neg32 x)
   727  	for {
   728  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   729  			if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 || v_1.Op != OpCom32 {
   730  				continue
   731  			}
   732  			x := v_1.Args[0]
   733  			v.reset(OpNeg32)
   734  			v.AddArg(x)
   735  			return true
   736  		}
   737  		break
   738  	}
   739  	// match: (Add32 (Add32 i:(Const32 <t>) z) x)
   740  	// cond: (z.Op != OpConst32 && x.Op != OpConst32)
   741  	// result: (Add32 i (Add32 <t> z x))
   742  	for {
   743  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   744  			if v_0.Op != OpAdd32 {
   745  				continue
   746  			}
   747  			_ = v_0.Args[1]
   748  			v_0_0 := v_0.Args[0]
   749  			v_0_1 := v_0.Args[1]
   750  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
   751  				i := v_0_0
   752  				if i.Op != OpConst32 {
   753  					continue
   754  				}
   755  				t := i.Type
   756  				z := v_0_1
   757  				x := v_1
   758  				if !(z.Op != OpConst32 && x.Op != OpConst32) {
   759  					continue
   760  				}
   761  				v.reset(OpAdd32)
   762  				v0 := b.NewValue0(v.Pos, OpAdd32, t)
   763  				v0.AddArg2(z, x)
   764  				v.AddArg2(i, v0)
   765  				return true
   766  			}
   767  		}
   768  		break
   769  	}
   770  	// match: (Add32 (Sub32 i:(Const32 <t>) z) x)
   771  	// cond: (z.Op != OpConst32 && x.Op != OpConst32)
   772  	// result: (Add32 i (Sub32 <t> x z))
   773  	for {
   774  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   775  			if v_0.Op != OpSub32 {
   776  				continue
   777  			}
   778  			z := v_0.Args[1]
   779  			i := v_0.Args[0]
   780  			if i.Op != OpConst32 {
   781  				continue
   782  			}
   783  			t := i.Type
   784  			x := v_1
   785  			if !(z.Op != OpConst32 && x.Op != OpConst32) {
   786  				continue
   787  			}
   788  			v.reset(OpAdd32)
   789  			v0 := b.NewValue0(v.Pos, OpSub32, t)
   790  			v0.AddArg2(x, z)
   791  			v.AddArg2(i, v0)
   792  			return true
   793  		}
   794  		break
   795  	}
   796  	// match: (Add32 (Const32 <t> [c]) (Add32 (Const32 <t> [d]) x))
   797  	// result: (Add32 (Const32 <t> [c+d]) x)
   798  	for {
   799  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   800  			if v_0.Op != OpConst32 {
   801  				continue
   802  			}
   803  			t := v_0.Type
   804  			c := auxIntToInt32(v_0.AuxInt)
   805  			if v_1.Op != OpAdd32 {
   806  				continue
   807  			}
   808  			_ = v_1.Args[1]
   809  			v_1_0 := v_1.Args[0]
   810  			v_1_1 := v_1.Args[1]
   811  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
   812  				if v_1_0.Op != OpConst32 || v_1_0.Type != t {
   813  					continue
   814  				}
   815  				d := auxIntToInt32(v_1_0.AuxInt)
   816  				x := v_1_1
   817  				v.reset(OpAdd32)
   818  				v0 := b.NewValue0(v.Pos, OpConst32, t)
   819  				v0.AuxInt = int32ToAuxInt(c + d)
   820  				v.AddArg2(v0, x)
   821  				return true
   822  			}
   823  		}
   824  		break
   825  	}
   826  	// match: (Add32 (Const32 <t> [c]) (Sub32 (Const32 <t> [d]) x))
   827  	// result: (Sub32 (Const32 <t> [c+d]) x)
   828  	for {
   829  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   830  			if v_0.Op != OpConst32 {
   831  				continue
   832  			}
   833  			t := v_0.Type
   834  			c := auxIntToInt32(v_0.AuxInt)
   835  			if v_1.Op != OpSub32 {
   836  				continue
   837  			}
   838  			x := v_1.Args[1]
   839  			v_1_0 := v_1.Args[0]
   840  			if v_1_0.Op != OpConst32 || v_1_0.Type != t {
   841  				continue
   842  			}
   843  			d := auxIntToInt32(v_1_0.AuxInt)
   844  			v.reset(OpSub32)
   845  			v0 := b.NewValue0(v.Pos, OpConst32, t)
   846  			v0.AuxInt = int32ToAuxInt(c + d)
   847  			v.AddArg2(v0, x)
   848  			return true
   849  		}
   850  		break
   851  	}
   852  	return false
   853  }
   854  func rewriteValuegeneric_OpAdd32F(v *Value) bool {
   855  	v_1 := v.Args[1]
   856  	v_0 := v.Args[0]
   857  	// match: (Add32F (Const32F [c]) (Const32F [d]))
   858  	// cond: c+d == c+d
   859  	// result: (Const32F [c+d])
   860  	for {
   861  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   862  			if v_0.Op != OpConst32F {
   863  				continue
   864  			}
   865  			c := auxIntToFloat32(v_0.AuxInt)
   866  			if v_1.Op != OpConst32F {
   867  				continue
   868  			}
   869  			d := auxIntToFloat32(v_1.AuxInt)
   870  			if !(c+d == c+d) {
   871  				continue
   872  			}
   873  			v.reset(OpConst32F)
   874  			v.AuxInt = float32ToAuxInt(c + d)
   875  			return true
   876  		}
   877  		break
   878  	}
   879  	return false
   880  }
   881  func rewriteValuegeneric_OpAdd64(v *Value) bool {
   882  	v_1 := v.Args[1]
   883  	v_0 := v.Args[0]
   884  	b := v.Block
   885  	// match: (Add64 (Const64 [c]) (Const64 [d]))
   886  	// result: (Const64 [c+d])
   887  	for {
   888  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   889  			if v_0.Op != OpConst64 {
   890  				continue
   891  			}
   892  			c := auxIntToInt64(v_0.AuxInt)
   893  			if v_1.Op != OpConst64 {
   894  				continue
   895  			}
   896  			d := auxIntToInt64(v_1.AuxInt)
   897  			v.reset(OpConst64)
   898  			v.AuxInt = int64ToAuxInt(c + d)
   899  			return true
   900  		}
   901  		break
   902  	}
   903  	// match: (Add64 <t> (Mul64 x y) (Mul64 x z))
   904  	// result: (Mul64 x (Add64 <t> y z))
   905  	for {
   906  		t := v.Type
   907  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   908  			if v_0.Op != OpMul64 {
   909  				continue
   910  			}
   911  			_ = v_0.Args[1]
   912  			v_0_0 := v_0.Args[0]
   913  			v_0_1 := v_0.Args[1]
   914  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
   915  				x := v_0_0
   916  				y := v_0_1
   917  				if v_1.Op != OpMul64 {
   918  					continue
   919  				}
   920  				_ = v_1.Args[1]
   921  				v_1_0 := v_1.Args[0]
   922  				v_1_1 := v_1.Args[1]
   923  				for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
   924  					if x != v_1_0 {
   925  						continue
   926  					}
   927  					z := v_1_1
   928  					v.reset(OpMul64)
   929  					v0 := b.NewValue0(v.Pos, OpAdd64, t)
   930  					v0.AddArg2(y, z)
   931  					v.AddArg2(x, v0)
   932  					return true
   933  				}
   934  			}
   935  		}
   936  		break
   937  	}
   938  	// match: (Add64 (Const64 [0]) x)
   939  	// result: x
   940  	for {
   941  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   942  			if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
   943  				continue
   944  			}
   945  			x := v_1
   946  			v.copyOf(x)
   947  			return true
   948  		}
   949  		break
   950  	}
   951  	// match: (Add64 (Const64 [1]) (Com64 x))
   952  	// result: (Neg64 x)
   953  	for {
   954  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   955  			if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpCom64 {
   956  				continue
   957  			}
   958  			x := v_1.Args[0]
   959  			v.reset(OpNeg64)
   960  			v.AddArg(x)
   961  			return true
   962  		}
   963  		break
   964  	}
   965  	// match: (Add64 (Add64 i:(Const64 <t>) z) x)
   966  	// cond: (z.Op != OpConst64 && x.Op != OpConst64)
   967  	// result: (Add64 i (Add64 <t> z x))
   968  	for {
   969  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   970  			if v_0.Op != OpAdd64 {
   971  				continue
   972  			}
   973  			_ = v_0.Args[1]
   974  			v_0_0 := v_0.Args[0]
   975  			v_0_1 := v_0.Args[1]
   976  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
   977  				i := v_0_0
   978  				if i.Op != OpConst64 {
   979  					continue
   980  				}
   981  				t := i.Type
   982  				z := v_0_1
   983  				x := v_1
   984  				if !(z.Op != OpConst64 && x.Op != OpConst64) {
   985  					continue
   986  				}
   987  				v.reset(OpAdd64)
   988  				v0 := b.NewValue0(v.Pos, OpAdd64, t)
   989  				v0.AddArg2(z, x)
   990  				v.AddArg2(i, v0)
   991  				return true
   992  			}
   993  		}
   994  		break
   995  	}
   996  	// match: (Add64 (Sub64 i:(Const64 <t>) z) x)
   997  	// cond: (z.Op != OpConst64 && x.Op != OpConst64)
   998  	// result: (Add64 i (Sub64 <t> x z))
   999  	for {
  1000  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1001  			if v_0.Op != OpSub64 {
  1002  				continue
  1003  			}
  1004  			z := v_0.Args[1]
  1005  			i := v_0.Args[0]
  1006  			if i.Op != OpConst64 {
  1007  				continue
  1008  			}
  1009  			t := i.Type
  1010  			x := v_1
  1011  			if !(z.Op != OpConst64 && x.Op != OpConst64) {
  1012  				continue
  1013  			}
  1014  			v.reset(OpAdd64)
  1015  			v0 := b.NewValue0(v.Pos, OpSub64, t)
  1016  			v0.AddArg2(x, z)
  1017  			v.AddArg2(i, v0)
  1018  			return true
  1019  		}
  1020  		break
  1021  	}
  1022  	// match: (Add64 (Const64 <t> [c]) (Add64 (Const64 <t> [d]) x))
  1023  	// result: (Add64 (Const64 <t> [c+d]) x)
  1024  	for {
  1025  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1026  			if v_0.Op != OpConst64 {
  1027  				continue
  1028  			}
  1029  			t := v_0.Type
  1030  			c := auxIntToInt64(v_0.AuxInt)
  1031  			if v_1.Op != OpAdd64 {
  1032  				continue
  1033  			}
  1034  			_ = v_1.Args[1]
  1035  			v_1_0 := v_1.Args[0]
  1036  			v_1_1 := v_1.Args[1]
  1037  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1038  				if v_1_0.Op != OpConst64 || v_1_0.Type != t {
  1039  					continue
  1040  				}
  1041  				d := auxIntToInt64(v_1_0.AuxInt)
  1042  				x := v_1_1
  1043  				v.reset(OpAdd64)
  1044  				v0 := b.NewValue0(v.Pos, OpConst64, t)
  1045  				v0.AuxInt = int64ToAuxInt(c + d)
  1046  				v.AddArg2(v0, x)
  1047  				return true
  1048  			}
  1049  		}
  1050  		break
  1051  	}
  1052  	// match: (Add64 (Const64 <t> [c]) (Sub64 (Const64 <t> [d]) x))
  1053  	// result: (Sub64 (Const64 <t> [c+d]) x)
  1054  	for {
  1055  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1056  			if v_0.Op != OpConst64 {
  1057  				continue
  1058  			}
  1059  			t := v_0.Type
  1060  			c := auxIntToInt64(v_0.AuxInt)
  1061  			if v_1.Op != OpSub64 {
  1062  				continue
  1063  			}
  1064  			x := v_1.Args[1]
  1065  			v_1_0 := v_1.Args[0]
  1066  			if v_1_0.Op != OpConst64 || v_1_0.Type != t {
  1067  				continue
  1068  			}
  1069  			d := auxIntToInt64(v_1_0.AuxInt)
  1070  			v.reset(OpSub64)
  1071  			v0 := b.NewValue0(v.Pos, OpConst64, t)
  1072  			v0.AuxInt = int64ToAuxInt(c + d)
  1073  			v.AddArg2(v0, x)
  1074  			return true
  1075  		}
  1076  		break
  1077  	}
  1078  	return false
  1079  }
  1080  func rewriteValuegeneric_OpAdd64F(v *Value) bool {
  1081  	v_1 := v.Args[1]
  1082  	v_0 := v.Args[0]
  1083  	// match: (Add64F (Const64F [c]) (Const64F [d]))
  1084  	// cond: c+d == c+d
  1085  	// result: (Const64F [c+d])
  1086  	for {
  1087  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1088  			if v_0.Op != OpConst64F {
  1089  				continue
  1090  			}
  1091  			c := auxIntToFloat64(v_0.AuxInt)
  1092  			if v_1.Op != OpConst64F {
  1093  				continue
  1094  			}
  1095  			d := auxIntToFloat64(v_1.AuxInt)
  1096  			if !(c+d == c+d) {
  1097  				continue
  1098  			}
  1099  			v.reset(OpConst64F)
  1100  			v.AuxInt = float64ToAuxInt(c + d)
  1101  			return true
  1102  		}
  1103  		break
  1104  	}
  1105  	return false
  1106  }
  1107  func rewriteValuegeneric_OpAdd8(v *Value) bool {
  1108  	v_1 := v.Args[1]
  1109  	v_0 := v.Args[0]
  1110  	b := v.Block
  1111  	// match: (Add8 (Const8 [c]) (Const8 [d]))
  1112  	// result: (Const8 [c+d])
  1113  	for {
  1114  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1115  			if v_0.Op != OpConst8 {
  1116  				continue
  1117  			}
  1118  			c := auxIntToInt8(v_0.AuxInt)
  1119  			if v_1.Op != OpConst8 {
  1120  				continue
  1121  			}
  1122  			d := auxIntToInt8(v_1.AuxInt)
  1123  			v.reset(OpConst8)
  1124  			v.AuxInt = int8ToAuxInt(c + d)
  1125  			return true
  1126  		}
  1127  		break
  1128  	}
  1129  	// match: (Add8 <t> (Mul8 x y) (Mul8 x z))
  1130  	// result: (Mul8 x (Add8 <t> y z))
  1131  	for {
  1132  		t := v.Type
  1133  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1134  			if v_0.Op != OpMul8 {
  1135  				continue
  1136  			}
  1137  			_ = v_0.Args[1]
  1138  			v_0_0 := v_0.Args[0]
  1139  			v_0_1 := v_0.Args[1]
  1140  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  1141  				x := v_0_0
  1142  				y := v_0_1
  1143  				if v_1.Op != OpMul8 {
  1144  					continue
  1145  				}
  1146  				_ = v_1.Args[1]
  1147  				v_1_0 := v_1.Args[0]
  1148  				v_1_1 := v_1.Args[1]
  1149  				for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
  1150  					if x != v_1_0 {
  1151  						continue
  1152  					}
  1153  					z := v_1_1
  1154  					v.reset(OpMul8)
  1155  					v0 := b.NewValue0(v.Pos, OpAdd8, t)
  1156  					v0.AddArg2(y, z)
  1157  					v.AddArg2(x, v0)
  1158  					return true
  1159  				}
  1160  			}
  1161  		}
  1162  		break
  1163  	}
  1164  	// match: (Add8 (Const8 [0]) x)
  1165  	// result: x
  1166  	for {
  1167  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1168  			if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
  1169  				continue
  1170  			}
  1171  			x := v_1
  1172  			v.copyOf(x)
  1173  			return true
  1174  		}
  1175  		break
  1176  	}
  1177  	// match: (Add8 (Const8 [1]) (Com8 x))
  1178  	// result: (Neg8 x)
  1179  	for {
  1180  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1181  			if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 || v_1.Op != OpCom8 {
  1182  				continue
  1183  			}
  1184  			x := v_1.Args[0]
  1185  			v.reset(OpNeg8)
  1186  			v.AddArg(x)
  1187  			return true
  1188  		}
  1189  		break
  1190  	}
  1191  	// match: (Add8 (Add8 i:(Const8 <t>) z) x)
  1192  	// cond: (z.Op != OpConst8 && x.Op != OpConst8)
  1193  	// result: (Add8 i (Add8 <t> z x))
  1194  	for {
  1195  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1196  			if v_0.Op != OpAdd8 {
  1197  				continue
  1198  			}
  1199  			_ = v_0.Args[1]
  1200  			v_0_0 := v_0.Args[0]
  1201  			v_0_1 := v_0.Args[1]
  1202  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  1203  				i := v_0_0
  1204  				if i.Op != OpConst8 {
  1205  					continue
  1206  				}
  1207  				t := i.Type
  1208  				z := v_0_1
  1209  				x := v_1
  1210  				if !(z.Op != OpConst8 && x.Op != OpConst8) {
  1211  					continue
  1212  				}
  1213  				v.reset(OpAdd8)
  1214  				v0 := b.NewValue0(v.Pos, OpAdd8, t)
  1215  				v0.AddArg2(z, x)
  1216  				v.AddArg2(i, v0)
  1217  				return true
  1218  			}
  1219  		}
  1220  		break
  1221  	}
  1222  	// match: (Add8 (Sub8 i:(Const8 <t>) z) x)
  1223  	// cond: (z.Op != OpConst8 && x.Op != OpConst8)
  1224  	// result: (Add8 i (Sub8 <t> x z))
  1225  	for {
  1226  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1227  			if v_0.Op != OpSub8 {
  1228  				continue
  1229  			}
  1230  			z := v_0.Args[1]
  1231  			i := v_0.Args[0]
  1232  			if i.Op != OpConst8 {
  1233  				continue
  1234  			}
  1235  			t := i.Type
  1236  			x := v_1
  1237  			if !(z.Op != OpConst8 && x.Op != OpConst8) {
  1238  				continue
  1239  			}
  1240  			v.reset(OpAdd8)
  1241  			v0 := b.NewValue0(v.Pos, OpSub8, t)
  1242  			v0.AddArg2(x, z)
  1243  			v.AddArg2(i, v0)
  1244  			return true
  1245  		}
  1246  		break
  1247  	}
  1248  	// match: (Add8 (Const8 <t> [c]) (Add8 (Const8 <t> [d]) x))
  1249  	// result: (Add8 (Const8 <t> [c+d]) x)
  1250  	for {
  1251  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1252  			if v_0.Op != OpConst8 {
  1253  				continue
  1254  			}
  1255  			t := v_0.Type
  1256  			c := auxIntToInt8(v_0.AuxInt)
  1257  			if v_1.Op != OpAdd8 {
  1258  				continue
  1259  			}
  1260  			_ = v_1.Args[1]
  1261  			v_1_0 := v_1.Args[0]
  1262  			v_1_1 := v_1.Args[1]
  1263  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1264  				if v_1_0.Op != OpConst8 || v_1_0.Type != t {
  1265  					continue
  1266  				}
  1267  				d := auxIntToInt8(v_1_0.AuxInt)
  1268  				x := v_1_1
  1269  				v.reset(OpAdd8)
  1270  				v0 := b.NewValue0(v.Pos, OpConst8, t)
  1271  				v0.AuxInt = int8ToAuxInt(c + d)
  1272  				v.AddArg2(v0, x)
  1273  				return true
  1274  			}
  1275  		}
  1276  		break
  1277  	}
  1278  	// match: (Add8 (Const8 <t> [c]) (Sub8 (Const8 <t> [d]) x))
  1279  	// result: (Sub8 (Const8 <t> [c+d]) x)
  1280  	for {
  1281  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1282  			if v_0.Op != OpConst8 {
  1283  				continue
  1284  			}
  1285  			t := v_0.Type
  1286  			c := auxIntToInt8(v_0.AuxInt)
  1287  			if v_1.Op != OpSub8 {
  1288  				continue
  1289  			}
  1290  			x := v_1.Args[1]
  1291  			v_1_0 := v_1.Args[0]
  1292  			if v_1_0.Op != OpConst8 || v_1_0.Type != t {
  1293  				continue
  1294  			}
  1295  			d := auxIntToInt8(v_1_0.AuxInt)
  1296  			v.reset(OpSub8)
  1297  			v0 := b.NewValue0(v.Pos, OpConst8, t)
  1298  			v0.AuxInt = int8ToAuxInt(c + d)
  1299  			v.AddArg2(v0, x)
  1300  			return true
  1301  		}
  1302  		break
  1303  	}
  1304  	return false
  1305  }
  1306  func rewriteValuegeneric_OpAddPtr(v *Value) bool {
  1307  	v_1 := v.Args[1]
  1308  	v_0 := v.Args[0]
  1309  	// match: (AddPtr <t> x (Const64 [c]))
  1310  	// result: (OffPtr <t> x [c])
  1311  	for {
  1312  		t := v.Type
  1313  		x := v_0
  1314  		if v_1.Op != OpConst64 {
  1315  			break
  1316  		}
  1317  		c := auxIntToInt64(v_1.AuxInt)
  1318  		v.reset(OpOffPtr)
  1319  		v.Type = t
  1320  		v.AuxInt = int64ToAuxInt(c)
  1321  		v.AddArg(x)
  1322  		return true
  1323  	}
  1324  	// match: (AddPtr <t> x (Const32 [c]))
  1325  	// result: (OffPtr <t> x [int64(c)])
  1326  	for {
  1327  		t := v.Type
  1328  		x := v_0
  1329  		if v_1.Op != OpConst32 {
  1330  			break
  1331  		}
  1332  		c := auxIntToInt32(v_1.AuxInt)
  1333  		v.reset(OpOffPtr)
  1334  		v.Type = t
  1335  		v.AuxInt = int64ToAuxInt(int64(c))
  1336  		v.AddArg(x)
  1337  		return true
  1338  	}
  1339  	return false
  1340  }
  1341  func rewriteValuegeneric_OpAnd16(v *Value) bool {
  1342  	v_1 := v.Args[1]
  1343  	v_0 := v.Args[0]
  1344  	b := v.Block
  1345  	// match: (And16 (Const16 [c]) (Const16 [d]))
  1346  	// result: (Const16 [c&d])
  1347  	for {
  1348  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1349  			if v_0.Op != OpConst16 {
  1350  				continue
  1351  			}
  1352  			c := auxIntToInt16(v_0.AuxInt)
  1353  			if v_1.Op != OpConst16 {
  1354  				continue
  1355  			}
  1356  			d := auxIntToInt16(v_1.AuxInt)
  1357  			v.reset(OpConst16)
  1358  			v.AuxInt = int16ToAuxInt(c & d)
  1359  			return true
  1360  		}
  1361  		break
  1362  	}
  1363  	// match: (And16 (Const16 [m]) (Rsh16Ux64 _ (Const64 [c])))
  1364  	// cond: c >= int64(16-ntz16(m))
  1365  	// result: (Const16 [0])
  1366  	for {
  1367  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1368  			if v_0.Op != OpConst16 {
  1369  				continue
  1370  			}
  1371  			m := auxIntToInt16(v_0.AuxInt)
  1372  			if v_1.Op != OpRsh16Ux64 {
  1373  				continue
  1374  			}
  1375  			_ = v_1.Args[1]
  1376  			v_1_1 := v_1.Args[1]
  1377  			if v_1_1.Op != OpConst64 {
  1378  				continue
  1379  			}
  1380  			c := auxIntToInt64(v_1_1.AuxInt)
  1381  			if !(c >= int64(16-ntz16(m))) {
  1382  				continue
  1383  			}
  1384  			v.reset(OpConst16)
  1385  			v.AuxInt = int16ToAuxInt(0)
  1386  			return true
  1387  		}
  1388  		break
  1389  	}
  1390  	// match: (And16 (Const16 [m]) (Lsh16x64 _ (Const64 [c])))
  1391  	// cond: c >= int64(16-nlz16(m))
  1392  	// result: (Const16 [0])
  1393  	for {
  1394  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1395  			if v_0.Op != OpConst16 {
  1396  				continue
  1397  			}
  1398  			m := auxIntToInt16(v_0.AuxInt)
  1399  			if v_1.Op != OpLsh16x64 {
  1400  				continue
  1401  			}
  1402  			_ = v_1.Args[1]
  1403  			v_1_1 := v_1.Args[1]
  1404  			if v_1_1.Op != OpConst64 {
  1405  				continue
  1406  			}
  1407  			c := auxIntToInt64(v_1_1.AuxInt)
  1408  			if !(c >= int64(16-nlz16(m))) {
  1409  				continue
  1410  			}
  1411  			v.reset(OpConst16)
  1412  			v.AuxInt = int16ToAuxInt(0)
  1413  			return true
  1414  		}
  1415  		break
  1416  	}
  1417  	// match: (And16 x x)
  1418  	// result: x
  1419  	for {
  1420  		x := v_0
  1421  		if x != v_1 {
  1422  			break
  1423  		}
  1424  		v.copyOf(x)
  1425  		return true
  1426  	}
  1427  	// match: (And16 (Const16 [-1]) x)
  1428  	// result: x
  1429  	for {
  1430  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1431  			if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
  1432  				continue
  1433  			}
  1434  			x := v_1
  1435  			v.copyOf(x)
  1436  			return true
  1437  		}
  1438  		break
  1439  	}
  1440  	// match: (And16 (Const16 [0]) _)
  1441  	// result: (Const16 [0])
  1442  	for {
  1443  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1444  			if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
  1445  				continue
  1446  			}
  1447  			v.reset(OpConst16)
  1448  			v.AuxInt = int16ToAuxInt(0)
  1449  			return true
  1450  		}
  1451  		break
  1452  	}
  1453  	// match: (And16 x (And16 x y))
  1454  	// result: (And16 x y)
  1455  	for {
  1456  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1457  			x := v_0
  1458  			if v_1.Op != OpAnd16 {
  1459  				continue
  1460  			}
  1461  			_ = v_1.Args[1]
  1462  			v_1_0 := v_1.Args[0]
  1463  			v_1_1 := v_1.Args[1]
  1464  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1465  				if x != v_1_0 {
  1466  					continue
  1467  				}
  1468  				y := v_1_1
  1469  				v.reset(OpAnd16)
  1470  				v.AddArg2(x, y)
  1471  				return true
  1472  			}
  1473  		}
  1474  		break
  1475  	}
  1476  	// match: (And16 (And16 i:(Const16 <t>) z) x)
  1477  	// cond: (z.Op != OpConst16 && x.Op != OpConst16)
  1478  	// result: (And16 i (And16 <t> z x))
  1479  	for {
  1480  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1481  			if v_0.Op != OpAnd16 {
  1482  				continue
  1483  			}
  1484  			_ = v_0.Args[1]
  1485  			v_0_0 := v_0.Args[0]
  1486  			v_0_1 := v_0.Args[1]
  1487  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  1488  				i := v_0_0
  1489  				if i.Op != OpConst16 {
  1490  					continue
  1491  				}
  1492  				t := i.Type
  1493  				z := v_0_1
  1494  				x := v_1
  1495  				if !(z.Op != OpConst16 && x.Op != OpConst16) {
  1496  					continue
  1497  				}
  1498  				v.reset(OpAnd16)
  1499  				v0 := b.NewValue0(v.Pos, OpAnd16, t)
  1500  				v0.AddArg2(z, x)
  1501  				v.AddArg2(i, v0)
  1502  				return true
  1503  			}
  1504  		}
  1505  		break
  1506  	}
  1507  	// match: (And16 (Const16 <t> [c]) (And16 (Const16 <t> [d]) x))
  1508  	// result: (And16 (Const16 <t> [c&d]) x)
  1509  	for {
  1510  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1511  			if v_0.Op != OpConst16 {
  1512  				continue
  1513  			}
  1514  			t := v_0.Type
  1515  			c := auxIntToInt16(v_0.AuxInt)
  1516  			if v_1.Op != OpAnd16 {
  1517  				continue
  1518  			}
  1519  			_ = v_1.Args[1]
  1520  			v_1_0 := v_1.Args[0]
  1521  			v_1_1 := v_1.Args[1]
  1522  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1523  				if v_1_0.Op != OpConst16 || v_1_0.Type != t {
  1524  					continue
  1525  				}
  1526  				d := auxIntToInt16(v_1_0.AuxInt)
  1527  				x := v_1_1
  1528  				v.reset(OpAnd16)
  1529  				v0 := b.NewValue0(v.Pos, OpConst16, t)
  1530  				v0.AuxInt = int16ToAuxInt(c & d)
  1531  				v.AddArg2(v0, x)
  1532  				return true
  1533  			}
  1534  		}
  1535  		break
  1536  	}
  1537  	return false
  1538  }
  1539  func rewriteValuegeneric_OpAnd32(v *Value) bool {
  1540  	v_1 := v.Args[1]
  1541  	v_0 := v.Args[0]
  1542  	b := v.Block
  1543  	// match: (And32 (Const32 [c]) (Const32 [d]))
  1544  	// result: (Const32 [c&d])
  1545  	for {
  1546  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1547  			if v_0.Op != OpConst32 {
  1548  				continue
  1549  			}
  1550  			c := auxIntToInt32(v_0.AuxInt)
  1551  			if v_1.Op != OpConst32 {
  1552  				continue
  1553  			}
  1554  			d := auxIntToInt32(v_1.AuxInt)
  1555  			v.reset(OpConst32)
  1556  			v.AuxInt = int32ToAuxInt(c & d)
  1557  			return true
  1558  		}
  1559  		break
  1560  	}
  1561  	// match: (And32 (Const32 [m]) (Rsh32Ux64 _ (Const64 [c])))
  1562  	// cond: c >= int64(32-ntz32(m))
  1563  	// result: (Const32 [0])
  1564  	for {
  1565  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1566  			if v_0.Op != OpConst32 {
  1567  				continue
  1568  			}
  1569  			m := auxIntToInt32(v_0.AuxInt)
  1570  			if v_1.Op != OpRsh32Ux64 {
  1571  				continue
  1572  			}
  1573  			_ = v_1.Args[1]
  1574  			v_1_1 := v_1.Args[1]
  1575  			if v_1_1.Op != OpConst64 {
  1576  				continue
  1577  			}
  1578  			c := auxIntToInt64(v_1_1.AuxInt)
  1579  			if !(c >= int64(32-ntz32(m))) {
  1580  				continue
  1581  			}
  1582  			v.reset(OpConst32)
  1583  			v.AuxInt = int32ToAuxInt(0)
  1584  			return true
  1585  		}
  1586  		break
  1587  	}
  1588  	// match: (And32 (Const32 [m]) (Lsh32x64 _ (Const64 [c])))
  1589  	// cond: c >= int64(32-nlz32(m))
  1590  	// result: (Const32 [0])
  1591  	for {
  1592  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1593  			if v_0.Op != OpConst32 {
  1594  				continue
  1595  			}
  1596  			m := auxIntToInt32(v_0.AuxInt)
  1597  			if v_1.Op != OpLsh32x64 {
  1598  				continue
  1599  			}
  1600  			_ = v_1.Args[1]
  1601  			v_1_1 := v_1.Args[1]
  1602  			if v_1_1.Op != OpConst64 {
  1603  				continue
  1604  			}
  1605  			c := auxIntToInt64(v_1_1.AuxInt)
  1606  			if !(c >= int64(32-nlz32(m))) {
  1607  				continue
  1608  			}
  1609  			v.reset(OpConst32)
  1610  			v.AuxInt = int32ToAuxInt(0)
  1611  			return true
  1612  		}
  1613  		break
  1614  	}
  1615  	// match: (And32 x x)
  1616  	// result: x
  1617  	for {
  1618  		x := v_0
  1619  		if x != v_1 {
  1620  			break
  1621  		}
  1622  		v.copyOf(x)
  1623  		return true
  1624  	}
  1625  	// match: (And32 (Const32 [-1]) x)
  1626  	// result: x
  1627  	for {
  1628  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1629  			if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
  1630  				continue
  1631  			}
  1632  			x := v_1
  1633  			v.copyOf(x)
  1634  			return true
  1635  		}
  1636  		break
  1637  	}
  1638  	// match: (And32 (Const32 [0]) _)
  1639  	// result: (Const32 [0])
  1640  	for {
  1641  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1642  			if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
  1643  				continue
  1644  			}
  1645  			v.reset(OpConst32)
  1646  			v.AuxInt = int32ToAuxInt(0)
  1647  			return true
  1648  		}
  1649  		break
  1650  	}
  1651  	// match: (And32 x (And32 x y))
  1652  	// result: (And32 x y)
  1653  	for {
  1654  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1655  			x := v_0
  1656  			if v_1.Op != OpAnd32 {
  1657  				continue
  1658  			}
  1659  			_ = v_1.Args[1]
  1660  			v_1_0 := v_1.Args[0]
  1661  			v_1_1 := v_1.Args[1]
  1662  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1663  				if x != v_1_0 {
  1664  					continue
  1665  				}
  1666  				y := v_1_1
  1667  				v.reset(OpAnd32)
  1668  				v.AddArg2(x, y)
  1669  				return true
  1670  			}
  1671  		}
  1672  		break
  1673  	}
  1674  	// match: (And32 (And32 i:(Const32 <t>) z) x)
  1675  	// cond: (z.Op != OpConst32 && x.Op != OpConst32)
  1676  	// result: (And32 i (And32 <t> z x))
  1677  	for {
  1678  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1679  			if v_0.Op != OpAnd32 {
  1680  				continue
  1681  			}
  1682  			_ = v_0.Args[1]
  1683  			v_0_0 := v_0.Args[0]
  1684  			v_0_1 := v_0.Args[1]
  1685  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  1686  				i := v_0_0
  1687  				if i.Op != OpConst32 {
  1688  					continue
  1689  				}
  1690  				t := i.Type
  1691  				z := v_0_1
  1692  				x := v_1
  1693  				if !(z.Op != OpConst32 && x.Op != OpConst32) {
  1694  					continue
  1695  				}
  1696  				v.reset(OpAnd32)
  1697  				v0 := b.NewValue0(v.Pos, OpAnd32, t)
  1698  				v0.AddArg2(z, x)
  1699  				v.AddArg2(i, v0)
  1700  				return true
  1701  			}
  1702  		}
  1703  		break
  1704  	}
  1705  	// match: (And32 (Const32 <t> [c]) (And32 (Const32 <t> [d]) x))
  1706  	// result: (And32 (Const32 <t> [c&d]) x)
  1707  	for {
  1708  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1709  			if v_0.Op != OpConst32 {
  1710  				continue
  1711  			}
  1712  			t := v_0.Type
  1713  			c := auxIntToInt32(v_0.AuxInt)
  1714  			if v_1.Op != OpAnd32 {
  1715  				continue
  1716  			}
  1717  			_ = v_1.Args[1]
  1718  			v_1_0 := v_1.Args[0]
  1719  			v_1_1 := v_1.Args[1]
  1720  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1721  				if v_1_0.Op != OpConst32 || v_1_0.Type != t {
  1722  					continue
  1723  				}
  1724  				d := auxIntToInt32(v_1_0.AuxInt)
  1725  				x := v_1_1
  1726  				v.reset(OpAnd32)
  1727  				v0 := b.NewValue0(v.Pos, OpConst32, t)
  1728  				v0.AuxInt = int32ToAuxInt(c & d)
  1729  				v.AddArg2(v0, x)
  1730  				return true
  1731  			}
  1732  		}
  1733  		break
  1734  	}
  1735  	return false
  1736  }
  1737  func rewriteValuegeneric_OpAnd64(v *Value) bool {
  1738  	v_1 := v.Args[1]
  1739  	v_0 := v.Args[0]
  1740  	b := v.Block
  1741  	// match: (And64 (Const64 [c]) (Const64 [d]))
  1742  	// result: (Const64 [c&d])
  1743  	for {
  1744  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1745  			if v_0.Op != OpConst64 {
  1746  				continue
  1747  			}
  1748  			c := auxIntToInt64(v_0.AuxInt)
  1749  			if v_1.Op != OpConst64 {
  1750  				continue
  1751  			}
  1752  			d := auxIntToInt64(v_1.AuxInt)
  1753  			v.reset(OpConst64)
  1754  			v.AuxInt = int64ToAuxInt(c & d)
  1755  			return true
  1756  		}
  1757  		break
  1758  	}
  1759  	// match: (And64 (Const64 [m]) (Rsh64Ux64 _ (Const64 [c])))
  1760  	// cond: c >= int64(64-ntz64(m))
  1761  	// result: (Const64 [0])
  1762  	for {
  1763  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1764  			if v_0.Op != OpConst64 {
  1765  				continue
  1766  			}
  1767  			m := auxIntToInt64(v_0.AuxInt)
  1768  			if v_1.Op != OpRsh64Ux64 {
  1769  				continue
  1770  			}
  1771  			_ = v_1.Args[1]
  1772  			v_1_1 := v_1.Args[1]
  1773  			if v_1_1.Op != OpConst64 {
  1774  				continue
  1775  			}
  1776  			c := auxIntToInt64(v_1_1.AuxInt)
  1777  			if !(c >= int64(64-ntz64(m))) {
  1778  				continue
  1779  			}
  1780  			v.reset(OpConst64)
  1781  			v.AuxInt = int64ToAuxInt(0)
  1782  			return true
  1783  		}
  1784  		break
  1785  	}
  1786  	// match: (And64 (Const64 [m]) (Lsh64x64 _ (Const64 [c])))
  1787  	// cond: c >= int64(64-nlz64(m))
  1788  	// result: (Const64 [0])
  1789  	for {
  1790  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1791  			if v_0.Op != OpConst64 {
  1792  				continue
  1793  			}
  1794  			m := auxIntToInt64(v_0.AuxInt)
  1795  			if v_1.Op != OpLsh64x64 {
  1796  				continue
  1797  			}
  1798  			_ = v_1.Args[1]
  1799  			v_1_1 := v_1.Args[1]
  1800  			if v_1_1.Op != OpConst64 {
  1801  				continue
  1802  			}
  1803  			c := auxIntToInt64(v_1_1.AuxInt)
  1804  			if !(c >= int64(64-nlz64(m))) {
  1805  				continue
  1806  			}
  1807  			v.reset(OpConst64)
  1808  			v.AuxInt = int64ToAuxInt(0)
  1809  			return true
  1810  		}
  1811  		break
  1812  	}
  1813  	// match: (And64 x x)
  1814  	// result: x
  1815  	for {
  1816  		x := v_0
  1817  		if x != v_1 {
  1818  			break
  1819  		}
  1820  		v.copyOf(x)
  1821  		return true
  1822  	}
  1823  	// match: (And64 (Const64 [-1]) x)
  1824  	// result: x
  1825  	for {
  1826  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1827  			if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
  1828  				continue
  1829  			}
  1830  			x := v_1
  1831  			v.copyOf(x)
  1832  			return true
  1833  		}
  1834  		break
  1835  	}
  1836  	// match: (And64 (Const64 [0]) _)
  1837  	// result: (Const64 [0])
  1838  	for {
  1839  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1840  			if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
  1841  				continue
  1842  			}
  1843  			v.reset(OpConst64)
  1844  			v.AuxInt = int64ToAuxInt(0)
  1845  			return true
  1846  		}
  1847  		break
  1848  	}
  1849  	// match: (And64 x (And64 x y))
  1850  	// result: (And64 x y)
  1851  	for {
  1852  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1853  			x := v_0
  1854  			if v_1.Op != OpAnd64 {
  1855  				continue
  1856  			}
  1857  			_ = v_1.Args[1]
  1858  			v_1_0 := v_1.Args[0]
  1859  			v_1_1 := v_1.Args[1]
  1860  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1861  				if x != v_1_0 {
  1862  					continue
  1863  				}
  1864  				y := v_1_1
  1865  				v.reset(OpAnd64)
  1866  				v.AddArg2(x, y)
  1867  				return true
  1868  			}
  1869  		}
  1870  		break
  1871  	}
  1872  	// match: (And64 (And64 i:(Const64 <t>) z) x)
  1873  	// cond: (z.Op != OpConst64 && x.Op != OpConst64)
  1874  	// result: (And64 i (And64 <t> z x))
  1875  	for {
  1876  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1877  			if v_0.Op != OpAnd64 {
  1878  				continue
  1879  			}
  1880  			_ = v_0.Args[1]
  1881  			v_0_0 := v_0.Args[0]
  1882  			v_0_1 := v_0.Args[1]
  1883  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  1884  				i := v_0_0
  1885  				if i.Op != OpConst64 {
  1886  					continue
  1887  				}
  1888  				t := i.Type
  1889  				z := v_0_1
  1890  				x := v_1
  1891  				if !(z.Op != OpConst64 && x.Op != OpConst64) {
  1892  					continue
  1893  				}
  1894  				v.reset(OpAnd64)
  1895  				v0 := b.NewValue0(v.Pos, OpAnd64, t)
  1896  				v0.AddArg2(z, x)
  1897  				v.AddArg2(i, v0)
  1898  				return true
  1899  			}
  1900  		}
  1901  		break
  1902  	}
  1903  	// match: (And64 (Const64 <t> [c]) (And64 (Const64 <t> [d]) x))
  1904  	// result: (And64 (Const64 <t> [c&d]) x)
  1905  	for {
  1906  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1907  			if v_0.Op != OpConst64 {
  1908  				continue
  1909  			}
  1910  			t := v_0.Type
  1911  			c := auxIntToInt64(v_0.AuxInt)
  1912  			if v_1.Op != OpAnd64 {
  1913  				continue
  1914  			}
  1915  			_ = v_1.Args[1]
  1916  			v_1_0 := v_1.Args[0]
  1917  			v_1_1 := v_1.Args[1]
  1918  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  1919  				if v_1_0.Op != OpConst64 || v_1_0.Type != t {
  1920  					continue
  1921  				}
  1922  				d := auxIntToInt64(v_1_0.AuxInt)
  1923  				x := v_1_1
  1924  				v.reset(OpAnd64)
  1925  				v0 := b.NewValue0(v.Pos, OpConst64, t)
  1926  				v0.AuxInt = int64ToAuxInt(c & d)
  1927  				v.AddArg2(v0, x)
  1928  				return true
  1929  			}
  1930  		}
  1931  		break
  1932  	}
  1933  	return false
  1934  }
  1935  func rewriteValuegeneric_OpAnd8(v *Value) bool {
  1936  	v_1 := v.Args[1]
  1937  	v_0 := v.Args[0]
  1938  	b := v.Block
  1939  	// match: (And8 (Const8 [c]) (Const8 [d]))
  1940  	// result: (Const8 [c&d])
  1941  	for {
  1942  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1943  			if v_0.Op != OpConst8 {
  1944  				continue
  1945  			}
  1946  			c := auxIntToInt8(v_0.AuxInt)
  1947  			if v_1.Op != OpConst8 {
  1948  				continue
  1949  			}
  1950  			d := auxIntToInt8(v_1.AuxInt)
  1951  			v.reset(OpConst8)
  1952  			v.AuxInt = int8ToAuxInt(c & d)
  1953  			return true
  1954  		}
  1955  		break
  1956  	}
  1957  	// match: (And8 (Const8 [m]) (Rsh8Ux64 _ (Const64 [c])))
  1958  	// cond: c >= int64(8-ntz8(m))
  1959  	// result: (Const8 [0])
  1960  	for {
  1961  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1962  			if v_0.Op != OpConst8 {
  1963  				continue
  1964  			}
  1965  			m := auxIntToInt8(v_0.AuxInt)
  1966  			if v_1.Op != OpRsh8Ux64 {
  1967  				continue
  1968  			}
  1969  			_ = v_1.Args[1]
  1970  			v_1_1 := v_1.Args[1]
  1971  			if v_1_1.Op != OpConst64 {
  1972  				continue
  1973  			}
  1974  			c := auxIntToInt64(v_1_1.AuxInt)
  1975  			if !(c >= int64(8-ntz8(m))) {
  1976  				continue
  1977  			}
  1978  			v.reset(OpConst8)
  1979  			v.AuxInt = int8ToAuxInt(0)
  1980  			return true
  1981  		}
  1982  		break
  1983  	}
  1984  	// match: (And8 (Const8 [m]) (Lsh8x64 _ (Const64 [c])))
  1985  	// cond: c >= int64(8-nlz8(m))
  1986  	// result: (Const8 [0])
  1987  	for {
  1988  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1989  			if v_0.Op != OpConst8 {
  1990  				continue
  1991  			}
  1992  			m := auxIntToInt8(v_0.AuxInt)
  1993  			if v_1.Op != OpLsh8x64 {
  1994  				continue
  1995  			}
  1996  			_ = v_1.Args[1]
  1997  			v_1_1 := v_1.Args[1]
  1998  			if v_1_1.Op != OpConst64 {
  1999  				continue
  2000  			}
  2001  			c := auxIntToInt64(v_1_1.AuxInt)
  2002  			if !(c >= int64(8-nlz8(m))) {
  2003  				continue
  2004  			}
  2005  			v.reset(OpConst8)
  2006  			v.AuxInt = int8ToAuxInt(0)
  2007  			return true
  2008  		}
  2009  		break
  2010  	}
  2011  	// match: (And8 x x)
  2012  	// result: x
  2013  	for {
  2014  		x := v_0
  2015  		if x != v_1 {
  2016  			break
  2017  		}
  2018  		v.copyOf(x)
  2019  		return true
  2020  	}
  2021  	// match: (And8 (Const8 [-1]) x)
  2022  	// result: x
  2023  	for {
  2024  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2025  			if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
  2026  				continue
  2027  			}
  2028  			x := v_1
  2029  			v.copyOf(x)
  2030  			return true
  2031  		}
  2032  		break
  2033  	}
  2034  	// match: (And8 (Const8 [0]) _)
  2035  	// result: (Const8 [0])
  2036  	for {
  2037  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2038  			if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
  2039  				continue
  2040  			}
  2041  			v.reset(OpConst8)
  2042  			v.AuxInt = int8ToAuxInt(0)
  2043  			return true
  2044  		}
  2045  		break
  2046  	}
  2047  	// match: (And8 x (And8 x y))
  2048  	// result: (And8 x y)
  2049  	for {
  2050  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2051  			x := v_0
  2052  			if v_1.Op != OpAnd8 {
  2053  				continue
  2054  			}
  2055  			_ = v_1.Args[1]
  2056  			v_1_0 := v_1.Args[0]
  2057  			v_1_1 := v_1.Args[1]
  2058  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  2059  				if x != v_1_0 {
  2060  					continue
  2061  				}
  2062  				y := v_1_1
  2063  				v.reset(OpAnd8)
  2064  				v.AddArg2(x, y)
  2065  				return true
  2066  			}
  2067  		}
  2068  		break
  2069  	}
  2070  	// match: (And8 (And8 i:(Const8 <t>) z) x)
  2071  	// cond: (z.Op != OpConst8 && x.Op != OpConst8)
  2072  	// result: (And8 i (And8 <t> z x))
  2073  	for {
  2074  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2075  			if v_0.Op != OpAnd8 {
  2076  				continue
  2077  			}
  2078  			_ = v_0.Args[1]
  2079  			v_0_0 := v_0.Args[0]
  2080  			v_0_1 := v_0.Args[1]
  2081  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  2082  				i := v_0_0
  2083  				if i.Op != OpConst8 {
  2084  					continue
  2085  				}
  2086  				t := i.Type
  2087  				z := v_0_1
  2088  				x := v_1
  2089  				if !(z.Op != OpConst8 && x.Op != OpConst8) {
  2090  					continue
  2091  				}
  2092  				v.reset(OpAnd8)
  2093  				v0 := b.NewValue0(v.Pos, OpAnd8, t)
  2094  				v0.AddArg2(z, x)
  2095  				v.AddArg2(i, v0)
  2096  				return true
  2097  			}
  2098  		}
  2099  		break
  2100  	}
  2101  	// match: (And8 (Const8 <t> [c]) (And8 (Const8 <t> [d]) x))
  2102  	// result: (And8 (Const8 <t> [c&d]) x)
  2103  	for {
  2104  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2105  			if v_0.Op != OpConst8 {
  2106  				continue
  2107  			}
  2108  			t := v_0.Type
  2109  			c := auxIntToInt8(v_0.AuxInt)
  2110  			if v_1.Op != OpAnd8 {
  2111  				continue
  2112  			}
  2113  			_ = v_1.Args[1]
  2114  			v_1_0 := v_1.Args[0]
  2115  			v_1_1 := v_1.Args[1]
  2116  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  2117  				if v_1_0.Op != OpConst8 || v_1_0.Type != t {
  2118  					continue
  2119  				}
  2120  				d := auxIntToInt8(v_1_0.AuxInt)
  2121  				x := v_1_1
  2122  				v.reset(OpAnd8)
  2123  				v0 := b.NewValue0(v.Pos, OpConst8, t)
  2124  				v0.AuxInt = int8ToAuxInt(c & d)
  2125  				v.AddArg2(v0, x)
  2126  				return true
  2127  			}
  2128  		}
  2129  		break
  2130  	}
  2131  	return false
  2132  }
  2133  func rewriteValuegeneric_OpAndB(v *Value) bool {
  2134  	v_1 := v.Args[1]
  2135  	v_0 := v.Args[0]
  2136  	b := v.Block
  2137  	// match: (AndB (Leq64 (Const64 [c]) x) (Less64 x (Const64 [d])))
  2138  	// cond: d >= c
  2139  	// result: (Less64U (Sub64 <x.Type> x (Const64 <x.Type> [c])) (Const64 <x.Type> [d-c]))
  2140  	for {
  2141  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2142  			if v_0.Op != OpLeq64 {
  2143  				continue
  2144  			}
  2145  			x := v_0.Args[1]
  2146  			v_0_0 := v_0.Args[0]
  2147  			if v_0_0.Op != OpConst64 {
  2148  				continue
  2149  			}
  2150  			c := auxIntToInt64(v_0_0.AuxInt)
  2151  			if v_1.Op != OpLess64 {
  2152  				continue
  2153  			}
  2154  			_ = v_1.Args[1]
  2155  			if x != v_1.Args[0] {
  2156  				continue
  2157  			}
  2158  			v_1_1 := v_1.Args[1]
  2159  			if v_1_1.Op != OpConst64 {
  2160  				continue
  2161  			}
  2162  			d := auxIntToInt64(v_1_1.AuxInt)
  2163  			if !(d >= c) {
  2164  				continue
  2165  			}
  2166  			v.reset(OpLess64U)
  2167  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  2168  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2169  			v1.AuxInt = int64ToAuxInt(c)
  2170  			v0.AddArg2(x, v1)
  2171  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2172  			v2.AuxInt = int64ToAuxInt(d - c)
  2173  			v.AddArg2(v0, v2)
  2174  			return true
  2175  		}
  2176  		break
  2177  	}
  2178  	// match: (AndB (Leq64 (Const64 [c]) x) (Leq64 x (Const64 [d])))
  2179  	// cond: d >= c
  2180  	// result: (Leq64U (Sub64 <x.Type> x (Const64 <x.Type> [c])) (Const64 <x.Type> [d-c]))
  2181  	for {
  2182  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2183  			if v_0.Op != OpLeq64 {
  2184  				continue
  2185  			}
  2186  			x := v_0.Args[1]
  2187  			v_0_0 := v_0.Args[0]
  2188  			if v_0_0.Op != OpConst64 {
  2189  				continue
  2190  			}
  2191  			c := auxIntToInt64(v_0_0.AuxInt)
  2192  			if v_1.Op != OpLeq64 {
  2193  				continue
  2194  			}
  2195  			_ = v_1.Args[1]
  2196  			if x != v_1.Args[0] {
  2197  				continue
  2198  			}
  2199  			v_1_1 := v_1.Args[1]
  2200  			if v_1_1.Op != OpConst64 {
  2201  				continue
  2202  			}
  2203  			d := auxIntToInt64(v_1_1.AuxInt)
  2204  			if !(d >= c) {
  2205  				continue
  2206  			}
  2207  			v.reset(OpLeq64U)
  2208  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  2209  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2210  			v1.AuxInt = int64ToAuxInt(c)
  2211  			v0.AddArg2(x, v1)
  2212  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2213  			v2.AuxInt = int64ToAuxInt(d - c)
  2214  			v.AddArg2(v0, v2)
  2215  			return true
  2216  		}
  2217  		break
  2218  	}
  2219  	// match: (AndB (Leq32 (Const32 [c]) x) (Less32 x (Const32 [d])))
  2220  	// cond: d >= c
  2221  	// result: (Less32U (Sub32 <x.Type> x (Const32 <x.Type> [c])) (Const32 <x.Type> [d-c]))
  2222  	for {
  2223  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2224  			if v_0.Op != OpLeq32 {
  2225  				continue
  2226  			}
  2227  			x := v_0.Args[1]
  2228  			v_0_0 := v_0.Args[0]
  2229  			if v_0_0.Op != OpConst32 {
  2230  				continue
  2231  			}
  2232  			c := auxIntToInt32(v_0_0.AuxInt)
  2233  			if v_1.Op != OpLess32 {
  2234  				continue
  2235  			}
  2236  			_ = v_1.Args[1]
  2237  			if x != v_1.Args[0] {
  2238  				continue
  2239  			}
  2240  			v_1_1 := v_1.Args[1]
  2241  			if v_1_1.Op != OpConst32 {
  2242  				continue
  2243  			}
  2244  			d := auxIntToInt32(v_1_1.AuxInt)
  2245  			if !(d >= c) {
  2246  				continue
  2247  			}
  2248  			v.reset(OpLess32U)
  2249  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  2250  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2251  			v1.AuxInt = int32ToAuxInt(c)
  2252  			v0.AddArg2(x, v1)
  2253  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2254  			v2.AuxInt = int32ToAuxInt(d - c)
  2255  			v.AddArg2(v0, v2)
  2256  			return true
  2257  		}
  2258  		break
  2259  	}
  2260  	// match: (AndB (Leq32 (Const32 [c]) x) (Leq32 x (Const32 [d])))
  2261  	// cond: d >= c
  2262  	// result: (Leq32U (Sub32 <x.Type> x (Const32 <x.Type> [c])) (Const32 <x.Type> [d-c]))
  2263  	for {
  2264  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2265  			if v_0.Op != OpLeq32 {
  2266  				continue
  2267  			}
  2268  			x := v_0.Args[1]
  2269  			v_0_0 := v_0.Args[0]
  2270  			if v_0_0.Op != OpConst32 {
  2271  				continue
  2272  			}
  2273  			c := auxIntToInt32(v_0_0.AuxInt)
  2274  			if v_1.Op != OpLeq32 {
  2275  				continue
  2276  			}
  2277  			_ = v_1.Args[1]
  2278  			if x != v_1.Args[0] {
  2279  				continue
  2280  			}
  2281  			v_1_1 := v_1.Args[1]
  2282  			if v_1_1.Op != OpConst32 {
  2283  				continue
  2284  			}
  2285  			d := auxIntToInt32(v_1_1.AuxInt)
  2286  			if !(d >= c) {
  2287  				continue
  2288  			}
  2289  			v.reset(OpLeq32U)
  2290  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  2291  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2292  			v1.AuxInt = int32ToAuxInt(c)
  2293  			v0.AddArg2(x, v1)
  2294  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2295  			v2.AuxInt = int32ToAuxInt(d - c)
  2296  			v.AddArg2(v0, v2)
  2297  			return true
  2298  		}
  2299  		break
  2300  	}
  2301  	// match: (AndB (Leq16 (Const16 [c]) x) (Less16 x (Const16 [d])))
  2302  	// cond: d >= c
  2303  	// result: (Less16U (Sub16 <x.Type> x (Const16 <x.Type> [c])) (Const16 <x.Type> [d-c]))
  2304  	for {
  2305  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2306  			if v_0.Op != OpLeq16 {
  2307  				continue
  2308  			}
  2309  			x := v_0.Args[1]
  2310  			v_0_0 := v_0.Args[0]
  2311  			if v_0_0.Op != OpConst16 {
  2312  				continue
  2313  			}
  2314  			c := auxIntToInt16(v_0_0.AuxInt)
  2315  			if v_1.Op != OpLess16 {
  2316  				continue
  2317  			}
  2318  			_ = v_1.Args[1]
  2319  			if x != v_1.Args[0] {
  2320  				continue
  2321  			}
  2322  			v_1_1 := v_1.Args[1]
  2323  			if v_1_1.Op != OpConst16 {
  2324  				continue
  2325  			}
  2326  			d := auxIntToInt16(v_1_1.AuxInt)
  2327  			if !(d >= c) {
  2328  				continue
  2329  			}
  2330  			v.reset(OpLess16U)
  2331  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  2332  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2333  			v1.AuxInt = int16ToAuxInt(c)
  2334  			v0.AddArg2(x, v1)
  2335  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2336  			v2.AuxInt = int16ToAuxInt(d - c)
  2337  			v.AddArg2(v0, v2)
  2338  			return true
  2339  		}
  2340  		break
  2341  	}
  2342  	// match: (AndB (Leq16 (Const16 [c]) x) (Leq16 x (Const16 [d])))
  2343  	// cond: d >= c
  2344  	// result: (Leq16U (Sub16 <x.Type> x (Const16 <x.Type> [c])) (Const16 <x.Type> [d-c]))
  2345  	for {
  2346  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2347  			if v_0.Op != OpLeq16 {
  2348  				continue
  2349  			}
  2350  			x := v_0.Args[1]
  2351  			v_0_0 := v_0.Args[0]
  2352  			if v_0_0.Op != OpConst16 {
  2353  				continue
  2354  			}
  2355  			c := auxIntToInt16(v_0_0.AuxInt)
  2356  			if v_1.Op != OpLeq16 {
  2357  				continue
  2358  			}
  2359  			_ = v_1.Args[1]
  2360  			if x != v_1.Args[0] {
  2361  				continue
  2362  			}
  2363  			v_1_1 := v_1.Args[1]
  2364  			if v_1_1.Op != OpConst16 {
  2365  				continue
  2366  			}
  2367  			d := auxIntToInt16(v_1_1.AuxInt)
  2368  			if !(d >= c) {
  2369  				continue
  2370  			}
  2371  			v.reset(OpLeq16U)
  2372  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  2373  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2374  			v1.AuxInt = int16ToAuxInt(c)
  2375  			v0.AddArg2(x, v1)
  2376  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2377  			v2.AuxInt = int16ToAuxInt(d - c)
  2378  			v.AddArg2(v0, v2)
  2379  			return true
  2380  		}
  2381  		break
  2382  	}
  2383  	// match: (AndB (Leq8 (Const8 [c]) x) (Less8 x (Const8 [d])))
  2384  	// cond: d >= c
  2385  	// result: (Less8U (Sub8 <x.Type> x (Const8 <x.Type> [c])) (Const8 <x.Type> [d-c]))
  2386  	for {
  2387  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2388  			if v_0.Op != OpLeq8 {
  2389  				continue
  2390  			}
  2391  			x := v_0.Args[1]
  2392  			v_0_0 := v_0.Args[0]
  2393  			if v_0_0.Op != OpConst8 {
  2394  				continue
  2395  			}
  2396  			c := auxIntToInt8(v_0_0.AuxInt)
  2397  			if v_1.Op != OpLess8 {
  2398  				continue
  2399  			}
  2400  			_ = v_1.Args[1]
  2401  			if x != v_1.Args[0] {
  2402  				continue
  2403  			}
  2404  			v_1_1 := v_1.Args[1]
  2405  			if v_1_1.Op != OpConst8 {
  2406  				continue
  2407  			}
  2408  			d := auxIntToInt8(v_1_1.AuxInt)
  2409  			if !(d >= c) {
  2410  				continue
  2411  			}
  2412  			v.reset(OpLess8U)
  2413  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  2414  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2415  			v1.AuxInt = int8ToAuxInt(c)
  2416  			v0.AddArg2(x, v1)
  2417  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2418  			v2.AuxInt = int8ToAuxInt(d - c)
  2419  			v.AddArg2(v0, v2)
  2420  			return true
  2421  		}
  2422  		break
  2423  	}
  2424  	// match: (AndB (Leq8 (Const8 [c]) x) (Leq8 x (Const8 [d])))
  2425  	// cond: d >= c
  2426  	// result: (Leq8U (Sub8 <x.Type> x (Const8 <x.Type> [c])) (Const8 <x.Type> [d-c]))
  2427  	for {
  2428  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2429  			if v_0.Op != OpLeq8 {
  2430  				continue
  2431  			}
  2432  			x := v_0.Args[1]
  2433  			v_0_0 := v_0.Args[0]
  2434  			if v_0_0.Op != OpConst8 {
  2435  				continue
  2436  			}
  2437  			c := auxIntToInt8(v_0_0.AuxInt)
  2438  			if v_1.Op != OpLeq8 {
  2439  				continue
  2440  			}
  2441  			_ = v_1.Args[1]
  2442  			if x != v_1.Args[0] {
  2443  				continue
  2444  			}
  2445  			v_1_1 := v_1.Args[1]
  2446  			if v_1_1.Op != OpConst8 {
  2447  				continue
  2448  			}
  2449  			d := auxIntToInt8(v_1_1.AuxInt)
  2450  			if !(d >= c) {
  2451  				continue
  2452  			}
  2453  			v.reset(OpLeq8U)
  2454  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  2455  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2456  			v1.AuxInt = int8ToAuxInt(c)
  2457  			v0.AddArg2(x, v1)
  2458  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2459  			v2.AuxInt = int8ToAuxInt(d - c)
  2460  			v.AddArg2(v0, v2)
  2461  			return true
  2462  		}
  2463  		break
  2464  	}
  2465  	// match: (AndB (Less64 (Const64 [c]) x) (Less64 x (Const64 [d])))
  2466  	// cond: d >= c+1 && c+1 > c
  2467  	// result: (Less64U (Sub64 <x.Type> x (Const64 <x.Type> [c+1])) (Const64 <x.Type> [d-c-1]))
  2468  	for {
  2469  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2470  			if v_0.Op != OpLess64 {
  2471  				continue
  2472  			}
  2473  			x := v_0.Args[1]
  2474  			v_0_0 := v_0.Args[0]
  2475  			if v_0_0.Op != OpConst64 {
  2476  				continue
  2477  			}
  2478  			c := auxIntToInt64(v_0_0.AuxInt)
  2479  			if v_1.Op != OpLess64 {
  2480  				continue
  2481  			}
  2482  			_ = v_1.Args[1]
  2483  			if x != v_1.Args[0] {
  2484  				continue
  2485  			}
  2486  			v_1_1 := v_1.Args[1]
  2487  			if v_1_1.Op != OpConst64 {
  2488  				continue
  2489  			}
  2490  			d := auxIntToInt64(v_1_1.AuxInt)
  2491  			if !(d >= c+1 && c+1 > c) {
  2492  				continue
  2493  			}
  2494  			v.reset(OpLess64U)
  2495  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  2496  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2497  			v1.AuxInt = int64ToAuxInt(c + 1)
  2498  			v0.AddArg2(x, v1)
  2499  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2500  			v2.AuxInt = int64ToAuxInt(d - c - 1)
  2501  			v.AddArg2(v0, v2)
  2502  			return true
  2503  		}
  2504  		break
  2505  	}
  2506  	// match: (AndB (Less64 (Const64 [c]) x) (Leq64 x (Const64 [d])))
  2507  	// cond: d >= c+1 && c+1 > c
  2508  	// result: (Leq64U (Sub64 <x.Type> x (Const64 <x.Type> [c+1])) (Const64 <x.Type> [d-c-1]))
  2509  	for {
  2510  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2511  			if v_0.Op != OpLess64 {
  2512  				continue
  2513  			}
  2514  			x := v_0.Args[1]
  2515  			v_0_0 := v_0.Args[0]
  2516  			if v_0_0.Op != OpConst64 {
  2517  				continue
  2518  			}
  2519  			c := auxIntToInt64(v_0_0.AuxInt)
  2520  			if v_1.Op != OpLeq64 {
  2521  				continue
  2522  			}
  2523  			_ = v_1.Args[1]
  2524  			if x != v_1.Args[0] {
  2525  				continue
  2526  			}
  2527  			v_1_1 := v_1.Args[1]
  2528  			if v_1_1.Op != OpConst64 {
  2529  				continue
  2530  			}
  2531  			d := auxIntToInt64(v_1_1.AuxInt)
  2532  			if !(d >= c+1 && c+1 > c) {
  2533  				continue
  2534  			}
  2535  			v.reset(OpLeq64U)
  2536  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  2537  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2538  			v1.AuxInt = int64ToAuxInt(c + 1)
  2539  			v0.AddArg2(x, v1)
  2540  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2541  			v2.AuxInt = int64ToAuxInt(d - c - 1)
  2542  			v.AddArg2(v0, v2)
  2543  			return true
  2544  		}
  2545  		break
  2546  	}
  2547  	// match: (AndB (Less32 (Const32 [c]) x) (Less32 x (Const32 [d])))
  2548  	// cond: d >= c+1 && c+1 > c
  2549  	// result: (Less32U (Sub32 <x.Type> x (Const32 <x.Type> [c+1])) (Const32 <x.Type> [d-c-1]))
  2550  	for {
  2551  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2552  			if v_0.Op != OpLess32 {
  2553  				continue
  2554  			}
  2555  			x := v_0.Args[1]
  2556  			v_0_0 := v_0.Args[0]
  2557  			if v_0_0.Op != OpConst32 {
  2558  				continue
  2559  			}
  2560  			c := auxIntToInt32(v_0_0.AuxInt)
  2561  			if v_1.Op != OpLess32 {
  2562  				continue
  2563  			}
  2564  			_ = v_1.Args[1]
  2565  			if x != v_1.Args[0] {
  2566  				continue
  2567  			}
  2568  			v_1_1 := v_1.Args[1]
  2569  			if v_1_1.Op != OpConst32 {
  2570  				continue
  2571  			}
  2572  			d := auxIntToInt32(v_1_1.AuxInt)
  2573  			if !(d >= c+1 && c+1 > c) {
  2574  				continue
  2575  			}
  2576  			v.reset(OpLess32U)
  2577  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  2578  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2579  			v1.AuxInt = int32ToAuxInt(c + 1)
  2580  			v0.AddArg2(x, v1)
  2581  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2582  			v2.AuxInt = int32ToAuxInt(d - c - 1)
  2583  			v.AddArg2(v0, v2)
  2584  			return true
  2585  		}
  2586  		break
  2587  	}
  2588  	// match: (AndB (Less32 (Const32 [c]) x) (Leq32 x (Const32 [d])))
  2589  	// cond: d >= c+1 && c+1 > c
  2590  	// result: (Leq32U (Sub32 <x.Type> x (Const32 <x.Type> [c+1])) (Const32 <x.Type> [d-c-1]))
  2591  	for {
  2592  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2593  			if v_0.Op != OpLess32 {
  2594  				continue
  2595  			}
  2596  			x := v_0.Args[1]
  2597  			v_0_0 := v_0.Args[0]
  2598  			if v_0_0.Op != OpConst32 {
  2599  				continue
  2600  			}
  2601  			c := auxIntToInt32(v_0_0.AuxInt)
  2602  			if v_1.Op != OpLeq32 {
  2603  				continue
  2604  			}
  2605  			_ = v_1.Args[1]
  2606  			if x != v_1.Args[0] {
  2607  				continue
  2608  			}
  2609  			v_1_1 := v_1.Args[1]
  2610  			if v_1_1.Op != OpConst32 {
  2611  				continue
  2612  			}
  2613  			d := auxIntToInt32(v_1_1.AuxInt)
  2614  			if !(d >= c+1 && c+1 > c) {
  2615  				continue
  2616  			}
  2617  			v.reset(OpLeq32U)
  2618  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  2619  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2620  			v1.AuxInt = int32ToAuxInt(c + 1)
  2621  			v0.AddArg2(x, v1)
  2622  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2623  			v2.AuxInt = int32ToAuxInt(d - c - 1)
  2624  			v.AddArg2(v0, v2)
  2625  			return true
  2626  		}
  2627  		break
  2628  	}
  2629  	// match: (AndB (Less16 (Const16 [c]) x) (Less16 x (Const16 [d])))
  2630  	// cond: d >= c+1 && c+1 > c
  2631  	// result: (Less16U (Sub16 <x.Type> x (Const16 <x.Type> [c+1])) (Const16 <x.Type> [d-c-1]))
  2632  	for {
  2633  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2634  			if v_0.Op != OpLess16 {
  2635  				continue
  2636  			}
  2637  			x := v_0.Args[1]
  2638  			v_0_0 := v_0.Args[0]
  2639  			if v_0_0.Op != OpConst16 {
  2640  				continue
  2641  			}
  2642  			c := auxIntToInt16(v_0_0.AuxInt)
  2643  			if v_1.Op != OpLess16 {
  2644  				continue
  2645  			}
  2646  			_ = v_1.Args[1]
  2647  			if x != v_1.Args[0] {
  2648  				continue
  2649  			}
  2650  			v_1_1 := v_1.Args[1]
  2651  			if v_1_1.Op != OpConst16 {
  2652  				continue
  2653  			}
  2654  			d := auxIntToInt16(v_1_1.AuxInt)
  2655  			if !(d >= c+1 && c+1 > c) {
  2656  				continue
  2657  			}
  2658  			v.reset(OpLess16U)
  2659  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  2660  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2661  			v1.AuxInt = int16ToAuxInt(c + 1)
  2662  			v0.AddArg2(x, v1)
  2663  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2664  			v2.AuxInt = int16ToAuxInt(d - c - 1)
  2665  			v.AddArg2(v0, v2)
  2666  			return true
  2667  		}
  2668  		break
  2669  	}
  2670  	// match: (AndB (Less16 (Const16 [c]) x) (Leq16 x (Const16 [d])))
  2671  	// cond: d >= c+1 && c+1 > c
  2672  	// result: (Leq16U (Sub16 <x.Type> x (Const16 <x.Type> [c+1])) (Const16 <x.Type> [d-c-1]))
  2673  	for {
  2674  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2675  			if v_0.Op != OpLess16 {
  2676  				continue
  2677  			}
  2678  			x := v_0.Args[1]
  2679  			v_0_0 := v_0.Args[0]
  2680  			if v_0_0.Op != OpConst16 {
  2681  				continue
  2682  			}
  2683  			c := auxIntToInt16(v_0_0.AuxInt)
  2684  			if v_1.Op != OpLeq16 {
  2685  				continue
  2686  			}
  2687  			_ = v_1.Args[1]
  2688  			if x != v_1.Args[0] {
  2689  				continue
  2690  			}
  2691  			v_1_1 := v_1.Args[1]
  2692  			if v_1_1.Op != OpConst16 {
  2693  				continue
  2694  			}
  2695  			d := auxIntToInt16(v_1_1.AuxInt)
  2696  			if !(d >= c+1 && c+1 > c) {
  2697  				continue
  2698  			}
  2699  			v.reset(OpLeq16U)
  2700  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  2701  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2702  			v1.AuxInt = int16ToAuxInt(c + 1)
  2703  			v0.AddArg2(x, v1)
  2704  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2705  			v2.AuxInt = int16ToAuxInt(d - c - 1)
  2706  			v.AddArg2(v0, v2)
  2707  			return true
  2708  		}
  2709  		break
  2710  	}
  2711  	// match: (AndB (Less8 (Const8 [c]) x) (Less8 x (Const8 [d])))
  2712  	// cond: d >= c+1 && c+1 > c
  2713  	// result: (Less8U (Sub8 <x.Type> x (Const8 <x.Type> [c+1])) (Const8 <x.Type> [d-c-1]))
  2714  	for {
  2715  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2716  			if v_0.Op != OpLess8 {
  2717  				continue
  2718  			}
  2719  			x := v_0.Args[1]
  2720  			v_0_0 := v_0.Args[0]
  2721  			if v_0_0.Op != OpConst8 {
  2722  				continue
  2723  			}
  2724  			c := auxIntToInt8(v_0_0.AuxInt)
  2725  			if v_1.Op != OpLess8 {
  2726  				continue
  2727  			}
  2728  			_ = v_1.Args[1]
  2729  			if x != v_1.Args[0] {
  2730  				continue
  2731  			}
  2732  			v_1_1 := v_1.Args[1]
  2733  			if v_1_1.Op != OpConst8 {
  2734  				continue
  2735  			}
  2736  			d := auxIntToInt8(v_1_1.AuxInt)
  2737  			if !(d >= c+1 && c+1 > c) {
  2738  				continue
  2739  			}
  2740  			v.reset(OpLess8U)
  2741  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  2742  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2743  			v1.AuxInt = int8ToAuxInt(c + 1)
  2744  			v0.AddArg2(x, v1)
  2745  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2746  			v2.AuxInt = int8ToAuxInt(d - c - 1)
  2747  			v.AddArg2(v0, v2)
  2748  			return true
  2749  		}
  2750  		break
  2751  	}
  2752  	// match: (AndB (Less8 (Const8 [c]) x) (Leq8 x (Const8 [d])))
  2753  	// cond: d >= c+1 && c+1 > c
  2754  	// result: (Leq8U (Sub8 <x.Type> x (Const8 <x.Type> [c+1])) (Const8 <x.Type> [d-c-1]))
  2755  	for {
  2756  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2757  			if v_0.Op != OpLess8 {
  2758  				continue
  2759  			}
  2760  			x := v_0.Args[1]
  2761  			v_0_0 := v_0.Args[0]
  2762  			if v_0_0.Op != OpConst8 {
  2763  				continue
  2764  			}
  2765  			c := auxIntToInt8(v_0_0.AuxInt)
  2766  			if v_1.Op != OpLeq8 {
  2767  				continue
  2768  			}
  2769  			_ = v_1.Args[1]
  2770  			if x != v_1.Args[0] {
  2771  				continue
  2772  			}
  2773  			v_1_1 := v_1.Args[1]
  2774  			if v_1_1.Op != OpConst8 {
  2775  				continue
  2776  			}
  2777  			d := auxIntToInt8(v_1_1.AuxInt)
  2778  			if !(d >= c+1 && c+1 > c) {
  2779  				continue
  2780  			}
  2781  			v.reset(OpLeq8U)
  2782  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  2783  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2784  			v1.AuxInt = int8ToAuxInt(c + 1)
  2785  			v0.AddArg2(x, v1)
  2786  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  2787  			v2.AuxInt = int8ToAuxInt(d - c - 1)
  2788  			v.AddArg2(v0, v2)
  2789  			return true
  2790  		}
  2791  		break
  2792  	}
  2793  	// match: (AndB (Leq64U (Const64 [c]) x) (Less64U x (Const64 [d])))
  2794  	// cond: uint64(d) >= uint64(c)
  2795  	// result: (Less64U (Sub64 <x.Type> x (Const64 <x.Type> [c])) (Const64 <x.Type> [d-c]))
  2796  	for {
  2797  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2798  			if v_0.Op != OpLeq64U {
  2799  				continue
  2800  			}
  2801  			x := v_0.Args[1]
  2802  			v_0_0 := v_0.Args[0]
  2803  			if v_0_0.Op != OpConst64 {
  2804  				continue
  2805  			}
  2806  			c := auxIntToInt64(v_0_0.AuxInt)
  2807  			if v_1.Op != OpLess64U {
  2808  				continue
  2809  			}
  2810  			_ = v_1.Args[1]
  2811  			if x != v_1.Args[0] {
  2812  				continue
  2813  			}
  2814  			v_1_1 := v_1.Args[1]
  2815  			if v_1_1.Op != OpConst64 {
  2816  				continue
  2817  			}
  2818  			d := auxIntToInt64(v_1_1.AuxInt)
  2819  			if !(uint64(d) >= uint64(c)) {
  2820  				continue
  2821  			}
  2822  			v.reset(OpLess64U)
  2823  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  2824  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2825  			v1.AuxInt = int64ToAuxInt(c)
  2826  			v0.AddArg2(x, v1)
  2827  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2828  			v2.AuxInt = int64ToAuxInt(d - c)
  2829  			v.AddArg2(v0, v2)
  2830  			return true
  2831  		}
  2832  		break
  2833  	}
  2834  	// match: (AndB (Leq64U (Const64 [c]) x) (Leq64U x (Const64 [d])))
  2835  	// cond: uint64(d) >= uint64(c)
  2836  	// result: (Leq64U (Sub64 <x.Type> x (Const64 <x.Type> [c])) (Const64 <x.Type> [d-c]))
  2837  	for {
  2838  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2839  			if v_0.Op != OpLeq64U {
  2840  				continue
  2841  			}
  2842  			x := v_0.Args[1]
  2843  			v_0_0 := v_0.Args[0]
  2844  			if v_0_0.Op != OpConst64 {
  2845  				continue
  2846  			}
  2847  			c := auxIntToInt64(v_0_0.AuxInt)
  2848  			if v_1.Op != OpLeq64U {
  2849  				continue
  2850  			}
  2851  			_ = v_1.Args[1]
  2852  			if x != v_1.Args[0] {
  2853  				continue
  2854  			}
  2855  			v_1_1 := v_1.Args[1]
  2856  			if v_1_1.Op != OpConst64 {
  2857  				continue
  2858  			}
  2859  			d := auxIntToInt64(v_1_1.AuxInt)
  2860  			if !(uint64(d) >= uint64(c)) {
  2861  				continue
  2862  			}
  2863  			v.reset(OpLeq64U)
  2864  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  2865  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2866  			v1.AuxInt = int64ToAuxInt(c)
  2867  			v0.AddArg2(x, v1)
  2868  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  2869  			v2.AuxInt = int64ToAuxInt(d - c)
  2870  			v.AddArg2(v0, v2)
  2871  			return true
  2872  		}
  2873  		break
  2874  	}
  2875  	// match: (AndB (Leq32U (Const32 [c]) x) (Less32U x (Const32 [d])))
  2876  	// cond: uint32(d) >= uint32(c)
  2877  	// result: (Less32U (Sub32 <x.Type> x (Const32 <x.Type> [c])) (Const32 <x.Type> [d-c]))
  2878  	for {
  2879  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2880  			if v_0.Op != OpLeq32U {
  2881  				continue
  2882  			}
  2883  			x := v_0.Args[1]
  2884  			v_0_0 := v_0.Args[0]
  2885  			if v_0_0.Op != OpConst32 {
  2886  				continue
  2887  			}
  2888  			c := auxIntToInt32(v_0_0.AuxInt)
  2889  			if v_1.Op != OpLess32U {
  2890  				continue
  2891  			}
  2892  			_ = v_1.Args[1]
  2893  			if x != v_1.Args[0] {
  2894  				continue
  2895  			}
  2896  			v_1_1 := v_1.Args[1]
  2897  			if v_1_1.Op != OpConst32 {
  2898  				continue
  2899  			}
  2900  			d := auxIntToInt32(v_1_1.AuxInt)
  2901  			if !(uint32(d) >= uint32(c)) {
  2902  				continue
  2903  			}
  2904  			v.reset(OpLess32U)
  2905  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  2906  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2907  			v1.AuxInt = int32ToAuxInt(c)
  2908  			v0.AddArg2(x, v1)
  2909  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2910  			v2.AuxInt = int32ToAuxInt(d - c)
  2911  			v.AddArg2(v0, v2)
  2912  			return true
  2913  		}
  2914  		break
  2915  	}
  2916  	// match: (AndB (Leq32U (Const32 [c]) x) (Leq32U x (Const32 [d])))
  2917  	// cond: uint32(d) >= uint32(c)
  2918  	// result: (Leq32U (Sub32 <x.Type> x (Const32 <x.Type> [c])) (Const32 <x.Type> [d-c]))
  2919  	for {
  2920  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2921  			if v_0.Op != OpLeq32U {
  2922  				continue
  2923  			}
  2924  			x := v_0.Args[1]
  2925  			v_0_0 := v_0.Args[0]
  2926  			if v_0_0.Op != OpConst32 {
  2927  				continue
  2928  			}
  2929  			c := auxIntToInt32(v_0_0.AuxInt)
  2930  			if v_1.Op != OpLeq32U {
  2931  				continue
  2932  			}
  2933  			_ = v_1.Args[1]
  2934  			if x != v_1.Args[0] {
  2935  				continue
  2936  			}
  2937  			v_1_1 := v_1.Args[1]
  2938  			if v_1_1.Op != OpConst32 {
  2939  				continue
  2940  			}
  2941  			d := auxIntToInt32(v_1_1.AuxInt)
  2942  			if !(uint32(d) >= uint32(c)) {
  2943  				continue
  2944  			}
  2945  			v.reset(OpLeq32U)
  2946  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  2947  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2948  			v1.AuxInt = int32ToAuxInt(c)
  2949  			v0.AddArg2(x, v1)
  2950  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  2951  			v2.AuxInt = int32ToAuxInt(d - c)
  2952  			v.AddArg2(v0, v2)
  2953  			return true
  2954  		}
  2955  		break
  2956  	}
  2957  	// match: (AndB (Leq16U (Const16 [c]) x) (Less16U x (Const16 [d])))
  2958  	// cond: uint16(d) >= uint16(c)
  2959  	// result: (Less16U (Sub16 <x.Type> x (Const16 <x.Type> [c])) (Const16 <x.Type> [d-c]))
  2960  	for {
  2961  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2962  			if v_0.Op != OpLeq16U {
  2963  				continue
  2964  			}
  2965  			x := v_0.Args[1]
  2966  			v_0_0 := v_0.Args[0]
  2967  			if v_0_0.Op != OpConst16 {
  2968  				continue
  2969  			}
  2970  			c := auxIntToInt16(v_0_0.AuxInt)
  2971  			if v_1.Op != OpLess16U {
  2972  				continue
  2973  			}
  2974  			_ = v_1.Args[1]
  2975  			if x != v_1.Args[0] {
  2976  				continue
  2977  			}
  2978  			v_1_1 := v_1.Args[1]
  2979  			if v_1_1.Op != OpConst16 {
  2980  				continue
  2981  			}
  2982  			d := auxIntToInt16(v_1_1.AuxInt)
  2983  			if !(uint16(d) >= uint16(c)) {
  2984  				continue
  2985  			}
  2986  			v.reset(OpLess16U)
  2987  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  2988  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2989  			v1.AuxInt = int16ToAuxInt(c)
  2990  			v0.AddArg2(x, v1)
  2991  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  2992  			v2.AuxInt = int16ToAuxInt(d - c)
  2993  			v.AddArg2(v0, v2)
  2994  			return true
  2995  		}
  2996  		break
  2997  	}
  2998  	// match: (AndB (Leq16U (Const16 [c]) x) (Leq16U x (Const16 [d])))
  2999  	// cond: uint16(d) >= uint16(c)
  3000  	// result: (Leq16U (Sub16 <x.Type> x (Const16 <x.Type> [c])) (Const16 <x.Type> [d-c]))
  3001  	for {
  3002  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3003  			if v_0.Op != OpLeq16U {
  3004  				continue
  3005  			}
  3006  			x := v_0.Args[1]
  3007  			v_0_0 := v_0.Args[0]
  3008  			if v_0_0.Op != OpConst16 {
  3009  				continue
  3010  			}
  3011  			c := auxIntToInt16(v_0_0.AuxInt)
  3012  			if v_1.Op != OpLeq16U {
  3013  				continue
  3014  			}
  3015  			_ = v_1.Args[1]
  3016  			if x != v_1.Args[0] {
  3017  				continue
  3018  			}
  3019  			v_1_1 := v_1.Args[1]
  3020  			if v_1_1.Op != OpConst16 {
  3021  				continue
  3022  			}
  3023  			d := auxIntToInt16(v_1_1.AuxInt)
  3024  			if !(uint16(d) >= uint16(c)) {
  3025  				continue
  3026  			}
  3027  			v.reset(OpLeq16U)
  3028  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  3029  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  3030  			v1.AuxInt = int16ToAuxInt(c)
  3031  			v0.AddArg2(x, v1)
  3032  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  3033  			v2.AuxInt = int16ToAuxInt(d - c)
  3034  			v.AddArg2(v0, v2)
  3035  			return true
  3036  		}
  3037  		break
  3038  	}
  3039  	// match: (AndB (Leq8U (Const8 [c]) x) (Less8U x (Const8 [d])))
  3040  	// cond: uint8(d) >= uint8(c)
  3041  	// result: (Less8U (Sub8 <x.Type> x (Const8 <x.Type> [c])) (Const8 <x.Type> [d-c]))
  3042  	for {
  3043  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3044  			if v_0.Op != OpLeq8U {
  3045  				continue
  3046  			}
  3047  			x := v_0.Args[1]
  3048  			v_0_0 := v_0.Args[0]
  3049  			if v_0_0.Op != OpConst8 {
  3050  				continue
  3051  			}
  3052  			c := auxIntToInt8(v_0_0.AuxInt)
  3053  			if v_1.Op != OpLess8U {
  3054  				continue
  3055  			}
  3056  			_ = v_1.Args[1]
  3057  			if x != v_1.Args[0] {
  3058  				continue
  3059  			}
  3060  			v_1_1 := v_1.Args[1]
  3061  			if v_1_1.Op != OpConst8 {
  3062  				continue
  3063  			}
  3064  			d := auxIntToInt8(v_1_1.AuxInt)
  3065  			if !(uint8(d) >= uint8(c)) {
  3066  				continue
  3067  			}
  3068  			v.reset(OpLess8U)
  3069  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  3070  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3071  			v1.AuxInt = int8ToAuxInt(c)
  3072  			v0.AddArg2(x, v1)
  3073  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3074  			v2.AuxInt = int8ToAuxInt(d - c)
  3075  			v.AddArg2(v0, v2)
  3076  			return true
  3077  		}
  3078  		break
  3079  	}
  3080  	// match: (AndB (Leq8U (Const8 [c]) x) (Leq8U x (Const8 [d])))
  3081  	// cond: uint8(d) >= uint8(c)
  3082  	// result: (Leq8U (Sub8 <x.Type> x (Const8 <x.Type> [c])) (Const8 <x.Type> [d-c]))
  3083  	for {
  3084  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3085  			if v_0.Op != OpLeq8U {
  3086  				continue
  3087  			}
  3088  			x := v_0.Args[1]
  3089  			v_0_0 := v_0.Args[0]
  3090  			if v_0_0.Op != OpConst8 {
  3091  				continue
  3092  			}
  3093  			c := auxIntToInt8(v_0_0.AuxInt)
  3094  			if v_1.Op != OpLeq8U {
  3095  				continue
  3096  			}
  3097  			_ = v_1.Args[1]
  3098  			if x != v_1.Args[0] {
  3099  				continue
  3100  			}
  3101  			v_1_1 := v_1.Args[1]
  3102  			if v_1_1.Op != OpConst8 {
  3103  				continue
  3104  			}
  3105  			d := auxIntToInt8(v_1_1.AuxInt)
  3106  			if !(uint8(d) >= uint8(c)) {
  3107  				continue
  3108  			}
  3109  			v.reset(OpLeq8U)
  3110  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  3111  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3112  			v1.AuxInt = int8ToAuxInt(c)
  3113  			v0.AddArg2(x, v1)
  3114  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3115  			v2.AuxInt = int8ToAuxInt(d - c)
  3116  			v.AddArg2(v0, v2)
  3117  			return true
  3118  		}
  3119  		break
  3120  	}
  3121  	// match: (AndB (Less64U (Const64 [c]) x) (Less64U x (Const64 [d])))
  3122  	// cond: uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)
  3123  	// result: (Less64U (Sub64 <x.Type> x (Const64 <x.Type> [c+1])) (Const64 <x.Type> [d-c-1]))
  3124  	for {
  3125  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3126  			if v_0.Op != OpLess64U {
  3127  				continue
  3128  			}
  3129  			x := v_0.Args[1]
  3130  			v_0_0 := v_0.Args[0]
  3131  			if v_0_0.Op != OpConst64 {
  3132  				continue
  3133  			}
  3134  			c := auxIntToInt64(v_0_0.AuxInt)
  3135  			if v_1.Op != OpLess64U {
  3136  				continue
  3137  			}
  3138  			_ = v_1.Args[1]
  3139  			if x != v_1.Args[0] {
  3140  				continue
  3141  			}
  3142  			v_1_1 := v_1.Args[1]
  3143  			if v_1_1.Op != OpConst64 {
  3144  				continue
  3145  			}
  3146  			d := auxIntToInt64(v_1_1.AuxInt)
  3147  			if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
  3148  				continue
  3149  			}
  3150  			v.reset(OpLess64U)
  3151  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  3152  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  3153  			v1.AuxInt = int64ToAuxInt(c + 1)
  3154  			v0.AddArg2(x, v1)
  3155  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  3156  			v2.AuxInt = int64ToAuxInt(d - c - 1)
  3157  			v.AddArg2(v0, v2)
  3158  			return true
  3159  		}
  3160  		break
  3161  	}
  3162  	// match: (AndB (Less64U (Const64 [c]) x) (Leq64U x (Const64 [d])))
  3163  	// cond: uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)
  3164  	// result: (Leq64U (Sub64 <x.Type> x (Const64 <x.Type> [c+1])) (Const64 <x.Type> [d-c-1]))
  3165  	for {
  3166  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3167  			if v_0.Op != OpLess64U {
  3168  				continue
  3169  			}
  3170  			x := v_0.Args[1]
  3171  			v_0_0 := v_0.Args[0]
  3172  			if v_0_0.Op != OpConst64 {
  3173  				continue
  3174  			}
  3175  			c := auxIntToInt64(v_0_0.AuxInt)
  3176  			if v_1.Op != OpLeq64U {
  3177  				continue
  3178  			}
  3179  			_ = v_1.Args[1]
  3180  			if x != v_1.Args[0] {
  3181  				continue
  3182  			}
  3183  			v_1_1 := v_1.Args[1]
  3184  			if v_1_1.Op != OpConst64 {
  3185  				continue
  3186  			}
  3187  			d := auxIntToInt64(v_1_1.AuxInt)
  3188  			if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
  3189  				continue
  3190  			}
  3191  			v.reset(OpLeq64U)
  3192  			v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
  3193  			v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
  3194  			v1.AuxInt = int64ToAuxInt(c + 1)
  3195  			v0.AddArg2(x, v1)
  3196  			v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
  3197  			v2.AuxInt = int64ToAuxInt(d - c - 1)
  3198  			v.AddArg2(v0, v2)
  3199  			return true
  3200  		}
  3201  		break
  3202  	}
  3203  	// match: (AndB (Less32U (Const32 [c]) x) (Less32U x (Const32 [d])))
  3204  	// cond: uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)
  3205  	// result: (Less32U (Sub32 <x.Type> x (Const32 <x.Type> [c+1])) (Const32 <x.Type> [d-c-1]))
  3206  	for {
  3207  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3208  			if v_0.Op != OpLess32U {
  3209  				continue
  3210  			}
  3211  			x := v_0.Args[1]
  3212  			v_0_0 := v_0.Args[0]
  3213  			if v_0_0.Op != OpConst32 {
  3214  				continue
  3215  			}
  3216  			c := auxIntToInt32(v_0_0.AuxInt)
  3217  			if v_1.Op != OpLess32U {
  3218  				continue
  3219  			}
  3220  			_ = v_1.Args[1]
  3221  			if x != v_1.Args[0] {
  3222  				continue
  3223  			}
  3224  			v_1_1 := v_1.Args[1]
  3225  			if v_1_1.Op != OpConst32 {
  3226  				continue
  3227  			}
  3228  			d := auxIntToInt32(v_1_1.AuxInt)
  3229  			if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
  3230  				continue
  3231  			}
  3232  			v.reset(OpLess32U)
  3233  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  3234  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  3235  			v1.AuxInt = int32ToAuxInt(c + 1)
  3236  			v0.AddArg2(x, v1)
  3237  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  3238  			v2.AuxInt = int32ToAuxInt(d - c - 1)
  3239  			v.AddArg2(v0, v2)
  3240  			return true
  3241  		}
  3242  		break
  3243  	}
  3244  	// match: (AndB (Less32U (Const32 [c]) x) (Leq32U x (Const32 [d])))
  3245  	// cond: uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)
  3246  	// result: (Leq32U (Sub32 <x.Type> x (Const32 <x.Type> [c+1])) (Const32 <x.Type> [d-c-1]))
  3247  	for {
  3248  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3249  			if v_0.Op != OpLess32U {
  3250  				continue
  3251  			}
  3252  			x := v_0.Args[1]
  3253  			v_0_0 := v_0.Args[0]
  3254  			if v_0_0.Op != OpConst32 {
  3255  				continue
  3256  			}
  3257  			c := auxIntToInt32(v_0_0.AuxInt)
  3258  			if v_1.Op != OpLeq32U {
  3259  				continue
  3260  			}
  3261  			_ = v_1.Args[1]
  3262  			if x != v_1.Args[0] {
  3263  				continue
  3264  			}
  3265  			v_1_1 := v_1.Args[1]
  3266  			if v_1_1.Op != OpConst32 {
  3267  				continue
  3268  			}
  3269  			d := auxIntToInt32(v_1_1.AuxInt)
  3270  			if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
  3271  				continue
  3272  			}
  3273  			v.reset(OpLeq32U)
  3274  			v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
  3275  			v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
  3276  			v1.AuxInt = int32ToAuxInt(c + 1)
  3277  			v0.AddArg2(x, v1)
  3278  			v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
  3279  			v2.AuxInt = int32ToAuxInt(d - c - 1)
  3280  			v.AddArg2(v0, v2)
  3281  			return true
  3282  		}
  3283  		break
  3284  	}
  3285  	// match: (AndB (Less16U (Const16 [c]) x) (Less16U x (Const16 [d])))
  3286  	// cond: uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)
  3287  	// result: (Less16U (Sub16 <x.Type> x (Const16 <x.Type> [c+1])) (Const16 <x.Type> [d-c-1]))
  3288  	for {
  3289  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3290  			if v_0.Op != OpLess16U {
  3291  				continue
  3292  			}
  3293  			x := v_0.Args[1]
  3294  			v_0_0 := v_0.Args[0]
  3295  			if v_0_0.Op != OpConst16 {
  3296  				continue
  3297  			}
  3298  			c := auxIntToInt16(v_0_0.AuxInt)
  3299  			if v_1.Op != OpLess16U {
  3300  				continue
  3301  			}
  3302  			_ = v_1.Args[1]
  3303  			if x != v_1.Args[0] {
  3304  				continue
  3305  			}
  3306  			v_1_1 := v_1.Args[1]
  3307  			if v_1_1.Op != OpConst16 {
  3308  				continue
  3309  			}
  3310  			d := auxIntToInt16(v_1_1.AuxInt)
  3311  			if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
  3312  				continue
  3313  			}
  3314  			v.reset(OpLess16U)
  3315  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  3316  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  3317  			v1.AuxInt = int16ToAuxInt(c + 1)
  3318  			v0.AddArg2(x, v1)
  3319  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  3320  			v2.AuxInt = int16ToAuxInt(d - c - 1)
  3321  			v.AddArg2(v0, v2)
  3322  			return true
  3323  		}
  3324  		break
  3325  	}
  3326  	// match: (AndB (Less16U (Const16 [c]) x) (Leq16U x (Const16 [d])))
  3327  	// cond: uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)
  3328  	// result: (Leq16U (Sub16 <x.Type> x (Const16 <x.Type> [c+1])) (Const16 <x.Type> [d-c-1]))
  3329  	for {
  3330  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3331  			if v_0.Op != OpLess16U {
  3332  				continue
  3333  			}
  3334  			x := v_0.Args[1]
  3335  			v_0_0 := v_0.Args[0]
  3336  			if v_0_0.Op != OpConst16 {
  3337  				continue
  3338  			}
  3339  			c := auxIntToInt16(v_0_0.AuxInt)
  3340  			if v_1.Op != OpLeq16U {
  3341  				continue
  3342  			}
  3343  			_ = v_1.Args[1]
  3344  			if x != v_1.Args[0] {
  3345  				continue
  3346  			}
  3347  			v_1_1 := v_1.Args[1]
  3348  			if v_1_1.Op != OpConst16 {
  3349  				continue
  3350  			}
  3351  			d := auxIntToInt16(v_1_1.AuxInt)
  3352  			if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
  3353  				continue
  3354  			}
  3355  			v.reset(OpLeq16U)
  3356  			v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
  3357  			v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
  3358  			v1.AuxInt = int16ToAuxInt(c + 1)
  3359  			v0.AddArg2(x, v1)
  3360  			v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
  3361  			v2.AuxInt = int16ToAuxInt(d - c - 1)
  3362  			v.AddArg2(v0, v2)
  3363  			return true
  3364  		}
  3365  		break
  3366  	}
  3367  	// match: (AndB (Less8U (Const8 [c]) x) (Less8U x (Const8 [d])))
  3368  	// cond: uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)
  3369  	// result: (Less8U (Sub8 <x.Type> x (Const8 <x.Type> [c+1])) (Const8 <x.Type> [d-c-1]))
  3370  	for {
  3371  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3372  			if v_0.Op != OpLess8U {
  3373  				continue
  3374  			}
  3375  			x := v_0.Args[1]
  3376  			v_0_0 := v_0.Args[0]
  3377  			if v_0_0.Op != OpConst8 {
  3378  				continue
  3379  			}
  3380  			c := auxIntToInt8(v_0_0.AuxInt)
  3381  			if v_1.Op != OpLess8U {
  3382  				continue
  3383  			}
  3384  			_ = v_1.Args[1]
  3385  			if x != v_1.Args[0] {
  3386  				continue
  3387  			}
  3388  			v_1_1 := v_1.Args[1]
  3389  			if v_1_1.Op != OpConst8 {
  3390  				continue
  3391  			}
  3392  			d := auxIntToInt8(v_1_1.AuxInt)
  3393  			if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
  3394  				continue
  3395  			}
  3396  			v.reset(OpLess8U)
  3397  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  3398  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3399  			v1.AuxInt = int8ToAuxInt(c + 1)
  3400  			v0.AddArg2(x, v1)
  3401  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3402  			v2.AuxInt = int8ToAuxInt(d - c - 1)
  3403  			v.AddArg2(v0, v2)
  3404  			return true
  3405  		}
  3406  		break
  3407  	}
  3408  	// match: (AndB (Less8U (Const8 [c]) x) (Leq8U x (Const8 [d])))
  3409  	// cond: uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)
  3410  	// result: (Leq8U (Sub8 <x.Type> x (Const8 <x.Type> [c+1])) (Const8 <x.Type> [d-c-1]))
  3411  	for {
  3412  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3413  			if v_0.Op != OpLess8U {
  3414  				continue
  3415  			}
  3416  			x := v_0.Args[1]
  3417  			v_0_0 := v_0.Args[0]
  3418  			if v_0_0.Op != OpConst8 {
  3419  				continue
  3420  			}
  3421  			c := auxIntToInt8(v_0_0.AuxInt)
  3422  			if v_1.Op != OpLeq8U {
  3423  				continue
  3424  			}
  3425  			_ = v_1.Args[1]
  3426  			if x != v_1.Args[0] {
  3427  				continue
  3428  			}
  3429  			v_1_1 := v_1.Args[1]
  3430  			if v_1_1.Op != OpConst8 {
  3431  				continue
  3432  			}
  3433  			d := auxIntToInt8(v_1_1.AuxInt)
  3434  			if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
  3435  				continue
  3436  			}
  3437  			v.reset(OpLeq8U)
  3438  			v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
  3439  			v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3440  			v1.AuxInt = int8ToAuxInt(c + 1)
  3441  			v0.AddArg2(x, v1)
  3442  			v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
  3443  			v2.AuxInt = int8ToAuxInt(d - c - 1)
  3444  			v.AddArg2(v0, v2)
  3445  			return true
  3446  		}
  3447  		break
  3448  	}
  3449  	return false
  3450  }
  3451  func rewriteValuegeneric_OpArraySelect(v *Value) bool {
  3452  	v_0 := v.Args[0]
  3453  	// match: (ArraySelect (ArrayMake1 x))
  3454  	// result: x
  3455  	for {
  3456  		if v_0.Op != OpArrayMake1 {
  3457  			break
  3458  		}
  3459  		x := v_0.Args[0]
  3460  		v.copyOf(x)
  3461  		return true
  3462  	}
  3463  	// match: (ArraySelect [0] (IData x))
  3464  	// result: (IData x)
  3465  	for {
  3466  		if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
  3467  			break
  3468  		}
  3469  		x := v_0.Args[0]
  3470  		v.reset(OpIData)
  3471  		v.AddArg(x)
  3472  		return true
  3473  	}
  3474  	return false
  3475  }
  3476  func rewriteValuegeneric_OpCom16(v *Value) bool {
  3477  	v_0 := v.Args[0]
  3478  	// match: (Com16 (Com16 x))
  3479  	// result: x
  3480  	for {
  3481  		if v_0.Op != OpCom16 {
  3482  			break
  3483  		}
  3484  		x := v_0.Args[0]
  3485  		v.copyOf(x)
  3486  		return true
  3487  	}
  3488  	// match: (Com16 (Const16 [c]))
  3489  	// result: (Const16 [^c])
  3490  	for {
  3491  		if v_0.Op != OpConst16 {
  3492  			break
  3493  		}
  3494  		c := auxIntToInt16(v_0.AuxInt)
  3495  		v.reset(OpConst16)
  3496  		v.AuxInt = int16ToAuxInt(^c)
  3497  		return true
  3498  	}
  3499  	// match: (Com16 (Add16 (Const16 [-1]) x))
  3500  	// result: (Neg16 x)
  3501  	for {
  3502  		if v_0.Op != OpAdd16 {
  3503  			break
  3504  		}
  3505  		_ = v_0.Args[1]
  3506  		v_0_0 := v_0.Args[0]
  3507  		v_0_1 := v_0.Args[1]
  3508  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  3509  			if v_0_0.Op != OpConst16 || auxIntToInt16(v_0_0.AuxInt) != -1 {
  3510  				continue
  3511  			}
  3512  			x := v_0_1
  3513  			v.reset(OpNeg16)
  3514  			v.AddArg(x)
  3515  			return true
  3516  		}
  3517  		break
  3518  	}
  3519  	return false
  3520  }
  3521  func rewriteValuegeneric_OpCom32(v *Value) bool {
  3522  	v_0 := v.Args[0]
  3523  	// match: (Com32 (Com32 x))
  3524  	// result: x
  3525  	for {
  3526  		if v_0.Op != OpCom32 {
  3527  			break
  3528  		}
  3529  		x := v_0.Args[0]
  3530  		v.copyOf(x)
  3531  		return true
  3532  	}
  3533  	// match: (Com32 (Const32 [c]))
  3534  	// result: (Const32 [^c])
  3535  	for {
  3536  		if v_0.Op != OpConst32 {
  3537  			break
  3538  		}
  3539  		c := auxIntToInt32(v_0.AuxInt)
  3540  		v.reset(OpConst32)
  3541  		v.AuxInt = int32ToAuxInt(^c)
  3542  		return true
  3543  	}
  3544  	// match: (Com32 (Add32 (Const32 [-1]) x))
  3545  	// result: (Neg32 x)
  3546  	for {
  3547  		if v_0.Op != OpAdd32 {
  3548  			break
  3549  		}
  3550  		_ = v_0.Args[1]
  3551  		v_0_0 := v_0.Args[0]
  3552  		v_0_1 := v_0.Args[1]
  3553  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  3554  			if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != -1 {
  3555  				continue
  3556  			}
  3557  			x := v_0_1
  3558  			v.reset(OpNeg32)
  3559  			v.AddArg(x)
  3560  			return true
  3561  		}
  3562  		break
  3563  	}
  3564  	return false
  3565  }
  3566  func rewriteValuegeneric_OpCom64(v *Value) bool {
  3567  	v_0 := v.Args[0]
  3568  	// match: (Com64 (Com64 x))
  3569  	// result: x
  3570  	for {
  3571  		if v_0.Op != OpCom64 {
  3572  			break
  3573  		}
  3574  		x := v_0.Args[0]
  3575  		v.copyOf(x)
  3576  		return true
  3577  	}
  3578  	// match: (Com64 (Const64 [c]))
  3579  	// result: (Const64 [^c])
  3580  	for {
  3581  		if v_0.Op != OpConst64 {
  3582  			break
  3583  		}
  3584  		c := auxIntToInt64(v_0.AuxInt)
  3585  		v.reset(OpConst64)
  3586  		v.AuxInt = int64ToAuxInt(^c)
  3587  		return true
  3588  	}
  3589  	// match: (Com64 (Add64 (Const64 [-1]) x))
  3590  	// result: (Neg64 x)
  3591  	for {
  3592  		if v_0.Op != OpAdd64 {
  3593  			break
  3594  		}
  3595  		_ = v_0.Args[1]
  3596  		v_0_0 := v_0.Args[0]
  3597  		v_0_1 := v_0.Args[1]
  3598  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  3599  			if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != -1 {
  3600  				continue
  3601  			}
  3602  			x := v_0_1
  3603  			v.reset(OpNeg64)
  3604  			v.AddArg(x)
  3605  			return true
  3606  		}
  3607  		break
  3608  	}
  3609  	return false
  3610  }
  3611  func rewriteValuegeneric_OpCom8(v *Value) bool {
  3612  	v_0 := v.Args[0]
  3613  	// match: (Com8 (Com8 x))
  3614  	// result: x
  3615  	for {
  3616  		if v_0.Op != OpCom8 {
  3617  			break
  3618  		}
  3619  		x := v_0.Args[0]
  3620  		v.copyOf(x)
  3621  		return true
  3622  	}
  3623  	// match: (Com8 (Const8 [c]))
  3624  	// result: (Const8 [^c])
  3625  	for {
  3626  		if v_0.Op != OpConst8 {
  3627  			break
  3628  		}
  3629  		c := auxIntToInt8(v_0.AuxInt)
  3630  		v.reset(OpConst8)
  3631  		v.AuxInt = int8ToAuxInt(^c)
  3632  		return true
  3633  	}
  3634  	// match: (Com8 (Add8 (Const8 [-1]) x))
  3635  	// result: (Neg8 x)
  3636  	for {
  3637  		if v_0.Op != OpAdd8 {
  3638  			break
  3639  		}
  3640  		_ = v_0.Args[1]
  3641  		v_0_0 := v_0.Args[0]
  3642  		v_0_1 := v_0.Args[1]
  3643  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  3644  			if v_0_0.Op != OpConst8 || auxIntToInt8(v_0_0.AuxInt) != -1 {
  3645  				continue
  3646  			}
  3647  			x := v_0_1
  3648  			v.reset(OpNeg8)
  3649  			v.AddArg(x)
  3650  			return true
  3651  		}
  3652  		break
  3653  	}
  3654  	return false
  3655  }
  3656  func rewriteValuegeneric_OpConstInterface(v *Value) bool {
  3657  	b := v.Block
  3658  	typ := &b.Func.Config.Types
  3659  	// match: (ConstInterface)
  3660  	// result: (IMake (ConstNil <typ.Uintptr>) (ConstNil <typ.BytePtr>))
  3661  	for {
  3662  		v.reset(OpIMake)
  3663  		v0 := b.NewValue0(v.Pos, OpConstNil, typ.Uintptr)
  3664  		v1 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
  3665  		v.AddArg2(v0, v1)
  3666  		return true
  3667  	}
  3668  }
  3669  func rewriteValuegeneric_OpConstSlice(v *Value) bool {
  3670  	b := v.Block
  3671  	config := b.Func.Config
  3672  	typ := &b.Func.Config.Types
  3673  	// match: (ConstSlice)
  3674  	// cond: config.PtrSize == 4
  3675  	// result: (SliceMake (ConstNil <v.Type.Elem().PtrTo()>) (Const32 <typ.Int> [0]) (Const32 <typ.Int> [0]))
  3676  	for {
  3677  		if !(config.PtrSize == 4) {
  3678  			break
  3679  		}
  3680  		v.reset(OpSliceMake)
  3681  		v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
  3682  		v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
  3683  		v1.AuxInt = int32ToAuxInt(0)
  3684  		v.AddArg3(v0, v1, v1)
  3685  		return true
  3686  	}
  3687  	// match: (ConstSlice)
  3688  	// cond: config.PtrSize == 8
  3689  	// result: (SliceMake (ConstNil <v.Type.Elem().PtrTo()>) (Const64 <typ.Int> [0]) (Const64 <typ.Int> [0]))
  3690  	for {
  3691  		if !(config.PtrSize == 8) {
  3692  			break
  3693  		}
  3694  		v.reset(OpSliceMake)
  3695  		v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
  3696  		v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
  3697  		v1.AuxInt = int64ToAuxInt(0)
  3698  		v.AddArg3(v0, v1, v1)
  3699  		return true
  3700  	}
  3701  	return false
  3702  }
  3703  func rewriteValuegeneric_OpConstString(v *Value) bool {
  3704  	b := v.Block
  3705  	config := b.Func.Config
  3706  	fe := b.Func.fe
  3707  	typ := &b.Func.Config.Types
  3708  	// match: (ConstString {str})
  3709  	// cond: config.PtrSize == 4 && str == ""
  3710  	// result: (StringMake (ConstNil) (Const32 <typ.Int> [0]))
  3711  	for {
  3712  		str := auxToString(v.Aux)
  3713  		if !(config.PtrSize == 4 && str == "") {
  3714  			break
  3715  		}
  3716  		v.reset(OpStringMake)
  3717  		v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
  3718  		v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
  3719  		v1.AuxInt = int32ToAuxInt(0)
  3720  		v.AddArg2(v0, v1)
  3721  		return true
  3722  	}
  3723  	// match: (ConstString {str})
  3724  	// cond: config.PtrSize == 8 && str == ""
  3725  	// result: (StringMake (ConstNil) (Const64 <typ.Int> [0]))
  3726  	for {
  3727  		str := auxToString(v.Aux)
  3728  		if !(config.PtrSize == 8 && str == "") {
  3729  			break
  3730  		}
  3731  		v.reset(OpStringMake)
  3732  		v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
  3733  		v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
  3734  		v1.AuxInt = int64ToAuxInt(0)
  3735  		v.AddArg2(v0, v1)
  3736  		return true
  3737  	}
  3738  	// match: (ConstString {str})
  3739  	// cond: config.PtrSize == 4 && str != ""
  3740  	// result: (StringMake (Addr <typ.BytePtr> {fe.StringData(str)} (SB)) (Const32 <typ.Int> [int32(len(str))]))
  3741  	for {
  3742  		str := auxToString(v.Aux)
  3743  		if !(config.PtrSize == 4 && str != "") {
  3744  			break
  3745  		}
  3746  		v.reset(OpStringMake)
  3747  		v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
  3748  		v0.Aux = symToAux(fe.StringData(str))
  3749  		v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
  3750  		v0.AddArg(v1)
  3751  		v2 := b.NewValue0(v.Pos, OpConst32, typ.Int)
  3752  		v2.AuxInt = int32ToAuxInt(int32(len(str)))
  3753  		v.AddArg2(v0, v2)
  3754  		return true
  3755  	}
  3756  	// match: (ConstString {str})
  3757  	// cond: config.PtrSize == 8 && str != ""
  3758  	// result: (StringMake (Addr <typ.BytePtr> {fe.StringData(str)} (SB)) (Const64 <typ.Int> [int64(len(str))]))
  3759  	for {
  3760  		str := auxToString(v.Aux)
  3761  		if !(config.PtrSize == 8 && str != "") {
  3762  			break
  3763  		}
  3764  		v.reset(OpStringMake)
  3765  		v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
  3766  		v0.Aux = symToAux(fe.StringData(str))
  3767  		v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
  3768  		v0.AddArg(v1)
  3769  		v2 := b.NewValue0(v.Pos, OpConst64, typ.Int)
  3770  		v2.AuxInt = int64ToAuxInt(int64(len(str)))
  3771  		v.AddArg2(v0, v2)
  3772  		return true
  3773  	}
  3774  	return false
  3775  }
  3776  func rewriteValuegeneric_OpConvert(v *Value) bool {
  3777  	v_1 := v.Args[1]
  3778  	v_0 := v.Args[0]
  3779  	// match: (Convert (Add64 (Convert ptr mem) off) mem)
  3780  	// result: (AddPtr ptr off)
  3781  	for {
  3782  		if v_0.Op != OpAdd64 {
  3783  			break
  3784  		}
  3785  		_ = v_0.Args[1]
  3786  		v_0_0 := v_0.Args[0]
  3787  		v_0_1 := v_0.Args[1]
  3788  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  3789  			if v_0_0.Op != OpConvert {
  3790  				continue
  3791  			}
  3792  			mem := v_0_0.Args[1]
  3793  			ptr := v_0_0.Args[0]
  3794  			off := v_0_1
  3795  			if mem != v_1 {
  3796  				continue
  3797  			}
  3798  			v.reset(OpAddPtr)
  3799  			v.AddArg2(ptr, off)
  3800  			return true
  3801  		}
  3802  		break
  3803  	}
  3804  	// match: (Convert (Add32 (Convert ptr mem) off) mem)
  3805  	// result: (AddPtr ptr off)
  3806  	for {
  3807  		if v_0.Op != OpAdd32 {
  3808  			break
  3809  		}
  3810  		_ = v_0.Args[1]
  3811  		v_0_0 := v_0.Args[0]
  3812  		v_0_1 := v_0.Args[1]
  3813  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  3814  			if v_0_0.Op != OpConvert {
  3815  				continue
  3816  			}
  3817  			mem := v_0_0.Args[1]
  3818  			ptr := v_0_0.Args[0]
  3819  			off := v_0_1
  3820  			if mem != v_1 {
  3821  				continue
  3822  			}
  3823  			v.reset(OpAddPtr)
  3824  			v.AddArg2(ptr, off)
  3825  			return true
  3826  		}
  3827  		break
  3828  	}
  3829  	// match: (Convert (Convert ptr mem) mem)
  3830  	// result: ptr
  3831  	for {
  3832  		if v_0.Op != OpConvert {
  3833  			break
  3834  		}
  3835  		mem := v_0.Args[1]
  3836  		ptr := v_0.Args[0]
  3837  		if mem != v_1 {
  3838  			break
  3839  		}
  3840  		v.copyOf(ptr)
  3841  		return true
  3842  	}
  3843  	return false
  3844  }
  3845  func rewriteValuegeneric_OpCtz16(v *Value) bool {
  3846  	v_0 := v.Args[0]
  3847  	b := v.Block
  3848  	config := b.Func.Config
  3849  	// match: (Ctz16 (Const16 [c]))
  3850  	// cond: config.PtrSize == 4
  3851  	// result: (Const32 [int32(ntz16(c))])
  3852  	for {
  3853  		if v_0.Op != OpConst16 {
  3854  			break
  3855  		}
  3856  		c := auxIntToInt16(v_0.AuxInt)
  3857  		if !(config.PtrSize == 4) {
  3858  			break
  3859  		}
  3860  		v.reset(OpConst32)
  3861  		v.AuxInt = int32ToAuxInt(int32(ntz16(c)))
  3862  		return true
  3863  	}
  3864  	// match: (Ctz16 (Const16 [c]))
  3865  	// cond: config.PtrSize == 8
  3866  	// result: (Const64 [int64(ntz16(c))])
  3867  	for {
  3868  		if v_0.Op != OpConst16 {
  3869  			break
  3870  		}
  3871  		c := auxIntToInt16(v_0.AuxInt)
  3872  		if !(config.PtrSize == 8) {
  3873  			break
  3874  		}
  3875  		v.reset(OpConst64)
  3876  		v.AuxInt = int64ToAuxInt(int64(ntz16(c)))
  3877  		return true
  3878  	}
  3879  	return false
  3880  }
  3881  func rewriteValuegeneric_OpCtz32(v *Value) bool {
  3882  	v_0 := v.Args[0]
  3883  	b := v.Block
  3884  	config := b.Func.Config
  3885  	// match: (Ctz32 (Const32 [c]))
  3886  	// cond: config.PtrSize == 4
  3887  	// result: (Const32 [int32(ntz32(c))])
  3888  	for {
  3889  		if v_0.Op != OpConst32 {
  3890  			break
  3891  		}
  3892  		c := auxIntToInt32(v_0.AuxInt)
  3893  		if !(config.PtrSize == 4) {
  3894  			break
  3895  		}
  3896  		v.reset(OpConst32)
  3897  		v.AuxInt = int32ToAuxInt(int32(ntz32(c)))
  3898  		return true
  3899  	}
  3900  	// match: (Ctz32 (Const32 [c]))
  3901  	// cond: config.PtrSize == 8
  3902  	// result: (Const64 [int64(ntz32(c))])
  3903  	for {
  3904  		if v_0.Op != OpConst32 {
  3905  			break
  3906  		}
  3907  		c := auxIntToInt32(v_0.AuxInt)
  3908  		if !(config.PtrSize == 8) {
  3909  			break
  3910  		}
  3911  		v.reset(OpConst64)
  3912  		v.AuxInt = int64ToAuxInt(int64(ntz32(c)))
  3913  		return true
  3914  	}
  3915  	return false
  3916  }
  3917  func rewriteValuegeneric_OpCtz64(v *Value) bool {
  3918  	v_0 := v.Args[0]
  3919  	b := v.Block
  3920  	config := b.Func.Config
  3921  	// match: (Ctz64 (Const64 [c]))
  3922  	// cond: config.PtrSize == 4
  3923  	// result: (Const32 [int32(ntz64(c))])
  3924  	for {
  3925  		if v_0.Op != OpConst64 {
  3926  			break
  3927  		}
  3928  		c := auxIntToInt64(v_0.AuxInt)
  3929  		if !(config.PtrSize == 4) {
  3930  			break
  3931  		}
  3932  		v.reset(OpConst32)
  3933  		v.AuxInt = int32ToAuxInt(int32(ntz64(c)))
  3934  		return true
  3935  	}
  3936  	// match: (Ctz64 (Const64 [c]))
  3937  	// cond: config.PtrSize == 8
  3938  	// result: (Const64 [int64(ntz64(c))])
  3939  	for {
  3940  		if v_0.Op != OpConst64 {
  3941  			break
  3942  		}
  3943  		c := auxIntToInt64(v_0.AuxInt)
  3944  		if !(config.PtrSize == 8) {
  3945  			break
  3946  		}
  3947  		v.reset(OpConst64)
  3948  		v.AuxInt = int64ToAuxInt(int64(ntz64(c)))
  3949  		return true
  3950  	}
  3951  	return false
  3952  }
  3953  func rewriteValuegeneric_OpCtz8(v *Value) bool {
  3954  	v_0 := v.Args[0]
  3955  	b := v.Block
  3956  	config := b.Func.Config
  3957  	// match: (Ctz8 (Const8 [c]))
  3958  	// cond: config.PtrSize == 4
  3959  	// result: (Const32 [int32(ntz8(c))])
  3960  	for {
  3961  		if v_0.Op != OpConst8 {
  3962  			break
  3963  		}
  3964  		c := auxIntToInt8(v_0.AuxInt)
  3965  		if !(config.PtrSize == 4) {
  3966  			break
  3967  		}
  3968  		v.reset(OpConst32)
  3969  		v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
  3970  		return true
  3971  	}
  3972  	// match: (Ctz8 (Const8 [c]))
  3973  	// cond: config.PtrSize == 8
  3974  	// result: (Const64 [int64(ntz8(c))])
  3975  	for {
  3976  		if v_0.Op != OpConst8 {
  3977  			break
  3978  		}
  3979  		c := auxIntToInt8(v_0.AuxInt)
  3980  		if !(config.PtrSize == 8) {
  3981  			break
  3982  		}
  3983  		v.reset(OpConst64)
  3984  		v.AuxInt = int64ToAuxInt(int64(ntz8(c)))
  3985  		return true
  3986  	}
  3987  	return false
  3988  }
  3989  func rewriteValuegeneric_OpCvt32Fto32(v *Value) bool {
  3990  	v_0 := v.Args[0]
  3991  	// match: (Cvt32Fto32 (Const32F [c]))
  3992  	// result: (Const32 [int32(c)])
  3993  	for {
  3994  		if v_0.Op != OpConst32F {
  3995  			break
  3996  		}
  3997  		c := auxIntToFloat32(v_0.AuxInt)
  3998  		v.reset(OpConst32)
  3999  		v.AuxInt = int32ToAuxInt(int32(c))
  4000  		return true
  4001  	}
  4002  	return false
  4003  }
  4004  func rewriteValuegeneric_OpCvt32Fto64(v *Value) bool {
  4005  	v_0 := v.Args[0]
  4006  	// match: (Cvt32Fto64 (Const32F [c]))
  4007  	// result: (Const64 [int64(c)])
  4008  	for {
  4009  		if v_0.Op != OpConst32F {
  4010  			break
  4011  		}
  4012  		c := auxIntToFloat32(v_0.AuxInt)
  4013  		v.reset(OpConst64)
  4014  		v.AuxInt = int64ToAuxInt(int64(c))
  4015  		return true
  4016  	}
  4017  	return false
  4018  }
  4019  func rewriteValuegeneric_OpCvt32Fto64F(v *Value) bool {
  4020  	v_0 := v.Args[0]
  4021  	// match: (Cvt32Fto64F (Const32F [c]))
  4022  	// result: (Const64F [float64(c)])
  4023  	for {
  4024  		if v_0.Op != OpConst32F {
  4025  			break
  4026  		}
  4027  		c := auxIntToFloat32(v_0.AuxInt)
  4028  		v.reset(OpConst64F)
  4029  		v.AuxInt = float64ToAuxInt(float64(c))
  4030  		return true
  4031  	}
  4032  	return false
  4033  }
  4034  func rewriteValuegeneric_OpCvt32to32F(v *Value) bool {
  4035  	v_0 := v.Args[0]
  4036  	// match: (Cvt32to32F (Const32 [c]))
  4037  	// result: (Const32F [float32(c)])
  4038  	for {
  4039  		if v_0.Op != OpConst32 {
  4040  			break
  4041  		}
  4042  		c := auxIntToInt32(v_0.AuxInt)
  4043  		v.reset(OpConst32F)
  4044  		v.AuxInt = float32ToAuxInt(float32(c))
  4045  		return true
  4046  	}
  4047  	return false
  4048  }
  4049  func rewriteValuegeneric_OpCvt32to64F(v *Value) bool {
  4050  	v_0 := v.Args[0]
  4051  	// match: (Cvt32to64F (Const32 [c]))
  4052  	// result: (Const64F [float64(c)])
  4053  	for {
  4054  		if v_0.Op != OpConst32 {
  4055  			break
  4056  		}
  4057  		c := auxIntToInt32(v_0.AuxInt)
  4058  		v.reset(OpConst64F)
  4059  		v.AuxInt = float64ToAuxInt(float64(c))
  4060  		return true
  4061  	}
  4062  	return false
  4063  }
  4064  func rewriteValuegeneric_OpCvt64Fto32(v *Value) bool {
  4065  	v_0 := v.Args[0]
  4066  	// match: (Cvt64Fto32 (Const64F [c]))
  4067  	// result: (Const32 [int32(c)])
  4068  	for {
  4069  		if v_0.Op != OpConst64F {
  4070  			break
  4071  		}
  4072  		c := auxIntToFloat64(v_0.AuxInt)
  4073  		v.reset(OpConst32)
  4074  		v.AuxInt = int32ToAuxInt(int32(c))
  4075  		return true
  4076  	}
  4077  	return false
  4078  }
  4079  func rewriteValuegeneric_OpCvt64Fto32F(v *Value) bool {
  4080  	v_0 := v.Args[0]
  4081  	// match: (Cvt64Fto32F (Const64F [c]))
  4082  	// result: (Const32F [float32(c)])
  4083  	for {
  4084  		if v_0.Op != OpConst64F {
  4085  			break
  4086  		}
  4087  		c := auxIntToFloat64(v_0.AuxInt)
  4088  		v.reset(OpConst32F)
  4089  		v.AuxInt = float32ToAuxInt(float32(c))
  4090  		return true
  4091  	}
  4092  	return false
  4093  }
  4094  func rewriteValuegeneric_OpCvt64Fto64(v *Value) bool {
  4095  	v_0 := v.Args[0]
  4096  	// match: (Cvt64Fto64 (Const64F [c]))
  4097  	// result: (Const64 [int64(c)])
  4098  	for {
  4099  		if v_0.Op != OpConst64F {
  4100  			break
  4101  		}
  4102  		c := auxIntToFloat64(v_0.AuxInt)
  4103  		v.reset(OpConst64)
  4104  		v.AuxInt = int64ToAuxInt(int64(c))
  4105  		return true
  4106  	}
  4107  	return false
  4108  }
  4109  func rewriteValuegeneric_OpCvt64to32F(v *Value) bool {
  4110  	v_0 := v.Args[0]
  4111  	// match: (Cvt64to32F (Const64 [c]))
  4112  	// result: (Const32F [float32(c)])
  4113  	for {
  4114  		if v_0.Op != OpConst64 {
  4115  			break
  4116  		}
  4117  		c := auxIntToInt64(v_0.AuxInt)
  4118  		v.reset(OpConst32F)
  4119  		v.AuxInt = float32ToAuxInt(float32(c))
  4120  		return true
  4121  	}
  4122  	return false
  4123  }
  4124  func rewriteValuegeneric_OpCvt64to64F(v *Value) bool {
  4125  	v_0 := v.Args[0]
  4126  	// match: (Cvt64to64F (Const64 [c]))
  4127  	// result: (Const64F [float64(c)])
  4128  	for {
  4129  		if v_0.Op != OpConst64 {
  4130  			break
  4131  		}
  4132  		c := auxIntToInt64(v_0.AuxInt)
  4133  		v.reset(OpConst64F)
  4134  		v.AuxInt = float64ToAuxInt(float64(c))
  4135  		return true
  4136  	}
  4137  	return false
  4138  }
  4139  func rewriteValuegeneric_OpCvtBoolToUint8(v *Value) bool {
  4140  	v_0 := v.Args[0]
  4141  	// match: (CvtBoolToUint8 (ConstBool [false]))
  4142  	// result: (Const8 [0])
  4143  	for {
  4144  		if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
  4145  			break
  4146  		}
  4147  		v.reset(OpConst8)
  4148  		v.AuxInt = int8ToAuxInt(0)
  4149  		return true
  4150  	}
  4151  	// match: (CvtBoolToUint8 (ConstBool [true]))
  4152  	// result: (Const8 [1])
  4153  	for {
  4154  		if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
  4155  			break
  4156  		}
  4157  		v.reset(OpConst8)
  4158  		v.AuxInt = int8ToAuxInt(1)
  4159  		return true
  4160  	}
  4161  	return false
  4162  }
  4163  func rewriteValuegeneric_OpDiv16(v *Value) bool {
  4164  	v_1 := v.Args[1]
  4165  	v_0 := v.Args[0]
  4166  	b := v.Block
  4167  	typ := &b.Func.Config.Types
  4168  	// match: (Div16 (Const16 [c]) (Const16 [d]))
  4169  	// cond: d != 0
  4170  	// result: (Const16 [c/d])
  4171  	for {
  4172  		if v_0.Op != OpConst16 {
  4173  			break
  4174  		}
  4175  		c := auxIntToInt16(v_0.AuxInt)
  4176  		if v_1.Op != OpConst16 {
  4177  			break
  4178  		}
  4179  		d := auxIntToInt16(v_1.AuxInt)
  4180  		if !(d != 0) {
  4181  			break
  4182  		}
  4183  		v.reset(OpConst16)
  4184  		v.AuxInt = int16ToAuxInt(c / d)
  4185  		return true
  4186  	}
  4187  	// match: (Div16 n (Const16 [c]))
  4188  	// cond: isNonNegative(n) && isPowerOfTwo16(c)
  4189  	// result: (Rsh16Ux64 n (Const64 <typ.UInt64> [log16(c)]))
  4190  	for {
  4191  		n := v_0
  4192  		if v_1.Op != OpConst16 {
  4193  			break
  4194  		}
  4195  		c := auxIntToInt16(v_1.AuxInt)
  4196  		if !(isNonNegative(n) && isPowerOfTwo16(c)) {
  4197  			break
  4198  		}
  4199  		v.reset(OpRsh16Ux64)
  4200  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4201  		v0.AuxInt = int64ToAuxInt(log16(c))
  4202  		v.AddArg2(n, v0)
  4203  		return true
  4204  	}
  4205  	// match: (Div16 <t> n (Const16 [c]))
  4206  	// cond: c < 0 && c != -1<<15
  4207  	// result: (Neg16 (Div16 <t> n (Const16 <t> [-c])))
  4208  	for {
  4209  		t := v.Type
  4210  		n := v_0
  4211  		if v_1.Op != OpConst16 {
  4212  			break
  4213  		}
  4214  		c := auxIntToInt16(v_1.AuxInt)
  4215  		if !(c < 0 && c != -1<<15) {
  4216  			break
  4217  		}
  4218  		v.reset(OpNeg16)
  4219  		v0 := b.NewValue0(v.Pos, OpDiv16, t)
  4220  		v1 := b.NewValue0(v.Pos, OpConst16, t)
  4221  		v1.AuxInt = int16ToAuxInt(-c)
  4222  		v0.AddArg2(n, v1)
  4223  		v.AddArg(v0)
  4224  		return true
  4225  	}
  4226  	// match: (Div16 <t> x (Const16 [-1<<15]))
  4227  	// result: (Rsh16Ux64 (And16 <t> x (Neg16 <t> x)) (Const64 <typ.UInt64> [15]))
  4228  	for {
  4229  		t := v.Type
  4230  		x := v_0
  4231  		if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1<<15 {
  4232  			break
  4233  		}
  4234  		v.reset(OpRsh16Ux64)
  4235  		v0 := b.NewValue0(v.Pos, OpAnd16, t)
  4236  		v1 := b.NewValue0(v.Pos, OpNeg16, t)
  4237  		v1.AddArg(x)
  4238  		v0.AddArg2(x, v1)
  4239  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4240  		v2.AuxInt = int64ToAuxInt(15)
  4241  		v.AddArg2(v0, v2)
  4242  		return true
  4243  	}
  4244  	// match: (Div16 <t> n (Const16 [c]))
  4245  	// cond: isPowerOfTwo16(c)
  4246  	// result: (Rsh16x64 (Add16 <t> n (Rsh16Ux64 <t> (Rsh16x64 <t> n (Const64 <typ.UInt64> [15])) (Const64 <typ.UInt64> [int64(16-log16(c))]))) (Const64 <typ.UInt64> [int64(log16(c))]))
  4247  	for {
  4248  		t := v.Type
  4249  		n := v_0
  4250  		if v_1.Op != OpConst16 {
  4251  			break
  4252  		}
  4253  		c := auxIntToInt16(v_1.AuxInt)
  4254  		if !(isPowerOfTwo16(c)) {
  4255  			break
  4256  		}
  4257  		v.reset(OpRsh16x64)
  4258  		v0 := b.NewValue0(v.Pos, OpAdd16, t)
  4259  		v1 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  4260  		v2 := b.NewValue0(v.Pos, OpRsh16x64, t)
  4261  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4262  		v3.AuxInt = int64ToAuxInt(15)
  4263  		v2.AddArg2(n, v3)
  4264  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4265  		v4.AuxInt = int64ToAuxInt(int64(16 - log16(c)))
  4266  		v1.AddArg2(v2, v4)
  4267  		v0.AddArg2(n, v1)
  4268  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4269  		v5.AuxInt = int64ToAuxInt(int64(log16(c)))
  4270  		v.AddArg2(v0, v5)
  4271  		return true
  4272  	}
  4273  	// match: (Div16 <t> x (Const16 [c]))
  4274  	// cond: smagicOK16(c)
  4275  	// result: (Sub16 <t> (Rsh32x64 <t> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(smagic16(c).m)]) (SignExt16to32 x)) (Const64 <typ.UInt64> [16+smagic16(c).s])) (Rsh32x64 <t> (SignExt16to32 x) (Const64 <typ.UInt64> [31])))
  4276  	for {
  4277  		t := v.Type
  4278  		x := v_0
  4279  		if v_1.Op != OpConst16 {
  4280  			break
  4281  		}
  4282  		c := auxIntToInt16(v_1.AuxInt)
  4283  		if !(smagicOK16(c)) {
  4284  			break
  4285  		}
  4286  		v.reset(OpSub16)
  4287  		v.Type = t
  4288  		v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
  4289  		v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  4290  		v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4291  		v2.AuxInt = int32ToAuxInt(int32(smagic16(c).m))
  4292  		v3 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  4293  		v3.AddArg(x)
  4294  		v1.AddArg2(v2, v3)
  4295  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4296  		v4.AuxInt = int64ToAuxInt(16 + smagic16(c).s)
  4297  		v0.AddArg2(v1, v4)
  4298  		v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
  4299  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4300  		v6.AuxInt = int64ToAuxInt(31)
  4301  		v5.AddArg2(v3, v6)
  4302  		v.AddArg2(v0, v5)
  4303  		return true
  4304  	}
  4305  	return false
  4306  }
  4307  func rewriteValuegeneric_OpDiv16u(v *Value) bool {
  4308  	v_1 := v.Args[1]
  4309  	v_0 := v.Args[0]
  4310  	b := v.Block
  4311  	config := b.Func.Config
  4312  	typ := &b.Func.Config.Types
  4313  	// match: (Div16u (Const16 [c]) (Const16 [d]))
  4314  	// cond: d != 0
  4315  	// result: (Const16 [int16(uint16(c)/uint16(d))])
  4316  	for {
  4317  		if v_0.Op != OpConst16 {
  4318  			break
  4319  		}
  4320  		c := auxIntToInt16(v_0.AuxInt)
  4321  		if v_1.Op != OpConst16 {
  4322  			break
  4323  		}
  4324  		d := auxIntToInt16(v_1.AuxInt)
  4325  		if !(d != 0) {
  4326  			break
  4327  		}
  4328  		v.reset(OpConst16)
  4329  		v.AuxInt = int16ToAuxInt(int16(uint16(c) / uint16(d)))
  4330  		return true
  4331  	}
  4332  	// match: (Div16u n (Const16 [c]))
  4333  	// cond: isPowerOfTwo16(c)
  4334  	// result: (Rsh16Ux64 n (Const64 <typ.UInt64> [log16(c)]))
  4335  	for {
  4336  		n := v_0
  4337  		if v_1.Op != OpConst16 {
  4338  			break
  4339  		}
  4340  		c := auxIntToInt16(v_1.AuxInt)
  4341  		if !(isPowerOfTwo16(c)) {
  4342  			break
  4343  		}
  4344  		v.reset(OpRsh16Ux64)
  4345  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4346  		v0.AuxInt = int64ToAuxInt(log16(c))
  4347  		v.AddArg2(n, v0)
  4348  		return true
  4349  	}
  4350  	// match: (Div16u x (Const16 [c]))
  4351  	// cond: umagicOK16(c) && config.RegSize == 8
  4352  	// result: (Trunc64to16 (Rsh64Ux64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(1<<16+umagic16(c).m)]) (ZeroExt16to64 x)) (Const64 <typ.UInt64> [16+umagic16(c).s])))
  4353  	for {
  4354  		x := v_0
  4355  		if v_1.Op != OpConst16 {
  4356  			break
  4357  		}
  4358  		c := auxIntToInt16(v_1.AuxInt)
  4359  		if !(umagicOK16(c) && config.RegSize == 8) {
  4360  			break
  4361  		}
  4362  		v.reset(OpTrunc64to16)
  4363  		v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
  4364  		v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  4365  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4366  		v2.AuxInt = int64ToAuxInt(int64(1<<16 + umagic16(c).m))
  4367  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  4368  		v3.AddArg(x)
  4369  		v1.AddArg2(v2, v3)
  4370  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4371  		v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s)
  4372  		v0.AddArg2(v1, v4)
  4373  		v.AddArg(v0)
  4374  		return true
  4375  	}
  4376  	// match: (Div16u x (Const16 [c]))
  4377  	// cond: umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0
  4378  	// result: (Trunc32to16 (Rsh32Ux64 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<15+umagic16(c).m/2)]) (ZeroExt16to32 x)) (Const64 <typ.UInt64> [16+umagic16(c).s-1])))
  4379  	for {
  4380  		x := v_0
  4381  		if v_1.Op != OpConst16 {
  4382  			break
  4383  		}
  4384  		c := auxIntToInt16(v_1.AuxInt)
  4385  		if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) {
  4386  			break
  4387  		}
  4388  		v.reset(OpTrunc32to16)
  4389  		v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
  4390  		v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  4391  		v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4392  		v2.AuxInt = int32ToAuxInt(int32(1<<15 + umagic16(c).m/2))
  4393  		v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4394  		v3.AddArg(x)
  4395  		v1.AddArg2(v2, v3)
  4396  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4397  		v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
  4398  		v0.AddArg2(v1, v4)
  4399  		v.AddArg(v0)
  4400  		return true
  4401  	}
  4402  	// match: (Div16u x (Const16 [c]))
  4403  	// cond: umagicOK16(c) && config.RegSize == 4 && c&1 == 0
  4404  	// result: (Trunc32to16 (Rsh32Ux64 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<15+(umagic16(c).m+1)/2)]) (Rsh32Ux64 <typ.UInt32> (ZeroExt16to32 x) (Const64 <typ.UInt64> [1]))) (Const64 <typ.UInt64> [16+umagic16(c).s-2])))
  4405  	for {
  4406  		x := v_0
  4407  		if v_1.Op != OpConst16 {
  4408  			break
  4409  		}
  4410  		c := auxIntToInt16(v_1.AuxInt)
  4411  		if !(umagicOK16(c) && config.RegSize == 4 && c&1 == 0) {
  4412  			break
  4413  		}
  4414  		v.reset(OpTrunc32to16)
  4415  		v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
  4416  		v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  4417  		v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4418  		v2.AuxInt = int32ToAuxInt(int32(1<<15 + (umagic16(c).m+1)/2))
  4419  		v3 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
  4420  		v4 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4421  		v4.AddArg(x)
  4422  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4423  		v5.AuxInt = int64ToAuxInt(1)
  4424  		v3.AddArg2(v4, v5)
  4425  		v1.AddArg2(v2, v3)
  4426  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4427  		v6.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 2)
  4428  		v0.AddArg2(v1, v6)
  4429  		v.AddArg(v0)
  4430  		return true
  4431  	}
  4432  	// match: (Div16u x (Const16 [c]))
  4433  	// cond: umagicOK16(c) && config.RegSize == 4 && config.useAvg
  4434  	// result: (Trunc32to16 (Rsh32Ux64 <typ.UInt32> (Avg32u (Lsh32x64 <typ.UInt32> (ZeroExt16to32 x) (Const64 <typ.UInt64> [16])) (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(umagic16(c).m)]) (ZeroExt16to32 x))) (Const64 <typ.UInt64> [16+umagic16(c).s-1])))
  4435  	for {
  4436  		x := v_0
  4437  		if v_1.Op != OpConst16 {
  4438  			break
  4439  		}
  4440  		c := auxIntToInt16(v_1.AuxInt)
  4441  		if !(umagicOK16(c) && config.RegSize == 4 && config.useAvg) {
  4442  			break
  4443  		}
  4444  		v.reset(OpTrunc32to16)
  4445  		v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
  4446  		v1 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
  4447  		v2 := b.NewValue0(v.Pos, OpLsh32x64, typ.UInt32)
  4448  		v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4449  		v3.AddArg(x)
  4450  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4451  		v4.AuxInt = int64ToAuxInt(16)
  4452  		v2.AddArg2(v3, v4)
  4453  		v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  4454  		v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4455  		v6.AuxInt = int32ToAuxInt(int32(umagic16(c).m))
  4456  		v5.AddArg2(v6, v3)
  4457  		v1.AddArg2(v2, v5)
  4458  		v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4459  		v7.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
  4460  		v0.AddArg2(v1, v7)
  4461  		v.AddArg(v0)
  4462  		return true
  4463  	}
  4464  	return false
  4465  }
  4466  func rewriteValuegeneric_OpDiv32(v *Value) bool {
  4467  	v_1 := v.Args[1]
  4468  	v_0 := v.Args[0]
  4469  	b := v.Block
  4470  	config := b.Func.Config
  4471  	typ := &b.Func.Config.Types
  4472  	// match: (Div32 (Const32 [c]) (Const32 [d]))
  4473  	// cond: d != 0
  4474  	// result: (Const32 [c/d])
  4475  	for {
  4476  		if v_0.Op != OpConst32 {
  4477  			break
  4478  		}
  4479  		c := auxIntToInt32(v_0.AuxInt)
  4480  		if v_1.Op != OpConst32 {
  4481  			break
  4482  		}
  4483  		d := auxIntToInt32(v_1.AuxInt)
  4484  		if !(d != 0) {
  4485  			break
  4486  		}
  4487  		v.reset(OpConst32)
  4488  		v.AuxInt = int32ToAuxInt(c / d)
  4489  		return true
  4490  	}
  4491  	// match: (Div32 n (Const32 [c]))
  4492  	// cond: isNonNegative(n) && isPowerOfTwo32(c)
  4493  	// result: (Rsh32Ux64 n (Const64 <typ.UInt64> [log32(c)]))
  4494  	for {
  4495  		n := v_0
  4496  		if v_1.Op != OpConst32 {
  4497  			break
  4498  		}
  4499  		c := auxIntToInt32(v_1.AuxInt)
  4500  		if !(isNonNegative(n) && isPowerOfTwo32(c)) {
  4501  			break
  4502  		}
  4503  		v.reset(OpRsh32Ux64)
  4504  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4505  		v0.AuxInt = int64ToAuxInt(log32(c))
  4506  		v.AddArg2(n, v0)
  4507  		return true
  4508  	}
  4509  	// match: (Div32 <t> n (Const32 [c]))
  4510  	// cond: c < 0 && c != -1<<31
  4511  	// result: (Neg32 (Div32 <t> n (Const32 <t> [-c])))
  4512  	for {
  4513  		t := v.Type
  4514  		n := v_0
  4515  		if v_1.Op != OpConst32 {
  4516  			break
  4517  		}
  4518  		c := auxIntToInt32(v_1.AuxInt)
  4519  		if !(c < 0 && c != -1<<31) {
  4520  			break
  4521  		}
  4522  		v.reset(OpNeg32)
  4523  		v0 := b.NewValue0(v.Pos, OpDiv32, t)
  4524  		v1 := b.NewValue0(v.Pos, OpConst32, t)
  4525  		v1.AuxInt = int32ToAuxInt(-c)
  4526  		v0.AddArg2(n, v1)
  4527  		v.AddArg(v0)
  4528  		return true
  4529  	}
  4530  	// match: (Div32 <t> x (Const32 [-1<<31]))
  4531  	// result: (Rsh32Ux64 (And32 <t> x (Neg32 <t> x)) (Const64 <typ.UInt64> [31]))
  4532  	for {
  4533  		t := v.Type
  4534  		x := v_0
  4535  		if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1<<31 {
  4536  			break
  4537  		}
  4538  		v.reset(OpRsh32Ux64)
  4539  		v0 := b.NewValue0(v.Pos, OpAnd32, t)
  4540  		v1 := b.NewValue0(v.Pos, OpNeg32, t)
  4541  		v1.AddArg(x)
  4542  		v0.AddArg2(x, v1)
  4543  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4544  		v2.AuxInt = int64ToAuxInt(31)
  4545  		v.AddArg2(v0, v2)
  4546  		return true
  4547  	}
  4548  	// match: (Div32 <t> n (Const32 [c]))
  4549  	// cond: isPowerOfTwo32(c)
  4550  	// result: (Rsh32x64 (Add32 <t> n (Rsh32Ux64 <t> (Rsh32x64 <t> n (Const64 <typ.UInt64> [31])) (Const64 <typ.UInt64> [int64(32-log32(c))]))) (Const64 <typ.UInt64> [int64(log32(c))]))
  4551  	for {
  4552  		t := v.Type
  4553  		n := v_0
  4554  		if v_1.Op != OpConst32 {
  4555  			break
  4556  		}
  4557  		c := auxIntToInt32(v_1.AuxInt)
  4558  		if !(isPowerOfTwo32(c)) {
  4559  			break
  4560  		}
  4561  		v.reset(OpRsh32x64)
  4562  		v0 := b.NewValue0(v.Pos, OpAdd32, t)
  4563  		v1 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
  4564  		v2 := b.NewValue0(v.Pos, OpRsh32x64, t)
  4565  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4566  		v3.AuxInt = int64ToAuxInt(31)
  4567  		v2.AddArg2(n, v3)
  4568  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4569  		v4.AuxInt = int64ToAuxInt(int64(32 - log32(c)))
  4570  		v1.AddArg2(v2, v4)
  4571  		v0.AddArg2(n, v1)
  4572  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4573  		v5.AuxInt = int64ToAuxInt(int64(log32(c)))
  4574  		v.AddArg2(v0, v5)
  4575  		return true
  4576  	}
  4577  	// match: (Div32 <t> x (Const32 [c]))
  4578  	// cond: smagicOK32(c) && config.RegSize == 8
  4579  	// result: (Sub32 <t> (Rsh64x64 <t> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(smagic32(c).m)]) (SignExt32to64 x)) (Const64 <typ.UInt64> [32+smagic32(c).s])) (Rsh64x64 <t> (SignExt32to64 x) (Const64 <typ.UInt64> [63])))
  4580  	for {
  4581  		t := v.Type
  4582  		x := v_0
  4583  		if v_1.Op != OpConst32 {
  4584  			break
  4585  		}
  4586  		c := auxIntToInt32(v_1.AuxInt)
  4587  		if !(smagicOK32(c) && config.RegSize == 8) {
  4588  			break
  4589  		}
  4590  		v.reset(OpSub32)
  4591  		v.Type = t
  4592  		v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
  4593  		v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  4594  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4595  		v2.AuxInt = int64ToAuxInt(int64(smagic32(c).m))
  4596  		v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  4597  		v3.AddArg(x)
  4598  		v1.AddArg2(v2, v3)
  4599  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4600  		v4.AuxInt = int64ToAuxInt(32 + smagic32(c).s)
  4601  		v0.AddArg2(v1, v4)
  4602  		v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
  4603  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4604  		v6.AuxInt = int64ToAuxInt(63)
  4605  		v5.AddArg2(v3, v6)
  4606  		v.AddArg2(v0, v5)
  4607  		return true
  4608  	}
  4609  	// match: (Div32 <t> x (Const32 [c]))
  4610  	// cond: smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul
  4611  	// result: (Sub32 <t> (Rsh32x64 <t> (Hmul32 <t> (Const32 <typ.UInt32> [int32(smagic32(c).m/2)]) x) (Const64 <typ.UInt64> [smagic32(c).s-1])) (Rsh32x64 <t> x (Const64 <typ.UInt64> [31])))
  4612  	for {
  4613  		t := v.Type
  4614  		x := v_0
  4615  		if v_1.Op != OpConst32 {
  4616  			break
  4617  		}
  4618  		c := auxIntToInt32(v_1.AuxInt)
  4619  		if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul) {
  4620  			break
  4621  		}
  4622  		v.reset(OpSub32)
  4623  		v.Type = t
  4624  		v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
  4625  		v1 := b.NewValue0(v.Pos, OpHmul32, t)
  4626  		v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4627  		v2.AuxInt = int32ToAuxInt(int32(smagic32(c).m / 2))
  4628  		v1.AddArg2(v2, x)
  4629  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4630  		v3.AuxInt = int64ToAuxInt(smagic32(c).s - 1)
  4631  		v0.AddArg2(v1, v3)
  4632  		v4 := b.NewValue0(v.Pos, OpRsh32x64, t)
  4633  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4634  		v5.AuxInt = int64ToAuxInt(31)
  4635  		v4.AddArg2(x, v5)
  4636  		v.AddArg2(v0, v4)
  4637  		return true
  4638  	}
  4639  	// match: (Div32 <t> x (Const32 [c]))
  4640  	// cond: smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul
  4641  	// result: (Sub32 <t> (Rsh32x64 <t> (Add32 <t> (Hmul32 <t> (Const32 <typ.UInt32> [int32(smagic32(c).m)]) x) x) (Const64 <typ.UInt64> [smagic32(c).s])) (Rsh32x64 <t> x (Const64 <typ.UInt64> [31])))
  4642  	for {
  4643  		t := v.Type
  4644  		x := v_0
  4645  		if v_1.Op != OpConst32 {
  4646  			break
  4647  		}
  4648  		c := auxIntToInt32(v_1.AuxInt)
  4649  		if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul) {
  4650  			break
  4651  		}
  4652  		v.reset(OpSub32)
  4653  		v.Type = t
  4654  		v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
  4655  		v1 := b.NewValue0(v.Pos, OpAdd32, t)
  4656  		v2 := b.NewValue0(v.Pos, OpHmul32, t)
  4657  		v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4658  		v3.AuxInt = int32ToAuxInt(int32(smagic32(c).m))
  4659  		v2.AddArg2(v3, x)
  4660  		v1.AddArg2(v2, x)
  4661  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4662  		v4.AuxInt = int64ToAuxInt(smagic32(c).s)
  4663  		v0.AddArg2(v1, v4)
  4664  		v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
  4665  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4666  		v6.AuxInt = int64ToAuxInt(31)
  4667  		v5.AddArg2(x, v6)
  4668  		v.AddArg2(v0, v5)
  4669  		return true
  4670  	}
  4671  	return false
  4672  }
  4673  func rewriteValuegeneric_OpDiv32F(v *Value) bool {
  4674  	v_1 := v.Args[1]
  4675  	v_0 := v.Args[0]
  4676  	b := v.Block
  4677  	// match: (Div32F (Const32F [c]) (Const32F [d]))
  4678  	// cond: c/d == c/d
  4679  	// result: (Const32F [c/d])
  4680  	for {
  4681  		if v_0.Op != OpConst32F {
  4682  			break
  4683  		}
  4684  		c := auxIntToFloat32(v_0.AuxInt)
  4685  		if v_1.Op != OpConst32F {
  4686  			break
  4687  		}
  4688  		d := auxIntToFloat32(v_1.AuxInt)
  4689  		if !(c/d == c/d) {
  4690  			break
  4691  		}
  4692  		v.reset(OpConst32F)
  4693  		v.AuxInt = float32ToAuxInt(c / d)
  4694  		return true
  4695  	}
  4696  	// match: (Div32F x (Const32F <t> [c]))
  4697  	// cond: reciprocalExact32(c)
  4698  	// result: (Mul32F x (Const32F <t> [1/c]))
  4699  	for {
  4700  		x := v_0
  4701  		if v_1.Op != OpConst32F {
  4702  			break
  4703  		}
  4704  		t := v_1.Type
  4705  		c := auxIntToFloat32(v_1.AuxInt)
  4706  		if !(reciprocalExact32(c)) {
  4707  			break
  4708  		}
  4709  		v.reset(OpMul32F)
  4710  		v0 := b.NewValue0(v.Pos, OpConst32F, t)
  4711  		v0.AuxInt = float32ToAuxInt(1 / c)
  4712  		v.AddArg2(x, v0)
  4713  		return true
  4714  	}
  4715  	return false
  4716  }
  4717  func rewriteValuegeneric_OpDiv32u(v *Value) bool {
  4718  	v_1 := v.Args[1]
  4719  	v_0 := v.Args[0]
  4720  	b := v.Block
  4721  	config := b.Func.Config
  4722  	typ := &b.Func.Config.Types
  4723  	// match: (Div32u (Const32 [c]) (Const32 [d]))
  4724  	// cond: d != 0
  4725  	// result: (Const32 [int32(uint32(c)/uint32(d))])
  4726  	for {
  4727  		if v_0.Op != OpConst32 {
  4728  			break
  4729  		}
  4730  		c := auxIntToInt32(v_0.AuxInt)
  4731  		if v_1.Op != OpConst32 {
  4732  			break
  4733  		}
  4734  		d := auxIntToInt32(v_1.AuxInt)
  4735  		if !(d != 0) {
  4736  			break
  4737  		}
  4738  		v.reset(OpConst32)
  4739  		v.AuxInt = int32ToAuxInt(int32(uint32(c) / uint32(d)))
  4740  		return true
  4741  	}
  4742  	// match: (Div32u n (Const32 [c]))
  4743  	// cond: isPowerOfTwo32(c)
  4744  	// result: (Rsh32Ux64 n (Const64 <typ.UInt64> [log32(c)]))
  4745  	for {
  4746  		n := v_0
  4747  		if v_1.Op != OpConst32 {
  4748  			break
  4749  		}
  4750  		c := auxIntToInt32(v_1.AuxInt)
  4751  		if !(isPowerOfTwo32(c)) {
  4752  			break
  4753  		}
  4754  		v.reset(OpRsh32Ux64)
  4755  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4756  		v0.AuxInt = int64ToAuxInt(log32(c))
  4757  		v.AddArg2(n, v0)
  4758  		return true
  4759  	}
  4760  	// match: (Div32u x (Const32 [c]))
  4761  	// cond: umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul
  4762  	// result: (Rsh32Ux64 <typ.UInt32> (Hmul32u <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<31+umagic32(c).m/2)]) x) (Const64 <typ.UInt64> [umagic32(c).s-1]))
  4763  	for {
  4764  		x := v_0
  4765  		if v_1.Op != OpConst32 {
  4766  			break
  4767  		}
  4768  		c := auxIntToInt32(v_1.AuxInt)
  4769  		if !(umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul) {
  4770  			break
  4771  		}
  4772  		v.reset(OpRsh32Ux64)
  4773  		v.Type = typ.UInt32
  4774  		v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
  4775  		v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4776  		v1.AuxInt = int32ToAuxInt(int32(1<<31 + umagic32(c).m/2))
  4777  		v0.AddArg2(v1, x)
  4778  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4779  		v2.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
  4780  		v.AddArg2(v0, v2)
  4781  		return true
  4782  	}
  4783  	// match: (Div32u x (Const32 [c]))
  4784  	// cond: umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul
  4785  	// result: (Rsh32Ux64 <typ.UInt32> (Hmul32u <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<31+(umagic32(c).m+1)/2)]) (Rsh32Ux64 <typ.UInt32> x (Const64 <typ.UInt64> [1]))) (Const64 <typ.UInt64> [umagic32(c).s-2]))
  4786  	for {
  4787  		x := v_0
  4788  		if v_1.Op != OpConst32 {
  4789  			break
  4790  		}
  4791  		c := auxIntToInt32(v_1.AuxInt)
  4792  		if !(umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul) {
  4793  			break
  4794  		}
  4795  		v.reset(OpRsh32Ux64)
  4796  		v.Type = typ.UInt32
  4797  		v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
  4798  		v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4799  		v1.AuxInt = int32ToAuxInt(int32(1<<31 + (umagic32(c).m+1)/2))
  4800  		v2 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
  4801  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4802  		v3.AuxInt = int64ToAuxInt(1)
  4803  		v2.AddArg2(x, v3)
  4804  		v0.AddArg2(v1, v2)
  4805  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4806  		v4.AuxInt = int64ToAuxInt(umagic32(c).s - 2)
  4807  		v.AddArg2(v0, v4)
  4808  		return true
  4809  	}
  4810  	// match: (Div32u x (Const32 [c]))
  4811  	// cond: umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul
  4812  	// result: (Rsh32Ux64 <typ.UInt32> (Avg32u x (Hmul32u <typ.UInt32> (Const32 <typ.UInt32> [int32(umagic32(c).m)]) x)) (Const64 <typ.UInt64> [umagic32(c).s-1]))
  4813  	for {
  4814  		x := v_0
  4815  		if v_1.Op != OpConst32 {
  4816  			break
  4817  		}
  4818  		c := auxIntToInt32(v_1.AuxInt)
  4819  		if !(umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul) {
  4820  			break
  4821  		}
  4822  		v.reset(OpRsh32Ux64)
  4823  		v.Type = typ.UInt32
  4824  		v0 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
  4825  		v1 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
  4826  		v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  4827  		v2.AuxInt = int32ToAuxInt(int32(umagic32(c).m))
  4828  		v1.AddArg2(v2, x)
  4829  		v0.AddArg2(x, v1)
  4830  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4831  		v3.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
  4832  		v.AddArg2(v0, v3)
  4833  		return true
  4834  	}
  4835  	// match: (Div32u x (Const32 [c]))
  4836  	// cond: umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0
  4837  	// result: (Trunc64to32 (Rsh64Ux64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(1<<31+umagic32(c).m/2)]) (ZeroExt32to64 x)) (Const64 <typ.UInt64> [32+umagic32(c).s-1])))
  4838  	for {
  4839  		x := v_0
  4840  		if v_1.Op != OpConst32 {
  4841  			break
  4842  		}
  4843  		c := auxIntToInt32(v_1.AuxInt)
  4844  		if !(umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0) {
  4845  			break
  4846  		}
  4847  		v.reset(OpTrunc64to32)
  4848  		v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
  4849  		v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  4850  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4851  		v2.AuxInt = int64ToAuxInt(int64(1<<31 + umagic32(c).m/2))
  4852  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4853  		v3.AddArg(x)
  4854  		v1.AddArg2(v2, v3)
  4855  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4856  		v4.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
  4857  		v0.AddArg2(v1, v4)
  4858  		v.AddArg(v0)
  4859  		return true
  4860  	}
  4861  	// match: (Div32u x (Const32 [c]))
  4862  	// cond: umagicOK32(c) && config.RegSize == 8 && c&1 == 0
  4863  	// result: (Trunc64to32 (Rsh64Ux64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(1<<31+(umagic32(c).m+1)/2)]) (Rsh64Ux64 <typ.UInt64> (ZeroExt32to64 x) (Const64 <typ.UInt64> [1]))) (Const64 <typ.UInt64> [32+umagic32(c).s-2])))
  4864  	for {
  4865  		x := v_0
  4866  		if v_1.Op != OpConst32 {
  4867  			break
  4868  		}
  4869  		c := auxIntToInt32(v_1.AuxInt)
  4870  		if !(umagicOK32(c) && config.RegSize == 8 && c&1 == 0) {
  4871  			break
  4872  		}
  4873  		v.reset(OpTrunc64to32)
  4874  		v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
  4875  		v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  4876  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4877  		v2.AuxInt = int64ToAuxInt(int64(1<<31 + (umagic32(c).m+1)/2))
  4878  		v3 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
  4879  		v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4880  		v4.AddArg(x)
  4881  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4882  		v5.AuxInt = int64ToAuxInt(1)
  4883  		v3.AddArg2(v4, v5)
  4884  		v1.AddArg2(v2, v3)
  4885  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4886  		v6.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 2)
  4887  		v0.AddArg2(v1, v6)
  4888  		v.AddArg(v0)
  4889  		return true
  4890  	}
  4891  	// match: (Div32u x (Const32 [c]))
  4892  	// cond: umagicOK32(c) && config.RegSize == 8 && config.useAvg
  4893  	// result: (Trunc64to32 (Rsh64Ux64 <typ.UInt64> (Avg64u (Lsh64x64 <typ.UInt64> (ZeroExt32to64 x) (Const64 <typ.UInt64> [32])) (Mul64 <typ.UInt64> (Const64 <typ.UInt32> [int64(umagic32(c).m)]) (ZeroExt32to64 x))) (Const64 <typ.UInt64> [32+umagic32(c).s-1])))
  4894  	for {
  4895  		x := v_0
  4896  		if v_1.Op != OpConst32 {
  4897  			break
  4898  		}
  4899  		c := auxIntToInt32(v_1.AuxInt)
  4900  		if !(umagicOK32(c) && config.RegSize == 8 && config.useAvg) {
  4901  			break
  4902  		}
  4903  		v.reset(OpTrunc64to32)
  4904  		v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
  4905  		v1 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
  4906  		v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
  4907  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4908  		v3.AddArg(x)
  4909  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4910  		v4.AuxInt = int64ToAuxInt(32)
  4911  		v2.AddArg2(v3, v4)
  4912  		v5 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  4913  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt32)
  4914  		v6.AuxInt = int64ToAuxInt(int64(umagic32(c).m))
  4915  		v5.AddArg2(v6, v3)
  4916  		v1.AddArg2(v2, v5)
  4917  		v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4918  		v7.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
  4919  		v0.AddArg2(v1, v7)
  4920  		v.AddArg(v0)
  4921  		return true
  4922  	}
  4923  	return false
  4924  }
  4925  func rewriteValuegeneric_OpDiv64(v *Value) bool {
  4926  	v_1 := v.Args[1]
  4927  	v_0 := v.Args[0]
  4928  	b := v.Block
  4929  	config := b.Func.Config
  4930  	typ := &b.Func.Config.Types
  4931  	// match: (Div64 (Const64 [c]) (Const64 [d]))
  4932  	// cond: d != 0
  4933  	// result: (Const64 [c/d])
  4934  	for {
  4935  		if v_0.Op != OpConst64 {
  4936  			break
  4937  		}
  4938  		c := auxIntToInt64(v_0.AuxInt)
  4939  		if v_1.Op != OpConst64 {
  4940  			break
  4941  		}
  4942  		d := auxIntToInt64(v_1.AuxInt)
  4943  		if !(d != 0) {
  4944  			break
  4945  		}
  4946  		v.reset(OpConst64)
  4947  		v.AuxInt = int64ToAuxInt(c / d)
  4948  		return true
  4949  	}
  4950  	// match: (Div64 n (Const64 [c]))
  4951  	// cond: isNonNegative(n) && isPowerOfTwo64(c)
  4952  	// result: (Rsh64Ux64 n (Const64 <typ.UInt64> [log64(c)]))
  4953  	for {
  4954  		n := v_0
  4955  		if v_1.Op != OpConst64 {
  4956  			break
  4957  		}
  4958  		c := auxIntToInt64(v_1.AuxInt)
  4959  		if !(isNonNegative(n) && isPowerOfTwo64(c)) {
  4960  			break
  4961  		}
  4962  		v.reset(OpRsh64Ux64)
  4963  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  4964  		v0.AuxInt = int64ToAuxInt(log64(c))
  4965  		v.AddArg2(n, v0)
  4966  		return true
  4967  	}
  4968  	// match: (Div64 n (Const64 [-1<<63]))
  4969  	// cond: isNonNegative(n)
  4970  	// result: (Const64 [0])
  4971  	for {
  4972  		n := v_0
  4973  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
  4974  			break
  4975  		}
  4976  		v.reset(OpConst64)
  4977  		v.AuxInt = int64ToAuxInt(0)
  4978  		return true
  4979  	}
  4980  	// match: (Div64 <t> n (Const64 [c]))
  4981  	// cond: c < 0 && c != -1<<63
  4982  	// result: (Neg64 (Div64 <t> n (Const64 <t> [-c])))
  4983  	for {
  4984  		t := v.Type
  4985  		n := v_0
  4986  		if v_1.Op != OpConst64 {
  4987  			break
  4988  		}
  4989  		c := auxIntToInt64(v_1.AuxInt)
  4990  		if !(c < 0 && c != -1<<63) {
  4991  			break
  4992  		}
  4993  		v.reset(OpNeg64)
  4994  		v0 := b.NewValue0(v.Pos, OpDiv64, t)
  4995  		v1 := b.NewValue0(v.Pos, OpConst64, t)
  4996  		v1.AuxInt = int64ToAuxInt(-c)
  4997  		v0.AddArg2(n, v1)
  4998  		v.AddArg(v0)
  4999  		return true
  5000  	}
  5001  	// match: (Div64 <t> x (Const64 [-1<<63]))
  5002  	// result: (Rsh64Ux64 (And64 <t> x (Neg64 <t> x)) (Const64 <typ.UInt64> [63]))
  5003  	for {
  5004  		t := v.Type
  5005  		x := v_0
  5006  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
  5007  			break
  5008  		}
  5009  		v.reset(OpRsh64Ux64)
  5010  		v0 := b.NewValue0(v.Pos, OpAnd64, t)
  5011  		v1 := b.NewValue0(v.Pos, OpNeg64, t)
  5012  		v1.AddArg(x)
  5013  		v0.AddArg2(x, v1)
  5014  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5015  		v2.AuxInt = int64ToAuxInt(63)
  5016  		v.AddArg2(v0, v2)
  5017  		return true
  5018  	}
  5019  	// match: (Div64 <t> n (Const64 [c]))
  5020  	// cond: isPowerOfTwo64(c)
  5021  	// result: (Rsh64x64 (Add64 <t> n (Rsh64Ux64 <t> (Rsh64x64 <t> n (Const64 <typ.UInt64> [63])) (Const64 <typ.UInt64> [int64(64-log64(c))]))) (Const64 <typ.UInt64> [int64(log64(c))]))
  5022  	for {
  5023  		t := v.Type
  5024  		n := v_0
  5025  		if v_1.Op != OpConst64 {
  5026  			break
  5027  		}
  5028  		c := auxIntToInt64(v_1.AuxInt)
  5029  		if !(isPowerOfTwo64(c)) {
  5030  			break
  5031  		}
  5032  		v.reset(OpRsh64x64)
  5033  		v0 := b.NewValue0(v.Pos, OpAdd64, t)
  5034  		v1 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
  5035  		v2 := b.NewValue0(v.Pos, OpRsh64x64, t)
  5036  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5037  		v3.AuxInt = int64ToAuxInt(63)
  5038  		v2.AddArg2(n, v3)
  5039  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5040  		v4.AuxInt = int64ToAuxInt(int64(64 - log64(c)))
  5041  		v1.AddArg2(v2, v4)
  5042  		v0.AddArg2(n, v1)
  5043  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5044  		v5.AuxInt = int64ToAuxInt(int64(log64(c)))
  5045  		v.AddArg2(v0, v5)
  5046  		return true
  5047  	}
  5048  	// match: (Div64 <t> x (Const64 [c]))
  5049  	// cond: smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul
  5050  	// result: (Sub64 <t> (Rsh64x64 <t> (Hmul64 <t> (Const64 <typ.UInt64> [int64(smagic64(c).m/2)]) x) (Const64 <typ.UInt64> [smagic64(c).s-1])) (Rsh64x64 <t> x (Const64 <typ.UInt64> [63])))
  5051  	for {
  5052  		t := v.Type
  5053  		x := v_0
  5054  		if v_1.Op != OpConst64 {
  5055  			break
  5056  		}
  5057  		c := auxIntToInt64(v_1.AuxInt)
  5058  		if !(smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul) {
  5059  			break
  5060  		}
  5061  		v.reset(OpSub64)
  5062  		v.Type = t
  5063  		v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
  5064  		v1 := b.NewValue0(v.Pos, OpHmul64, t)
  5065  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5066  		v2.AuxInt = int64ToAuxInt(int64(smagic64(c).m / 2))
  5067  		v1.AddArg2(v2, x)
  5068  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5069  		v3.AuxInt = int64ToAuxInt(smagic64(c).s - 1)
  5070  		v0.AddArg2(v1, v3)
  5071  		v4 := b.NewValue0(v.Pos, OpRsh64x64, t)
  5072  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5073  		v5.AuxInt = int64ToAuxInt(63)
  5074  		v4.AddArg2(x, v5)
  5075  		v.AddArg2(v0, v4)
  5076  		return true
  5077  	}
  5078  	// match: (Div64 <t> x (Const64 [c]))
  5079  	// cond: smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul
  5080  	// result: (Sub64 <t> (Rsh64x64 <t> (Add64 <t> (Hmul64 <t> (Const64 <typ.UInt64> [int64(smagic64(c).m)]) x) x) (Const64 <typ.UInt64> [smagic64(c).s])) (Rsh64x64 <t> x (Const64 <typ.UInt64> [63])))
  5081  	for {
  5082  		t := v.Type
  5083  		x := v_0
  5084  		if v_1.Op != OpConst64 {
  5085  			break
  5086  		}
  5087  		c := auxIntToInt64(v_1.AuxInt)
  5088  		if !(smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul) {
  5089  			break
  5090  		}
  5091  		v.reset(OpSub64)
  5092  		v.Type = t
  5093  		v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
  5094  		v1 := b.NewValue0(v.Pos, OpAdd64, t)
  5095  		v2 := b.NewValue0(v.Pos, OpHmul64, t)
  5096  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5097  		v3.AuxInt = int64ToAuxInt(int64(smagic64(c).m))
  5098  		v2.AddArg2(v3, x)
  5099  		v1.AddArg2(v2, x)
  5100  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5101  		v4.AuxInt = int64ToAuxInt(smagic64(c).s)
  5102  		v0.AddArg2(v1, v4)
  5103  		v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
  5104  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5105  		v6.AuxInt = int64ToAuxInt(63)
  5106  		v5.AddArg2(x, v6)
  5107  		v.AddArg2(v0, v5)
  5108  		return true
  5109  	}
  5110  	return false
  5111  }
  5112  func rewriteValuegeneric_OpDiv64F(v *Value) bool {
  5113  	v_1 := v.Args[1]
  5114  	v_0 := v.Args[0]
  5115  	b := v.Block
  5116  	// match: (Div64F (Const64F [c]) (Const64F [d]))
  5117  	// cond: c/d == c/d
  5118  	// result: (Const64F [c/d])
  5119  	for {
  5120  		if v_0.Op != OpConst64F {
  5121  			break
  5122  		}
  5123  		c := auxIntToFloat64(v_0.AuxInt)
  5124  		if v_1.Op != OpConst64F {
  5125  			break
  5126  		}
  5127  		d := auxIntToFloat64(v_1.AuxInt)
  5128  		if !(c/d == c/d) {
  5129  			break
  5130  		}
  5131  		v.reset(OpConst64F)
  5132  		v.AuxInt = float64ToAuxInt(c / d)
  5133  		return true
  5134  	}
  5135  	// match: (Div64F x (Const64F <t> [c]))
  5136  	// cond: reciprocalExact64(c)
  5137  	// result: (Mul64F x (Const64F <t> [1/c]))
  5138  	for {
  5139  		x := v_0
  5140  		if v_1.Op != OpConst64F {
  5141  			break
  5142  		}
  5143  		t := v_1.Type
  5144  		c := auxIntToFloat64(v_1.AuxInt)
  5145  		if !(reciprocalExact64(c)) {
  5146  			break
  5147  		}
  5148  		v.reset(OpMul64F)
  5149  		v0 := b.NewValue0(v.Pos, OpConst64F, t)
  5150  		v0.AuxInt = float64ToAuxInt(1 / c)
  5151  		v.AddArg2(x, v0)
  5152  		return true
  5153  	}
  5154  	return false
  5155  }
  5156  func rewriteValuegeneric_OpDiv64u(v *Value) bool {
  5157  	v_1 := v.Args[1]
  5158  	v_0 := v.Args[0]
  5159  	b := v.Block
  5160  	config := b.Func.Config
  5161  	typ := &b.Func.Config.Types
  5162  	// match: (Div64u (Const64 [c]) (Const64 [d]))
  5163  	// cond: d != 0
  5164  	// result: (Const64 [int64(uint64(c)/uint64(d))])
  5165  	for {
  5166  		if v_0.Op != OpConst64 {
  5167  			break
  5168  		}
  5169  		c := auxIntToInt64(v_0.AuxInt)
  5170  		if v_1.Op != OpConst64 {
  5171  			break
  5172  		}
  5173  		d := auxIntToInt64(v_1.AuxInt)
  5174  		if !(d != 0) {
  5175  			break
  5176  		}
  5177  		v.reset(OpConst64)
  5178  		v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
  5179  		return true
  5180  	}
  5181  	// match: (Div64u n (Const64 [c]))
  5182  	// cond: isPowerOfTwo64(c)
  5183  	// result: (Rsh64Ux64 n (Const64 <typ.UInt64> [log64(c)]))
  5184  	for {
  5185  		n := v_0
  5186  		if v_1.Op != OpConst64 {
  5187  			break
  5188  		}
  5189  		c := auxIntToInt64(v_1.AuxInt)
  5190  		if !(isPowerOfTwo64(c)) {
  5191  			break
  5192  		}
  5193  		v.reset(OpRsh64Ux64)
  5194  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5195  		v0.AuxInt = int64ToAuxInt(log64(c))
  5196  		v.AddArg2(n, v0)
  5197  		return true
  5198  	}
  5199  	// match: (Div64u n (Const64 [-1<<63]))
  5200  	// result: (Rsh64Ux64 n (Const64 <typ.UInt64> [63]))
  5201  	for {
  5202  		n := v_0
  5203  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
  5204  			break
  5205  		}
  5206  		v.reset(OpRsh64Ux64)
  5207  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5208  		v0.AuxInt = int64ToAuxInt(63)
  5209  		v.AddArg2(n, v0)
  5210  		return true
  5211  	}
  5212  	// match: (Div64u x (Const64 [c]))
  5213  	// cond: c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul
  5214  	// result: (Add64 (Add64 <typ.UInt64> (Add64 <typ.UInt64> (Lsh64x64 <typ.UInt64> (ZeroExt32to64 (Div32u <typ.UInt32> (Trunc64to32 <typ.UInt32> (Rsh64Ux64 <typ.UInt64> x (Const64 <typ.UInt64> [32]))) (Const32 <typ.UInt32> [int32(c)]))) (Const64 <typ.UInt64> [32])) (ZeroExt32to64 (Div32u <typ.UInt32> (Trunc64to32 <typ.UInt32> x) (Const32 <typ.UInt32> [int32(c)])))) (Mul64 <typ.UInt64> (ZeroExt32to64 <typ.UInt64> (Mod32u <typ.UInt32> (Trunc64to32 <typ.UInt32> (Rsh64Ux64 <typ.UInt64> x (Const64 <typ.UInt64> [32]))) (Const32 <typ.UInt32> [int32(c)]))) (Const64 <typ.UInt64> [int64((1<<32)/c)]))) (ZeroExt32to64 (Div32u <typ.UInt32> (Add32 <typ.UInt32> (Mod32u <typ.UInt32> (Trunc64to32 <typ.UInt32> x) (Const32 <typ.UInt32> [int32(c)])) (Mul32 <typ.UInt32> (Mod32u <typ.UInt32> (Trunc64to32 <typ.UInt32> (Rsh64Ux64 <typ.UInt64> x (Const64 <typ.UInt64> [32]))) (Const32 <typ.UInt32> [int32(c)])) (Const32 <typ.UInt32> [int32((1<<32)%c)]))) (Const32 <typ.UInt32> [int32(c)]))))
  5215  	for {
  5216  		x := v_0
  5217  		if v_1.Op != OpConst64 {
  5218  			break
  5219  		}
  5220  		c := auxIntToInt64(v_1.AuxInt)
  5221  		if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) {
  5222  			break
  5223  		}
  5224  		v.reset(OpAdd64)
  5225  		v0 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
  5226  		v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
  5227  		v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
  5228  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  5229  		v4 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
  5230  		v5 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
  5231  		v6 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
  5232  		v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5233  		v7.AuxInt = int64ToAuxInt(32)
  5234  		v6.AddArg2(x, v7)
  5235  		v5.AddArg(v6)
  5236  		v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  5237  		v8.AuxInt = int32ToAuxInt(int32(c))
  5238  		v4.AddArg2(v5, v8)
  5239  		v3.AddArg(v4)
  5240  		v2.AddArg2(v3, v7)
  5241  		v9 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  5242  		v10 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
  5243  		v11 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
  5244  		v11.AddArg(x)
  5245  		v10.AddArg2(v11, v8)
  5246  		v9.AddArg(v10)
  5247  		v1.AddArg2(v2, v9)
  5248  		v12 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  5249  		v13 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  5250  		v14 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
  5251  		v14.AddArg2(v5, v8)
  5252  		v13.AddArg(v14)
  5253  		v15 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5254  		v15.AuxInt = int64ToAuxInt(int64((1 << 32) / c))
  5255  		v12.AddArg2(v13, v15)
  5256  		v0.AddArg2(v1, v12)
  5257  		v16 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  5258  		v17 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
  5259  		v18 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
  5260  		v19 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
  5261  		v19.AddArg2(v11, v8)
  5262  		v20 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  5263  		v21 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  5264  		v21.AuxInt = int32ToAuxInt(int32((1 << 32) % c))
  5265  		v20.AddArg2(v14, v21)
  5266  		v18.AddArg2(v19, v20)
  5267  		v17.AddArg2(v18, v8)
  5268  		v16.AddArg(v17)
  5269  		v.AddArg2(v0, v16)
  5270  		return true
  5271  	}
  5272  	// match: (Div64u x (Const64 [c]))
  5273  	// cond: umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul
  5274  	// result: (Rsh64Ux64 <typ.UInt64> (Hmul64u <typ.UInt64> (Const64 <typ.UInt64> [int64(1<<63+umagic64(c).m/2)]) x) (Const64 <typ.UInt64> [umagic64(c).s-1]))
  5275  	for {
  5276  		x := v_0
  5277  		if v_1.Op != OpConst64 {
  5278  			break
  5279  		}
  5280  		c := auxIntToInt64(v_1.AuxInt)
  5281  		if !(umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul) {
  5282  			break
  5283  		}
  5284  		v.reset(OpRsh64Ux64)
  5285  		v.Type = typ.UInt64
  5286  		v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
  5287  		v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5288  		v1.AuxInt = int64ToAuxInt(int64(1<<63 + umagic64(c).m/2))
  5289  		v0.AddArg2(v1, x)
  5290  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5291  		v2.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
  5292  		v.AddArg2(v0, v2)
  5293  		return true
  5294  	}
  5295  	// match: (Div64u x (Const64 [c]))
  5296  	// cond: umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul
  5297  	// result: (Rsh64Ux64 <typ.UInt64> (Hmul64u <typ.UInt64> (Const64 <typ.UInt64> [int64(1<<63+(umagic64(c).m+1)/2)]) (Rsh64Ux64 <typ.UInt64> x (Const64 <typ.UInt64> [1]))) (Const64 <typ.UInt64> [umagic64(c).s-2]))
  5298  	for {
  5299  		x := v_0
  5300  		if v_1.Op != OpConst64 {
  5301  			break
  5302  		}
  5303  		c := auxIntToInt64(v_1.AuxInt)
  5304  		if !(umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul) {
  5305  			break
  5306  		}
  5307  		v.reset(OpRsh64Ux64)
  5308  		v.Type = typ.UInt64
  5309  		v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
  5310  		v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5311  		v1.AuxInt = int64ToAuxInt(int64(1<<63 + (umagic64(c).m+1)/2))
  5312  		v2 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
  5313  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5314  		v3.AuxInt = int64ToAuxInt(1)
  5315  		v2.AddArg2(x, v3)
  5316  		v0.AddArg2(v1, v2)
  5317  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5318  		v4.AuxInt = int64ToAuxInt(umagic64(c).s - 2)
  5319  		v.AddArg2(v0, v4)
  5320  		return true
  5321  	}
  5322  	// match: (Div64u x (Const64 [c]))
  5323  	// cond: umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul
  5324  	// result: (Rsh64Ux64 <typ.UInt64> (Avg64u x (Hmul64u <typ.UInt64> (Const64 <typ.UInt64> [int64(umagic64(c).m)]) x)) (Const64 <typ.UInt64> [umagic64(c).s-1]))
  5325  	for {
  5326  		x := v_0
  5327  		if v_1.Op != OpConst64 {
  5328  			break
  5329  		}
  5330  		c := auxIntToInt64(v_1.AuxInt)
  5331  		if !(umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul) {
  5332  			break
  5333  		}
  5334  		v.reset(OpRsh64Ux64)
  5335  		v.Type = typ.UInt64
  5336  		v0 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
  5337  		v1 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
  5338  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5339  		v2.AuxInt = int64ToAuxInt(int64(umagic64(c).m))
  5340  		v1.AddArg2(v2, x)
  5341  		v0.AddArg2(x, v1)
  5342  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5343  		v3.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
  5344  		v.AddArg2(v0, v3)
  5345  		return true
  5346  	}
  5347  	return false
  5348  }
  5349  func rewriteValuegeneric_OpDiv8(v *Value) bool {
  5350  	v_1 := v.Args[1]
  5351  	v_0 := v.Args[0]
  5352  	b := v.Block
  5353  	typ := &b.Func.Config.Types
  5354  	// match: (Div8 (Const8 [c]) (Const8 [d]))
  5355  	// cond: d != 0
  5356  	// result: (Const8 [c/d])
  5357  	for {
  5358  		if v_0.Op != OpConst8 {
  5359  			break
  5360  		}
  5361  		c := auxIntToInt8(v_0.AuxInt)
  5362  		if v_1.Op != OpConst8 {
  5363  			break
  5364  		}
  5365  		d := auxIntToInt8(v_1.AuxInt)
  5366  		if !(d != 0) {
  5367  			break
  5368  		}
  5369  		v.reset(OpConst8)
  5370  		v.AuxInt = int8ToAuxInt(c / d)
  5371  		return true
  5372  	}
  5373  	// match: (Div8 n (Const8 [c]))
  5374  	// cond: isNonNegative(n) && isPowerOfTwo8(c)
  5375  	// result: (Rsh8Ux64 n (Const64 <typ.UInt64> [log8(c)]))
  5376  	for {
  5377  		n := v_0
  5378  		if v_1.Op != OpConst8 {
  5379  			break
  5380  		}
  5381  		c := auxIntToInt8(v_1.AuxInt)
  5382  		if !(isNonNegative(n) && isPowerOfTwo8(c)) {
  5383  			break
  5384  		}
  5385  		v.reset(OpRsh8Ux64)
  5386  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5387  		v0.AuxInt = int64ToAuxInt(log8(c))
  5388  		v.AddArg2(n, v0)
  5389  		return true
  5390  	}
  5391  	// match: (Div8 <t> n (Const8 [c]))
  5392  	// cond: c < 0 && c != -1<<7
  5393  	// result: (Neg8 (Div8 <t> n (Const8 <t> [-c])))
  5394  	for {
  5395  		t := v.Type
  5396  		n := v_0
  5397  		if v_1.Op != OpConst8 {
  5398  			break
  5399  		}
  5400  		c := auxIntToInt8(v_1.AuxInt)
  5401  		if !(c < 0 && c != -1<<7) {
  5402  			break
  5403  		}
  5404  		v.reset(OpNeg8)
  5405  		v0 := b.NewValue0(v.Pos, OpDiv8, t)
  5406  		v1 := b.NewValue0(v.Pos, OpConst8, t)
  5407  		v1.AuxInt = int8ToAuxInt(-c)
  5408  		v0.AddArg2(n, v1)
  5409  		v.AddArg(v0)
  5410  		return true
  5411  	}
  5412  	// match: (Div8 <t> x (Const8 [-1<<7 ]))
  5413  	// result: (Rsh8Ux64 (And8 <t> x (Neg8 <t> x)) (Const64 <typ.UInt64> [7 ]))
  5414  	for {
  5415  		t := v.Type
  5416  		x := v_0
  5417  		if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1<<7 {
  5418  			break
  5419  		}
  5420  		v.reset(OpRsh8Ux64)
  5421  		v0 := b.NewValue0(v.Pos, OpAnd8, t)
  5422  		v1 := b.NewValue0(v.Pos, OpNeg8, t)
  5423  		v1.AddArg(x)
  5424  		v0.AddArg2(x, v1)
  5425  		v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5426  		v2.AuxInt = int64ToAuxInt(7)
  5427  		v.AddArg2(v0, v2)
  5428  		return true
  5429  	}
  5430  	// match: (Div8 <t> n (Const8 [c]))
  5431  	// cond: isPowerOfTwo8(c)
  5432  	// result: (Rsh8x64 (Add8 <t> n (Rsh8Ux64 <t> (Rsh8x64 <t> n (Const64 <typ.UInt64> [ 7])) (Const64 <typ.UInt64> [int64( 8-log8(c))]))) (Const64 <typ.UInt64> [int64(log8(c))]))
  5433  	for {
  5434  		t := v.Type
  5435  		n := v_0
  5436  		if v_1.Op != OpConst8 {
  5437  			break
  5438  		}
  5439  		c := auxIntToInt8(v_1.AuxInt)
  5440  		if !(isPowerOfTwo8(c)) {
  5441  			break
  5442  		}
  5443  		v.reset(OpRsh8x64)
  5444  		v0 := b.NewValue0(v.Pos, OpAdd8, t)
  5445  		v1 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
  5446  		v2 := b.NewValue0(v.Pos, OpRsh8x64, t)
  5447  		v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5448  		v3.AuxInt = int64ToAuxInt(7)
  5449  		v2.AddArg2(n, v3)
  5450  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5451  		v4.AuxInt = int64ToAuxInt(int64(8 - log8(c)))
  5452  		v1.AddArg2(v2, v4)
  5453  		v0.AddArg2(n, v1)
  5454  		v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5455  		v5.AuxInt = int64ToAuxInt(int64(log8(c)))
  5456  		v.AddArg2(v0, v5)
  5457  		return true
  5458  	}
  5459  	// match: (Div8 <t> x (Const8 [c]))
  5460  	// cond: smagicOK8(c)
  5461  	// result: (Sub8 <t> (Rsh32x64 <t> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(smagic8(c).m)]) (SignExt8to32 x)) (Const64 <typ.UInt64> [8+smagic8(c).s])) (Rsh32x64 <t> (SignExt8to32 x) (Const64 <typ.UInt64> [31])))
  5462  	for {
  5463  		t := v.Type
  5464  		x := v_0
  5465  		if v_1.Op != OpConst8 {
  5466  			break
  5467  		}
  5468  		c := auxIntToInt8(v_1.AuxInt)
  5469  		if !(smagicOK8(c)) {
  5470  			break
  5471  		}
  5472  		v.reset(OpSub8)
  5473  		v.Type = t
  5474  		v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
  5475  		v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  5476  		v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  5477  		v2.AuxInt = int32ToAuxInt(int32(smagic8(c).m))
  5478  		v3 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  5479  		v3.AddArg(x)
  5480  		v1.AddArg2(v2, v3)
  5481  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5482  		v4.AuxInt = int64ToAuxInt(8 + smagic8(c).s)
  5483  		v0.AddArg2(v1, v4)
  5484  		v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
  5485  		v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5486  		v6.AuxInt = int64ToAuxInt(31)
  5487  		v5.AddArg2(v3, v6)
  5488  		v.AddArg2(v0, v5)
  5489  		return true
  5490  	}
  5491  	return false
  5492  }
  5493  func rewriteValuegeneric_OpDiv8u(v *Value) bool {
  5494  	v_1 := v.Args[1]
  5495  	v_0 := v.Args[0]
  5496  	b := v.Block
  5497  	typ := &b.Func.Config.Types
  5498  	// match: (Div8u (Const8 [c]) (Const8 [d]))
  5499  	// cond: d != 0
  5500  	// result: (Const8 [int8(uint8(c)/uint8(d))])
  5501  	for {
  5502  		if v_0.Op != OpConst8 {
  5503  			break
  5504  		}
  5505  		c := auxIntToInt8(v_0.AuxInt)
  5506  		if v_1.Op != OpConst8 {
  5507  			break
  5508  		}
  5509  		d := auxIntToInt8(v_1.AuxInt)
  5510  		if !(d != 0) {
  5511  			break
  5512  		}
  5513  		v.reset(OpConst8)
  5514  		v.AuxInt = int8ToAuxInt(int8(uint8(c) / uint8(d)))
  5515  		return true
  5516  	}
  5517  	// match: (Div8u n (Const8 [c]))
  5518  	// cond: isPowerOfTwo8(c)
  5519  	// result: (Rsh8Ux64 n (Const64 <typ.UInt64> [log8(c)]))
  5520  	for {
  5521  		n := v_0
  5522  		if v_1.Op != OpConst8 {
  5523  			break
  5524  		}
  5525  		c := auxIntToInt8(v_1.AuxInt)
  5526  		if !(isPowerOfTwo8(c)) {
  5527  			break
  5528  		}
  5529  		v.reset(OpRsh8Ux64)
  5530  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5531  		v0.AuxInt = int64ToAuxInt(log8(c))
  5532  		v.AddArg2(n, v0)
  5533  		return true
  5534  	}
  5535  	// match: (Div8u x (Const8 [c]))
  5536  	// cond: umagicOK8(c)
  5537  	// result: (Trunc32to8 (Rsh32Ux64 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(1<<8+umagic8(c).m)]) (ZeroExt8to32 x)) (Const64 <typ.UInt64> [8+umagic8(c).s])))
  5538  	for {
  5539  		x := v_0
  5540  		if v_1.Op != OpConst8 {
  5541  			break
  5542  		}
  5543  		c := auxIntToInt8(v_1.AuxInt)
  5544  		if !(umagicOK8(c)) {
  5545  			break
  5546  		}
  5547  		v.reset(OpTrunc32to8)
  5548  		v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
  5549  		v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  5550  		v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  5551  		v2.AuxInt = int32ToAuxInt(int32(1<<8 + umagic8(c).m))
  5552  		v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  5553  		v3.AddArg(x)
  5554  		v1.AddArg2(v2, v3)
  5555  		v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  5556  		v4.AuxInt = int64ToAuxInt(8 + umagic8(c).s)
  5557  		v0.AddArg2(v1, v4)
  5558  		v.AddArg(v0)
  5559  		return true
  5560  	}
  5561  	return false
  5562  }
  5563  func rewriteValuegeneric_OpEq16(v *Value) bool {
  5564  	v_1 := v.Args[1]
  5565  	v_0 := v.Args[0]
  5566  	b := v.Block
  5567  	config := b.Func.Config
  5568  	typ := &b.Func.Config.Types
  5569  	// match: (Eq16 x x)
  5570  	// result: (ConstBool [true])
  5571  	for {
  5572  		x := v_0
  5573  		if x != v_1 {
  5574  			break
  5575  		}
  5576  		v.reset(OpConstBool)
  5577  		v.AuxInt = boolToAuxInt(true)
  5578  		return true
  5579  	}
  5580  	// match: (Eq16 (Const16 <t> [c]) (Add16 (Const16 <t> [d]) x))
  5581  	// result: (Eq16 (Const16 <t> [c-d]) x)
  5582  	for {
  5583  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5584  			if v_0.Op != OpConst16 {
  5585  				continue
  5586  			}
  5587  			t := v_0.Type
  5588  			c := auxIntToInt16(v_0.AuxInt)
  5589  			if v_1.Op != OpAdd16 {
  5590  				continue
  5591  			}
  5592  			_ = v_1.Args[1]
  5593  			v_1_0 := v_1.Args[0]
  5594  			v_1_1 := v_1.Args[1]
  5595  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  5596  				if v_1_0.Op != OpConst16 || v_1_0.Type != t {
  5597  					continue
  5598  				}
  5599  				d := auxIntToInt16(v_1_0.AuxInt)
  5600  				x := v_1_1
  5601  				v.reset(OpEq16)
  5602  				v0 := b.NewValue0(v.Pos, OpConst16, t)
  5603  				v0.AuxInt = int16ToAuxInt(c - d)
  5604  				v.AddArg2(v0, x)
  5605  				return true
  5606  			}
  5607  		}
  5608  		break
  5609  	}
  5610  	// match: (Eq16 (Const16 [c]) (Const16 [d]))
  5611  	// result: (ConstBool [c == d])
  5612  	for {
  5613  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5614  			if v_0.Op != OpConst16 {
  5615  				continue
  5616  			}
  5617  			c := auxIntToInt16(v_0.AuxInt)
  5618  			if v_1.Op != OpConst16 {
  5619  				continue
  5620  			}
  5621  			d := auxIntToInt16(v_1.AuxInt)
  5622  			v.reset(OpConstBool)
  5623  			v.AuxInt = boolToAuxInt(c == d)
  5624  			return true
  5625  		}
  5626  		break
  5627  	}
  5628  	// match: (Eq16 (Mod16u x (Const16 [c])) (Const16 [0]))
  5629  	// cond: x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)
  5630  	// result: (Eq32 (Mod32u <typ.UInt32> (ZeroExt16to32 <typ.UInt32> x) (Const32 <typ.UInt32> [int32(uint16(c))])) (Const32 <typ.UInt32> [0]))
  5631  	for {
  5632  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5633  			if v_0.Op != OpMod16u {
  5634  				continue
  5635  			}
  5636  			_ = v_0.Args[1]
  5637  			x := v_0.Args[0]
  5638  			v_0_1 := v_0.Args[1]
  5639  			if v_0_1.Op != OpConst16 {
  5640  				continue
  5641  			}
  5642  			c := auxIntToInt16(v_0_1.AuxInt)
  5643  			if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)) {
  5644  				continue
  5645  			}
  5646  			v.reset(OpEq32)
  5647  			v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
  5648  			v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  5649  			v1.AddArg(x)
  5650  			v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  5651  			v2.AuxInt = int32ToAuxInt(int32(uint16(c)))
  5652  			v0.AddArg2(v1, v2)
  5653  			v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  5654  			v3.AuxInt = int32ToAuxInt(0)
  5655  			v.AddArg2(v0, v3)
  5656  			return true
  5657  		}
  5658  		break
  5659  	}
  5660  	// match: (Eq16 (Mod16 x (Const16 [c])) (Const16 [0]))
  5661  	// cond: x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)
  5662  	// result: (Eq32 (Mod32 <typ.Int32> (SignExt16to32 <typ.Int32> x) (Const32 <typ.Int32> [int32(c)])) (Const32 <typ.Int32> [0]))
  5663  	for {
  5664  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5665  			if v_0.Op != OpMod16 {
  5666  				continue
  5667  			}
  5668  			_ = v_0.Args[1]
  5669  			x := v_0.Args[0]
  5670  			v_0_1 := v_0.Args[1]
  5671  			if v_0_1.Op != OpConst16 {
  5672  				continue
  5673  			}
  5674  			c := auxIntToInt16(v_0_1.AuxInt)
  5675  			if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)) {
  5676  				continue
  5677  			}
  5678  			v.reset(OpEq32)
  5679  			v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
  5680  			v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  5681  			v1.AddArg(x)
  5682  			v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
  5683  			v2.AuxInt = int32ToAuxInt(int32(c))
  5684  			v0.AddArg2(v1, v2)
  5685  			v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
  5686  			v3.AuxInt = int32ToAuxInt(0)
  5687  			v.AddArg2(v0, v3)
  5688  			return true
  5689  		}
  5690  		break
  5691  	}
  5692  	// match: (Eq16 x (Mul16 (Const16 [c]) (Trunc64to16 (Rsh64Ux64 mul:(Mul64 (Const64 [m]) (ZeroExt16to64 x)) (Const64 [s]))) ) )
  5693  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<16+umagic16(c).m) && s == 16+umagic16(c).s && x.Op != OpConst16 && udivisibleOK16(c)
  5694  	// result: (Leq16U (RotateLeft16 <typ.UInt16> (Mul16 <typ.UInt16> (Const16 <typ.UInt16> [int16(udivisible16(c).m)]) x) (Const16 <typ.UInt16> [int16(16-udivisible16(c).k)]) ) (Const16 <typ.UInt16> [int16(udivisible16(c).max)]) )
  5695  	for {
  5696  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5697  			x := v_0
  5698  			if v_1.Op != OpMul16 {
  5699  				continue
  5700  			}
  5701  			_ = v_1.Args[1]
  5702  			v_1_0 := v_1.Args[0]
  5703  			v_1_1 := v_1.Args[1]
  5704  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  5705  				if v_1_0.Op != OpConst16 {
  5706  					continue
  5707  				}
  5708  				c := auxIntToInt16(v_1_0.AuxInt)
  5709  				if v_1_1.Op != OpTrunc64to16 {
  5710  					continue
  5711  				}
  5712  				v_1_1_0 := v_1_1.Args[0]
  5713  				if v_1_1_0.Op != OpRsh64Ux64 {
  5714  					continue
  5715  				}
  5716  				_ = v_1_1_0.Args[1]
  5717  				mul := v_1_1_0.Args[0]
  5718  				if mul.Op != OpMul64 {
  5719  					continue
  5720  				}
  5721  				_ = mul.Args[1]
  5722  				mul_0 := mul.Args[0]
  5723  				mul_1 := mul.Args[1]
  5724  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  5725  					if mul_0.Op != OpConst64 {
  5726  						continue
  5727  					}
  5728  					m := auxIntToInt64(mul_0.AuxInt)
  5729  					if mul_1.Op != OpZeroExt16to64 || x != mul_1.Args[0] {
  5730  						continue
  5731  					}
  5732  					v_1_1_0_1 := v_1_1_0.Args[1]
  5733  					if v_1_1_0_1.Op != OpConst64 {
  5734  						continue
  5735  					}
  5736  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  5737  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<16+umagic16(c).m) && s == 16+umagic16(c).s && x.Op != OpConst16 && udivisibleOK16(c)) {
  5738  						continue
  5739  					}
  5740  					v.reset(OpLeq16U)
  5741  					v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
  5742  					v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
  5743  					v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5744  					v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
  5745  					v1.AddArg2(v2, x)
  5746  					v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5747  					v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
  5748  					v0.AddArg2(v1, v3)
  5749  					v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5750  					v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
  5751  					v.AddArg2(v0, v4)
  5752  					return true
  5753  				}
  5754  			}
  5755  		}
  5756  		break
  5757  	}
  5758  	// match: (Eq16 x (Mul16 (Const16 [c]) (Trunc32to16 (Rsh32Ux64 mul:(Mul32 (Const32 [m]) (ZeroExt16to32 x)) (Const64 [s]))) ) )
  5759  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<15+umagic16(c).m/2) && s == 16+umagic16(c).s-1 && x.Op != OpConst16 && udivisibleOK16(c)
  5760  	// result: (Leq16U (RotateLeft16 <typ.UInt16> (Mul16 <typ.UInt16> (Const16 <typ.UInt16> [int16(udivisible16(c).m)]) x) (Const16 <typ.UInt16> [int16(16-udivisible16(c).k)]) ) (Const16 <typ.UInt16> [int16(udivisible16(c).max)]) )
  5761  	for {
  5762  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5763  			x := v_0
  5764  			if v_1.Op != OpMul16 {
  5765  				continue
  5766  			}
  5767  			_ = v_1.Args[1]
  5768  			v_1_0 := v_1.Args[0]
  5769  			v_1_1 := v_1.Args[1]
  5770  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  5771  				if v_1_0.Op != OpConst16 {
  5772  					continue
  5773  				}
  5774  				c := auxIntToInt16(v_1_0.AuxInt)
  5775  				if v_1_1.Op != OpTrunc32to16 {
  5776  					continue
  5777  				}
  5778  				v_1_1_0 := v_1_1.Args[0]
  5779  				if v_1_1_0.Op != OpRsh32Ux64 {
  5780  					continue
  5781  				}
  5782  				_ = v_1_1_0.Args[1]
  5783  				mul := v_1_1_0.Args[0]
  5784  				if mul.Op != OpMul32 {
  5785  					continue
  5786  				}
  5787  				_ = mul.Args[1]
  5788  				mul_0 := mul.Args[0]
  5789  				mul_1 := mul.Args[1]
  5790  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  5791  					if mul_0.Op != OpConst32 {
  5792  						continue
  5793  					}
  5794  					m := auxIntToInt32(mul_0.AuxInt)
  5795  					if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
  5796  						continue
  5797  					}
  5798  					v_1_1_0_1 := v_1_1_0.Args[1]
  5799  					if v_1_1_0_1.Op != OpConst64 {
  5800  						continue
  5801  					}
  5802  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  5803  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<15+umagic16(c).m/2) && s == 16+umagic16(c).s-1 && x.Op != OpConst16 && udivisibleOK16(c)) {
  5804  						continue
  5805  					}
  5806  					v.reset(OpLeq16U)
  5807  					v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
  5808  					v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
  5809  					v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5810  					v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
  5811  					v1.AddArg2(v2, x)
  5812  					v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5813  					v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
  5814  					v0.AddArg2(v1, v3)
  5815  					v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5816  					v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
  5817  					v.AddArg2(v0, v4)
  5818  					return true
  5819  				}
  5820  			}
  5821  		}
  5822  		break
  5823  	}
  5824  	// match: (Eq16 x (Mul16 (Const16 [c]) (Trunc32to16 (Rsh32Ux64 mul:(Mul32 (Const32 [m]) (Rsh32Ux64 (ZeroExt16to32 x) (Const64 [1]))) (Const64 [s]))) ) )
  5825  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<15+(umagic16(c).m+1)/2) && s == 16+umagic16(c).s-2 && x.Op != OpConst16 && udivisibleOK16(c)
  5826  	// result: (Leq16U (RotateLeft16 <typ.UInt16> (Mul16 <typ.UInt16> (Const16 <typ.UInt16> [int16(udivisible16(c).m)]) x) (Const16 <typ.UInt16> [int16(16-udivisible16(c).k)]) ) (Const16 <typ.UInt16> [int16(udivisible16(c).max)]) )
  5827  	for {
  5828  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5829  			x := v_0
  5830  			if v_1.Op != OpMul16 {
  5831  				continue
  5832  			}
  5833  			_ = v_1.Args[1]
  5834  			v_1_0 := v_1.Args[0]
  5835  			v_1_1 := v_1.Args[1]
  5836  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  5837  				if v_1_0.Op != OpConst16 {
  5838  					continue
  5839  				}
  5840  				c := auxIntToInt16(v_1_0.AuxInt)
  5841  				if v_1_1.Op != OpTrunc32to16 {
  5842  					continue
  5843  				}
  5844  				v_1_1_0 := v_1_1.Args[0]
  5845  				if v_1_1_0.Op != OpRsh32Ux64 {
  5846  					continue
  5847  				}
  5848  				_ = v_1_1_0.Args[1]
  5849  				mul := v_1_1_0.Args[0]
  5850  				if mul.Op != OpMul32 {
  5851  					continue
  5852  				}
  5853  				_ = mul.Args[1]
  5854  				mul_0 := mul.Args[0]
  5855  				mul_1 := mul.Args[1]
  5856  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  5857  					if mul_0.Op != OpConst32 {
  5858  						continue
  5859  					}
  5860  					m := auxIntToInt32(mul_0.AuxInt)
  5861  					if mul_1.Op != OpRsh32Ux64 {
  5862  						continue
  5863  					}
  5864  					_ = mul_1.Args[1]
  5865  					mul_1_0 := mul_1.Args[0]
  5866  					if mul_1_0.Op != OpZeroExt16to32 || x != mul_1_0.Args[0] {
  5867  						continue
  5868  					}
  5869  					mul_1_1 := mul_1.Args[1]
  5870  					if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
  5871  						continue
  5872  					}
  5873  					v_1_1_0_1 := v_1_1_0.Args[1]
  5874  					if v_1_1_0_1.Op != OpConst64 {
  5875  						continue
  5876  					}
  5877  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  5878  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<15+(umagic16(c).m+1)/2) && s == 16+umagic16(c).s-2 && x.Op != OpConst16 && udivisibleOK16(c)) {
  5879  						continue
  5880  					}
  5881  					v.reset(OpLeq16U)
  5882  					v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
  5883  					v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
  5884  					v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5885  					v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
  5886  					v1.AddArg2(v2, x)
  5887  					v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5888  					v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
  5889  					v0.AddArg2(v1, v3)
  5890  					v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5891  					v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
  5892  					v.AddArg2(v0, v4)
  5893  					return true
  5894  				}
  5895  			}
  5896  		}
  5897  		break
  5898  	}
  5899  	// match: (Eq16 x (Mul16 (Const16 [c]) (Trunc32to16 (Rsh32Ux64 (Avg32u (Lsh32x64 (ZeroExt16to32 x) (Const64 [16])) mul:(Mul32 (Const32 [m]) (ZeroExt16to32 x))) (Const64 [s]))) ) )
  5900  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(umagic16(c).m) && s == 16+umagic16(c).s-1 && x.Op != OpConst16 && udivisibleOK16(c)
  5901  	// result: (Leq16U (RotateLeft16 <typ.UInt16> (Mul16 <typ.UInt16> (Const16 <typ.UInt16> [int16(udivisible16(c).m)]) x) (Const16 <typ.UInt16> [int16(16-udivisible16(c).k)]) ) (Const16 <typ.UInt16> [int16(udivisible16(c).max)]) )
  5902  	for {
  5903  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5904  			x := v_0
  5905  			if v_1.Op != OpMul16 {
  5906  				continue
  5907  			}
  5908  			_ = v_1.Args[1]
  5909  			v_1_0 := v_1.Args[0]
  5910  			v_1_1 := v_1.Args[1]
  5911  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  5912  				if v_1_0.Op != OpConst16 {
  5913  					continue
  5914  				}
  5915  				c := auxIntToInt16(v_1_0.AuxInt)
  5916  				if v_1_1.Op != OpTrunc32to16 {
  5917  					continue
  5918  				}
  5919  				v_1_1_0 := v_1_1.Args[0]
  5920  				if v_1_1_0.Op != OpRsh32Ux64 {
  5921  					continue
  5922  				}
  5923  				_ = v_1_1_0.Args[1]
  5924  				v_1_1_0_0 := v_1_1_0.Args[0]
  5925  				if v_1_1_0_0.Op != OpAvg32u {
  5926  					continue
  5927  				}
  5928  				_ = v_1_1_0_0.Args[1]
  5929  				v_1_1_0_0_0 := v_1_1_0_0.Args[0]
  5930  				if v_1_1_0_0_0.Op != OpLsh32x64 {
  5931  					continue
  5932  				}
  5933  				_ = v_1_1_0_0_0.Args[1]
  5934  				v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
  5935  				if v_1_1_0_0_0_0.Op != OpZeroExt16to32 || x != v_1_1_0_0_0_0.Args[0] {
  5936  					continue
  5937  				}
  5938  				v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
  5939  				if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 16 {
  5940  					continue
  5941  				}
  5942  				mul := v_1_1_0_0.Args[1]
  5943  				if mul.Op != OpMul32 {
  5944  					continue
  5945  				}
  5946  				_ = mul.Args[1]
  5947  				mul_0 := mul.Args[0]
  5948  				mul_1 := mul.Args[1]
  5949  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  5950  					if mul_0.Op != OpConst32 {
  5951  						continue
  5952  					}
  5953  					m := auxIntToInt32(mul_0.AuxInt)
  5954  					if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
  5955  						continue
  5956  					}
  5957  					v_1_1_0_1 := v_1_1_0.Args[1]
  5958  					if v_1_1_0_1.Op != OpConst64 {
  5959  						continue
  5960  					}
  5961  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  5962  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(umagic16(c).m) && s == 16+umagic16(c).s-1 && x.Op != OpConst16 && udivisibleOK16(c)) {
  5963  						continue
  5964  					}
  5965  					v.reset(OpLeq16U)
  5966  					v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
  5967  					v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
  5968  					v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5969  					v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
  5970  					v1.AddArg2(v2, x)
  5971  					v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5972  					v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
  5973  					v0.AddArg2(v1, v3)
  5974  					v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  5975  					v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
  5976  					v.AddArg2(v0, v4)
  5977  					return true
  5978  				}
  5979  			}
  5980  		}
  5981  		break
  5982  	}
  5983  	// match: (Eq16 x (Mul16 (Const16 [c]) (Sub16 (Rsh32x64 mul:(Mul32 (Const32 [m]) (SignExt16to32 x)) (Const64 [s])) (Rsh32x64 (SignExt16to32 x) (Const64 [31]))) ) )
  5984  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic16(c).m) && s == 16+smagic16(c).s && x.Op != OpConst16 && sdivisibleOK16(c)
  5985  	// result: (Leq16U (RotateLeft16 <typ.UInt16> (Add16 <typ.UInt16> (Mul16 <typ.UInt16> (Const16 <typ.UInt16> [int16(sdivisible16(c).m)]) x) (Const16 <typ.UInt16> [int16(sdivisible16(c).a)]) ) (Const16 <typ.UInt16> [int16(16-sdivisible16(c).k)]) ) (Const16 <typ.UInt16> [int16(sdivisible16(c).max)]) )
  5986  	for {
  5987  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5988  			x := v_0
  5989  			if v_1.Op != OpMul16 {
  5990  				continue
  5991  			}
  5992  			_ = v_1.Args[1]
  5993  			v_1_0 := v_1.Args[0]
  5994  			v_1_1 := v_1.Args[1]
  5995  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  5996  				if v_1_0.Op != OpConst16 {
  5997  					continue
  5998  				}
  5999  				c := auxIntToInt16(v_1_0.AuxInt)
  6000  				if v_1_1.Op != OpSub16 {
  6001  					continue
  6002  				}
  6003  				_ = v_1_1.Args[1]
  6004  				v_1_1_0 := v_1_1.Args[0]
  6005  				if v_1_1_0.Op != OpRsh32x64 {
  6006  					continue
  6007  				}
  6008  				_ = v_1_1_0.Args[1]
  6009  				mul := v_1_1_0.Args[0]
  6010  				if mul.Op != OpMul32 {
  6011  					continue
  6012  				}
  6013  				_ = mul.Args[1]
  6014  				mul_0 := mul.Args[0]
  6015  				mul_1 := mul.Args[1]
  6016  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6017  					if mul_0.Op != OpConst32 {
  6018  						continue
  6019  					}
  6020  					m := auxIntToInt32(mul_0.AuxInt)
  6021  					if mul_1.Op != OpSignExt16to32 || x != mul_1.Args[0] {
  6022  						continue
  6023  					}
  6024  					v_1_1_0_1 := v_1_1_0.Args[1]
  6025  					if v_1_1_0_1.Op != OpConst64 {
  6026  						continue
  6027  					}
  6028  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  6029  					v_1_1_1 := v_1_1.Args[1]
  6030  					if v_1_1_1.Op != OpRsh32x64 {
  6031  						continue
  6032  					}
  6033  					_ = v_1_1_1.Args[1]
  6034  					v_1_1_1_0 := v_1_1_1.Args[0]
  6035  					if v_1_1_1_0.Op != OpSignExt16to32 || x != v_1_1_1_0.Args[0] {
  6036  						continue
  6037  					}
  6038  					v_1_1_1_1 := v_1_1_1.Args[1]
  6039  					if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic16(c).m) && s == 16+smagic16(c).s && x.Op != OpConst16 && sdivisibleOK16(c)) {
  6040  						continue
  6041  					}
  6042  					v.reset(OpLeq16U)
  6043  					v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
  6044  					v1 := b.NewValue0(v.Pos, OpAdd16, typ.UInt16)
  6045  					v2 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
  6046  					v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  6047  					v3.AuxInt = int16ToAuxInt(int16(sdivisible16(c).m))
  6048  					v2.AddArg2(v3, x)
  6049  					v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  6050  					v4.AuxInt = int16ToAuxInt(int16(sdivisible16(c).a))
  6051  					v1.AddArg2(v2, v4)
  6052  					v5 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  6053  					v5.AuxInt = int16ToAuxInt(int16(16 - sdivisible16(c).k))
  6054  					v0.AddArg2(v1, v5)
  6055  					v6 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
  6056  					v6.AuxInt = int16ToAuxInt(int16(sdivisible16(c).max))
  6057  					v.AddArg2(v0, v6)
  6058  					return true
  6059  				}
  6060  			}
  6061  		}
  6062  		break
  6063  	}
  6064  	// match: (Eq16 n (Lsh16x64 (Rsh16x64 (Add16 <t> n (Rsh16Ux64 <t> (Rsh16x64 <t> n (Const64 <typ.UInt64> [15])) (Const64 <typ.UInt64> [kbar]))) (Const64 <typ.UInt64> [k])) (Const64 <typ.UInt64> [k])) )
  6065  	// cond: k > 0 && k < 15 && kbar == 16 - k
  6066  	// result: (Eq16 (And16 <t> n (Const16 <t> [1<<uint(k)-1])) (Const16 <t> [0]))
  6067  	for {
  6068  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6069  			n := v_0
  6070  			if v_1.Op != OpLsh16x64 {
  6071  				continue
  6072  			}
  6073  			_ = v_1.Args[1]
  6074  			v_1_0 := v_1.Args[0]
  6075  			if v_1_0.Op != OpRsh16x64 {
  6076  				continue
  6077  			}
  6078  			_ = v_1_0.Args[1]
  6079  			v_1_0_0 := v_1_0.Args[0]
  6080  			if v_1_0_0.Op != OpAdd16 {
  6081  				continue
  6082  			}
  6083  			t := v_1_0_0.Type
  6084  			_ = v_1_0_0.Args[1]
  6085  			v_1_0_0_0 := v_1_0_0.Args[0]
  6086  			v_1_0_0_1 := v_1_0_0.Args[1]
  6087  			for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
  6088  				if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
  6089  					continue
  6090  				}
  6091  				_ = v_1_0_0_1.Args[1]
  6092  				v_1_0_0_1_0 := v_1_0_0_1.Args[0]
  6093  				if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
  6094  					continue
  6095  				}
  6096  				_ = v_1_0_0_1_0.Args[1]
  6097  				if n != v_1_0_0_1_0.Args[0] {
  6098  					continue
  6099  				}
  6100  				v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
  6101  				if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 15 {
  6102  					continue
  6103  				}
  6104  				v_1_0_0_1_1 := v_1_0_0_1.Args[1]
  6105  				if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
  6106  					continue
  6107  				}
  6108  				kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
  6109  				v_1_0_1 := v_1_0.Args[1]
  6110  				if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
  6111  					continue
  6112  				}
  6113  				k := auxIntToInt64(v_1_0_1.AuxInt)
  6114  				v_1_1 := v_1.Args[1]
  6115  				if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 15 && kbar == 16-k) {
  6116  					continue
  6117  				}
  6118  				v.reset(OpEq16)
  6119  				v0 := b.NewValue0(v.Pos, OpAnd16, t)
  6120  				v1 := b.NewValue0(v.Pos, OpConst16, t)
  6121  				v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
  6122  				v0.AddArg2(n, v1)
  6123  				v2 := b.NewValue0(v.Pos, OpConst16, t)
  6124  				v2.AuxInt = int16ToAuxInt(0)
  6125  				v.AddArg2(v0, v2)
  6126  				return true
  6127  			}
  6128  		}
  6129  		break
  6130  	}
  6131  	// match: (Eq16 s:(Sub16 x y) (Const16 [0]))
  6132  	// cond: s.Uses == 1
  6133  	// result: (Eq16 x y)
  6134  	for {
  6135  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6136  			s := v_0
  6137  			if s.Op != OpSub16 {
  6138  				continue
  6139  			}
  6140  			y := s.Args[1]
  6141  			x := s.Args[0]
  6142  			if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
  6143  				continue
  6144  			}
  6145  			v.reset(OpEq16)
  6146  			v.AddArg2(x, y)
  6147  			return true
  6148  		}
  6149  		break
  6150  	}
  6151  	// match: (Eq16 (And16 <t> x (Const16 <t> [y])) (Const16 <t> [y]))
  6152  	// cond: oneBit16(y)
  6153  	// result: (Neq16 (And16 <t> x (Const16 <t> [y])) (Const16 <t> [0]))
  6154  	for {
  6155  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6156  			if v_0.Op != OpAnd16 {
  6157  				continue
  6158  			}
  6159  			t := v_0.Type
  6160  			_ = v_0.Args[1]
  6161  			v_0_0 := v_0.Args[0]
  6162  			v_0_1 := v_0.Args[1]
  6163  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  6164  				x := v_0_0
  6165  				if v_0_1.Op != OpConst16 || v_0_1.Type != t {
  6166  					continue
  6167  				}
  6168  				y := auxIntToInt16(v_0_1.AuxInt)
  6169  				if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
  6170  					continue
  6171  				}
  6172  				v.reset(OpNeq16)
  6173  				v0 := b.NewValue0(v.Pos, OpAnd16, t)
  6174  				v1 := b.NewValue0(v.Pos, OpConst16, t)
  6175  				v1.AuxInt = int16ToAuxInt(y)
  6176  				v0.AddArg2(x, v1)
  6177  				v2 := b.NewValue0(v.Pos, OpConst16, t)
  6178  				v2.AuxInt = int16ToAuxInt(0)
  6179  				v.AddArg2(v0, v2)
  6180  				return true
  6181  			}
  6182  		}
  6183  		break
  6184  	}
  6185  	return false
  6186  }
  6187  func rewriteValuegeneric_OpEq32(v *Value) bool {
  6188  	v_1 := v.Args[1]
  6189  	v_0 := v.Args[0]
  6190  	b := v.Block
  6191  	typ := &b.Func.Config.Types
  6192  	// match: (Eq32 x x)
  6193  	// result: (ConstBool [true])
  6194  	for {
  6195  		x := v_0
  6196  		if x != v_1 {
  6197  			break
  6198  		}
  6199  		v.reset(OpConstBool)
  6200  		v.AuxInt = boolToAuxInt(true)
  6201  		return true
  6202  	}
  6203  	// match: (Eq32 (Const32 <t> [c]) (Add32 (Const32 <t> [d]) x))
  6204  	// result: (Eq32 (Const32 <t> [c-d]) x)
  6205  	for {
  6206  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6207  			if v_0.Op != OpConst32 {
  6208  				continue
  6209  			}
  6210  			t := v_0.Type
  6211  			c := auxIntToInt32(v_0.AuxInt)
  6212  			if v_1.Op != OpAdd32 {
  6213  				continue
  6214  			}
  6215  			_ = v_1.Args[1]
  6216  			v_1_0 := v_1.Args[0]
  6217  			v_1_1 := v_1.Args[1]
  6218  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6219  				if v_1_0.Op != OpConst32 || v_1_0.Type != t {
  6220  					continue
  6221  				}
  6222  				d := auxIntToInt32(v_1_0.AuxInt)
  6223  				x := v_1_1
  6224  				v.reset(OpEq32)
  6225  				v0 := b.NewValue0(v.Pos, OpConst32, t)
  6226  				v0.AuxInt = int32ToAuxInt(c - d)
  6227  				v.AddArg2(v0, x)
  6228  				return true
  6229  			}
  6230  		}
  6231  		break
  6232  	}
  6233  	// match: (Eq32 (Const32 [c]) (Const32 [d]))
  6234  	// result: (ConstBool [c == d])
  6235  	for {
  6236  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6237  			if v_0.Op != OpConst32 {
  6238  				continue
  6239  			}
  6240  			c := auxIntToInt32(v_0.AuxInt)
  6241  			if v_1.Op != OpConst32 {
  6242  				continue
  6243  			}
  6244  			d := auxIntToInt32(v_1.AuxInt)
  6245  			v.reset(OpConstBool)
  6246  			v.AuxInt = boolToAuxInt(c == d)
  6247  			return true
  6248  		}
  6249  		break
  6250  	}
  6251  	// match: (Eq32 x (Mul32 (Const32 [c]) (Rsh32Ux64 mul:(Hmul32u (Const32 [m]) x) (Const64 [s])) ) )
  6252  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<31+umagic32(c).m/2) && s == umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)
  6253  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(udivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(32-udivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(udivisible32(c).max)]) )
  6254  	for {
  6255  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6256  			x := v_0
  6257  			if v_1.Op != OpMul32 {
  6258  				continue
  6259  			}
  6260  			_ = v_1.Args[1]
  6261  			v_1_0 := v_1.Args[0]
  6262  			v_1_1 := v_1.Args[1]
  6263  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6264  				if v_1_0.Op != OpConst32 {
  6265  					continue
  6266  				}
  6267  				c := auxIntToInt32(v_1_0.AuxInt)
  6268  				if v_1_1.Op != OpRsh32Ux64 {
  6269  					continue
  6270  				}
  6271  				_ = v_1_1.Args[1]
  6272  				mul := v_1_1.Args[0]
  6273  				if mul.Op != OpHmul32u {
  6274  					continue
  6275  				}
  6276  				_ = mul.Args[1]
  6277  				mul_0 := mul.Args[0]
  6278  				mul_1 := mul.Args[1]
  6279  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6280  					if mul_0.Op != OpConst32 {
  6281  						continue
  6282  					}
  6283  					m := auxIntToInt32(mul_0.AuxInt)
  6284  					if x != mul_1 {
  6285  						continue
  6286  					}
  6287  					v_1_1_1 := v_1_1.Args[1]
  6288  					if v_1_1_1.Op != OpConst64 {
  6289  						continue
  6290  					}
  6291  					s := auxIntToInt64(v_1_1_1.AuxInt)
  6292  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<31+umagic32(c).m/2) && s == umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
  6293  						continue
  6294  					}
  6295  					v.reset(OpLeq32U)
  6296  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6297  					v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6298  					v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6299  					v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
  6300  					v1.AddArg2(v2, x)
  6301  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6302  					v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
  6303  					v0.AddArg2(v1, v3)
  6304  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6305  					v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
  6306  					v.AddArg2(v0, v4)
  6307  					return true
  6308  				}
  6309  			}
  6310  		}
  6311  		break
  6312  	}
  6313  	// match: (Eq32 x (Mul32 (Const32 [c]) (Rsh32Ux64 mul:(Hmul32u (Const32 <typ.UInt32> [m]) (Rsh32Ux64 x (Const64 [1]))) (Const64 [s])) ) )
  6314  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<31+(umagic32(c).m+1)/2) && s == umagic32(c).s-2 && x.Op != OpConst32 && udivisibleOK32(c)
  6315  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(udivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(32-udivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(udivisible32(c).max)]) )
  6316  	for {
  6317  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6318  			x := v_0
  6319  			if v_1.Op != OpMul32 {
  6320  				continue
  6321  			}
  6322  			_ = v_1.Args[1]
  6323  			v_1_0 := v_1.Args[0]
  6324  			v_1_1 := v_1.Args[1]
  6325  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6326  				if v_1_0.Op != OpConst32 {
  6327  					continue
  6328  				}
  6329  				c := auxIntToInt32(v_1_0.AuxInt)
  6330  				if v_1_1.Op != OpRsh32Ux64 {
  6331  					continue
  6332  				}
  6333  				_ = v_1_1.Args[1]
  6334  				mul := v_1_1.Args[0]
  6335  				if mul.Op != OpHmul32u {
  6336  					continue
  6337  				}
  6338  				_ = mul.Args[1]
  6339  				mul_0 := mul.Args[0]
  6340  				mul_1 := mul.Args[1]
  6341  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6342  					if mul_0.Op != OpConst32 || mul_0.Type != typ.UInt32 {
  6343  						continue
  6344  					}
  6345  					m := auxIntToInt32(mul_0.AuxInt)
  6346  					if mul_1.Op != OpRsh32Ux64 {
  6347  						continue
  6348  					}
  6349  					_ = mul_1.Args[1]
  6350  					if x != mul_1.Args[0] {
  6351  						continue
  6352  					}
  6353  					mul_1_1 := mul_1.Args[1]
  6354  					if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
  6355  						continue
  6356  					}
  6357  					v_1_1_1 := v_1_1.Args[1]
  6358  					if v_1_1_1.Op != OpConst64 {
  6359  						continue
  6360  					}
  6361  					s := auxIntToInt64(v_1_1_1.AuxInt)
  6362  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<31+(umagic32(c).m+1)/2) && s == umagic32(c).s-2 && x.Op != OpConst32 && udivisibleOK32(c)) {
  6363  						continue
  6364  					}
  6365  					v.reset(OpLeq32U)
  6366  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6367  					v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6368  					v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6369  					v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
  6370  					v1.AddArg2(v2, x)
  6371  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6372  					v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
  6373  					v0.AddArg2(v1, v3)
  6374  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6375  					v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
  6376  					v.AddArg2(v0, v4)
  6377  					return true
  6378  				}
  6379  			}
  6380  		}
  6381  		break
  6382  	}
  6383  	// match: (Eq32 x (Mul32 (Const32 [c]) (Rsh32Ux64 (Avg32u x mul:(Hmul32u (Const32 [m]) x)) (Const64 [s])) ) )
  6384  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(umagic32(c).m) && s == umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)
  6385  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(udivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(32-udivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(udivisible32(c).max)]) )
  6386  	for {
  6387  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6388  			x := v_0
  6389  			if v_1.Op != OpMul32 {
  6390  				continue
  6391  			}
  6392  			_ = v_1.Args[1]
  6393  			v_1_0 := v_1.Args[0]
  6394  			v_1_1 := v_1.Args[1]
  6395  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6396  				if v_1_0.Op != OpConst32 {
  6397  					continue
  6398  				}
  6399  				c := auxIntToInt32(v_1_0.AuxInt)
  6400  				if v_1_1.Op != OpRsh32Ux64 {
  6401  					continue
  6402  				}
  6403  				_ = v_1_1.Args[1]
  6404  				v_1_1_0 := v_1_1.Args[0]
  6405  				if v_1_1_0.Op != OpAvg32u {
  6406  					continue
  6407  				}
  6408  				_ = v_1_1_0.Args[1]
  6409  				if x != v_1_1_0.Args[0] {
  6410  					continue
  6411  				}
  6412  				mul := v_1_1_0.Args[1]
  6413  				if mul.Op != OpHmul32u {
  6414  					continue
  6415  				}
  6416  				_ = mul.Args[1]
  6417  				mul_0 := mul.Args[0]
  6418  				mul_1 := mul.Args[1]
  6419  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6420  					if mul_0.Op != OpConst32 {
  6421  						continue
  6422  					}
  6423  					m := auxIntToInt32(mul_0.AuxInt)
  6424  					if x != mul_1 {
  6425  						continue
  6426  					}
  6427  					v_1_1_1 := v_1_1.Args[1]
  6428  					if v_1_1_1.Op != OpConst64 {
  6429  						continue
  6430  					}
  6431  					s := auxIntToInt64(v_1_1_1.AuxInt)
  6432  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(umagic32(c).m) && s == umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
  6433  						continue
  6434  					}
  6435  					v.reset(OpLeq32U)
  6436  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6437  					v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6438  					v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6439  					v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
  6440  					v1.AddArg2(v2, x)
  6441  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6442  					v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
  6443  					v0.AddArg2(v1, v3)
  6444  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6445  					v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
  6446  					v.AddArg2(v0, v4)
  6447  					return true
  6448  				}
  6449  			}
  6450  		}
  6451  		break
  6452  	}
  6453  	// match: (Eq32 x (Mul32 (Const32 [c]) (Trunc64to32 (Rsh64Ux64 mul:(Mul64 (Const64 [m]) (ZeroExt32to64 x)) (Const64 [s]))) ) )
  6454  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<31+umagic32(c).m/2) && s == 32+umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)
  6455  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(udivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(32-udivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(udivisible32(c).max)]) )
  6456  	for {
  6457  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6458  			x := v_0
  6459  			if v_1.Op != OpMul32 {
  6460  				continue
  6461  			}
  6462  			_ = v_1.Args[1]
  6463  			v_1_0 := v_1.Args[0]
  6464  			v_1_1 := v_1.Args[1]
  6465  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6466  				if v_1_0.Op != OpConst32 {
  6467  					continue
  6468  				}
  6469  				c := auxIntToInt32(v_1_0.AuxInt)
  6470  				if v_1_1.Op != OpTrunc64to32 {
  6471  					continue
  6472  				}
  6473  				v_1_1_0 := v_1_1.Args[0]
  6474  				if v_1_1_0.Op != OpRsh64Ux64 {
  6475  					continue
  6476  				}
  6477  				_ = v_1_1_0.Args[1]
  6478  				mul := v_1_1_0.Args[0]
  6479  				if mul.Op != OpMul64 {
  6480  					continue
  6481  				}
  6482  				_ = mul.Args[1]
  6483  				mul_0 := mul.Args[0]
  6484  				mul_1 := mul.Args[1]
  6485  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6486  					if mul_0.Op != OpConst64 {
  6487  						continue
  6488  					}
  6489  					m := auxIntToInt64(mul_0.AuxInt)
  6490  					if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
  6491  						continue
  6492  					}
  6493  					v_1_1_0_1 := v_1_1_0.Args[1]
  6494  					if v_1_1_0_1.Op != OpConst64 {
  6495  						continue
  6496  					}
  6497  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  6498  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<31+umagic32(c).m/2) && s == 32+umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
  6499  						continue
  6500  					}
  6501  					v.reset(OpLeq32U)
  6502  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6503  					v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6504  					v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6505  					v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
  6506  					v1.AddArg2(v2, x)
  6507  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6508  					v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
  6509  					v0.AddArg2(v1, v3)
  6510  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6511  					v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
  6512  					v.AddArg2(v0, v4)
  6513  					return true
  6514  				}
  6515  			}
  6516  		}
  6517  		break
  6518  	}
  6519  	// match: (Eq32 x (Mul32 (Const32 [c]) (Trunc64to32 (Rsh64Ux64 mul:(Mul64 (Const64 [m]) (Rsh64Ux64 (ZeroExt32to64 x) (Const64 [1]))) (Const64 [s]))) ) )
  6520  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<31+(umagic32(c).m+1)/2) && s == 32+umagic32(c).s-2 && x.Op != OpConst32 && udivisibleOK32(c)
  6521  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(udivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(32-udivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(udivisible32(c).max)]) )
  6522  	for {
  6523  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6524  			x := v_0
  6525  			if v_1.Op != OpMul32 {
  6526  				continue
  6527  			}
  6528  			_ = v_1.Args[1]
  6529  			v_1_0 := v_1.Args[0]
  6530  			v_1_1 := v_1.Args[1]
  6531  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6532  				if v_1_0.Op != OpConst32 {
  6533  					continue
  6534  				}
  6535  				c := auxIntToInt32(v_1_0.AuxInt)
  6536  				if v_1_1.Op != OpTrunc64to32 {
  6537  					continue
  6538  				}
  6539  				v_1_1_0 := v_1_1.Args[0]
  6540  				if v_1_1_0.Op != OpRsh64Ux64 {
  6541  					continue
  6542  				}
  6543  				_ = v_1_1_0.Args[1]
  6544  				mul := v_1_1_0.Args[0]
  6545  				if mul.Op != OpMul64 {
  6546  					continue
  6547  				}
  6548  				_ = mul.Args[1]
  6549  				mul_0 := mul.Args[0]
  6550  				mul_1 := mul.Args[1]
  6551  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6552  					if mul_0.Op != OpConst64 {
  6553  						continue
  6554  					}
  6555  					m := auxIntToInt64(mul_0.AuxInt)
  6556  					if mul_1.Op != OpRsh64Ux64 {
  6557  						continue
  6558  					}
  6559  					_ = mul_1.Args[1]
  6560  					mul_1_0 := mul_1.Args[0]
  6561  					if mul_1_0.Op != OpZeroExt32to64 || x != mul_1_0.Args[0] {
  6562  						continue
  6563  					}
  6564  					mul_1_1 := mul_1.Args[1]
  6565  					if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
  6566  						continue
  6567  					}
  6568  					v_1_1_0_1 := v_1_1_0.Args[1]
  6569  					if v_1_1_0_1.Op != OpConst64 {
  6570  						continue
  6571  					}
  6572  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  6573  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<31+(umagic32(c).m+1)/2) && s == 32+umagic32(c).s-2 && x.Op != OpConst32 && udivisibleOK32(c)) {
  6574  						continue
  6575  					}
  6576  					v.reset(OpLeq32U)
  6577  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6578  					v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6579  					v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6580  					v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
  6581  					v1.AddArg2(v2, x)
  6582  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6583  					v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
  6584  					v0.AddArg2(v1, v3)
  6585  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6586  					v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
  6587  					v.AddArg2(v0, v4)
  6588  					return true
  6589  				}
  6590  			}
  6591  		}
  6592  		break
  6593  	}
  6594  	// match: (Eq32 x (Mul32 (Const32 [c]) (Trunc64to32 (Rsh64Ux64 (Avg64u (Lsh64x64 (ZeroExt32to64 x) (Const64 [32])) mul:(Mul64 (Const64 [m]) (ZeroExt32to64 x))) (Const64 [s]))) ) )
  6595  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(umagic32(c).m) && s == 32+umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)
  6596  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(udivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(32-udivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(udivisible32(c).max)]) )
  6597  	for {
  6598  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6599  			x := v_0
  6600  			if v_1.Op != OpMul32 {
  6601  				continue
  6602  			}
  6603  			_ = v_1.Args[1]
  6604  			v_1_0 := v_1.Args[0]
  6605  			v_1_1 := v_1.Args[1]
  6606  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6607  				if v_1_0.Op != OpConst32 {
  6608  					continue
  6609  				}
  6610  				c := auxIntToInt32(v_1_0.AuxInt)
  6611  				if v_1_1.Op != OpTrunc64to32 {
  6612  					continue
  6613  				}
  6614  				v_1_1_0 := v_1_1.Args[0]
  6615  				if v_1_1_0.Op != OpRsh64Ux64 {
  6616  					continue
  6617  				}
  6618  				_ = v_1_1_0.Args[1]
  6619  				v_1_1_0_0 := v_1_1_0.Args[0]
  6620  				if v_1_1_0_0.Op != OpAvg64u {
  6621  					continue
  6622  				}
  6623  				_ = v_1_1_0_0.Args[1]
  6624  				v_1_1_0_0_0 := v_1_1_0_0.Args[0]
  6625  				if v_1_1_0_0_0.Op != OpLsh64x64 {
  6626  					continue
  6627  				}
  6628  				_ = v_1_1_0_0_0.Args[1]
  6629  				v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
  6630  				if v_1_1_0_0_0_0.Op != OpZeroExt32to64 || x != v_1_1_0_0_0_0.Args[0] {
  6631  					continue
  6632  				}
  6633  				v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
  6634  				if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 32 {
  6635  					continue
  6636  				}
  6637  				mul := v_1_1_0_0.Args[1]
  6638  				if mul.Op != OpMul64 {
  6639  					continue
  6640  				}
  6641  				_ = mul.Args[1]
  6642  				mul_0 := mul.Args[0]
  6643  				mul_1 := mul.Args[1]
  6644  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6645  					if mul_0.Op != OpConst64 {
  6646  						continue
  6647  					}
  6648  					m := auxIntToInt64(mul_0.AuxInt)
  6649  					if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
  6650  						continue
  6651  					}
  6652  					v_1_1_0_1 := v_1_1_0.Args[1]
  6653  					if v_1_1_0_1.Op != OpConst64 {
  6654  						continue
  6655  					}
  6656  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  6657  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(umagic32(c).m) && s == 32+umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
  6658  						continue
  6659  					}
  6660  					v.reset(OpLeq32U)
  6661  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6662  					v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6663  					v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6664  					v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
  6665  					v1.AddArg2(v2, x)
  6666  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6667  					v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
  6668  					v0.AddArg2(v1, v3)
  6669  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6670  					v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
  6671  					v.AddArg2(v0, v4)
  6672  					return true
  6673  				}
  6674  			}
  6675  		}
  6676  		break
  6677  	}
  6678  	// match: (Eq32 x (Mul32 (Const32 [c]) (Sub32 (Rsh64x64 mul:(Mul64 (Const64 [m]) (SignExt32to64 x)) (Const64 [s])) (Rsh64x64 (SignExt32to64 x) (Const64 [63]))) ) )
  6679  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic32(c).m) && s == 32+smagic32(c).s && x.Op != OpConst32 && sdivisibleOK32(c)
  6680  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(sdivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(sdivisible32(c).a)]) ) (Const32 <typ.UInt32> [int32(32-sdivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(sdivisible32(c).max)]) )
  6681  	for {
  6682  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6683  			x := v_0
  6684  			if v_1.Op != OpMul32 {
  6685  				continue
  6686  			}
  6687  			_ = v_1.Args[1]
  6688  			v_1_0 := v_1.Args[0]
  6689  			v_1_1 := v_1.Args[1]
  6690  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6691  				if v_1_0.Op != OpConst32 {
  6692  					continue
  6693  				}
  6694  				c := auxIntToInt32(v_1_0.AuxInt)
  6695  				if v_1_1.Op != OpSub32 {
  6696  					continue
  6697  				}
  6698  				_ = v_1_1.Args[1]
  6699  				v_1_1_0 := v_1_1.Args[0]
  6700  				if v_1_1_0.Op != OpRsh64x64 {
  6701  					continue
  6702  				}
  6703  				_ = v_1_1_0.Args[1]
  6704  				mul := v_1_1_0.Args[0]
  6705  				if mul.Op != OpMul64 {
  6706  					continue
  6707  				}
  6708  				_ = mul.Args[1]
  6709  				mul_0 := mul.Args[0]
  6710  				mul_1 := mul.Args[1]
  6711  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6712  					if mul_0.Op != OpConst64 {
  6713  						continue
  6714  					}
  6715  					m := auxIntToInt64(mul_0.AuxInt)
  6716  					if mul_1.Op != OpSignExt32to64 || x != mul_1.Args[0] {
  6717  						continue
  6718  					}
  6719  					v_1_1_0_1 := v_1_1_0.Args[1]
  6720  					if v_1_1_0_1.Op != OpConst64 {
  6721  						continue
  6722  					}
  6723  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  6724  					v_1_1_1 := v_1_1.Args[1]
  6725  					if v_1_1_1.Op != OpRsh64x64 {
  6726  						continue
  6727  					}
  6728  					_ = v_1_1_1.Args[1]
  6729  					v_1_1_1_0 := v_1_1_1.Args[0]
  6730  					if v_1_1_1_0.Op != OpSignExt32to64 || x != v_1_1_1_0.Args[0] {
  6731  						continue
  6732  					}
  6733  					v_1_1_1_1 := v_1_1_1.Args[1]
  6734  					if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 63 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic32(c).m) && s == 32+smagic32(c).s && x.Op != OpConst32 && sdivisibleOK32(c)) {
  6735  						continue
  6736  					}
  6737  					v.reset(OpLeq32U)
  6738  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6739  					v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
  6740  					v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6741  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6742  					v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
  6743  					v2.AddArg2(v3, x)
  6744  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6745  					v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
  6746  					v1.AddArg2(v2, v4)
  6747  					v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6748  					v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
  6749  					v0.AddArg2(v1, v5)
  6750  					v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6751  					v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
  6752  					v.AddArg2(v0, v6)
  6753  					return true
  6754  				}
  6755  			}
  6756  		}
  6757  		break
  6758  	}
  6759  	// match: (Eq32 x (Mul32 (Const32 [c]) (Sub32 (Rsh32x64 mul:(Hmul32 (Const32 [m]) x) (Const64 [s])) (Rsh32x64 x (Const64 [31]))) ) )
  6760  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic32(c).m/2) && s == smagic32(c).s-1 && x.Op != OpConst32 && sdivisibleOK32(c)
  6761  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(sdivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(sdivisible32(c).a)]) ) (Const32 <typ.UInt32> [int32(32-sdivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(sdivisible32(c).max)]) )
  6762  	for {
  6763  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6764  			x := v_0
  6765  			if v_1.Op != OpMul32 {
  6766  				continue
  6767  			}
  6768  			_ = v_1.Args[1]
  6769  			v_1_0 := v_1.Args[0]
  6770  			v_1_1 := v_1.Args[1]
  6771  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6772  				if v_1_0.Op != OpConst32 {
  6773  					continue
  6774  				}
  6775  				c := auxIntToInt32(v_1_0.AuxInt)
  6776  				if v_1_1.Op != OpSub32 {
  6777  					continue
  6778  				}
  6779  				_ = v_1_1.Args[1]
  6780  				v_1_1_0 := v_1_1.Args[0]
  6781  				if v_1_1_0.Op != OpRsh32x64 {
  6782  					continue
  6783  				}
  6784  				_ = v_1_1_0.Args[1]
  6785  				mul := v_1_1_0.Args[0]
  6786  				if mul.Op != OpHmul32 {
  6787  					continue
  6788  				}
  6789  				_ = mul.Args[1]
  6790  				mul_0 := mul.Args[0]
  6791  				mul_1 := mul.Args[1]
  6792  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  6793  					if mul_0.Op != OpConst32 {
  6794  						continue
  6795  					}
  6796  					m := auxIntToInt32(mul_0.AuxInt)
  6797  					if x != mul_1 {
  6798  						continue
  6799  					}
  6800  					v_1_1_0_1 := v_1_1_0.Args[1]
  6801  					if v_1_1_0_1.Op != OpConst64 {
  6802  						continue
  6803  					}
  6804  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  6805  					v_1_1_1 := v_1_1.Args[1]
  6806  					if v_1_1_1.Op != OpRsh32x64 {
  6807  						continue
  6808  					}
  6809  					_ = v_1_1_1.Args[1]
  6810  					if x != v_1_1_1.Args[0] {
  6811  						continue
  6812  					}
  6813  					v_1_1_1_1 := v_1_1_1.Args[1]
  6814  					if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic32(c).m/2) && s == smagic32(c).s-1 && x.Op != OpConst32 && sdivisibleOK32(c)) {
  6815  						continue
  6816  					}
  6817  					v.reset(OpLeq32U)
  6818  					v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6819  					v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
  6820  					v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6821  					v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6822  					v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
  6823  					v2.AddArg2(v3, x)
  6824  					v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6825  					v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
  6826  					v1.AddArg2(v2, v4)
  6827  					v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6828  					v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
  6829  					v0.AddArg2(v1, v5)
  6830  					v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6831  					v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
  6832  					v.AddArg2(v0, v6)
  6833  					return true
  6834  				}
  6835  			}
  6836  		}
  6837  		break
  6838  	}
  6839  	// match: (Eq32 x (Mul32 (Const32 [c]) (Sub32 (Rsh32x64 (Add32 mul:(Hmul32 (Const32 [m]) x) x) (Const64 [s])) (Rsh32x64 x (Const64 [31]))) ) )
  6840  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic32(c).m) && s == smagic32(c).s && x.Op != OpConst32 && sdivisibleOK32(c)
  6841  	// result: (Leq32U (RotateLeft32 <typ.UInt32> (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Const32 <typ.UInt32> [int32(sdivisible32(c).m)]) x) (Const32 <typ.UInt32> [int32(sdivisible32(c).a)]) ) (Const32 <typ.UInt32> [int32(32-sdivisible32(c).k)]) ) (Const32 <typ.UInt32> [int32(sdivisible32(c).max)]) )
  6842  	for {
  6843  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6844  			x := v_0
  6845  			if v_1.Op != OpMul32 {
  6846  				continue
  6847  			}
  6848  			_ = v_1.Args[1]
  6849  			v_1_0 := v_1.Args[0]
  6850  			v_1_1 := v_1.Args[1]
  6851  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  6852  				if v_1_0.Op != OpConst32 {
  6853  					continue
  6854  				}
  6855  				c := auxIntToInt32(v_1_0.AuxInt)
  6856  				if v_1_1.Op != OpSub32 {
  6857  					continue
  6858  				}
  6859  				_ = v_1_1.Args[1]
  6860  				v_1_1_0 := v_1_1.Args[0]
  6861  				if v_1_1_0.Op != OpRsh32x64 {
  6862  					continue
  6863  				}
  6864  				_ = v_1_1_0.Args[1]
  6865  				v_1_1_0_0 := v_1_1_0.Args[0]
  6866  				if v_1_1_0_0.Op != OpAdd32 {
  6867  					continue
  6868  				}
  6869  				_ = v_1_1_0_0.Args[1]
  6870  				v_1_1_0_0_0 := v_1_1_0_0.Args[0]
  6871  				v_1_1_0_0_1 := v_1_1_0_0.Args[1]
  6872  				for _i2 := 0; _i2 <= 1; _i2, v_1_1_0_0_0, v_1_1_0_0_1 = _i2+1, v_1_1_0_0_1, v_1_1_0_0_0 {
  6873  					mul := v_1_1_0_0_0
  6874  					if mul.Op != OpHmul32 {
  6875  						continue
  6876  					}
  6877  					_ = mul.Args[1]
  6878  					mul_0 := mul.Args[0]
  6879  					mul_1 := mul.Args[1]
  6880  					for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
  6881  						if mul_0.Op != OpConst32 {
  6882  							continue
  6883  						}
  6884  						m := auxIntToInt32(mul_0.AuxInt)
  6885  						if x != mul_1 || x != v_1_1_0_0_1 {
  6886  							continue
  6887  						}
  6888  						v_1_1_0_1 := v_1_1_0.Args[1]
  6889  						if v_1_1_0_1.Op != OpConst64 {
  6890  							continue
  6891  						}
  6892  						s := auxIntToInt64(v_1_1_0_1.AuxInt)
  6893  						v_1_1_1 := v_1_1.Args[1]
  6894  						if v_1_1_1.Op != OpRsh32x64 {
  6895  							continue
  6896  						}
  6897  						_ = v_1_1_1.Args[1]
  6898  						if x != v_1_1_1.Args[0] {
  6899  							continue
  6900  						}
  6901  						v_1_1_1_1 := v_1_1_1.Args[1]
  6902  						if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic32(c).m) && s == smagic32(c).s && x.Op != OpConst32 && sdivisibleOK32(c)) {
  6903  							continue
  6904  						}
  6905  						v.reset(OpLeq32U)
  6906  						v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
  6907  						v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
  6908  						v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
  6909  						v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6910  						v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
  6911  						v2.AddArg2(v3, x)
  6912  						v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6913  						v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
  6914  						v1.AddArg2(v2, v4)
  6915  						v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6916  						v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
  6917  						v0.AddArg2(v1, v5)
  6918  						v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  6919  						v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
  6920  						v.AddArg2(v0, v6)
  6921  						return true
  6922  					}
  6923  				}
  6924  			}
  6925  		}
  6926  		break
  6927  	}
  6928  	// match: (Eq32 n (Lsh32x64 (Rsh32x64 (Add32 <t> n (Rsh32Ux64 <t> (Rsh32x64 <t> n (Const64 <typ.UInt64> [31])) (Const64 <typ.UInt64> [kbar]))) (Const64 <typ.UInt64> [k])) (Const64 <typ.UInt64> [k])) )
  6929  	// cond: k > 0 && k < 31 && kbar == 32 - k
  6930  	// result: (Eq32 (And32 <t> n (Const32 <t> [1<<uint(k)-1])) (Const32 <t> [0]))
  6931  	for {
  6932  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6933  			n := v_0
  6934  			if v_1.Op != OpLsh32x64 {
  6935  				continue
  6936  			}
  6937  			_ = v_1.Args[1]
  6938  			v_1_0 := v_1.Args[0]
  6939  			if v_1_0.Op != OpRsh32x64 {
  6940  				continue
  6941  			}
  6942  			_ = v_1_0.Args[1]
  6943  			v_1_0_0 := v_1_0.Args[0]
  6944  			if v_1_0_0.Op != OpAdd32 {
  6945  				continue
  6946  			}
  6947  			t := v_1_0_0.Type
  6948  			_ = v_1_0_0.Args[1]
  6949  			v_1_0_0_0 := v_1_0_0.Args[0]
  6950  			v_1_0_0_1 := v_1_0_0.Args[1]
  6951  			for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
  6952  				if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
  6953  					continue
  6954  				}
  6955  				_ = v_1_0_0_1.Args[1]
  6956  				v_1_0_0_1_0 := v_1_0_0_1.Args[0]
  6957  				if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
  6958  					continue
  6959  				}
  6960  				_ = v_1_0_0_1_0.Args[1]
  6961  				if n != v_1_0_0_1_0.Args[0] {
  6962  					continue
  6963  				}
  6964  				v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
  6965  				if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 31 {
  6966  					continue
  6967  				}
  6968  				v_1_0_0_1_1 := v_1_0_0_1.Args[1]
  6969  				if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
  6970  					continue
  6971  				}
  6972  				kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
  6973  				v_1_0_1 := v_1_0.Args[1]
  6974  				if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
  6975  					continue
  6976  				}
  6977  				k := auxIntToInt64(v_1_0_1.AuxInt)
  6978  				v_1_1 := v_1.Args[1]
  6979  				if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 31 && kbar == 32-k) {
  6980  					continue
  6981  				}
  6982  				v.reset(OpEq32)
  6983  				v0 := b.NewValue0(v.Pos, OpAnd32, t)
  6984  				v1 := b.NewValue0(v.Pos, OpConst32, t)
  6985  				v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
  6986  				v0.AddArg2(n, v1)
  6987  				v2 := b.NewValue0(v.Pos, OpConst32, t)
  6988  				v2.AuxInt = int32ToAuxInt(0)
  6989  				v.AddArg2(v0, v2)
  6990  				return true
  6991  			}
  6992  		}
  6993  		break
  6994  	}
  6995  	// match: (Eq32 s:(Sub32 x y) (Const32 [0]))
  6996  	// cond: s.Uses == 1
  6997  	// result: (Eq32 x y)
  6998  	for {
  6999  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7000  			s := v_0
  7001  			if s.Op != OpSub32 {
  7002  				continue
  7003  			}
  7004  			y := s.Args[1]
  7005  			x := s.Args[0]
  7006  			if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
  7007  				continue
  7008  			}
  7009  			v.reset(OpEq32)
  7010  			v.AddArg2(x, y)
  7011  			return true
  7012  		}
  7013  		break
  7014  	}
  7015  	// match: (Eq32 (And32 <t> x (Const32 <t> [y])) (Const32 <t> [y]))
  7016  	// cond: oneBit32(y)
  7017  	// result: (Neq32 (And32 <t> x (Const32 <t> [y])) (Const32 <t> [0]))
  7018  	for {
  7019  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7020  			if v_0.Op != OpAnd32 {
  7021  				continue
  7022  			}
  7023  			t := v_0.Type
  7024  			_ = v_0.Args[1]
  7025  			v_0_0 := v_0.Args[0]
  7026  			v_0_1 := v_0.Args[1]
  7027  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  7028  				x := v_0_0
  7029  				if v_0_1.Op != OpConst32 || v_0_1.Type != t {
  7030  					continue
  7031  				}
  7032  				y := auxIntToInt32(v_0_1.AuxInt)
  7033  				if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
  7034  					continue
  7035  				}
  7036  				v.reset(OpNeq32)
  7037  				v0 := b.NewValue0(v.Pos, OpAnd32, t)
  7038  				v1 := b.NewValue0(v.Pos, OpConst32, t)
  7039  				v1.AuxInt = int32ToAuxInt(y)
  7040  				v0.AddArg2(x, v1)
  7041  				v2 := b.NewValue0(v.Pos, OpConst32, t)
  7042  				v2.AuxInt = int32ToAuxInt(0)
  7043  				v.AddArg2(v0, v2)
  7044  				return true
  7045  			}
  7046  		}
  7047  		break
  7048  	}
  7049  	return false
  7050  }
  7051  func rewriteValuegeneric_OpEq32F(v *Value) bool {
  7052  	v_1 := v.Args[1]
  7053  	v_0 := v.Args[0]
  7054  	// match: (Eq32F (Const32F [c]) (Const32F [d]))
  7055  	// result: (ConstBool [c == d])
  7056  	for {
  7057  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7058  			if v_0.Op != OpConst32F {
  7059  				continue
  7060  			}
  7061  			c := auxIntToFloat32(v_0.AuxInt)
  7062  			if v_1.Op != OpConst32F {
  7063  				continue
  7064  			}
  7065  			d := auxIntToFloat32(v_1.AuxInt)
  7066  			v.reset(OpConstBool)
  7067  			v.AuxInt = boolToAuxInt(c == d)
  7068  			return true
  7069  		}
  7070  		break
  7071  	}
  7072  	return false
  7073  }
  7074  func rewriteValuegeneric_OpEq64(v *Value) bool {
  7075  	v_1 := v.Args[1]
  7076  	v_0 := v.Args[0]
  7077  	b := v.Block
  7078  	typ := &b.Func.Config.Types
  7079  	// match: (Eq64 x x)
  7080  	// result: (ConstBool [true])
  7081  	for {
  7082  		x := v_0
  7083  		if x != v_1 {
  7084  			break
  7085  		}
  7086  		v.reset(OpConstBool)
  7087  		v.AuxInt = boolToAuxInt(true)
  7088  		return true
  7089  	}
  7090  	// match: (Eq64 (Const64 <t> [c]) (Add64 (Const64 <t> [d]) x))
  7091  	// result: (Eq64 (Const64 <t> [c-d]) x)
  7092  	for {
  7093  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7094  			if v_0.Op != OpConst64 {
  7095  				continue
  7096  			}
  7097  			t := v_0.Type
  7098  			c := auxIntToInt64(v_0.AuxInt)
  7099  			if v_1.Op != OpAdd64 {
  7100  				continue
  7101  			}
  7102  			_ = v_1.Args[1]
  7103  			v_1_0 := v_1.Args[0]
  7104  			v_1_1 := v_1.Args[1]
  7105  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7106  				if v_1_0.Op != OpConst64 || v_1_0.Type != t {
  7107  					continue
  7108  				}
  7109  				d := auxIntToInt64(v_1_0.AuxInt)
  7110  				x := v_1_1
  7111  				v.reset(OpEq64)
  7112  				v0 := b.NewValue0(v.Pos, OpConst64, t)
  7113  				v0.AuxInt = int64ToAuxInt(c - d)
  7114  				v.AddArg2(v0, x)
  7115  				return true
  7116  			}
  7117  		}
  7118  		break
  7119  	}
  7120  	// match: (Eq64 (Const64 [c]) (Const64 [d]))
  7121  	// result: (ConstBool [c == d])
  7122  	for {
  7123  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7124  			if v_0.Op != OpConst64 {
  7125  				continue
  7126  			}
  7127  			c := auxIntToInt64(v_0.AuxInt)
  7128  			if v_1.Op != OpConst64 {
  7129  				continue
  7130  			}
  7131  			d := auxIntToInt64(v_1.AuxInt)
  7132  			v.reset(OpConstBool)
  7133  			v.AuxInt = boolToAuxInt(c == d)
  7134  			return true
  7135  		}
  7136  		break
  7137  	}
  7138  	// match: (Eq64 x (Mul64 (Const64 [c]) (Rsh64Ux64 mul:(Hmul64u (Const64 [m]) x) (Const64 [s])) ) )
  7139  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<63+umagic64(c).m/2) && s == umagic64(c).s-1 && x.Op != OpConst64 && udivisibleOK64(c)
  7140  	// result: (Leq64U (RotateLeft64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(udivisible64(c).m)]) x) (Const64 <typ.UInt64> [64-udivisible64(c).k]) ) (Const64 <typ.UInt64> [int64(udivisible64(c).max)]) )
  7141  	for {
  7142  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7143  			x := v_0
  7144  			if v_1.Op != OpMul64 {
  7145  				continue
  7146  			}
  7147  			_ = v_1.Args[1]
  7148  			v_1_0 := v_1.Args[0]
  7149  			v_1_1 := v_1.Args[1]
  7150  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7151  				if v_1_0.Op != OpConst64 {
  7152  					continue
  7153  				}
  7154  				c := auxIntToInt64(v_1_0.AuxInt)
  7155  				if v_1_1.Op != OpRsh64Ux64 {
  7156  					continue
  7157  				}
  7158  				_ = v_1_1.Args[1]
  7159  				mul := v_1_1.Args[0]
  7160  				if mul.Op != OpHmul64u {
  7161  					continue
  7162  				}
  7163  				_ = mul.Args[1]
  7164  				mul_0 := mul.Args[0]
  7165  				mul_1 := mul.Args[1]
  7166  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  7167  					if mul_0.Op != OpConst64 {
  7168  						continue
  7169  					}
  7170  					m := auxIntToInt64(mul_0.AuxInt)
  7171  					if x != mul_1 {
  7172  						continue
  7173  					}
  7174  					v_1_1_1 := v_1_1.Args[1]
  7175  					if v_1_1_1.Op != OpConst64 {
  7176  						continue
  7177  					}
  7178  					s := auxIntToInt64(v_1_1_1.AuxInt)
  7179  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<63+umagic64(c).m/2) && s == umagic64(c).s-1 && x.Op != OpConst64 && udivisibleOK64(c)) {
  7180  						continue
  7181  					}
  7182  					v.reset(OpLeq64U)
  7183  					v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
  7184  					v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  7185  					v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7186  					v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
  7187  					v1.AddArg2(v2, x)
  7188  					v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7189  					v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
  7190  					v0.AddArg2(v1, v3)
  7191  					v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7192  					v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
  7193  					v.AddArg2(v0, v4)
  7194  					return true
  7195  				}
  7196  			}
  7197  		}
  7198  		break
  7199  	}
  7200  	// match: (Eq64 x (Mul64 (Const64 [c]) (Rsh64Ux64 mul:(Hmul64u (Const64 [m]) (Rsh64Ux64 x (Const64 [1]))) (Const64 [s])) ) )
  7201  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<63+(umagic64(c).m+1)/2) && s == umagic64(c).s-2 && x.Op != OpConst64 && udivisibleOK64(c)
  7202  	// result: (Leq64U (RotateLeft64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(udivisible64(c).m)]) x) (Const64 <typ.UInt64> [64-udivisible64(c).k]) ) (Const64 <typ.UInt64> [int64(udivisible64(c).max)]) )
  7203  	for {
  7204  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7205  			x := v_0
  7206  			if v_1.Op != OpMul64 {
  7207  				continue
  7208  			}
  7209  			_ = v_1.Args[1]
  7210  			v_1_0 := v_1.Args[0]
  7211  			v_1_1 := v_1.Args[1]
  7212  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7213  				if v_1_0.Op != OpConst64 {
  7214  					continue
  7215  				}
  7216  				c := auxIntToInt64(v_1_0.AuxInt)
  7217  				if v_1_1.Op != OpRsh64Ux64 {
  7218  					continue
  7219  				}
  7220  				_ = v_1_1.Args[1]
  7221  				mul := v_1_1.Args[0]
  7222  				if mul.Op != OpHmul64u {
  7223  					continue
  7224  				}
  7225  				_ = mul.Args[1]
  7226  				mul_0 := mul.Args[0]
  7227  				mul_1 := mul.Args[1]
  7228  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  7229  					if mul_0.Op != OpConst64 {
  7230  						continue
  7231  					}
  7232  					m := auxIntToInt64(mul_0.AuxInt)
  7233  					if mul_1.Op != OpRsh64Ux64 {
  7234  						continue
  7235  					}
  7236  					_ = mul_1.Args[1]
  7237  					if x != mul_1.Args[0] {
  7238  						continue
  7239  					}
  7240  					mul_1_1 := mul_1.Args[1]
  7241  					if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
  7242  						continue
  7243  					}
  7244  					v_1_1_1 := v_1_1.Args[1]
  7245  					if v_1_1_1.Op != OpConst64 {
  7246  						continue
  7247  					}
  7248  					s := auxIntToInt64(v_1_1_1.AuxInt)
  7249  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<63+(umagic64(c).m+1)/2) && s == umagic64(c).s-2 && x.Op != OpConst64 && udivisibleOK64(c)) {
  7250  						continue
  7251  					}
  7252  					v.reset(OpLeq64U)
  7253  					v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
  7254  					v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  7255  					v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7256  					v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
  7257  					v1.AddArg2(v2, x)
  7258  					v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7259  					v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
  7260  					v0.AddArg2(v1, v3)
  7261  					v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7262  					v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
  7263  					v.AddArg2(v0, v4)
  7264  					return true
  7265  				}
  7266  			}
  7267  		}
  7268  		break
  7269  	}
  7270  	// match: (Eq64 x (Mul64 (Const64 [c]) (Rsh64Ux64 (Avg64u x mul:(Hmul64u (Const64 [m]) x)) (Const64 [s])) ) )
  7271  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(umagic64(c).m) && s == umagic64(c).s-1 && x.Op != OpConst64 && udivisibleOK64(c)
  7272  	// result: (Leq64U (RotateLeft64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(udivisible64(c).m)]) x) (Const64 <typ.UInt64> [64-udivisible64(c).k]) ) (Const64 <typ.UInt64> [int64(udivisible64(c).max)]) )
  7273  	for {
  7274  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7275  			x := v_0
  7276  			if v_1.Op != OpMul64 {
  7277  				continue
  7278  			}
  7279  			_ = v_1.Args[1]
  7280  			v_1_0 := v_1.Args[0]
  7281  			v_1_1 := v_1.Args[1]
  7282  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7283  				if v_1_0.Op != OpConst64 {
  7284  					continue
  7285  				}
  7286  				c := auxIntToInt64(v_1_0.AuxInt)
  7287  				if v_1_1.Op != OpRsh64Ux64 {
  7288  					continue
  7289  				}
  7290  				_ = v_1_1.Args[1]
  7291  				v_1_1_0 := v_1_1.Args[0]
  7292  				if v_1_1_0.Op != OpAvg64u {
  7293  					continue
  7294  				}
  7295  				_ = v_1_1_0.Args[1]
  7296  				if x != v_1_1_0.Args[0] {
  7297  					continue
  7298  				}
  7299  				mul := v_1_1_0.Args[1]
  7300  				if mul.Op != OpHmul64u {
  7301  					continue
  7302  				}
  7303  				_ = mul.Args[1]
  7304  				mul_0 := mul.Args[0]
  7305  				mul_1 := mul.Args[1]
  7306  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  7307  					if mul_0.Op != OpConst64 {
  7308  						continue
  7309  					}
  7310  					m := auxIntToInt64(mul_0.AuxInt)
  7311  					if x != mul_1 {
  7312  						continue
  7313  					}
  7314  					v_1_1_1 := v_1_1.Args[1]
  7315  					if v_1_1_1.Op != OpConst64 {
  7316  						continue
  7317  					}
  7318  					s := auxIntToInt64(v_1_1_1.AuxInt)
  7319  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(umagic64(c).m) && s == umagic64(c).s-1 && x.Op != OpConst64 && udivisibleOK64(c)) {
  7320  						continue
  7321  					}
  7322  					v.reset(OpLeq64U)
  7323  					v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
  7324  					v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  7325  					v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7326  					v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
  7327  					v1.AddArg2(v2, x)
  7328  					v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7329  					v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
  7330  					v0.AddArg2(v1, v3)
  7331  					v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7332  					v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
  7333  					v.AddArg2(v0, v4)
  7334  					return true
  7335  				}
  7336  			}
  7337  		}
  7338  		break
  7339  	}
  7340  	// match: (Eq64 x (Mul64 (Const64 [c]) (Sub64 (Rsh64x64 mul:(Hmul64 (Const64 [m]) x) (Const64 [s])) (Rsh64x64 x (Const64 [63]))) ) )
  7341  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic64(c).m/2) && s == smagic64(c).s-1 && x.Op != OpConst64 && sdivisibleOK64(c)
  7342  	// result: (Leq64U (RotateLeft64 <typ.UInt64> (Add64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(sdivisible64(c).m)]) x) (Const64 <typ.UInt64> [int64(sdivisible64(c).a)]) ) (Const64 <typ.UInt64> [64-sdivisible64(c).k]) ) (Const64 <typ.UInt64> [int64(sdivisible64(c).max)]) )
  7343  	for {
  7344  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7345  			x := v_0
  7346  			if v_1.Op != OpMul64 {
  7347  				continue
  7348  			}
  7349  			_ = v_1.Args[1]
  7350  			v_1_0 := v_1.Args[0]
  7351  			v_1_1 := v_1.Args[1]
  7352  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7353  				if v_1_0.Op != OpConst64 {
  7354  					continue
  7355  				}
  7356  				c := auxIntToInt64(v_1_0.AuxInt)
  7357  				if v_1_1.Op != OpSub64 {
  7358  					continue
  7359  				}
  7360  				_ = v_1_1.Args[1]
  7361  				v_1_1_0 := v_1_1.Args[0]
  7362  				if v_1_1_0.Op != OpRsh64x64 {
  7363  					continue
  7364  				}
  7365  				_ = v_1_1_0.Args[1]
  7366  				mul := v_1_1_0.Args[0]
  7367  				if mul.Op != OpHmul64 {
  7368  					continue
  7369  				}
  7370  				_ = mul.Args[1]
  7371  				mul_0 := mul.Args[0]
  7372  				mul_1 := mul.Args[1]
  7373  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  7374  					if mul_0.Op != OpConst64 {
  7375  						continue
  7376  					}
  7377  					m := auxIntToInt64(mul_0.AuxInt)
  7378  					if x != mul_1 {
  7379  						continue
  7380  					}
  7381  					v_1_1_0_1 := v_1_1_0.Args[1]
  7382  					if v_1_1_0_1.Op != OpConst64 {
  7383  						continue
  7384  					}
  7385  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  7386  					v_1_1_1 := v_1_1.Args[1]
  7387  					if v_1_1_1.Op != OpRsh64x64 {
  7388  						continue
  7389  					}
  7390  					_ = v_1_1_1.Args[1]
  7391  					if x != v_1_1_1.Args[0] {
  7392  						continue
  7393  					}
  7394  					v_1_1_1_1 := v_1_1_1.Args[1]
  7395  					if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 63 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic64(c).m/2) && s == smagic64(c).s-1 && x.Op != OpConst64 && sdivisibleOK64(c)) {
  7396  						continue
  7397  					}
  7398  					v.reset(OpLeq64U)
  7399  					v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
  7400  					v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
  7401  					v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  7402  					v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7403  					v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
  7404  					v2.AddArg2(v3, x)
  7405  					v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7406  					v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
  7407  					v1.AddArg2(v2, v4)
  7408  					v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7409  					v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
  7410  					v0.AddArg2(v1, v5)
  7411  					v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7412  					v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
  7413  					v.AddArg2(v0, v6)
  7414  					return true
  7415  				}
  7416  			}
  7417  		}
  7418  		break
  7419  	}
  7420  	// match: (Eq64 x (Mul64 (Const64 [c]) (Sub64 (Rsh64x64 (Add64 mul:(Hmul64 (Const64 [m]) x) x) (Const64 [s])) (Rsh64x64 x (Const64 [63]))) ) )
  7421  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic64(c).m) && s == smagic64(c).s && x.Op != OpConst64 && sdivisibleOK64(c)
  7422  	// result: (Leq64U (RotateLeft64 <typ.UInt64> (Add64 <typ.UInt64> (Mul64 <typ.UInt64> (Const64 <typ.UInt64> [int64(sdivisible64(c).m)]) x) (Const64 <typ.UInt64> [int64(sdivisible64(c).a)]) ) (Const64 <typ.UInt64> [64-sdivisible64(c).k]) ) (Const64 <typ.UInt64> [int64(sdivisible64(c).max)]) )
  7423  	for {
  7424  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7425  			x := v_0
  7426  			if v_1.Op != OpMul64 {
  7427  				continue
  7428  			}
  7429  			_ = v_1.Args[1]
  7430  			v_1_0 := v_1.Args[0]
  7431  			v_1_1 := v_1.Args[1]
  7432  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7433  				if v_1_0.Op != OpConst64 {
  7434  					continue
  7435  				}
  7436  				c := auxIntToInt64(v_1_0.AuxInt)
  7437  				if v_1_1.Op != OpSub64 {
  7438  					continue
  7439  				}
  7440  				_ = v_1_1.Args[1]
  7441  				v_1_1_0 := v_1_1.Args[0]
  7442  				if v_1_1_0.Op != OpRsh64x64 {
  7443  					continue
  7444  				}
  7445  				_ = v_1_1_0.Args[1]
  7446  				v_1_1_0_0 := v_1_1_0.Args[0]
  7447  				if v_1_1_0_0.Op != OpAdd64 {
  7448  					continue
  7449  				}
  7450  				_ = v_1_1_0_0.Args[1]
  7451  				v_1_1_0_0_0 := v_1_1_0_0.Args[0]
  7452  				v_1_1_0_0_1 := v_1_1_0_0.Args[1]
  7453  				for _i2 := 0; _i2 <= 1; _i2, v_1_1_0_0_0, v_1_1_0_0_1 = _i2+1, v_1_1_0_0_1, v_1_1_0_0_0 {
  7454  					mul := v_1_1_0_0_0
  7455  					if mul.Op != OpHmul64 {
  7456  						continue
  7457  					}
  7458  					_ = mul.Args[1]
  7459  					mul_0 := mul.Args[0]
  7460  					mul_1 := mul.Args[1]
  7461  					for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
  7462  						if mul_0.Op != OpConst64 {
  7463  							continue
  7464  						}
  7465  						m := auxIntToInt64(mul_0.AuxInt)
  7466  						if x != mul_1 || x != v_1_1_0_0_1 {
  7467  							continue
  7468  						}
  7469  						v_1_1_0_1 := v_1_1_0.Args[1]
  7470  						if v_1_1_0_1.Op != OpConst64 {
  7471  							continue
  7472  						}
  7473  						s := auxIntToInt64(v_1_1_0_1.AuxInt)
  7474  						v_1_1_1 := v_1_1.Args[1]
  7475  						if v_1_1_1.Op != OpRsh64x64 {
  7476  							continue
  7477  						}
  7478  						_ = v_1_1_1.Args[1]
  7479  						if x != v_1_1_1.Args[0] {
  7480  							continue
  7481  						}
  7482  						v_1_1_1_1 := v_1_1_1.Args[1]
  7483  						if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 63 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic64(c).m) && s == smagic64(c).s && x.Op != OpConst64 && sdivisibleOK64(c)) {
  7484  							continue
  7485  						}
  7486  						v.reset(OpLeq64U)
  7487  						v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
  7488  						v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
  7489  						v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
  7490  						v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7491  						v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
  7492  						v2.AddArg2(v3, x)
  7493  						v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7494  						v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
  7495  						v1.AddArg2(v2, v4)
  7496  						v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7497  						v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
  7498  						v0.AddArg2(v1, v5)
  7499  						v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
  7500  						v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
  7501  						v.AddArg2(v0, v6)
  7502  						return true
  7503  					}
  7504  				}
  7505  			}
  7506  		}
  7507  		break
  7508  	}
  7509  	// match: (Eq64 n (Lsh64x64 (Rsh64x64 (Add64 <t> n (Rsh64Ux64 <t> (Rsh64x64 <t> n (Const64 <typ.UInt64> [63])) (Const64 <typ.UInt64> [kbar]))) (Const64 <typ.UInt64> [k])) (Const64 <typ.UInt64> [k])) )
  7510  	// cond: k > 0 && k < 63 && kbar == 64 - k
  7511  	// result: (Eq64 (And64 <t> n (Const64 <t> [1<<uint(k)-1])) (Const64 <t> [0]))
  7512  	for {
  7513  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7514  			n := v_0
  7515  			if v_1.Op != OpLsh64x64 {
  7516  				continue
  7517  			}
  7518  			_ = v_1.Args[1]
  7519  			v_1_0 := v_1.Args[0]
  7520  			if v_1_0.Op != OpRsh64x64 {
  7521  				continue
  7522  			}
  7523  			_ = v_1_0.Args[1]
  7524  			v_1_0_0 := v_1_0.Args[0]
  7525  			if v_1_0_0.Op != OpAdd64 {
  7526  				continue
  7527  			}
  7528  			t := v_1_0_0.Type
  7529  			_ = v_1_0_0.Args[1]
  7530  			v_1_0_0_0 := v_1_0_0.Args[0]
  7531  			v_1_0_0_1 := v_1_0_0.Args[1]
  7532  			for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
  7533  				if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
  7534  					continue
  7535  				}
  7536  				_ = v_1_0_0_1.Args[1]
  7537  				v_1_0_0_1_0 := v_1_0_0_1.Args[0]
  7538  				if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
  7539  					continue
  7540  				}
  7541  				_ = v_1_0_0_1_0.Args[1]
  7542  				if n != v_1_0_0_1_0.Args[0] {
  7543  					continue
  7544  				}
  7545  				v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
  7546  				if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 63 {
  7547  					continue
  7548  				}
  7549  				v_1_0_0_1_1 := v_1_0_0_1.Args[1]
  7550  				if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
  7551  					continue
  7552  				}
  7553  				kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
  7554  				v_1_0_1 := v_1_0.Args[1]
  7555  				if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
  7556  					continue
  7557  				}
  7558  				k := auxIntToInt64(v_1_0_1.AuxInt)
  7559  				v_1_1 := v_1.Args[1]
  7560  				if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 63 && kbar == 64-k) {
  7561  					continue
  7562  				}
  7563  				v.reset(OpEq64)
  7564  				v0 := b.NewValue0(v.Pos, OpAnd64, t)
  7565  				v1 := b.NewValue0(v.Pos, OpConst64, t)
  7566  				v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
  7567  				v0.AddArg2(n, v1)
  7568  				v2 := b.NewValue0(v.Pos, OpConst64, t)
  7569  				v2.AuxInt = int64ToAuxInt(0)
  7570  				v.AddArg2(v0, v2)
  7571  				return true
  7572  			}
  7573  		}
  7574  		break
  7575  	}
  7576  	// match: (Eq64 s:(Sub64 x y) (Const64 [0]))
  7577  	// cond: s.Uses == 1
  7578  	// result: (Eq64 x y)
  7579  	for {
  7580  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7581  			s := v_0
  7582  			if s.Op != OpSub64 {
  7583  				continue
  7584  			}
  7585  			y := s.Args[1]
  7586  			x := s.Args[0]
  7587  			if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
  7588  				continue
  7589  			}
  7590  			v.reset(OpEq64)
  7591  			v.AddArg2(x, y)
  7592  			return true
  7593  		}
  7594  		break
  7595  	}
  7596  	// match: (Eq64 (And64 <t> x (Const64 <t> [y])) (Const64 <t> [y]))
  7597  	// cond: oneBit64(y)
  7598  	// result: (Neq64 (And64 <t> x (Const64 <t> [y])) (Const64 <t> [0]))
  7599  	for {
  7600  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7601  			if v_0.Op != OpAnd64 {
  7602  				continue
  7603  			}
  7604  			t := v_0.Type
  7605  			_ = v_0.Args[1]
  7606  			v_0_0 := v_0.Args[0]
  7607  			v_0_1 := v_0.Args[1]
  7608  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  7609  				x := v_0_0
  7610  				if v_0_1.Op != OpConst64 || v_0_1.Type != t {
  7611  					continue
  7612  				}
  7613  				y := auxIntToInt64(v_0_1.AuxInt)
  7614  				if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
  7615  					continue
  7616  				}
  7617  				v.reset(OpNeq64)
  7618  				v0 := b.NewValue0(v.Pos, OpAnd64, t)
  7619  				v1 := b.NewValue0(v.Pos, OpConst64, t)
  7620  				v1.AuxInt = int64ToAuxInt(y)
  7621  				v0.AddArg2(x, v1)
  7622  				v2 := b.NewValue0(v.Pos, OpConst64, t)
  7623  				v2.AuxInt = int64ToAuxInt(0)
  7624  				v.AddArg2(v0, v2)
  7625  				return true
  7626  			}
  7627  		}
  7628  		break
  7629  	}
  7630  	return false
  7631  }
  7632  func rewriteValuegeneric_OpEq64F(v *Value) bool {
  7633  	v_1 := v.Args[1]
  7634  	v_0 := v.Args[0]
  7635  	// match: (Eq64F (Const64F [c]) (Const64F [d]))
  7636  	// result: (ConstBool [c == d])
  7637  	for {
  7638  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7639  			if v_0.Op != OpConst64F {
  7640  				continue
  7641  			}
  7642  			c := auxIntToFloat64(v_0.AuxInt)
  7643  			if v_1.Op != OpConst64F {
  7644  				continue
  7645  			}
  7646  			d := auxIntToFloat64(v_1.AuxInt)
  7647  			v.reset(OpConstBool)
  7648  			v.AuxInt = boolToAuxInt(c == d)
  7649  			return true
  7650  		}
  7651  		break
  7652  	}
  7653  	return false
  7654  }
  7655  func rewriteValuegeneric_OpEq8(v *Value) bool {
  7656  	v_1 := v.Args[1]
  7657  	v_0 := v.Args[0]
  7658  	b := v.Block
  7659  	config := b.Func.Config
  7660  	typ := &b.Func.Config.Types
  7661  	// match: (Eq8 x x)
  7662  	// result: (ConstBool [true])
  7663  	for {
  7664  		x := v_0
  7665  		if x != v_1 {
  7666  			break
  7667  		}
  7668  		v.reset(OpConstBool)
  7669  		v.AuxInt = boolToAuxInt(true)
  7670  		return true
  7671  	}
  7672  	// match: (Eq8 (Const8 <t> [c]) (Add8 (Const8 <t> [d]) x))
  7673  	// result: (Eq8 (Const8 <t> [c-d]) x)
  7674  	for {
  7675  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7676  			if v_0.Op != OpConst8 {
  7677  				continue
  7678  			}
  7679  			t := v_0.Type
  7680  			c := auxIntToInt8(v_0.AuxInt)
  7681  			if v_1.Op != OpAdd8 {
  7682  				continue
  7683  			}
  7684  			_ = v_1.Args[1]
  7685  			v_1_0 := v_1.Args[0]
  7686  			v_1_1 := v_1.Args[1]
  7687  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7688  				if v_1_0.Op != OpConst8 || v_1_0.Type != t {
  7689  					continue
  7690  				}
  7691  				d := auxIntToInt8(v_1_0.AuxInt)
  7692  				x := v_1_1
  7693  				v.reset(OpEq8)
  7694  				v0 := b.NewValue0(v.Pos, OpConst8, t)
  7695  				v0.AuxInt = int8ToAuxInt(c - d)
  7696  				v.AddArg2(v0, x)
  7697  				return true
  7698  			}
  7699  		}
  7700  		break
  7701  	}
  7702  	// match: (Eq8 (Const8 [c]) (Const8 [d]))
  7703  	// result: (ConstBool [c == d])
  7704  	for {
  7705  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7706  			if v_0.Op != OpConst8 {
  7707  				continue
  7708  			}
  7709  			c := auxIntToInt8(v_0.AuxInt)
  7710  			if v_1.Op != OpConst8 {
  7711  				continue
  7712  			}
  7713  			d := auxIntToInt8(v_1.AuxInt)
  7714  			v.reset(OpConstBool)
  7715  			v.AuxInt = boolToAuxInt(c == d)
  7716  			return true
  7717  		}
  7718  		break
  7719  	}
  7720  	// match: (Eq8 (Mod8u x (Const8 [c])) (Const8 [0]))
  7721  	// cond: x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)
  7722  	// result: (Eq32 (Mod32u <typ.UInt32> (ZeroExt8to32 <typ.UInt32> x) (Const32 <typ.UInt32> [int32(uint8(c))])) (Const32 <typ.UInt32> [0]))
  7723  	for {
  7724  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7725  			if v_0.Op != OpMod8u {
  7726  				continue
  7727  			}
  7728  			_ = v_0.Args[1]
  7729  			x := v_0.Args[0]
  7730  			v_0_1 := v_0.Args[1]
  7731  			if v_0_1.Op != OpConst8 {
  7732  				continue
  7733  			}
  7734  			c := auxIntToInt8(v_0_1.AuxInt)
  7735  			if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)) {
  7736  				continue
  7737  			}
  7738  			v.reset(OpEq32)
  7739  			v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
  7740  			v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  7741  			v1.AddArg(x)
  7742  			v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  7743  			v2.AuxInt = int32ToAuxInt(int32(uint8(c)))
  7744  			v0.AddArg2(v1, v2)
  7745  			v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
  7746  			v3.AuxInt = int32ToAuxInt(0)
  7747  			v.AddArg2(v0, v3)
  7748  			return true
  7749  		}
  7750  		break
  7751  	}
  7752  	// match: (Eq8 (Mod8 x (Const8 [c])) (Const8 [0]))
  7753  	// cond: x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)
  7754  	// result: (Eq32 (Mod32 <typ.Int32> (SignExt8to32 <typ.Int32> x) (Const32 <typ.Int32> [int32(c)])) (Const32 <typ.Int32> [0]))
  7755  	for {
  7756  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7757  			if v_0.Op != OpMod8 {
  7758  				continue
  7759  			}
  7760  			_ = v_0.Args[1]
  7761  			x := v_0.Args[0]
  7762  			v_0_1 := v_0.Args[1]
  7763  			if v_0_1.Op != OpConst8 {
  7764  				continue
  7765  			}
  7766  			c := auxIntToInt8(v_0_1.AuxInt)
  7767  			if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)) {
  7768  				continue
  7769  			}
  7770  			v.reset(OpEq32)
  7771  			v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
  7772  			v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  7773  			v1.AddArg(x)
  7774  			v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
  7775  			v2.AuxInt = int32ToAuxInt(int32(c))
  7776  			v0.AddArg2(v1, v2)
  7777  			v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
  7778  			v3.AuxInt = int32ToAuxInt(0)
  7779  			v.AddArg2(v0, v3)
  7780  			return true
  7781  		}
  7782  		break
  7783  	}
  7784  	// match: (Eq8 x (Mul8 (Const8 [c]) (Trunc32to8 (Rsh32Ux64 mul:(Mul32 (Const32 [m]) (ZeroExt8to32 x)) (Const64 [s]))) ) )
  7785  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<8+umagic8(c).m) && s == 8+umagic8(c).s && x.Op != OpConst8 && udivisibleOK8(c)
  7786  	// result: (Leq8U (RotateLeft8 <typ.UInt8> (Mul8 <typ.UInt8> (Const8 <typ.UInt8> [int8(udivisible8(c).m)]) x) (Const8 <typ.UInt8> [int8(8-udivisible8(c).k)]) ) (Const8 <typ.UInt8> [int8(udivisible8(c).max)]) )
  7787  	for {
  7788  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7789  			x := v_0
  7790  			if v_1.Op != OpMul8 {
  7791  				continue
  7792  			}
  7793  			_ = v_1.Args[1]
  7794  			v_1_0 := v_1.Args[0]
  7795  			v_1_1 := v_1.Args[1]
  7796  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7797  				if v_1_0.Op != OpConst8 {
  7798  					continue
  7799  				}
  7800  				c := auxIntToInt8(v_1_0.AuxInt)
  7801  				if v_1_1.Op != OpTrunc32to8 {
  7802  					continue
  7803  				}
  7804  				v_1_1_0 := v_1_1.Args[0]
  7805  				if v_1_1_0.Op != OpRsh32Ux64 {
  7806  					continue
  7807  				}
  7808  				_ = v_1_1_0.Args[1]
  7809  				mul := v_1_1_0.Args[0]
  7810  				if mul.Op != OpMul32 {
  7811  					continue
  7812  				}
  7813  				_ = mul.Args[1]
  7814  				mul_0 := mul.Args[0]
  7815  				mul_1 := mul.Args[1]
  7816  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  7817  					if mul_0.Op != OpConst32 {
  7818  						continue
  7819  					}
  7820  					m := auxIntToInt32(mul_0.AuxInt)
  7821  					if mul_1.Op != OpZeroExt8to32 || x != mul_1.Args[0] {
  7822  						continue
  7823  					}
  7824  					v_1_1_0_1 := v_1_1_0.Args[1]
  7825  					if v_1_1_0_1.Op != OpConst64 {
  7826  						continue
  7827  					}
  7828  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  7829  					if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<8+umagic8(c).m) && s == 8+umagic8(c).s && x.Op != OpConst8 && udivisibleOK8(c)) {
  7830  						continue
  7831  					}
  7832  					v.reset(OpLeq8U)
  7833  					v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
  7834  					v1 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
  7835  					v2 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
  7836  					v2.AuxInt = int8ToAuxInt(int8(udivisible8(c).m))
  7837  					v1.AddArg2(v2, x)
  7838  					v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
  7839  					v3.AuxInt = int8ToAuxInt(int8(8 - udivisible8(c).k))
  7840  					v0.AddArg2(v1, v3)
  7841  					v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
  7842  					v4.AuxInt = int8ToAuxInt(int8(udivisible8(c).max))
  7843  					v.AddArg2(v0, v4)
  7844  					return true
  7845  				}
  7846  			}
  7847  		}
  7848  		break
  7849  	}
  7850  	// match: (Eq8 x (Mul8 (Const8 [c]) (Sub8 (Rsh32x64 mul:(Mul32 (Const32 [m]) (SignExt8to32 x)) (Const64 [s])) (Rsh32x64 (SignExt8to32 x) (Const64 [31]))) ) )
  7851  	// cond: v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic8(c).m) && s == 8+smagic8(c).s && x.Op != OpConst8 && sdivisibleOK8(c)
  7852  	// result: (Leq8U (RotateLeft8 <typ.UInt8> (Add8 <typ.UInt8> (Mul8 <typ.UInt8> (Const8 <typ.UInt8> [int8(sdivisible8(c).m)]) x) (Const8 <typ.UInt8> [int8(sdivisible8(c).a)]) ) (Const8 <typ.UInt8> [int8(8-sdivisible8(c).k)]) ) (Const8 <typ.UInt8> [int8(sdivisible8(c).max)]) )
  7853  	for {
  7854  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7855  			x := v_0
  7856  			if v_1.Op != OpMul8 {
  7857  				continue
  7858  			}
  7859  			_ = v_1.Args[1]
  7860  			v_1_0 := v_1.Args[0]
  7861  			v_1_1 := v_1.Args[1]
  7862  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  7863  				if v_1_0.Op != OpConst8 {
  7864  					continue
  7865  				}
  7866  				c := auxIntToInt8(v_1_0.AuxInt)
  7867  				if v_1_1.Op != OpSub8 {
  7868  					continue
  7869  				}
  7870  				_ = v_1_1.Args[1]
  7871  				v_1_1_0 := v_1_1.Args[0]
  7872  				if v_1_1_0.Op != OpRsh32x64 {
  7873  					continue
  7874  				}
  7875  				_ = v_1_1_0.Args[1]
  7876  				mul := v_1_1_0.Args[0]
  7877  				if mul.Op != OpMul32 {
  7878  					continue
  7879  				}
  7880  				_ = mul.Args[1]
  7881  				mul_0 := mul.Args[0]
  7882  				mul_1 := mul.Args[1]
  7883  				for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
  7884  					if mul_0.Op != OpConst32 {
  7885  						continue
  7886  					}
  7887  					m := auxIntToInt32(mul_0.AuxInt)
  7888  					if mul_1.Op != OpSignExt8to32 || x != mul_1.Args[0] {
  7889  						continue
  7890  					}
  7891  					v_1_1_0_1 := v_1_1_0.Args[1]
  7892  					if v_1_1_0_1.Op != OpConst64 {
  7893  						continue
  7894  					}
  7895  					s := auxIntToInt64(v_1_1_0_1.AuxInt)
  7896  					v_1_1_1 := v_1_1.Args[1]
  7897  					if v_1_1_1.Op != OpRsh32x64 {
  7898  						continue
  7899  					}
  7900  					_ = v_1_1_1.Args[1]
  7901  					v_1_1_1_0 := v_1_1_1.Args[0]
  7902  					if v_1_1_1_0.Op != OpSignExt8to32 || x != v_1_1_1_0.Args[0] {
  7903  						continue
  7904  					}
  7905  					v_1_1_1_1 := v_1_1_1.Args[1]
  7906  					if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic8(c).m) && s == 8+smagic8(c).s && x.Op != OpConst8 && sdivisibleOK8(c)) {
  7907  						continue
  7908  					}
  7909  					v.reset(OpLeq8U)
  7910  					v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
  7911  					v1 := b.NewValue0(v.Pos, OpAdd8, typ.UInt8)
  7912  					v2 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
  7913  					v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
  7914  					v3.AuxInt = int8ToAuxInt(int8(sdivisible8(c).m))
  7915  					v2.AddArg2(v3, x)
  7916  					v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
  7917  					v4.AuxInt = int8ToAuxInt(int8(sdivisible8(c).a))
  7918  					v1.AddArg2(v2, v4)
  7919  					v5 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
  7920  					v5.AuxInt = int8ToAuxInt(int8(8 - sdivisible8(c).k))
  7921  					v0.AddArg2(v1, v5)
  7922  					v6 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
  7923  					v6.AuxInt = int8ToAuxInt(int8(sdivisible8(c).max))
  7924  					v.AddArg2(v0, v6)
  7925  					return true
  7926  				}
  7927  			}
  7928  		}
  7929  		break
  7930  	}
  7931  	// match: (Eq8 n (Lsh8x64 (Rsh8x64 (Add8 <t> n (Rsh8Ux64 <t> (Rsh8x64 <t> n (Const64 <typ.UInt64> [ 7])) (Const64 <typ.UInt64> [kbar]))) (Const64 <typ.UInt64> [k])) (Const64 <typ.UInt64> [k])) )
  7932  	// cond: k > 0 && k < 7 && kbar == 8 - k
  7933  	// result: (Eq8 (And8 <t> n (Const8 <t> [1<<uint(k)-1])) (Const8 <t> [0]))
  7934  	for {
  7935  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7936  			n := v_0
  7937  			if v_1.Op != OpLsh8x64 {
  7938  				continue
  7939  			}
  7940  			_ = v_1.Args[1]
  7941  			v_1_0 := v_1.Args[0]
  7942  			if v_1_0.Op != OpRsh8x64 {
  7943  				continue
  7944  			}
  7945  			_ = v_1_0.Args[1]
  7946  			v_1_0_0 := v_1_0.Args[0]
  7947  			if v_1_0_0.Op != OpAdd8 {
  7948  				continue
  7949  			}
  7950  			t := v_1_0_0.Type
  7951  			_ = v_1_0_0.Args[1]
  7952  			v_1_0_0_0 := v_1_0_0.Args[0]
  7953  			v_1_0_0_1 := v_1_0_0.Args[1]
  7954  			for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
  7955  				if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
  7956  					continue
  7957  				}
  7958  				_ = v_1_0_0_1.Args[1]
  7959  				v_1_0_0_1_0 := v_1_0_0_1.Args[0]
  7960  				if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
  7961  					continue
  7962  				}
  7963  				_ = v_1_0_0_1_0.Args[1]
  7964  				if n != v_1_0_0_1_0.Args[0] {
  7965  					continue
  7966  				}
  7967  				v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
  7968  				if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 7 {
  7969  					continue
  7970  				}
  7971  				v_1_0_0_1_1 := v_1_0_0_1.Args[1]
  7972  				if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
  7973  					continue
  7974  				}
  7975  				kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
  7976  				v_1_0_1 := v_1_0.Args[1]
  7977  				if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
  7978  					continue
  7979  				}
  7980  				k := auxIntToInt64(v_1_0_1.AuxInt)
  7981  				v_1_1 := v_1.Args[1]
  7982  				if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 7 && kbar == 8-k) {
  7983  					continue
  7984  				}
  7985  				v.reset(OpEq8)
  7986  				v0 := b.NewValue0(v.Pos, OpAnd8, t)
  7987  				v1 := b.NewValue0(v.Pos, OpConst8, t)
  7988  				v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
  7989  				v0.AddArg2(n, v1)
  7990  				v2 := b.NewValue0(v.Pos, OpConst8, t)
  7991  				v2.AuxInt = int8ToAuxInt(0)
  7992  				v.AddArg2(v0, v2)
  7993  				return true
  7994  			}
  7995  		}
  7996  		break
  7997  	}
  7998  	// match: (Eq8 s:(Sub8 x y) (Const8 [0]))
  7999  	// cond: s.Uses == 1
  8000  	// result: (Eq8 x y)
  8001  	for {
  8002  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8003  			s := v_0
  8004  			if s.Op != OpSub8 {
  8005  				continue
  8006  			}
  8007  			y := s.Args[1]
  8008  			x := s.Args[0]
  8009  			if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
  8010  				continue
  8011  			}
  8012  			v.reset(OpEq8)
  8013  			v.AddArg2(x, y)
  8014  			return true
  8015  		}
  8016  		break
  8017  	}
  8018  	// match: (Eq8 (And8 <t> x (Const8 <t> [y])) (Const8 <t> [y]))
  8019  	// cond: oneBit8(y)
  8020  	// result: (Neq8 (And8 <t> x (Const8 <t> [y])) (Const8 <t> [0]))
  8021  	for {
  8022  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8023  			if v_0.Op != OpAnd8 {
  8024  				continue
  8025  			}
  8026  			t := v_0.Type
  8027  			_ = v_0.Args[1]
  8028  			v_0_0 := v_0.Args[0]
  8029  			v_0_1 := v_0.Args[1]
  8030  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  8031  				x := v_0_0
  8032  				if v_0_1.Op != OpConst8 || v_0_1.Type != t {
  8033  					continue
  8034  				}
  8035  				y := auxIntToInt8(v_0_1.AuxInt)
  8036  				if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
  8037  					continue
  8038  				}
  8039  				v.reset(OpNeq8)
  8040  				v0 := b.NewValue0(v.Pos, OpAnd8, t)
  8041  				v1 := b.NewValue0(v.Pos, OpConst8, t)
  8042  				v1.AuxInt = int8ToAuxInt(y)
  8043  				v0.AddArg2(x, v1)
  8044  				v2 := b.NewValue0(v.Pos, OpConst8, t)
  8045  				v2.AuxInt = int8ToAuxInt(0)
  8046  				v.AddArg2(v0, v2)
  8047  				return true
  8048  			}
  8049  		}
  8050  		break
  8051  	}
  8052  	return false
  8053  }
  8054  func rewriteValuegeneric_OpEqB(v *Value) bool {
  8055  	v_1 := v.Args[1]
  8056  	v_0 := v.Args[0]
  8057  	// match: (EqB (ConstBool [c]) (ConstBool [d]))
  8058  	// result: (ConstBool [c == d])
  8059  	for {
  8060  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8061  			if v_0.Op != OpConstBool {
  8062  				continue
  8063  			}
  8064  			c := auxIntToBool(v_0.AuxInt)
  8065  			if v_1.Op != OpConstBool {
  8066  				continue
  8067  			}
  8068  			d := auxIntToBool(v_1.AuxInt)
  8069  			v.reset(OpConstBool)
  8070  			v.AuxInt = boolToAuxInt(c == d)
  8071  			return true
  8072  		}
  8073  		break
  8074  	}
  8075  	// match: (EqB (ConstBool [false]) x)
  8076  	// result: (Not x)
  8077  	for {
  8078  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8079  			if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
  8080  				continue
  8081  			}
  8082  			x := v_1
  8083  			v.reset(OpNot)
  8084  			v.AddArg(x)
  8085  			return true
  8086  		}
  8087  		break
  8088  	}
  8089  	// match: (EqB (ConstBool [true]) x)
  8090  	// result: x
  8091  	for {
  8092  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8093  			if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
  8094  				continue
  8095  			}
  8096  			x := v_1
  8097  			v.copyOf(x)
  8098  			return true
  8099  		}
  8100  		break
  8101  	}
  8102  	return false
  8103  }
  8104  func rewriteValuegeneric_OpEqInter(v *Value) bool {
  8105  	v_1 := v.Args[1]
  8106  	v_0 := v.Args[0]
  8107  	b := v.Block
  8108  	typ := &b.Func.Config.Types
  8109  	// match: (EqInter x y)
  8110  	// result: (EqPtr (ITab x) (ITab y))
  8111  	for {
  8112  		x := v_0
  8113  		y := v_1
  8114  		v.reset(OpEqPtr)
  8115  		v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
  8116  		v0.AddArg(x)
  8117  		v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
  8118  		v1.AddArg(y)
  8119  		v.AddArg2(v0, v1)
  8120  		return true
  8121  	}
  8122  }
  8123  func rewriteValuegeneric_OpEqPtr(v *Value) bool {
  8124  	v_1 := v.Args[1]
  8125  	v_0 := v.Args[0]
  8126  	b := v.Block
  8127  	typ := &b.Func.Config.Types
  8128  	// match: (EqPtr x x)
  8129  	// result: (ConstBool [true])
  8130  	for {
  8131  		x := v_0
  8132  		if x != v_1 {
  8133  			break
  8134  		}
  8135  		v.reset(OpConstBool)
  8136  		v.AuxInt = boolToAuxInt(true)
  8137  		return true
  8138  	}
  8139  	// match: (EqPtr (Addr {a} _) (Addr {b} _))
  8140  	// result: (ConstBool [a == b])
  8141  	for {
  8142  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8143  			if v_0.Op != OpAddr {
  8144  				continue
  8145  			}
  8146  			a := auxToSym(v_0.Aux)
  8147  			if v_1.Op != OpAddr {
  8148  				continue
  8149  			}
  8150  			b := auxToSym(v_1.Aux)
  8151  			v.reset(OpConstBool)
  8152  			v.AuxInt = boolToAuxInt(a == b)
  8153  			return true
  8154  		}
  8155  		break
  8156  	}
  8157  	// match: (EqPtr (Addr {a} _) (OffPtr [o] (Addr {b} _)))
  8158  	// result: (ConstBool [a == b && o == 0])
  8159  	for {
  8160  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8161  			if v_0.Op != OpAddr {
  8162  				continue
  8163  			}
  8164  			a := auxToSym(v_0.Aux)
  8165  			if v_1.Op != OpOffPtr {
  8166  				continue
  8167  			}
  8168  			o := auxIntToInt64(v_1.AuxInt)
  8169  			v_1_0 := v_1.Args[0]
  8170  			if v_1_0.Op != OpAddr {
  8171  				continue
  8172  			}
  8173  			b := auxToSym(v_1_0.Aux)
  8174  			v.reset(OpConstBool)
  8175  			v.AuxInt = boolToAuxInt(a == b && o == 0)
  8176  			return true
  8177  		}
  8178  		break
  8179  	}
  8180  	// match: (EqPtr (OffPtr [o1] (Addr {a} _)) (OffPtr [o2] (Addr {b} _)))
  8181  	// result: (ConstBool [a == b && o1 == o2])
  8182  	for {
  8183  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8184  			if v_0.Op != OpOffPtr {
  8185  				continue
  8186  			}
  8187  			o1 := auxIntToInt64(v_0.AuxInt)
  8188  			v_0_0 := v_0.Args[0]
  8189  			if v_0_0.Op != OpAddr {
  8190  				continue
  8191  			}
  8192  			a := auxToSym(v_0_0.Aux)
  8193  			if v_1.Op != OpOffPtr {
  8194  				continue
  8195  			}
  8196  			o2 := auxIntToInt64(v_1.AuxInt)
  8197  			v_1_0 := v_1.Args[0]
  8198  			if v_1_0.Op != OpAddr {
  8199  				continue
  8200  			}
  8201  			b := auxToSym(v_1_0.Aux)
  8202  			v.reset(OpConstBool)
  8203  			v.AuxInt = boolToAuxInt(a == b && o1 == o2)
  8204  			return true
  8205  		}
  8206  		break
  8207  	}
  8208  	// match: (EqPtr (LocalAddr {a} _ _) (LocalAddr {b} _ _))
  8209  	// result: (ConstBool [a == b])
  8210  	for {
  8211  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8212  			if v_0.Op != OpLocalAddr {
  8213  				continue
  8214  			}
  8215  			a := auxToSym(v_0.Aux)
  8216  			if v_1.Op != OpLocalAddr {
  8217  				continue
  8218  			}
  8219  			b := auxToSym(v_1.Aux)
  8220  			v.reset(OpConstBool)
  8221  			v.AuxInt = boolToAuxInt(a == b)
  8222  			return true
  8223  		}
  8224  		break
  8225  	}
  8226  	// match: (EqPtr (LocalAddr {a} _ _) (OffPtr [o] (LocalAddr {b} _ _)))
  8227  	// result: (ConstBool [a == b && o == 0])
  8228  	for {
  8229  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8230  			if v_0.Op != OpLocalAddr {
  8231  				continue
  8232  			}
  8233  			a := auxToSym(v_0.Aux)
  8234  			if v_1.Op != OpOffPtr {
  8235  				continue
  8236  			}
  8237  			o := auxIntToInt64(v_1.AuxInt)
  8238  			v_1_0 := v_1.Args[0]
  8239  			if v_1_0.Op != OpLocalAddr {
  8240  				continue
  8241  			}
  8242  			b := auxToSym(v_1_0.Aux)
  8243  			v.reset(OpConstBool)
  8244  			v.AuxInt = boolToAuxInt(a == b && o == 0)
  8245  			return true
  8246  		}
  8247  		break
  8248  	}
  8249  	// match: (EqPtr (OffPtr [o1] (LocalAddr {a} _ _)) (OffPtr [o2] (LocalAddr {b} _ _)))
  8250  	// result: (ConstBool [a == b && o1 == o2])
  8251  	for {
  8252  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8253  			if v_0.Op != OpOffPtr {
  8254  				continue
  8255  			}
  8256  			o1 := auxIntToInt64(v_0.AuxInt)
  8257  			v_0_0 := v_0.Args[0]
  8258  			if v_0_0.Op != OpLocalAddr {
  8259  				continue
  8260  			}
  8261  			a := auxToSym(v_0_0.Aux)
  8262  			if v_1.Op != OpOffPtr {
  8263  				continue
  8264  			}
  8265  			o2 := auxIntToInt64(v_1.AuxInt)
  8266  			v_1_0 := v_1.Args[0]
  8267  			if v_1_0.Op != OpLocalAddr {
  8268  				continue
  8269  			}
  8270  			b := auxToSym(v_1_0.Aux)
  8271  			v.reset(OpConstBool)
  8272  			v.AuxInt = boolToAuxInt(a == b && o1 == o2)
  8273  			return true
  8274  		}
  8275  		break
  8276  	}
  8277  	// match: (EqPtr (OffPtr [o1] p1) p2)
  8278  	// cond: isSamePtr(p1, p2)
  8279  	// result: (ConstBool [o1 == 0])
  8280  	for {
  8281  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8282  			if v_0.Op != OpOffPtr {
  8283  				continue
  8284  			}
  8285  			o1 := auxIntToInt64(v_0.AuxInt)
  8286  			p1 := v_0.Args[0]
  8287  			p2 := v_1
  8288  			if !(isSamePtr(p1, p2)) {
  8289  				continue
  8290  			}
  8291  			v.reset(OpConstBool)
  8292  			v.AuxInt = boolToAuxInt(o1 == 0)
  8293  			return true
  8294  		}
  8295  		break
  8296  	}
  8297  	// match: (EqPtr (OffPtr [o1] p1) (OffPtr [o2] p2))
  8298  	// cond: isSamePtr(p1, p2)
  8299  	// result: (ConstBool [o1 == o2])
  8300  	for {
  8301  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8302  			if v_0.Op != OpOffPtr {
  8303  				continue
  8304  			}
  8305  			o1 := auxIntToInt64(v_0.AuxInt)
  8306  			p1 := v_0.Args[0]
  8307  			if v_1.Op != OpOffPtr {
  8308  				continue
  8309  			}
  8310  			o2 := auxIntToInt64(v_1.AuxInt)
  8311  			p2 := v_1.Args[0]
  8312  			if !(isSamePtr(p1, p2)) {
  8313  				continue
  8314  			}
  8315  			v.reset(OpConstBool)
  8316  			v.AuxInt = boolToAuxInt(o1 == o2)
  8317  			return true
  8318  		}
  8319  		break
  8320  	}
  8321  	// match: (EqPtr (Const32 [c]) (Const32 [d]))
  8322  	// result: (ConstBool [c == d])
  8323  	for {
  8324  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8325  			if v_0.Op != OpConst32 {
  8326  				continue
  8327  			}
  8328  			c := auxIntToInt32(v_0.AuxInt)
  8329  			if v_1.Op != OpConst32 {
  8330  				continue
  8331  			}
  8332  			d := auxIntToInt32(v_1.AuxInt)
  8333  			v.reset(OpConstBool)
  8334  			v.AuxInt = boolToAuxInt(c == d)
  8335  			return true
  8336  		}
  8337  		break
  8338  	}
  8339  	// match: (EqPtr (Const64 [c]) (Const64 [d]))
  8340  	// result: (ConstBool [c == d])
  8341  	for {
  8342  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8343  			if v_0.Op != OpConst64 {
  8344  				continue
  8345  			}
  8346  			c := auxIntToInt64(v_0.AuxInt)
  8347  			if v_1.Op != OpConst64 {
  8348  				continue
  8349  			}
  8350  			d := auxIntToInt64(v_1.AuxInt)
  8351  			v.reset(OpConstBool)
  8352  			v.AuxInt = boolToAuxInt(c == d)
  8353  			return true
  8354  		}
  8355  		break
  8356  	}
  8357  	// match: (EqPtr (LocalAddr _ _) (Addr _))
  8358  	// result: (ConstBool [false])
  8359  	for {
  8360  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8361  			if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
  8362  				continue
  8363  			}
  8364  			v.reset(OpConstBool)
  8365  			v.AuxInt = boolToAuxInt(false)
  8366  			return true
  8367  		}
  8368  		break
  8369  	}
  8370  	// match: (EqPtr (OffPtr (LocalAddr _ _)) (Addr _))
  8371  	// result: (ConstBool [false])
  8372  	for {
  8373  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8374  			if v_0.Op != OpOffPtr {
  8375  				continue
  8376  			}
  8377  			v_0_0 := v_0.Args[0]
  8378  			if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
  8379  				continue
  8380  			}
  8381  			v.reset(OpConstBool)
  8382  			v.AuxInt = boolToAuxInt(false)
  8383  			return true
  8384  		}
  8385  		break
  8386  	}
  8387  	// match: (EqPtr (LocalAddr _ _) (OffPtr (Addr _)))
  8388  	// result: (ConstBool [false])
  8389  	for {
  8390  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8391  			if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
  8392  				continue
  8393  			}
  8394  			v_1_0 := v_1.Args[0]
  8395  			if v_1_0.Op != OpAddr {
  8396  				continue
  8397  			}
  8398  			v.reset(OpConstBool)
  8399  			v.AuxInt = boolToAuxInt(false)
  8400  			return true
  8401  		}
  8402  		break
  8403  	}
  8404  	// match: (EqPtr (OffPtr (LocalAddr _ _)) (OffPtr (Addr _)))
  8405  	// result: (ConstBool [false])
  8406  	for {
  8407  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8408  			if v_0.Op != OpOffPtr {
  8409  				continue
  8410  			}
  8411  			v_0_0 := v_0.Args[0]
  8412  			if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
  8413  				continue
  8414  			}
  8415  			v_1_0 := v_1.Args[0]
  8416  			if v_1_0.Op != OpAddr {
  8417  				continue
  8418  			}
  8419  			v.reset(OpConstBool)
  8420  			v.AuxInt = boolToAuxInt(false)
  8421  			return true
  8422  		}
  8423  		break
  8424  	}
  8425  	// match: (EqPtr (AddPtr p1 o1) p2)
  8426  	// cond: isSamePtr(p1, p2)
  8427  	// result: (Not (IsNonNil o1))
  8428  	for {
  8429  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8430  			if v_0.Op != OpAddPtr {
  8431  				continue
  8432  			}
  8433  			o1 := v_0.Args[1]
  8434  			p1 := v_0.Args[0]
  8435  			p2 := v_1
  8436  			if !(isSamePtr(p1, p2)) {
  8437  				continue
  8438  			}
  8439  			v.reset(OpNot)
  8440  			v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
  8441  			v0.AddArg(o1)
  8442  			v.AddArg(v0)
  8443  			return true
  8444  		}
  8445  		break
  8446  	}
  8447  	// match: (EqPtr (Const32 [0]) p)
  8448  	// result: (Not (IsNonNil p))
  8449  	for {
  8450  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8451  			if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
  8452  				continue
  8453  			}
  8454  			p := v_1
  8455  			v.reset(OpNot)
  8456  			v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
  8457  			v0.AddArg(p)
  8458  			v.AddArg(v0)
  8459  			return true
  8460  		}
  8461  		break
  8462  	}
  8463  	// match: (EqPtr (Const64 [0]) p)
  8464  	// result: (Not (IsNonNil p))
  8465  	for {
  8466  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8467  			if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
  8468  				continue
  8469  			}
  8470  			p := v_1
  8471  			v.reset(OpNot)
  8472  			v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
  8473  			v0.AddArg(p)
  8474  			v.AddArg(v0)
  8475  			return true
  8476  		}
  8477  		break
  8478  	}
  8479  	// match: (EqPtr (ConstNil) p)
  8480  	// result: (Not (IsNonNil p))
  8481  	for {
  8482  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8483  			if v_0.Op != OpConstNil {
  8484  				continue
  8485  			}
  8486  			p := v_1
  8487  			v.reset(OpNot)
  8488  			v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
  8489  			v0.AddArg(p)
  8490  			v.AddArg(v0)
  8491  			return true
  8492  		}
  8493  		break
  8494  	}
  8495  	return false
  8496  }
  8497  func rewriteValuegeneric_OpEqSlice(v *Value) bool {
  8498  	v_1 := v.Args[1]
  8499  	v_0 := v.Args[0]
  8500  	b := v.Block
  8501  	typ := &b.Func.Config.Types
  8502  	// match: (EqSlice x y)
  8503  	// result: (EqPtr (SlicePtr x) (SlicePtr y))
  8504  	for {
  8505  		x := v_0
  8506  		y := v_1
  8507  		v.reset(OpEqPtr)
  8508  		v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
  8509  		v0.AddArg(x)
  8510  		v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
  8511  		v1.AddArg(y)
  8512  		v.AddArg2(v0, v1)
  8513  		return true
  8514  	}
  8515  }
  8516  func rewriteValuegeneric_OpIMake(v *Value) bool {
  8517  	v_1 := v.Args[1]
  8518  	v_0 := v.Args[0]
  8519  	// match: (IMake typ (StructMake1 val))
  8520  	// result: (IMake typ val)
  8521  	for {
  8522  		typ := v_0
  8523  		if v_1.Op != OpStructMake1 {
  8524  			break
  8525  		}
  8526  		val := v_1.Args[0]
  8527  		v.reset(OpIMake)
  8528  		v.AddArg2(typ, val)
  8529  		return true
  8530  	}
  8531  	// match: (IMake typ (ArrayMake1 val))
  8532  	// result: (IMake typ val)
  8533  	for {
  8534  		typ := v_0
  8535  		if v_1.Op != OpArrayMake1 {
  8536  			break
  8537  		}
  8538  		val := v_1.Args[0]
  8539  		v.reset(OpIMake)
  8540  		v.AddArg2(typ, val)
  8541  		return true
  8542  	}
  8543  	return false
  8544  }
  8545  func rewriteValuegeneric_OpInterCall(v *Value) bool {
  8546  	v_1 := v.Args[1]
  8547  	v_0 := v.Args[0]
  8548  	// match: (InterCall [argsize] {auxCall} (Load (OffPtr [off] (ITab (IMake (Addr {itab} (SB)) _))) _) mem)
  8549  	// cond: devirt(v, auxCall, itab, off) != nil
  8550  	// result: (StaticCall [int32(argsize)] {devirt(v, auxCall, itab, off)} mem)
  8551  	for {
  8552  		argsize := auxIntToInt32(v.AuxInt)
  8553  		auxCall := auxToCall(v.Aux)
  8554  		if v_0.Op != OpLoad {
  8555  			break
  8556  		}
  8557  		v_0_0 := v_0.Args[0]
  8558  		if v_0_0.Op != OpOffPtr {
  8559  			break
  8560  		}
  8561  		off := auxIntToInt64(v_0_0.AuxInt)
  8562  		v_0_0_0 := v_0_0.Args[0]
  8563  		if v_0_0_0.Op != OpITab {
  8564  			break
  8565  		}
  8566  		v_0_0_0_0 := v_0_0_0.Args[0]
  8567  		if v_0_0_0_0.Op != OpIMake {
  8568  			break
  8569  		}
  8570  		v_0_0_0_0_0 := v_0_0_0_0.Args[0]
  8571  		if v_0_0_0_0_0.Op != OpAddr {
  8572  			break
  8573  		}
  8574  		itab := auxToSym(v_0_0_0_0_0.Aux)
  8575  		v_0_0_0_0_0_0 := v_0_0_0_0_0.Args[0]
  8576  		if v_0_0_0_0_0_0.Op != OpSB {
  8577  			break
  8578  		}
  8579  		mem := v_1
  8580  		if !(devirt(v, auxCall, itab, off) != nil) {
  8581  			break
  8582  		}
  8583  		v.reset(OpStaticCall)
  8584  		v.AuxInt = int32ToAuxInt(int32(argsize))
  8585  		v.Aux = callToAux(devirt(v, auxCall, itab, off))
  8586  		v.AddArg(mem)
  8587  		return true
  8588  	}
  8589  	return false
  8590  }
  8591  func rewriteValuegeneric_OpInterLECall(v *Value) bool {
  8592  	// match: (InterLECall [argsize] {auxCall} (Load (OffPtr [off] (ITab (IMake (Addr {itab} (SB)) _))) _) ___)
  8593  	// cond: devirtLESym(v, auxCall, itab, off) != nil
  8594  	// result: devirtLECall(v, devirtLESym(v, auxCall, itab, off))
  8595  	for {
  8596  		if len(v.Args) < 1 {
  8597  			break
  8598  		}
  8599  		auxCall := auxToCall(v.Aux)
  8600  		v_0 := v.Args[0]
  8601  		if v_0.Op != OpLoad {
  8602  			break
  8603  		}
  8604  		v_0_0 := v_0.Args[0]
  8605  		if v_0_0.Op != OpOffPtr {
  8606  			break
  8607  		}
  8608  		off := auxIntToInt64(v_0_0.AuxInt)
  8609  		v_0_0_0 := v_0_0.Args[0]
  8610  		if v_0_0_0.Op != OpITab {
  8611  			break
  8612  		}
  8613  		v_0_0_0_0 := v_0_0_0.Args[0]
  8614  		if v_0_0_0_0.Op != OpIMake {
  8615  			break
  8616  		}
  8617  		v_0_0_0_0_0 := v_0_0_0_0.Args[0]
  8618  		if v_0_0_0_0_0.Op != OpAddr {
  8619  			break
  8620  		}
  8621  		itab := auxToSym(v_0_0_0_0_0.Aux)
  8622  		v_0_0_0_0_0_0 := v_0_0_0_0_0.Args[0]
  8623  		if v_0_0_0_0_0_0.Op != OpSB || !(devirtLESym(v, auxCall, itab, off) != nil) {
  8624  			break
  8625  		}
  8626  		v.copyOf(devirtLECall(v, devirtLESym(v, auxCall, itab, off)))
  8627  		return true
  8628  	}
  8629  	return false
  8630  }
  8631  func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
  8632  	v_1 := v.Args[1]
  8633  	v_0 := v.Args[0]
  8634  	// match: (IsInBounds (ZeroExt8to32 _) (Const32 [c]))
  8635  	// cond: (1 << 8) <= c
  8636  	// result: (ConstBool [true])
  8637  	for {
  8638  		if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
  8639  			break
  8640  		}
  8641  		c := auxIntToInt32(v_1.AuxInt)
  8642  		if !((1 << 8) <= c) {
  8643  			break
  8644  		}
  8645  		v.reset(OpConstBool)
  8646  		v.AuxInt = boolToAuxInt(true)
  8647  		return true
  8648  	}
  8649  	// match: (IsInBounds (ZeroExt8to64 _) (Const64 [c]))
  8650  	// cond: (1 << 8) <= c
  8651  	// result: (ConstBool [true])
  8652  	for {
  8653  		if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
  8654  			break
  8655  		}
  8656  		c := auxIntToInt64(v_1.AuxInt)
  8657  		if !((1 << 8) <= c) {
  8658  			break
  8659  		}
  8660  		v.reset(OpConstBool)
  8661  		v.AuxInt = boolToAuxInt(true)
  8662  		return true
  8663  	}
  8664  	// match: (IsInBounds (ZeroExt16to32 _) (Const32 [c]))
  8665  	// cond: (1 << 16) <= c
  8666  	// result: (ConstBool [true])
  8667  	for {
  8668  		if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
  8669  			break
  8670  		}
  8671  		c := auxIntToInt32(v_1.AuxInt)
  8672  		if !((1 << 16) <= c) {
  8673  			break
  8674  		}
  8675  		v.reset(OpConstBool)
  8676  		v.AuxInt = boolToAuxInt(true)
  8677  		return true
  8678  	}
  8679  	// match: (IsInBounds (ZeroExt16to64 _) (Const64 [c]))
  8680  	// cond: (1 << 16) <= c
  8681  	// result: (ConstBool [true])
  8682  	for {
  8683  		if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
  8684  			break
  8685  		}
  8686  		c := auxIntToInt64(v_1.AuxInt)
  8687  		if !((1 << 16) <= c) {
  8688  			break
  8689  		}
  8690  		v.reset(OpConstBool)
  8691  		v.AuxInt = boolToAuxInt(true)
  8692  		return true
  8693  	}
  8694  	// match: (IsInBounds x x)
  8695  	// result: (ConstBool [false])
  8696  	for {
  8697  		x := v_0
  8698  		if x != v_1 {
  8699  			break
  8700  		}
  8701  		v.reset(OpConstBool)
  8702  		v.AuxInt = boolToAuxInt(false)
  8703  		return true
  8704  	}
  8705  	// match: (IsInBounds (And8 (Const8 [c]) _) (Const8 [d]))
  8706  	// cond: 0 <= c && c < d
  8707  	// result: (ConstBool [true])
  8708  	for {
  8709  		if v_0.Op != OpAnd8 {
  8710  			break
  8711  		}
  8712  		v_0_0 := v_0.Args[0]
  8713  		v_0_1 := v_0.Args[1]
  8714  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  8715  			if v_0_0.Op != OpConst8 {
  8716  				continue
  8717  			}
  8718  			c := auxIntToInt8(v_0_0.AuxInt)
  8719  			if v_1.Op != OpConst8 {
  8720  				continue
  8721  			}
  8722  			d := auxIntToInt8(v_1.AuxInt)
  8723  			if !(0 <= c && c < d) {
  8724  				continue
  8725  			}
  8726  			v.reset(OpConstBool)
  8727  			v.AuxInt = boolToAuxInt(true)
  8728  			return true
  8729  		}
  8730  		break
  8731  	}
  8732  	// match: (IsInBounds (ZeroExt8to16 (And8 (Const8 [c]) _)) (Const16 [d]))
  8733  	// cond: 0 <= c && int16(c) < d
  8734  	// result: (ConstBool [true])
  8735  	for {
  8736  		if v_0.Op != OpZeroExt8to16 {
  8737  			break
  8738  		}
  8739  		v_0_0 := v_0.Args[0]
  8740  		if v_0_0.Op != OpAnd8 {
  8741  			break
  8742  		}
  8743  		v_0_0_0 := v_0_0.Args[0]
  8744  		v_0_0_1 := v_0_0.Args[1]
  8745  		for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
  8746  			if v_0_0_0.Op != OpConst8 {
  8747  				continue
  8748  			}
  8749  			c := auxIntToInt8(v_0_0_0.AuxInt)
  8750  			if v_1.Op != OpConst16 {
  8751  				continue
  8752  			}
  8753  			d := auxIntToInt16(v_1.AuxInt)
  8754  			if !(0 <= c && int16(c) < d) {
  8755  				continue
  8756  			}
  8757  			v.reset(OpConstBool)
  8758  			v.AuxInt = boolToAuxInt(true)
  8759  			return true
  8760  		}
  8761  		break
  8762  	}
  8763  	// match: (IsInBounds (ZeroExt8to32 (And8 (Const8 [c]) _)) (Const32 [d]))
  8764  	// cond: 0 <= c && int32(c) < d
  8765  	// result: (ConstBool [true])
  8766  	for {
  8767  		if v_0.Op != OpZeroExt8to32 {
  8768  			break
  8769  		}
  8770  		v_0_0 := v_0.Args[0]
  8771  		if v_0_0.Op != OpAnd8 {
  8772  			break
  8773  		}
  8774  		v_0_0_0 := v_0_0.Args[0]
  8775  		v_0_0_1 := v_0_0.Args[1]
  8776  		for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
  8777  			if v_0_0_0.Op != OpConst8 {
  8778  				continue
  8779  			}
  8780  			c := auxIntToInt8(v_0_0_0.AuxInt)
  8781  			if v_1.Op != OpConst32 {
  8782  				continue
  8783  			}
  8784  			d := auxIntToInt32(v_1.AuxInt)
  8785  			if !(0 <= c && int32(c) < d) {
  8786  				continue
  8787  			}
  8788  			v.reset(OpConstBool)
  8789  			v.AuxInt = boolToAuxInt(true)
  8790  			return true
  8791  		}
  8792  		break
  8793  	}
  8794  	// match: (IsInBounds (ZeroExt8to64 (And8 (Const8 [c]) _)) (Const64 [d]))
  8795  	// cond: 0 <= c && int64(c) < d
  8796  	// result: (ConstBool [true])
  8797  	for {
  8798  		if v_0.Op != OpZeroExt8to64 {
  8799  			break
  8800  		}
  8801  		v_0_0 := v_0.Args[0]
  8802  		if v_0_0.Op != OpAnd8 {
  8803  			break
  8804  		}
  8805  		v_0_0_0 := v_0_0.Args[0]
  8806  		v_0_0_1 := v_0_0.Args[1]
  8807  		for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
  8808  			if v_0_0_0.Op != OpConst8 {
  8809  				continue
  8810  			}
  8811  			c := auxIntToInt8(v_0_0_0.AuxInt)
  8812  			if v_1.Op != OpConst64 {
  8813  				continue
  8814  			}
  8815  			d := auxIntToInt64(v_1.AuxInt)
  8816  			if !(0 <= c && int64(c) < d) {
  8817  				continue
  8818  			}
  8819  			v.reset(OpConstBool)
  8820  			v.AuxInt = boolToAuxInt(true)
  8821  			return true
  8822  		}
  8823  		break
  8824  	}
  8825  	// match: (IsInBounds (And16 (Const16 [c]) _) (Const16 [d]))
  8826  	// cond: 0 <= c && c < d
  8827  	// result: (ConstBool [true])
  8828  	for {
  8829  		if v_0.Op != OpAnd16 {
  8830  			break
  8831  		}
  8832  		v_0_0 := v_0.Args[0]
  8833  		v_0_1 := v_0.Args[1]
  8834  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  8835  			if v_0_0.Op != OpConst16 {
  8836  				continue
  8837  			}
  8838  			c := auxIntToInt16(v_0_0.AuxInt)
  8839  			if v_1.Op != OpConst16 {
  8840  				continue
  8841  			}
  8842  			d := auxIntToInt16(v_1.AuxInt)
  8843  			if !(0 <= c && c < d) {
  8844  				continue
  8845  			}
  8846  			v.reset(OpConstBool)
  8847  			v.AuxInt = boolToAuxInt(true)
  8848  			return true
  8849  		}
  8850  		break
  8851  	}
  8852  	// match: (IsInBounds (ZeroExt16to32 (And16 (Const16 [c]) _)) (Const32 [d]))
  8853  	// cond: 0 <= c && int32(c) < d
  8854  	// result: (ConstBool [true])
  8855  	for {
  8856  		if v_0.Op != OpZeroExt16to32 {
  8857  			break
  8858  		}
  8859  		v_0_0 := v_0.Args[0]
  8860  		if v_0_0.Op != OpAnd16 {
  8861  			break
  8862  		}
  8863  		v_0_0_0 := v_0_0.Args[0]
  8864  		v_0_0_1 := v_0_0.Args[1]
  8865  		for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
  8866  			if v_0_0_0.Op != OpConst16 {
  8867  				continue
  8868  			}
  8869  			c := auxIntToInt16(v_0_0_0.AuxInt)
  8870  			if v_1.Op != OpConst32 {
  8871  				continue
  8872  			}
  8873  			d := auxIntToInt32(v_1.AuxInt)
  8874  			if !(0 <= c && int32(c) < d) {
  8875  				continue
  8876  			}
  8877  			v.reset(OpConstBool)
  8878  			v.AuxInt = boolToAuxInt(true)
  8879  			return true
  8880  		}
  8881  		break
  8882  	}
  8883  	// match: (IsInBounds (ZeroExt16to64 (And16 (Const16 [c]) _)) (Const64 [d]))
  8884  	// cond: 0 <= c && int64(c) < d
  8885  	// result: (ConstBool [true])
  8886  	for {
  8887  		if v_0.Op != OpZeroExt16to64 {
  8888  			break
  8889  		}
  8890  		v_0_0 := v_0.Args[0]
  8891  		if v_0_0.Op != OpAnd16 {
  8892  			break
  8893  		}
  8894  		v_0_0_0 := v_0_0.Args[0]
  8895  		v_0_0_1 := v_0_0.Args[1]
  8896  		for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
  8897  			if v_0_0_0.Op != OpConst16 {
  8898  				continue
  8899  			}
  8900  			c := auxIntToInt16(v_0_0_0.AuxInt)
  8901  			if v_1.Op != OpConst64 {
  8902  				continue
  8903  			}
  8904  			d := auxIntToInt64(v_1.AuxInt)
  8905  			if !(0 <= c && int64(c) < d) {
  8906  				continue
  8907  			}
  8908  			v.reset(OpConstBool)
  8909  			v.AuxInt = boolToAuxInt(true)
  8910  			return true
  8911  		}
  8912  		break
  8913  	}
  8914  	// match: (IsInBounds (And32 (Const32 [c]) _) (Const32 [d]))
  8915  	// cond: 0 <= c && c < d
  8916  	// result: (ConstBool [true])
  8917  	for {
  8918  		if v_0.Op != OpAnd32 {
  8919  			break
  8920  		}
  8921  		v_0_0 := v_0.Args[0]
  8922  		v_0_1 := v_0.Args[1]
  8923  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  8924  			if v_0_0.Op != OpConst32 {
  8925  				continue
  8926  			}
  8927  			c := auxIntToInt32(v_0_0.AuxInt)
  8928  			if v_1.Op != OpConst32 {
  8929  				continue
  8930  			}
  8931  			d := auxIntToInt32(v_1.AuxInt)
  8932  			if !(0 <= c && c < d) {
  8933  				continue
  8934  			}
  8935  			v.reset(OpConstBool)
  8936  			v.AuxInt = boolToAuxInt(true)
  8937  			return true
  8938  		}
  8939  		break
  8940  	}
  8941  	// match: (IsInBounds (ZeroExt32to64 (And32 (Const32 [c]) _)) (Const64 [d]))
  8942  	// cond: 0 <= c && int64(c) < d
  8943  	// result: (ConstBool [true])
  8944  	for {
  8945  		if v_0.Op != OpZeroExt32to64 {
  8946  			break
  8947  		}
  8948  		v_0_0 := v_0.Args[0]
  8949  		if v_0_0.Op != OpAnd32 {
  8950  			break
  8951  		}
  8952  		v_0_0_0 := v_0_0.Args[0]
  8953  		v_0_0_1 := v_0_0.Args[1]
  8954  		for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
  8955  			if v_0_0_0.Op != OpConst32 {
  8956  				continue
  8957  			}
  8958  			c := auxIntToInt32(v_0_0_0.AuxInt)
  8959  			if v_1.Op != OpConst64 {
  8960  				continue
  8961  			}
  8962  			d := auxIntToInt64(v_1.AuxInt)
  8963  			if !(0 <= c && int64(c) < d) {
  8964  				continue
  8965  			}
  8966  			v.reset(OpConstBool)
  8967  			v.AuxInt = boolToAuxInt(true)
  8968  			return true
  8969  		}
  8970  		break
  8971  	}
  8972  	// match: (IsInBounds (And64 (Const64 [c]) _) (Const64 [d]))
  8973  	// cond: 0 <= c && c < d
  8974  	// result: (ConstBool [true])
  8975  	for {
  8976  		if v_0.Op != OpAnd64 {
  8977  			break
  8978  		}
  8979  		v_0_0 := v_0.Args[0]
  8980  		v_0_1 := v_0.Args[1]
  8981  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  8982  			if v_0_0.Op != OpConst64 {
  8983  				continue
  8984  			}
  8985  			c := auxIntToInt64(v_0_0.AuxInt)
  8986  			if v_1.Op != OpConst64 {
  8987  				continue
  8988  			}
  8989  			d := auxIntToInt64(v_1.AuxInt)
  8990  			if !(0 <= c && c < d) {
  8991  				continue
  8992  			}
  8993  			v.reset(OpConstBool)
  8994  			v.AuxInt = boolToAuxInt(true)
  8995  			return true
  8996  		}
  8997  		break
  8998  	}
  8999  	// match: (IsInBounds (Const32 [c]) (Const32 [d]))
  9000  	// result: (ConstBool [0 <= c && c < d])
  9001  	for {
  9002  		if v_0.Op != OpConst32 {
  9003  			break
  9004  		}
  9005  		c := auxIntToInt32(v_0.AuxInt)
  9006  		if v_1.Op != OpConst32 {
  9007  			break
  9008  		}
  9009  		d := auxIntToInt32(v_1.AuxInt)
  9010  		v.reset(OpConstBool)
  9011  		v.AuxInt = boolToAuxInt(0 <= c && c < d)
  9012  		return true
  9013  	}
  9014  	// match: (IsInBounds (Const64 [c]) (Const64 [d]))
  9015  	// result: (ConstBool [0 <= c && c < d])
  9016  	for {
  9017  		if v_0.Op != OpConst64 {
  9018  			break
  9019  		}
  9020  		c := auxIntToInt64(v_0.AuxInt)
  9021  		if v_1.Op != OpConst64 {
  9022  			break
  9023  		}
  9024  		d := auxIntToInt64(v_1.AuxInt)
  9025  		v.reset(OpConstBool)
  9026  		v.AuxInt = boolToAuxInt(0 <= c && c < d)
  9027  		return true
  9028  	}
  9029  	// match: (IsInBounds (Mod32u _ y) y)
  9030  	// result: (ConstBool [true])
  9031  	for {
  9032  		if v_0.Op != OpMod32u {
  9033  			break
  9034  		}
  9035  		y := v_0.Args[1]
  9036  		if y != v_1 {
  9037  			break
  9038  		}
  9039  		v.reset(OpConstBool)
  9040  		v.AuxInt = boolToAuxInt(true)
  9041  		return true
  9042  	}
  9043  	// match: (IsInBounds (Mod64u _ y) y)
  9044  	// result: (ConstBool [true])
  9045  	for {
  9046  		if v_0.Op != OpMod64u {
  9047  			break
  9048  		}
  9049  		y := v_0.Args[1]
  9050  		if y != v_1 {
  9051  			break
  9052  		}
  9053  		v.reset(OpConstBool)
  9054  		v.AuxInt = boolToAuxInt(true)
  9055  		return true
  9056  	}
  9057  	// match: (IsInBounds (ZeroExt8to64 (Rsh8Ux64 _ (Const64 [c]))) (Const64 [d]))
  9058  	// cond: 0 < c && c < 8 && 1<<uint( 8-c)-1 < d
  9059  	// result: (ConstBool [true])
  9060  	for {
  9061  		if v_0.Op != OpZeroExt8to64 {
  9062  			break
  9063  		}
  9064  		v_0_0 := v_0.Args[0]
  9065  		if v_0_0.Op != OpRsh8Ux64 {
  9066  			break
  9067  		}
  9068  		_ = v_0_0.Args[1]
  9069  		v_0_0_1 := v_0_0.Args[1]
  9070  		if v_0_0_1.Op != OpConst64 {
  9071  			break
  9072  		}
  9073  		c := auxIntToInt64(v_0_0_1.AuxInt)
  9074  		if v_1.Op != OpConst64 {
  9075  			break
  9076  		}
  9077  		d := auxIntToInt64(v_1.AuxInt)
  9078  		if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
  9079  			break
  9080  		}
  9081  		v.reset(OpConstBool)
  9082  		v.AuxInt = boolToAuxInt(true)
  9083  		return true
  9084  	}
  9085  	// match: (IsInBounds (ZeroExt8to32 (Rsh8Ux64 _ (Const64 [c]))) (Const32 [d]))
  9086  	// cond: 0 < c && c < 8 && 1<<uint( 8-c)-1 < d
  9087  	// result: (ConstBool [true])
  9088  	for {
  9089  		if v_0.Op != OpZeroExt8to32 {
  9090  			break
  9091  		}
  9092  		v_0_0 := v_0.Args[0]
  9093  		if v_0_0.Op != OpRsh8Ux64 {
  9094  			break
  9095  		}
  9096  		_ = v_0_0.Args[1]
  9097  		v_0_0_1 := v_0_0.Args[1]
  9098  		if v_0_0_1.Op != OpConst64 {
  9099  			break
  9100  		}
  9101  		c := auxIntToInt64(v_0_0_1.AuxInt)
  9102  		if v_1.Op != OpConst32 {
  9103  			break
  9104  		}
  9105  		d := auxIntToInt32(v_1.AuxInt)
  9106  		if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
  9107  			break
  9108  		}
  9109  		v.reset(OpConstBool)
  9110  		v.AuxInt = boolToAuxInt(true)
  9111  		return true
  9112  	}
  9113  	// match: (IsInBounds (ZeroExt8to16 (Rsh8Ux64 _ (Const64 [c]))) (Const16 [d]))
  9114  	// cond: 0 < c && c < 8 && 1<<uint( 8-c)-1 < d
  9115  	// result: (ConstBool [true])
  9116  	for {
  9117  		if v_0.Op != OpZeroExt8to16 {
  9118  			break
  9119  		}
  9120  		v_0_0 := v_0.Args[0]
  9121  		if v_0_0.Op != OpRsh8Ux64 {
  9122  			break
  9123  		}
  9124  		_ = v_0_0.Args[1]
  9125  		v_0_0_1 := v_0_0.Args[1]
  9126  		if v_0_0_1.Op != OpConst64 {
  9127  			break
  9128  		}
  9129  		c := auxIntToInt64(v_0_0_1.AuxInt)
  9130  		if v_1.Op != OpConst16 {
  9131  			break
  9132  		}
  9133  		d := auxIntToInt16(v_1.AuxInt)
  9134  		if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
  9135  			break
  9136  		}
  9137  		v.reset(OpConstBool)
  9138  		v.AuxInt = boolToAuxInt(true)
  9139  		return true
  9140  	}
  9141  	// match: (IsInBounds (Rsh8Ux64 _ (Const64 [c])) (Const64 [d]))
  9142  	// cond: 0 < c && c < 8 && 1<<uint( 8-c)-1 < d
  9143  	// result: (ConstBool [true])
  9144  	for {
  9145  		if v_0.Op != OpRsh8Ux64 {
  9146  			break
  9147  		}
  9148  		_ = v_0.Args[1]
  9149  		v_0_1 := v_0.Args[1]
  9150  		if v_0_1.Op != OpConst64 {
  9151  			break
  9152  		}
  9153  		c := auxIntToInt64(v_0_1.AuxInt)
  9154  		if v_1.Op != OpConst64 {
  9155  			break
  9156  		}
  9157  		d := auxIntToInt64(v_1.AuxInt)
  9158  		if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
  9159  			break
  9160  		}
  9161  		v.reset(OpConstBool)
  9162  		v.AuxInt = boolToAuxInt(true)
  9163  		return true
  9164  	}
  9165  	// match: (IsInBounds (ZeroExt16to64 (Rsh16Ux64 _ (Const64 [c]))) (Const64 [d]))
  9166  	// cond: 0 < c && c < 16 && 1<<uint(16-c)-1 < d
  9167  	// result: (ConstBool [true])
  9168  	for {
  9169  		if v_0.Op != OpZeroExt16to64 {
  9170  			break
  9171  		}
  9172  		v_0_0 := v_0.Args[0]
  9173  		if v_0_0.Op != OpRsh16Ux64 {
  9174  			break
  9175  		}
  9176  		_ = v_0_0.Args[1]
  9177  		v_0_0_1 := v_0_0.Args[1]
  9178  		if v_0_0_1.Op != OpConst64 {
  9179  			break
  9180  		}
  9181  		c := auxIntToInt64(v_0_0_1.AuxInt)
  9182  		if v_1.Op != OpConst64 {
  9183  			break
  9184  		}
  9185  		d := auxIntToInt64(v_1.AuxInt)
  9186  		if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
  9187  			break
  9188  		}
  9189  		v.reset(OpConstBool)
  9190  		v.AuxInt = boolToAuxInt(true)
  9191  		return true
  9192  	}
  9193  	// match: (IsInBounds (ZeroExt16to32 (Rsh16Ux64 _ (Const64 [c]))) (Const64 [d]))
  9194  	// cond: 0 < c && c < 16 && 1<<uint(16-c)-1 < d
  9195  	// result: (ConstBool [true])
  9196  	for {
  9197  		if v_0.Op != OpZeroExt16to32 {
  9198  			break
  9199  		}
  9200  		v_0_0 := v_0.Args[0]
  9201  		if v_0_0.Op != OpRsh16Ux64 {
  9202  			break
  9203  		}
  9204  		_ = v_0_0.Args[1]
  9205  		v_0_0_1 := v_0_0.Args[1]
  9206  		if v_0_0_1.Op != OpConst64 {
  9207  			break
  9208  		}
  9209  		c := auxIntToInt64(v_0_0_1.AuxInt)
  9210  		if v_1.Op != OpConst64 {
  9211  			break
  9212  		}
  9213  		d := auxIntToInt64(v_1.AuxInt)
  9214  		if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
  9215  			break
  9216  		}
  9217  		v.reset(OpConstBool)
  9218  		v.AuxInt = boolToAuxInt(true)
  9219  		return true
  9220  	}
  9221  	// match: (IsInBounds (Rsh16Ux64 _ (Const64 [c])) (Const64 [d]))
  9222  	// cond: 0 < c && c < 16 && 1<<uint(16-c)-1 < d
  9223  	// result: (ConstBool [true])
  9224  	for {
  9225  		if v_0.Op != OpRsh16Ux64 {
  9226  			break
  9227  		}
  9228  		_ = v_0.Args[1]
  9229  		v_0_1 := v_0.Args[1]
  9230  		if v_0_1.Op != OpConst64 {
  9231  			break
  9232  		}
  9233  		c := auxIntToInt64(v_0_1.AuxInt)
  9234  		if v_1.Op != OpConst64 {
  9235  			break
  9236  		}
  9237  		d := auxIntToInt64(v_1.AuxInt)
  9238  		if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
  9239  			break
  9240  		}
  9241  		v.reset(OpConstBool)
  9242  		v.AuxInt = boolToAuxInt(true)
  9243  		return true
  9244  	}
  9245  	// match: (IsInBounds (ZeroExt32to64 (Rsh32Ux64 _ (Const64 [c]))) (Const64 [d]))
  9246  	// cond: 0 < c && c < 32 && 1<<uint(32-c)-1 < d
  9247  	// result: (ConstBool [true])
  9248  	for {
  9249  		if v_0.Op != OpZeroExt32to64 {
  9250  			break
  9251  		}
  9252  		v_0_0 := v_0.Args[0]
  9253  		if v_0_0.Op != OpRsh32Ux64 {
  9254  			break
  9255  		}
  9256  		_ = v_0_0.Args[1]
  9257  		v_0_0_1 := v_0_0.Args[1]
  9258  		if v_0_0_1.Op != OpConst64 {
  9259  			break
  9260  		}
  9261  		c := auxIntToInt64(v_0_0_1.AuxInt)
  9262  		if v_1.Op != OpConst64 {
  9263  			break
  9264  		}
  9265  		d := auxIntToInt64(v_1.AuxInt)
  9266  		if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
  9267  			break
  9268  		}
  9269  		v.reset(OpConstBool)
  9270  		v.AuxInt = boolToAuxInt(true)
  9271  		return true
  9272  	}
  9273  	// match: (IsInBounds (Rsh32Ux64 _ (Const64 [c])) (Const64 [d]))
  9274  	// cond: 0 < c && c < 32 && 1<<uint(32-c)-1 < d
  9275  	// result: (ConstBool [true])
  9276  	for {
  9277  		if v_0.Op != OpRsh32Ux64 {
  9278  			break
  9279  		}
  9280  		_ = v_0.Args[1]
  9281  		v_0_1 := v_0.Args[1]
  9282  		if v_0_1.Op != OpConst64 {
  9283  			break
  9284  		}
  9285  		c := auxIntToInt64(v_0_1.AuxInt)
  9286  		if v_1.Op != OpConst64 {
  9287  			break
  9288  		}
  9289  		d := auxIntToInt64(v_1.AuxInt)
  9290  		if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
  9291  			break
  9292  		}
  9293  		v.reset(OpConstBool)
  9294  		v.AuxInt = boolToAuxInt(true)
  9295  		return true
  9296  	}
  9297  	// match: (IsInBounds (Rsh64Ux64 _ (Const64 [c])) (Const64 [d]))
  9298  	// cond: 0 < c && c < 64 && 1<<uint(64-c)-1 < d
  9299  	// result: (ConstBool [true])
  9300  	for {
  9301  		if v_0.Op != OpRsh64Ux64 {
  9302  			break
  9303  		}
  9304  		_ = v_0.Args[1]
  9305  		v_0_1 := v_0.Args[1]
  9306  		if v_0_1.Op != OpConst64 {
  9307  			break
  9308  		}
  9309  		c := auxIntToInt64(v_0_1.AuxInt)
  9310  		if v_1.Op != OpConst64 {
  9311  			break
  9312  		}
  9313  		d := auxIntToInt64(v_1.AuxInt)
  9314  		if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
  9315  			break
  9316  		}
  9317  		v.reset(OpConstBool)
  9318  		v.AuxInt = boolToAuxInt(true)
  9319  		return true
  9320  	}
  9321  	return false
  9322  }
  9323  func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
  9324  	v_0 := v.Args[0]
  9325  	// match: (IsNonNil (ConstNil))
  9326  	// result: (ConstBool [false])
  9327  	for {
  9328  		if v_0.Op != OpConstNil {
  9329  			break
  9330  		}
  9331  		v.reset(OpConstBool)
  9332  		v.AuxInt = boolToAuxInt(false)
  9333  		return true
  9334  	}
  9335  	// match: (IsNonNil (Const32 [c]))
  9336  	// result: (ConstBool [c != 0])
  9337  	for {
  9338  		if v_0.Op != OpConst32 {
  9339  			break
  9340  		}
  9341  		c := auxIntToInt32(v_0.AuxInt)
  9342  		v.reset(OpConstBool)
  9343  		v.AuxInt = boolToAuxInt(c != 0)
  9344  		return true
  9345  	}
  9346  	// match: (IsNonNil (Const64 [c]))
  9347  	// result: (ConstBool [c != 0])
  9348  	for {
  9349  		if v_0.Op != OpConst64 {
  9350  			break
  9351  		}
  9352  		c := auxIntToInt64(v_0.AuxInt)
  9353  		v.reset(OpConstBool)
  9354  		v.AuxInt = boolToAuxInt(c != 0)
  9355  		return true
  9356  	}
  9357  	// match: (IsNonNil (Addr _))
  9358  	// result: (ConstBool [true])
  9359  	for {
  9360  		if v_0.Op != OpAddr {
  9361  			break
  9362  		}
  9363  		v.reset(OpConstBool)
  9364  		v.AuxInt = boolToAuxInt(true)
  9365  		return true
  9366  	}
  9367  	// match: (IsNonNil (LocalAddr _ _))
  9368  	// result: (ConstBool [true])
  9369  	for {
  9370  		if v_0.Op != OpLocalAddr {
  9371  			break
  9372  		}
  9373  		v.reset(OpConstBool)
  9374  		v.AuxInt = boolToAuxInt(true)
  9375  		return true
  9376  	}
  9377  	return false
  9378  }
  9379  func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
  9380  	v_1 := v.Args[1]
  9381  	v_0 := v.Args[0]
  9382  	// match: (IsSliceInBounds x x)
  9383  	// result: (ConstBool [true])
  9384  	for {
  9385  		x := v_0
  9386  		if x != v_1 {
  9387  			break
  9388  		}
  9389  		v.reset(OpConstBool)
  9390  		v.AuxInt = boolToAuxInt(true)
  9391  		return true
  9392  	}
  9393  	// match: (IsSliceInBounds (And32 (Const32 [c]) _) (Const32 [d]))
  9394  	// cond: 0 <= c && c <= d
  9395  	// result: (ConstBool [true])
  9396  	for {
  9397  		if v_0.Op != OpAnd32 {
  9398  			break
  9399  		}
  9400  		v_0_0 := v_0.Args[0]
  9401  		v_0_1 := v_0.Args[1]
  9402  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9403  			if v_0_0.Op != OpConst32 {
  9404  				continue
  9405  			}
  9406  			c := auxIntToInt32(v_0_0.AuxInt)
  9407  			if v_1.Op != OpConst32 {
  9408  				continue
  9409  			}
  9410  			d := auxIntToInt32(v_1.AuxInt)
  9411  			if !(0 <= c && c <= d) {
  9412  				continue
  9413  			}
  9414  			v.reset(OpConstBool)
  9415  			v.AuxInt = boolToAuxInt(true)
  9416  			return true
  9417  		}
  9418  		break
  9419  	}
  9420  	// match: (IsSliceInBounds (And64 (Const64 [c]) _) (Const64 [d]))
  9421  	// cond: 0 <= c && c <= d
  9422  	// result: (ConstBool [true])
  9423  	for {
  9424  		if v_0.Op != OpAnd64 {
  9425  			break
  9426  		}
  9427  		v_0_0 := v_0.Args[0]
  9428  		v_0_1 := v_0.Args[1]
  9429  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9430  			if v_0_0.Op != OpConst64 {
  9431  				continue
  9432  			}
  9433  			c := auxIntToInt64(v_0_0.AuxInt)
  9434  			if v_1.Op != OpConst64 {
  9435  				continue
  9436  			}
  9437  			d := auxIntToInt64(v_1.AuxInt)
  9438  			if !(0 <= c && c <= d) {
  9439  				continue
  9440  			}
  9441  			v.reset(OpConstBool)
  9442  			v.AuxInt = boolToAuxInt(true)
  9443  			return true
  9444  		}
  9445  		break
  9446  	}
  9447  	// match: (IsSliceInBounds (Const32 [0]) _)
  9448  	// result: (ConstBool [true])
  9449  	for {
  9450  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
  9451  			break
  9452  		}
  9453  		v.reset(OpConstBool)
  9454  		v.AuxInt = boolToAuxInt(true)
  9455  		return true
  9456  	}
  9457  	// match: (IsSliceInBounds (Const64 [0]) _)
  9458  	// result: (ConstBool [true])
  9459  	for {
  9460  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
  9461  			break
  9462  		}
  9463  		v.reset(OpConstBool)
  9464  		v.AuxInt = boolToAuxInt(true)
  9465  		return true
  9466  	}
  9467  	// match: (IsSliceInBounds (Const32 [c]) (Const32 [d]))
  9468  	// result: (ConstBool [0 <= c && c <= d])
  9469  	for {
  9470  		if v_0.Op != OpConst32 {
  9471  			break
  9472  		}
  9473  		c := auxIntToInt32(v_0.AuxInt)
  9474  		if v_1.Op != OpConst32 {
  9475  			break
  9476  		}
  9477  		d := auxIntToInt32(v_1.AuxInt)
  9478  		v.reset(OpConstBool)
  9479  		v.AuxInt = boolToAuxInt(0 <= c && c <= d)
  9480  		return true
  9481  	}
  9482  	// match: (IsSliceInBounds (Const64 [c]) (Const64 [d]))
  9483  	// result: (ConstBool [0 <= c && c <= d])
  9484  	for {
  9485  		if v_0.Op != OpConst64 {
  9486  			break
  9487  		}
  9488  		c := auxIntToInt64(v_0.AuxInt)
  9489  		if v_1.Op != OpConst64 {
  9490  			break
  9491  		}
  9492  		d := auxIntToInt64(v_1.AuxInt)
  9493  		v.reset(OpConstBool)
  9494  		v.AuxInt = boolToAuxInt(0 <= c && c <= d)
  9495  		return true
  9496  	}
  9497  	// match: (IsSliceInBounds (SliceLen x) (SliceCap x))
  9498  	// result: (ConstBool [true])
  9499  	for {
  9500  		if v_0.Op != OpSliceLen {
  9501  			break
  9502  		}
  9503  		x := v_0.Args[0]
  9504  		if v_1.Op != OpSliceCap || x != v_1.Args[0] {
  9505  			break
  9506  		}
  9507  		v.reset(OpConstBool)
  9508  		v.AuxInt = boolToAuxInt(true)
  9509  		return true
  9510  	}
  9511  	return false
  9512  }
  9513  func rewriteValuegeneric_OpLeq16(v *Value) bool {
  9514  	v_1 := v.Args[1]
  9515  	v_0 := v.Args[0]
  9516  	// match: (Leq16 (Const16 [c]) (Const16 [d]))
  9517  	// result: (ConstBool [c <= d])
  9518  	for {
  9519  		if v_0.Op != OpConst16 {
  9520  			break
  9521  		}
  9522  		c := auxIntToInt16(v_0.AuxInt)
  9523  		if v_1.Op != OpConst16 {
  9524  			break
  9525  		}
  9526  		d := auxIntToInt16(v_1.AuxInt)
  9527  		v.reset(OpConstBool)
  9528  		v.AuxInt = boolToAuxInt(c <= d)
  9529  		return true
  9530  	}
  9531  	// match: (Leq16 (Const16 [0]) (And16 _ (Const16 [c])))
  9532  	// cond: c >= 0
  9533  	// result: (ConstBool [true])
  9534  	for {
  9535  		if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
  9536  			break
  9537  		}
  9538  		_ = v_1.Args[1]
  9539  		v_1_0 := v_1.Args[0]
  9540  		v_1_1 := v_1.Args[1]
  9541  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
  9542  			if v_1_1.Op != OpConst16 {
  9543  				continue
  9544  			}
  9545  			c := auxIntToInt16(v_1_1.AuxInt)
  9546  			if !(c >= 0) {
  9547  				continue
  9548  			}
  9549  			v.reset(OpConstBool)
  9550  			v.AuxInt = boolToAuxInt(true)
  9551  			return true
  9552  		}
  9553  		break
  9554  	}
  9555  	// match: (Leq16 (Const16 [0]) (Rsh16Ux64 _ (Const64 [c])))
  9556  	// cond: c > 0
  9557  	// result: (ConstBool [true])
  9558  	for {
  9559  		if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
  9560  			break
  9561  		}
  9562  		_ = v_1.Args[1]
  9563  		v_1_1 := v_1.Args[1]
  9564  		if v_1_1.Op != OpConst64 {
  9565  			break
  9566  		}
  9567  		c := auxIntToInt64(v_1_1.AuxInt)
  9568  		if !(c > 0) {
  9569  			break
  9570  		}
  9571  		v.reset(OpConstBool)
  9572  		v.AuxInt = boolToAuxInt(true)
  9573  		return true
  9574  	}
  9575  	return false
  9576  }
  9577  func rewriteValuegeneric_OpLeq16U(v *Value) bool {
  9578  	v_1 := v.Args[1]
  9579  	v_0 := v.Args[0]
  9580  	// match: (Leq16U (Const16 [c]) (Const16 [d]))
  9581  	// result: (ConstBool [uint16(c) <= uint16(d)])
  9582  	for {
  9583  		if v_0.Op != OpConst16 {
  9584  			break
  9585  		}
  9586  		c := auxIntToInt16(v_0.AuxInt)
  9587  		if v_1.Op != OpConst16 {
  9588  			break
  9589  		}
  9590  		d := auxIntToInt16(v_1.AuxInt)
  9591  		v.reset(OpConstBool)
  9592  		v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
  9593  		return true
  9594  	}
  9595  	// match: (Leq16U (Const16 [0]) _)
  9596  	// result: (ConstBool [true])
  9597  	for {
  9598  		if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
  9599  			break
  9600  		}
  9601  		v.reset(OpConstBool)
  9602  		v.AuxInt = boolToAuxInt(true)
  9603  		return true
  9604  	}
  9605  	return false
  9606  }
  9607  func rewriteValuegeneric_OpLeq32(v *Value) bool {
  9608  	v_1 := v.Args[1]
  9609  	v_0 := v.Args[0]
  9610  	// match: (Leq32 (Const32 [c]) (Const32 [d]))
  9611  	// result: (ConstBool [c <= d])
  9612  	for {
  9613  		if v_0.Op != OpConst32 {
  9614  			break
  9615  		}
  9616  		c := auxIntToInt32(v_0.AuxInt)
  9617  		if v_1.Op != OpConst32 {
  9618  			break
  9619  		}
  9620  		d := auxIntToInt32(v_1.AuxInt)
  9621  		v.reset(OpConstBool)
  9622  		v.AuxInt = boolToAuxInt(c <= d)
  9623  		return true
  9624  	}
  9625  	// match: (Leq32 (Const32 [0]) (And32 _ (Const32 [c])))
  9626  	// cond: c >= 0
  9627  	// result: (ConstBool [true])
  9628  	for {
  9629  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
  9630  			break
  9631  		}
  9632  		_ = v_1.Args[1]
  9633  		v_1_0 := v_1.Args[0]
  9634  		v_1_1 := v_1.Args[1]
  9635  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
  9636  			if v_1_1.Op != OpConst32 {
  9637  				continue
  9638  			}
  9639  			c := auxIntToInt32(v_1_1.AuxInt)
  9640  			if !(c >= 0) {
  9641  				continue
  9642  			}
  9643  			v.reset(OpConstBool)
  9644  			v.AuxInt = boolToAuxInt(true)
  9645  			return true
  9646  		}
  9647  		break
  9648  	}
  9649  	// match: (Leq32 (Const32 [0]) (Rsh32Ux64 _ (Const64 [c])))
  9650  	// cond: c > 0
  9651  	// result: (ConstBool [true])
  9652  	for {
  9653  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
  9654  			break
  9655  		}
  9656  		_ = v_1.Args[1]
  9657  		v_1_1 := v_1.Args[1]
  9658  		if v_1_1.Op != OpConst64 {
  9659  			break
  9660  		}
  9661  		c := auxIntToInt64(v_1_1.AuxInt)
  9662  		if !(c > 0) {
  9663  			break
  9664  		}
  9665  		v.reset(OpConstBool)
  9666  		v.AuxInt = boolToAuxInt(true)
  9667  		return true
  9668  	}
  9669  	return false
  9670  }
  9671  func rewriteValuegeneric_OpLeq32F(v *Value) bool {
  9672  	v_1 := v.Args[1]
  9673  	v_0 := v.Args[0]
  9674  	// match: (Leq32F (Const32F [c]) (Const32F [d]))
  9675  	// result: (ConstBool [c <= d])
  9676  	for {
  9677  		if v_0.Op != OpConst32F {
  9678  			break
  9679  		}
  9680  		c := auxIntToFloat32(v_0.AuxInt)
  9681  		if v_1.Op != OpConst32F {
  9682  			break
  9683  		}
  9684  		d := auxIntToFloat32(v_1.AuxInt)
  9685  		v.reset(OpConstBool)
  9686  		v.AuxInt = boolToAuxInt(c <= d)
  9687  		return true
  9688  	}
  9689  	return false
  9690  }
  9691  func rewriteValuegeneric_OpLeq32U(v *Value) bool {
  9692  	v_1 := v.Args[1]
  9693  	v_0 := v.Args[0]
  9694  	// match: (Leq32U (Const32 [c]) (Const32 [d]))
  9695  	// result: (ConstBool [uint32(c) <= uint32(d)])
  9696  	for {
  9697  		if v_0.Op != OpConst32 {
  9698  			break
  9699  		}
  9700  		c := auxIntToInt32(v_0.AuxInt)
  9701  		if v_1.Op != OpConst32 {
  9702  			break
  9703  		}
  9704  		d := auxIntToInt32(v_1.AuxInt)
  9705  		v.reset(OpConstBool)
  9706  		v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
  9707  		return true
  9708  	}
  9709  	// match: (Leq32U (Const32 [0]) _)
  9710  	// result: (ConstBool [true])
  9711  	for {
  9712  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
  9713  			break
  9714  		}
  9715  		v.reset(OpConstBool)
  9716  		v.AuxInt = boolToAuxInt(true)
  9717  		return true
  9718  	}
  9719  	return false
  9720  }
  9721  func rewriteValuegeneric_OpLeq64(v *Value) bool {
  9722  	v_1 := v.Args[1]
  9723  	v_0 := v.Args[0]
  9724  	// match: (Leq64 (Const64 [c]) (Const64 [d]))
  9725  	// result: (ConstBool [c <= d])
  9726  	for {
  9727  		if v_0.Op != OpConst64 {
  9728  			break
  9729  		}
  9730  		c := auxIntToInt64(v_0.AuxInt)
  9731  		if v_1.Op != OpConst64 {
  9732  			break
  9733  		}
  9734  		d := auxIntToInt64(v_1.AuxInt)
  9735  		v.reset(OpConstBool)
  9736  		v.AuxInt = boolToAuxInt(c <= d)
  9737  		return true
  9738  	}
  9739  	// match: (Leq64 (Const64 [0]) (And64 _ (Const64 [c])))
  9740  	// cond: c >= 0
  9741  	// result: (ConstBool [true])
  9742  	for {
  9743  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
  9744  			break
  9745  		}
  9746  		_ = v_1.Args[1]
  9747  		v_1_0 := v_1.Args[0]
  9748  		v_1_1 := v_1.Args[1]
  9749  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
  9750  			if v_1_1.Op != OpConst64 {
  9751  				continue
  9752  			}
  9753  			c := auxIntToInt64(v_1_1.AuxInt)
  9754  			if !(c >= 0) {
  9755  				continue
  9756  			}
  9757  			v.reset(OpConstBool)
  9758  			v.AuxInt = boolToAuxInt(true)
  9759  			return true
  9760  		}
  9761  		break
  9762  	}
  9763  	// match: (Leq64 (Const64 [0]) (Rsh64Ux64 _ (Const64 [c])))
  9764  	// cond: c > 0
  9765  	// result: (ConstBool [true])
  9766  	for {
  9767  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
  9768  			break
  9769  		}
  9770  		_ = v_1.Args[1]
  9771  		v_1_1 := v_1.Args[1]
  9772  		if v_1_1.Op != OpConst64 {
  9773  			break
  9774  		}
  9775  		c := auxIntToInt64(v_1_1.AuxInt)
  9776  		if !(c > 0) {
  9777  			break
  9778  		}
  9779  		v.reset(OpConstBool)
  9780  		v.AuxInt = boolToAuxInt(true)
  9781  		return true
  9782  	}
  9783  	return false
  9784  }
  9785  func rewriteValuegeneric_OpLeq64F(v *Value) bool {
  9786  	v_1 := v.Args[1]
  9787  	v_0 := v.Args[0]
  9788  	// match: (Leq64F (Const64F [c]) (Const64F [d]))
  9789  	// result: (ConstBool [c <= d])
  9790  	for {
  9791  		if v_0.Op != OpConst64F {
  9792  			break
  9793  		}
  9794  		c := auxIntToFloat64(v_0.AuxInt)
  9795  		if v_1.Op != OpConst64F {
  9796  			break
  9797  		}
  9798  		d := auxIntToFloat64(v_1.AuxInt)
  9799  		v.reset(OpConstBool)
  9800  		v.AuxInt = boolToAuxInt(c <= d)
  9801  		return true
  9802  	}
  9803  	return false
  9804  }
  9805  func rewriteValuegeneric_OpLeq64U(v *Value) bool {
  9806  	v_1 := v.Args[1]
  9807  	v_0 := v.Args[0]
  9808  	// match: (Leq64U (Const64 [c]) (Const64 [d]))
  9809  	// result: (ConstBool [uint64(c) <= uint64(d)])
  9810  	for {
  9811  		if v_0.Op != OpConst64 {
  9812  			break
  9813  		}
  9814  		c := auxIntToInt64(v_0.AuxInt)
  9815  		if v_1.Op != OpConst64 {
  9816  			break
  9817  		}
  9818  		d := auxIntToInt64(v_1.AuxInt)
  9819  		v.reset(OpConstBool)
  9820  		v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
  9821  		return true
  9822  	}
  9823  	// match: (Leq64U (Const64 [0]) _)
  9824  	// result: (ConstBool [true])
  9825  	for {
  9826  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
  9827  			break
  9828  		}
  9829  		v.reset(OpConstBool)
  9830  		v.AuxInt = boolToAuxInt(true)
  9831  		return true
  9832  	}
  9833  	return false
  9834  }
  9835  func rewriteValuegeneric_OpLeq8(v *Value) bool {
  9836  	v_1 := v.Args[1]
  9837  	v_0 := v.Args[0]
  9838  	// match: (Leq8 (Const8 [c]) (Const8 [d]))
  9839  	// result: (ConstBool [c <= d])
  9840  	for {
  9841  		if v_0.Op != OpConst8 {
  9842  			break
  9843  		}
  9844  		c := auxIntToInt8(v_0.AuxInt)
  9845  		if v_1.Op != OpConst8 {
  9846  			break
  9847  		}
  9848  		d := auxIntToInt8(v_1.AuxInt)
  9849  		v.reset(OpConstBool)
  9850  		v.AuxInt = boolToAuxInt(c <= d)
  9851  		return true
  9852  	}
  9853  	// match: (Leq8 (Const8 [0]) (And8 _ (Const8 [c])))
  9854  	// cond: c >= 0
  9855  	// result: (ConstBool [true])
  9856  	for {
  9857  		if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
  9858  			break
  9859  		}
  9860  		_ = v_1.Args[1]
  9861  		v_1_0 := v_1.Args[0]
  9862  		v_1_1 := v_1.Args[1]
  9863  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
  9864  			if v_1_1.Op != OpConst8 {
  9865  				continue
  9866  			}
  9867  			c := auxIntToInt8(v_1_1.AuxInt)
  9868  			if !(c >= 0) {
  9869  				continue
  9870  			}
  9871  			v.reset(OpConstBool)
  9872  			v.AuxInt = boolToAuxInt(true)
  9873  			return true
  9874  		}
  9875  		break
  9876  	}
  9877  	// match: (Leq8 (Const8 [0]) (Rsh8Ux64 _ (Const64 [c])))
  9878  	// cond: c > 0
  9879  	// result: (ConstBool [true])
  9880  	for {
  9881  		if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
  9882  			break
  9883  		}
  9884  		_ = v_1.Args[1]
  9885  		v_1_1 := v_1.Args[1]
  9886  		if v_1_1.Op != OpConst64 {
  9887  			break
  9888  		}
  9889  		c := auxIntToInt64(v_1_1.AuxInt)
  9890  		if !(c > 0) {
  9891  			break
  9892  		}
  9893  		v.reset(OpConstBool)
  9894  		v.AuxInt = boolToAuxInt(true)
  9895  		return true
  9896  	}
  9897  	return false
  9898  }
  9899  func rewriteValuegeneric_OpLeq8U(v *Value) bool {
  9900  	v_1 := v.Args[1]
  9901  	v_0 := v.Args[0]
  9902  	// match: (Leq8U (Const8 [c]) (Const8 [d]))
  9903  	// result: (ConstBool [ uint8(c) <= uint8(d)])
  9904  	for {
  9905  		if v_0.Op != OpConst8 {
  9906  			break
  9907  		}
  9908  		c := auxIntToInt8(v_0.AuxInt)
  9909  		if v_1.Op != OpConst8 {
  9910  			break
  9911  		}
  9912  		d := auxIntToInt8(v_1.AuxInt)
  9913  		v.reset(OpConstBool)
  9914  		v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
  9915  		return true
  9916  	}
  9917  	// match: (Leq8U (Const8 [0]) _)
  9918  	// result: (ConstBool [true])
  9919  	for {
  9920  		if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
  9921  			break
  9922  		}
  9923  		v.reset(OpConstBool)
  9924  		v.AuxInt = boolToAuxInt(true)
  9925  		return true
  9926  	}
  9927  	return false
  9928  }
  9929  func rewriteValuegeneric_OpLess16(v *Value) bool {
  9930  	v_1 := v.Args[1]
  9931  	v_0 := v.Args[0]
  9932  	// match: (Less16 (Const16 [c]) (Const16 [d]))
  9933  	// result: (ConstBool [c < d])
  9934  	for {
  9935  		if v_0.Op != OpConst16 {
  9936  			break
  9937  		}
  9938  		c := auxIntToInt16(v_0.AuxInt)
  9939  		if v_1.Op != OpConst16 {
  9940  			break
  9941  		}
  9942  		d := auxIntToInt16(v_1.AuxInt)
  9943  		v.reset(OpConstBool)
  9944  		v.AuxInt = boolToAuxInt(c < d)
  9945  		return true
  9946  	}
  9947  	return false
  9948  }
  9949  func rewriteValuegeneric_OpLess16U(v *Value) bool {
  9950  	v_1 := v.Args[1]
  9951  	v_0 := v.Args[0]
  9952  	// match: (Less16U (Const16 [c]) (Const16 [d]))
  9953  	// result: (ConstBool [uint16(c) < uint16(d)])
  9954  	for {
  9955  		if v_0.Op != OpConst16 {
  9956  			break
  9957  		}
  9958  		c := auxIntToInt16(v_0.AuxInt)
  9959  		if v_1.Op != OpConst16 {
  9960  			break
  9961  		}
  9962  		d := auxIntToInt16(v_1.AuxInt)
  9963  		v.reset(OpConstBool)
  9964  		v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
  9965  		return true
  9966  	}
  9967  	// match: (Less16U _ (Const16 [0]))
  9968  	// result: (ConstBool [false])
  9969  	for {
  9970  		if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
  9971  			break
  9972  		}
  9973  		v.reset(OpConstBool)
  9974  		v.AuxInt = boolToAuxInt(false)
  9975  		return true
  9976  	}
  9977  	return false
  9978  }
  9979  func rewriteValuegeneric_OpLess32(v *Value) bool {
  9980  	v_1 := v.Args[1]
  9981  	v_0 := v.Args[0]
  9982  	// match: (Less32 (Const32 [c]) (Const32 [d]))
  9983  	// result: (ConstBool [c < d])
  9984  	for {
  9985  		if v_0.Op != OpConst32 {
  9986  			break
  9987  		}
  9988  		c := auxIntToInt32(v_0.AuxInt)
  9989  		if v_1.Op != OpConst32 {
  9990  			break
  9991  		}
  9992  		d := auxIntToInt32(v_1.AuxInt)
  9993  		v.reset(OpConstBool)
  9994  		v.AuxInt = boolToAuxInt(c < d)
  9995  		return true
  9996  	}
  9997  	return false
  9998  }
  9999  func rewriteValuegeneric_OpLess32F(v *Value) bool {
 10000  	v_1 := v.Args[1]
 10001  	v_0 := v.Args[0]
 10002  	// match: (Less32F (Const32F [c]) (Const32F [d]))
 10003  	// result: (ConstBool [c < d])
 10004  	for {
 10005  		if v_0.Op != OpConst32F {
 10006  			break
 10007  		}
 10008  		c := auxIntToFloat32(v_0.AuxInt)
 10009  		if v_1.Op != OpConst32F {
 10010  			break
 10011  		}
 10012  		d := auxIntToFloat32(v_1.AuxInt)
 10013  		v.reset(OpConstBool)
 10014  		v.AuxInt = boolToAuxInt(c < d)
 10015  		return true
 10016  	}
 10017  	return false
 10018  }
 10019  func rewriteValuegeneric_OpLess32U(v *Value) bool {
 10020  	v_1 := v.Args[1]
 10021  	v_0 := v.Args[0]
 10022  	// match: (Less32U (Const32 [c]) (Const32 [d]))
 10023  	// result: (ConstBool [uint32(c) < uint32(d)])
 10024  	for {
 10025  		if v_0.Op != OpConst32 {
 10026  			break
 10027  		}
 10028  		c := auxIntToInt32(v_0.AuxInt)
 10029  		if v_1.Op != OpConst32 {
 10030  			break
 10031  		}
 10032  		d := auxIntToInt32(v_1.AuxInt)
 10033  		v.reset(OpConstBool)
 10034  		v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
 10035  		return true
 10036  	}
 10037  	// match: (Less32U _ (Const32 [0]))
 10038  	// result: (ConstBool [false])
 10039  	for {
 10040  		if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
 10041  			break
 10042  		}
 10043  		v.reset(OpConstBool)
 10044  		v.AuxInt = boolToAuxInt(false)
 10045  		return true
 10046  	}
 10047  	return false
 10048  }
 10049  func rewriteValuegeneric_OpLess64(v *Value) bool {
 10050  	v_1 := v.Args[1]
 10051  	v_0 := v.Args[0]
 10052  	// match: (Less64 (Const64 [c]) (Const64 [d]))
 10053  	// result: (ConstBool [c < d])
 10054  	for {
 10055  		if v_0.Op != OpConst64 {
 10056  			break
 10057  		}
 10058  		c := auxIntToInt64(v_0.AuxInt)
 10059  		if v_1.Op != OpConst64 {
 10060  			break
 10061  		}
 10062  		d := auxIntToInt64(v_1.AuxInt)
 10063  		v.reset(OpConstBool)
 10064  		v.AuxInt = boolToAuxInt(c < d)
 10065  		return true
 10066  	}
 10067  	return false
 10068  }
 10069  func rewriteValuegeneric_OpLess64F(v *Value) bool {
 10070  	v_1 := v.Args[1]
 10071  	v_0 := v.Args[0]
 10072  	// match: (Less64F (Const64F [c]) (Const64F [d]))
 10073  	// result: (ConstBool [c < d])
 10074  	for {
 10075  		if v_0.Op != OpConst64F {
 10076  			break
 10077  		}
 10078  		c := auxIntToFloat64(v_0.AuxInt)
 10079  		if v_1.Op != OpConst64F {
 10080  			break
 10081  		}
 10082  		d := auxIntToFloat64(v_1.AuxInt)
 10083  		v.reset(OpConstBool)
 10084  		v.AuxInt = boolToAuxInt(c < d)
 10085  		return true
 10086  	}
 10087  	return false
 10088  }
 10089  func rewriteValuegeneric_OpLess64U(v *Value) bool {
 10090  	v_1 := v.Args[1]
 10091  	v_0 := v.Args[0]
 10092  	// match: (Less64U (Const64 [c]) (Const64 [d]))
 10093  	// result: (ConstBool [uint64(c) < uint64(d)])
 10094  	for {
 10095  		if v_0.Op != OpConst64 {
 10096  			break
 10097  		}
 10098  		c := auxIntToInt64(v_0.AuxInt)
 10099  		if v_1.Op != OpConst64 {
 10100  			break
 10101  		}
 10102  		d := auxIntToInt64(v_1.AuxInt)
 10103  		v.reset(OpConstBool)
 10104  		v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
 10105  		return true
 10106  	}
 10107  	// match: (Less64U _ (Const64 [0]))
 10108  	// result: (ConstBool [false])
 10109  	for {
 10110  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
 10111  			break
 10112  		}
 10113  		v.reset(OpConstBool)
 10114  		v.AuxInt = boolToAuxInt(false)
 10115  		return true
 10116  	}
 10117  	return false
 10118  }
 10119  func rewriteValuegeneric_OpLess8(v *Value) bool {
 10120  	v_1 := v.Args[1]
 10121  	v_0 := v.Args[0]
 10122  	// match: (Less8 (Const8 [c]) (Const8 [d]))
 10123  	// result: (ConstBool [c < d])
 10124  	for {
 10125  		if v_0.Op != OpConst8 {
 10126  			break
 10127  		}
 10128  		c := auxIntToInt8(v_0.AuxInt)
 10129  		if v_1.Op != OpConst8 {
 10130  			break
 10131  		}
 10132  		d := auxIntToInt8(v_1.AuxInt)
 10133  		v.reset(OpConstBool)
 10134  		v.AuxInt = boolToAuxInt(c < d)
 10135  		return true
 10136  	}
 10137  	return false
 10138  }
 10139  func rewriteValuegeneric_OpLess8U(v *Value) bool {
 10140  	v_1 := v.Args[1]
 10141  	v_0 := v.Args[0]
 10142  	// match: (Less8U (Const8 [c]) (Const8 [d]))
 10143  	// result: (ConstBool [ uint8(c) < uint8(d)])
 10144  	for {
 10145  		if v_0.Op != OpConst8 {
 10146  			break
 10147  		}
 10148  		c := auxIntToInt8(v_0.AuxInt)
 10149  		if v_1.Op != OpConst8 {
 10150  			break
 10151  		}
 10152  		d := auxIntToInt8(v_1.AuxInt)
 10153  		v.reset(OpConstBool)
 10154  		v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
 10155  		return true
 10156  	}
 10157  	// match: (Less8U _ (Const8 [0]))
 10158  	// result: (ConstBool [false])
 10159  	for {
 10160  		if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
 10161  			break
 10162  		}
 10163  		v.reset(OpConstBool)
 10164  		v.AuxInt = boolToAuxInt(false)
 10165  		return true
 10166  	}
 10167  	return false
 10168  }
 10169  func rewriteValuegeneric_OpLoad(v *Value) bool {
 10170  	v_1 := v.Args[1]
 10171  	v_0 := v.Args[0]
 10172  	b := v.Block
 10173  	fe := b.Func.fe
 10174  	// match: (Load <t1> p1 (Store {t2} p2 x _))
 10175  	// cond: isSamePtr(p1, p2) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size()
 10176  	// result: x
 10177  	for {
 10178  		t1 := v.Type
 10179  		p1 := v_0
 10180  		if v_1.Op != OpStore {
 10181  			break
 10182  		}
 10183  		t2 := auxToType(v_1.Aux)
 10184  		x := v_1.Args[1]
 10185  		p2 := v_1.Args[0]
 10186  		if !(isSamePtr(p1, p2) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size()) {
 10187  			break
 10188  		}
 10189  		v.copyOf(x)
 10190  		return true
 10191  	}
 10192  	// match: (Load <t1> p1 (Store {t2} p2 _ (Store {t3} p3 x _)))
 10193  	// cond: isSamePtr(p1, p3) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p3, t3.Size(), p2, t2.Size())
 10194  	// result: x
 10195  	for {
 10196  		t1 := v.Type
 10197  		p1 := v_0
 10198  		if v_1.Op != OpStore {
 10199  			break
 10200  		}
 10201  		t2 := auxToType(v_1.Aux)
 10202  		_ = v_1.Args[2]
 10203  		p2 := v_1.Args[0]
 10204  		v_1_2 := v_1.Args[2]
 10205  		if v_1_2.Op != OpStore {
 10206  			break
 10207  		}
 10208  		t3 := auxToType(v_1_2.Aux)
 10209  		x := v_1_2.Args[1]
 10210  		p3 := v_1_2.Args[0]
 10211  		if !(isSamePtr(p1, p3) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
 10212  			break
 10213  		}
 10214  		v.copyOf(x)
 10215  		return true
 10216  	}
 10217  	// match: (Load <t1> p1 (Store {t2} p2 _ (Store {t3} p3 _ (Store {t4} p4 x _))))
 10218  	// cond: isSamePtr(p1, p4) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p4, t4.Size(), p2, t2.Size()) && disjoint(p4, t4.Size(), p3, t3.Size())
 10219  	// result: x
 10220  	for {
 10221  		t1 := v.Type
 10222  		p1 := v_0
 10223  		if v_1.Op != OpStore {
 10224  			break
 10225  		}
 10226  		t2 := auxToType(v_1.Aux)
 10227  		_ = v_1.Args[2]
 10228  		p2 := v_1.Args[0]
 10229  		v_1_2 := v_1.Args[2]
 10230  		if v_1_2.Op != OpStore {
 10231  			break
 10232  		}
 10233  		t3 := auxToType(v_1_2.Aux)
 10234  		_ = v_1_2.Args[2]
 10235  		p3 := v_1_2.Args[0]
 10236  		v_1_2_2 := v_1_2.Args[2]
 10237  		if v_1_2_2.Op != OpStore {
 10238  			break
 10239  		}
 10240  		t4 := auxToType(v_1_2_2.Aux)
 10241  		x := v_1_2_2.Args[1]
 10242  		p4 := v_1_2_2.Args[0]
 10243  		if !(isSamePtr(p1, p4) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p4, t4.Size(), p2, t2.Size()) && disjoint(p4, t4.Size(), p3, t3.Size())) {
 10244  			break
 10245  		}
 10246  		v.copyOf(x)
 10247  		return true
 10248  	}
 10249  	// match: (Load <t1> p1 (Store {t2} p2 _ (Store {t3} p3 _ (Store {t4} p4 _ (Store {t5} p5 x _)))))
 10250  	// cond: isSamePtr(p1, p5) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p5, t5.Size(), p2, t2.Size()) && disjoint(p5, t5.Size(), p3, t3.Size()) && disjoint(p5, t5.Size(), p4, t4.Size())
 10251  	// result: x
 10252  	for {
 10253  		t1 := v.Type
 10254  		p1 := v_0
 10255  		if v_1.Op != OpStore {
 10256  			break
 10257  		}
 10258  		t2 := auxToType(v_1.Aux)
 10259  		_ = v_1.Args[2]
 10260  		p2 := v_1.Args[0]
 10261  		v_1_2 := v_1.Args[2]
 10262  		if v_1_2.Op != OpStore {
 10263  			break
 10264  		}
 10265  		t3 := auxToType(v_1_2.Aux)
 10266  		_ = v_1_2.Args[2]
 10267  		p3 := v_1_2.Args[0]
 10268  		v_1_2_2 := v_1_2.Args[2]
 10269  		if v_1_2_2.Op != OpStore {
 10270  			break
 10271  		}
 10272  		t4 := auxToType(v_1_2_2.Aux)
 10273  		_ = v_1_2_2.Args[2]
 10274  		p4 := v_1_2_2.Args[0]
 10275  		v_1_2_2_2 := v_1_2_2.Args[2]
 10276  		if v_1_2_2_2.Op != OpStore {
 10277  			break
 10278  		}
 10279  		t5 := auxToType(v_1_2_2_2.Aux)
 10280  		x := v_1_2_2_2.Args[1]
 10281  		p5 := v_1_2_2_2.Args[0]
 10282  		if !(isSamePtr(p1, p5) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p5, t5.Size(), p2, t2.Size()) && disjoint(p5, t5.Size(), p3, t3.Size()) && disjoint(p5, t5.Size(), p4, t4.Size())) {
 10283  			break
 10284  		}
 10285  		v.copyOf(x)
 10286  		return true
 10287  	}
 10288  	// match: (Load <t1> p1 (Store {t2} p2 (Const64 [x]) _))
 10289  	// cond: isSamePtr(p1,p2) && sizeof(t2) == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))
 10290  	// result: (Const64F [math.Float64frombits(uint64(x))])
 10291  	for {
 10292  		t1 := v.Type
 10293  		p1 := v_0
 10294  		if v_1.Op != OpStore {
 10295  			break
 10296  		}
 10297  		t2 := auxToType(v_1.Aux)
 10298  		_ = v_1.Args[1]
 10299  		p2 := v_1.Args[0]
 10300  		v_1_1 := v_1.Args[1]
 10301  		if v_1_1.Op != OpConst64 {
 10302  			break
 10303  		}
 10304  		x := auxIntToInt64(v_1_1.AuxInt)
 10305  		if !(isSamePtr(p1, p2) && sizeof(t2) == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
 10306  			break
 10307  		}
 10308  		v.reset(OpConst64F)
 10309  		v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
 10310  		return true
 10311  	}
 10312  	// match: (Load <t1> p1 (Store {t2} p2 (Const32 [x]) _))
 10313  	// cond: isSamePtr(p1,p2) && sizeof(t2) == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))
 10314  	// result: (Const32F [math.Float32frombits(uint32(x))])
 10315  	for {
 10316  		t1 := v.Type
 10317  		p1 := v_0
 10318  		if v_1.Op != OpStore {
 10319  			break
 10320  		}
 10321  		t2 := auxToType(v_1.Aux)
 10322  		_ = v_1.Args[1]
 10323  		p2 := v_1.Args[0]
 10324  		v_1_1 := v_1.Args[1]
 10325  		if v_1_1.Op != OpConst32 {
 10326  			break
 10327  		}
 10328  		x := auxIntToInt32(v_1_1.AuxInt)
 10329  		if !(isSamePtr(p1, p2) && sizeof(t2) == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
 10330  			break
 10331  		}
 10332  		v.reset(OpConst32F)
 10333  		v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
 10334  		return true
 10335  	}
 10336  	// match: (Load <t1> p1 (Store {t2} p2 (Const64F [x]) _))
 10337  	// cond: isSamePtr(p1,p2) && sizeof(t2) == 8 && is64BitInt(t1)
 10338  	// result: (Const64 [int64(math.Float64bits(x))])
 10339  	for {
 10340  		t1 := v.Type
 10341  		p1 := v_0
 10342  		if v_1.Op != OpStore {
 10343  			break
 10344  		}
 10345  		t2 := auxToType(v_1.Aux)
 10346  		_ = v_1.Args[1]
 10347  		p2 := v_1.Args[0]
 10348  		v_1_1 := v_1.Args[1]
 10349  		if v_1_1.Op != OpConst64F {
 10350  			break
 10351  		}
 10352  		x := auxIntToFloat64(v_1_1.AuxInt)
 10353  		if !(isSamePtr(p1, p2) && sizeof(t2) == 8 && is64BitInt(t1)) {
 10354  			break
 10355  		}
 10356  		v.reset(OpConst64)
 10357  		v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
 10358  		return true
 10359  	}
 10360  	// match: (Load <t1> p1 (Store {t2} p2 (Const32F [x]) _))
 10361  	// cond: isSamePtr(p1,p2) && sizeof(t2) == 4 && is32BitInt(t1)
 10362  	// result: (Const32 [int32(math.Float32bits(x))])
 10363  	for {
 10364  		t1 := v.Type
 10365  		p1 := v_0
 10366  		if v_1.Op != OpStore {
 10367  			break
 10368  		}
 10369  		t2 := auxToType(v_1.Aux)
 10370  		_ = v_1.Args[1]
 10371  		p2 := v_1.Args[0]
 10372  		v_1_1 := v_1.Args[1]
 10373  		if v_1_1.Op != OpConst32F {
 10374  			break
 10375  		}
 10376  		x := auxIntToFloat32(v_1_1.AuxInt)
 10377  		if !(isSamePtr(p1, p2) && sizeof(t2) == 4 && is32BitInt(t1)) {
 10378  			break
 10379  		}
 10380  		v.reset(OpConst32)
 10381  		v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
 10382  		return true
 10383  	}
 10384  	// match: (Load <t1> op:(OffPtr [o1] p1) (Store {t2} p2 _ mem:(Zero [n] p3 _)))
 10385  	// cond: o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())
 10386  	// result: @mem.Block (Load <t1> (OffPtr <op.Type> [o1] p3) mem)
 10387  	for {
 10388  		t1 := v.Type
 10389  		op := v_0
 10390  		if op.Op != OpOffPtr {
 10391  			break
 10392  		}
 10393  		o1 := auxIntToInt64(op.AuxInt)
 10394  		p1 := op.Args[0]
 10395  		if v_1.Op != OpStore {
 10396  			break
 10397  		}
 10398  		t2 := auxToType(v_1.Aux)
 10399  		_ = v_1.Args[2]
 10400  		p2 := v_1.Args[0]
 10401  		mem := v_1.Args[2]
 10402  		if mem.Op != OpZero {
 10403  			break
 10404  		}
 10405  		n := auxIntToInt64(mem.AuxInt)
 10406  		p3 := mem.Args[0]
 10407  		if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
 10408  			break
 10409  		}
 10410  		b = mem.Block
 10411  		v0 := b.NewValue0(v.Pos, OpLoad, t1)
 10412  		v.copyOf(v0)
 10413  		v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
 10414  		v1.AuxInt = int64ToAuxInt(o1)
 10415  		v1.AddArg(p3)
 10416  		v0.AddArg2(v1, mem)
 10417  		return true
 10418  	}
 10419  	// match: (Load <t1> op:(OffPtr [o1] p1) (Store {t2} p2 _ (Store {t3} p3 _ mem:(Zero [n] p4 _))))
 10420  	// cond: o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p4) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size())
 10421  	// result: @mem.Block (Load <t1> (OffPtr <op.Type> [o1] p4) mem)
 10422  	for {
 10423  		t1 := v.Type
 10424  		op := v_0
 10425  		if op.Op != OpOffPtr {
 10426  			break
 10427  		}
 10428  		o1 := auxIntToInt64(op.AuxInt)
 10429  		p1 := op.Args[0]
 10430  		if v_1.Op != OpStore {
 10431  			break
 10432  		}
 10433  		t2 := auxToType(v_1.Aux)
 10434  		_ = v_1.Args[2]
 10435  		p2 := v_1.Args[0]
 10436  		v_1_2 := v_1.Args[2]
 10437  		if v_1_2.Op != OpStore {
 10438  			break
 10439  		}
 10440  		t3 := auxToType(v_1_2.Aux)
 10441  		_ = v_1_2.Args[2]
 10442  		p3 := v_1_2.Args[0]
 10443  		mem := v_1_2.Args[2]
 10444  		if mem.Op != OpZero {
 10445  			break
 10446  		}
 10447  		n := auxIntToInt64(mem.AuxInt)
 10448  		p4 := mem.Args[0]
 10449  		if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p4) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size())) {
 10450  			break
 10451  		}
 10452  		b = mem.Block
 10453  		v0 := b.NewValue0(v.Pos, OpLoad, t1)
 10454  		v.copyOf(v0)
 10455  		v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
 10456  		v1.AuxInt = int64ToAuxInt(o1)
 10457  		v1.AddArg(p4)
 10458  		v0.AddArg2(v1, mem)
 10459  		return true
 10460  	}
 10461  	// match: (Load <t1> op:(OffPtr [o1] p1) (Store {t2} p2 _ (Store {t3} p3 _ (Store {t4} p4 _ mem:(Zero [n] p5 _)))))
 10462  	// cond: o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p5) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size())
 10463  	// result: @mem.Block (Load <t1> (OffPtr <op.Type> [o1] p5) mem)
 10464  	for {
 10465  		t1 := v.Type
 10466  		op := v_0
 10467  		if op.Op != OpOffPtr {
 10468  			break
 10469  		}
 10470  		o1 := auxIntToInt64(op.AuxInt)
 10471  		p1 := op.Args[0]
 10472  		if v_1.Op != OpStore {
 10473  			break
 10474  		}
 10475  		t2 := auxToType(v_1.Aux)
 10476  		_ = v_1.Args[2]
 10477  		p2 := v_1.Args[0]
 10478  		v_1_2 := v_1.Args[2]
 10479  		if v_1_2.Op != OpStore {
 10480  			break
 10481  		}
 10482  		t3 := auxToType(v_1_2.Aux)
 10483  		_ = v_1_2.Args[2]
 10484  		p3 := v_1_2.Args[0]
 10485  		v_1_2_2 := v_1_2.Args[2]
 10486  		if v_1_2_2.Op != OpStore {
 10487  			break
 10488  		}
 10489  		t4 := auxToType(v_1_2_2.Aux)
 10490  		_ = v_1_2_2.Args[2]
 10491  		p4 := v_1_2_2.Args[0]
 10492  		mem := v_1_2_2.Args[2]
 10493  		if mem.Op != OpZero {
 10494  			break
 10495  		}
 10496  		n := auxIntToInt64(mem.AuxInt)
 10497  		p5 := mem.Args[0]
 10498  		if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p5) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size())) {
 10499  			break
 10500  		}
 10501  		b = mem.Block
 10502  		v0 := b.NewValue0(v.Pos, OpLoad, t1)
 10503  		v.copyOf(v0)
 10504  		v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
 10505  		v1.AuxInt = int64ToAuxInt(o1)
 10506  		v1.AddArg(p5)
 10507  		v0.AddArg2(v1, mem)
 10508  		return true
 10509  	}
 10510  	// match: (Load <t1> op:(OffPtr [o1] p1) (Store {t2} p2 _ (Store {t3} p3 _ (Store {t4} p4 _ (Store {t5} p5 _ mem:(Zero [n] p6 _))))))
 10511  	// cond: o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p6) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size()) && disjoint(op, t1.Size(), p5, t5.Size())
 10512  	// result: @mem.Block (Load <t1> (OffPtr <op.Type> [o1] p6) mem)
 10513  	for {
 10514  		t1 := v.Type
 10515  		op := v_0
 10516  		if op.Op != OpOffPtr {
 10517  			break
 10518  		}
 10519  		o1 := auxIntToInt64(op.AuxInt)
 10520  		p1 := op.Args[0]
 10521  		if v_1.Op != OpStore {
 10522  			break
 10523  		}
 10524  		t2 := auxToType(v_1.Aux)
 10525  		_ = v_1.Args[2]
 10526  		p2 := v_1.Args[0]
 10527  		v_1_2 := v_1.Args[2]
 10528  		if v_1_2.Op != OpStore {
 10529  			break
 10530  		}
 10531  		t3 := auxToType(v_1_2.Aux)
 10532  		_ = v_1_2.Args[2]
 10533  		p3 := v_1_2.Args[0]
 10534  		v_1_2_2 := v_1_2.Args[2]
 10535  		if v_1_2_2.Op != OpStore {
 10536  			break
 10537  		}
 10538  		t4 := auxToType(v_1_2_2.Aux)
 10539  		_ = v_1_2_2.Args[2]
 10540  		p4 := v_1_2_2.Args[0]
 10541  		v_1_2_2_2 := v_1_2_2.Args[2]
 10542  		if v_1_2_2_2.Op != OpStore {
 10543  			break
 10544  		}
 10545  		t5 := auxToType(v_1_2_2_2.Aux)
 10546  		_ = v_1_2_2_2.Args[2]
 10547  		p5 := v_1_2_2_2.Args[0]
 10548  		mem := v_1_2_2_2.Args[2]
 10549  		if mem.Op != OpZero {
 10550  			break
 10551  		}
 10552  		n := auxIntToInt64(mem.AuxInt)
 10553  		p6 := mem.Args[0]
 10554  		if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p6) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size()) && disjoint(op, t1.Size(), p5, t5.Size())) {
 10555  			break
 10556  		}
 10557  		b = mem.Block
 10558  		v0 := b.NewValue0(v.Pos, OpLoad, t1)
 10559  		v.copyOf(v0)
 10560  		v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
 10561  		v1.AuxInt = int64ToAuxInt(o1)
 10562  		v1.AddArg(p6)
 10563  		v0.AddArg2(v1, mem)
 10564  		return true
 10565  	}
 10566  	// match: (Load <t1> (OffPtr [o] p1) (Zero [n] p2 _))
 10567  	// cond: t1.IsBoolean() && isSamePtr(p1, p2) && n >= o + 1
 10568  	// result: (ConstBool [false])
 10569  	for {
 10570  		t1 := v.Type
 10571  		if v_0.Op != OpOffPtr {
 10572  			break
 10573  		}
 10574  		o := auxIntToInt64(v_0.AuxInt)
 10575  		p1 := v_0.Args[0]
 10576  		if v_1.Op != OpZero {
 10577  			break
 10578  		}
 10579  		n := auxIntToInt64(v_1.AuxInt)
 10580  		p2 := v_1.Args[0]
 10581  		if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
 10582  			break
 10583  		}
 10584  		v.reset(OpConstBool)
 10585  		v.AuxInt = boolToAuxInt(false)
 10586  		return true
 10587  	}
 10588  	// match: (Load <t1> (OffPtr [o] p1) (Zero [n] p2 _))
 10589  	// cond: is8BitInt(t1) && isSamePtr(p1, p2) && n >= o + 1
 10590  	// result: (Const8 [0])
 10591  	for {
 10592  		t1 := v.Type
 10593  		if v_0.Op != OpOffPtr {
 10594  			break
 10595  		}
 10596  		o := auxIntToInt64(v_0.AuxInt)
 10597  		p1 := v_0.Args[0]
 10598  		if v_1.Op != OpZero {
 10599  			break
 10600  		}
 10601  		n := auxIntToInt64(v_1.AuxInt)
 10602  		p2 := v_1.Args[0]
 10603  		if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
 10604  			break
 10605  		}
 10606  		v.reset(OpConst8)
 10607  		v.AuxInt = int8ToAuxInt(0)
 10608  		return true
 10609  	}
 10610  	// match: (Load <t1> (OffPtr [o] p1) (Zero [n] p2 _))
 10611  	// cond: is16BitInt(t1) && isSamePtr(p1, p2) && n >= o + 2
 10612  	// result: (Const16 [0])
 10613  	for {
 10614  		t1 := v.Type
 10615  		if v_0.Op != OpOffPtr {
 10616  			break
 10617  		}
 10618  		o := auxIntToInt64(v_0.AuxInt)
 10619  		p1 := v_0.Args[0]
 10620  		if v_1.Op != OpZero {
 10621  			break
 10622  		}
 10623  		n := auxIntToInt64(v_1.AuxInt)
 10624  		p2 := v_1.Args[0]
 10625  		if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
 10626  			break
 10627  		}
 10628  		v.reset(OpConst16)
 10629  		v.AuxInt = int16ToAuxInt(0)
 10630  		return true
 10631  	}
 10632  	// match: (Load <t1> (OffPtr [o] p1) (Zero [n] p2 _))
 10633  	// cond: is32BitInt(t1) && isSamePtr(p1, p2) && n >= o + 4
 10634  	// result: (Const32 [0])
 10635  	for {
 10636  		t1 := v.Type
 10637  		if v_0.Op != OpOffPtr {
 10638  			break
 10639  		}
 10640  		o := auxIntToInt64(v_0.AuxInt)
 10641  		p1 := v_0.Args[0]
 10642  		if v_1.Op != OpZero {
 10643  			break
 10644  		}
 10645  		n := auxIntToInt64(v_1.AuxInt)
 10646  		p2 := v_1.Args[0]
 10647  		if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
 10648  			break
 10649  		}
 10650  		v.reset(OpConst32)
 10651  		v.AuxInt = int32ToAuxInt(0)
 10652  		return true
 10653  	}
 10654  	// match: (Load <t1> (OffPtr [o] p1) (Zero [n] p2 _))
 10655  	// cond: is64BitInt(t1) && isSamePtr(p1, p2) && n >= o + 8
 10656  	// result: (Const64 [0])
 10657  	for {
 10658  		t1 := v.Type
 10659  		if v_0.Op != OpOffPtr {
 10660  			break
 10661  		}
 10662  		o := auxIntToInt64(v_0.AuxInt)
 10663  		p1 := v_0.Args[0]
 10664  		if v_1.Op != OpZero {
 10665  			break
 10666  		}
 10667  		n := auxIntToInt64(v_1.AuxInt)
 10668  		p2 := v_1.Args[0]
 10669  		if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
 10670  			break
 10671  		}
 10672  		v.reset(OpConst64)
 10673  		v.AuxInt = int64ToAuxInt(0)
 10674  		return true
 10675  	}
 10676  	// match: (Load <t1> (OffPtr [o] p1) (Zero [n] p2 _))
 10677  	// cond: is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o + 4
 10678  	// result: (Const32F [0])
 10679  	for {
 10680  		t1 := v.Type
 10681  		if v_0.Op != OpOffPtr {
 10682  			break
 10683  		}
 10684  		o := auxIntToInt64(v_0.AuxInt)
 10685  		p1 := v_0.Args[0]
 10686  		if v_1.Op != OpZero {
 10687  			break
 10688  		}
 10689  		n := auxIntToInt64(v_1.AuxInt)
 10690  		p2 := v_1.Args[0]
 10691  		if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
 10692  			break
 10693  		}
 10694  		v.reset(OpConst32F)
 10695  		v.AuxInt = float32ToAuxInt(0)
 10696  		return true
 10697  	}
 10698  	// match: (Load <t1> (OffPtr [o] p1) (Zero [n] p2 _))
 10699  	// cond: is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o + 8
 10700  	// result: (Const64F [0])
 10701  	for {
 10702  		t1 := v.Type
 10703  		if v_0.Op != OpOffPtr {
 10704  			break
 10705  		}
 10706  		o := auxIntToInt64(v_0.AuxInt)
 10707  		p1 := v_0.Args[0]
 10708  		if v_1.Op != OpZero {
 10709  			break
 10710  		}
 10711  		n := auxIntToInt64(v_1.AuxInt)
 10712  		p2 := v_1.Args[0]
 10713  		if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
 10714  			break
 10715  		}
 10716  		v.reset(OpConst64F)
 10717  		v.AuxInt = float64ToAuxInt(0)
 10718  		return true
 10719  	}
 10720  	// match: (Load <t> _ _)
 10721  	// cond: t.IsStruct() && t.NumFields() == 0 && fe.CanSSA(t)
 10722  	// result: (StructMake0)
 10723  	for {
 10724  		t := v.Type
 10725  		if !(t.IsStruct() && t.NumFields() == 0 && fe.CanSSA(t)) {
 10726  			break
 10727  		}
 10728  		v.reset(OpStructMake0)
 10729  		return true
 10730  	}
 10731  	// match: (Load <t> ptr mem)
 10732  	// cond: t.IsStruct() && t.NumFields() == 1 && fe.CanSSA(t)
 10733  	// result: (StructMake1 (Load <t.FieldType(0)> (OffPtr <t.FieldType(0).PtrTo()> [0] ptr) mem))
 10734  	for {
 10735  		t := v.Type
 10736  		ptr := v_0
 10737  		mem := v_1
 10738  		if !(t.IsStruct() && t.NumFields() == 1 && fe.CanSSA(t)) {
 10739  			break
 10740  		}
 10741  		v.reset(OpStructMake1)
 10742  		v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
 10743  		v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
 10744  		v1.AuxInt = int64ToAuxInt(0)
 10745  		v1.AddArg(ptr)
 10746  		v0.AddArg2(v1, mem)
 10747  		v.AddArg(v0)
 10748  		return true
 10749  	}
 10750  	// match: (Load <t> ptr mem)
 10751  	// cond: t.IsStruct() && t.NumFields() == 2 && fe.CanSSA(t)
 10752  	// result: (StructMake2 (Load <t.FieldType(0)> (OffPtr <t.FieldType(0).PtrTo()> [0] ptr) mem) (Load <t.FieldType(1)> (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] ptr) mem))
 10753  	for {
 10754  		t := v.Type
 10755  		ptr := v_0
 10756  		mem := v_1
 10757  		if !(t.IsStruct() && t.NumFields() == 2 && fe.CanSSA(t)) {
 10758  			break
 10759  		}
 10760  		v.reset(OpStructMake2)
 10761  		v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
 10762  		v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
 10763  		v1.AuxInt = int64ToAuxInt(0)
 10764  		v1.AddArg(ptr)
 10765  		v0.AddArg2(v1, mem)
 10766  		v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
 10767  		v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
 10768  		v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
 10769  		v3.AddArg(ptr)
 10770  		v2.AddArg2(v3, mem)
 10771  		v.AddArg2(v0, v2)
 10772  		return true
 10773  	}
 10774  	// match: (Load <t> ptr mem)
 10775  	// cond: t.IsStruct() && t.NumFields() == 3 && fe.CanSSA(t)
 10776  	// result: (StructMake3 (Load <t.FieldType(0)> (OffPtr <t.FieldType(0).PtrTo()> [0] ptr) mem) (Load <t.FieldType(1)> (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] ptr) mem) (Load <t.FieldType(2)> (OffPtr <t.FieldType(2).PtrTo()> [t.FieldOff(2)] ptr) mem))
 10777  	for {
 10778  		t := v.Type
 10779  		ptr := v_0
 10780  		mem := v_1
 10781  		if !(t.IsStruct() && t.NumFields() == 3 && fe.CanSSA(t)) {
 10782  			break
 10783  		}
 10784  		v.reset(OpStructMake3)
 10785  		v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
 10786  		v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
 10787  		v1.AuxInt = int64ToAuxInt(0)
 10788  		v1.AddArg(ptr)
 10789  		v0.AddArg2(v1, mem)
 10790  		v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
 10791  		v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
 10792  		v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
 10793  		v3.AddArg(ptr)
 10794  		v2.AddArg2(v3, mem)
 10795  		v4 := b.NewValue0(v.Pos, OpLoad, t.FieldType(2))
 10796  		v5 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
 10797  		v5.AuxInt = int64ToAuxInt(t.FieldOff(2))
 10798  		v5.AddArg(ptr)
 10799  		v4.AddArg2(v5, mem)
 10800  		v.AddArg3(v0, v2, v4)
 10801  		return true
 10802  	}
 10803  	// match: (Load <t> ptr mem)
 10804  	// cond: t.IsStruct() && t.NumFields() == 4 && fe.CanSSA(t)
 10805  	// result: (StructMake4 (Load <t.FieldType(0)> (OffPtr <t.FieldType(0).PtrTo()> [0] ptr) mem) (Load <t.FieldType(1)> (OffPtr <t.FieldType(1).PtrTo()> [t.FieldOff(1)] ptr) mem) (Load <t.FieldType(2)> (OffPtr <t.FieldType(2).PtrTo()> [t.FieldOff(2)] ptr) mem) (Load <t.FieldType(3)> (OffPtr <t.FieldType(3).PtrTo()> [t.FieldOff(3)] ptr) mem))
 10806  	for {
 10807  		t := v.Type
 10808  		ptr := v_0
 10809  		mem := v_1
 10810  		if !(t.IsStruct() && t.NumFields() == 4 && fe.CanSSA(t)) {
 10811  			break
 10812  		}
 10813  		v.reset(OpStructMake4)
 10814  		v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
 10815  		v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
 10816  		v1.AuxInt = int64ToAuxInt(0)
 10817  		v1.AddArg(ptr)
 10818  		v0.AddArg2(v1, mem)
 10819  		v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
 10820  		v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
 10821  		v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
 10822  		v3.AddArg(ptr)
 10823  		v2.AddArg2(v3, mem)
 10824  		v4 := b.NewValue0(v.Pos, OpLoad, t.FieldType(2))
 10825  		v5 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
 10826  		v5.AuxInt = int64ToAuxInt(t.FieldOff(2))
 10827  		v5.AddArg(ptr)
 10828  		v4.AddArg2(v5, mem)
 10829  		v6 := b.NewValue0(v.Pos, OpLoad, t.FieldType(3))
 10830  		v7 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(3).PtrTo())
 10831  		v7.AuxInt = int64ToAuxInt(t.FieldOff(3))
 10832  		v7.AddArg(ptr)
 10833  		v6.AddArg2(v7, mem)
 10834  		v.AddArg4(v0, v2, v4, v6)
 10835  		return true
 10836  	}
 10837  	// match: (Load <t> _ _)
 10838  	// cond: t.IsArray() && t.NumElem() == 0
 10839  	// result: (ArrayMake0)
 10840  	for {
 10841  		t := v.Type
 10842  		if !(t.IsArray() && t.NumElem() == 0) {
 10843  			break
 10844  		}
 10845  		v.reset(OpArrayMake0)
 10846  		return true
 10847  	}
 10848  	// match: (Load <t> ptr mem)
 10849  	// cond: t.IsArray() && t.NumElem() == 1 && fe.CanSSA(t)
 10850  	// result: (ArrayMake1 (Load <t.Elem()> ptr mem))
 10851  	for {
 10852  		t := v.Type
 10853  		ptr := v_0
 10854  		mem := v_1
 10855  		if !(t.IsArray() && t.NumElem() == 1 && fe.CanSSA(t)) {
 10856  			break
 10857  		}
 10858  		v.reset(OpArrayMake1)
 10859  		v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
 10860  		v0.AddArg2(ptr, mem)
 10861  		v.AddArg(v0)
 10862  		return true
 10863  	}
 10864  	return false
 10865  }
 10866  func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
 10867  	v_1 := v.Args[1]
 10868  	v_0 := v.Args[0]
 10869  	b := v.Block
 10870  	// match: (Lsh16x16 <t> x (Const16 [c]))
 10871  	// result: (Lsh16x64 x (Const64 <t> [int64(uint16(c))]))
 10872  	for {
 10873  		t := v.Type
 10874  		x := v_0
 10875  		if v_1.Op != OpConst16 {
 10876  			break
 10877  		}
 10878  		c := auxIntToInt16(v_1.AuxInt)
 10879  		v.reset(OpLsh16x64)
 10880  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 10881  		v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
 10882  		v.AddArg2(x, v0)
 10883  		return true
 10884  	}
 10885  	// match: (Lsh16x16 (Const16 [0]) _)
 10886  	// result: (Const16 [0])
 10887  	for {
 10888  		if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
 10889  			break
 10890  		}
 10891  		v.reset(OpConst16)
 10892  		v.AuxInt = int16ToAuxInt(0)
 10893  		return true
 10894  	}
 10895  	return false
 10896  }
 10897  func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
 10898  	v_1 := v.Args[1]
 10899  	v_0 := v.Args[0]
 10900  	b := v.Block
 10901  	// match: (Lsh16x32 <t> x (Const32 [c]))
 10902  	// result: (Lsh16x64 x (Const64 <t> [int64(uint32(c))]))
 10903  	for {
 10904  		t := v.Type
 10905  		x := v_0
 10906  		if v_1.Op != OpConst32 {
 10907  			break
 10908  		}
 10909  		c := auxIntToInt32(v_1.AuxInt)
 10910  		v.reset(OpLsh16x64)
 10911  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 10912  		v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10913  		v.AddArg2(x, v0)
 10914  		return true
 10915  	}
 10916  	// match: (Lsh16x32 (Const16 [0]) _)
 10917  	// result: (Const16 [0])
 10918  	for {
 10919  		if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
 10920  			break
 10921  		}
 10922  		v.reset(OpConst16)
 10923  		v.AuxInt = int16ToAuxInt(0)
 10924  		return true
 10925  	}
 10926  	return false
 10927  }
 10928  func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
 10929  	v_1 := v.Args[1]
 10930  	v_0 := v.Args[0]
 10931  	b := v.Block
 10932  	typ := &b.Func.Config.Types
 10933  	// match: (Lsh16x64 (Const16 [c]) (Const64 [d]))
 10934  	// result: (Const16 [c << uint64(d)])
 10935  	for {
 10936  		if v_0.Op != OpConst16 {
 10937  			break
 10938  		}
 10939  		c := auxIntToInt16(v_0.AuxInt)
 10940  		if v_1.Op != OpConst64 {
 10941  			break
 10942  		}
 10943  		d := auxIntToInt64(v_1.AuxInt)
 10944  		v.reset(OpConst16)
 10945  		v.AuxInt = int16ToAuxInt(c << uint64(d))
 10946  		return true
 10947  	}
 10948  	// match: (Lsh16x64 x (Const64 [0]))
 10949  	// result: x
 10950  	for {
 10951  		x := v_0
 10952  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
 10953  			break
 10954  		}
 10955  		v.copyOf(x)
 10956  		return true
 10957  	}
 10958  	// match: (Lsh16x64 (Const16 [0]) _)
 10959  	// result: (Const16 [0])
 10960  	for {
 10961  		if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
 10962  			break
 10963  		}
 10964  		v.reset(OpConst16)
 10965  		v.AuxInt = int16ToAuxInt(0)
 10966  		return true
 10967  	}
 10968  	// match: (Lsh16x64 _ (Const64 [c]))
 10969  	// cond: uint64(c) >= 16
 10970  	// result: (Const16 [0])
 10971  	for {
 10972  		if v_1.Op != OpConst64 {
 10973  			break
 10974  		}
 10975  		c := auxIntToInt64(v_1.AuxInt)
 10976  		if !(uint64(c) >= 16) {
 10977  			break
 10978  		}
 10979  		v.reset(OpConst16)
 10980  		v.AuxInt = int16ToAuxInt(0)
 10981  		return true
 10982  	}
 10983  	// match: (Lsh16x64 <t> (Lsh16x64 x (Const64 [c])) (Const64 [d]))
 10984  	// cond: !uaddOvf(c,d)
 10985  	// result: (Lsh16x64 x (Const64 <t> [c+d]))
 10986  	for {
 10987  		t := v.Type
 10988  		if v_0.Op != OpLsh16x64 {
 10989  			break
 10990  		}
 10991  		_ = v_0.Args[1]
 10992  		x := v_0.Args[0]
 10993  		v_0_1 := v_0.Args[1]
 10994  		if v_0_1.Op != OpConst64 {
 10995  			break
 10996  		}
 10997  		c := auxIntToInt64(v_0_1.AuxInt)
 10998  		if v_1.Op != OpConst64 {
 10999  			break
 11000  		}
 11001  		d := auxIntToInt64(v_1.AuxInt)
 11002  		if !(!uaddOvf(c, d)) {
 11003  			break
 11004  		}
 11005  		v.reset(OpLsh16x64)
 11006  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11007  		v0.AuxInt = int64ToAuxInt(c + d)
 11008  		v.AddArg2(x, v0)
 11009  		return true
 11010  	}
 11011  	// match: (Lsh16x64 (Rsh16Ux64 (Lsh16x64 x (Const64 [c1])) (Const64 [c2])) (Const64 [c3]))
 11012  	// cond: uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)
 11013  	// result: (Lsh16x64 x (Const64 <typ.UInt64> [c1-c2+c3]))
 11014  	for {
 11015  		if v_0.Op != OpRsh16Ux64 {
 11016  			break
 11017  		}
 11018  		_ = v_0.Args[1]
 11019  		v_0_0 := v_0.Args[0]
 11020  		if v_0_0.Op != OpLsh16x64 {
 11021  			break
 11022  		}
 11023  		_ = v_0_0.Args[1]
 11024  		x := v_0_0.Args[0]
 11025  		v_0_0_1 := v_0_0.Args[1]
 11026  		if v_0_0_1.Op != OpConst64 {
 11027  			break
 11028  		}
 11029  		c1 := auxIntToInt64(v_0_0_1.AuxInt)
 11030  		v_0_1 := v_0.Args[1]
 11031  		if v_0_1.Op != OpConst64 {
 11032  			break
 11033  		}
 11034  		c2 := auxIntToInt64(v_0_1.AuxInt)
 11035  		if v_1.Op != OpConst64 {
 11036  			break
 11037  		}
 11038  		c3 := auxIntToInt64(v_1.AuxInt)
 11039  		if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
 11040  			break
 11041  		}
 11042  		v.reset(OpLsh16x64)
 11043  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
 11044  		v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
 11045  		v.AddArg2(x, v0)
 11046  		return true
 11047  	}
 11048  	return false
 11049  }
 11050  func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
 11051  	v_1 := v.Args[1]
 11052  	v_0 := v.Args[0]
 11053  	b := v.Block
 11054  	// match: (Lsh16x8 <t> x (Const8 [c]))
 11055  	// result: (Lsh16x64 x (Const64 <t> [int64(uint8(c))]))
 11056  	for {
 11057  		t := v.Type
 11058  		x := v_0
 11059  		if v_1.Op != OpConst8 {
 11060  			break
 11061  		}
 11062  		c := auxIntToInt8(v_1.AuxInt)
 11063  		v.reset(OpLsh16x64)
 11064  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11065  		v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
 11066  		v.AddArg2(x, v0)
 11067  		return true
 11068  	}
 11069  	// match: (Lsh16x8 (Const16 [0]) _)
 11070  	// result: (Const16 [0])
 11071  	for {
 11072  		if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
 11073  			break
 11074  		}
 11075  		v.reset(OpConst16)
 11076  		v.AuxInt = int16ToAuxInt(0)
 11077  		return true
 11078  	}
 11079  	return false
 11080  }
 11081  func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
 11082  	v_1 := v.Args[1]
 11083  	v_0 := v.Args[0]
 11084  	b := v.Block
 11085  	// match: (Lsh32x16 <t> x (Const16 [c]))
 11086  	// result: (Lsh32x64 x (Const64 <t> [int64(uint16(c))]))
 11087  	for {
 11088  		t := v.Type
 11089  		x := v_0
 11090  		if v_1.Op != OpConst16 {
 11091  			break
 11092  		}
 11093  		c := auxIntToInt16(v_1.AuxInt)
 11094  		v.reset(OpLsh32x64)
 11095  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11096  		v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
 11097  		v.AddArg2(x, v0)
 11098  		return true
 11099  	}
 11100  	// match: (Lsh32x16 (Const32 [0]) _)
 11101  	// result: (Const32 [0])
 11102  	for {
 11103  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
 11104  			break
 11105  		}
 11106  		v.reset(OpConst32)
 11107  		v.AuxInt = int32ToAuxInt(0)
 11108  		return true
 11109  	}
 11110  	return false
 11111  }
 11112  func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
 11113  	v_1 := v.Args[1]
 11114  	v_0 := v.Args[0]
 11115  	b := v.Block
 11116  	// match: (Lsh32x32 <t> x (Const32 [c]))
 11117  	// result: (Lsh32x64 x (Const64 <t> [int64(uint32(c))]))
 11118  	for {
 11119  		t := v.Type
 11120  		x := v_0
 11121  		if v_1.Op != OpConst32 {
 11122  			break
 11123  		}
 11124  		c := auxIntToInt32(v_1.AuxInt)
 11125  		v.reset(OpLsh32x64)
 11126  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11127  		v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
 11128  		v.AddArg2(x, v0)
 11129  		return true
 11130  	}
 11131  	// match: (Lsh32x32 (Const32 [0]) _)
 11132  	// result: (Const32 [0])
 11133  	for {
 11134  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
 11135  			break
 11136  		}
 11137  		v.reset(OpConst32)
 11138  		v.AuxInt = int32ToAuxInt(0)
 11139  		return true
 11140  	}
 11141  	return false
 11142  }
 11143  func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
 11144  	v_1 := v.Args[1]
 11145  	v_0 := v.Args[0]
 11146  	b := v.Block
 11147  	typ := &b.Func.Config.Types
 11148  	// match: (Lsh32x64 (Const32 [c]) (Const64 [d]))
 11149  	// result: (Const32 [c << uint64(d)])
 11150  	for {
 11151  		if v_0.Op != OpConst32 {
 11152  			break
 11153  		}
 11154  		c := auxIntToInt32(v_0.AuxInt)
 11155  		if v_1.Op != OpConst64 {
 11156  			break
 11157  		}
 11158  		d := auxIntToInt64(v_1.AuxInt)
 11159  		v.reset(OpConst32)
 11160  		v.AuxInt = int32ToAuxInt(c << uint64(d))
 11161  		return true
 11162  	}
 11163  	// match: (Lsh32x64 x (Const64 [0]))
 11164  	// result: x
 11165  	for {
 11166  		x := v_0
 11167  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
 11168  			break
 11169  		}
 11170  		v.copyOf(x)
 11171  		return true
 11172  	}
 11173  	// match: (Lsh32x64 (Const32 [0]) _)
 11174  	// result: (Const32 [0])
 11175  	for {
 11176  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
 11177  			break
 11178  		}
 11179  		v.reset(OpConst32)
 11180  		v.AuxInt = int32ToAuxInt(0)
 11181  		return true
 11182  	}
 11183  	// match: (Lsh32x64 _ (Const64 [c]))
 11184  	// cond: uint64(c) >= 32
 11185  	// result: (Const32 [0])
 11186  	for {
 11187  		if v_1.Op != OpConst64 {
 11188  			break
 11189  		}
 11190  		c := auxIntToInt64(v_1.AuxInt)
 11191  		if !(uint64(c) >= 32) {
 11192  			break
 11193  		}
 11194  		v.reset(OpConst32)
 11195  		v.AuxInt = int32ToAuxInt(0)
 11196  		return true
 11197  	}
 11198  	// match: (Lsh32x64 <t> (Lsh32x64 x (Const64 [c])) (Const64 [d]))
 11199  	// cond: !uaddOvf(c,d)
 11200  	// result: (Lsh32x64 x (Const64 <t> [c+d]))
 11201  	for {
 11202  		t := v.Type
 11203  		if v_0.Op != OpLsh32x64 {
 11204  			break
 11205  		}
 11206  		_ = v_0.Args[1]
 11207  		x := v_0.Args[0]
 11208  		v_0_1 := v_0.Args[1]
 11209  		if v_0_1.Op != OpConst64 {
 11210  			break
 11211  		}
 11212  		c := auxIntToInt64(v_0_1.AuxInt)
 11213  		if v_1.Op != OpConst64 {
 11214  			break
 11215  		}
 11216  		d := auxIntToInt64(v_1.AuxInt)
 11217  		if !(!uaddOvf(c, d)) {
 11218  			break
 11219  		}
 11220  		v.reset(OpLsh32x64)
 11221  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11222  		v0.AuxInt = int64ToAuxInt(c + d)
 11223  		v.AddArg2(x, v0)
 11224  		return true
 11225  	}
 11226  	// match: (Lsh32x64 (Rsh32Ux64 (Lsh32x64 x (Const64 [c1])) (Const64 [c2])) (Const64 [c3]))
 11227  	// cond: uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)
 11228  	// result: (Lsh32x64 x (Const64 <typ.UInt64> [c1-c2+c3]))
 11229  	for {
 11230  		if v_0.Op != OpRsh32Ux64 {
 11231  			break
 11232  		}
 11233  		_ = v_0.Args[1]
 11234  		v_0_0 := v_0.Args[0]
 11235  		if v_0_0.Op != OpLsh32x64 {
 11236  			break
 11237  		}
 11238  		_ = v_0_0.Args[1]
 11239  		x := v_0_0.Args[0]
 11240  		v_0_0_1 := v_0_0.Args[1]
 11241  		if v_0_0_1.Op != OpConst64 {
 11242  			break
 11243  		}
 11244  		c1 := auxIntToInt64(v_0_0_1.AuxInt)
 11245  		v_0_1 := v_0.Args[1]
 11246  		if v_0_1.Op != OpConst64 {
 11247  			break
 11248  		}
 11249  		c2 := auxIntToInt64(v_0_1.AuxInt)
 11250  		if v_1.Op != OpConst64 {
 11251  			break
 11252  		}
 11253  		c3 := auxIntToInt64(v_1.AuxInt)
 11254  		if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
 11255  			break
 11256  		}
 11257  		v.reset(OpLsh32x64)
 11258  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
 11259  		v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
 11260  		v.AddArg2(x, v0)
 11261  		return true
 11262  	}
 11263  	return false
 11264  }
 11265  func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
 11266  	v_1 := v.Args[1]
 11267  	v_0 := v.Args[0]
 11268  	b := v.Block
 11269  	// match: (Lsh32x8 <t> x (Const8 [c]))
 11270  	// result: (Lsh32x64 x (Const64 <t> [int64(uint8(c))]))
 11271  	for {
 11272  		t := v.Type
 11273  		x := v_0
 11274  		if v_1.Op != OpConst8 {
 11275  			break
 11276  		}
 11277  		c := auxIntToInt8(v_1.AuxInt)
 11278  		v.reset(OpLsh32x64)
 11279  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11280  		v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
 11281  		v.AddArg2(x, v0)
 11282  		return true
 11283  	}
 11284  	// match: (Lsh32x8 (Const32 [0]) _)
 11285  	// result: (Const32 [0])
 11286  	for {
 11287  		if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
 11288  			break
 11289  		}
 11290  		v.reset(OpConst32)
 11291  		v.AuxInt = int32ToAuxInt(0)
 11292  		return true
 11293  	}
 11294  	return false
 11295  }
 11296  func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
 11297  	v_1 := v.Args[1]
 11298  	v_0 := v.Args[0]
 11299  	b := v.Block
 11300  	// match: (Lsh64x16 <t> x (Const16 [c]))
 11301  	// result: (Lsh64x64 x (Const64 <t> [int64(uint16(c))]))
 11302  	for {
 11303  		t := v.Type
 11304  		x := v_0
 11305  		if v_1.Op != OpConst16 {
 11306  			break
 11307  		}
 11308  		c := auxIntToInt16(v_1.AuxInt)
 11309  		v.reset(OpLsh64x64)
 11310  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11311  		v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
 11312  		v.AddArg2(x, v0)
 11313  		return true
 11314  	}
 11315  	// match: (Lsh64x16 (Const64 [0]) _)
 11316  	// result: (Const64 [0])
 11317  	for {
 11318  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
 11319  			break
 11320  		}
 11321  		v.reset(OpConst64)
 11322  		v.AuxInt = int64ToAuxInt(0)
 11323  		return true
 11324  	}
 11325  	return false
 11326  }
 11327  func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
 11328  	v_1 := v.Args[1]
 11329  	v_0 := v.Args[0]
 11330  	b := v.Block
 11331  	// match: (Lsh64x32 <t> x (Const32 [c]))
 11332  	// result: (Lsh64x64 x (Const64 <t> [int64(uint32(c))]))
 11333  	for {
 11334  		t := v.Type
 11335  		x := v_0
 11336  		if v_1.Op != OpConst32 {
 11337  			break
 11338  		}
 11339  		c := auxIntToInt32(v_1.AuxInt)
 11340  		v.reset(OpLsh64x64)
 11341  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11342  		v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
 11343  		v.AddArg2(x, v0)
 11344  		return true
 11345  	}
 11346  	// match: (Lsh64x32 (Const64 [0]) _)
 11347  	// result: (Const64 [0])
 11348  	for {
 11349  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
 11350  			break
 11351  		}
 11352  		v.reset(OpConst64)
 11353  		v.AuxInt = int64ToAuxInt(0)
 11354  		return true
 11355  	}
 11356  	return false
 11357  }
 11358  func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
 11359  	v_1 := v.Args[1]
 11360  	v_0 := v.Args[0]
 11361  	b := v.Block
 11362  	typ := &b.Func.Config.Types
 11363  	// match: (Lsh64x64 (Const64 [c]) (Const64 [d]))
 11364  	// result: (Const64 [c << uint64(d)])
 11365  	for {
 11366  		if v_0.Op != OpConst64 {
 11367  			break
 11368  		}
 11369  		c := auxIntToInt64(v_0.AuxInt)
 11370  		if v_1.Op != OpConst64 {
 11371  			break
 11372  		}
 11373  		d := auxIntToInt64(v_1.AuxInt)
 11374  		v.reset(OpConst64)
 11375  		v.AuxInt = int64ToAuxInt(c << uint64(d))
 11376  		return true
 11377  	}
 11378  	// match: (Lsh64x64 x (Const64 [0]))
 11379  	// result: x
 11380  	for {
 11381  		x := v_0
 11382  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
 11383  			break
 11384  		}
 11385  		v.copyOf(x)
 11386  		return true
 11387  	}
 11388  	// match: (Lsh64x64 (Const64 [0]) _)
 11389  	// result: (Const64 [0])
 11390  	for {
 11391  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
 11392  			break
 11393  		}
 11394  		v.reset(OpConst64)
 11395  		v.AuxInt = int64ToAuxInt(0)
 11396  		return true
 11397  	}
 11398  	// match: (Lsh64x64 _ (Const64 [c]))
 11399  	// cond: uint64(c) >= 64
 11400  	// result: (Const64 [0])
 11401  	for {
 11402  		if v_1.Op != OpConst64 {
 11403  			break
 11404  		}
 11405  		c := auxIntToInt64(v_1.AuxInt)
 11406  		if !(uint64(c) >= 64) {
 11407  			break
 11408  		}
 11409  		v.reset(OpConst64)
 11410  		v.AuxInt = int64ToAuxInt(0)
 11411  		return true
 11412  	}
 11413  	// match: (Lsh64x64 <t> (Lsh64x64 x (Const64 [c])) (Const64 [d]))
 11414  	// cond: !uaddOvf(c,d)
 11415  	// result: (Lsh64x64 x (Const64 <t> [c+d]))
 11416  	for {
 11417  		t := v.Type
 11418  		if v_0.Op != OpLsh64x64 {
 11419  			break
 11420  		}
 11421  		_ = v_0.Args[1]
 11422  		x := v_0.Args[0]
 11423  		v_0_1 := v_0.Args[1]
 11424  		if v_0_1.Op != OpConst64 {
 11425  			break
 11426  		}
 11427  		c := auxIntToInt64(v_0_1.AuxInt)
 11428  		if v_1.Op != OpConst64 {
 11429  			break
 11430  		}
 11431  		d := auxIntToInt64(v_1.AuxInt)
 11432  		if !(!uaddOvf(c, d)) {
 11433  			break
 11434  		}
 11435  		v.reset(OpLsh64x64)
 11436  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11437  		v0.AuxInt = int64ToAuxInt(c + d)
 11438  		v.AddArg2(x, v0)
 11439  		return true
 11440  	}
 11441  	// match: (Lsh64x64 (Rsh64Ux64 (Lsh64x64 x (Const64 [c1])) (Const64 [c2])) (Const64 [c3]))
 11442  	// cond: uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)
 11443  	// result: (Lsh64x64 x (Const64 <typ.UInt64> [c1-c2+c3]))
 11444  	for {
 11445  		if v_0.Op != OpRsh64Ux64 {
 11446  			break
 11447  		}
 11448  		_ = v_0.Args[1]
 11449  		v_0_0 := v_0.Args[0]
 11450  		if v_0_0.Op != OpLsh64x64 {
 11451  			break
 11452  		}
 11453  		_ = v_0_0.Args[1]
 11454  		x := v_0_0.Args[0]
 11455  		v_0_0_1 := v_0_0.Args[1]
 11456  		if v_0_0_1.Op != OpConst64 {
 11457  			break
 11458  		}
 11459  		c1 := auxIntToInt64(v_0_0_1.AuxInt)
 11460  		v_0_1 := v_0.Args[1]
 11461  		if v_0_1.Op != OpConst64 {
 11462  			break
 11463  		}
 11464  		c2 := auxIntToInt64(v_0_1.AuxInt)
 11465  		if v_1.Op != OpConst64 {
 11466  			break
 11467  		}
 11468  		c3 := auxIntToInt64(v_1.AuxInt)
 11469  		if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
 11470  			break
 11471  		}
 11472  		v.reset(OpLsh64x64)
 11473  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
 11474  		v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
 11475  		v.AddArg2(x, v0)
 11476  		return true
 11477  	}
 11478  	return false
 11479  }
 11480  func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
 11481  	v_1 := v.Args[1]
 11482  	v_0 := v.Args[0]
 11483  	b := v.Block
 11484  	// match: (Lsh64x8 <t> x (Const8 [c]))
 11485  	// result: (Lsh64x64 x (Const64 <t> [int64(uint8(c))]))
 11486  	for {
 11487  		t := v.Type
 11488  		x := v_0
 11489  		if v_1.Op != OpConst8 {
 11490  			break
 11491  		}
 11492  		c := auxIntToInt8(v_1.AuxInt)
 11493  		v.reset(OpLsh64x64)
 11494  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11495  		v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
 11496  		v.AddArg2(x, v0)
 11497  		return true
 11498  	}
 11499  	// match: (Lsh64x8 (Const64 [0]) _)
 11500  	// result: (Const64 [0])
 11501  	for {
 11502  		if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
 11503  			break
 11504  		}
 11505  		v.reset(OpConst64)
 11506  		v.AuxInt = int64ToAuxInt(0)
 11507  		return true
 11508  	}
 11509  	return false
 11510  }
 11511  func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
 11512  	v_1 := v.Args[1]
 11513  	v_0 := v.Args[0]
 11514  	b := v.Block
 11515  	// match: (Lsh8x16 <t> x (Const16 [c]))
 11516  	// result: (Lsh8x64 x (Const64 <t> [int64(uint16(c))]))
 11517  	for {
 11518  		t := v.Type
 11519  		x := v_0
 11520  		if v_1.Op != OpConst16 {
 11521  			break
 11522  		}
 11523  		c := auxIntToInt16(v_1.AuxInt)
 11524  		v.reset(OpLsh8x64)
 11525  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11526  		v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
 11527  		v.AddArg2(x, v0)
 11528  		return true
 11529  	}
 11530  	// match: (Lsh8x16 (Const8 [0]) _)
 11531  	// result: (Const8 [0])
 11532  	for {
 11533  		if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
 11534  			break
 11535  		}
 11536  		v.reset(OpConst8)
 11537  		v.AuxInt = int8ToAuxInt(0)
 11538  		return true
 11539  	}
 11540  	return false
 11541  }
 11542  func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
 11543  	v_1 := v.Args[1]
 11544  	v_0 := v.Args[0]
 11545  	b := v.Block
 11546  	// match: (Lsh8x32 <t> x (Const32 [c]))
 11547  	// result: (Lsh8x64 x (Const64 <t> [int64(uint32(c))]))
 11548  	for {
 11549  		t := v.Type
 11550  		x := v_0
 11551  		if v_1.Op != OpConst32 {
 11552  			break
 11553  		}
 11554  		c := auxIntToInt32(v_1.AuxInt)
 11555  		v.reset(OpLsh8x64)
 11556  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11557  		v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
 11558  		v.AddArg2(x, v0)
 11559  		return true
 11560  	}
 11561  	// match: (Lsh8x32 (Const8 [0]) _)
 11562  	// result: (Const8 [0])
 11563  	for {
 11564  		if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
 11565  			break
 11566  		}
 11567  		v.reset(OpConst8)
 11568  		v.AuxInt = int8ToAuxInt(0)
 11569  		return true
 11570  	}
 11571  	return false
 11572  }
 11573  func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
 11574  	v_1 := v.Args[1]
 11575  	v_0 := v.Args[0]
 11576  	b := v.Block
 11577  	typ := &b.Func.Config.Types
 11578  	// match: (Lsh8x64 (Const8 [c]) (Const64 [d]))
 11579  	// result: (Const8 [c << uint64(d)])
 11580  	for {
 11581  		if v_0.Op != OpConst8 {
 11582  			break
 11583  		}
 11584  		c := auxIntToInt8(v_0.AuxInt)
 11585  		if v_1.Op != OpConst64 {
 11586  			break
 11587  		}
 11588  		d := auxIntToInt64(v_1.AuxInt)
 11589  		v.reset(OpConst8)
 11590  		v.AuxInt = int8ToAuxInt(c << uint64(d))
 11591  		return true
 11592  	}
 11593  	// match: (Lsh8x64 x (Const64 [0]))
 11594  	// result: x
 11595  	for {
 11596  		x := v_0
 11597  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
 11598  			break
 11599  		}
 11600  		v.copyOf(x)
 11601  		return true
 11602  	}
 11603  	// match: (Lsh8x64 (Const8 [0]) _)
 11604  	// result: (Const8 [0])
 11605  	for {
 11606  		if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
 11607  			break
 11608  		}
 11609  		v.reset(OpConst8)
 11610  		v.AuxInt = int8ToAuxInt(0)
 11611  		return true
 11612  	}
 11613  	// match: (Lsh8x64 _ (Const64 [c]))
 11614  	// cond: uint64(c) >= 8
 11615  	// result: (Const8 [0])
 11616  	for {
 11617  		if v_1.Op != OpConst64 {
 11618  			break
 11619  		}
 11620  		c := auxIntToInt64(v_1.AuxInt)
 11621  		if !(uint64(c) >= 8) {
 11622  			break
 11623  		}
 11624  		v.reset(OpConst8)
 11625  		v.AuxInt = int8ToAuxInt(0)
 11626  		return true
 11627  	}
 11628  	// match: (Lsh8x64 <t> (Lsh8x64 x (Const64 [c])) (Const64 [d]))
 11629  	// cond: !uaddOvf(c,d)
 11630  	// result: (Lsh8x64 x (Const64 <t> [c+d]))
 11631  	for {
 11632  		t := v.Type
 11633  		if v_0.Op != OpLsh8x64 {
 11634  			break
 11635  		}
 11636  		_ = v_0.Args[1]
 11637  		x := v_0.Args[0]
 11638  		v_0_1 := v_0.Args[1]
 11639  		if v_0_1.Op != OpConst64 {
 11640  			break
 11641  		}
 11642  		c := auxIntToInt64(v_0_1.AuxInt)
 11643  		if v_1.Op != OpConst64 {
 11644  			break
 11645  		}
 11646  		d := auxIntToInt64(v_1.AuxInt)
 11647  		if !(!uaddOvf(c, d)) {
 11648  			break
 11649  		}
 11650  		v.reset(OpLsh8x64)
 11651  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11652  		v0.AuxInt = int64ToAuxInt(c + d)
 11653  		v.AddArg2(x, v0)
 11654  		return true
 11655  	}
 11656  	// match: (Lsh8x64 (Rsh8Ux64 (Lsh8x64 x (Const64 [c1])) (Const64 [c2])) (Const64 [c3]))
 11657  	// cond: uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)
 11658  	// result: (Lsh8x64 x (Const64 <typ.UInt64> [c1-c2+c3]))
 11659  	for {
 11660  		if v_0.Op != OpRsh8Ux64 {
 11661  			break
 11662  		}
 11663  		_ = v_0.Args[1]
 11664  		v_0_0 := v_0.Args[0]
 11665  		if v_0_0.Op != OpLsh8x64 {
 11666  			break
 11667  		}
 11668  		_ = v_0_0.Args[1]
 11669  		x := v_0_0.Args[0]
 11670  		v_0_0_1 := v_0_0.Args[1]
 11671  		if v_0_0_1.Op != OpConst64 {
 11672  			break
 11673  		}
 11674  		c1 := auxIntToInt64(v_0_0_1.AuxInt)
 11675  		v_0_1 := v_0.Args[1]
 11676  		if v_0_1.Op != OpConst64 {
 11677  			break
 11678  		}
 11679  		c2 := auxIntToInt64(v_0_1.AuxInt)
 11680  		if v_1.Op != OpConst64 {
 11681  			break
 11682  		}
 11683  		c3 := auxIntToInt64(v_1.AuxInt)
 11684  		if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
 11685  			break
 11686  		}
 11687  		v.reset(OpLsh8x64)
 11688  		v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
 11689  		v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
 11690  		v.AddArg2(x, v0)
 11691  		return true
 11692  	}
 11693  	return false
 11694  }
 11695  func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
 11696  	v_1 := v.Args[1]
 11697  	v_0 := v.Args[0]
 11698  	b := v.Block
 11699  	// match: (Lsh8x8 <t> x (Const8 [c]))
 11700  	// result: (Lsh8x64 x (Const64 <t> [int64(uint8(c))]))
 11701  	for {
 11702  		t := v.Type
 11703  		x := v_0
 11704  		if v_1.Op != OpConst8 {
 11705  			break
 11706  		}
 11707  		c := auxIntToInt8(v_1.AuxInt)
 11708  		v.reset(OpLsh8x64)
 11709  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 11710  		v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
 11711  		v.AddArg2(x, v0)
 11712  		return true
 11713  	}
 11714  	// match: (Lsh8x8 (Const8 [0]) _)
 11715  	// result: (Const8 [0])
 11716  	for {
 11717  		if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
 11718  			break
 11719  		}
 11720  		v.reset(OpConst8)
 11721  		v.AuxInt = int8ToAuxInt(0)
 11722  		return true
 11723  	}
 11724  	return false
 11725  }
 11726  func rewriteValuegeneric_OpMod16(v *Value) bool {
 11727  	v_1 := v.Args[1]
 11728  	v_0 := v.Args[0]
 11729  	b := v.Block
 11730  	// match: (Mod16 (Const16 [c]) (Const16 [d]))
 11731  	// cond: d != 0
 11732  	// result: (Const16 [c % d])
 11733  	for {
 11734  		if v_0.Op != OpConst16 {
 11735  			break
 11736  		}
 11737  		c := auxIntToInt16(v_0.AuxInt)
 11738  		if v_1.Op != OpConst16 {
 11739  			break
 11740  		}
 11741  		d := auxIntToInt16(v_1.AuxInt)
 11742  		if !(d != 0) {
 11743  			break
 11744  		}
 11745  		v.reset(OpConst16)
 11746  		v.AuxInt = int16ToAuxInt(c % d)
 11747  		return true
 11748  	}
 11749  	// match: (Mod16 <t> n (Const16 [c]))
 11750  	// cond: isNonNegative(n) && isPowerOfTwo16(c)
 11751  	// result: (And16 n (Const16 <t> [c-1]))
 11752  	for {
 11753  		t := v.Type
 11754  		n := v_0
 11755  		if v_1.Op != OpConst16 {
 11756  			break
 11757  		}
 11758  		c := auxIntToInt16(v_1.AuxInt)
 11759  		if !(isNonNegative(n) && isPowerOfTwo16(c)) {
 11760  			break
 11761  		}
 11762  		v.reset(OpAnd16)
 11763  		v0 := b.NewValue0(v.Pos, OpConst16, t)
 11764  		v0.AuxInt = int16ToAuxInt(c - 1)
 11765  		v.AddArg2(n, v0)
 11766  		return true
 11767  	}
 11768  	// match: (Mod16 <t> n (Const16 [c]))
 11769  	// cond: c < 0 && c != -1<<15
 11770  	// result: (Mod16 <t> n (Const16 <t> [-c]))
 11771  	for {
 11772  		t := v.Type
 11773  		n := v_0
 11774  		if v_1.Op != OpConst16 {
 11775  			break
 11776  		}
 11777  		c := auxIntToInt16(v_1.AuxInt)
 11778  		if !(c < 0 && c != -1<<15) {
 11779  			break
 11780  		}
 11781  		v.reset(OpMod16)
 11782  		v.Type = t
 11783  		v0 := b.NewValue0(v.Pos, OpConst16, t)
 11784  		v0.AuxInt = int16ToAuxInt(-c)
 11785  		v.AddArg2(n, v0)
 11786  		return true
 11787  	}
 11788  	// match: (Mod16 <t> x (Const16 [c]))
 11789  	// cond: x.Op != OpConst16 && (c > 0 || c == -1<<15)
 11790  	// result: (Sub16 x (Mul16 <t> (Div16 <t> x (Const16 <t> [c])) (Const16 <t> [c])))
 11791  	for {
 11792  		t := v.Type
 11793  		x := v_0
 11794  		if v_1.Op != OpConst16 {
 11795  			break
 11796  		}
 11797  		c := auxIntToInt16(v_1.AuxInt)
 11798  		if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
 11799  			break
 11800  		}
 11801  		v.reset(OpSub16)
 11802  		v0 := b.NewValue0(v.Pos, OpMul16, t)
 11803  		v1 := b.NewValue0(v.Pos, OpDiv16, t)
 11804  		v2 := b.NewValue0(v.Pos, OpConst16, t)
 11805  		v2.AuxInt = int16ToAuxInt(c)
 11806  		v1.AddArg2(x, v2)
 11807  		v0.AddArg2(v1, v2)
 11808  		v.AddArg2(x, v0)
 11809  		return true
 11810  	}
 11811  	return false
 11812  }
 11813  func rewriteValuegeneric_OpMod16u(v *Value) bool {
 11814  	v_1 := v.Args[1]
 11815  	v_0 := v.Args[0]
 11816  	b := v.Block
 11817  	// match: (Mod16u (Const16 [c]) (Const16 [d]))
 11818  	// cond: d != 0
 11819  	// result: (Const16 [int16(uint16(c) % uint16(d))])
 11820  	for {
 11821  		if v_0.Op != OpConst16 {
 11822  			break
 11823  		}
 11824  		c := auxIntToInt16(v_0.AuxInt)
 11825  		if v_1.Op != OpConst16 {
 11826  			break
 11827  		}
 11828  		d := auxIntToInt16(v_1.AuxInt)
 11829  		if !(d != 0) {
 11830  			break
 11831  		}
 11832  		v.reset(OpConst16)
 11833  		v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
 11834  		return true
 11835  	}
 11836  	// match: (Mod16u <t> n (Const16 [c]))
 11837  	// cond: isPowerOfTwo16(c)
 11838  	// result: (And16 n (Const16 <t> [c-1]))
 11839  	for {
 11840  		t := v.Type
 11841  		n := v_0
 11842  		if v_1.Op != OpConst16 {
 11843  			break
 11844  		}
 11845  		c := auxIntToInt16(v_1.AuxInt)
 11846  		if !(isPowerOfTwo16(c)) {
 11847  			break
 11848  		}
 11849  		v.reset(OpAnd16)
 11850  		v0 := b.NewValue0(v.Pos, OpConst16, t)
 11851  		v0.AuxInt = int16ToAuxInt(c - 1)
 11852  		v.AddArg2(n, v0)
 11853  		return true
 11854  	}
 11855  	// match: (Mod16u <t> x (Const16 [c]))
 11856  	// cond: x.Op != OpConst16 && c > 0 && umagicOK16(c)
 11857  	// result: (Sub16 x (Mul16 <t> (Div16u <t> x (Const16 <t> [c])) (Const16 <t> [c])))
 11858  	for {
 11859  		t := v.Type
 11860  		x := v_0
 11861  		if v_1.Op != OpConst16 {
 11862  			break
 11863  		}
 11864  		c := auxIntToInt16(v_1.AuxInt)
 11865  		if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
 11866  			break
 11867  		}
 11868  		v.reset(OpSub16)
 11869  		v0 := b.NewValue0(v.Pos, OpMul16, t)
 11870  		v1 := b.NewValue0(v.Pos, OpDiv16u, t)
 11871  		v2 := b.NewValue0(v.Pos, OpConst16, t)
 11872  		v2.AuxInt = int16ToAuxInt(c)
 11873  		v1.AddArg2(x, v2)
 11874  		v0.AddArg2(v1, v2)
 11875  		v.AddArg2(x, v0)
 11876  		return true
 11877  	}
 11878  	return false
 11879  }
 11880  func rewriteValuegeneric_OpMod32(v *Value) bool {
 11881  	v_1 := v.Args[1]
 11882  	v_0 := v.Args[0]
 11883  	b := v.Block
 11884  	// match: (Mod32 (Const32 [c]) (Const32 [d]))
 11885  	// cond: d != 0
 11886  	// result: (Const32 [c % d])
 11887  	for {
 11888  		if v_0.Op != OpConst32 {
 11889  			break
 11890  		}
 11891  		c := auxIntToInt32(v_0.AuxInt)
 11892  		if v_1.Op != OpConst32 {
 11893  			break
 11894  		}
 11895  		d := auxIntToInt32(v_1.AuxInt)
 11896  		if !(d != 0) {
 11897  			break
 11898  		}
 11899  		v.reset(OpConst32)
 11900  		v.AuxInt = int32ToAuxInt(c % d)
 11901  		return true
 11902  	}
 11903  	// match: (Mod32 <t> n (Const32 [c]))
 11904  	// cond: isNonNegative(n) && isPowerOfTwo32(c)
 11905  	// result: (And32 n (Const32 <t> [c-1]))
 11906  	for {
 11907  		t := v.Type
 11908  		n := v_0
 11909  		if v_1.Op != OpConst32 {
 11910  			break
 11911  		}
 11912  		c := auxIntToInt32(v_1.AuxInt)
 11913  		if !(isNonNegative(n) && isPowerOfTwo32(c)) {
 11914  			break
 11915  		}
 11916  		v.reset(OpAnd32)
 11917  		v0 := b.NewValue0(v.Pos, OpConst32, t)
 11918  		v0.AuxInt = int32ToAuxInt(c - 1)
 11919  		v.AddArg2(n, v0)
 11920  		return true
 11921  	}
 11922  	// match: (Mod32 <t> n (Const32 [c]))
 11923  	// cond: c < 0 && c != -1<<31
 11924  	// result: (Mod32 <t> n (Const32 <t> [-c]))
 11925  	for {
 11926  		t := v.Type
 11927  		n := v_0
 11928  		if v_1.Op != OpConst32 {
 11929  			break
 11930  		}
 11931  		c := auxIntToInt32(v_1.AuxInt)
 11932  		if !(c < 0 && c != -1<<31) {
 11933  			break
 11934  		}
 11935  		v.reset(OpMod32)
 11936  		v.Type = t
 11937  		v0 := b.NewValue0(v.Pos, OpConst32, t)
 11938  		v0.AuxInt = int32ToAuxInt(-c)
 11939  		v.AddArg2(n, v0)
 11940  		return true
 11941  	}
 11942  	// match: (Mod32 <t> x (Const32 [c]))
 11943  	// cond: x.Op != OpConst32 && (c > 0 || c == -1<<31)
 11944  	// result: (Sub32 x (Mul32 <t> (Div32 <t> x (Const32 <t> [c])) (Const32 <t> [c])))
 11945  	for {
 11946  		t := v.Type
 11947  		x := v_0
 11948  		if v_1.Op != OpConst32 {
 11949  			break
 11950  		}
 11951  		c := auxIntToInt32(v_1.AuxInt)
 11952  		if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
 11953  			break
 11954  		}
 11955  		v.reset(OpSub32)
 11956  		v0 := b.NewValue0(v.Pos, OpMul32, t)
 11957  		v1 := b.NewValue0(v.Pos, OpDiv32, t)
 11958  		v2 := b.NewValue0(v.Pos, OpConst32, t)
 11959  		v2.AuxInt = int32ToAuxInt(c)
 11960  		v1.AddArg2(x, v2)
 11961  		v0.AddArg2(v1, v2)
 11962  		v.AddArg2(x, v0)
 11963  		return true
 11964  	}
 11965  	return false
 11966  }
 11967  func rewriteValuegeneric_OpMod32u(v *Value) bool {
 11968  	v_1 := v.Args[1]
 11969  	v_0 := v.Args[0]
 11970  	b := v.Block
 11971  	// match: (Mod32u (Const32 [c]) (Const32 [d]))
 11972  	// cond: d != 0
 11973  	// result: (Const32 [int32(uint32(c) % uint32(d))])
 11974  	for {
 11975  		if v_0.Op != OpConst32 {
 11976  			break
 11977  		}
 11978  		c := auxIntToInt32(v_0.AuxInt)
 11979  		if v_1.Op != OpConst32 {
 11980  			break
 11981  		}
 11982  		d := auxIntToInt32(v_1.AuxInt)
 11983  		if !(d != 0) {
 11984  			break
 11985  		}
 11986  		v.reset(OpConst32)
 11987  		v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
 11988  		return true
 11989  	}
 11990  	// match: (Mod32u <t> n (Const32 [c]))
 11991  	// cond: isPowerOfTwo32(c)
 11992  	// result: (And32 n (Const32 <t> [c-1]))
 11993  	for {
 11994  		t := v.Type
 11995  		n := v_0
 11996  		if v_1.Op != OpConst32 {
 11997  			break
 11998  		}
 11999  		c := auxIntToInt32(v_1.AuxInt)
 12000  		if !(isPowerOfTwo32(c)) {
 12001  			break
 12002  		}
 12003  		v.reset(OpAnd32)
 12004  		v0 := b.NewValue0(v.Pos, OpConst32, t)
 12005  		v0.AuxInt = int32ToAuxInt(c - 1)
 12006  		v.AddArg2(n, v0)
 12007  		return true
 12008  	}
 12009  	// match: (Mod32u <t> x (Const32 [c]))
 12010  	// cond: x.Op != OpConst32 && c > 0 && umagicOK32(c)
 12011  	// result: (Sub32 x (Mul32 <t> (Div32u <t> x (Const32 <t> [c])) (Const32 <t> [c])))
 12012  	for {
 12013  		t := v.Type
 12014  		x := v_0
 12015  		if v_1.Op != OpConst32 {
 12016  			break
 12017  		}
 12018  		c := auxIntToInt32(v_1.AuxInt)
 12019  		if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
 12020  			break
 12021  		}
 12022  		v.reset(OpSub32)
 12023  		v0 := b.NewValue0(v.Pos, OpMul32, t)
 12024  		v1 := b.NewValue0(v.Pos, OpDiv32u, t)
 12025  		v2 := b.NewValue0(v.Pos, OpConst32, t)
 12026  		v2.AuxInt = int32ToAuxInt(c)
 12027  		v1.AddArg2(x, v2)
 12028  		v0.AddArg2(v1, v2)
 12029  		v.AddArg2(x, v0)
 12030  		return true
 12031  	}
 12032  	return false
 12033  }
 12034  func rewriteValuegeneric_OpMod64(v *Value) bool {
 12035  	v_1 := v.Args[1]
 12036  	v_0 := v.Args[0]
 12037  	b := v.Block
 12038  	// match: (Mod64 (Const64 [c]) (Const64 [d]))
 12039  	// cond: d != 0
 12040  	// result: (Const64 [c % d])
 12041  	for {
 12042  		if v_0.Op != OpConst64 {
 12043  			break
 12044  		}
 12045  		c := auxIntToInt64(v_0.AuxInt)
 12046  		if v_1.Op != OpConst64 {
 12047  			break
 12048  		}
 12049  		d := auxIntToInt64(v_1.AuxInt)
 12050  		if !(d != 0) {
 12051  			break
 12052  		}
 12053  		v.reset(OpConst64)
 12054  		v.AuxInt = int64ToAuxInt(c % d)
 12055  		return true
 12056  	}
 12057  	// match: (Mod64 <t> n (Const64 [c]))
 12058  	// cond: isNonNegative(n) && isPowerOfTwo64(c)
 12059  	// result: (And64 n (Const64 <t> [c-1]))
 12060  	for {
 12061  		t := v.Type
 12062  		n := v_0
 12063  		if v_1.Op != OpConst64 {
 12064  			break
 12065  		}
 12066  		c := auxIntToInt64(v_1.AuxInt)
 12067  		if !(isNonNegative(n) && isPowerOfTwo64(c)) {
 12068  			break
 12069  		}
 12070  		v.reset(OpAnd64)
 12071  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 12072  		v0.AuxInt = int64ToAuxInt(c - 1)
 12073  		v.AddArg2(n, v0)
 12074  		return true
 12075  	}
 12076  	// match: (Mod64 n (Const64 [-1<<63]))
 12077  	// cond: isNonNegative(n)
 12078  	// result: n
 12079  	for {
 12080  		n := v_0
 12081  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
 12082  			break
 12083  		}
 12084  		v.copyOf(n)
 12085  		return true
 12086  	}
 12087  	// match: (Mod64 <t> n (Const64 [c]))
 12088  	// cond: c < 0 && c != -1<<63
 12089  	// result: (Mod64 <t> n (Const64 <t> [-c]))
 12090  	for {
 12091  		t := v.Type
 12092  		n := v_0
 12093  		if v_1.Op != OpConst64 {
 12094  			break
 12095  		}
 12096  		c := auxIntToInt64(v_1.AuxInt)
 12097  		if !(c < 0 && c != -1<<63) {
 12098  			break
 12099  		}
 12100  		v.reset(OpMod64)
 12101  		v.Type = t
 12102  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 12103  		v0.AuxInt = int64ToAuxInt(-c)
 12104  		v.AddArg2(n, v0)
 12105  		return true
 12106  	}
 12107  	// match: (Mod64 <t> x (Const64 [c]))
 12108  	// cond: x.Op != OpConst64 && (c > 0 || c == -1<<63)
 12109  	// result: (Sub64 x (Mul64 <t> (Div64 <t> x (Const64 <t> [c])) (Const64 <t> [c])))
 12110  	for {
 12111  		t := v.Type
 12112  		x := v_0
 12113  		if v_1.Op != OpConst64 {
 12114  			break
 12115  		}
 12116  		c := auxIntToInt64(v_1.AuxInt)
 12117  		if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
 12118  			break
 12119  		}
 12120  		v.reset(OpSub64)
 12121  		v0 := b.NewValue0(v.Pos, OpMul64, t)
 12122  		v1 := b.NewValue0(v.Pos, OpDiv64, t)
 12123  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 12124  		v2.AuxInt = int64ToAuxInt(c)
 12125  		v1.AddArg2(x, v2)
 12126  		v0.AddArg2(v1, v2)
 12127  		v.AddArg2(x, v0)
 12128  		return true
 12129  	}
 12130  	return false
 12131  }
 12132  func rewriteValuegeneric_OpMod64u(v *Value) bool {
 12133  	v_1 := v.Args[1]
 12134  	v_0 := v.Args[0]
 12135  	b := v.Block
 12136  	// match: (Mod64u (Const64 [c]) (Const64 [d]))
 12137  	// cond: d != 0
 12138  	// result: (Const64 [int64(uint64(c) % uint64(d))])
 12139  	for {
 12140  		if v_0.Op != OpConst64 {
 12141  			break
 12142  		}
 12143  		c := auxIntToInt64(v_0.AuxInt)
 12144  		if v_1.Op != OpConst64 {
 12145  			break
 12146  		}
 12147  		d := auxIntToInt64(v_1.AuxInt)
 12148  		if !(d != 0) {
 12149  			break
 12150  		}
 12151  		v.reset(OpConst64)
 12152  		v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
 12153  		return true
 12154  	}
 12155  	// match: (Mod64u <t> n (Const64 [c]))
 12156  	// cond: isPowerOfTwo64(c)
 12157  	// result: (And64 n (Const64 <t> [c-1]))
 12158  	for {
 12159  		t := v.Type
 12160  		n := v_0
 12161  		if v_1.Op != OpConst64 {
 12162  			break
 12163  		}
 12164  		c := auxIntToInt64(v_1.AuxInt)
 12165  		if !(isPowerOfTwo64(c)) {
 12166  			break
 12167  		}
 12168  		v.reset(OpAnd64)
 12169  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 12170  		v0.AuxInt = int64ToAuxInt(c - 1)
 12171  		v.AddArg2(n, v0)
 12172  		return true
 12173  	}
 12174  	// match: (Mod64u <t> n (Const64 [-1<<63]))
 12175  	// result: (And64 n (Const64 <t> [1<<63-1]))
 12176  	for {
 12177  		t := v.Type
 12178  		n := v_0
 12179  		if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
 12180  			break
 12181  		}
 12182  		v.reset(OpAnd64)
 12183  		v0 := b.NewValue0(v.Pos, OpConst64, t)
 12184  		v0.AuxInt = int64ToAuxInt(1<<63 - 1)
 12185  		v.AddArg2(n, v0)
 12186  		return true
 12187  	}
 12188  	// match: (Mod64u <t> x (Const64 [c]))
 12189  	// cond: x.Op != OpConst64 && c > 0 && umagicOK64(c)
 12190  	// result: (Sub64 x (Mul64 <t> (Div64u <t> x (Const64 <t> [c])) (Const64 <t> [c])))
 12191  	for {
 12192  		t := v.Type
 12193  		x := v_0
 12194  		if v_1.Op != OpConst64 {
 12195  			break
 12196  		}
 12197  		c := auxIntToInt64(v_1.AuxInt)
 12198  		if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
 12199  			break
 12200  		}
 12201  		v.reset(OpSub64)
 12202  		v0 := b.NewValue0(v.Pos, OpMul64, t)
 12203  		v1 := b.NewValue0(v.Pos, OpDiv64u, t)
 12204  		v2 := b.NewValue0(v.Pos, OpConst64, t)
 12205  		v2.AuxInt = int64ToAuxInt(c)
 12206  		v1.AddArg2(x, v2)
 12207  		v0.AddArg2(v1, v2)
 12208  		v.AddArg2(x, v0)
 12209  		return true
 12210  	}
 12211  	return false
 12212  }
 12213  func rewriteValuegeneric_OpMod8(v *Value) bool {
 12214  	v_1 := v.Args[1]
 12215  	v_0 := v.Args[0]
 12216  	b := v.Block
 12217  	// match: (Mod8 (Const8 [c]) (Const8 [d]))
 12218  	// cond: d != 0
 12219  	// result: (Const8 [c % d])
 12220  	for {
 12221  		if v_0.Op != OpConst8 {
 12222  			break
 12223  		}
 12224  		c := auxIntToInt8(v_0.AuxInt)
 12225  		if v_1.Op != OpConst8 {
 12226  			break
 12227  		}
 12228  		d := auxIntToInt8(v_1.AuxInt)
 12229  		if !(d != 0) {
 12230  			break
 12231  		}
 12232  		v.reset(OpConst8)
 12233  		v.AuxInt = int8ToAuxInt(c % d)
 12234  		return true
 12235  	}
 12236  	// match: (Mod8 <t> n (Const8 [c]))
 12237  	// cond: isNonNegative(n) && isPowerOfTwo8(c)
 12238  	// result: (And8 n (Const8 <t> [c-1]))
 12239  	for {
 12240  		t := v.Type
 12241  		n := v_0
 12242  		if v_1.Op != OpConst8 {
 12243  			break
 12244  		}
 12245  		c := auxIntToInt8(v_1.AuxInt)
 12246  		if !(isNonNegative(n) && isPowerOfTwo8(c)) {
 12247  			break
 12248  		}
 12249  		v.reset(OpAnd8)
 12250  		v0 := b.NewValue0(v.Pos, OpConst8, t)
 12251  		v0.AuxInt = int8ToAuxInt(c - 1)
 12252  		v.AddArg2(n, v0)
 12253  		return true
 12254  	}
 12255  	// match: (Mod8 <t> n (Const8 [c]))
 12256  	// cond: c < 0 && c != -1<<7
 12257  	// result: (Mod8 <t> n (Const8 <t> [-c]))
 12258  	for {
 12259  		t := v.Type
 12260  		n := v_0
 12261  		if v_1.Op != OpConst8 {
 12262  			break
 12263  		}
 12264  		c := auxIntToInt8(v_1.AuxInt)
 12265  		if !(c < 0 && c != -1<<7) {
 12266  			break
 12267  		}
 12268  		v.reset(OpMod8)
 12269  		v.Type = t
 12270  		v0 := b.NewValue0(v.Pos, OpConst8, t)
 12271  		v0.AuxInt = int8ToAuxInt(-c)
 12272  		v.AddArg2(n, v0)
 12273  		return true
 12274  	}
 12275  	// match: (Mod8 <t> x (Const8 [c]))
 12276  	// cond: x.Op != OpConst8 && (c > 0 || c == -1<<7)
 12277  	// result: (Sub8 x (Mul8 <t> (Div8 <t> x (Const8 <t> [c])) (Const8 <t> [c])))
 12278  	for {
 12279  		t := v.Type
 12280  		x := v_0
 12281  		if v_1.Op != OpConst8 {
 12282  			break
 12283  		}
 12284  		c := auxIntToInt8(v_1.AuxInt)
 12285  		if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
 12286  			break
 12287  		}
 12288  		v.reset(OpSub8)
 12289  		v0 := b.NewValue0(v.Pos, OpMul8, t)
 12290  		v1 := b.NewValue0(v.Pos, OpDiv8, t)
 12291  		v2 := b.NewValue0(v.Pos, OpConst8, t)
 12292  		v2.AuxInt = int8ToAuxInt(c)
 12293  		v1.AddArg2(x, v2)
 12294  		v0.AddArg2(v1, v2)
 12295  		v.AddArg2(x, v0)
 12296  		return true
 12297  	}
 12298  	return false
 12299  }
 12300  func rewriteValuegeneric_OpMod8u(v *Value) bool {
 12301  	v_1 := v.Args[1]
 12302  	v_0 := v.Args[0]
 12303  	b := v.Block
 12304  	// match: (Mod8u (Const8 [c]) (Const8 [d]))
 12305  	// cond: d != 0
 12306  	// result: (Const8 [int8(uint8(c) % uint8(d))])
 12307  	for {
 12308  		if v_0.Op != OpConst8 {
 12309  			break
 12310  		}
 12311  		c := auxIntToInt8(v_0.AuxInt)
 12312  		if v_1.Op != OpConst8 {
 12313  			break
 12314  		}
 12315  		d := auxIntToInt8(v_1.AuxInt)
 12316  		if !(d != 0) {
 12317  			break
 12318  		}
 12319  		v.reset(OpConst8)
 12320  		v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
 12321  		return true
 12322  	}
 12323  	// match: (Mod8u <t> n (Const8 [c]))
 12324  	// cond: isPowerOfTwo8(c)
 12325  	// result: (And8 n (Const8 <t> [c-1]))
 12326  	for {
 12327  		t := v.Type
 12328  		n := v_0
 12329  		if v_1.Op != OpConst8 {
 12330  			break
 12331  		}
 12332  		c := auxIntToInt8(v_1.AuxInt)
 12333  		if !(isPowerOfTwo8(c)) {
 12334  			break
 12335  		}
 12336  		v.reset(OpAnd8)
 12337  		v0 := b.NewValue0(v.Pos, OpConst8, t)
 12338  		v0.AuxInt = int8ToAuxInt(c - 1)
 12339  		v.AddArg2(n, v0)
 12340  		return true
 12341  	}
 12342  	// match: (Mod8u <t> x (Const8 [c]))
 12343  	// cond: x.Op != OpConst8 && c > 0 && umagicOK8( c)
 12344  	// result: (Sub8 x (Mul8 <t> (Div8u <t> x (Const8 <t> [c])) (Const8 <t> [c])))
 12345  	for {
 12346  		t := v.Type
 12347  		x := v_0
 12348  		if v_1.Op != OpConst8 {
 12349  			break
 12350  		}
 12351  		c := auxIntToInt8(v_1.AuxInt)
 12352  		if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
 12353  			break
 12354  		}
 12355  		v.reset(OpSub8)
 12356  		v0 := b.NewValue0(v.Pos, OpMul8, t)
 12357  		v1 := b.NewValue0(v.Pos, OpDiv8u, t)
 12358  		v2 := b.NewValue0(v.Pos, OpConst8, t)
 12359  		v2.AuxInt = int8ToAuxInt(c)
 12360  		v1.AddArg2(x, v2)
 12361  		v0.AddArg2(v1, v2)
 12362  		v.AddArg2(x, v0)
 12363  		return true
 12364  	}
 12365  	return false
 12366  }
 12367  func rewriteValuegeneric_OpMove(v *Value) bool {
 12368  	v_2 := v.Args[2]
 12369  	v_1 := v.Args[1]
 12370  	v_0 := v.Args[0]
 12371  	b := v.Block
 12372  	config := b.Func.Config
 12373  	// match: (Move {t} [n] dst1 src mem:(Zero {t} [n] dst2 _))
 12374  	// cond: isSamePtr(src, dst2)
 12375  	// result: (Zero {t} [n] dst1 mem)
 12376  	for {
 12377  		n := auxIntToInt64(v.AuxInt)
 12378  		t := auxToType(v.Aux)
 12379  		dst1 := v_0
 12380  		src := v_1
 12381  		mem := v_2
 12382  		if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
 12383  			break
 12384  		}
 12385  		dst2 := mem.Args[0]
 12386  		if !(isSamePtr(src, dst2)) {
 12387  			break
 12388  		}
 12389  		v.reset(OpZero)
 12390  		v.AuxInt = int64ToAuxInt(n)
 12391  		v.Aux = typeToAux(t)
 12392  		v.AddArg2(dst1, mem)
 12393  		return true
 12394  	}
 12395  	// match: (Move {t} [n] dst1 src mem:(VarDef (Zero {t} [n] dst0 _)))
 12396  	// cond: isSamePtr(src, dst0)
 12397  	// result: (Zero {t} [n] dst1 mem)
 12398  	for {
 12399  		n := auxIntToInt64(v.AuxInt)
 12400  		t := auxToType(v.Aux)
 12401  		dst1 := v_0
 12402  		src := v_1
 12403  		mem := v_2
 12404  		if mem.Op != OpVarDef {
 12405  			break
 12406  		}
 12407  		mem_0 := mem.Args[0]
 12408  		if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
 12409  			break
 12410  		}
 12411  		dst0 := mem_0.Args[0]
 12412  		if !(isSamePtr(src, dst0)) {
 12413  			break
 12414  		}
 12415  		v.reset(OpZero)
 12416  		v.AuxInt = int64ToAuxInt(n)
 12417  		v.Aux = typeToAux(t)
 12418  		v.AddArg2(dst1, mem)
 12419  		return true
 12420  	}
 12421  	// match: (Move {t} [n] dst (Addr {sym} (SB)) mem)
 12422  	// cond: symIsROZero(sym)
 12423  	// result: (Zero {t} [n] dst mem)
 12424  	for {
 12425  		n := auxIntToInt64(v.AuxInt)
 12426  		t := auxToType(v.Aux)
 12427  		dst := v_0
 12428  		if v_1.Op != OpAddr {
 12429  			break
 12430  		}
 12431  		sym := auxToSym(v_1.Aux)
 12432  		v_1_0 := v_1.Args[0]
 12433  		if v_1_0.Op != OpSB {
 12434  			break
 12435  		}
 12436  		mem := v_2
 12437  		if !(symIsROZero(sym)) {
 12438  			break
 12439  		}
 12440  		v.reset(OpZero)
 12441  		v.AuxInt = int64ToAuxInt(n)
 12442  		v.Aux = typeToAux(t)
 12443  		v.AddArg2(dst, mem)
 12444  		return true
 12445  	}
 12446  	// match: (Move {t1} [n] dst1 src1 store:(Store {t2} op:(OffPtr [o2] dst2) _ mem))
 12447  	// cond: isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2 + t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)
 12448  	// result: (Move {t1} [n] dst1 src1 mem)
 12449  	for {
 12450  		n := auxIntToInt64(v.AuxInt)
 12451  		t1 := auxToType(v.Aux)
 12452  		dst1 := v_0
 12453  		src1 := v_1
 12454  		store := v_2
 12455  		if store.Op != OpStore {
 12456  			break
 12457  		}
 12458  		t2 := auxToType(store.Aux)
 12459  		mem := store.Args[2]
 12460  		op := store.Args[0]
 12461  		if op.Op != OpOffPtr {
 12462  			break
 12463  		}
 12464  		o2 := auxIntToInt64(op.AuxInt)
 12465  		dst2 := op.Args[0]
 12466  		if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
 12467  			break
 12468  		}
 12469  		v.reset(OpMove)
 12470  		v.AuxInt = int64ToAuxInt(n)
 12471  		v.Aux = typeToAux(t1)
 12472  		v.AddArg3(dst1, src1, mem)
 12473  		return true
 12474  	}
 12475  	// match: (Move {t} [n] dst1 src1 move:(Move {t} [n] dst2 _ mem))
 12476  	// cond: move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)
 12477  	// result: (Move {t} [n] dst1 src1 mem)
 12478  	for {
 12479  		n := auxIntToInt64(v.AuxInt)
 12480  		t := auxToType(v.Aux)
 12481  		dst1 := v_0
 12482  		src1 := v_1
 12483  		move := v_2
 12484  		if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
 12485  			break
 12486  		}
 12487  		mem := move.Args[2]
 12488  		dst2 := move.Args[0]
 12489  		if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
 12490  			break
 12491  		}
 12492  		v.reset(OpMove)
 12493  		v.AuxInt = int64ToAuxInt(n)
 12494  		v.Aux = typeToAux(t)
 12495  		v.AddArg3(dst1, src1, mem)
 12496  		return true
 12497  	}
 12498  	// match: (Move {t} [n] dst1 src1 vardef:(VarDef {x} move:(Move {t} [n] dst2 _ mem)))
 12499  	// cond: move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)
 12500  	// result: (Move {t} [n] dst1 src1 (VarDef {x} mem))
 12501  	for {
 12502  		n := auxIntToInt64(v.AuxInt)
 12503  		t := auxToType(v.Aux)
 12504  		dst1 := v_0
 12505  		src1 := v_1
 12506  		vardef := v_2
 12507  		if vardef.Op != OpVarDef {
 12508  			break
 12509  		}
 12510  		x := auxToSym(vardef.Aux)
 12511  		move := vardef.Args[0]
 12512  		if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
 12513  			break
 12514  		}
 12515  		mem := move.Args[2]
 12516  		dst2 := move.Args[0]
 12517  		if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
 12518  			break
 12519  		}
 12520  		v.reset(OpMove)
 12521  		v.AuxInt = int64ToAuxInt(n)
 12522  		v.Aux = typeToAux(t)
 12523  		v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
 12524  		v0.Aux = symToAux(x)
 12525  		v0.AddArg(mem)
 12526  		v.AddArg3(dst1, src1, v0)
 12527  		return true
 12528  	}
 12529  	// match: (Move {t} [n] dst1 src1 zero:(Zero {t} [n] dst2 mem))
 12530  	// cond: zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)
 12531  	// result: (Move {t} [n] dst1 src1 mem)
 12532  	for {
 12533  		n := auxIntToInt64(v.AuxInt)
 12534  		t := auxToType(v.Aux)
 12535  		dst1 := v_0
 12536  		src1 := v_1
 12537  		zero := v_2
 12538  		if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
 12539  			break
 12540  		}
 12541  		mem := zero.Args[1]
 12542  		dst2 := zero.Args[0]
 12543  		if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
 12544  			break
 12545  		}
 12546  		v.reset(OpMove)
 12547  		v.AuxInt = int64ToAuxInt(n)
 12548  		v.Aux = typeToAux(t)
 12549  		v.AddArg3(dst1, src1, mem)
 12550  		return true
 12551  	}
 12552  	// match: (Move {t} [n] dst1 src1 vardef:(VarDef {x} zero:(Zero {t} [n] dst2 mem)))
 12553  	// cond: zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)
 12554  	// result: (Move {t} [n] dst1 src1 (VarDef {x} mem))
 12555  	for {
 12556  		n := auxIntToInt64(v.AuxInt)
 12557  		t := auxToType(v.Aux)
 12558  		dst1 := v_0
 12559  		src1 := v_1
 12560  		vardef := v_2
 12561  		if vardef.Op != OpVarDef {
 12562  			break
 12563  		}
 12564  		x := auxToSym(vardef.Aux)
 12565  		zero := vardef.Args[0]
 12566  		if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
 12567  			break
 12568  		}
 12569  		mem := zero.Args[1]
 12570  		dst2 := zero.Args[0]
 12571  		if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
 12572  			break
 12573  		}
 12574  		v.reset(OpMove)
 12575  		v.AuxInt = int64ToAuxInt(n)
 12576  		v.Aux = typeToAux(t)
 12577  		v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
 12578  		v0.Aux = symToAux(x)
 12579  		v0.AddArg(mem)
 12580  		v.AddArg3(dst1, src1, v0)
 12581  		return true
 12582  	}
 12583  	// match: (Move {t1} [n] dst p1 mem:(Store {t2} op2:(OffPtr <tt2> [o2] p2) d1 (Store {t3} op3:(OffPtr <tt3> [0] p3) d2 _)))
 12584  	// cond: isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && o2 == t3.Size() && n == t2.Size() + t3.Size()
 12585  	// result: (Store {t2} (OffPtr <tt2> [o2] dst) d1 (Store {t3} (OffPtr <tt3> [0] dst) d2 mem))
 12586  	for {
 12587  		n := auxIntToInt64(v.AuxInt)
 12588  		t1 := auxToType(v.Aux)
 12589  		dst := v_0
 12590  		p1 := v_1
 12591  		mem := v_2
 12592  		if mem.Op != OpStore {
 12593  			break
 12594  		}
 12595  		t2 := auxToType(mem.Aux)
 12596  		_ = mem.Args[2]
 12597  		op2 := mem.Args[0]
 12598  		if op2.Op != OpOffPtr {
 12599  			break
 12600  		}
 12601  		tt2 := op2.Type
 12602  		o2 := auxIntToInt64(op2.AuxInt)
 12603  		p2 := op2.Args[0]
 12604  		d1 := mem.Args[1]
 12605  		mem_2 := mem.Args[2]
 12606  		if mem_2.Op != OpStore {
 12607  			break
 12608  		}
 12609  		t3 := auxToType(mem_2.Aux)
 12610  		d2 := mem_2.Args[1]
 12611  		op3 := mem_2.Args[0]
 12612  		if op3.Op != OpOffPtr {
 12613  			break
 12614  		}
 12615  		tt3 := op3.Type
 12616  		if auxIntToInt64(op3.AuxInt) != 0 {
 12617  			break
 12618  		}
 12619  		p3 := op3.Args[0]
 12620  		if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && o2 == t3.Size() && n == t2.Size()+t3.Size()) {
 12621  			break
 12622  		}
 12623  		v.reset(OpStore)
 12624  		v.Aux = typeToAux(t2)
 12625  		v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
 12626  		v0.AuxInt = int64ToAuxInt(o2)
 12627  		v0.AddArg(dst)
 12628  		v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
 12629  		v1.Aux = typeToAux(t3)
 12630  		v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
 12631  		v2.AuxInt = int64ToAuxInt(0)
 12632  		v2.AddArg(dst)
 12633  		v1.AddArg3(v2, d2, mem)
 12634  		v.AddArg3(v0, d1, v1)
 12635  		return true
 12636  	}
 12637  	// match: (Move {t1} [n] dst p1 mem:(Store {t2} op2:(OffPtr <tt2> [o2] p2) d1 (Store {t3} op3:(OffPtr <tt3> [o3] p3) d2 (Store {t4} op4:(OffPtr <tt4> [0] p4) d3 _))))
 12638  	// cond: isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && o3 == t4.Size() && o2-o3 == t3.Size() && n == t2.Size() + t3.Size() + t4.Size()
 12639  	// result: (Store {t2} (OffPtr <tt2> [o2] dst) d1 (Store {t3} (OffPtr <tt3> [o3] dst) d2 (Store {t4} (OffPtr <tt4> [0] dst) d3 mem)))
 12640  	for {
 12641  		n := auxIntToInt64(v.AuxInt)
 12642  		t1 := auxToType(v.Aux)
 12643