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

     1  // Code generated from _gen/Wasm.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "math"
     6  import "cmd/compile/internal/types"
     7  
     8  func rewriteValueWasm(v *Value) bool {
     9  	switch v.Op {
    10  	case OpAbs:
    11  		v.Op = OpWasmF64Abs
    12  		return true
    13  	case OpAdd16:
    14  		v.Op = OpWasmI64Add
    15  		return true
    16  	case OpAdd32:
    17  		v.Op = OpWasmI64Add
    18  		return true
    19  	case OpAdd32F:
    20  		v.Op = OpWasmF32Add
    21  		return true
    22  	case OpAdd64:
    23  		v.Op = OpWasmI64Add
    24  		return true
    25  	case OpAdd64F:
    26  		v.Op = OpWasmF64Add
    27  		return true
    28  	case OpAdd8:
    29  		v.Op = OpWasmI64Add
    30  		return true
    31  	case OpAddPtr:
    32  		v.Op = OpWasmI64Add
    33  		return true
    34  	case OpAddr:
    35  		return rewriteValueWasm_OpAddr(v)
    36  	case OpAnd16:
    37  		v.Op = OpWasmI64And
    38  		return true
    39  	case OpAnd32:
    40  		v.Op = OpWasmI64And
    41  		return true
    42  	case OpAnd64:
    43  		v.Op = OpWasmI64And
    44  		return true
    45  	case OpAnd8:
    46  		v.Op = OpWasmI64And
    47  		return true
    48  	case OpAndB:
    49  		v.Op = OpWasmI64And
    50  		return true
    51  	case OpBitLen16:
    52  		return rewriteValueWasm_OpBitLen16(v)
    53  	case OpBitLen32:
    54  		return rewriteValueWasm_OpBitLen32(v)
    55  	case OpBitLen64:
    56  		return rewriteValueWasm_OpBitLen64(v)
    57  	case OpBitLen8:
    58  		return rewriteValueWasm_OpBitLen8(v)
    59  	case OpCeil:
    60  		v.Op = OpWasmF64Ceil
    61  		return true
    62  	case OpClosureCall:
    63  		v.Op = OpWasmLoweredClosureCall
    64  		return true
    65  	case OpCom16:
    66  		return rewriteValueWasm_OpCom16(v)
    67  	case OpCom32:
    68  		return rewriteValueWasm_OpCom32(v)
    69  	case OpCom64:
    70  		return rewriteValueWasm_OpCom64(v)
    71  	case OpCom8:
    72  		return rewriteValueWasm_OpCom8(v)
    73  	case OpCondSelect:
    74  		v.Op = OpWasmSelect
    75  		return true
    76  	case OpConst16:
    77  		return rewriteValueWasm_OpConst16(v)
    78  	case OpConst32:
    79  		return rewriteValueWasm_OpConst32(v)
    80  	case OpConst32F:
    81  		v.Op = OpWasmF32Const
    82  		return true
    83  	case OpConst64:
    84  		v.Op = OpWasmI64Const
    85  		return true
    86  	case OpConst64F:
    87  		v.Op = OpWasmF64Const
    88  		return true
    89  	case OpConst8:
    90  		return rewriteValueWasm_OpConst8(v)
    91  	case OpConstBool:
    92  		return rewriteValueWasm_OpConstBool(v)
    93  	case OpConstNil:
    94  		return rewriteValueWasm_OpConstNil(v)
    95  	case OpConvert:
    96  		v.Op = OpWasmLoweredConvert
    97  		return true
    98  	case OpCopysign:
    99  		v.Op = OpWasmF64Copysign
   100  		return true
   101  	case OpCtz16:
   102  		return rewriteValueWasm_OpCtz16(v)
   103  	case OpCtz16NonZero:
   104  		v.Op = OpWasmI64Ctz
   105  		return true
   106  	case OpCtz32:
   107  		return rewriteValueWasm_OpCtz32(v)
   108  	case OpCtz32NonZero:
   109  		v.Op = OpWasmI64Ctz
   110  		return true
   111  	case OpCtz64:
   112  		v.Op = OpWasmI64Ctz
   113  		return true
   114  	case OpCtz64NonZero:
   115  		v.Op = OpWasmI64Ctz
   116  		return true
   117  	case OpCtz8:
   118  		return rewriteValueWasm_OpCtz8(v)
   119  	case OpCtz8NonZero:
   120  		v.Op = OpWasmI64Ctz
   121  		return true
   122  	case OpCvt32Fto32:
   123  		v.Op = OpWasmI64TruncSatF32S
   124  		return true
   125  	case OpCvt32Fto32U:
   126  		v.Op = OpWasmI64TruncSatF32U
   127  		return true
   128  	case OpCvt32Fto64:
   129  		v.Op = OpWasmI64TruncSatF32S
   130  		return true
   131  	case OpCvt32Fto64F:
   132  		v.Op = OpWasmF64PromoteF32
   133  		return true
   134  	case OpCvt32Fto64U:
   135  		v.Op = OpWasmI64TruncSatF32U
   136  		return true
   137  	case OpCvt32Uto32F:
   138  		return rewriteValueWasm_OpCvt32Uto32F(v)
   139  	case OpCvt32Uto64F:
   140  		return rewriteValueWasm_OpCvt32Uto64F(v)
   141  	case OpCvt32to32F:
   142  		return rewriteValueWasm_OpCvt32to32F(v)
   143  	case OpCvt32to64F:
   144  		return rewriteValueWasm_OpCvt32to64F(v)
   145  	case OpCvt64Fto32:
   146  		v.Op = OpWasmI64TruncSatF64S
   147  		return true
   148  	case OpCvt64Fto32F:
   149  		v.Op = OpWasmF32DemoteF64
   150  		return true
   151  	case OpCvt64Fto32U:
   152  		v.Op = OpWasmI64TruncSatF64U
   153  		return true
   154  	case OpCvt64Fto64:
   155  		v.Op = OpWasmI64TruncSatF64S
   156  		return true
   157  	case OpCvt64Fto64U:
   158  		v.Op = OpWasmI64TruncSatF64U
   159  		return true
   160  	case OpCvt64Uto32F:
   161  		v.Op = OpWasmF32ConvertI64U
   162  		return true
   163  	case OpCvt64Uto64F:
   164  		v.Op = OpWasmF64ConvertI64U
   165  		return true
   166  	case OpCvt64to32F:
   167  		v.Op = OpWasmF32ConvertI64S
   168  		return true
   169  	case OpCvt64to64F:
   170  		v.Op = OpWasmF64ConvertI64S
   171  		return true
   172  	case OpCvtBoolToUint8:
   173  		v.Op = OpCopy
   174  		return true
   175  	case OpDiv16:
   176  		return rewriteValueWasm_OpDiv16(v)
   177  	case OpDiv16u:
   178  		return rewriteValueWasm_OpDiv16u(v)
   179  	case OpDiv32:
   180  		return rewriteValueWasm_OpDiv32(v)
   181  	case OpDiv32F:
   182  		v.Op = OpWasmF32Div
   183  		return true
   184  	case OpDiv32u:
   185  		return rewriteValueWasm_OpDiv32u(v)
   186  	case OpDiv64:
   187  		return rewriteValueWasm_OpDiv64(v)
   188  	case OpDiv64F:
   189  		v.Op = OpWasmF64Div
   190  		return true
   191  	case OpDiv64u:
   192  		v.Op = OpWasmI64DivU
   193  		return true
   194  	case OpDiv8:
   195  		return rewriteValueWasm_OpDiv8(v)
   196  	case OpDiv8u:
   197  		return rewriteValueWasm_OpDiv8u(v)
   198  	case OpEq16:
   199  		return rewriteValueWasm_OpEq16(v)
   200  	case OpEq32:
   201  		return rewriteValueWasm_OpEq32(v)
   202  	case OpEq32F:
   203  		v.Op = OpWasmF32Eq
   204  		return true
   205  	case OpEq64:
   206  		v.Op = OpWasmI64Eq
   207  		return true
   208  	case OpEq64F:
   209  		v.Op = OpWasmF64Eq
   210  		return true
   211  	case OpEq8:
   212  		return rewriteValueWasm_OpEq8(v)
   213  	case OpEqB:
   214  		v.Op = OpWasmI64Eq
   215  		return true
   216  	case OpEqPtr:
   217  		v.Op = OpWasmI64Eq
   218  		return true
   219  	case OpFloor:
   220  		v.Op = OpWasmF64Floor
   221  		return true
   222  	case OpGetCallerPC:
   223  		v.Op = OpWasmLoweredGetCallerPC
   224  		return true
   225  	case OpGetCallerSP:
   226  		v.Op = OpWasmLoweredGetCallerSP
   227  		return true
   228  	case OpGetClosurePtr:
   229  		v.Op = OpWasmLoweredGetClosurePtr
   230  		return true
   231  	case OpInterCall:
   232  		v.Op = OpWasmLoweredInterCall
   233  		return true
   234  	case OpIsInBounds:
   235  		v.Op = OpWasmI64LtU
   236  		return true
   237  	case OpIsNonNil:
   238  		return rewriteValueWasm_OpIsNonNil(v)
   239  	case OpIsSliceInBounds:
   240  		v.Op = OpWasmI64LeU
   241  		return true
   242  	case OpLeq16:
   243  		return rewriteValueWasm_OpLeq16(v)
   244  	case OpLeq16U:
   245  		return rewriteValueWasm_OpLeq16U(v)
   246  	case OpLeq32:
   247  		return rewriteValueWasm_OpLeq32(v)
   248  	case OpLeq32F:
   249  		v.Op = OpWasmF32Le
   250  		return true
   251  	case OpLeq32U:
   252  		return rewriteValueWasm_OpLeq32U(v)
   253  	case OpLeq64:
   254  		v.Op = OpWasmI64LeS
   255  		return true
   256  	case OpLeq64F:
   257  		v.Op = OpWasmF64Le
   258  		return true
   259  	case OpLeq64U:
   260  		v.Op = OpWasmI64LeU
   261  		return true
   262  	case OpLeq8:
   263  		return rewriteValueWasm_OpLeq8(v)
   264  	case OpLeq8U:
   265  		return rewriteValueWasm_OpLeq8U(v)
   266  	case OpLess16:
   267  		return rewriteValueWasm_OpLess16(v)
   268  	case OpLess16U:
   269  		return rewriteValueWasm_OpLess16U(v)
   270  	case OpLess32:
   271  		return rewriteValueWasm_OpLess32(v)
   272  	case OpLess32F:
   273  		v.Op = OpWasmF32Lt
   274  		return true
   275  	case OpLess32U:
   276  		return rewriteValueWasm_OpLess32U(v)
   277  	case OpLess64:
   278  		v.Op = OpWasmI64LtS
   279  		return true
   280  	case OpLess64F:
   281  		v.Op = OpWasmF64Lt
   282  		return true
   283  	case OpLess64U:
   284  		v.Op = OpWasmI64LtU
   285  		return true
   286  	case OpLess8:
   287  		return rewriteValueWasm_OpLess8(v)
   288  	case OpLess8U:
   289  		return rewriteValueWasm_OpLess8U(v)
   290  	case OpLoad:
   291  		return rewriteValueWasm_OpLoad(v)
   292  	case OpLocalAddr:
   293  		return rewriteValueWasm_OpLocalAddr(v)
   294  	case OpLsh16x16:
   295  		return rewriteValueWasm_OpLsh16x16(v)
   296  	case OpLsh16x32:
   297  		return rewriteValueWasm_OpLsh16x32(v)
   298  	case OpLsh16x64:
   299  		v.Op = OpLsh64x64
   300  		return true
   301  	case OpLsh16x8:
   302  		return rewriteValueWasm_OpLsh16x8(v)
   303  	case OpLsh32x16:
   304  		return rewriteValueWasm_OpLsh32x16(v)
   305  	case OpLsh32x32:
   306  		return rewriteValueWasm_OpLsh32x32(v)
   307  	case OpLsh32x64:
   308  		v.Op = OpLsh64x64
   309  		return true
   310  	case OpLsh32x8:
   311  		return rewriteValueWasm_OpLsh32x8(v)
   312  	case OpLsh64x16:
   313  		return rewriteValueWasm_OpLsh64x16(v)
   314  	case OpLsh64x32:
   315  		return rewriteValueWasm_OpLsh64x32(v)
   316  	case OpLsh64x64:
   317  		return rewriteValueWasm_OpLsh64x64(v)
   318  	case OpLsh64x8:
   319  		return rewriteValueWasm_OpLsh64x8(v)
   320  	case OpLsh8x16:
   321  		return rewriteValueWasm_OpLsh8x16(v)
   322  	case OpLsh8x32:
   323  		return rewriteValueWasm_OpLsh8x32(v)
   324  	case OpLsh8x64:
   325  		v.Op = OpLsh64x64
   326  		return true
   327  	case OpLsh8x8:
   328  		return rewriteValueWasm_OpLsh8x8(v)
   329  	case OpMod16:
   330  		return rewriteValueWasm_OpMod16(v)
   331  	case OpMod16u:
   332  		return rewriteValueWasm_OpMod16u(v)
   333  	case OpMod32:
   334  		return rewriteValueWasm_OpMod32(v)
   335  	case OpMod32u:
   336  		return rewriteValueWasm_OpMod32u(v)
   337  	case OpMod64:
   338  		return rewriteValueWasm_OpMod64(v)
   339  	case OpMod64u:
   340  		v.Op = OpWasmI64RemU
   341  		return true
   342  	case OpMod8:
   343  		return rewriteValueWasm_OpMod8(v)
   344  	case OpMod8u:
   345  		return rewriteValueWasm_OpMod8u(v)
   346  	case OpMove:
   347  		return rewriteValueWasm_OpMove(v)
   348  	case OpMul16:
   349  		v.Op = OpWasmI64Mul
   350  		return true
   351  	case OpMul32:
   352  		v.Op = OpWasmI64Mul
   353  		return true
   354  	case OpMul32F:
   355  		v.Op = OpWasmF32Mul
   356  		return true
   357  	case OpMul64:
   358  		v.Op = OpWasmI64Mul
   359  		return true
   360  	case OpMul64F:
   361  		v.Op = OpWasmF64Mul
   362  		return true
   363  	case OpMul8:
   364  		v.Op = OpWasmI64Mul
   365  		return true
   366  	case OpNeg16:
   367  		return rewriteValueWasm_OpNeg16(v)
   368  	case OpNeg32:
   369  		return rewriteValueWasm_OpNeg32(v)
   370  	case OpNeg32F:
   371  		v.Op = OpWasmF32Neg
   372  		return true
   373  	case OpNeg64:
   374  		return rewriteValueWasm_OpNeg64(v)
   375  	case OpNeg64F:
   376  		v.Op = OpWasmF64Neg
   377  		return true
   378  	case OpNeg8:
   379  		return rewriteValueWasm_OpNeg8(v)
   380  	case OpNeq16:
   381  		return rewriteValueWasm_OpNeq16(v)
   382  	case OpNeq32:
   383  		return rewriteValueWasm_OpNeq32(v)
   384  	case OpNeq32F:
   385  		v.Op = OpWasmF32Ne
   386  		return true
   387  	case OpNeq64:
   388  		v.Op = OpWasmI64Ne
   389  		return true
   390  	case OpNeq64F:
   391  		v.Op = OpWasmF64Ne
   392  		return true
   393  	case OpNeq8:
   394  		return rewriteValueWasm_OpNeq8(v)
   395  	case OpNeqB:
   396  		v.Op = OpWasmI64Ne
   397  		return true
   398  	case OpNeqPtr:
   399  		v.Op = OpWasmI64Ne
   400  		return true
   401  	case OpNilCheck:
   402  		v.Op = OpWasmLoweredNilCheck
   403  		return true
   404  	case OpNot:
   405  		v.Op = OpWasmI64Eqz
   406  		return true
   407  	case OpOffPtr:
   408  		v.Op = OpWasmI64AddConst
   409  		return true
   410  	case OpOr16:
   411  		v.Op = OpWasmI64Or
   412  		return true
   413  	case OpOr32:
   414  		v.Op = OpWasmI64Or
   415  		return true
   416  	case OpOr64:
   417  		v.Op = OpWasmI64Or
   418  		return true
   419  	case OpOr8:
   420  		v.Op = OpWasmI64Or
   421  		return true
   422  	case OpOrB:
   423  		v.Op = OpWasmI64Or
   424  		return true
   425  	case OpPopCount16:
   426  		return rewriteValueWasm_OpPopCount16(v)
   427  	case OpPopCount32:
   428  		return rewriteValueWasm_OpPopCount32(v)
   429  	case OpPopCount64:
   430  		v.Op = OpWasmI64Popcnt
   431  		return true
   432  	case OpPopCount8:
   433  		return rewriteValueWasm_OpPopCount8(v)
   434  	case OpRotateLeft16:
   435  		return rewriteValueWasm_OpRotateLeft16(v)
   436  	case OpRotateLeft32:
   437  		v.Op = OpWasmI32Rotl
   438  		return true
   439  	case OpRotateLeft64:
   440  		v.Op = OpWasmI64Rotl
   441  		return true
   442  	case OpRotateLeft8:
   443  		return rewriteValueWasm_OpRotateLeft8(v)
   444  	case OpRound32F:
   445  		v.Op = OpCopy
   446  		return true
   447  	case OpRound64F:
   448  		v.Op = OpCopy
   449  		return true
   450  	case OpRoundToEven:
   451  		v.Op = OpWasmF64Nearest
   452  		return true
   453  	case OpRsh16Ux16:
   454  		return rewriteValueWasm_OpRsh16Ux16(v)
   455  	case OpRsh16Ux32:
   456  		return rewriteValueWasm_OpRsh16Ux32(v)
   457  	case OpRsh16Ux64:
   458  		return rewriteValueWasm_OpRsh16Ux64(v)
   459  	case OpRsh16Ux8:
   460  		return rewriteValueWasm_OpRsh16Ux8(v)
   461  	case OpRsh16x16:
   462  		return rewriteValueWasm_OpRsh16x16(v)
   463  	case OpRsh16x32:
   464  		return rewriteValueWasm_OpRsh16x32(v)
   465  	case OpRsh16x64:
   466  		return rewriteValueWasm_OpRsh16x64(v)
   467  	case OpRsh16x8:
   468  		return rewriteValueWasm_OpRsh16x8(v)
   469  	case OpRsh32Ux16:
   470  		return rewriteValueWasm_OpRsh32Ux16(v)
   471  	case OpRsh32Ux32:
   472  		return rewriteValueWasm_OpRsh32Ux32(v)
   473  	case OpRsh32Ux64:
   474  		return rewriteValueWasm_OpRsh32Ux64(v)
   475  	case OpRsh32Ux8:
   476  		return rewriteValueWasm_OpRsh32Ux8(v)
   477  	case OpRsh32x16:
   478  		return rewriteValueWasm_OpRsh32x16(v)
   479  	case OpRsh32x32:
   480  		return rewriteValueWasm_OpRsh32x32(v)
   481  	case OpRsh32x64:
   482  		return rewriteValueWasm_OpRsh32x64(v)
   483  	case OpRsh32x8:
   484  		return rewriteValueWasm_OpRsh32x8(v)
   485  	case OpRsh64Ux16:
   486  		return rewriteValueWasm_OpRsh64Ux16(v)
   487  	case OpRsh64Ux32:
   488  		return rewriteValueWasm_OpRsh64Ux32(v)
   489  	case OpRsh64Ux64:
   490  		return rewriteValueWasm_OpRsh64Ux64(v)
   491  	case OpRsh64Ux8:
   492  		return rewriteValueWasm_OpRsh64Ux8(v)
   493  	case OpRsh64x16:
   494  		return rewriteValueWasm_OpRsh64x16(v)
   495  	case OpRsh64x32:
   496  		return rewriteValueWasm_OpRsh64x32(v)
   497  	case OpRsh64x64:
   498  		return rewriteValueWasm_OpRsh64x64(v)
   499  	case OpRsh64x8:
   500  		return rewriteValueWasm_OpRsh64x8(v)
   501  	case OpRsh8Ux16:
   502  		return rewriteValueWasm_OpRsh8Ux16(v)
   503  	case OpRsh8Ux32:
   504  		return rewriteValueWasm_OpRsh8Ux32(v)
   505  	case OpRsh8Ux64:
   506  		return rewriteValueWasm_OpRsh8Ux64(v)
   507  	case OpRsh8Ux8:
   508  		return rewriteValueWasm_OpRsh8Ux8(v)
   509  	case OpRsh8x16:
   510  		return rewriteValueWasm_OpRsh8x16(v)
   511  	case OpRsh8x32:
   512  		return rewriteValueWasm_OpRsh8x32(v)
   513  	case OpRsh8x64:
   514  		return rewriteValueWasm_OpRsh8x64(v)
   515  	case OpRsh8x8:
   516  		return rewriteValueWasm_OpRsh8x8(v)
   517  	case OpSignExt16to32:
   518  		return rewriteValueWasm_OpSignExt16to32(v)
   519  	case OpSignExt16to64:
   520  		return rewriteValueWasm_OpSignExt16to64(v)
   521  	case OpSignExt32to64:
   522  		return rewriteValueWasm_OpSignExt32to64(v)
   523  	case OpSignExt8to16:
   524  		return rewriteValueWasm_OpSignExt8to16(v)
   525  	case OpSignExt8to32:
   526  		return rewriteValueWasm_OpSignExt8to32(v)
   527  	case OpSignExt8to64:
   528  		return rewriteValueWasm_OpSignExt8to64(v)
   529  	case OpSlicemask:
   530  		return rewriteValueWasm_OpSlicemask(v)
   531  	case OpSqrt:
   532  		v.Op = OpWasmF64Sqrt
   533  		return true
   534  	case OpSqrt32:
   535  		v.Op = OpWasmF32Sqrt
   536  		return true
   537  	case OpStaticCall:
   538  		v.Op = OpWasmLoweredStaticCall
   539  		return true
   540  	case OpStore:
   541  		return rewriteValueWasm_OpStore(v)
   542  	case OpSub16:
   543  		v.Op = OpWasmI64Sub
   544  		return true
   545  	case OpSub32:
   546  		v.Op = OpWasmI64Sub
   547  		return true
   548  	case OpSub32F:
   549  		v.Op = OpWasmF32Sub
   550  		return true
   551  	case OpSub64:
   552  		v.Op = OpWasmI64Sub
   553  		return true
   554  	case OpSub64F:
   555  		v.Op = OpWasmF64Sub
   556  		return true
   557  	case OpSub8:
   558  		v.Op = OpWasmI64Sub
   559  		return true
   560  	case OpSubPtr:
   561  		v.Op = OpWasmI64Sub
   562  		return true
   563  	case OpTailCall:
   564  		v.Op = OpWasmLoweredTailCall
   565  		return true
   566  	case OpTrunc:
   567  		v.Op = OpWasmF64Trunc
   568  		return true
   569  	case OpTrunc16to8:
   570  		v.Op = OpCopy
   571  		return true
   572  	case OpTrunc32to16:
   573  		v.Op = OpCopy
   574  		return true
   575  	case OpTrunc32to8:
   576  		v.Op = OpCopy
   577  		return true
   578  	case OpTrunc64to16:
   579  		v.Op = OpCopy
   580  		return true
   581  	case OpTrunc64to32:
   582  		v.Op = OpCopy
   583  		return true
   584  	case OpTrunc64to8:
   585  		v.Op = OpCopy
   586  		return true
   587  	case OpWB:
   588  		v.Op = OpWasmLoweredWB
   589  		return true
   590  	case OpWasmF64Add:
   591  		return rewriteValueWasm_OpWasmF64Add(v)
   592  	case OpWasmF64Mul:
   593  		return rewriteValueWasm_OpWasmF64Mul(v)
   594  	case OpWasmI64Add:
   595  		return rewriteValueWasm_OpWasmI64Add(v)
   596  	case OpWasmI64AddConst:
   597  		return rewriteValueWasm_OpWasmI64AddConst(v)
   598  	case OpWasmI64And:
   599  		return rewriteValueWasm_OpWasmI64And(v)
   600  	case OpWasmI64Eq:
   601  		return rewriteValueWasm_OpWasmI64Eq(v)
   602  	case OpWasmI64Eqz:
   603  		return rewriteValueWasm_OpWasmI64Eqz(v)
   604  	case OpWasmI64LeU:
   605  		return rewriteValueWasm_OpWasmI64LeU(v)
   606  	case OpWasmI64Load:
   607  		return rewriteValueWasm_OpWasmI64Load(v)
   608  	case OpWasmI64Load16S:
   609  		return rewriteValueWasm_OpWasmI64Load16S(v)
   610  	case OpWasmI64Load16U:
   611  		return rewriteValueWasm_OpWasmI64Load16U(v)
   612  	case OpWasmI64Load32S:
   613  		return rewriteValueWasm_OpWasmI64Load32S(v)
   614  	case OpWasmI64Load32U:
   615  		return rewriteValueWasm_OpWasmI64Load32U(v)
   616  	case OpWasmI64Load8S:
   617  		return rewriteValueWasm_OpWasmI64Load8S(v)
   618  	case OpWasmI64Load8U:
   619  		return rewriteValueWasm_OpWasmI64Load8U(v)
   620  	case OpWasmI64LtU:
   621  		return rewriteValueWasm_OpWasmI64LtU(v)
   622  	case OpWasmI64Mul:
   623  		return rewriteValueWasm_OpWasmI64Mul(v)
   624  	case OpWasmI64Ne:
   625  		return rewriteValueWasm_OpWasmI64Ne(v)
   626  	case OpWasmI64Or:
   627  		return rewriteValueWasm_OpWasmI64Or(v)
   628  	case OpWasmI64Shl:
   629  		return rewriteValueWasm_OpWasmI64Shl(v)
   630  	case OpWasmI64ShrS:
   631  		return rewriteValueWasm_OpWasmI64ShrS(v)
   632  	case OpWasmI64ShrU:
   633  		return rewriteValueWasm_OpWasmI64ShrU(v)
   634  	case OpWasmI64Store:
   635  		return rewriteValueWasm_OpWasmI64Store(v)
   636  	case OpWasmI64Store16:
   637  		return rewriteValueWasm_OpWasmI64Store16(v)
   638  	case OpWasmI64Store32:
   639  		return rewriteValueWasm_OpWasmI64Store32(v)
   640  	case OpWasmI64Store8:
   641  		return rewriteValueWasm_OpWasmI64Store8(v)
   642  	case OpWasmI64Xor:
   643  		return rewriteValueWasm_OpWasmI64Xor(v)
   644  	case OpXor16:
   645  		v.Op = OpWasmI64Xor
   646  		return true
   647  	case OpXor32:
   648  		v.Op = OpWasmI64Xor
   649  		return true
   650  	case OpXor64:
   651  		v.Op = OpWasmI64Xor
   652  		return true
   653  	case OpXor8:
   654  		v.Op = OpWasmI64Xor
   655  		return true
   656  	case OpZero:
   657  		return rewriteValueWasm_OpZero(v)
   658  	case OpZeroExt16to32:
   659  		return rewriteValueWasm_OpZeroExt16to32(v)
   660  	case OpZeroExt16to64:
   661  		return rewriteValueWasm_OpZeroExt16to64(v)
   662  	case OpZeroExt32to64:
   663  		return rewriteValueWasm_OpZeroExt32to64(v)
   664  	case OpZeroExt8to16:
   665  		return rewriteValueWasm_OpZeroExt8to16(v)
   666  	case OpZeroExt8to32:
   667  		return rewriteValueWasm_OpZeroExt8to32(v)
   668  	case OpZeroExt8to64:
   669  		return rewriteValueWasm_OpZeroExt8to64(v)
   670  	}
   671  	return false
   672  }
   673  func rewriteValueWasm_OpAddr(v *Value) bool {
   674  	v_0 := v.Args[0]
   675  	// match: (Addr {sym} base)
   676  	// result: (LoweredAddr {sym} [0] base)
   677  	for {
   678  		sym := auxToSym(v.Aux)
   679  		base := v_0
   680  		v.reset(OpWasmLoweredAddr)
   681  		v.AuxInt = int32ToAuxInt(0)
   682  		v.Aux = symToAux(sym)
   683  		v.AddArg(base)
   684  		return true
   685  	}
   686  }
   687  func rewriteValueWasm_OpBitLen16(v *Value) bool {
   688  	v_0 := v.Args[0]
   689  	b := v.Block
   690  	typ := &b.Func.Config.Types
   691  	// match: (BitLen16 x)
   692  	// result: (BitLen64 (ZeroExt16to64 x))
   693  	for {
   694  		x := v_0
   695  		v.reset(OpBitLen64)
   696  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
   697  		v0.AddArg(x)
   698  		v.AddArg(v0)
   699  		return true
   700  	}
   701  }
   702  func rewriteValueWasm_OpBitLen32(v *Value) bool {
   703  	v_0 := v.Args[0]
   704  	b := v.Block
   705  	typ := &b.Func.Config.Types
   706  	// match: (BitLen32 x)
   707  	// result: (BitLen64 (ZeroExt32to64 x))
   708  	for {
   709  		x := v_0
   710  		v.reset(OpBitLen64)
   711  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
   712  		v0.AddArg(x)
   713  		v.AddArg(v0)
   714  		return true
   715  	}
   716  }
   717  func rewriteValueWasm_OpBitLen64(v *Value) bool {
   718  	v_0 := v.Args[0]
   719  	b := v.Block
   720  	typ := &b.Func.Config.Types
   721  	// match: (BitLen64 x)
   722  	// result: (I64Sub (I64Const [64]) (I64Clz x))
   723  	for {
   724  		x := v_0
   725  		v.reset(OpWasmI64Sub)
   726  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   727  		v0.AuxInt = int64ToAuxInt(64)
   728  		v1 := b.NewValue0(v.Pos, OpWasmI64Clz, typ.Int64)
   729  		v1.AddArg(x)
   730  		v.AddArg2(v0, v1)
   731  		return true
   732  	}
   733  }
   734  func rewriteValueWasm_OpBitLen8(v *Value) bool {
   735  	v_0 := v.Args[0]
   736  	b := v.Block
   737  	typ := &b.Func.Config.Types
   738  	// match: (BitLen8 x)
   739  	// result: (BitLen64 (ZeroExt8to64 x))
   740  	for {
   741  		x := v_0
   742  		v.reset(OpBitLen64)
   743  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
   744  		v0.AddArg(x)
   745  		v.AddArg(v0)
   746  		return true
   747  	}
   748  }
   749  func rewriteValueWasm_OpCom16(v *Value) bool {
   750  	v_0 := v.Args[0]
   751  	b := v.Block
   752  	typ := &b.Func.Config.Types
   753  	// match: (Com16 x)
   754  	// result: (I64Xor x (I64Const [-1]))
   755  	for {
   756  		x := v_0
   757  		v.reset(OpWasmI64Xor)
   758  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   759  		v0.AuxInt = int64ToAuxInt(-1)
   760  		v.AddArg2(x, v0)
   761  		return true
   762  	}
   763  }
   764  func rewriteValueWasm_OpCom32(v *Value) bool {
   765  	v_0 := v.Args[0]
   766  	b := v.Block
   767  	typ := &b.Func.Config.Types
   768  	// match: (Com32 x)
   769  	// result: (I64Xor x (I64Const [-1]))
   770  	for {
   771  		x := v_0
   772  		v.reset(OpWasmI64Xor)
   773  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   774  		v0.AuxInt = int64ToAuxInt(-1)
   775  		v.AddArg2(x, v0)
   776  		return true
   777  	}
   778  }
   779  func rewriteValueWasm_OpCom64(v *Value) bool {
   780  	v_0 := v.Args[0]
   781  	b := v.Block
   782  	typ := &b.Func.Config.Types
   783  	// match: (Com64 x)
   784  	// result: (I64Xor x (I64Const [-1]))
   785  	for {
   786  		x := v_0
   787  		v.reset(OpWasmI64Xor)
   788  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   789  		v0.AuxInt = int64ToAuxInt(-1)
   790  		v.AddArg2(x, v0)
   791  		return true
   792  	}
   793  }
   794  func rewriteValueWasm_OpCom8(v *Value) bool {
   795  	v_0 := v.Args[0]
   796  	b := v.Block
   797  	typ := &b.Func.Config.Types
   798  	// match: (Com8 x)
   799  	// result: (I64Xor x (I64Const [-1]))
   800  	for {
   801  		x := v_0
   802  		v.reset(OpWasmI64Xor)
   803  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   804  		v0.AuxInt = int64ToAuxInt(-1)
   805  		v.AddArg2(x, v0)
   806  		return true
   807  	}
   808  }
   809  func rewriteValueWasm_OpConst16(v *Value) bool {
   810  	// match: (Const16 [c])
   811  	// result: (I64Const [int64(c)])
   812  	for {
   813  		c := auxIntToInt16(v.AuxInt)
   814  		v.reset(OpWasmI64Const)
   815  		v.AuxInt = int64ToAuxInt(int64(c))
   816  		return true
   817  	}
   818  }
   819  func rewriteValueWasm_OpConst32(v *Value) bool {
   820  	// match: (Const32 [c])
   821  	// result: (I64Const [int64(c)])
   822  	for {
   823  		c := auxIntToInt32(v.AuxInt)
   824  		v.reset(OpWasmI64Const)
   825  		v.AuxInt = int64ToAuxInt(int64(c))
   826  		return true
   827  	}
   828  }
   829  func rewriteValueWasm_OpConst8(v *Value) bool {
   830  	// match: (Const8 [c])
   831  	// result: (I64Const [int64(c)])
   832  	for {
   833  		c := auxIntToInt8(v.AuxInt)
   834  		v.reset(OpWasmI64Const)
   835  		v.AuxInt = int64ToAuxInt(int64(c))
   836  		return true
   837  	}
   838  }
   839  func rewriteValueWasm_OpConstBool(v *Value) bool {
   840  	// match: (ConstBool [c])
   841  	// result: (I64Const [b2i(c)])
   842  	for {
   843  		c := auxIntToBool(v.AuxInt)
   844  		v.reset(OpWasmI64Const)
   845  		v.AuxInt = int64ToAuxInt(b2i(c))
   846  		return true
   847  	}
   848  }
   849  func rewriteValueWasm_OpConstNil(v *Value) bool {
   850  	// match: (ConstNil)
   851  	// result: (I64Const [0])
   852  	for {
   853  		v.reset(OpWasmI64Const)
   854  		v.AuxInt = int64ToAuxInt(0)
   855  		return true
   856  	}
   857  }
   858  func rewriteValueWasm_OpCtz16(v *Value) bool {
   859  	v_0 := v.Args[0]
   860  	b := v.Block
   861  	typ := &b.Func.Config.Types
   862  	// match: (Ctz16 x)
   863  	// result: (I64Ctz (I64Or x (I64Const [0x10000])))
   864  	for {
   865  		x := v_0
   866  		v.reset(OpWasmI64Ctz)
   867  		v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
   868  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   869  		v1.AuxInt = int64ToAuxInt(0x10000)
   870  		v0.AddArg2(x, v1)
   871  		v.AddArg(v0)
   872  		return true
   873  	}
   874  }
   875  func rewriteValueWasm_OpCtz32(v *Value) bool {
   876  	v_0 := v.Args[0]
   877  	b := v.Block
   878  	typ := &b.Func.Config.Types
   879  	// match: (Ctz32 x)
   880  	// result: (I64Ctz (I64Or x (I64Const [0x100000000])))
   881  	for {
   882  		x := v_0
   883  		v.reset(OpWasmI64Ctz)
   884  		v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
   885  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   886  		v1.AuxInt = int64ToAuxInt(0x100000000)
   887  		v0.AddArg2(x, v1)
   888  		v.AddArg(v0)
   889  		return true
   890  	}
   891  }
   892  func rewriteValueWasm_OpCtz8(v *Value) bool {
   893  	v_0 := v.Args[0]
   894  	b := v.Block
   895  	typ := &b.Func.Config.Types
   896  	// match: (Ctz8 x)
   897  	// result: (I64Ctz (I64Or x (I64Const [0x100])))
   898  	for {
   899  		x := v_0
   900  		v.reset(OpWasmI64Ctz)
   901  		v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
   902  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
   903  		v1.AuxInt = int64ToAuxInt(0x100)
   904  		v0.AddArg2(x, v1)
   905  		v.AddArg(v0)
   906  		return true
   907  	}
   908  }
   909  func rewriteValueWasm_OpCvt32Uto32F(v *Value) bool {
   910  	v_0 := v.Args[0]
   911  	b := v.Block
   912  	typ := &b.Func.Config.Types
   913  	// match: (Cvt32Uto32F x)
   914  	// result: (F32ConvertI64U (ZeroExt32to64 x))
   915  	for {
   916  		x := v_0
   917  		v.reset(OpWasmF32ConvertI64U)
   918  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
   919  		v0.AddArg(x)
   920  		v.AddArg(v0)
   921  		return true
   922  	}
   923  }
   924  func rewriteValueWasm_OpCvt32Uto64F(v *Value) bool {
   925  	v_0 := v.Args[0]
   926  	b := v.Block
   927  	typ := &b.Func.Config.Types
   928  	// match: (Cvt32Uto64F x)
   929  	// result: (F64ConvertI64U (ZeroExt32to64 x))
   930  	for {
   931  		x := v_0
   932  		v.reset(OpWasmF64ConvertI64U)
   933  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
   934  		v0.AddArg(x)
   935  		v.AddArg(v0)
   936  		return true
   937  	}
   938  }
   939  func rewriteValueWasm_OpCvt32to32F(v *Value) bool {
   940  	v_0 := v.Args[0]
   941  	b := v.Block
   942  	typ := &b.Func.Config.Types
   943  	// match: (Cvt32to32F x)
   944  	// result: (F32ConvertI64S (SignExt32to64 x))
   945  	for {
   946  		x := v_0
   947  		v.reset(OpWasmF32ConvertI64S)
   948  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
   949  		v0.AddArg(x)
   950  		v.AddArg(v0)
   951  		return true
   952  	}
   953  }
   954  func rewriteValueWasm_OpCvt32to64F(v *Value) bool {
   955  	v_0 := v.Args[0]
   956  	b := v.Block
   957  	typ := &b.Func.Config.Types
   958  	// match: (Cvt32to64F x)
   959  	// result: (F64ConvertI64S (SignExt32to64 x))
   960  	for {
   961  		x := v_0
   962  		v.reset(OpWasmF64ConvertI64S)
   963  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
   964  		v0.AddArg(x)
   965  		v.AddArg(v0)
   966  		return true
   967  	}
   968  }
   969  func rewriteValueWasm_OpDiv16(v *Value) bool {
   970  	v_1 := v.Args[1]
   971  	v_0 := v.Args[0]
   972  	b := v.Block
   973  	typ := &b.Func.Config.Types
   974  	// match: (Div16 [false] x y)
   975  	// result: (I64DivS (SignExt16to64 x) (SignExt16to64 y))
   976  	for {
   977  		if auxIntToBool(v.AuxInt) != false {
   978  			break
   979  		}
   980  		x := v_0
   981  		y := v_1
   982  		v.reset(OpWasmI64DivS)
   983  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
   984  		v0.AddArg(x)
   985  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
   986  		v1.AddArg(y)
   987  		v.AddArg2(v0, v1)
   988  		return true
   989  	}
   990  	return false
   991  }
   992  func rewriteValueWasm_OpDiv16u(v *Value) bool {
   993  	v_1 := v.Args[1]
   994  	v_0 := v.Args[0]
   995  	b := v.Block
   996  	typ := &b.Func.Config.Types
   997  	// match: (Div16u x y)
   998  	// result: (I64DivU (ZeroExt16to64 x) (ZeroExt16to64 y))
   999  	for {
  1000  		x := v_0
  1001  		y := v_1
  1002  		v.reset(OpWasmI64DivU)
  1003  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1004  		v0.AddArg(x)
  1005  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1006  		v1.AddArg(y)
  1007  		v.AddArg2(v0, v1)
  1008  		return true
  1009  	}
  1010  }
  1011  func rewriteValueWasm_OpDiv32(v *Value) bool {
  1012  	v_1 := v.Args[1]
  1013  	v_0 := v.Args[0]
  1014  	b := v.Block
  1015  	typ := &b.Func.Config.Types
  1016  	// match: (Div32 [false] x y)
  1017  	// result: (I64DivS (SignExt32to64 x) (SignExt32to64 y))
  1018  	for {
  1019  		if auxIntToBool(v.AuxInt) != false {
  1020  			break
  1021  		}
  1022  		x := v_0
  1023  		y := v_1
  1024  		v.reset(OpWasmI64DivS)
  1025  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1026  		v0.AddArg(x)
  1027  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1028  		v1.AddArg(y)
  1029  		v.AddArg2(v0, v1)
  1030  		return true
  1031  	}
  1032  	return false
  1033  }
  1034  func rewriteValueWasm_OpDiv32u(v *Value) bool {
  1035  	v_1 := v.Args[1]
  1036  	v_0 := v.Args[0]
  1037  	b := v.Block
  1038  	typ := &b.Func.Config.Types
  1039  	// match: (Div32u x y)
  1040  	// result: (I64DivU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1041  	for {
  1042  		x := v_0
  1043  		y := v_1
  1044  		v.reset(OpWasmI64DivU)
  1045  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1046  		v0.AddArg(x)
  1047  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1048  		v1.AddArg(y)
  1049  		v.AddArg2(v0, v1)
  1050  		return true
  1051  	}
  1052  }
  1053  func rewriteValueWasm_OpDiv64(v *Value) bool {
  1054  	v_1 := v.Args[1]
  1055  	v_0 := v.Args[0]
  1056  	// match: (Div64 [false] x y)
  1057  	// result: (I64DivS x y)
  1058  	for {
  1059  		if auxIntToBool(v.AuxInt) != false {
  1060  			break
  1061  		}
  1062  		x := v_0
  1063  		y := v_1
  1064  		v.reset(OpWasmI64DivS)
  1065  		v.AddArg2(x, y)
  1066  		return true
  1067  	}
  1068  	return false
  1069  }
  1070  func rewriteValueWasm_OpDiv8(v *Value) bool {
  1071  	v_1 := v.Args[1]
  1072  	v_0 := v.Args[0]
  1073  	b := v.Block
  1074  	typ := &b.Func.Config.Types
  1075  	// match: (Div8 x y)
  1076  	// result: (I64DivS (SignExt8to64 x) (SignExt8to64 y))
  1077  	for {
  1078  		x := v_0
  1079  		y := v_1
  1080  		v.reset(OpWasmI64DivS)
  1081  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1082  		v0.AddArg(x)
  1083  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1084  		v1.AddArg(y)
  1085  		v.AddArg2(v0, v1)
  1086  		return true
  1087  	}
  1088  }
  1089  func rewriteValueWasm_OpDiv8u(v *Value) bool {
  1090  	v_1 := v.Args[1]
  1091  	v_0 := v.Args[0]
  1092  	b := v.Block
  1093  	typ := &b.Func.Config.Types
  1094  	// match: (Div8u x y)
  1095  	// result: (I64DivU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1096  	for {
  1097  		x := v_0
  1098  		y := v_1
  1099  		v.reset(OpWasmI64DivU)
  1100  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1101  		v0.AddArg(x)
  1102  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1103  		v1.AddArg(y)
  1104  		v.AddArg2(v0, v1)
  1105  		return true
  1106  	}
  1107  }
  1108  func rewriteValueWasm_OpEq16(v *Value) bool {
  1109  	v_1 := v.Args[1]
  1110  	v_0 := v.Args[0]
  1111  	b := v.Block
  1112  	typ := &b.Func.Config.Types
  1113  	// match: (Eq16 x y)
  1114  	// result: (I64Eq (ZeroExt16to64 x) (ZeroExt16to64 y))
  1115  	for {
  1116  		x := v_0
  1117  		y := v_1
  1118  		v.reset(OpWasmI64Eq)
  1119  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1120  		v0.AddArg(x)
  1121  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1122  		v1.AddArg(y)
  1123  		v.AddArg2(v0, v1)
  1124  		return true
  1125  	}
  1126  }
  1127  func rewriteValueWasm_OpEq32(v *Value) bool {
  1128  	v_1 := v.Args[1]
  1129  	v_0 := v.Args[0]
  1130  	b := v.Block
  1131  	typ := &b.Func.Config.Types
  1132  	// match: (Eq32 x y)
  1133  	// result: (I64Eq (ZeroExt32to64 x) (ZeroExt32to64 y))
  1134  	for {
  1135  		x := v_0
  1136  		y := v_1
  1137  		v.reset(OpWasmI64Eq)
  1138  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1139  		v0.AddArg(x)
  1140  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1141  		v1.AddArg(y)
  1142  		v.AddArg2(v0, v1)
  1143  		return true
  1144  	}
  1145  }
  1146  func rewriteValueWasm_OpEq8(v *Value) bool {
  1147  	v_1 := v.Args[1]
  1148  	v_0 := v.Args[0]
  1149  	b := v.Block
  1150  	typ := &b.Func.Config.Types
  1151  	// match: (Eq8 x y)
  1152  	// result: (I64Eq (ZeroExt8to64 x) (ZeroExt8to64 y))
  1153  	for {
  1154  		x := v_0
  1155  		y := v_1
  1156  		v.reset(OpWasmI64Eq)
  1157  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1158  		v0.AddArg(x)
  1159  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1160  		v1.AddArg(y)
  1161  		v.AddArg2(v0, v1)
  1162  		return true
  1163  	}
  1164  }
  1165  func rewriteValueWasm_OpIsNonNil(v *Value) bool {
  1166  	v_0 := v.Args[0]
  1167  	b := v.Block
  1168  	typ := &b.Func.Config.Types
  1169  	// match: (IsNonNil p)
  1170  	// result: (I64Eqz (I64Eqz p))
  1171  	for {
  1172  		p := v_0
  1173  		v.reset(OpWasmI64Eqz)
  1174  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  1175  		v0.AddArg(p)
  1176  		v.AddArg(v0)
  1177  		return true
  1178  	}
  1179  }
  1180  func rewriteValueWasm_OpLeq16(v *Value) bool {
  1181  	v_1 := v.Args[1]
  1182  	v_0 := v.Args[0]
  1183  	b := v.Block
  1184  	typ := &b.Func.Config.Types
  1185  	// match: (Leq16 x y)
  1186  	// result: (I64LeS (SignExt16to64 x) (SignExt16to64 y))
  1187  	for {
  1188  		x := v_0
  1189  		y := v_1
  1190  		v.reset(OpWasmI64LeS)
  1191  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1192  		v0.AddArg(x)
  1193  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1194  		v1.AddArg(y)
  1195  		v.AddArg2(v0, v1)
  1196  		return true
  1197  	}
  1198  }
  1199  func rewriteValueWasm_OpLeq16U(v *Value) bool {
  1200  	v_1 := v.Args[1]
  1201  	v_0 := v.Args[0]
  1202  	b := v.Block
  1203  	typ := &b.Func.Config.Types
  1204  	// match: (Leq16U x y)
  1205  	// result: (I64LeU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1206  	for {
  1207  		x := v_0
  1208  		y := v_1
  1209  		v.reset(OpWasmI64LeU)
  1210  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1211  		v0.AddArg(x)
  1212  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1213  		v1.AddArg(y)
  1214  		v.AddArg2(v0, v1)
  1215  		return true
  1216  	}
  1217  }
  1218  func rewriteValueWasm_OpLeq32(v *Value) bool {
  1219  	v_1 := v.Args[1]
  1220  	v_0 := v.Args[0]
  1221  	b := v.Block
  1222  	typ := &b.Func.Config.Types
  1223  	// match: (Leq32 x y)
  1224  	// result: (I64LeS (SignExt32to64 x) (SignExt32to64 y))
  1225  	for {
  1226  		x := v_0
  1227  		y := v_1
  1228  		v.reset(OpWasmI64LeS)
  1229  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1230  		v0.AddArg(x)
  1231  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1232  		v1.AddArg(y)
  1233  		v.AddArg2(v0, v1)
  1234  		return true
  1235  	}
  1236  }
  1237  func rewriteValueWasm_OpLeq32U(v *Value) bool {
  1238  	v_1 := v.Args[1]
  1239  	v_0 := v.Args[0]
  1240  	b := v.Block
  1241  	typ := &b.Func.Config.Types
  1242  	// match: (Leq32U x y)
  1243  	// result: (I64LeU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1244  	for {
  1245  		x := v_0
  1246  		y := v_1
  1247  		v.reset(OpWasmI64LeU)
  1248  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1249  		v0.AddArg(x)
  1250  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1251  		v1.AddArg(y)
  1252  		v.AddArg2(v0, v1)
  1253  		return true
  1254  	}
  1255  }
  1256  func rewriteValueWasm_OpLeq8(v *Value) bool {
  1257  	v_1 := v.Args[1]
  1258  	v_0 := v.Args[0]
  1259  	b := v.Block
  1260  	typ := &b.Func.Config.Types
  1261  	// match: (Leq8 x y)
  1262  	// result: (I64LeS (SignExt8to64 x) (SignExt8to64 y))
  1263  	for {
  1264  		x := v_0
  1265  		y := v_1
  1266  		v.reset(OpWasmI64LeS)
  1267  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1268  		v0.AddArg(x)
  1269  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1270  		v1.AddArg(y)
  1271  		v.AddArg2(v0, v1)
  1272  		return true
  1273  	}
  1274  }
  1275  func rewriteValueWasm_OpLeq8U(v *Value) bool {
  1276  	v_1 := v.Args[1]
  1277  	v_0 := v.Args[0]
  1278  	b := v.Block
  1279  	typ := &b.Func.Config.Types
  1280  	// match: (Leq8U x y)
  1281  	// result: (I64LeU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1282  	for {
  1283  		x := v_0
  1284  		y := v_1
  1285  		v.reset(OpWasmI64LeU)
  1286  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1287  		v0.AddArg(x)
  1288  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1289  		v1.AddArg(y)
  1290  		v.AddArg2(v0, v1)
  1291  		return true
  1292  	}
  1293  }
  1294  func rewriteValueWasm_OpLess16(v *Value) bool {
  1295  	v_1 := v.Args[1]
  1296  	v_0 := v.Args[0]
  1297  	b := v.Block
  1298  	typ := &b.Func.Config.Types
  1299  	// match: (Less16 x y)
  1300  	// result: (I64LtS (SignExt16to64 x) (SignExt16to64 y))
  1301  	for {
  1302  		x := v_0
  1303  		y := v_1
  1304  		v.reset(OpWasmI64LtS)
  1305  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1306  		v0.AddArg(x)
  1307  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1308  		v1.AddArg(y)
  1309  		v.AddArg2(v0, v1)
  1310  		return true
  1311  	}
  1312  }
  1313  func rewriteValueWasm_OpLess16U(v *Value) bool {
  1314  	v_1 := v.Args[1]
  1315  	v_0 := v.Args[0]
  1316  	b := v.Block
  1317  	typ := &b.Func.Config.Types
  1318  	// match: (Less16U x y)
  1319  	// result: (I64LtU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1320  	for {
  1321  		x := v_0
  1322  		y := v_1
  1323  		v.reset(OpWasmI64LtU)
  1324  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1325  		v0.AddArg(x)
  1326  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1327  		v1.AddArg(y)
  1328  		v.AddArg2(v0, v1)
  1329  		return true
  1330  	}
  1331  }
  1332  func rewriteValueWasm_OpLess32(v *Value) bool {
  1333  	v_1 := v.Args[1]
  1334  	v_0 := v.Args[0]
  1335  	b := v.Block
  1336  	typ := &b.Func.Config.Types
  1337  	// match: (Less32 x y)
  1338  	// result: (I64LtS (SignExt32to64 x) (SignExt32to64 y))
  1339  	for {
  1340  		x := v_0
  1341  		y := v_1
  1342  		v.reset(OpWasmI64LtS)
  1343  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1344  		v0.AddArg(x)
  1345  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1346  		v1.AddArg(y)
  1347  		v.AddArg2(v0, v1)
  1348  		return true
  1349  	}
  1350  }
  1351  func rewriteValueWasm_OpLess32U(v *Value) bool {
  1352  	v_1 := v.Args[1]
  1353  	v_0 := v.Args[0]
  1354  	b := v.Block
  1355  	typ := &b.Func.Config.Types
  1356  	// match: (Less32U x y)
  1357  	// result: (I64LtU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1358  	for {
  1359  		x := v_0
  1360  		y := v_1
  1361  		v.reset(OpWasmI64LtU)
  1362  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1363  		v0.AddArg(x)
  1364  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1365  		v1.AddArg(y)
  1366  		v.AddArg2(v0, v1)
  1367  		return true
  1368  	}
  1369  }
  1370  func rewriteValueWasm_OpLess8(v *Value) bool {
  1371  	v_1 := v.Args[1]
  1372  	v_0 := v.Args[0]
  1373  	b := v.Block
  1374  	typ := &b.Func.Config.Types
  1375  	// match: (Less8 x y)
  1376  	// result: (I64LtS (SignExt8to64 x) (SignExt8to64 y))
  1377  	for {
  1378  		x := v_0
  1379  		y := v_1
  1380  		v.reset(OpWasmI64LtS)
  1381  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1382  		v0.AddArg(x)
  1383  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1384  		v1.AddArg(y)
  1385  		v.AddArg2(v0, v1)
  1386  		return true
  1387  	}
  1388  }
  1389  func rewriteValueWasm_OpLess8U(v *Value) bool {
  1390  	v_1 := v.Args[1]
  1391  	v_0 := v.Args[0]
  1392  	b := v.Block
  1393  	typ := &b.Func.Config.Types
  1394  	// match: (Less8U x y)
  1395  	// result: (I64LtU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1396  	for {
  1397  		x := v_0
  1398  		y := v_1
  1399  		v.reset(OpWasmI64LtU)
  1400  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1401  		v0.AddArg(x)
  1402  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1403  		v1.AddArg(y)
  1404  		v.AddArg2(v0, v1)
  1405  		return true
  1406  	}
  1407  }
  1408  func rewriteValueWasm_OpLoad(v *Value) bool {
  1409  	v_1 := v.Args[1]
  1410  	v_0 := v.Args[0]
  1411  	// match: (Load <t> ptr mem)
  1412  	// cond: is32BitFloat(t)
  1413  	// result: (F32Load ptr mem)
  1414  	for {
  1415  		t := v.Type
  1416  		ptr := v_0
  1417  		mem := v_1
  1418  		if !(is32BitFloat(t)) {
  1419  			break
  1420  		}
  1421  		v.reset(OpWasmF32Load)
  1422  		v.AddArg2(ptr, mem)
  1423  		return true
  1424  	}
  1425  	// match: (Load <t> ptr mem)
  1426  	// cond: is64BitFloat(t)
  1427  	// result: (F64Load ptr mem)
  1428  	for {
  1429  		t := v.Type
  1430  		ptr := v_0
  1431  		mem := v_1
  1432  		if !(is64BitFloat(t)) {
  1433  			break
  1434  		}
  1435  		v.reset(OpWasmF64Load)
  1436  		v.AddArg2(ptr, mem)
  1437  		return true
  1438  	}
  1439  	// match: (Load <t> ptr mem)
  1440  	// cond: t.Size() == 8
  1441  	// result: (I64Load ptr mem)
  1442  	for {
  1443  		t := v.Type
  1444  		ptr := v_0
  1445  		mem := v_1
  1446  		if !(t.Size() == 8) {
  1447  			break
  1448  		}
  1449  		v.reset(OpWasmI64Load)
  1450  		v.AddArg2(ptr, mem)
  1451  		return true
  1452  	}
  1453  	// match: (Load <t> ptr mem)
  1454  	// cond: t.Size() == 4 && !t.IsSigned()
  1455  	// result: (I64Load32U ptr mem)
  1456  	for {
  1457  		t := v.Type
  1458  		ptr := v_0
  1459  		mem := v_1
  1460  		if !(t.Size() == 4 && !t.IsSigned()) {
  1461  			break
  1462  		}
  1463  		v.reset(OpWasmI64Load32U)
  1464  		v.AddArg2(ptr, mem)
  1465  		return true
  1466  	}
  1467  	// match: (Load <t> ptr mem)
  1468  	// cond: t.Size() == 4 && t.IsSigned()
  1469  	// result: (I64Load32S ptr mem)
  1470  	for {
  1471  		t := v.Type
  1472  		ptr := v_0
  1473  		mem := v_1
  1474  		if !(t.Size() == 4 && t.IsSigned()) {
  1475  			break
  1476  		}
  1477  		v.reset(OpWasmI64Load32S)
  1478  		v.AddArg2(ptr, mem)
  1479  		return true
  1480  	}
  1481  	// match: (Load <t> ptr mem)
  1482  	// cond: t.Size() == 2 && !t.IsSigned()
  1483  	// result: (I64Load16U ptr mem)
  1484  	for {
  1485  		t := v.Type
  1486  		ptr := v_0
  1487  		mem := v_1
  1488  		if !(t.Size() == 2 && !t.IsSigned()) {
  1489  			break
  1490  		}
  1491  		v.reset(OpWasmI64Load16U)
  1492  		v.AddArg2(ptr, mem)
  1493  		return true
  1494  	}
  1495  	// match: (Load <t> ptr mem)
  1496  	// cond: t.Size() == 2 && t.IsSigned()
  1497  	// result: (I64Load16S ptr mem)
  1498  	for {
  1499  		t := v.Type
  1500  		ptr := v_0
  1501  		mem := v_1
  1502  		if !(t.Size() == 2 && t.IsSigned()) {
  1503  			break
  1504  		}
  1505  		v.reset(OpWasmI64Load16S)
  1506  		v.AddArg2(ptr, mem)
  1507  		return true
  1508  	}
  1509  	// match: (Load <t> ptr mem)
  1510  	// cond: t.Size() == 1 && !t.IsSigned()
  1511  	// result: (I64Load8U ptr mem)
  1512  	for {
  1513  		t := v.Type
  1514  		ptr := v_0
  1515  		mem := v_1
  1516  		if !(t.Size() == 1 && !t.IsSigned()) {
  1517  			break
  1518  		}
  1519  		v.reset(OpWasmI64Load8U)
  1520  		v.AddArg2(ptr, mem)
  1521  		return true
  1522  	}
  1523  	// match: (Load <t> ptr mem)
  1524  	// cond: t.Size() == 1 && t.IsSigned()
  1525  	// result: (I64Load8S ptr mem)
  1526  	for {
  1527  		t := v.Type
  1528  		ptr := v_0
  1529  		mem := v_1
  1530  		if !(t.Size() == 1 && t.IsSigned()) {
  1531  			break
  1532  		}
  1533  		v.reset(OpWasmI64Load8S)
  1534  		v.AddArg2(ptr, mem)
  1535  		return true
  1536  	}
  1537  	return false
  1538  }
  1539  func rewriteValueWasm_OpLocalAddr(v *Value) bool {
  1540  	v_1 := v.Args[1]
  1541  	v_0 := v.Args[0]
  1542  	b := v.Block
  1543  	typ := &b.Func.Config.Types
  1544  	// match: (LocalAddr <t> {sym} base mem)
  1545  	// cond: t.Elem().HasPointers()
  1546  	// result: (LoweredAddr {sym} (SPanchored base mem))
  1547  	for {
  1548  		t := v.Type
  1549  		sym := auxToSym(v.Aux)
  1550  		base := v_0
  1551  		mem := v_1
  1552  		if !(t.Elem().HasPointers()) {
  1553  			break
  1554  		}
  1555  		v.reset(OpWasmLoweredAddr)
  1556  		v.Aux = symToAux(sym)
  1557  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
  1558  		v0.AddArg2(base, mem)
  1559  		v.AddArg(v0)
  1560  		return true
  1561  	}
  1562  	// match: (LocalAddr <t> {sym} base _)
  1563  	// cond: !t.Elem().HasPointers()
  1564  	// result: (LoweredAddr {sym} base)
  1565  	for {
  1566  		t := v.Type
  1567  		sym := auxToSym(v.Aux)
  1568  		base := v_0
  1569  		if !(!t.Elem().HasPointers()) {
  1570  			break
  1571  		}
  1572  		v.reset(OpWasmLoweredAddr)
  1573  		v.Aux = symToAux(sym)
  1574  		v.AddArg(base)
  1575  		return true
  1576  	}
  1577  	return false
  1578  }
  1579  func rewriteValueWasm_OpLsh16x16(v *Value) bool {
  1580  	v_1 := v.Args[1]
  1581  	v_0 := v.Args[0]
  1582  	b := v.Block
  1583  	typ := &b.Func.Config.Types
  1584  	// match: (Lsh16x16 [c] x y)
  1585  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  1586  	for {
  1587  		c := auxIntToBool(v.AuxInt)
  1588  		x := v_0
  1589  		y := v_1
  1590  		v.reset(OpLsh64x64)
  1591  		v.AuxInt = boolToAuxInt(c)
  1592  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1593  		v0.AddArg(y)
  1594  		v.AddArg2(x, v0)
  1595  		return true
  1596  	}
  1597  }
  1598  func rewriteValueWasm_OpLsh16x32(v *Value) bool {
  1599  	v_1 := v.Args[1]
  1600  	v_0 := v.Args[0]
  1601  	b := v.Block
  1602  	typ := &b.Func.Config.Types
  1603  	// match: (Lsh16x32 [c] x y)
  1604  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  1605  	for {
  1606  		c := auxIntToBool(v.AuxInt)
  1607  		x := v_0
  1608  		y := v_1
  1609  		v.reset(OpLsh64x64)
  1610  		v.AuxInt = boolToAuxInt(c)
  1611  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1612  		v0.AddArg(y)
  1613  		v.AddArg2(x, v0)
  1614  		return true
  1615  	}
  1616  }
  1617  func rewriteValueWasm_OpLsh16x8(v *Value) bool {
  1618  	v_1 := v.Args[1]
  1619  	v_0 := v.Args[0]
  1620  	b := v.Block
  1621  	typ := &b.Func.Config.Types
  1622  	// match: (Lsh16x8 [c] x y)
  1623  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  1624  	for {
  1625  		c := auxIntToBool(v.AuxInt)
  1626  		x := v_0
  1627  		y := v_1
  1628  		v.reset(OpLsh64x64)
  1629  		v.AuxInt = boolToAuxInt(c)
  1630  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1631  		v0.AddArg(y)
  1632  		v.AddArg2(x, v0)
  1633  		return true
  1634  	}
  1635  }
  1636  func rewriteValueWasm_OpLsh32x16(v *Value) bool {
  1637  	v_1 := v.Args[1]
  1638  	v_0 := v.Args[0]
  1639  	b := v.Block
  1640  	typ := &b.Func.Config.Types
  1641  	// match: (Lsh32x16 [c] x y)
  1642  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  1643  	for {
  1644  		c := auxIntToBool(v.AuxInt)
  1645  		x := v_0
  1646  		y := v_1
  1647  		v.reset(OpLsh64x64)
  1648  		v.AuxInt = boolToAuxInt(c)
  1649  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1650  		v0.AddArg(y)
  1651  		v.AddArg2(x, v0)
  1652  		return true
  1653  	}
  1654  }
  1655  func rewriteValueWasm_OpLsh32x32(v *Value) bool {
  1656  	v_1 := v.Args[1]
  1657  	v_0 := v.Args[0]
  1658  	b := v.Block
  1659  	typ := &b.Func.Config.Types
  1660  	// match: (Lsh32x32 [c] x y)
  1661  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  1662  	for {
  1663  		c := auxIntToBool(v.AuxInt)
  1664  		x := v_0
  1665  		y := v_1
  1666  		v.reset(OpLsh64x64)
  1667  		v.AuxInt = boolToAuxInt(c)
  1668  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1669  		v0.AddArg(y)
  1670  		v.AddArg2(x, v0)
  1671  		return true
  1672  	}
  1673  }
  1674  func rewriteValueWasm_OpLsh32x8(v *Value) bool {
  1675  	v_1 := v.Args[1]
  1676  	v_0 := v.Args[0]
  1677  	b := v.Block
  1678  	typ := &b.Func.Config.Types
  1679  	// match: (Lsh32x8 [c] x y)
  1680  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  1681  	for {
  1682  		c := auxIntToBool(v.AuxInt)
  1683  		x := v_0
  1684  		y := v_1
  1685  		v.reset(OpLsh64x64)
  1686  		v.AuxInt = boolToAuxInt(c)
  1687  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1688  		v0.AddArg(y)
  1689  		v.AddArg2(x, v0)
  1690  		return true
  1691  	}
  1692  }
  1693  func rewriteValueWasm_OpLsh64x16(v *Value) bool {
  1694  	v_1 := v.Args[1]
  1695  	v_0 := v.Args[0]
  1696  	b := v.Block
  1697  	typ := &b.Func.Config.Types
  1698  	// match: (Lsh64x16 [c] x y)
  1699  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  1700  	for {
  1701  		c := auxIntToBool(v.AuxInt)
  1702  		x := v_0
  1703  		y := v_1
  1704  		v.reset(OpLsh64x64)
  1705  		v.AuxInt = boolToAuxInt(c)
  1706  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1707  		v0.AddArg(y)
  1708  		v.AddArg2(x, v0)
  1709  		return true
  1710  	}
  1711  }
  1712  func rewriteValueWasm_OpLsh64x32(v *Value) bool {
  1713  	v_1 := v.Args[1]
  1714  	v_0 := v.Args[0]
  1715  	b := v.Block
  1716  	typ := &b.Func.Config.Types
  1717  	// match: (Lsh64x32 [c] x y)
  1718  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  1719  	for {
  1720  		c := auxIntToBool(v.AuxInt)
  1721  		x := v_0
  1722  		y := v_1
  1723  		v.reset(OpLsh64x64)
  1724  		v.AuxInt = boolToAuxInt(c)
  1725  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1726  		v0.AddArg(y)
  1727  		v.AddArg2(x, v0)
  1728  		return true
  1729  	}
  1730  }
  1731  func rewriteValueWasm_OpLsh64x64(v *Value) bool {
  1732  	v_1 := v.Args[1]
  1733  	v_0 := v.Args[0]
  1734  	b := v.Block
  1735  	typ := &b.Func.Config.Types
  1736  	// match: (Lsh64x64 x y)
  1737  	// cond: shiftIsBounded(v)
  1738  	// result: (I64Shl x y)
  1739  	for {
  1740  		x := v_0
  1741  		y := v_1
  1742  		if !(shiftIsBounded(v)) {
  1743  			break
  1744  		}
  1745  		v.reset(OpWasmI64Shl)
  1746  		v.AddArg2(x, y)
  1747  		return true
  1748  	}
  1749  	// match: (Lsh64x64 x (I64Const [c]))
  1750  	// cond: uint64(c) < 64
  1751  	// result: (I64Shl x (I64Const [c]))
  1752  	for {
  1753  		x := v_0
  1754  		if v_1.Op != OpWasmI64Const {
  1755  			break
  1756  		}
  1757  		c := auxIntToInt64(v_1.AuxInt)
  1758  		if !(uint64(c) < 64) {
  1759  			break
  1760  		}
  1761  		v.reset(OpWasmI64Shl)
  1762  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1763  		v0.AuxInt = int64ToAuxInt(c)
  1764  		v.AddArg2(x, v0)
  1765  		return true
  1766  	}
  1767  	// match: (Lsh64x64 x (I64Const [c]))
  1768  	// cond: uint64(c) >= 64
  1769  	// result: (I64Const [0])
  1770  	for {
  1771  		if v_1.Op != OpWasmI64Const {
  1772  			break
  1773  		}
  1774  		c := auxIntToInt64(v_1.AuxInt)
  1775  		if !(uint64(c) >= 64) {
  1776  			break
  1777  		}
  1778  		v.reset(OpWasmI64Const)
  1779  		v.AuxInt = int64ToAuxInt(0)
  1780  		return true
  1781  	}
  1782  	// match: (Lsh64x64 x y)
  1783  	// result: (Select (I64Shl x y) (I64Const [0]) (I64LtU y (I64Const [64])))
  1784  	for {
  1785  		x := v_0
  1786  		y := v_1
  1787  		v.reset(OpWasmSelect)
  1788  		v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
  1789  		v0.AddArg2(x, y)
  1790  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1791  		v1.AuxInt = int64ToAuxInt(0)
  1792  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  1793  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1794  		v3.AuxInt = int64ToAuxInt(64)
  1795  		v2.AddArg2(y, v3)
  1796  		v.AddArg3(v0, v1, v2)
  1797  		return true
  1798  	}
  1799  }
  1800  func rewriteValueWasm_OpLsh64x8(v *Value) bool {
  1801  	v_1 := v.Args[1]
  1802  	v_0 := v.Args[0]
  1803  	b := v.Block
  1804  	typ := &b.Func.Config.Types
  1805  	// match: (Lsh64x8 [c] x y)
  1806  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  1807  	for {
  1808  		c := auxIntToBool(v.AuxInt)
  1809  		x := v_0
  1810  		y := v_1
  1811  		v.reset(OpLsh64x64)
  1812  		v.AuxInt = boolToAuxInt(c)
  1813  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1814  		v0.AddArg(y)
  1815  		v.AddArg2(x, v0)
  1816  		return true
  1817  	}
  1818  }
  1819  func rewriteValueWasm_OpLsh8x16(v *Value) bool {
  1820  	v_1 := v.Args[1]
  1821  	v_0 := v.Args[0]
  1822  	b := v.Block
  1823  	typ := &b.Func.Config.Types
  1824  	// match: (Lsh8x16 [c] x y)
  1825  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  1826  	for {
  1827  		c := auxIntToBool(v.AuxInt)
  1828  		x := v_0
  1829  		y := v_1
  1830  		v.reset(OpLsh64x64)
  1831  		v.AuxInt = boolToAuxInt(c)
  1832  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1833  		v0.AddArg(y)
  1834  		v.AddArg2(x, v0)
  1835  		return true
  1836  	}
  1837  }
  1838  func rewriteValueWasm_OpLsh8x32(v *Value) bool {
  1839  	v_1 := v.Args[1]
  1840  	v_0 := v.Args[0]
  1841  	b := v.Block
  1842  	typ := &b.Func.Config.Types
  1843  	// match: (Lsh8x32 [c] x y)
  1844  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  1845  	for {
  1846  		c := auxIntToBool(v.AuxInt)
  1847  		x := v_0
  1848  		y := v_1
  1849  		v.reset(OpLsh64x64)
  1850  		v.AuxInt = boolToAuxInt(c)
  1851  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1852  		v0.AddArg(y)
  1853  		v.AddArg2(x, v0)
  1854  		return true
  1855  	}
  1856  }
  1857  func rewriteValueWasm_OpLsh8x8(v *Value) bool {
  1858  	v_1 := v.Args[1]
  1859  	v_0 := v.Args[0]
  1860  	b := v.Block
  1861  	typ := &b.Func.Config.Types
  1862  	// match: (Lsh8x8 [c] x y)
  1863  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  1864  	for {
  1865  		c := auxIntToBool(v.AuxInt)
  1866  		x := v_0
  1867  		y := v_1
  1868  		v.reset(OpLsh64x64)
  1869  		v.AuxInt = boolToAuxInt(c)
  1870  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1871  		v0.AddArg(y)
  1872  		v.AddArg2(x, v0)
  1873  		return true
  1874  	}
  1875  }
  1876  func rewriteValueWasm_OpMod16(v *Value) bool {
  1877  	v_1 := v.Args[1]
  1878  	v_0 := v.Args[0]
  1879  	b := v.Block
  1880  	typ := &b.Func.Config.Types
  1881  	// match: (Mod16 [false] x y)
  1882  	// result: (I64RemS (SignExt16to64 x) (SignExt16to64 y))
  1883  	for {
  1884  		if auxIntToBool(v.AuxInt) != false {
  1885  			break
  1886  		}
  1887  		x := v_0
  1888  		y := v_1
  1889  		v.reset(OpWasmI64RemS)
  1890  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1891  		v0.AddArg(x)
  1892  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1893  		v1.AddArg(y)
  1894  		v.AddArg2(v0, v1)
  1895  		return true
  1896  	}
  1897  	return false
  1898  }
  1899  func rewriteValueWasm_OpMod16u(v *Value) bool {
  1900  	v_1 := v.Args[1]
  1901  	v_0 := v.Args[0]
  1902  	b := v.Block
  1903  	typ := &b.Func.Config.Types
  1904  	// match: (Mod16u x y)
  1905  	// result: (I64RemU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1906  	for {
  1907  		x := v_0
  1908  		y := v_1
  1909  		v.reset(OpWasmI64RemU)
  1910  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1911  		v0.AddArg(x)
  1912  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1913  		v1.AddArg(y)
  1914  		v.AddArg2(v0, v1)
  1915  		return true
  1916  	}
  1917  }
  1918  func rewriteValueWasm_OpMod32(v *Value) bool {
  1919  	v_1 := v.Args[1]
  1920  	v_0 := v.Args[0]
  1921  	b := v.Block
  1922  	typ := &b.Func.Config.Types
  1923  	// match: (Mod32 [false] x y)
  1924  	// result: (I64RemS (SignExt32to64 x) (SignExt32to64 y))
  1925  	for {
  1926  		if auxIntToBool(v.AuxInt) != false {
  1927  			break
  1928  		}
  1929  		x := v_0
  1930  		y := v_1
  1931  		v.reset(OpWasmI64RemS)
  1932  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1933  		v0.AddArg(x)
  1934  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1935  		v1.AddArg(y)
  1936  		v.AddArg2(v0, v1)
  1937  		return true
  1938  	}
  1939  	return false
  1940  }
  1941  func rewriteValueWasm_OpMod32u(v *Value) bool {
  1942  	v_1 := v.Args[1]
  1943  	v_0 := v.Args[0]
  1944  	b := v.Block
  1945  	typ := &b.Func.Config.Types
  1946  	// match: (Mod32u x y)
  1947  	// result: (I64RemU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1948  	for {
  1949  		x := v_0
  1950  		y := v_1
  1951  		v.reset(OpWasmI64RemU)
  1952  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1953  		v0.AddArg(x)
  1954  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1955  		v1.AddArg(y)
  1956  		v.AddArg2(v0, v1)
  1957  		return true
  1958  	}
  1959  }
  1960  func rewriteValueWasm_OpMod64(v *Value) bool {
  1961  	v_1 := v.Args[1]
  1962  	v_0 := v.Args[0]
  1963  	// match: (Mod64 [false] x y)
  1964  	// result: (I64RemS x y)
  1965  	for {
  1966  		if auxIntToBool(v.AuxInt) != false {
  1967  			break
  1968  		}
  1969  		x := v_0
  1970  		y := v_1
  1971  		v.reset(OpWasmI64RemS)
  1972  		v.AddArg2(x, y)
  1973  		return true
  1974  	}
  1975  	return false
  1976  }
  1977  func rewriteValueWasm_OpMod8(v *Value) bool {
  1978  	v_1 := v.Args[1]
  1979  	v_0 := v.Args[0]
  1980  	b := v.Block
  1981  	typ := &b.Func.Config.Types
  1982  	// match: (Mod8 x y)
  1983  	// result: (I64RemS (SignExt8to64 x) (SignExt8to64 y))
  1984  	for {
  1985  		x := v_0
  1986  		y := v_1
  1987  		v.reset(OpWasmI64RemS)
  1988  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1989  		v0.AddArg(x)
  1990  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1991  		v1.AddArg(y)
  1992  		v.AddArg2(v0, v1)
  1993  		return true
  1994  	}
  1995  }
  1996  func rewriteValueWasm_OpMod8u(v *Value) bool {
  1997  	v_1 := v.Args[1]
  1998  	v_0 := v.Args[0]
  1999  	b := v.Block
  2000  	typ := &b.Func.Config.Types
  2001  	// match: (Mod8u x y)
  2002  	// result: (I64RemU (ZeroExt8to64 x) (ZeroExt8to64 y))
  2003  	for {
  2004  		x := v_0
  2005  		y := v_1
  2006  		v.reset(OpWasmI64RemU)
  2007  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2008  		v0.AddArg(x)
  2009  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2010  		v1.AddArg(y)
  2011  		v.AddArg2(v0, v1)
  2012  		return true
  2013  	}
  2014  }
  2015  func rewriteValueWasm_OpMove(v *Value) bool {
  2016  	v_2 := v.Args[2]
  2017  	v_1 := v.Args[1]
  2018  	v_0 := v.Args[0]
  2019  	b := v.Block
  2020  	typ := &b.Func.Config.Types
  2021  	// match: (Move [0] _ _ mem)
  2022  	// result: mem
  2023  	for {
  2024  		if auxIntToInt64(v.AuxInt) != 0 {
  2025  			break
  2026  		}
  2027  		mem := v_2
  2028  		v.copyOf(mem)
  2029  		return true
  2030  	}
  2031  	// match: (Move [1] dst src mem)
  2032  	// result: (I64Store8 dst (I64Load8U src mem) mem)
  2033  	for {
  2034  		if auxIntToInt64(v.AuxInt) != 1 {
  2035  			break
  2036  		}
  2037  		dst := v_0
  2038  		src := v_1
  2039  		mem := v_2
  2040  		v.reset(OpWasmI64Store8)
  2041  		v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
  2042  		v0.AddArg2(src, mem)
  2043  		v.AddArg3(dst, v0, mem)
  2044  		return true
  2045  	}
  2046  	// match: (Move [2] dst src mem)
  2047  	// result: (I64Store16 dst (I64Load16U src mem) mem)
  2048  	for {
  2049  		if auxIntToInt64(v.AuxInt) != 2 {
  2050  			break
  2051  		}
  2052  		dst := v_0
  2053  		src := v_1
  2054  		mem := v_2
  2055  		v.reset(OpWasmI64Store16)
  2056  		v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
  2057  		v0.AddArg2(src, mem)
  2058  		v.AddArg3(dst, v0, mem)
  2059  		return true
  2060  	}
  2061  	// match: (Move [4] dst src mem)
  2062  	// result: (I64Store32 dst (I64Load32U src mem) mem)
  2063  	for {
  2064  		if auxIntToInt64(v.AuxInt) != 4 {
  2065  			break
  2066  		}
  2067  		dst := v_0
  2068  		src := v_1
  2069  		mem := v_2
  2070  		v.reset(OpWasmI64Store32)
  2071  		v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  2072  		v0.AddArg2(src, mem)
  2073  		v.AddArg3(dst, v0, mem)
  2074  		return true
  2075  	}
  2076  	// match: (Move [8] dst src mem)
  2077  	// result: (I64Store dst (I64Load src mem) mem)
  2078  	for {
  2079  		if auxIntToInt64(v.AuxInt) != 8 {
  2080  			break
  2081  		}
  2082  		dst := v_0
  2083  		src := v_1
  2084  		mem := v_2
  2085  		v.reset(OpWasmI64Store)
  2086  		v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  2087  		v0.AddArg2(src, mem)
  2088  		v.AddArg3(dst, v0, mem)
  2089  		return true
  2090  	}
  2091  	// match: (Move [16] dst src mem)
  2092  	// result: (I64Store [8] dst (I64Load [8] src mem) (I64Store dst (I64Load src mem) mem))
  2093  	for {
  2094  		if auxIntToInt64(v.AuxInt) != 16 {
  2095  			break
  2096  		}
  2097  		dst := v_0
  2098  		src := v_1
  2099  		mem := v_2
  2100  		v.reset(OpWasmI64Store)
  2101  		v.AuxInt = int64ToAuxInt(8)
  2102  		v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  2103  		v0.AuxInt = int64ToAuxInt(8)
  2104  		v0.AddArg2(src, mem)
  2105  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  2106  		v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  2107  		v2.AddArg2(src, mem)
  2108  		v1.AddArg3(dst, v2, mem)
  2109  		v.AddArg3(dst, v0, v1)
  2110  		return true
  2111  	}
  2112  	// match: (Move [3] dst src mem)
  2113  	// result: (I64Store8 [2] dst (I64Load8U [2] src mem) (I64Store16 dst (I64Load16U src mem) mem))
  2114  	for {
  2115  		if auxIntToInt64(v.AuxInt) != 3 {
  2116  			break
  2117  		}
  2118  		dst := v_0
  2119  		src := v_1
  2120  		mem := v_2
  2121  		v.reset(OpWasmI64Store8)
  2122  		v.AuxInt = int64ToAuxInt(2)
  2123  		v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
  2124  		v0.AuxInt = int64ToAuxInt(2)
  2125  		v0.AddArg2(src, mem)
  2126  		v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
  2127  		v2 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
  2128  		v2.AddArg2(src, mem)
  2129  		v1.AddArg3(dst, v2, mem)
  2130  		v.AddArg3(dst, v0, v1)
  2131  		return true
  2132  	}
  2133  	// match: (Move [5] dst src mem)
  2134  	// result: (I64Store8 [4] dst (I64Load8U [4] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  2135  	for {
  2136  		if auxIntToInt64(v.AuxInt) != 5 {
  2137  			break
  2138  		}
  2139  		dst := v_0
  2140  		src := v_1
  2141  		mem := v_2
  2142  		v.reset(OpWasmI64Store8)
  2143  		v.AuxInt = int64ToAuxInt(4)
  2144  		v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
  2145  		v0.AuxInt = int64ToAuxInt(4)
  2146  		v0.AddArg2(src, mem)
  2147  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  2148  		v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  2149  		v2.AddArg2(src, mem)
  2150  		v1.AddArg3(dst, v2, mem)
  2151  		v.AddArg3(dst, v0, v1)
  2152  		return true
  2153  	}
  2154  	// match: (Move [6] dst src mem)
  2155  	// result: (I64Store16 [4] dst (I64Load16U [4] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  2156  	for {
  2157  		if auxIntToInt64(v.AuxInt) != 6 {
  2158  			break
  2159  		}
  2160  		dst := v_0
  2161  		src := v_1
  2162  		mem := v_2
  2163  		v.reset(OpWasmI64Store16)
  2164  		v.AuxInt = int64ToAuxInt(4)
  2165  		v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
  2166  		v0.AuxInt = int64ToAuxInt(4)
  2167  		v0.AddArg2(src, mem)
  2168  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  2169  		v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  2170  		v2.AddArg2(src, mem)
  2171  		v1.AddArg3(dst, v2, mem)
  2172  		v.AddArg3(dst, v0, v1)
  2173  		return true
  2174  	}
  2175  	// match: (Move [7] dst src mem)
  2176  	// result: (I64Store32 [3] dst (I64Load32U [3] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  2177  	for {
  2178  		if auxIntToInt64(v.AuxInt) != 7 {
  2179  			break
  2180  		}
  2181  		dst := v_0
  2182  		src := v_1
  2183  		mem := v_2
  2184  		v.reset(OpWasmI64Store32)
  2185  		v.AuxInt = int64ToAuxInt(3)
  2186  		v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  2187  		v0.AuxInt = int64ToAuxInt(3)
  2188  		v0.AddArg2(src, mem)
  2189  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  2190  		v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  2191  		v2.AddArg2(src, mem)
  2192  		v1.AddArg3(dst, v2, mem)
  2193  		v.AddArg3(dst, v0, v1)
  2194  		return true
  2195  	}
  2196  	// match: (Move [s] dst src mem)
  2197  	// cond: s > 8 && s < 16
  2198  	// result: (I64Store [s-8] dst (I64Load [s-8] src mem) (I64Store dst (I64Load src mem) mem))
  2199  	for {
  2200  		s := auxIntToInt64(v.AuxInt)
  2201  		dst := v_0
  2202  		src := v_1
  2203  		mem := v_2
  2204  		if !(s > 8 && s < 16) {
  2205  			break
  2206  		}
  2207  		v.reset(OpWasmI64Store)
  2208  		v.AuxInt = int64ToAuxInt(s - 8)
  2209  		v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  2210  		v0.AuxInt = int64ToAuxInt(s - 8)
  2211  		v0.AddArg2(src, mem)
  2212  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  2213  		v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  2214  		v2.AddArg2(src, mem)
  2215  		v1.AddArg3(dst, v2, mem)
  2216  		v.AddArg3(dst, v0, v1)
  2217  		return true
  2218  	}
  2219  	// match: (Move [s] dst src mem)
  2220  	// cond: logLargeCopy(v, s)
  2221  	// result: (LoweredMove [s] dst src mem)
  2222  	for {
  2223  		s := auxIntToInt64(v.AuxInt)
  2224  		dst := v_0
  2225  		src := v_1
  2226  		mem := v_2
  2227  		if !(logLargeCopy(v, s)) {
  2228  			break
  2229  		}
  2230  		v.reset(OpWasmLoweredMove)
  2231  		v.AuxInt = int64ToAuxInt(s)
  2232  		v.AddArg3(dst, src, mem)
  2233  		return true
  2234  	}
  2235  	return false
  2236  }
  2237  func rewriteValueWasm_OpNeg16(v *Value) bool {
  2238  	v_0 := v.Args[0]
  2239  	b := v.Block
  2240  	typ := &b.Func.Config.Types
  2241  	// match: (Neg16 x)
  2242  	// result: (I64Sub (I64Const [0]) x)
  2243  	for {
  2244  		x := v_0
  2245  		v.reset(OpWasmI64Sub)
  2246  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2247  		v0.AuxInt = int64ToAuxInt(0)
  2248  		v.AddArg2(v0, x)
  2249  		return true
  2250  	}
  2251  }
  2252  func rewriteValueWasm_OpNeg32(v *Value) bool {
  2253  	v_0 := v.Args[0]
  2254  	b := v.Block
  2255  	typ := &b.Func.Config.Types
  2256  	// match: (Neg32 x)
  2257  	// result: (I64Sub (I64Const [0]) x)
  2258  	for {
  2259  		x := v_0
  2260  		v.reset(OpWasmI64Sub)
  2261  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2262  		v0.AuxInt = int64ToAuxInt(0)
  2263  		v.AddArg2(v0, x)
  2264  		return true
  2265  	}
  2266  }
  2267  func rewriteValueWasm_OpNeg64(v *Value) bool {
  2268  	v_0 := v.Args[0]
  2269  	b := v.Block
  2270  	typ := &b.Func.Config.Types
  2271  	// match: (Neg64 x)
  2272  	// result: (I64Sub (I64Const [0]) x)
  2273  	for {
  2274  		x := v_0
  2275  		v.reset(OpWasmI64Sub)
  2276  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2277  		v0.AuxInt = int64ToAuxInt(0)
  2278  		v.AddArg2(v0, x)
  2279  		return true
  2280  	}
  2281  }
  2282  func rewriteValueWasm_OpNeg8(v *Value) bool {
  2283  	v_0 := v.Args[0]
  2284  	b := v.Block
  2285  	typ := &b.Func.Config.Types
  2286  	// match: (Neg8 x)
  2287  	// result: (I64Sub (I64Const [0]) x)
  2288  	for {
  2289  		x := v_0
  2290  		v.reset(OpWasmI64Sub)
  2291  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2292  		v0.AuxInt = int64ToAuxInt(0)
  2293  		v.AddArg2(v0, x)
  2294  		return true
  2295  	}
  2296  }
  2297  func rewriteValueWasm_OpNeq16(v *Value) bool {
  2298  	v_1 := v.Args[1]
  2299  	v_0 := v.Args[0]
  2300  	b := v.Block
  2301  	typ := &b.Func.Config.Types
  2302  	// match: (Neq16 x y)
  2303  	// result: (I64Ne (ZeroExt16to64 x) (ZeroExt16to64 y))
  2304  	for {
  2305  		x := v_0
  2306  		y := v_1
  2307  		v.reset(OpWasmI64Ne)
  2308  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2309  		v0.AddArg(x)
  2310  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2311  		v1.AddArg(y)
  2312  		v.AddArg2(v0, v1)
  2313  		return true
  2314  	}
  2315  }
  2316  func rewriteValueWasm_OpNeq32(v *Value) bool {
  2317  	v_1 := v.Args[1]
  2318  	v_0 := v.Args[0]
  2319  	b := v.Block
  2320  	typ := &b.Func.Config.Types
  2321  	// match: (Neq32 x y)
  2322  	// result: (I64Ne (ZeroExt32to64 x) (ZeroExt32to64 y))
  2323  	for {
  2324  		x := v_0
  2325  		y := v_1
  2326  		v.reset(OpWasmI64Ne)
  2327  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2328  		v0.AddArg(x)
  2329  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2330  		v1.AddArg(y)
  2331  		v.AddArg2(v0, v1)
  2332  		return true
  2333  	}
  2334  }
  2335  func rewriteValueWasm_OpNeq8(v *Value) bool {
  2336  	v_1 := v.Args[1]
  2337  	v_0 := v.Args[0]
  2338  	b := v.Block
  2339  	typ := &b.Func.Config.Types
  2340  	// match: (Neq8 x y)
  2341  	// result: (I64Ne (ZeroExt8to64 x) (ZeroExt8to64 y))
  2342  	for {
  2343  		x := v_0
  2344  		y := v_1
  2345  		v.reset(OpWasmI64Ne)
  2346  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2347  		v0.AddArg(x)
  2348  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2349  		v1.AddArg(y)
  2350  		v.AddArg2(v0, v1)
  2351  		return true
  2352  	}
  2353  }
  2354  func rewriteValueWasm_OpPopCount16(v *Value) bool {
  2355  	v_0 := v.Args[0]
  2356  	b := v.Block
  2357  	typ := &b.Func.Config.Types
  2358  	// match: (PopCount16 x)
  2359  	// result: (I64Popcnt (ZeroExt16to64 x))
  2360  	for {
  2361  		x := v_0
  2362  		v.reset(OpWasmI64Popcnt)
  2363  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2364  		v0.AddArg(x)
  2365  		v.AddArg(v0)
  2366  		return true
  2367  	}
  2368  }
  2369  func rewriteValueWasm_OpPopCount32(v *Value) bool {
  2370  	v_0 := v.Args[0]
  2371  	b := v.Block
  2372  	typ := &b.Func.Config.Types
  2373  	// match: (PopCount32 x)
  2374  	// result: (I64Popcnt (ZeroExt32to64 x))
  2375  	for {
  2376  		x := v_0
  2377  		v.reset(OpWasmI64Popcnt)
  2378  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2379  		v0.AddArg(x)
  2380  		v.AddArg(v0)
  2381  		return true
  2382  	}
  2383  }
  2384  func rewriteValueWasm_OpPopCount8(v *Value) bool {
  2385  	v_0 := v.Args[0]
  2386  	b := v.Block
  2387  	typ := &b.Func.Config.Types
  2388  	// match: (PopCount8 x)
  2389  	// result: (I64Popcnt (ZeroExt8to64 x))
  2390  	for {
  2391  		x := v_0
  2392  		v.reset(OpWasmI64Popcnt)
  2393  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2394  		v0.AddArg(x)
  2395  		v.AddArg(v0)
  2396  		return true
  2397  	}
  2398  }
  2399  func rewriteValueWasm_OpRotateLeft16(v *Value) bool {
  2400  	v_1 := v.Args[1]
  2401  	v_0 := v.Args[0]
  2402  	b := v.Block
  2403  	typ := &b.Func.Config.Types
  2404  	// match: (RotateLeft16 <t> x (I64Const [c]))
  2405  	// result: (Or16 (Lsh16x64 <t> x (I64Const [c&15])) (Rsh16Ux64 <t> x (I64Const [-c&15])))
  2406  	for {
  2407  		t := v.Type
  2408  		x := v_0
  2409  		if v_1.Op != OpWasmI64Const {
  2410  			break
  2411  		}
  2412  		c := auxIntToInt64(v_1.AuxInt)
  2413  		v.reset(OpOr16)
  2414  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
  2415  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2416  		v1.AuxInt = int64ToAuxInt(c & 15)
  2417  		v0.AddArg2(x, v1)
  2418  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  2419  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2420  		v3.AuxInt = int64ToAuxInt(-c & 15)
  2421  		v2.AddArg2(x, v3)
  2422  		v.AddArg2(v0, v2)
  2423  		return true
  2424  	}
  2425  	return false
  2426  }
  2427  func rewriteValueWasm_OpRotateLeft8(v *Value) bool {
  2428  	v_1 := v.Args[1]
  2429  	v_0 := v.Args[0]
  2430  	b := v.Block
  2431  	typ := &b.Func.Config.Types
  2432  	// match: (RotateLeft8 <t> x (I64Const [c]))
  2433  	// result: (Or8 (Lsh8x64 <t> x (I64Const [c&7])) (Rsh8Ux64 <t> x (I64Const [-c&7])))
  2434  	for {
  2435  		t := v.Type
  2436  		x := v_0
  2437  		if v_1.Op != OpWasmI64Const {
  2438  			break
  2439  		}
  2440  		c := auxIntToInt64(v_1.AuxInt)
  2441  		v.reset(OpOr8)
  2442  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
  2443  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2444  		v1.AuxInt = int64ToAuxInt(c & 7)
  2445  		v0.AddArg2(x, v1)
  2446  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
  2447  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2448  		v3.AuxInt = int64ToAuxInt(-c & 7)
  2449  		v2.AddArg2(x, v3)
  2450  		v.AddArg2(v0, v2)
  2451  		return true
  2452  	}
  2453  	return false
  2454  }
  2455  func rewriteValueWasm_OpRsh16Ux16(v *Value) bool {
  2456  	v_1 := v.Args[1]
  2457  	v_0 := v.Args[0]
  2458  	b := v.Block
  2459  	typ := &b.Func.Config.Types
  2460  	// match: (Rsh16Ux16 [c] x y)
  2461  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt16to64 y))
  2462  	for {
  2463  		c := auxIntToBool(v.AuxInt)
  2464  		x := v_0
  2465  		y := v_1
  2466  		v.reset(OpRsh64Ux64)
  2467  		v.AuxInt = boolToAuxInt(c)
  2468  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2469  		v0.AddArg(x)
  2470  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2471  		v1.AddArg(y)
  2472  		v.AddArg2(v0, v1)
  2473  		return true
  2474  	}
  2475  }
  2476  func rewriteValueWasm_OpRsh16Ux32(v *Value) bool {
  2477  	v_1 := v.Args[1]
  2478  	v_0 := v.Args[0]
  2479  	b := v.Block
  2480  	typ := &b.Func.Config.Types
  2481  	// match: (Rsh16Ux32 [c] x y)
  2482  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt32to64 y))
  2483  	for {
  2484  		c := auxIntToBool(v.AuxInt)
  2485  		x := v_0
  2486  		y := v_1
  2487  		v.reset(OpRsh64Ux64)
  2488  		v.AuxInt = boolToAuxInt(c)
  2489  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2490  		v0.AddArg(x)
  2491  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2492  		v1.AddArg(y)
  2493  		v.AddArg2(v0, v1)
  2494  		return true
  2495  	}
  2496  }
  2497  func rewriteValueWasm_OpRsh16Ux64(v *Value) bool {
  2498  	v_1 := v.Args[1]
  2499  	v_0 := v.Args[0]
  2500  	b := v.Block
  2501  	typ := &b.Func.Config.Types
  2502  	// match: (Rsh16Ux64 [c] x y)
  2503  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) y)
  2504  	for {
  2505  		c := auxIntToBool(v.AuxInt)
  2506  		x := v_0
  2507  		y := v_1
  2508  		v.reset(OpRsh64Ux64)
  2509  		v.AuxInt = boolToAuxInt(c)
  2510  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2511  		v0.AddArg(x)
  2512  		v.AddArg2(v0, y)
  2513  		return true
  2514  	}
  2515  }
  2516  func rewriteValueWasm_OpRsh16Ux8(v *Value) bool {
  2517  	v_1 := v.Args[1]
  2518  	v_0 := v.Args[0]
  2519  	b := v.Block
  2520  	typ := &b.Func.Config.Types
  2521  	// match: (Rsh16Ux8 [c] x y)
  2522  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt8to64 y))
  2523  	for {
  2524  		c := auxIntToBool(v.AuxInt)
  2525  		x := v_0
  2526  		y := v_1
  2527  		v.reset(OpRsh64Ux64)
  2528  		v.AuxInt = boolToAuxInt(c)
  2529  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2530  		v0.AddArg(x)
  2531  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2532  		v1.AddArg(y)
  2533  		v.AddArg2(v0, v1)
  2534  		return true
  2535  	}
  2536  }
  2537  func rewriteValueWasm_OpRsh16x16(v *Value) bool {
  2538  	v_1 := v.Args[1]
  2539  	v_0 := v.Args[0]
  2540  	b := v.Block
  2541  	typ := &b.Func.Config.Types
  2542  	// match: (Rsh16x16 [c] x y)
  2543  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt16to64 y))
  2544  	for {
  2545  		c := auxIntToBool(v.AuxInt)
  2546  		x := v_0
  2547  		y := v_1
  2548  		v.reset(OpRsh64x64)
  2549  		v.AuxInt = boolToAuxInt(c)
  2550  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2551  		v0.AddArg(x)
  2552  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2553  		v1.AddArg(y)
  2554  		v.AddArg2(v0, v1)
  2555  		return true
  2556  	}
  2557  }
  2558  func rewriteValueWasm_OpRsh16x32(v *Value) bool {
  2559  	v_1 := v.Args[1]
  2560  	v_0 := v.Args[0]
  2561  	b := v.Block
  2562  	typ := &b.Func.Config.Types
  2563  	// match: (Rsh16x32 [c] x y)
  2564  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt32to64 y))
  2565  	for {
  2566  		c := auxIntToBool(v.AuxInt)
  2567  		x := v_0
  2568  		y := v_1
  2569  		v.reset(OpRsh64x64)
  2570  		v.AuxInt = boolToAuxInt(c)
  2571  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2572  		v0.AddArg(x)
  2573  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2574  		v1.AddArg(y)
  2575  		v.AddArg2(v0, v1)
  2576  		return true
  2577  	}
  2578  }
  2579  func rewriteValueWasm_OpRsh16x64(v *Value) bool {
  2580  	v_1 := v.Args[1]
  2581  	v_0 := v.Args[0]
  2582  	b := v.Block
  2583  	typ := &b.Func.Config.Types
  2584  	// match: (Rsh16x64 [c] x y)
  2585  	// result: (Rsh64x64 [c] (SignExt16to64 x) y)
  2586  	for {
  2587  		c := auxIntToBool(v.AuxInt)
  2588  		x := v_0
  2589  		y := v_1
  2590  		v.reset(OpRsh64x64)
  2591  		v.AuxInt = boolToAuxInt(c)
  2592  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2593  		v0.AddArg(x)
  2594  		v.AddArg2(v0, y)
  2595  		return true
  2596  	}
  2597  }
  2598  func rewriteValueWasm_OpRsh16x8(v *Value) bool {
  2599  	v_1 := v.Args[1]
  2600  	v_0 := v.Args[0]
  2601  	b := v.Block
  2602  	typ := &b.Func.Config.Types
  2603  	// match: (Rsh16x8 [c] x y)
  2604  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt8to64 y))
  2605  	for {
  2606  		c := auxIntToBool(v.AuxInt)
  2607  		x := v_0
  2608  		y := v_1
  2609  		v.reset(OpRsh64x64)
  2610  		v.AuxInt = boolToAuxInt(c)
  2611  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2612  		v0.AddArg(x)
  2613  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2614  		v1.AddArg(y)
  2615  		v.AddArg2(v0, v1)
  2616  		return true
  2617  	}
  2618  }
  2619  func rewriteValueWasm_OpRsh32Ux16(v *Value) bool {
  2620  	v_1 := v.Args[1]
  2621  	v_0 := v.Args[0]
  2622  	b := v.Block
  2623  	typ := &b.Func.Config.Types
  2624  	// match: (Rsh32Ux16 [c] x y)
  2625  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt16to64 y))
  2626  	for {
  2627  		c := auxIntToBool(v.AuxInt)
  2628  		x := v_0
  2629  		y := v_1
  2630  		v.reset(OpRsh64Ux64)
  2631  		v.AuxInt = boolToAuxInt(c)
  2632  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2633  		v0.AddArg(x)
  2634  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2635  		v1.AddArg(y)
  2636  		v.AddArg2(v0, v1)
  2637  		return true
  2638  	}
  2639  }
  2640  func rewriteValueWasm_OpRsh32Ux32(v *Value) bool {
  2641  	v_1 := v.Args[1]
  2642  	v_0 := v.Args[0]
  2643  	b := v.Block
  2644  	typ := &b.Func.Config.Types
  2645  	// match: (Rsh32Ux32 [c] x y)
  2646  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt32to64 y))
  2647  	for {
  2648  		c := auxIntToBool(v.AuxInt)
  2649  		x := v_0
  2650  		y := v_1
  2651  		v.reset(OpRsh64Ux64)
  2652  		v.AuxInt = boolToAuxInt(c)
  2653  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2654  		v0.AddArg(x)
  2655  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2656  		v1.AddArg(y)
  2657  		v.AddArg2(v0, v1)
  2658  		return true
  2659  	}
  2660  }
  2661  func rewriteValueWasm_OpRsh32Ux64(v *Value) bool {
  2662  	v_1 := v.Args[1]
  2663  	v_0 := v.Args[0]
  2664  	b := v.Block
  2665  	typ := &b.Func.Config.Types
  2666  	// match: (Rsh32Ux64 [c] x y)
  2667  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) y)
  2668  	for {
  2669  		c := auxIntToBool(v.AuxInt)
  2670  		x := v_0
  2671  		y := v_1
  2672  		v.reset(OpRsh64Ux64)
  2673  		v.AuxInt = boolToAuxInt(c)
  2674  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2675  		v0.AddArg(x)
  2676  		v.AddArg2(v0, y)
  2677  		return true
  2678  	}
  2679  }
  2680  func rewriteValueWasm_OpRsh32Ux8(v *Value) bool {
  2681  	v_1 := v.Args[1]
  2682  	v_0 := v.Args[0]
  2683  	b := v.Block
  2684  	typ := &b.Func.Config.Types
  2685  	// match: (Rsh32Ux8 [c] x y)
  2686  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt8to64 y))
  2687  	for {
  2688  		c := auxIntToBool(v.AuxInt)
  2689  		x := v_0
  2690  		y := v_1
  2691  		v.reset(OpRsh64Ux64)
  2692  		v.AuxInt = boolToAuxInt(c)
  2693  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2694  		v0.AddArg(x)
  2695  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2696  		v1.AddArg(y)
  2697  		v.AddArg2(v0, v1)
  2698  		return true
  2699  	}
  2700  }
  2701  func rewriteValueWasm_OpRsh32x16(v *Value) bool {
  2702  	v_1 := v.Args[1]
  2703  	v_0 := v.Args[0]
  2704  	b := v.Block
  2705  	typ := &b.Func.Config.Types
  2706  	// match: (Rsh32x16 [c] x y)
  2707  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt16to64 y))
  2708  	for {
  2709  		c := auxIntToBool(v.AuxInt)
  2710  		x := v_0
  2711  		y := v_1
  2712  		v.reset(OpRsh64x64)
  2713  		v.AuxInt = boolToAuxInt(c)
  2714  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2715  		v0.AddArg(x)
  2716  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2717  		v1.AddArg(y)
  2718  		v.AddArg2(v0, v1)
  2719  		return true
  2720  	}
  2721  }
  2722  func rewriteValueWasm_OpRsh32x32(v *Value) bool {
  2723  	v_1 := v.Args[1]
  2724  	v_0 := v.Args[0]
  2725  	b := v.Block
  2726  	typ := &b.Func.Config.Types
  2727  	// match: (Rsh32x32 [c] x y)
  2728  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt32to64 y))
  2729  	for {
  2730  		c := auxIntToBool(v.AuxInt)
  2731  		x := v_0
  2732  		y := v_1
  2733  		v.reset(OpRsh64x64)
  2734  		v.AuxInt = boolToAuxInt(c)
  2735  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2736  		v0.AddArg(x)
  2737  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2738  		v1.AddArg(y)
  2739  		v.AddArg2(v0, v1)
  2740  		return true
  2741  	}
  2742  }
  2743  func rewriteValueWasm_OpRsh32x64(v *Value) bool {
  2744  	v_1 := v.Args[1]
  2745  	v_0 := v.Args[0]
  2746  	b := v.Block
  2747  	typ := &b.Func.Config.Types
  2748  	// match: (Rsh32x64 [c] x y)
  2749  	// result: (Rsh64x64 [c] (SignExt32to64 x) y)
  2750  	for {
  2751  		c := auxIntToBool(v.AuxInt)
  2752  		x := v_0
  2753  		y := v_1
  2754  		v.reset(OpRsh64x64)
  2755  		v.AuxInt = boolToAuxInt(c)
  2756  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2757  		v0.AddArg(x)
  2758  		v.AddArg2(v0, y)
  2759  		return true
  2760  	}
  2761  }
  2762  func rewriteValueWasm_OpRsh32x8(v *Value) bool {
  2763  	v_1 := v.Args[1]
  2764  	v_0 := v.Args[0]
  2765  	b := v.Block
  2766  	typ := &b.Func.Config.Types
  2767  	// match: (Rsh32x8 [c] x y)
  2768  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt8to64 y))
  2769  	for {
  2770  		c := auxIntToBool(v.AuxInt)
  2771  		x := v_0
  2772  		y := v_1
  2773  		v.reset(OpRsh64x64)
  2774  		v.AuxInt = boolToAuxInt(c)
  2775  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2776  		v0.AddArg(x)
  2777  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2778  		v1.AddArg(y)
  2779  		v.AddArg2(v0, v1)
  2780  		return true
  2781  	}
  2782  }
  2783  func rewriteValueWasm_OpRsh64Ux16(v *Value) bool {
  2784  	v_1 := v.Args[1]
  2785  	v_0 := v.Args[0]
  2786  	b := v.Block
  2787  	typ := &b.Func.Config.Types
  2788  	// match: (Rsh64Ux16 [c] x y)
  2789  	// result: (Rsh64Ux64 [c] x (ZeroExt16to64 y))
  2790  	for {
  2791  		c := auxIntToBool(v.AuxInt)
  2792  		x := v_0
  2793  		y := v_1
  2794  		v.reset(OpRsh64Ux64)
  2795  		v.AuxInt = boolToAuxInt(c)
  2796  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2797  		v0.AddArg(y)
  2798  		v.AddArg2(x, v0)
  2799  		return true
  2800  	}
  2801  }
  2802  func rewriteValueWasm_OpRsh64Ux32(v *Value) bool {
  2803  	v_1 := v.Args[1]
  2804  	v_0 := v.Args[0]
  2805  	b := v.Block
  2806  	typ := &b.Func.Config.Types
  2807  	// match: (Rsh64Ux32 [c] x y)
  2808  	// result: (Rsh64Ux64 [c] x (ZeroExt32to64 y))
  2809  	for {
  2810  		c := auxIntToBool(v.AuxInt)
  2811  		x := v_0
  2812  		y := v_1
  2813  		v.reset(OpRsh64Ux64)
  2814  		v.AuxInt = boolToAuxInt(c)
  2815  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2816  		v0.AddArg(y)
  2817  		v.AddArg2(x, v0)
  2818  		return true
  2819  	}
  2820  }
  2821  func rewriteValueWasm_OpRsh64Ux64(v *Value) bool {
  2822  	v_1 := v.Args[1]
  2823  	v_0 := v.Args[0]
  2824  	b := v.Block
  2825  	typ := &b.Func.Config.Types
  2826  	// match: (Rsh64Ux64 x y)
  2827  	// cond: shiftIsBounded(v)
  2828  	// result: (I64ShrU x y)
  2829  	for {
  2830  		x := v_0
  2831  		y := v_1
  2832  		if !(shiftIsBounded(v)) {
  2833  			break
  2834  		}
  2835  		v.reset(OpWasmI64ShrU)
  2836  		v.AddArg2(x, y)
  2837  		return true
  2838  	}
  2839  	// match: (Rsh64Ux64 x (I64Const [c]))
  2840  	// cond: uint64(c) < 64
  2841  	// result: (I64ShrU x (I64Const [c]))
  2842  	for {
  2843  		x := v_0
  2844  		if v_1.Op != OpWasmI64Const {
  2845  			break
  2846  		}
  2847  		c := auxIntToInt64(v_1.AuxInt)
  2848  		if !(uint64(c) < 64) {
  2849  			break
  2850  		}
  2851  		v.reset(OpWasmI64ShrU)
  2852  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2853  		v0.AuxInt = int64ToAuxInt(c)
  2854  		v.AddArg2(x, v0)
  2855  		return true
  2856  	}
  2857  	// match: (Rsh64Ux64 x (I64Const [c]))
  2858  	// cond: uint64(c) >= 64
  2859  	// result: (I64Const [0])
  2860  	for {
  2861  		if v_1.Op != OpWasmI64Const {
  2862  			break
  2863  		}
  2864  		c := auxIntToInt64(v_1.AuxInt)
  2865  		if !(uint64(c) >= 64) {
  2866  			break
  2867  		}
  2868  		v.reset(OpWasmI64Const)
  2869  		v.AuxInt = int64ToAuxInt(0)
  2870  		return true
  2871  	}
  2872  	// match: (Rsh64Ux64 x y)
  2873  	// result: (Select (I64ShrU x y) (I64Const [0]) (I64LtU y (I64Const [64])))
  2874  	for {
  2875  		x := v_0
  2876  		y := v_1
  2877  		v.reset(OpWasmSelect)
  2878  		v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  2879  		v0.AddArg2(x, y)
  2880  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2881  		v1.AuxInt = int64ToAuxInt(0)
  2882  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  2883  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2884  		v3.AuxInt = int64ToAuxInt(64)
  2885  		v2.AddArg2(y, v3)
  2886  		v.AddArg3(v0, v1, v2)
  2887  		return true
  2888  	}
  2889  }
  2890  func rewriteValueWasm_OpRsh64Ux8(v *Value) bool {
  2891  	v_1 := v.Args[1]
  2892  	v_0 := v.Args[0]
  2893  	b := v.Block
  2894  	typ := &b.Func.Config.Types
  2895  	// match: (Rsh64Ux8 [c] x y)
  2896  	// result: (Rsh64Ux64 [c] x (ZeroExt8to64 y))
  2897  	for {
  2898  		c := auxIntToBool(v.AuxInt)
  2899  		x := v_0
  2900  		y := v_1
  2901  		v.reset(OpRsh64Ux64)
  2902  		v.AuxInt = boolToAuxInt(c)
  2903  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2904  		v0.AddArg(y)
  2905  		v.AddArg2(x, v0)
  2906  		return true
  2907  	}
  2908  }
  2909  func rewriteValueWasm_OpRsh64x16(v *Value) bool {
  2910  	v_1 := v.Args[1]
  2911  	v_0 := v.Args[0]
  2912  	b := v.Block
  2913  	typ := &b.Func.Config.Types
  2914  	// match: (Rsh64x16 [c] x y)
  2915  	// result: (Rsh64x64 [c] x (ZeroExt16to64 y))
  2916  	for {
  2917  		c := auxIntToBool(v.AuxInt)
  2918  		x := v_0
  2919  		y := v_1
  2920  		v.reset(OpRsh64x64)
  2921  		v.AuxInt = boolToAuxInt(c)
  2922  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2923  		v0.AddArg(y)
  2924  		v.AddArg2(x, v0)
  2925  		return true
  2926  	}
  2927  }
  2928  func rewriteValueWasm_OpRsh64x32(v *Value) bool {
  2929  	v_1 := v.Args[1]
  2930  	v_0 := v.Args[0]
  2931  	b := v.Block
  2932  	typ := &b.Func.Config.Types
  2933  	// match: (Rsh64x32 [c] x y)
  2934  	// result: (Rsh64x64 [c] x (ZeroExt32to64 y))
  2935  	for {
  2936  		c := auxIntToBool(v.AuxInt)
  2937  		x := v_0
  2938  		y := v_1
  2939  		v.reset(OpRsh64x64)
  2940  		v.AuxInt = boolToAuxInt(c)
  2941  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2942  		v0.AddArg(y)
  2943  		v.AddArg2(x, v0)
  2944  		return true
  2945  	}
  2946  }
  2947  func rewriteValueWasm_OpRsh64x64(v *Value) bool {
  2948  	v_1 := v.Args[1]
  2949  	v_0 := v.Args[0]
  2950  	b := v.Block
  2951  	typ := &b.Func.Config.Types
  2952  	// match: (Rsh64x64 x y)
  2953  	// cond: shiftIsBounded(v)
  2954  	// result: (I64ShrS x y)
  2955  	for {
  2956  		x := v_0
  2957  		y := v_1
  2958  		if !(shiftIsBounded(v)) {
  2959  			break
  2960  		}
  2961  		v.reset(OpWasmI64ShrS)
  2962  		v.AddArg2(x, y)
  2963  		return true
  2964  	}
  2965  	// match: (Rsh64x64 x (I64Const [c]))
  2966  	// cond: uint64(c) < 64
  2967  	// result: (I64ShrS x (I64Const [c]))
  2968  	for {
  2969  		x := v_0
  2970  		if v_1.Op != OpWasmI64Const {
  2971  			break
  2972  		}
  2973  		c := auxIntToInt64(v_1.AuxInt)
  2974  		if !(uint64(c) < 64) {
  2975  			break
  2976  		}
  2977  		v.reset(OpWasmI64ShrS)
  2978  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2979  		v0.AuxInt = int64ToAuxInt(c)
  2980  		v.AddArg2(x, v0)
  2981  		return true
  2982  	}
  2983  	// match: (Rsh64x64 x (I64Const [c]))
  2984  	// cond: uint64(c) >= 64
  2985  	// result: (I64ShrS x (I64Const [63]))
  2986  	for {
  2987  		x := v_0
  2988  		if v_1.Op != OpWasmI64Const {
  2989  			break
  2990  		}
  2991  		c := auxIntToInt64(v_1.AuxInt)
  2992  		if !(uint64(c) >= 64) {
  2993  			break
  2994  		}
  2995  		v.reset(OpWasmI64ShrS)
  2996  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2997  		v0.AuxInt = int64ToAuxInt(63)
  2998  		v.AddArg2(x, v0)
  2999  		return true
  3000  	}
  3001  	// match: (Rsh64x64 x y)
  3002  	// result: (I64ShrS x (Select <typ.Int64> y (I64Const [63]) (I64LtU y (I64Const [64]))))
  3003  	for {
  3004  		x := v_0
  3005  		y := v_1
  3006  		v.reset(OpWasmI64ShrS)
  3007  		v0 := b.NewValue0(v.Pos, OpWasmSelect, typ.Int64)
  3008  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3009  		v1.AuxInt = int64ToAuxInt(63)
  3010  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  3011  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3012  		v3.AuxInt = int64ToAuxInt(64)
  3013  		v2.AddArg2(y, v3)
  3014  		v0.AddArg3(y, v1, v2)
  3015  		v.AddArg2(x, v0)
  3016  		return true
  3017  	}
  3018  }
  3019  func rewriteValueWasm_OpRsh64x8(v *Value) bool {
  3020  	v_1 := v.Args[1]
  3021  	v_0 := v.Args[0]
  3022  	b := v.Block
  3023  	typ := &b.Func.Config.Types
  3024  	// match: (Rsh64x8 [c] x y)
  3025  	// result: (Rsh64x64 [c] x (ZeroExt8to64 y))
  3026  	for {
  3027  		c := auxIntToBool(v.AuxInt)
  3028  		x := v_0
  3029  		y := v_1
  3030  		v.reset(OpRsh64x64)
  3031  		v.AuxInt = boolToAuxInt(c)
  3032  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3033  		v0.AddArg(y)
  3034  		v.AddArg2(x, v0)
  3035  		return true
  3036  	}
  3037  }
  3038  func rewriteValueWasm_OpRsh8Ux16(v *Value) bool {
  3039  	v_1 := v.Args[1]
  3040  	v_0 := v.Args[0]
  3041  	b := v.Block
  3042  	typ := &b.Func.Config.Types
  3043  	// match: (Rsh8Ux16 [c] x y)
  3044  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt16to64 y))
  3045  	for {
  3046  		c := auxIntToBool(v.AuxInt)
  3047  		x := v_0
  3048  		y := v_1
  3049  		v.reset(OpRsh64Ux64)
  3050  		v.AuxInt = boolToAuxInt(c)
  3051  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3052  		v0.AddArg(x)
  3053  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3054  		v1.AddArg(y)
  3055  		v.AddArg2(v0, v1)
  3056  		return true
  3057  	}
  3058  }
  3059  func rewriteValueWasm_OpRsh8Ux32(v *Value) bool {
  3060  	v_1 := v.Args[1]
  3061  	v_0 := v.Args[0]
  3062  	b := v.Block
  3063  	typ := &b.Func.Config.Types
  3064  	// match: (Rsh8Ux32 [c] x y)
  3065  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt32to64 y))
  3066  	for {
  3067  		c := auxIntToBool(v.AuxInt)
  3068  		x := v_0
  3069  		y := v_1
  3070  		v.reset(OpRsh64Ux64)
  3071  		v.AuxInt = boolToAuxInt(c)
  3072  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3073  		v0.AddArg(x)
  3074  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3075  		v1.AddArg(y)
  3076  		v.AddArg2(v0, v1)
  3077  		return true
  3078  	}
  3079  }
  3080  func rewriteValueWasm_OpRsh8Ux64(v *Value) bool {
  3081  	v_1 := v.Args[1]
  3082  	v_0 := v.Args[0]
  3083  	b := v.Block
  3084  	typ := &b.Func.Config.Types
  3085  	// match: (Rsh8Ux64 [c] x y)
  3086  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) y)
  3087  	for {
  3088  		c := auxIntToBool(v.AuxInt)
  3089  		x := v_0
  3090  		y := v_1
  3091  		v.reset(OpRsh64Ux64)
  3092  		v.AuxInt = boolToAuxInt(c)
  3093  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3094  		v0.AddArg(x)
  3095  		v.AddArg2(v0, y)
  3096  		return true
  3097  	}
  3098  }
  3099  func rewriteValueWasm_OpRsh8Ux8(v *Value) bool {
  3100  	v_1 := v.Args[1]
  3101  	v_0 := v.Args[0]
  3102  	b := v.Block
  3103  	typ := &b.Func.Config.Types
  3104  	// match: (Rsh8Ux8 [c] x y)
  3105  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt8to64 y))
  3106  	for {
  3107  		c := auxIntToBool(v.AuxInt)
  3108  		x := v_0
  3109  		y := v_1
  3110  		v.reset(OpRsh64Ux64)
  3111  		v.AuxInt = boolToAuxInt(c)
  3112  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3113  		v0.AddArg(x)
  3114  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3115  		v1.AddArg(y)
  3116  		v.AddArg2(v0, v1)
  3117  		return true
  3118  	}
  3119  }
  3120  func rewriteValueWasm_OpRsh8x16(v *Value) bool {
  3121  	v_1 := v.Args[1]
  3122  	v_0 := v.Args[0]
  3123  	b := v.Block
  3124  	typ := &b.Func.Config.Types
  3125  	// match: (Rsh8x16 [c] x y)
  3126  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt16to64 y))
  3127  	for {
  3128  		c := auxIntToBool(v.AuxInt)
  3129  		x := v_0
  3130  		y := v_1
  3131  		v.reset(OpRsh64x64)
  3132  		v.AuxInt = boolToAuxInt(c)
  3133  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  3134  		v0.AddArg(x)
  3135  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3136  		v1.AddArg(y)
  3137  		v.AddArg2(v0, v1)
  3138  		return true
  3139  	}
  3140  }
  3141  func rewriteValueWasm_OpRsh8x32(v *Value) bool {
  3142  	v_1 := v.Args[1]
  3143  	v_0 := v.Args[0]
  3144  	b := v.Block
  3145  	typ := &b.Func.Config.Types
  3146  	// match: (Rsh8x32 [c] x y)
  3147  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt32to64 y))
  3148  	for {
  3149  		c := auxIntToBool(v.AuxInt)
  3150  		x := v_0
  3151  		y := v_1
  3152  		v.reset(OpRsh64x64)
  3153  		v.AuxInt = boolToAuxInt(c)
  3154  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  3155  		v0.AddArg(x)
  3156  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3157  		v1.AddArg(y)
  3158  		v.AddArg2(v0, v1)
  3159  		return true
  3160  	}
  3161  }
  3162  func rewriteValueWasm_OpRsh8x64(v *Value) bool {
  3163  	v_1 := v.Args[1]
  3164  	v_0 := v.Args[0]
  3165  	b := v.Block
  3166  	typ := &b.Func.Config.Types
  3167  	// match: (Rsh8x64 [c] x y)
  3168  	// result: (Rsh64x64 [c] (SignExt8to64 x) y)
  3169  	for {
  3170  		c := auxIntToBool(v.AuxInt)
  3171  		x := v_0
  3172  		y := v_1
  3173  		v.reset(OpRsh64x64)
  3174  		v.AuxInt = boolToAuxInt(c)
  3175  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  3176  		v0.AddArg(x)
  3177  		v.AddArg2(v0, y)
  3178  		return true
  3179  	}
  3180  }
  3181  func rewriteValueWasm_OpRsh8x8(v *Value) bool {
  3182  	v_1 := v.Args[1]
  3183  	v_0 := v.Args[0]
  3184  	b := v.Block
  3185  	typ := &b.Func.Config.Types
  3186  	// match: (Rsh8x8 [c] x y)
  3187  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt8to64 y))
  3188  	for {
  3189  		c := auxIntToBool(v.AuxInt)
  3190  		x := v_0
  3191  		y := v_1
  3192  		v.reset(OpRsh64x64)
  3193  		v.AuxInt = boolToAuxInt(c)
  3194  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  3195  		v0.AddArg(x)
  3196  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3197  		v1.AddArg(y)
  3198  		v.AddArg2(v0, v1)
  3199  		return true
  3200  	}
  3201  }
  3202  func rewriteValueWasm_OpSignExt16to32(v *Value) bool {
  3203  	v_0 := v.Args[0]
  3204  	// match: (SignExt16to32 x:(I64Load16S _ _))
  3205  	// result: x
  3206  	for {
  3207  		x := v_0
  3208  		if x.Op != OpWasmI64Load16S {
  3209  			break
  3210  		}
  3211  		v.copyOf(x)
  3212  		return true
  3213  	}
  3214  	// match: (SignExt16to32 x)
  3215  	// result: (I64Extend16S x)
  3216  	for {
  3217  		x := v_0
  3218  		v.reset(OpWasmI64Extend16S)
  3219  		v.AddArg(x)
  3220  		return true
  3221  	}
  3222  }
  3223  func rewriteValueWasm_OpSignExt16to64(v *Value) bool {
  3224  	v_0 := v.Args[0]
  3225  	// match: (SignExt16to64 x:(I64Load16S _ _))
  3226  	// result: x
  3227  	for {
  3228  		x := v_0
  3229  		if x.Op != OpWasmI64Load16S {
  3230  			break
  3231  		}
  3232  		v.copyOf(x)
  3233  		return true
  3234  	}
  3235  	// match: (SignExt16to64 x)
  3236  	// result: (I64Extend16S x)
  3237  	for {
  3238  		x := v_0
  3239  		v.reset(OpWasmI64Extend16S)
  3240  		v.AddArg(x)
  3241  		return true
  3242  	}
  3243  }
  3244  func rewriteValueWasm_OpSignExt32to64(v *Value) bool {
  3245  	v_0 := v.Args[0]
  3246  	// match: (SignExt32to64 x:(I64Load32S _ _))
  3247  	// result: x
  3248  	for {
  3249  		x := v_0
  3250  		if x.Op != OpWasmI64Load32S {
  3251  			break
  3252  		}
  3253  		v.copyOf(x)
  3254  		return true
  3255  	}
  3256  	// match: (SignExt32to64 x)
  3257  	// result: (I64Extend32S x)
  3258  	for {
  3259  		x := v_0
  3260  		v.reset(OpWasmI64Extend32S)
  3261  		v.AddArg(x)
  3262  		return true
  3263  	}
  3264  }
  3265  func rewriteValueWasm_OpSignExt8to16(v *Value) bool {
  3266  	v_0 := v.Args[0]
  3267  	// match: (SignExt8to16 x:(I64Load8S _ _))
  3268  	// result: x
  3269  	for {
  3270  		x := v_0
  3271  		if x.Op != OpWasmI64Load8S {
  3272  			break
  3273  		}
  3274  		v.copyOf(x)
  3275  		return true
  3276  	}
  3277  	// match: (SignExt8to16 x)
  3278  	// result: (I64Extend8S x)
  3279  	for {
  3280  		x := v_0
  3281  		v.reset(OpWasmI64Extend8S)
  3282  		v.AddArg(x)
  3283  		return true
  3284  	}
  3285  }
  3286  func rewriteValueWasm_OpSignExt8to32(v *Value) bool {
  3287  	v_0 := v.Args[0]
  3288  	// match: (SignExt8to32 x:(I64Load8S _ _))
  3289  	// result: x
  3290  	for {
  3291  		x := v_0
  3292  		if x.Op != OpWasmI64Load8S {
  3293  			break
  3294  		}
  3295  		v.copyOf(x)
  3296  		return true
  3297  	}
  3298  	// match: (SignExt8to32 x)
  3299  	// result: (I64Extend8S x)
  3300  	for {
  3301  		x := v_0
  3302  		v.reset(OpWasmI64Extend8S)
  3303  		v.AddArg(x)
  3304  		return true
  3305  	}
  3306  }
  3307  func rewriteValueWasm_OpSignExt8to64(v *Value) bool {
  3308  	v_0 := v.Args[0]
  3309  	// match: (SignExt8to64 x:(I64Load8S _ _))
  3310  	// result: x
  3311  	for {
  3312  		x := v_0
  3313  		if x.Op != OpWasmI64Load8S {
  3314  			break
  3315  		}
  3316  		v.copyOf(x)
  3317  		return true
  3318  	}
  3319  	// match: (SignExt8to64 x)
  3320  	// result: (I64Extend8S x)
  3321  	for {
  3322  		x := v_0
  3323  		v.reset(OpWasmI64Extend8S)
  3324  		v.AddArg(x)
  3325  		return true
  3326  	}
  3327  }
  3328  func rewriteValueWasm_OpSlicemask(v *Value) bool {
  3329  	v_0 := v.Args[0]
  3330  	b := v.Block
  3331  	typ := &b.Func.Config.Types
  3332  	// match: (Slicemask x)
  3333  	// result: (I64ShrS (I64Sub (I64Const [0]) x) (I64Const [63]))
  3334  	for {
  3335  		x := v_0
  3336  		v.reset(OpWasmI64ShrS)
  3337  		v0 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3338  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3339  		v1.AuxInt = int64ToAuxInt(0)
  3340  		v0.AddArg2(v1, x)
  3341  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3342  		v2.AuxInt = int64ToAuxInt(63)
  3343  		v.AddArg2(v0, v2)
  3344  		return true
  3345  	}
  3346  }
  3347  func rewriteValueWasm_OpStore(v *Value) bool {
  3348  	v_2 := v.Args[2]
  3349  	v_1 := v.Args[1]
  3350  	v_0 := v.Args[0]
  3351  	// match: (Store {t} ptr val mem)
  3352  	// cond: is64BitFloat(t)
  3353  	// result: (F64Store ptr val mem)
  3354  	for {
  3355  		t := auxToType(v.Aux)
  3356  		ptr := v_0
  3357  		val := v_1
  3358  		mem := v_2
  3359  		if !(is64BitFloat(t)) {
  3360  			break
  3361  		}
  3362  		v.reset(OpWasmF64Store)
  3363  		v.AddArg3(ptr, val, mem)
  3364  		return true
  3365  	}
  3366  	// match: (Store {t} ptr val mem)
  3367  	// cond: is32BitFloat(t)
  3368  	// result: (F32Store ptr val mem)
  3369  	for {
  3370  		t := auxToType(v.Aux)
  3371  		ptr := v_0
  3372  		val := v_1
  3373  		mem := v_2
  3374  		if !(is32BitFloat(t)) {
  3375  			break
  3376  		}
  3377  		v.reset(OpWasmF32Store)
  3378  		v.AddArg3(ptr, val, mem)
  3379  		return true
  3380  	}
  3381  	// match: (Store {t} ptr val mem)
  3382  	// cond: t.Size() == 8
  3383  	// result: (I64Store ptr val mem)
  3384  	for {
  3385  		t := auxToType(v.Aux)
  3386  		ptr := v_0
  3387  		val := v_1
  3388  		mem := v_2
  3389  		if !(t.Size() == 8) {
  3390  			break
  3391  		}
  3392  		v.reset(OpWasmI64Store)
  3393  		v.AddArg3(ptr, val, mem)
  3394  		return true
  3395  	}
  3396  	// match: (Store {t} ptr val mem)
  3397  	// cond: t.Size() == 4
  3398  	// result: (I64Store32 ptr val mem)
  3399  	for {
  3400  		t := auxToType(v.Aux)
  3401  		ptr := v_0
  3402  		val := v_1
  3403  		mem := v_2
  3404  		if !(t.Size() == 4) {
  3405  			break
  3406  		}
  3407  		v.reset(OpWasmI64Store32)
  3408  		v.AddArg3(ptr, val, mem)
  3409  		return true
  3410  	}
  3411  	// match: (Store {t} ptr val mem)
  3412  	// cond: t.Size() == 2
  3413  	// result: (I64Store16 ptr val mem)
  3414  	for {
  3415  		t := auxToType(v.Aux)
  3416  		ptr := v_0
  3417  		val := v_1
  3418  		mem := v_2
  3419  		if !(t.Size() == 2) {
  3420  			break
  3421  		}
  3422  		v.reset(OpWasmI64Store16)
  3423  		v.AddArg3(ptr, val, mem)
  3424  		return true
  3425  	}
  3426  	// match: (Store {t} ptr val mem)
  3427  	// cond: t.Size() == 1
  3428  	// result: (I64Store8 ptr val mem)
  3429  	for {
  3430  		t := auxToType(v.Aux)
  3431  		ptr := v_0
  3432  		val := v_1
  3433  		mem := v_2
  3434  		if !(t.Size() == 1) {
  3435  			break
  3436  		}
  3437  		v.reset(OpWasmI64Store8)
  3438  		v.AddArg3(ptr, val, mem)
  3439  		return true
  3440  	}
  3441  	return false
  3442  }
  3443  func rewriteValueWasm_OpWasmF64Add(v *Value) bool {
  3444  	v_1 := v.Args[1]
  3445  	v_0 := v.Args[0]
  3446  	b := v.Block
  3447  	typ := &b.Func.Config.Types
  3448  	// match: (F64Add (F64Const [x]) (F64Const [y]))
  3449  	// result: (F64Const [x + y])
  3450  	for {
  3451  		if v_0.Op != OpWasmF64Const {
  3452  			break
  3453  		}
  3454  		x := auxIntToFloat64(v_0.AuxInt)
  3455  		if v_1.Op != OpWasmF64Const {
  3456  			break
  3457  		}
  3458  		y := auxIntToFloat64(v_1.AuxInt)
  3459  		v.reset(OpWasmF64Const)
  3460  		v.AuxInt = float64ToAuxInt(x + y)
  3461  		return true
  3462  	}
  3463  	// match: (F64Add (F64Const [x]) y)
  3464  	// cond: y.Op != OpWasmF64Const
  3465  	// result: (F64Add y (F64Const [x]))
  3466  	for {
  3467  		if v_0.Op != OpWasmF64Const {
  3468  			break
  3469  		}
  3470  		x := auxIntToFloat64(v_0.AuxInt)
  3471  		y := v_1
  3472  		if !(y.Op != OpWasmF64Const) {
  3473  			break
  3474  		}
  3475  		v.reset(OpWasmF64Add)
  3476  		v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
  3477  		v0.AuxInt = float64ToAuxInt(x)
  3478  		v.AddArg2(y, v0)
  3479  		return true
  3480  	}
  3481  	return false
  3482  }
  3483  func rewriteValueWasm_OpWasmF64Mul(v *Value) bool {
  3484  	v_1 := v.Args[1]
  3485  	v_0 := v.Args[0]
  3486  	b := v.Block
  3487  	typ := &b.Func.Config.Types
  3488  	// match: (F64Mul (F64Const [x]) (F64Const [y]))
  3489  	// cond: !math.IsNaN(x * y)
  3490  	// result: (F64Const [x * y])
  3491  	for {
  3492  		if v_0.Op != OpWasmF64Const {
  3493  			break
  3494  		}
  3495  		x := auxIntToFloat64(v_0.AuxInt)
  3496  		if v_1.Op != OpWasmF64Const {
  3497  			break
  3498  		}
  3499  		y := auxIntToFloat64(v_1.AuxInt)
  3500  		if !(!math.IsNaN(x * y)) {
  3501  			break
  3502  		}
  3503  		v.reset(OpWasmF64Const)
  3504  		v.AuxInt = float64ToAuxInt(x * y)
  3505  		return true
  3506  	}
  3507  	// match: (F64Mul (F64Const [x]) y)
  3508  	// cond: y.Op != OpWasmF64Const
  3509  	// result: (F64Mul y (F64Const [x]))
  3510  	for {
  3511  		if v_0.Op != OpWasmF64Const {
  3512  			break
  3513  		}
  3514  		x := auxIntToFloat64(v_0.AuxInt)
  3515  		y := v_1
  3516  		if !(y.Op != OpWasmF64Const) {
  3517  			break
  3518  		}
  3519  		v.reset(OpWasmF64Mul)
  3520  		v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
  3521  		v0.AuxInt = float64ToAuxInt(x)
  3522  		v.AddArg2(y, v0)
  3523  		return true
  3524  	}
  3525  	return false
  3526  }
  3527  func rewriteValueWasm_OpWasmI64Add(v *Value) bool {
  3528  	v_1 := v.Args[1]
  3529  	v_0 := v.Args[0]
  3530  	b := v.Block
  3531  	typ := &b.Func.Config.Types
  3532  	// match: (I64Add (I64Const [x]) (I64Const [y]))
  3533  	// result: (I64Const [x + y])
  3534  	for {
  3535  		if v_0.Op != OpWasmI64Const {
  3536  			break
  3537  		}
  3538  		x := auxIntToInt64(v_0.AuxInt)
  3539  		if v_1.Op != OpWasmI64Const {
  3540  			break
  3541  		}
  3542  		y := auxIntToInt64(v_1.AuxInt)
  3543  		v.reset(OpWasmI64Const)
  3544  		v.AuxInt = int64ToAuxInt(x + y)
  3545  		return true
  3546  	}
  3547  	// match: (I64Add (I64Const [x]) y)
  3548  	// cond: y.Op != OpWasmI64Const
  3549  	// result: (I64Add y (I64Const [x]))
  3550  	for {
  3551  		if v_0.Op != OpWasmI64Const {
  3552  			break
  3553  		}
  3554  		x := auxIntToInt64(v_0.AuxInt)
  3555  		y := v_1
  3556  		if !(y.Op != OpWasmI64Const) {
  3557  			break
  3558  		}
  3559  		v.reset(OpWasmI64Add)
  3560  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3561  		v0.AuxInt = int64ToAuxInt(x)
  3562  		v.AddArg2(y, v0)
  3563  		return true
  3564  	}
  3565  	// match: (I64Add x (I64Const <t> [y]))
  3566  	// cond: !t.IsPtr()
  3567  	// result: (I64AddConst [y] x)
  3568  	for {
  3569  		x := v_0
  3570  		if v_1.Op != OpWasmI64Const {
  3571  			break
  3572  		}
  3573  		t := v_1.Type
  3574  		y := auxIntToInt64(v_1.AuxInt)
  3575  		if !(!t.IsPtr()) {
  3576  			break
  3577  		}
  3578  		v.reset(OpWasmI64AddConst)
  3579  		v.AuxInt = int64ToAuxInt(y)
  3580  		v.AddArg(x)
  3581  		return true
  3582  	}
  3583  	return false
  3584  }
  3585  func rewriteValueWasm_OpWasmI64AddConst(v *Value) bool {
  3586  	v_0 := v.Args[0]
  3587  	// match: (I64AddConst [0] x)
  3588  	// result: x
  3589  	for {
  3590  		if auxIntToInt64(v.AuxInt) != 0 {
  3591  			break
  3592  		}
  3593  		x := v_0
  3594  		v.copyOf(x)
  3595  		return true
  3596  	}
  3597  	// match: (I64AddConst [off] (LoweredAddr {sym} [off2] base))
  3598  	// cond: isU32Bit(off+int64(off2))
  3599  	// result: (LoweredAddr {sym} [int32(off)+off2] base)
  3600  	for {
  3601  		off := auxIntToInt64(v.AuxInt)
  3602  		if v_0.Op != OpWasmLoweredAddr {
  3603  			break
  3604  		}
  3605  		off2 := auxIntToInt32(v_0.AuxInt)
  3606  		sym := auxToSym(v_0.Aux)
  3607  		base := v_0.Args[0]
  3608  		if !(isU32Bit(off + int64(off2))) {
  3609  			break
  3610  		}
  3611  		v.reset(OpWasmLoweredAddr)
  3612  		v.AuxInt = int32ToAuxInt(int32(off) + off2)
  3613  		v.Aux = symToAux(sym)
  3614  		v.AddArg(base)
  3615  		return true
  3616  	}
  3617  	// match: (I64AddConst [off] x:(SP))
  3618  	// cond: isU32Bit(off)
  3619  	// result: (LoweredAddr [int32(off)] x)
  3620  	for {
  3621  		off := auxIntToInt64(v.AuxInt)
  3622  		x := v_0
  3623  		if x.Op != OpSP || !(isU32Bit(off)) {
  3624  			break
  3625  		}
  3626  		v.reset(OpWasmLoweredAddr)
  3627  		v.AuxInt = int32ToAuxInt(int32(off))
  3628  		v.AddArg(x)
  3629  		return true
  3630  	}
  3631  	return false
  3632  }
  3633  func rewriteValueWasm_OpWasmI64And(v *Value) bool {
  3634  	v_1 := v.Args[1]
  3635  	v_0 := v.Args[0]
  3636  	b := v.Block
  3637  	typ := &b.Func.Config.Types
  3638  	// match: (I64And (I64Const [x]) (I64Const [y]))
  3639  	// result: (I64Const [x & y])
  3640  	for {
  3641  		if v_0.Op != OpWasmI64Const {
  3642  			break
  3643  		}
  3644  		x := auxIntToInt64(v_0.AuxInt)
  3645  		if v_1.Op != OpWasmI64Const {
  3646  			break
  3647  		}
  3648  		y := auxIntToInt64(v_1.AuxInt)
  3649  		v.reset(OpWasmI64Const)
  3650  		v.AuxInt = int64ToAuxInt(x & y)
  3651  		return true
  3652  	}
  3653  	// match: (I64And (I64Const [x]) y)
  3654  	// cond: y.Op != OpWasmI64Const
  3655  	// result: (I64And y (I64Const [x]))
  3656  	for {
  3657  		if v_0.Op != OpWasmI64Const {
  3658  			break
  3659  		}
  3660  		x := auxIntToInt64(v_0.AuxInt)
  3661  		y := v_1
  3662  		if !(y.Op != OpWasmI64Const) {
  3663  			break
  3664  		}
  3665  		v.reset(OpWasmI64And)
  3666  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3667  		v0.AuxInt = int64ToAuxInt(x)
  3668  		v.AddArg2(y, v0)
  3669  		return true
  3670  	}
  3671  	return false
  3672  }
  3673  func rewriteValueWasm_OpWasmI64Eq(v *Value) bool {
  3674  	v_1 := v.Args[1]
  3675  	v_0 := v.Args[0]
  3676  	b := v.Block
  3677  	typ := &b.Func.Config.Types
  3678  	// match: (I64Eq (I64Const [x]) (I64Const [y]))
  3679  	// cond: x == y
  3680  	// result: (I64Const [1])
  3681  	for {
  3682  		if v_0.Op != OpWasmI64Const {
  3683  			break
  3684  		}
  3685  		x := auxIntToInt64(v_0.AuxInt)
  3686  		if v_1.Op != OpWasmI64Const {
  3687  			break
  3688  		}
  3689  		y := auxIntToInt64(v_1.AuxInt)
  3690  		if !(x == y) {
  3691  			break
  3692  		}
  3693  		v.reset(OpWasmI64Const)
  3694  		v.AuxInt = int64ToAuxInt(1)
  3695  		return true
  3696  	}
  3697  	// match: (I64Eq (I64Const [x]) (I64Const [y]))
  3698  	// cond: x != y
  3699  	// result: (I64Const [0])
  3700  	for {
  3701  		if v_0.Op != OpWasmI64Const {
  3702  			break
  3703  		}
  3704  		x := auxIntToInt64(v_0.AuxInt)
  3705  		if v_1.Op != OpWasmI64Const {
  3706  			break
  3707  		}
  3708  		y := auxIntToInt64(v_1.AuxInt)
  3709  		if !(x != y) {
  3710  			break
  3711  		}
  3712  		v.reset(OpWasmI64Const)
  3713  		v.AuxInt = int64ToAuxInt(0)
  3714  		return true
  3715  	}
  3716  	// match: (I64Eq (I64Const [x]) y)
  3717  	// cond: y.Op != OpWasmI64Const
  3718  	// result: (I64Eq y (I64Const [x]))
  3719  	for {
  3720  		if v_0.Op != OpWasmI64Const {
  3721  			break
  3722  		}
  3723  		x := auxIntToInt64(v_0.AuxInt)
  3724  		y := v_1
  3725  		if !(y.Op != OpWasmI64Const) {
  3726  			break
  3727  		}
  3728  		v.reset(OpWasmI64Eq)
  3729  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3730  		v0.AuxInt = int64ToAuxInt(x)
  3731  		v.AddArg2(y, v0)
  3732  		return true
  3733  	}
  3734  	// match: (I64Eq x (I64Const [0]))
  3735  	// result: (I64Eqz x)
  3736  	for {
  3737  		x := v_0
  3738  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  3739  			break
  3740  		}
  3741  		v.reset(OpWasmI64Eqz)
  3742  		v.AddArg(x)
  3743  		return true
  3744  	}
  3745  	return false
  3746  }
  3747  func rewriteValueWasm_OpWasmI64Eqz(v *Value) bool {
  3748  	v_0 := v.Args[0]
  3749  	// match: (I64Eqz (I64Eqz (I64Eqz x)))
  3750  	// result: (I64Eqz x)
  3751  	for {
  3752  		if v_0.Op != OpWasmI64Eqz {
  3753  			break
  3754  		}
  3755  		v_0_0 := v_0.Args[0]
  3756  		if v_0_0.Op != OpWasmI64Eqz {
  3757  			break
  3758  		}
  3759  		x := v_0_0.Args[0]
  3760  		v.reset(OpWasmI64Eqz)
  3761  		v.AddArg(x)
  3762  		return true
  3763  	}
  3764  	return false
  3765  }
  3766  func rewriteValueWasm_OpWasmI64LeU(v *Value) bool {
  3767  	v_1 := v.Args[1]
  3768  	v_0 := v.Args[0]
  3769  	b := v.Block
  3770  	typ := &b.Func.Config.Types
  3771  	// match: (I64LeU x (I64Const [0]))
  3772  	// result: (I64Eqz x)
  3773  	for {
  3774  		x := v_0
  3775  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  3776  			break
  3777  		}
  3778  		v.reset(OpWasmI64Eqz)
  3779  		v.AddArg(x)
  3780  		return true
  3781  	}
  3782  	// match: (I64LeU (I64Const [1]) x)
  3783  	// result: (I64Eqz (I64Eqz x))
  3784  	for {
  3785  		if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 1 {
  3786  			break
  3787  		}
  3788  		x := v_1
  3789  		v.reset(OpWasmI64Eqz)
  3790  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  3791  		v0.AddArg(x)
  3792  		v.AddArg(v0)
  3793  		return true
  3794  	}
  3795  	return false
  3796  }
  3797  func rewriteValueWasm_OpWasmI64Load(v *Value) bool {
  3798  	v_1 := v.Args[1]
  3799  	v_0 := v.Args[0]
  3800  	b := v.Block
  3801  	config := b.Func.Config
  3802  	// match: (I64Load [off] (I64AddConst [off2] ptr) mem)
  3803  	// cond: isU32Bit(off+off2)
  3804  	// result: (I64Load [off+off2] ptr mem)
  3805  	for {
  3806  		off := auxIntToInt64(v.AuxInt)
  3807  		if v_0.Op != OpWasmI64AddConst {
  3808  			break
  3809  		}
  3810  		off2 := auxIntToInt64(v_0.AuxInt)
  3811  		ptr := v_0.Args[0]
  3812  		mem := v_1
  3813  		if !(isU32Bit(off + off2)) {
  3814  			break
  3815  		}
  3816  		v.reset(OpWasmI64Load)
  3817  		v.AuxInt = int64ToAuxInt(off + off2)
  3818  		v.AddArg2(ptr, mem)
  3819  		return true
  3820  	}
  3821  	// match: (I64Load [off] (LoweredAddr {sym} [off2] (SB)) _)
  3822  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  3823  	// result: (I64Const [int64(read64(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))])
  3824  	for {
  3825  		off := auxIntToInt64(v.AuxInt)
  3826  		if v_0.Op != OpWasmLoweredAddr {
  3827  			break
  3828  		}
  3829  		off2 := auxIntToInt32(v_0.AuxInt)
  3830  		sym := auxToSym(v_0.Aux)
  3831  		v_0_0 := v_0.Args[0]
  3832  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  3833  			break
  3834  		}
  3835  		v.reset(OpWasmI64Const)
  3836  		v.AuxInt = int64ToAuxInt(int64(read64(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
  3837  		return true
  3838  	}
  3839  	return false
  3840  }
  3841  func rewriteValueWasm_OpWasmI64Load16S(v *Value) bool {
  3842  	v_1 := v.Args[1]
  3843  	v_0 := v.Args[0]
  3844  	b := v.Block
  3845  	config := b.Func.Config
  3846  	// match: (I64Load16S [off] (I64AddConst [off2] ptr) mem)
  3847  	// cond: isU32Bit(off+off2)
  3848  	// result: (I64Load16S [off+off2] ptr mem)
  3849  	for {
  3850  		off := auxIntToInt64(v.AuxInt)
  3851  		if v_0.Op != OpWasmI64AddConst {
  3852  			break
  3853  		}
  3854  		off2 := auxIntToInt64(v_0.AuxInt)
  3855  		ptr := v_0.Args[0]
  3856  		mem := v_1
  3857  		if !(isU32Bit(off + off2)) {
  3858  			break
  3859  		}
  3860  		v.reset(OpWasmI64Load16S)
  3861  		v.AuxInt = int64ToAuxInt(off + off2)
  3862  		v.AddArg2(ptr, mem)
  3863  		return true
  3864  	}
  3865  	// match: (I64Load16S [off] (LoweredAddr {sym} [off2] (SB)) _)
  3866  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  3867  	// result: (I64Const [int64(int16(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))])
  3868  	for {
  3869  		off := auxIntToInt64(v.AuxInt)
  3870  		if v_0.Op != OpWasmLoweredAddr {
  3871  			break
  3872  		}
  3873  		off2 := auxIntToInt32(v_0.AuxInt)
  3874  		sym := auxToSym(v_0.Aux)
  3875  		v_0_0 := v_0.Args[0]
  3876  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  3877  			break
  3878  		}
  3879  		v.reset(OpWasmI64Const)
  3880  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
  3881  		return true
  3882  	}
  3883  	return false
  3884  }
  3885  func rewriteValueWasm_OpWasmI64Load16U(v *Value) bool {
  3886  	v_1 := v.Args[1]
  3887  	v_0 := v.Args[0]
  3888  	b := v.Block
  3889  	config := b.Func.Config
  3890  	// match: (I64Load16U [off] (I64AddConst [off2] ptr) mem)
  3891  	// cond: isU32Bit(off+off2)
  3892  	// result: (I64Load16U [off+off2] ptr mem)
  3893  	for {
  3894  		off := auxIntToInt64(v.AuxInt)
  3895  		if v_0.Op != OpWasmI64AddConst {
  3896  			break
  3897  		}
  3898  		off2 := auxIntToInt64(v_0.AuxInt)
  3899  		ptr := v_0.Args[0]
  3900  		mem := v_1
  3901  		if !(isU32Bit(off + off2)) {
  3902  			break
  3903  		}
  3904  		v.reset(OpWasmI64Load16U)
  3905  		v.AuxInt = int64ToAuxInt(off + off2)
  3906  		v.AddArg2(ptr, mem)
  3907  		return true
  3908  	}
  3909  	// match: (I64Load16U [off] (LoweredAddr {sym} [off2] (SB)) _)
  3910  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  3911  	// result: (I64Const [int64(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))])
  3912  	for {
  3913  		off := auxIntToInt64(v.AuxInt)
  3914  		if v_0.Op != OpWasmLoweredAddr {
  3915  			break
  3916  		}
  3917  		off2 := auxIntToInt32(v_0.AuxInt)
  3918  		sym := auxToSym(v_0.Aux)
  3919  		v_0_0 := v_0.Args[0]
  3920  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  3921  			break
  3922  		}
  3923  		v.reset(OpWasmI64Const)
  3924  		v.AuxInt = int64ToAuxInt(int64(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
  3925  		return true
  3926  	}
  3927  	return false
  3928  }
  3929  func rewriteValueWasm_OpWasmI64Load32S(v *Value) bool {
  3930  	v_1 := v.Args[1]
  3931  	v_0 := v.Args[0]
  3932  	b := v.Block
  3933  	config := b.Func.Config
  3934  	// match: (I64Load32S [off] (I64AddConst [off2] ptr) mem)
  3935  	// cond: isU32Bit(off+off2)
  3936  	// result: (I64Load32S [off+off2] ptr mem)
  3937  	for {
  3938  		off := auxIntToInt64(v.AuxInt)
  3939  		if v_0.Op != OpWasmI64AddConst {
  3940  			break
  3941  		}
  3942  		off2 := auxIntToInt64(v_0.AuxInt)
  3943  		ptr := v_0.Args[0]
  3944  		mem := v_1
  3945  		if !(isU32Bit(off + off2)) {
  3946  			break
  3947  		}
  3948  		v.reset(OpWasmI64Load32S)
  3949  		v.AuxInt = int64ToAuxInt(off + off2)
  3950  		v.AddArg2(ptr, mem)
  3951  		return true
  3952  	}
  3953  	// match: (I64Load32S [off] (LoweredAddr {sym} [off2] (SB)) _)
  3954  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  3955  	// result: (I64Const [int64(int32(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))])
  3956  	for {
  3957  		off := auxIntToInt64(v.AuxInt)
  3958  		if v_0.Op != OpWasmLoweredAddr {
  3959  			break
  3960  		}
  3961  		off2 := auxIntToInt32(v_0.AuxInt)
  3962  		sym := auxToSym(v_0.Aux)
  3963  		v_0_0 := v_0.Args[0]
  3964  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  3965  			break
  3966  		}
  3967  		v.reset(OpWasmI64Const)
  3968  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
  3969  		return true
  3970  	}
  3971  	return false
  3972  }
  3973  func rewriteValueWasm_OpWasmI64Load32U(v *Value) bool {
  3974  	v_1 := v.Args[1]
  3975  	v_0 := v.Args[0]
  3976  	b := v.Block
  3977  	config := b.Func.Config
  3978  	// match: (I64Load32U [off] (I64AddConst [off2] ptr) mem)
  3979  	// cond: isU32Bit(off+off2)
  3980  	// result: (I64Load32U [off+off2] ptr mem)
  3981  	for {
  3982  		off := auxIntToInt64(v.AuxInt)
  3983  		if v_0.Op != OpWasmI64AddConst {
  3984  			break
  3985  		}
  3986  		off2 := auxIntToInt64(v_0.AuxInt)
  3987  		ptr := v_0.Args[0]
  3988  		mem := v_1
  3989  		if !(isU32Bit(off + off2)) {
  3990  			break
  3991  		}
  3992  		v.reset(OpWasmI64Load32U)
  3993  		v.AuxInt = int64ToAuxInt(off + off2)
  3994  		v.AddArg2(ptr, mem)
  3995  		return true
  3996  	}
  3997  	// match: (I64Load32U [off] (LoweredAddr {sym} [off2] (SB)) _)
  3998  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  3999  	// result: (I64Const [int64(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))])
  4000  	for {
  4001  		off := auxIntToInt64(v.AuxInt)
  4002  		if v_0.Op != OpWasmLoweredAddr {
  4003  			break
  4004  		}
  4005  		off2 := auxIntToInt32(v_0.AuxInt)
  4006  		sym := auxToSym(v_0.Aux)
  4007  		v_0_0 := v_0.Args[0]
  4008  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  4009  			break
  4010  		}
  4011  		v.reset(OpWasmI64Const)
  4012  		v.AuxInt = int64ToAuxInt(int64(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
  4013  		return true
  4014  	}
  4015  	return false
  4016  }
  4017  func rewriteValueWasm_OpWasmI64Load8S(v *Value) bool {
  4018  	v_1 := v.Args[1]
  4019  	v_0 := v.Args[0]
  4020  	// match: (I64Load8S [off] (I64AddConst [off2] ptr) mem)
  4021  	// cond: isU32Bit(off+off2)
  4022  	// result: (I64Load8S [off+off2] ptr mem)
  4023  	for {
  4024  		off := auxIntToInt64(v.AuxInt)
  4025  		if v_0.Op != OpWasmI64AddConst {
  4026  			break
  4027  		}
  4028  		off2 := auxIntToInt64(v_0.AuxInt)
  4029  		ptr := v_0.Args[0]
  4030  		mem := v_1
  4031  		if !(isU32Bit(off + off2)) {
  4032  			break
  4033  		}
  4034  		v.reset(OpWasmI64Load8S)
  4035  		v.AuxInt = int64ToAuxInt(off + off2)
  4036  		v.AddArg2(ptr, mem)
  4037  		return true
  4038  	}
  4039  	// match: (I64Load8S [off] (LoweredAddr {sym} [off2] (SB)) _)
  4040  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  4041  	// result: (I64Const [int64(int8(read8(sym, off+int64(off2))))])
  4042  	for {
  4043  		off := auxIntToInt64(v.AuxInt)
  4044  		if v_0.Op != OpWasmLoweredAddr {
  4045  			break
  4046  		}
  4047  		off2 := auxIntToInt32(v_0.AuxInt)
  4048  		sym := auxToSym(v_0.Aux)
  4049  		v_0_0 := v_0.Args[0]
  4050  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  4051  			break
  4052  		}
  4053  		v.reset(OpWasmI64Const)
  4054  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, off+int64(off2)))))
  4055  		return true
  4056  	}
  4057  	return false
  4058  }
  4059  func rewriteValueWasm_OpWasmI64Load8U(v *Value) bool {
  4060  	v_1 := v.Args[1]
  4061  	v_0 := v.Args[0]
  4062  	// match: (I64Load8U [off] (I64AddConst [off2] ptr) mem)
  4063  	// cond: isU32Bit(off+off2)
  4064  	// result: (I64Load8U [off+off2] ptr mem)
  4065  	for {
  4066  		off := auxIntToInt64(v.AuxInt)
  4067  		if v_0.Op != OpWasmI64AddConst {
  4068  			break
  4069  		}
  4070  		off2 := auxIntToInt64(v_0.AuxInt)
  4071  		ptr := v_0.Args[0]
  4072  		mem := v_1
  4073  		if !(isU32Bit(off + off2)) {
  4074  			break
  4075  		}
  4076  		v.reset(OpWasmI64Load8U)
  4077  		v.AuxInt = int64ToAuxInt(off + off2)
  4078  		v.AddArg2(ptr, mem)
  4079  		return true
  4080  	}
  4081  	// match: (I64Load8U [off] (LoweredAddr {sym} [off2] (SB)) _)
  4082  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  4083  	// result: (I64Const [int64(read8(sym, off+int64(off2)))])
  4084  	for {
  4085  		off := auxIntToInt64(v.AuxInt)
  4086  		if v_0.Op != OpWasmLoweredAddr {
  4087  			break
  4088  		}
  4089  		off2 := auxIntToInt32(v_0.AuxInt)
  4090  		sym := auxToSym(v_0.Aux)
  4091  		v_0_0 := v_0.Args[0]
  4092  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  4093  			break
  4094  		}
  4095  		v.reset(OpWasmI64Const)
  4096  		v.AuxInt = int64ToAuxInt(int64(read8(sym, off+int64(off2))))
  4097  		return true
  4098  	}
  4099  	return false
  4100  }
  4101  func rewriteValueWasm_OpWasmI64LtU(v *Value) bool {
  4102  	v_1 := v.Args[1]
  4103  	v_0 := v.Args[0]
  4104  	b := v.Block
  4105  	typ := &b.Func.Config.Types
  4106  	// match: (I64LtU (I64Const [0]) x)
  4107  	// result: (I64Eqz (I64Eqz x))
  4108  	for {
  4109  		if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 0 {
  4110  			break
  4111  		}
  4112  		x := v_1
  4113  		v.reset(OpWasmI64Eqz)
  4114  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  4115  		v0.AddArg(x)
  4116  		v.AddArg(v0)
  4117  		return true
  4118  	}
  4119  	// match: (I64LtU x (I64Const [1]))
  4120  	// result: (I64Eqz x)
  4121  	for {
  4122  		x := v_0
  4123  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 1 {
  4124  			break
  4125  		}
  4126  		v.reset(OpWasmI64Eqz)
  4127  		v.AddArg(x)
  4128  		return true
  4129  	}
  4130  	return false
  4131  }
  4132  func rewriteValueWasm_OpWasmI64Mul(v *Value) bool {
  4133  	v_1 := v.Args[1]
  4134  	v_0 := v.Args[0]
  4135  	b := v.Block
  4136  	typ := &b.Func.Config.Types
  4137  	// match: (I64Mul (I64Const [x]) (I64Const [y]))
  4138  	// result: (I64Const [x * y])
  4139  	for {
  4140  		if v_0.Op != OpWasmI64Const {
  4141  			break
  4142  		}
  4143  		x := auxIntToInt64(v_0.AuxInt)
  4144  		if v_1.Op != OpWasmI64Const {
  4145  			break
  4146  		}
  4147  		y := auxIntToInt64(v_1.AuxInt)
  4148  		v.reset(OpWasmI64Const)
  4149  		v.AuxInt = int64ToAuxInt(x * y)
  4150  		return true
  4151  	}
  4152  	// match: (I64Mul (I64Const [x]) y)
  4153  	// cond: y.Op != OpWasmI64Const
  4154  	// result: (I64Mul y (I64Const [x]))
  4155  	for {
  4156  		if v_0.Op != OpWasmI64Const {
  4157  			break
  4158  		}
  4159  		x := auxIntToInt64(v_0.AuxInt)
  4160  		y := v_1
  4161  		if !(y.Op != OpWasmI64Const) {
  4162  			break
  4163  		}
  4164  		v.reset(OpWasmI64Mul)
  4165  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4166  		v0.AuxInt = int64ToAuxInt(x)
  4167  		v.AddArg2(y, v0)
  4168  		return true
  4169  	}
  4170  	return false
  4171  }
  4172  func rewriteValueWasm_OpWasmI64Ne(v *Value) bool {
  4173  	v_1 := v.Args[1]
  4174  	v_0 := v.Args[0]
  4175  	b := v.Block
  4176  	typ := &b.Func.Config.Types
  4177  	// match: (I64Ne (I64Const [x]) (I64Const [y]))
  4178  	// cond: x == y
  4179  	// result: (I64Const [0])
  4180  	for {
  4181  		if v_0.Op != OpWasmI64Const {
  4182  			break
  4183  		}
  4184  		x := auxIntToInt64(v_0.AuxInt)
  4185  		if v_1.Op != OpWasmI64Const {
  4186  			break
  4187  		}
  4188  		y := auxIntToInt64(v_1.AuxInt)
  4189  		if !(x == y) {
  4190  			break
  4191  		}
  4192  		v.reset(OpWasmI64Const)
  4193  		v.AuxInt = int64ToAuxInt(0)
  4194  		return true
  4195  	}
  4196  	// match: (I64Ne (I64Const [x]) (I64Const [y]))
  4197  	// cond: x != y
  4198  	// result: (I64Const [1])
  4199  	for {
  4200  		if v_0.Op != OpWasmI64Const {
  4201  			break
  4202  		}
  4203  		x := auxIntToInt64(v_0.AuxInt)
  4204  		if v_1.Op != OpWasmI64Const {
  4205  			break
  4206  		}
  4207  		y := auxIntToInt64(v_1.AuxInt)
  4208  		if !(x != y) {
  4209  			break
  4210  		}
  4211  		v.reset(OpWasmI64Const)
  4212  		v.AuxInt = int64ToAuxInt(1)
  4213  		return true
  4214  	}
  4215  	// match: (I64Ne (I64Const [x]) y)
  4216  	// cond: y.Op != OpWasmI64Const
  4217  	// result: (I64Ne y (I64Const [x]))
  4218  	for {
  4219  		if v_0.Op != OpWasmI64Const {
  4220  			break
  4221  		}
  4222  		x := auxIntToInt64(v_0.AuxInt)
  4223  		y := v_1
  4224  		if !(y.Op != OpWasmI64Const) {
  4225  			break
  4226  		}
  4227  		v.reset(OpWasmI64Ne)
  4228  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4229  		v0.AuxInt = int64ToAuxInt(x)
  4230  		v.AddArg2(y, v0)
  4231  		return true
  4232  	}
  4233  	// match: (I64Ne x (I64Const [0]))
  4234  	// result: (I64Eqz (I64Eqz x))
  4235  	for {
  4236  		x := v_0
  4237  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  4238  			break
  4239  		}
  4240  		v.reset(OpWasmI64Eqz)
  4241  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  4242  		v0.AddArg(x)
  4243  		v.AddArg(v0)
  4244  		return true
  4245  	}
  4246  	return false
  4247  }
  4248  func rewriteValueWasm_OpWasmI64Or(v *Value) bool {
  4249  	v_1 := v.Args[1]
  4250  	v_0 := v.Args[0]
  4251  	b := v.Block
  4252  	typ := &b.Func.Config.Types
  4253  	// match: (I64Or (I64Const [x]) (I64Const [y]))
  4254  	// result: (I64Const [x | y])
  4255  	for {
  4256  		if v_0.Op != OpWasmI64Const {
  4257  			break
  4258  		}
  4259  		x := auxIntToInt64(v_0.AuxInt)
  4260  		if v_1.Op != OpWasmI64Const {
  4261  			break
  4262  		}
  4263  		y := auxIntToInt64(v_1.AuxInt)
  4264  		v.reset(OpWasmI64Const)
  4265  		v.AuxInt = int64ToAuxInt(x | y)
  4266  		return true
  4267  	}
  4268  	// match: (I64Or (I64Const [x]) y)
  4269  	// cond: y.Op != OpWasmI64Const
  4270  	// result: (I64Or y (I64Const [x]))
  4271  	for {
  4272  		if v_0.Op != OpWasmI64Const {
  4273  			break
  4274  		}
  4275  		x := auxIntToInt64(v_0.AuxInt)
  4276  		y := v_1
  4277  		if !(y.Op != OpWasmI64Const) {
  4278  			break
  4279  		}
  4280  		v.reset(OpWasmI64Or)
  4281  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4282  		v0.AuxInt = int64ToAuxInt(x)
  4283  		v.AddArg2(y, v0)
  4284  		return true
  4285  	}
  4286  	return false
  4287  }
  4288  func rewriteValueWasm_OpWasmI64Shl(v *Value) bool {
  4289  	v_1 := v.Args[1]
  4290  	v_0 := v.Args[0]
  4291  	// match: (I64Shl (I64Const [x]) (I64Const [y]))
  4292  	// result: (I64Const [x << uint64(y)])
  4293  	for {
  4294  		if v_0.Op != OpWasmI64Const {
  4295  			break
  4296  		}
  4297  		x := auxIntToInt64(v_0.AuxInt)
  4298  		if v_1.Op != OpWasmI64Const {
  4299  			break
  4300  		}
  4301  		y := auxIntToInt64(v_1.AuxInt)
  4302  		v.reset(OpWasmI64Const)
  4303  		v.AuxInt = int64ToAuxInt(x << uint64(y))
  4304  		return true
  4305  	}
  4306  	return false
  4307  }
  4308  func rewriteValueWasm_OpWasmI64ShrS(v *Value) bool {
  4309  	v_1 := v.Args[1]
  4310  	v_0 := v.Args[0]
  4311  	// match: (I64ShrS (I64Const [x]) (I64Const [y]))
  4312  	// result: (I64Const [x >> uint64(y)])
  4313  	for {
  4314  		if v_0.Op != OpWasmI64Const {
  4315  			break
  4316  		}
  4317  		x := auxIntToInt64(v_0.AuxInt)
  4318  		if v_1.Op != OpWasmI64Const {
  4319  			break
  4320  		}
  4321  		y := auxIntToInt64(v_1.AuxInt)
  4322  		v.reset(OpWasmI64Const)
  4323  		v.AuxInt = int64ToAuxInt(x >> uint64(y))
  4324  		return true
  4325  	}
  4326  	return false
  4327  }
  4328  func rewriteValueWasm_OpWasmI64ShrU(v *Value) bool {
  4329  	v_1 := v.Args[1]
  4330  	v_0 := v.Args[0]
  4331  	// match: (I64ShrU (I64Const [x]) (I64Const [y]))
  4332  	// result: (I64Const [int64(uint64(x) >> uint64(y))])
  4333  	for {
  4334  		if v_0.Op != OpWasmI64Const {
  4335  			break
  4336  		}
  4337  		x := auxIntToInt64(v_0.AuxInt)
  4338  		if v_1.Op != OpWasmI64Const {
  4339  			break
  4340  		}
  4341  		y := auxIntToInt64(v_1.AuxInt)
  4342  		v.reset(OpWasmI64Const)
  4343  		v.AuxInt = int64ToAuxInt(int64(uint64(x) >> uint64(y)))
  4344  		return true
  4345  	}
  4346  	return false
  4347  }
  4348  func rewriteValueWasm_OpWasmI64Store(v *Value) bool {
  4349  	v_2 := v.Args[2]
  4350  	v_1 := v.Args[1]
  4351  	v_0 := v.Args[0]
  4352  	// match: (I64Store [off] (I64AddConst [off2] ptr) val mem)
  4353  	// cond: isU32Bit(off+off2)
  4354  	// result: (I64Store [off+off2] ptr val mem)
  4355  	for {
  4356  		off := auxIntToInt64(v.AuxInt)
  4357  		if v_0.Op != OpWasmI64AddConst {
  4358  			break
  4359  		}
  4360  		off2 := auxIntToInt64(v_0.AuxInt)
  4361  		ptr := v_0.Args[0]
  4362  		val := v_1
  4363  		mem := v_2
  4364  		if !(isU32Bit(off + off2)) {
  4365  			break
  4366  		}
  4367  		v.reset(OpWasmI64Store)
  4368  		v.AuxInt = int64ToAuxInt(off + off2)
  4369  		v.AddArg3(ptr, val, mem)
  4370  		return true
  4371  	}
  4372  	return false
  4373  }
  4374  func rewriteValueWasm_OpWasmI64Store16(v *Value) bool {
  4375  	v_2 := v.Args[2]
  4376  	v_1 := v.Args[1]
  4377  	v_0 := v.Args[0]
  4378  	// match: (I64Store16 [off] (I64AddConst [off2] ptr) val mem)
  4379  	// cond: isU32Bit(off+off2)
  4380  	// result: (I64Store16 [off+off2] ptr val mem)
  4381  	for {
  4382  		off := auxIntToInt64(v.AuxInt)
  4383  		if v_0.Op != OpWasmI64AddConst {
  4384  			break
  4385  		}
  4386  		off2 := auxIntToInt64(v_0.AuxInt)
  4387  		ptr := v_0.Args[0]
  4388  		val := v_1
  4389  		mem := v_2
  4390  		if !(isU32Bit(off + off2)) {
  4391  			break
  4392  		}
  4393  		v.reset(OpWasmI64Store16)
  4394  		v.AuxInt = int64ToAuxInt(off + off2)
  4395  		v.AddArg3(ptr, val, mem)
  4396  		return true
  4397  	}
  4398  	return false
  4399  }
  4400  func rewriteValueWasm_OpWasmI64Store32(v *Value) bool {
  4401  	v_2 := v.Args[2]
  4402  	v_1 := v.Args[1]
  4403  	v_0 := v.Args[0]
  4404  	// match: (I64Store32 [off] (I64AddConst [off2] ptr) val mem)
  4405  	// cond: isU32Bit(off+off2)
  4406  	// result: (I64Store32 [off+off2] ptr val mem)
  4407  	for {
  4408  		off := auxIntToInt64(v.AuxInt)
  4409  		if v_0.Op != OpWasmI64AddConst {
  4410  			break
  4411  		}
  4412  		off2 := auxIntToInt64(v_0.AuxInt)
  4413  		ptr := v_0.Args[0]
  4414  		val := v_1
  4415  		mem := v_2
  4416  		if !(isU32Bit(off + off2)) {
  4417  			break
  4418  		}
  4419  		v.reset(OpWasmI64Store32)
  4420  		v.AuxInt = int64ToAuxInt(off + off2)
  4421  		v.AddArg3(ptr, val, mem)
  4422  		return true
  4423  	}
  4424  	return false
  4425  }
  4426  func rewriteValueWasm_OpWasmI64Store8(v *Value) bool {
  4427  	v_2 := v.Args[2]
  4428  	v_1 := v.Args[1]
  4429  	v_0 := v.Args[0]
  4430  	// match: (I64Store8 [off] (I64AddConst [off2] ptr) val mem)
  4431  	// cond: isU32Bit(off+off2)
  4432  	// result: (I64Store8 [off+off2] ptr val mem)
  4433  	for {
  4434  		off := auxIntToInt64(v.AuxInt)
  4435  		if v_0.Op != OpWasmI64AddConst {
  4436  			break
  4437  		}
  4438  		off2 := auxIntToInt64(v_0.AuxInt)
  4439  		ptr := v_0.Args[0]
  4440  		val := v_1
  4441  		mem := v_2
  4442  		if !(isU32Bit(off + off2)) {
  4443  			break
  4444  		}
  4445  		v.reset(OpWasmI64Store8)
  4446  		v.AuxInt = int64ToAuxInt(off + off2)
  4447  		v.AddArg3(ptr, val, mem)
  4448  		return true
  4449  	}
  4450  	return false
  4451  }
  4452  func rewriteValueWasm_OpWasmI64Xor(v *Value) bool {
  4453  	v_1 := v.Args[1]
  4454  	v_0 := v.Args[0]
  4455  	b := v.Block
  4456  	typ := &b.Func.Config.Types
  4457  	// match: (I64Xor (I64Const [x]) (I64Const [y]))
  4458  	// result: (I64Const [x ^ y])
  4459  	for {
  4460  		if v_0.Op != OpWasmI64Const {
  4461  			break
  4462  		}
  4463  		x := auxIntToInt64(v_0.AuxInt)
  4464  		if v_1.Op != OpWasmI64Const {
  4465  			break
  4466  		}
  4467  		y := auxIntToInt64(v_1.AuxInt)
  4468  		v.reset(OpWasmI64Const)
  4469  		v.AuxInt = int64ToAuxInt(x ^ y)
  4470  		return true
  4471  	}
  4472  	// match: (I64Xor (I64Const [x]) y)
  4473  	// cond: y.Op != OpWasmI64Const
  4474  	// result: (I64Xor y (I64Const [x]))
  4475  	for {
  4476  		if v_0.Op != OpWasmI64Const {
  4477  			break
  4478  		}
  4479  		x := auxIntToInt64(v_0.AuxInt)
  4480  		y := v_1
  4481  		if !(y.Op != OpWasmI64Const) {
  4482  			break
  4483  		}
  4484  		v.reset(OpWasmI64Xor)
  4485  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4486  		v0.AuxInt = int64ToAuxInt(x)
  4487  		v.AddArg2(y, v0)
  4488  		return true
  4489  	}
  4490  	return false
  4491  }
  4492  func rewriteValueWasm_OpZero(v *Value) bool {
  4493  	v_1 := v.Args[1]
  4494  	v_0 := v.Args[0]
  4495  	b := v.Block
  4496  	typ := &b.Func.Config.Types
  4497  	// match: (Zero [0] _ mem)
  4498  	// result: mem
  4499  	for {
  4500  		if auxIntToInt64(v.AuxInt) != 0 {
  4501  			break
  4502  		}
  4503  		mem := v_1
  4504  		v.copyOf(mem)
  4505  		return true
  4506  	}
  4507  	// match: (Zero [1] destptr mem)
  4508  	// result: (I64Store8 destptr (I64Const [0]) mem)
  4509  	for {
  4510  		if auxIntToInt64(v.AuxInt) != 1 {
  4511  			break
  4512  		}
  4513  		destptr := v_0
  4514  		mem := v_1
  4515  		v.reset(OpWasmI64Store8)
  4516  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4517  		v0.AuxInt = int64ToAuxInt(0)
  4518  		v.AddArg3(destptr, v0, mem)
  4519  		return true
  4520  	}
  4521  	// match: (Zero [2] destptr mem)
  4522  	// result: (I64Store16 destptr (I64Const [0]) mem)
  4523  	for {
  4524  		if auxIntToInt64(v.AuxInt) != 2 {
  4525  			break
  4526  		}
  4527  		destptr := v_0
  4528  		mem := v_1
  4529  		v.reset(OpWasmI64Store16)
  4530  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4531  		v0.AuxInt = int64ToAuxInt(0)
  4532  		v.AddArg3(destptr, v0, mem)
  4533  		return true
  4534  	}
  4535  	// match: (Zero [4] destptr mem)
  4536  	// result: (I64Store32 destptr (I64Const [0]) mem)
  4537  	for {
  4538  		if auxIntToInt64(v.AuxInt) != 4 {
  4539  			break
  4540  		}
  4541  		destptr := v_0
  4542  		mem := v_1
  4543  		v.reset(OpWasmI64Store32)
  4544  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4545  		v0.AuxInt = int64ToAuxInt(0)
  4546  		v.AddArg3(destptr, v0, mem)
  4547  		return true
  4548  	}
  4549  	// match: (Zero [8] destptr mem)
  4550  	// result: (I64Store destptr (I64Const [0]) mem)
  4551  	for {
  4552  		if auxIntToInt64(v.AuxInt) != 8 {
  4553  			break
  4554  		}
  4555  		destptr := v_0
  4556  		mem := v_1
  4557  		v.reset(OpWasmI64Store)
  4558  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4559  		v0.AuxInt = int64ToAuxInt(0)
  4560  		v.AddArg3(destptr, v0, mem)
  4561  		return true
  4562  	}
  4563  	// match: (Zero [3] destptr mem)
  4564  	// result: (I64Store8 [2] destptr (I64Const [0]) (I64Store16 destptr (I64Const [0]) mem))
  4565  	for {
  4566  		if auxIntToInt64(v.AuxInt) != 3 {
  4567  			break
  4568  		}
  4569  		destptr := v_0
  4570  		mem := v_1
  4571  		v.reset(OpWasmI64Store8)
  4572  		v.AuxInt = int64ToAuxInt(2)
  4573  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4574  		v0.AuxInt = int64ToAuxInt(0)
  4575  		v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
  4576  		v1.AddArg3(destptr, v0, mem)
  4577  		v.AddArg3(destptr, v0, v1)
  4578  		return true
  4579  	}
  4580  	// match: (Zero [5] destptr mem)
  4581  	// result: (I64Store8 [4] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  4582  	for {
  4583  		if auxIntToInt64(v.AuxInt) != 5 {
  4584  			break
  4585  		}
  4586  		destptr := v_0
  4587  		mem := v_1
  4588  		v.reset(OpWasmI64Store8)
  4589  		v.AuxInt = int64ToAuxInt(4)
  4590  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4591  		v0.AuxInt = int64ToAuxInt(0)
  4592  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  4593  		v1.AddArg3(destptr, v0, mem)
  4594  		v.AddArg3(destptr, v0, v1)
  4595  		return true
  4596  	}
  4597  	// match: (Zero [6] destptr mem)
  4598  	// result: (I64Store16 [4] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  4599  	for {
  4600  		if auxIntToInt64(v.AuxInt) != 6 {
  4601  			break
  4602  		}
  4603  		destptr := v_0
  4604  		mem := v_1
  4605  		v.reset(OpWasmI64Store16)
  4606  		v.AuxInt = int64ToAuxInt(4)
  4607  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4608  		v0.AuxInt = int64ToAuxInt(0)
  4609  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  4610  		v1.AddArg3(destptr, v0, mem)
  4611  		v.AddArg3(destptr, v0, v1)
  4612  		return true
  4613  	}
  4614  	// match: (Zero [7] destptr mem)
  4615  	// result: (I64Store32 [3] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  4616  	for {
  4617  		if auxIntToInt64(v.AuxInt) != 7 {
  4618  			break
  4619  		}
  4620  		destptr := v_0
  4621  		mem := v_1
  4622  		v.reset(OpWasmI64Store32)
  4623  		v.AuxInt = int64ToAuxInt(3)
  4624  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4625  		v0.AuxInt = int64ToAuxInt(0)
  4626  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  4627  		v1.AddArg3(destptr, v0, mem)
  4628  		v.AddArg3(destptr, v0, v1)
  4629  		return true
  4630  	}
  4631  	// match: (Zero [s] destptr mem)
  4632  	// cond: s%8 != 0 && s > 8 && s < 32
  4633  	// result: (Zero [s-s%8] (OffPtr <destptr.Type> destptr [s%8]) (I64Store destptr (I64Const [0]) mem))
  4634  	for {
  4635  		s := auxIntToInt64(v.AuxInt)
  4636  		destptr := v_0
  4637  		mem := v_1
  4638  		if !(s%8 != 0 && s > 8 && s < 32) {
  4639  			break
  4640  		}
  4641  		v.reset(OpZero)
  4642  		v.AuxInt = int64ToAuxInt(s - s%8)
  4643  		v0 := b.NewValue0(v.Pos, OpOffPtr, destptr.Type)
  4644  		v0.AuxInt = int64ToAuxInt(s % 8)
  4645  		v0.AddArg(destptr)
  4646  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  4647  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4648  		v2.AuxInt = int64ToAuxInt(0)
  4649  		v1.AddArg3(destptr, v2, mem)
  4650  		v.AddArg2(v0, v1)
  4651  		return true
  4652  	}
  4653  	// match: (Zero [16] destptr mem)
  4654  	// result: (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem))
  4655  	for {
  4656  		if auxIntToInt64(v.AuxInt) != 16 {
  4657  			break
  4658  		}
  4659  		destptr := v_0
  4660  		mem := v_1
  4661  		v.reset(OpWasmI64Store)
  4662  		v.AuxInt = int64ToAuxInt(8)
  4663  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4664  		v0.AuxInt = int64ToAuxInt(0)
  4665  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  4666  		v1.AddArg3(destptr, v0, mem)
  4667  		v.AddArg3(destptr, v0, v1)
  4668  		return true
  4669  	}
  4670  	// match: (Zero [24] destptr mem)
  4671  	// result: (I64Store [16] destptr (I64Const [0]) (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem)))
  4672  	for {
  4673  		if auxIntToInt64(v.AuxInt) != 24 {
  4674  			break
  4675  		}
  4676  		destptr := v_0
  4677  		mem := v_1
  4678  		v.reset(OpWasmI64Store)
  4679  		v.AuxInt = int64ToAuxInt(16)
  4680  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4681  		v0.AuxInt = int64ToAuxInt(0)
  4682  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  4683  		v1.AuxInt = int64ToAuxInt(8)
  4684  		v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  4685  		v2.AddArg3(destptr, v0, mem)
  4686  		v1.AddArg3(destptr, v0, v2)
  4687  		v.AddArg3(destptr, v0, v1)
  4688  		return true
  4689  	}
  4690  	// match: (Zero [32] destptr mem)
  4691  	// result: (I64Store [24] destptr (I64Const [0]) (I64Store [16] destptr (I64Const [0]) (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem))))
  4692  	for {
  4693  		if auxIntToInt64(v.AuxInt) != 32 {
  4694  			break
  4695  		}
  4696  		destptr := v_0
  4697  		mem := v_1
  4698  		v.reset(OpWasmI64Store)
  4699  		v.AuxInt = int64ToAuxInt(24)
  4700  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4701  		v0.AuxInt = int64ToAuxInt(0)
  4702  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  4703  		v1.AuxInt = int64ToAuxInt(16)
  4704  		v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  4705  		v2.AuxInt = int64ToAuxInt(8)
  4706  		v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  4707  		v3.AddArg3(destptr, v0, mem)
  4708  		v2.AddArg3(destptr, v0, v3)
  4709  		v1.AddArg3(destptr, v0, v2)
  4710  		v.AddArg3(destptr, v0, v1)
  4711  		return true
  4712  	}
  4713  	// match: (Zero [s] destptr mem)
  4714  	// result: (LoweredZero [s] destptr mem)
  4715  	for {
  4716  		s := auxIntToInt64(v.AuxInt)
  4717  		destptr := v_0
  4718  		mem := v_1
  4719  		v.reset(OpWasmLoweredZero)
  4720  		v.AuxInt = int64ToAuxInt(s)
  4721  		v.AddArg2(destptr, mem)
  4722  		return true
  4723  	}
  4724  }
  4725  func rewriteValueWasm_OpZeroExt16to32(v *Value) bool {
  4726  	v_0 := v.Args[0]
  4727  	b := v.Block
  4728  	typ := &b.Func.Config.Types
  4729  	// match: (ZeroExt16to32 x:(I64Load16U _ _))
  4730  	// result: x
  4731  	for {
  4732  		x := v_0
  4733  		if x.Op != OpWasmI64Load16U {
  4734  			break
  4735  		}
  4736  		v.copyOf(x)
  4737  		return true
  4738  	}
  4739  	// match: (ZeroExt16to32 x)
  4740  	// result: (I64And x (I64Const [0xffff]))
  4741  	for {
  4742  		x := v_0
  4743  		v.reset(OpWasmI64And)
  4744  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4745  		v0.AuxInt = int64ToAuxInt(0xffff)
  4746  		v.AddArg2(x, v0)
  4747  		return true
  4748  	}
  4749  }
  4750  func rewriteValueWasm_OpZeroExt16to64(v *Value) bool {
  4751  	v_0 := v.Args[0]
  4752  	b := v.Block
  4753  	typ := &b.Func.Config.Types
  4754  	// match: (ZeroExt16to64 x:(I64Load16U _ _))
  4755  	// result: x
  4756  	for {
  4757  		x := v_0
  4758  		if x.Op != OpWasmI64Load16U {
  4759  			break
  4760  		}
  4761  		v.copyOf(x)
  4762  		return true
  4763  	}
  4764  	// match: (ZeroExt16to64 x)
  4765  	// result: (I64And x (I64Const [0xffff]))
  4766  	for {
  4767  		x := v_0
  4768  		v.reset(OpWasmI64And)
  4769  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4770  		v0.AuxInt = int64ToAuxInt(0xffff)
  4771  		v.AddArg2(x, v0)
  4772  		return true
  4773  	}
  4774  }
  4775  func rewriteValueWasm_OpZeroExt32to64(v *Value) bool {
  4776  	v_0 := v.Args[0]
  4777  	b := v.Block
  4778  	typ := &b.Func.Config.Types
  4779  	// match: (ZeroExt32to64 x:(I64Load32U _ _))
  4780  	// result: x
  4781  	for {
  4782  		x := v_0
  4783  		if x.Op != OpWasmI64Load32U {
  4784  			break
  4785  		}
  4786  		v.copyOf(x)
  4787  		return true
  4788  	}
  4789  	// match: (ZeroExt32to64 x)
  4790  	// result: (I64And x (I64Const [0xffffffff]))
  4791  	for {
  4792  		x := v_0
  4793  		v.reset(OpWasmI64And)
  4794  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4795  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  4796  		v.AddArg2(x, v0)
  4797  		return true
  4798  	}
  4799  }
  4800  func rewriteValueWasm_OpZeroExt8to16(v *Value) bool {
  4801  	v_0 := v.Args[0]
  4802  	b := v.Block
  4803  	typ := &b.Func.Config.Types
  4804  	// match: (ZeroExt8to16 x:(I64Load8U _ _))
  4805  	// result: x
  4806  	for {
  4807  		x := v_0
  4808  		if x.Op != OpWasmI64Load8U {
  4809  			break
  4810  		}
  4811  		v.copyOf(x)
  4812  		return true
  4813  	}
  4814  	// match: (ZeroExt8to16 x)
  4815  	// result: (I64And x (I64Const [0xff]))
  4816  	for {
  4817  		x := v_0
  4818  		v.reset(OpWasmI64And)
  4819  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4820  		v0.AuxInt = int64ToAuxInt(0xff)
  4821  		v.AddArg2(x, v0)
  4822  		return true
  4823  	}
  4824  }
  4825  func rewriteValueWasm_OpZeroExt8to32(v *Value) bool {
  4826  	v_0 := v.Args[0]
  4827  	b := v.Block
  4828  	typ := &b.Func.Config.Types
  4829  	// match: (ZeroExt8to32 x:(I64Load8U _ _))
  4830  	// result: x
  4831  	for {
  4832  		x := v_0
  4833  		if x.Op != OpWasmI64Load8U {
  4834  			break
  4835  		}
  4836  		v.copyOf(x)
  4837  		return true
  4838  	}
  4839  	// match: (ZeroExt8to32 x)
  4840  	// result: (I64And x (I64Const [0xff]))
  4841  	for {
  4842  		x := v_0
  4843  		v.reset(OpWasmI64And)
  4844  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4845  		v0.AuxInt = int64ToAuxInt(0xff)
  4846  		v.AddArg2(x, v0)
  4847  		return true
  4848  	}
  4849  }
  4850  func rewriteValueWasm_OpZeroExt8to64(v *Value) bool {
  4851  	v_0 := v.Args[0]
  4852  	b := v.Block
  4853  	typ := &b.Func.Config.Types
  4854  	// match: (ZeroExt8to64 x:(I64Load8U _ _))
  4855  	// result: x
  4856  	for {
  4857  		x := v_0
  4858  		if x.Op != OpWasmI64Load8U {
  4859  			break
  4860  		}
  4861  		v.copyOf(x)
  4862  		return true
  4863  	}
  4864  	// match: (ZeroExt8to64 x)
  4865  	// result: (I64And x (I64Const [0xff]))
  4866  	for {
  4867  		x := v_0
  4868  		v.reset(OpWasmI64And)
  4869  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4870  		v0.AuxInt = int64ToAuxInt(0xff)
  4871  		v.AddArg2(x, v0)
  4872  		return true
  4873  	}
  4874  }
  4875  func rewriteBlockWasm(b *Block) bool {
  4876  	return false
  4877  }
  4878  

View as plain text