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 OpAbsFloat32x4:
    14  		v.Op = OpWasmF32x4Abs
    15  		return true
    16  	case OpAbsFloat64x2:
    17  		v.Op = OpWasmF64x2Abs
    18  		return true
    19  	case OpAbsInt16x8:
    20  		v.Op = OpWasmI16x8Abs
    21  		return true
    22  	case OpAbsInt32x4:
    23  		v.Op = OpWasmI32x4Abs
    24  		return true
    25  	case OpAbsInt64x2:
    26  		v.Op = OpWasmI64x2Abs
    27  		return true
    28  	case OpAbsInt8x16:
    29  		v.Op = OpWasmI8x16Abs
    30  		return true
    31  	case OpAdd16:
    32  		v.Op = OpWasmI64Add
    33  		return true
    34  	case OpAdd32:
    35  		v.Op = OpWasmI64Add
    36  		return true
    37  	case OpAdd32F:
    38  		v.Op = OpWasmF32Add
    39  		return true
    40  	case OpAdd64:
    41  		v.Op = OpWasmI64Add
    42  		return true
    43  	case OpAdd64F:
    44  		v.Op = OpWasmF64Add
    45  		return true
    46  	case OpAdd8:
    47  		v.Op = OpWasmI64Add
    48  		return true
    49  	case OpAddFloat32x4:
    50  		v.Op = OpWasmF32x4Add
    51  		return true
    52  	case OpAddFloat64x2:
    53  		v.Op = OpWasmF64x2Add
    54  		return true
    55  	case OpAddInt16x8:
    56  		v.Op = OpWasmI16x8Add
    57  		return true
    58  	case OpAddInt32x4:
    59  		v.Op = OpWasmI32x4Add
    60  		return true
    61  	case OpAddInt64x2:
    62  		v.Op = OpWasmI64x2Add
    63  		return true
    64  	case OpAddInt8x16:
    65  		v.Op = OpWasmI8x16Add
    66  		return true
    67  	case OpAddPtr:
    68  		v.Op = OpWasmI64Add
    69  		return true
    70  	case OpAddSaturatedInt16x8:
    71  		v.Op = OpWasmI16x8AddSatS
    72  		return true
    73  	case OpAddSaturatedInt8x16:
    74  		v.Op = OpWasmI8x16AddSatS
    75  		return true
    76  	case OpAddSaturatedUint16x8:
    77  		v.Op = OpWasmI16x8AddSatU
    78  		return true
    79  	case OpAddSaturatedUint8x16:
    80  		v.Op = OpWasmI8x16AddSatU
    81  		return true
    82  	case OpAddr:
    83  		return rewriteValueWasm_OpAddr(v)
    84  	case OpAnd16:
    85  		v.Op = OpWasmI64And
    86  		return true
    87  	case OpAnd32:
    88  		v.Op = OpWasmI64And
    89  		return true
    90  	case OpAnd64:
    91  		v.Op = OpWasmI64And
    92  		return true
    93  	case OpAnd8:
    94  		v.Op = OpWasmI64And
    95  		return true
    96  	case OpAndB:
    97  		v.Op = OpWasmI64And
    98  		return true
    99  	case OpAndInt16x8:
   100  		v.Op = OpWasmV128And
   101  		return true
   102  	case OpAndInt32x4:
   103  		v.Op = OpWasmV128And
   104  		return true
   105  	case OpAndInt64x2:
   106  		v.Op = OpWasmV128And
   107  		return true
   108  	case OpAndInt8x16:
   109  		v.Op = OpWasmV128And
   110  		return true
   111  	case OpAndNotInt16x8:
   112  		v.Op = OpWasmV128Andnot
   113  		return true
   114  	case OpAndNotInt32x4:
   115  		v.Op = OpWasmV128Andnot
   116  		return true
   117  	case OpAndNotInt64x2:
   118  		v.Op = OpWasmV128Andnot
   119  		return true
   120  	case OpAndNotInt8x16:
   121  		v.Op = OpWasmV128Andnot
   122  		return true
   123  	case OpAndNotUint16x8:
   124  		v.Op = OpWasmV128Andnot
   125  		return true
   126  	case OpAndNotUint32x4:
   127  		v.Op = OpWasmV128Andnot
   128  		return true
   129  	case OpAndNotUint64x2:
   130  		v.Op = OpWasmV128Andnot
   131  		return true
   132  	case OpAndNotUint8x16:
   133  		v.Op = OpWasmV128Andnot
   134  		return true
   135  	case OpAndUint16x8:
   136  		v.Op = OpWasmV128And
   137  		return true
   138  	case OpAndUint32x4:
   139  		v.Op = OpWasmV128And
   140  		return true
   141  	case OpAndUint64x2:
   142  		v.Op = OpWasmV128And
   143  		return true
   144  	case OpAndUint8x16:
   145  		v.Op = OpWasmV128And
   146  		return true
   147  	case OpAverageUint16x8:
   148  		v.Op = OpWasmI16x8AvgrU
   149  		return true
   150  	case OpAverageUint8x16:
   151  		v.Op = OpWasmI8x16AvgrU
   152  		return true
   153  	case OpAvg64u:
   154  		return rewriteValueWasm_OpAvg64u(v)
   155  	case OpBitLen16:
   156  		return rewriteValueWasm_OpBitLen16(v)
   157  	case OpBitLen32:
   158  		return rewriteValueWasm_OpBitLen32(v)
   159  	case OpBitLen64:
   160  		return rewriteValueWasm_OpBitLen64(v)
   161  	case OpBitLen8:
   162  		return rewriteValueWasm_OpBitLen8(v)
   163  	case OpBitSelectInt16x8:
   164  		v.Op = OpWasmV128Bitselect
   165  		return true
   166  	case OpBitSelectInt32x4:
   167  		v.Op = OpWasmV128Bitselect
   168  		return true
   169  	case OpBitSelectInt64x2:
   170  		v.Op = OpWasmV128Bitselect
   171  		return true
   172  	case OpBitSelectInt8x16:
   173  		v.Op = OpWasmV128Bitselect
   174  		return true
   175  	case OpBitSelectUint16x8:
   176  		v.Op = OpWasmV128Bitselect
   177  		return true
   178  	case OpBitSelectUint32x4:
   179  		v.Op = OpWasmV128Bitselect
   180  		return true
   181  	case OpBitSelectUint64x2:
   182  		v.Op = OpWasmV128Bitselect
   183  		return true
   184  	case OpBitSelectUint8x16:
   185  		v.Op = OpWasmV128Bitselect
   186  		return true
   187  	case OpBroadcastFloat32x4:
   188  		v.Op = OpWasmF32x4Splat
   189  		return true
   190  	case OpBroadcastFloat64x2:
   191  		v.Op = OpWasmF64x2Splat
   192  		return true
   193  	case OpBroadcastInt16x8:
   194  		v.Op = OpWasmI16x8Splat
   195  		return true
   196  	case OpBroadcastInt32x4:
   197  		v.Op = OpWasmI32x4Splat
   198  		return true
   199  	case OpBroadcastInt64x2:
   200  		v.Op = OpWasmI64x2Splat
   201  		return true
   202  	case OpBroadcastInt8x16:
   203  		v.Op = OpWasmI8x16Splat
   204  		return true
   205  	case OpCeil:
   206  		v.Op = OpWasmF64Ceil
   207  		return true
   208  	case OpCeilFloat32x4:
   209  		v.Op = OpWasmF32x4Ceil
   210  		return true
   211  	case OpCeilFloat64x2:
   212  		v.Op = OpWasmF64x2Ceil
   213  		return true
   214  	case OpClosureCall:
   215  		v.Op = OpWasmLoweredClosureCall
   216  		return true
   217  	case OpCom16:
   218  		return rewriteValueWasm_OpCom16(v)
   219  	case OpCom32:
   220  		return rewriteValueWasm_OpCom32(v)
   221  	case OpCom64:
   222  		return rewriteValueWasm_OpCom64(v)
   223  	case OpCom8:
   224  		return rewriteValueWasm_OpCom8(v)
   225  	case OpCondSelect:
   226  		v.Op = OpWasmSelect
   227  		return true
   228  	case OpConst16:
   229  		return rewriteValueWasm_OpConst16(v)
   230  	case OpConst32:
   231  		return rewriteValueWasm_OpConst32(v)
   232  	case OpConst32F:
   233  		v.Op = OpWasmF32Const
   234  		return true
   235  	case OpConst64:
   236  		v.Op = OpWasmI64Const
   237  		return true
   238  	case OpConst64F:
   239  		v.Op = OpWasmF64Const
   240  		return true
   241  	case OpConst8:
   242  		return rewriteValueWasm_OpConst8(v)
   243  	case OpConstBool:
   244  		return rewriteValueWasm_OpConstBool(v)
   245  	case OpConstNil:
   246  		return rewriteValueWasm_OpConstNil(v)
   247  	case OpConvert:
   248  		v.Op = OpWasmLoweredConvert
   249  		return true
   250  	case OpConvertLo2ToFloat64Int32x4:
   251  		v.Op = OpWasmF64x2ConvertLowI32x4S
   252  		return true
   253  	case OpConvertLo2ToFloat64Uint32x4:
   254  		v.Op = OpWasmF64x2ConvertLowI32x4U
   255  		return true
   256  	case OpConvertToFloat32Int32x4:
   257  		v.Op = OpWasmF32x4ConvertI32x4S
   258  		return true
   259  	case OpConvertToFloat32Uint32x4:
   260  		v.Op = OpWasmF32x4ConvertI32x4U
   261  		return true
   262  	case OpConvertToInt32Float32x4:
   263  		v.Op = OpWasmI32x4TruncSatF32x4S
   264  		return true
   265  	case OpConvertToUint32Float32x4:
   266  		v.Op = OpWasmI32x4TruncSatF32x4U
   267  		return true
   268  	case OpCopysign:
   269  		v.Op = OpWasmF64Copysign
   270  		return true
   271  	case OpCtz16:
   272  		return rewriteValueWasm_OpCtz16(v)
   273  	case OpCtz16NonZero:
   274  		v.Op = OpWasmI64Ctz
   275  		return true
   276  	case OpCtz32:
   277  		return rewriteValueWasm_OpCtz32(v)
   278  	case OpCtz32NonZero:
   279  		v.Op = OpWasmI64Ctz
   280  		return true
   281  	case OpCtz64:
   282  		v.Op = OpWasmI64Ctz
   283  		return true
   284  	case OpCtz64NonZero:
   285  		v.Op = OpWasmI64Ctz
   286  		return true
   287  	case OpCtz8:
   288  		return rewriteValueWasm_OpCtz8(v)
   289  	case OpCtz8NonZero:
   290  		v.Op = OpWasmI64Ctz
   291  		return true
   292  	case OpCvt32Fto32:
   293  		v.Op = OpWasmI64TruncSatF32S
   294  		return true
   295  	case OpCvt32Fto32U:
   296  		v.Op = OpWasmI64TruncSatF32U
   297  		return true
   298  	case OpCvt32Fto64:
   299  		v.Op = OpWasmI64TruncSatF32S
   300  		return true
   301  	case OpCvt32Fto64F:
   302  		v.Op = OpWasmF64PromoteF32
   303  		return true
   304  	case OpCvt32Fto64U:
   305  		v.Op = OpWasmI64TruncSatF32U
   306  		return true
   307  	case OpCvt32Uto32F:
   308  		return rewriteValueWasm_OpCvt32Uto32F(v)
   309  	case OpCvt32Uto64F:
   310  		return rewriteValueWasm_OpCvt32Uto64F(v)
   311  	case OpCvt32to32F:
   312  		return rewriteValueWasm_OpCvt32to32F(v)
   313  	case OpCvt32to64F:
   314  		return rewriteValueWasm_OpCvt32to64F(v)
   315  	case OpCvt64Fto32:
   316  		v.Op = OpWasmI64TruncSatF64S
   317  		return true
   318  	case OpCvt64Fto32F:
   319  		v.Op = OpWasmF32DemoteF64
   320  		return true
   321  	case OpCvt64Fto32U:
   322  		v.Op = OpWasmI64TruncSatF64U
   323  		return true
   324  	case OpCvt64Fto64:
   325  		v.Op = OpWasmI64TruncSatF64S
   326  		return true
   327  	case OpCvt64Fto64U:
   328  		v.Op = OpWasmI64TruncSatF64U
   329  		return true
   330  	case OpCvt64Uto32F:
   331  		v.Op = OpWasmF32ConvertI64U
   332  		return true
   333  	case OpCvt64Uto64F:
   334  		v.Op = OpWasmF64ConvertI64U
   335  		return true
   336  	case OpCvt64to32F:
   337  		v.Op = OpWasmF32ConvertI64S
   338  		return true
   339  	case OpCvt64to64F:
   340  		v.Op = OpWasmF64ConvertI64S
   341  		return true
   342  	case OpCvtBoolToUint8:
   343  		v.Op = OpCopy
   344  		return true
   345  	case OpDiv16:
   346  		return rewriteValueWasm_OpDiv16(v)
   347  	case OpDiv16u:
   348  		return rewriteValueWasm_OpDiv16u(v)
   349  	case OpDiv32:
   350  		return rewriteValueWasm_OpDiv32(v)
   351  	case OpDiv32F:
   352  		v.Op = OpWasmF32Div
   353  		return true
   354  	case OpDiv32u:
   355  		return rewriteValueWasm_OpDiv32u(v)
   356  	case OpDiv64:
   357  		return rewriteValueWasm_OpDiv64(v)
   358  	case OpDiv64F:
   359  		v.Op = OpWasmF64Div
   360  		return true
   361  	case OpDiv64u:
   362  		v.Op = OpWasmI64DivU
   363  		return true
   364  	case OpDiv8:
   365  		return rewriteValueWasm_OpDiv8(v)
   366  	case OpDiv8u:
   367  		return rewriteValueWasm_OpDiv8u(v)
   368  	case OpDivFloat32x4:
   369  		v.Op = OpWasmF32x4Div
   370  		return true
   371  	case OpDivFloat64x2:
   372  		v.Op = OpWasmF64x2Div
   373  		return true
   374  	case OpEq16:
   375  		return rewriteValueWasm_OpEq16(v)
   376  	case OpEq32:
   377  		return rewriteValueWasm_OpEq32(v)
   378  	case OpEq32F:
   379  		v.Op = OpWasmF32Eq
   380  		return true
   381  	case OpEq64:
   382  		v.Op = OpWasmI64Eq
   383  		return true
   384  	case OpEq64F:
   385  		v.Op = OpWasmF64Eq
   386  		return true
   387  	case OpEq8:
   388  		return rewriteValueWasm_OpEq8(v)
   389  	case OpEqB:
   390  		v.Op = OpWasmI64Eq
   391  		return true
   392  	case OpEqPtr:
   393  		v.Op = OpWasmI64Eq
   394  		return true
   395  	case OpEqualFloat32x4:
   396  		v.Op = OpWasmF32x4Eq
   397  		return true
   398  	case OpEqualFloat64x2:
   399  		v.Op = OpWasmF64x2Eq
   400  		return true
   401  	case OpEqualInt16x8:
   402  		v.Op = OpWasmI16x8Eq
   403  		return true
   404  	case OpEqualInt32x4:
   405  		v.Op = OpWasmI32x4Eq
   406  		return true
   407  	case OpEqualInt64x2:
   408  		v.Op = OpWasmI64x2Eq
   409  		return true
   410  	case OpEqualInt8x16:
   411  		v.Op = OpWasmI8x16Eq
   412  		return true
   413  	case OpEqualUint16x8:
   414  		v.Op = OpWasmI16x8Eq
   415  		return true
   416  	case OpEqualUint32x4:
   417  		v.Op = OpWasmI32x4Eq
   418  		return true
   419  	case OpEqualUint64x2:
   420  		v.Op = OpWasmI64x2Eq
   421  		return true
   422  	case OpEqualUint8x16:
   423  		v.Op = OpWasmI8x16Eq
   424  		return true
   425  	case OpExtendHi2ToInt64Int32x4:
   426  		v.Op = OpWasmI64x2ExtendHighI32x4S
   427  		return true
   428  	case OpExtendHi2ToUint64Uint32x4:
   429  		v.Op = OpWasmI64x2ExtendHighI32x4U
   430  		return true
   431  	case OpExtendHi4ToInt32Int16x8:
   432  		v.Op = OpWasmI32x4ExtendHighI16x8S
   433  		return true
   434  	case OpExtendHi4ToUint32Uint16x8:
   435  		v.Op = OpWasmI32x4ExtendHighI16x8U
   436  		return true
   437  	case OpExtendHi8ToInt16Int8x16:
   438  		v.Op = OpWasmI16x8ExtendHighI8x16S
   439  		return true
   440  	case OpExtendHi8ToUint16Uint8x16:
   441  		v.Op = OpWasmI16x8ExtendHighI8x16U
   442  		return true
   443  	case OpExtendLo2ToInt64Int32x4:
   444  		v.Op = OpWasmI64x2ExtendLowI32x4S
   445  		return true
   446  	case OpExtendLo2ToUint64Uint32x4:
   447  		v.Op = OpWasmI64x2ExtendLowI32x4U
   448  		return true
   449  	case OpExtendLo4ToInt32Int16x8:
   450  		v.Op = OpWasmI32x4ExtendLowI16x8S
   451  		return true
   452  	case OpExtendLo4ToUint32Uint16x8:
   453  		v.Op = OpWasmI32x4ExtendLowI16x8U
   454  		return true
   455  	case OpExtendLo8ToInt16Int8x16:
   456  		v.Op = OpWasmI16x8ExtendLowI8x16S
   457  		return true
   458  	case OpExtendLo8ToUint16Uint8x16:
   459  		v.Op = OpWasmI16x8ExtendLowI8x16U
   460  		return true
   461  	case OpFloor:
   462  		v.Op = OpWasmF64Floor
   463  		return true
   464  	case OpFloorFloat32x4:
   465  		v.Op = OpWasmF32x4Floor
   466  		return true
   467  	case OpFloorFloat64x2:
   468  		v.Op = OpWasmF64x2Floor
   469  		return true
   470  	case OpGetCallerPC:
   471  		v.Op = OpWasmLoweredGetCallerPC
   472  		return true
   473  	case OpGetCallerSP:
   474  		v.Op = OpWasmLoweredGetCallerSP
   475  		return true
   476  	case OpGetClosurePtr:
   477  		v.Op = OpWasmLoweredGetClosurePtr
   478  		return true
   479  	case OpGetElemFloat32x4:
   480  		v.Op = OpWasmF32x4ExtractLane
   481  		return true
   482  	case OpGetElemFloat64x2:
   483  		v.Op = OpWasmF64x2ExtractLane
   484  		return true
   485  	case OpGetElemInt16x8:
   486  		v.Op = OpWasmI16x8ExtractLaneS
   487  		return true
   488  	case OpGetElemInt32x4:
   489  		v.Op = OpWasmI32x4ExtractLane
   490  		return true
   491  	case OpGetElemInt64x2:
   492  		v.Op = OpWasmI64x2ExtractLane
   493  		return true
   494  	case OpGetElemInt8x16:
   495  		v.Op = OpWasmI8x16ExtractLaneS
   496  		return true
   497  	case OpGetElemUint16x8:
   498  		v.Op = OpWasmI16x8ExtractLaneU
   499  		return true
   500  	case OpGetElemUint32x4:
   501  		v.Op = OpWasmI32x4ExtractLane
   502  		return true
   503  	case OpGetElemUint64x2:
   504  		v.Op = OpWasmI64x2ExtractLane
   505  		return true
   506  	case OpGetElemUint8x16:
   507  		v.Op = OpWasmI8x16ExtractLaneU
   508  		return true
   509  	case OpGreaterEqualFloat32x4:
   510  		v.Op = OpWasmF32x4Ge
   511  		return true
   512  	case OpGreaterEqualFloat64x2:
   513  		v.Op = OpWasmF64x2Ge
   514  		return true
   515  	case OpGreaterEqualInt16x8:
   516  		v.Op = OpWasmI16x8GeS
   517  		return true
   518  	case OpGreaterEqualInt32x4:
   519  		v.Op = OpWasmI32x4GeS
   520  		return true
   521  	case OpGreaterEqualInt64x2:
   522  		v.Op = OpWasmI64x2GeS
   523  		return true
   524  	case OpGreaterEqualInt8x16:
   525  		v.Op = OpWasmI8x16GeS
   526  		return true
   527  	case OpGreaterEqualUint16x8:
   528  		v.Op = OpWasmI16x8GeU
   529  		return true
   530  	case OpGreaterEqualUint32x4:
   531  		v.Op = OpWasmI32x4GeU
   532  		return true
   533  	case OpGreaterEqualUint8x16:
   534  		v.Op = OpWasmI8x16GeU
   535  		return true
   536  	case OpGreaterFloat32x4:
   537  		v.Op = OpWasmF32x4Gt
   538  		return true
   539  	case OpGreaterFloat64x2:
   540  		v.Op = OpWasmF64x2Gt
   541  		return true
   542  	case OpGreaterInt16x8:
   543  		v.Op = OpWasmI16x8GtS
   544  		return true
   545  	case OpGreaterInt32x4:
   546  		v.Op = OpWasmI32x4GtS
   547  		return true
   548  	case OpGreaterInt64x2:
   549  		v.Op = OpWasmI64x2GtS
   550  		return true
   551  	case OpGreaterInt8x16:
   552  		v.Op = OpWasmI8x16GtS
   553  		return true
   554  	case OpGreaterUint16x8:
   555  		v.Op = OpWasmI16x8GtU
   556  		return true
   557  	case OpGreaterUint32x4:
   558  		v.Op = OpWasmI32x4GtU
   559  		return true
   560  	case OpGreaterUint8x16:
   561  		v.Op = OpWasmI8x16GtU
   562  		return true
   563  	case OpHmul64:
   564  		return rewriteValueWasm_OpHmul64(v)
   565  	case OpHmul64u:
   566  		return rewriteValueWasm_OpHmul64u(v)
   567  	case OpInterCall:
   568  		v.Op = OpWasmLoweredInterCall
   569  		return true
   570  	case OpIsInBounds:
   571  		v.Op = OpWasmI64LtU
   572  		return true
   573  	case OpIsNonNil:
   574  		return rewriteValueWasm_OpIsNonNil(v)
   575  	case OpIsSliceInBounds:
   576  		v.Op = OpWasmI64LeU
   577  		return true
   578  	case OpLast:
   579  		return rewriteValueWasm_OpLast(v)
   580  	case OpLeq16:
   581  		return rewriteValueWasm_OpLeq16(v)
   582  	case OpLeq16U:
   583  		return rewriteValueWasm_OpLeq16U(v)
   584  	case OpLeq32:
   585  		return rewriteValueWasm_OpLeq32(v)
   586  	case OpLeq32F:
   587  		v.Op = OpWasmF32Le
   588  		return true
   589  	case OpLeq32U:
   590  		return rewriteValueWasm_OpLeq32U(v)
   591  	case OpLeq64:
   592  		v.Op = OpWasmI64LeS
   593  		return true
   594  	case OpLeq64F:
   595  		v.Op = OpWasmF64Le
   596  		return true
   597  	case OpLeq64U:
   598  		v.Op = OpWasmI64LeU
   599  		return true
   600  	case OpLeq8:
   601  		return rewriteValueWasm_OpLeq8(v)
   602  	case OpLeq8U:
   603  		return rewriteValueWasm_OpLeq8U(v)
   604  	case OpLess16:
   605  		return rewriteValueWasm_OpLess16(v)
   606  	case OpLess16U:
   607  		return rewriteValueWasm_OpLess16U(v)
   608  	case OpLess32:
   609  		return rewriteValueWasm_OpLess32(v)
   610  	case OpLess32F:
   611  		v.Op = OpWasmF32Lt
   612  		return true
   613  	case OpLess32U:
   614  		return rewriteValueWasm_OpLess32U(v)
   615  	case OpLess64:
   616  		v.Op = OpWasmI64LtS
   617  		return true
   618  	case OpLess64F:
   619  		v.Op = OpWasmF64Lt
   620  		return true
   621  	case OpLess64U:
   622  		v.Op = OpWasmI64LtU
   623  		return true
   624  	case OpLess8:
   625  		return rewriteValueWasm_OpLess8(v)
   626  	case OpLess8U:
   627  		return rewriteValueWasm_OpLess8U(v)
   628  	case OpLessEqualFloat32x4:
   629  		v.Op = OpWasmF32x4Le
   630  		return true
   631  	case OpLessEqualFloat64x2:
   632  		v.Op = OpWasmF64x2Le
   633  		return true
   634  	case OpLessEqualInt16x8:
   635  		v.Op = OpWasmI16x8LeS
   636  		return true
   637  	case OpLessEqualInt32x4:
   638  		v.Op = OpWasmI32x4LeS
   639  		return true
   640  	case OpLessEqualInt64x2:
   641  		v.Op = OpWasmI64x2LeS
   642  		return true
   643  	case OpLessEqualInt8x16:
   644  		v.Op = OpWasmI8x16LeS
   645  		return true
   646  	case OpLessEqualUint16x8:
   647  		v.Op = OpWasmI16x8LeU
   648  		return true
   649  	case OpLessEqualUint32x4:
   650  		v.Op = OpWasmI32x4LeU
   651  		return true
   652  	case OpLessEqualUint8x16:
   653  		v.Op = OpWasmI8x16LeU
   654  		return true
   655  	case OpLessFloat32x4:
   656  		v.Op = OpWasmF32x4Lt
   657  		return true
   658  	case OpLessFloat64x2:
   659  		v.Op = OpWasmF64x2Lt
   660  		return true
   661  	case OpLessInt16x8:
   662  		v.Op = OpWasmI16x8LtS
   663  		return true
   664  	case OpLessInt32x4:
   665  		v.Op = OpWasmI32x4LtS
   666  		return true
   667  	case OpLessInt64x2:
   668  		v.Op = OpWasmI64x2LtS
   669  		return true
   670  	case OpLessInt8x16:
   671  		v.Op = OpWasmI8x16LtS
   672  		return true
   673  	case OpLessUint16x8:
   674  		v.Op = OpWasmI16x8LtU
   675  		return true
   676  	case OpLessUint32x4:
   677  		v.Op = OpWasmI32x4LtU
   678  		return true
   679  	case OpLessUint8x16:
   680  		v.Op = OpWasmI8x16LtU
   681  		return true
   682  	case OpLoad:
   683  		return rewriteValueWasm_OpLoad(v)
   684  	case OpLocalAddr:
   685  		return rewriteValueWasm_OpLocalAddr(v)
   686  	case OpLookupOrZeroInt8x16:
   687  		v.Op = OpWasmI8x16Swizzle
   688  		return true
   689  	case OpLsh16x16:
   690  		return rewriteValueWasm_OpLsh16x16(v)
   691  	case OpLsh16x32:
   692  		return rewriteValueWasm_OpLsh16x32(v)
   693  	case OpLsh16x64:
   694  		v.Op = OpLsh64x64
   695  		return true
   696  	case OpLsh16x8:
   697  		return rewriteValueWasm_OpLsh16x8(v)
   698  	case OpLsh32x16:
   699  		return rewriteValueWasm_OpLsh32x16(v)
   700  	case OpLsh32x32:
   701  		return rewriteValueWasm_OpLsh32x32(v)
   702  	case OpLsh32x64:
   703  		v.Op = OpLsh64x64
   704  		return true
   705  	case OpLsh32x8:
   706  		return rewriteValueWasm_OpLsh32x8(v)
   707  	case OpLsh64x16:
   708  		return rewriteValueWasm_OpLsh64x16(v)
   709  	case OpLsh64x32:
   710  		return rewriteValueWasm_OpLsh64x32(v)
   711  	case OpLsh64x64:
   712  		return rewriteValueWasm_OpLsh64x64(v)
   713  	case OpLsh64x8:
   714  		return rewriteValueWasm_OpLsh64x8(v)
   715  	case OpLsh8x16:
   716  		return rewriteValueWasm_OpLsh8x16(v)
   717  	case OpLsh8x32:
   718  		return rewriteValueWasm_OpLsh8x32(v)
   719  	case OpLsh8x64:
   720  		v.Op = OpLsh64x64
   721  		return true
   722  	case OpLsh8x8:
   723  		return rewriteValueWasm_OpLsh8x8(v)
   724  	case OpMaxFloat32x4:
   725  		v.Op = OpWasmF32x4Max
   726  		return true
   727  	case OpMaxFloat64x2:
   728  		v.Op = OpWasmF64x2Max
   729  		return true
   730  	case OpMaxInt16x8:
   731  		v.Op = OpWasmI16x8MaxS
   732  		return true
   733  	case OpMaxInt32x4:
   734  		v.Op = OpWasmI32x4MaxS
   735  		return true
   736  	case OpMaxInt8x16:
   737  		v.Op = OpWasmI8x16MaxS
   738  		return true
   739  	case OpMaxUint16x8:
   740  		v.Op = OpWasmI16x8MaxU
   741  		return true
   742  	case OpMaxUint32x4:
   743  		v.Op = OpWasmI32x4MaxU
   744  		return true
   745  	case OpMaxUint8x16:
   746  		v.Op = OpWasmI8x16MaxU
   747  		return true
   748  	case OpMinFloat32x4:
   749  		v.Op = OpWasmF32x4Min
   750  		return true
   751  	case OpMinFloat64x2:
   752  		v.Op = OpWasmF64x2Min
   753  		return true
   754  	case OpMinInt16x8:
   755  		v.Op = OpWasmI16x8MinS
   756  		return true
   757  	case OpMinInt32x4:
   758  		v.Op = OpWasmI32x4MinS
   759  		return true
   760  	case OpMinInt8x16:
   761  		v.Op = OpWasmI8x16MinS
   762  		return true
   763  	case OpMinUint16x8:
   764  		v.Op = OpWasmI16x8MinU
   765  		return true
   766  	case OpMinUint32x4:
   767  		v.Op = OpWasmI32x4MinU
   768  		return true
   769  	case OpMinUint8x16:
   770  		v.Op = OpWasmI8x16MinU
   771  		return true
   772  	case OpMod16:
   773  		return rewriteValueWasm_OpMod16(v)
   774  	case OpMod16u:
   775  		return rewriteValueWasm_OpMod16u(v)
   776  	case OpMod32:
   777  		return rewriteValueWasm_OpMod32(v)
   778  	case OpMod32u:
   779  		return rewriteValueWasm_OpMod32u(v)
   780  	case OpMod64:
   781  		return rewriteValueWasm_OpMod64(v)
   782  	case OpMod64u:
   783  		v.Op = OpWasmI64RemU
   784  		return true
   785  	case OpMod8:
   786  		return rewriteValueWasm_OpMod8(v)
   787  	case OpMod8u:
   788  		return rewriteValueWasm_OpMod8u(v)
   789  	case OpMove:
   790  		return rewriteValueWasm_OpMove(v)
   791  	case OpMul16:
   792  		v.Op = OpWasmI64Mul
   793  		return true
   794  	case OpMul32:
   795  		v.Op = OpWasmI64Mul
   796  		return true
   797  	case OpMul32F:
   798  		v.Op = OpWasmF32Mul
   799  		return true
   800  	case OpMul64:
   801  		v.Op = OpWasmI64Mul
   802  		return true
   803  	case OpMul64F:
   804  		v.Op = OpWasmF64Mul
   805  		return true
   806  	case OpMul8:
   807  		v.Op = OpWasmI64Mul
   808  		return true
   809  	case OpMulFloat32x4:
   810  		v.Op = OpWasmF32x4Mul
   811  		return true
   812  	case OpMulFloat64x2:
   813  		v.Op = OpWasmF64x2Mul
   814  		return true
   815  	case OpMulInt16x8:
   816  		v.Op = OpWasmI16x8Mul
   817  		return true
   818  	case OpMulInt32x4:
   819  		v.Op = OpWasmI32x4Mul
   820  		return true
   821  	case OpMulInt64x2:
   822  		v.Op = OpWasmI64x2Mul
   823  		return true
   824  	case OpMulUint16x8:
   825  		v.Op = OpWasmI16x8Mul
   826  		return true
   827  	case OpMulUint32x4:
   828  		v.Op = OpWasmI32x4Mul
   829  		return true
   830  	case OpMulUint64x2:
   831  		v.Op = OpWasmI64x2Mul
   832  		return true
   833  	case OpMulWidenHiInt16x8:
   834  		v.Op = OpWasmI32x4ExtmulHighI16x8S
   835  		return true
   836  	case OpMulWidenHiInt32x4:
   837  		v.Op = OpWasmI64x2ExtmulHighI32x4S
   838  		return true
   839  	case OpMulWidenHiInt8x16:
   840  		v.Op = OpWasmI16x8ExtmulHighI8x16S
   841  		return true
   842  	case OpMulWidenHiUint16x8:
   843  		v.Op = OpWasmI32x4ExtmulHighI16x8U
   844  		return true
   845  	case OpMulWidenHiUint32x4:
   846  		v.Op = OpWasmI64x2ExtmulHighI32x4U
   847  		return true
   848  	case OpMulWidenHiUint8x16:
   849  		v.Op = OpWasmI16x8ExtmulHighI8x16U
   850  		return true
   851  	case OpMulWidenLoInt16x8:
   852  		v.Op = OpWasmI32x4ExtmulLowI16x8S
   853  		return true
   854  	case OpMulWidenLoInt32x4:
   855  		v.Op = OpWasmI64x2ExtmulLowI32x4S
   856  		return true
   857  	case OpMulWidenLoInt8x16:
   858  		v.Op = OpWasmI16x8ExtmulLowI8x16S
   859  		return true
   860  	case OpMulWidenLoUint16x8:
   861  		v.Op = OpWasmI32x4ExtmulLowI16x8U
   862  		return true
   863  	case OpMulWidenLoUint32x4:
   864  		v.Op = OpWasmI64x2ExtmulLowI32x4U
   865  		return true
   866  	case OpMulWidenLoUint8x16:
   867  		v.Op = OpWasmI16x8ExtmulLowI8x16U
   868  		return true
   869  	case OpNeg16:
   870  		return rewriteValueWasm_OpNeg16(v)
   871  	case OpNeg32:
   872  		return rewriteValueWasm_OpNeg32(v)
   873  	case OpNeg32F:
   874  		v.Op = OpWasmF32Neg
   875  		return true
   876  	case OpNeg64:
   877  		return rewriteValueWasm_OpNeg64(v)
   878  	case OpNeg64F:
   879  		v.Op = OpWasmF64Neg
   880  		return true
   881  	case OpNeg8:
   882  		return rewriteValueWasm_OpNeg8(v)
   883  	case OpNegFloat32x4:
   884  		v.Op = OpWasmF32x4Neg
   885  		return true
   886  	case OpNegFloat64x2:
   887  		v.Op = OpWasmF64x2Neg
   888  		return true
   889  	case OpNegInt16x8:
   890  		v.Op = OpWasmI16x8Neg
   891  		return true
   892  	case OpNegInt32x4:
   893  		v.Op = OpWasmI32x4Neg
   894  		return true
   895  	case OpNegInt64x2:
   896  		v.Op = OpWasmI64x2Neg
   897  		return true
   898  	case OpNegInt8x16:
   899  		v.Op = OpWasmI8x16Neg
   900  		return true
   901  	case OpNeq16:
   902  		return rewriteValueWasm_OpNeq16(v)
   903  	case OpNeq32:
   904  		return rewriteValueWasm_OpNeq32(v)
   905  	case OpNeq32F:
   906  		v.Op = OpWasmF32Ne
   907  		return true
   908  	case OpNeq64:
   909  		v.Op = OpWasmI64Ne
   910  		return true
   911  	case OpNeq64F:
   912  		v.Op = OpWasmF64Ne
   913  		return true
   914  	case OpNeq8:
   915  		return rewriteValueWasm_OpNeq8(v)
   916  	case OpNeqB:
   917  		v.Op = OpWasmI64Ne
   918  		return true
   919  	case OpNeqPtr:
   920  		v.Op = OpWasmI64Ne
   921  		return true
   922  	case OpNilCheck:
   923  		v.Op = OpWasmLoweredNilCheck
   924  		return true
   925  	case OpNot:
   926  		v.Op = OpWasmI64Eqz
   927  		return true
   928  	case OpNotEqualFloat32x4:
   929  		v.Op = OpWasmF32x4Ne
   930  		return true
   931  	case OpNotEqualFloat64x2:
   932  		v.Op = OpWasmF64x2Ne
   933  		return true
   934  	case OpNotEqualInt16x8:
   935  		v.Op = OpWasmI16x8Ne
   936  		return true
   937  	case OpNotEqualInt32x4:
   938  		v.Op = OpWasmI32x4Ne
   939  		return true
   940  	case OpNotEqualInt64x2:
   941  		v.Op = OpWasmI64x2Ne
   942  		return true
   943  	case OpNotEqualInt8x16:
   944  		v.Op = OpWasmI8x16Ne
   945  		return true
   946  	case OpNotEqualUint16x8:
   947  		v.Op = OpWasmI16x8Ne
   948  		return true
   949  	case OpNotEqualUint32x4:
   950  		v.Op = OpWasmI32x4Ne
   951  		return true
   952  	case OpNotEqualUint64x2:
   953  		v.Op = OpWasmI64x2Ne
   954  		return true
   955  	case OpNotEqualUint8x16:
   956  		v.Op = OpWasmI8x16Ne
   957  		return true
   958  	case OpNotInt16x8:
   959  		v.Op = OpWasmV128Not
   960  		return true
   961  	case OpNotInt32x4:
   962  		v.Op = OpWasmV128Not
   963  		return true
   964  	case OpNotInt64x2:
   965  		v.Op = OpWasmV128Not
   966  		return true
   967  	case OpNotInt8x16:
   968  		v.Op = OpWasmV128Not
   969  		return true
   970  	case OpNotUint16x8:
   971  		v.Op = OpWasmV128Not
   972  		return true
   973  	case OpNotUint32x4:
   974  		v.Op = OpWasmV128Not
   975  		return true
   976  	case OpNotUint64x2:
   977  		v.Op = OpWasmV128Not
   978  		return true
   979  	case OpNotUint8x16:
   980  		v.Op = OpWasmV128Not
   981  		return true
   982  	case OpOffPtr:
   983  		v.Op = OpWasmI64AddConst
   984  		return true
   985  	case OpOnesCountInt8x16:
   986  		v.Op = OpWasmI8x16Popcnt
   987  		return true
   988  	case OpOr16:
   989  		v.Op = OpWasmI64Or
   990  		return true
   991  	case OpOr32:
   992  		v.Op = OpWasmI64Or
   993  		return true
   994  	case OpOr64:
   995  		v.Op = OpWasmI64Or
   996  		return true
   997  	case OpOr8:
   998  		v.Op = OpWasmI64Or
   999  		return true
  1000  	case OpOrB:
  1001  		v.Op = OpWasmI64Or
  1002  		return true
  1003  	case OpOrInt16x8:
  1004  		v.Op = OpWasmV128Or
  1005  		return true
  1006  	case OpOrInt32x4:
  1007  		v.Op = OpWasmV128Or
  1008  		return true
  1009  	case OpOrInt64x2:
  1010  		v.Op = OpWasmV128Or
  1011  		return true
  1012  	case OpOrInt8x16:
  1013  		v.Op = OpWasmV128Or
  1014  		return true
  1015  	case OpOrUint16x8:
  1016  		v.Op = OpWasmV128Or
  1017  		return true
  1018  	case OpOrUint32x4:
  1019  		v.Op = OpWasmV128Or
  1020  		return true
  1021  	case OpOrUint64x2:
  1022  		v.Op = OpWasmV128Or
  1023  		return true
  1024  	case OpOrUint8x16:
  1025  		v.Op = OpWasmV128Or
  1026  		return true
  1027  	case OpPopCount16:
  1028  		return rewriteValueWasm_OpPopCount16(v)
  1029  	case OpPopCount32:
  1030  		return rewriteValueWasm_OpPopCount32(v)
  1031  	case OpPopCount64:
  1032  		v.Op = OpWasmI64Popcnt
  1033  		return true
  1034  	case OpPopCount8:
  1035  		return rewriteValueWasm_OpPopCount8(v)
  1036  	case OpRotateAllLeftVarInt16x8:
  1037  		return rewriteValueWasm_OpRotateAllLeftVarInt16x8(v)
  1038  	case OpRotateAllLeftVarInt32x4:
  1039  		return rewriteValueWasm_OpRotateAllLeftVarInt32x4(v)
  1040  	case OpRotateAllLeftVarInt64x2:
  1041  		return rewriteValueWasm_OpRotateAllLeftVarInt64x2(v)
  1042  	case OpRotateAllLeftVarInt8x16:
  1043  		return rewriteValueWasm_OpRotateAllLeftVarInt8x16(v)
  1044  	case OpRotateAllLeftVarUint16x8:
  1045  		return rewriteValueWasm_OpRotateAllLeftVarUint16x8(v)
  1046  	case OpRotateAllLeftVarUint32x4:
  1047  		return rewriteValueWasm_OpRotateAllLeftVarUint32x4(v)
  1048  	case OpRotateAllLeftVarUint64x2:
  1049  		return rewriteValueWasm_OpRotateAllLeftVarUint64x2(v)
  1050  	case OpRotateAllLeftVarUint8x16:
  1051  		return rewriteValueWasm_OpRotateAllLeftVarUint8x16(v)
  1052  	case OpRotateAllRightVarInt16x8:
  1053  		return rewriteValueWasm_OpRotateAllRightVarInt16x8(v)
  1054  	case OpRotateAllRightVarInt32x4:
  1055  		return rewriteValueWasm_OpRotateAllRightVarInt32x4(v)
  1056  	case OpRotateAllRightVarInt64x2:
  1057  		return rewriteValueWasm_OpRotateAllRightVarInt64x2(v)
  1058  	case OpRotateAllRightVarInt8x16:
  1059  		return rewriteValueWasm_OpRotateAllRightVarInt8x16(v)
  1060  	case OpRotateAllRightVarUint16x8:
  1061  		return rewriteValueWasm_OpRotateAllRightVarUint16x8(v)
  1062  	case OpRotateAllRightVarUint32x4:
  1063  		return rewriteValueWasm_OpRotateAllRightVarUint32x4(v)
  1064  	case OpRotateAllRightVarUint64x2:
  1065  		return rewriteValueWasm_OpRotateAllRightVarUint64x2(v)
  1066  	case OpRotateAllRightVarUint8x16:
  1067  		return rewriteValueWasm_OpRotateAllRightVarUint8x16(v)
  1068  	case OpRotateLeft16:
  1069  		return rewriteValueWasm_OpRotateLeft16(v)
  1070  	case OpRotateLeft32:
  1071  		v.Op = OpWasmI32Rotl
  1072  		return true
  1073  	case OpRotateLeft64:
  1074  		v.Op = OpWasmI64Rotl
  1075  		return true
  1076  	case OpRotateLeft8:
  1077  		return rewriteValueWasm_OpRotateLeft8(v)
  1078  	case OpRound32F:
  1079  		v.Op = OpCopy
  1080  		return true
  1081  	case OpRound64F:
  1082  		v.Op = OpCopy
  1083  		return true
  1084  	case OpRoundFloat32x4:
  1085  		v.Op = OpWasmF32x4Nearest
  1086  		return true
  1087  	case OpRoundFloat64x2:
  1088  		v.Op = OpWasmF64x2Nearest
  1089  		return true
  1090  	case OpRoundToEven:
  1091  		v.Op = OpWasmF64Nearest
  1092  		return true
  1093  	case OpRsh16Ux16:
  1094  		return rewriteValueWasm_OpRsh16Ux16(v)
  1095  	case OpRsh16Ux32:
  1096  		return rewriteValueWasm_OpRsh16Ux32(v)
  1097  	case OpRsh16Ux64:
  1098  		return rewriteValueWasm_OpRsh16Ux64(v)
  1099  	case OpRsh16Ux8:
  1100  		return rewriteValueWasm_OpRsh16Ux8(v)
  1101  	case OpRsh16x16:
  1102  		return rewriteValueWasm_OpRsh16x16(v)
  1103  	case OpRsh16x32:
  1104  		return rewriteValueWasm_OpRsh16x32(v)
  1105  	case OpRsh16x64:
  1106  		return rewriteValueWasm_OpRsh16x64(v)
  1107  	case OpRsh16x8:
  1108  		return rewriteValueWasm_OpRsh16x8(v)
  1109  	case OpRsh32Ux16:
  1110  		return rewriteValueWasm_OpRsh32Ux16(v)
  1111  	case OpRsh32Ux32:
  1112  		return rewriteValueWasm_OpRsh32Ux32(v)
  1113  	case OpRsh32Ux64:
  1114  		return rewriteValueWasm_OpRsh32Ux64(v)
  1115  	case OpRsh32Ux8:
  1116  		return rewriteValueWasm_OpRsh32Ux8(v)
  1117  	case OpRsh32x16:
  1118  		return rewriteValueWasm_OpRsh32x16(v)
  1119  	case OpRsh32x32:
  1120  		return rewriteValueWasm_OpRsh32x32(v)
  1121  	case OpRsh32x64:
  1122  		return rewriteValueWasm_OpRsh32x64(v)
  1123  	case OpRsh32x8:
  1124  		return rewriteValueWasm_OpRsh32x8(v)
  1125  	case OpRsh64Ux16:
  1126  		return rewriteValueWasm_OpRsh64Ux16(v)
  1127  	case OpRsh64Ux32:
  1128  		return rewriteValueWasm_OpRsh64Ux32(v)
  1129  	case OpRsh64Ux64:
  1130  		return rewriteValueWasm_OpRsh64Ux64(v)
  1131  	case OpRsh64Ux8:
  1132  		return rewriteValueWasm_OpRsh64Ux8(v)
  1133  	case OpRsh64x16:
  1134  		return rewriteValueWasm_OpRsh64x16(v)
  1135  	case OpRsh64x32:
  1136  		return rewriteValueWasm_OpRsh64x32(v)
  1137  	case OpRsh64x64:
  1138  		return rewriteValueWasm_OpRsh64x64(v)
  1139  	case OpRsh64x8:
  1140  		return rewriteValueWasm_OpRsh64x8(v)
  1141  	case OpRsh8Ux16:
  1142  		return rewriteValueWasm_OpRsh8Ux16(v)
  1143  	case OpRsh8Ux32:
  1144  		return rewriteValueWasm_OpRsh8Ux32(v)
  1145  	case OpRsh8Ux64:
  1146  		return rewriteValueWasm_OpRsh8Ux64(v)
  1147  	case OpRsh8Ux8:
  1148  		return rewriteValueWasm_OpRsh8Ux8(v)
  1149  	case OpRsh8x16:
  1150  		return rewriteValueWasm_OpRsh8x16(v)
  1151  	case OpRsh8x32:
  1152  		return rewriteValueWasm_OpRsh8x32(v)
  1153  	case OpRsh8x64:
  1154  		return rewriteValueWasm_OpRsh8x64(v)
  1155  	case OpRsh8x8:
  1156  		return rewriteValueWasm_OpRsh8x8(v)
  1157  	case OpSelect0:
  1158  		return rewriteValueWasm_OpSelect0(v)
  1159  	case OpSelect1:
  1160  		return rewriteValueWasm_OpSelect1(v)
  1161  	case OpSetElemFloat32x4:
  1162  		v.Op = OpWasmF32x4ReplaceLane
  1163  		return true
  1164  	case OpSetElemFloat64x2:
  1165  		v.Op = OpWasmF64x2ReplaceLane
  1166  		return true
  1167  	case OpSetElemInt16x8:
  1168  		v.Op = OpWasmI16x8ReplaceLane
  1169  		return true
  1170  	case OpSetElemInt32x4:
  1171  		v.Op = OpWasmI32x4ReplaceLane
  1172  		return true
  1173  	case OpSetElemInt64x2:
  1174  		v.Op = OpWasmI64x2ReplaceLane
  1175  		return true
  1176  	case OpSetElemInt8x16:
  1177  		v.Op = OpWasmI8x16ReplaceLane
  1178  		return true
  1179  	case OpSetElemUint16x8:
  1180  		v.Op = OpWasmI16x8ReplaceLane
  1181  		return true
  1182  	case OpSetElemUint32x4:
  1183  		v.Op = OpWasmI32x4ReplaceLane
  1184  		return true
  1185  	case OpSetElemUint64x2:
  1186  		v.Op = OpWasmI64x2ReplaceLane
  1187  		return true
  1188  	case OpSetElemUint8x16:
  1189  		v.Op = OpWasmI8x16ReplaceLane
  1190  		return true
  1191  	case OpShiftAllLeftInt16x8:
  1192  		return rewriteValueWasm_OpShiftAllLeftInt16x8(v)
  1193  	case OpShiftAllLeftInt32x4:
  1194  		return rewriteValueWasm_OpShiftAllLeftInt32x4(v)
  1195  	case OpShiftAllLeftInt64x2:
  1196  		return rewriteValueWasm_OpShiftAllLeftInt64x2(v)
  1197  	case OpShiftAllLeftInt8x16:
  1198  		return rewriteValueWasm_OpShiftAllLeftInt8x16(v)
  1199  	case OpShiftAllLeftUint16x8:
  1200  		return rewriteValueWasm_OpShiftAllLeftUint16x8(v)
  1201  	case OpShiftAllLeftUint32x4:
  1202  		return rewriteValueWasm_OpShiftAllLeftUint32x4(v)
  1203  	case OpShiftAllLeftUint64x2:
  1204  		return rewriteValueWasm_OpShiftAllLeftUint64x2(v)
  1205  	case OpShiftAllLeftUint8x16:
  1206  		return rewriteValueWasm_OpShiftAllLeftUint8x16(v)
  1207  	case OpShiftAllRightInt16x8:
  1208  		return rewriteValueWasm_OpShiftAllRightInt16x8(v)
  1209  	case OpShiftAllRightInt32x4:
  1210  		return rewriteValueWasm_OpShiftAllRightInt32x4(v)
  1211  	case OpShiftAllRightInt64x2:
  1212  		return rewriteValueWasm_OpShiftAllRightInt64x2(v)
  1213  	case OpShiftAllRightInt8x16:
  1214  		return rewriteValueWasm_OpShiftAllRightInt8x16(v)
  1215  	case OpShiftAllRightUint16x8:
  1216  		return rewriteValueWasm_OpShiftAllRightUint16x8(v)
  1217  	case OpShiftAllRightUint32x4:
  1218  		return rewriteValueWasm_OpShiftAllRightUint32x4(v)
  1219  	case OpShiftAllRightUint64x2:
  1220  		return rewriteValueWasm_OpShiftAllRightUint64x2(v)
  1221  	case OpShiftAllRightUint8x16:
  1222  		return rewriteValueWasm_OpShiftAllRightUint8x16(v)
  1223  	case OpSignExt16to32:
  1224  		return rewriteValueWasm_OpSignExt16to32(v)
  1225  	case OpSignExt16to64:
  1226  		return rewriteValueWasm_OpSignExt16to64(v)
  1227  	case OpSignExt32to64:
  1228  		return rewriteValueWasm_OpSignExt32to64(v)
  1229  	case OpSignExt8to16:
  1230  		return rewriteValueWasm_OpSignExt8to16(v)
  1231  	case OpSignExt8to32:
  1232  		return rewriteValueWasm_OpSignExt8to32(v)
  1233  	case OpSignExt8to64:
  1234  		return rewriteValueWasm_OpSignExt8to64(v)
  1235  	case OpSlicemask:
  1236  		return rewriteValueWasm_OpSlicemask(v)
  1237  	case OpSqrt:
  1238  		v.Op = OpWasmF64Sqrt
  1239  		return true
  1240  	case OpSqrt32:
  1241  		v.Op = OpWasmF32Sqrt
  1242  		return true
  1243  	case OpSqrtFloat32x4:
  1244  		v.Op = OpWasmF32x4Sqrt
  1245  		return true
  1246  	case OpSqrtFloat64x2:
  1247  		v.Op = OpWasmF64x2Sqrt
  1248  		return true
  1249  	case OpStaticCall:
  1250  		v.Op = OpWasmLoweredStaticCall
  1251  		return true
  1252  	case OpStore:
  1253  		return rewriteValueWasm_OpStore(v)
  1254  	case OpSub16:
  1255  		v.Op = OpWasmI64Sub
  1256  		return true
  1257  	case OpSub32:
  1258  		v.Op = OpWasmI64Sub
  1259  		return true
  1260  	case OpSub32F:
  1261  		v.Op = OpWasmF32Sub
  1262  		return true
  1263  	case OpSub64:
  1264  		v.Op = OpWasmI64Sub
  1265  		return true
  1266  	case OpSub64F:
  1267  		v.Op = OpWasmF64Sub
  1268  		return true
  1269  	case OpSub8:
  1270  		v.Op = OpWasmI64Sub
  1271  		return true
  1272  	case OpSubFloat32x4:
  1273  		v.Op = OpWasmF32x4Sub
  1274  		return true
  1275  	case OpSubFloat64x2:
  1276  		v.Op = OpWasmF64x2Sub
  1277  		return true
  1278  	case OpSubInt16x8:
  1279  		v.Op = OpWasmI16x8Sub
  1280  		return true
  1281  	case OpSubInt32x4:
  1282  		v.Op = OpWasmI32x4Sub
  1283  		return true
  1284  	case OpSubInt64x2:
  1285  		v.Op = OpWasmI64x2Sub
  1286  		return true
  1287  	case OpSubInt8x16:
  1288  		v.Op = OpWasmI8x16Sub
  1289  		return true
  1290  	case OpSubPtr:
  1291  		v.Op = OpWasmI64Sub
  1292  		return true
  1293  	case OpSubSaturatedInt16x8:
  1294  		v.Op = OpWasmI16x8SubSatS
  1295  		return true
  1296  	case OpSubSaturatedInt8x16:
  1297  		v.Op = OpWasmI8x16SubSatS
  1298  		return true
  1299  	case OpSubSaturatedUint16x8:
  1300  		v.Op = OpWasmI16x8SubSatU
  1301  		return true
  1302  	case OpSubSaturatedUint8x16:
  1303  		v.Op = OpWasmI8x16SubSatU
  1304  		return true
  1305  	case OpTailCall:
  1306  		v.Op = OpWasmLoweredTailCall
  1307  		return true
  1308  	case OpTailCallInter:
  1309  		v.Op = OpWasmLoweredTailCallInter
  1310  		return true
  1311  	case OpTrunc:
  1312  		v.Op = OpWasmF64Trunc
  1313  		return true
  1314  	case OpTrunc16to8:
  1315  		v.Op = OpCopy
  1316  		return true
  1317  	case OpTrunc32to16:
  1318  		v.Op = OpCopy
  1319  		return true
  1320  	case OpTrunc32to8:
  1321  		v.Op = OpCopy
  1322  		return true
  1323  	case OpTrunc64to16:
  1324  		v.Op = OpCopy
  1325  		return true
  1326  	case OpTrunc64to32:
  1327  		v.Op = OpCopy
  1328  		return true
  1329  	case OpTrunc64to8:
  1330  		v.Op = OpCopy
  1331  		return true
  1332  	case OpTruncFloat32x4:
  1333  		v.Op = OpWasmF32x4Trunc
  1334  		return true
  1335  	case OpTruncFloat64x2:
  1336  		v.Op = OpWasmF64x2Trunc
  1337  		return true
  1338  	case OpWB:
  1339  		v.Op = OpWasmLoweredWB
  1340  		return true
  1341  	case OpWasmF32DemoteF64:
  1342  		return rewriteValueWasm_OpWasmF32DemoteF64(v)
  1343  	case OpWasmF64Add:
  1344  		return rewriteValueWasm_OpWasmF64Add(v)
  1345  	case OpWasmF64Mul:
  1346  		return rewriteValueWasm_OpWasmF64Mul(v)
  1347  	case OpWasmI64Add:
  1348  		return rewriteValueWasm_OpWasmI64Add(v)
  1349  	case OpWasmI64AddConst:
  1350  		return rewriteValueWasm_OpWasmI64AddConst(v)
  1351  	case OpWasmI64And:
  1352  		return rewriteValueWasm_OpWasmI64And(v)
  1353  	case OpWasmI64Eq:
  1354  		return rewriteValueWasm_OpWasmI64Eq(v)
  1355  	case OpWasmI64Eqz:
  1356  		return rewriteValueWasm_OpWasmI64Eqz(v)
  1357  	case OpWasmI64Extend16S:
  1358  		return rewriteValueWasm_OpWasmI64Extend16S(v)
  1359  	case OpWasmI64Extend32S:
  1360  		return rewriteValueWasm_OpWasmI64Extend32S(v)
  1361  	case OpWasmI64Extend8S:
  1362  		return rewriteValueWasm_OpWasmI64Extend8S(v)
  1363  	case OpWasmI64LeU:
  1364  		return rewriteValueWasm_OpWasmI64LeU(v)
  1365  	case OpWasmI64Load:
  1366  		return rewriteValueWasm_OpWasmI64Load(v)
  1367  	case OpWasmI64Load16S:
  1368  		return rewriteValueWasm_OpWasmI64Load16S(v)
  1369  	case OpWasmI64Load16U:
  1370  		return rewriteValueWasm_OpWasmI64Load16U(v)
  1371  	case OpWasmI64Load32S:
  1372  		return rewriteValueWasm_OpWasmI64Load32S(v)
  1373  	case OpWasmI64Load32U:
  1374  		return rewriteValueWasm_OpWasmI64Load32U(v)
  1375  	case OpWasmI64Load8S:
  1376  		return rewriteValueWasm_OpWasmI64Load8S(v)
  1377  	case OpWasmI64Load8U:
  1378  		return rewriteValueWasm_OpWasmI64Load8U(v)
  1379  	case OpWasmI64LtU:
  1380  		return rewriteValueWasm_OpWasmI64LtU(v)
  1381  	case OpWasmI64Mul:
  1382  		return rewriteValueWasm_OpWasmI64Mul(v)
  1383  	case OpWasmI64Ne:
  1384  		return rewriteValueWasm_OpWasmI64Ne(v)
  1385  	case OpWasmI64Or:
  1386  		return rewriteValueWasm_OpWasmI64Or(v)
  1387  	case OpWasmI64Shl:
  1388  		return rewriteValueWasm_OpWasmI64Shl(v)
  1389  	case OpWasmI64ShrS:
  1390  		return rewriteValueWasm_OpWasmI64ShrS(v)
  1391  	case OpWasmI64ShrU:
  1392  		return rewriteValueWasm_OpWasmI64ShrU(v)
  1393  	case OpWasmI64Store:
  1394  		return rewriteValueWasm_OpWasmI64Store(v)
  1395  	case OpWasmI64Store16:
  1396  		return rewriteValueWasm_OpWasmI64Store16(v)
  1397  	case OpWasmI64Store32:
  1398  		return rewriteValueWasm_OpWasmI64Store32(v)
  1399  	case OpWasmI64Store8:
  1400  		return rewriteValueWasm_OpWasmI64Store8(v)
  1401  	case OpWasmI64Sub:
  1402  		return rewriteValueWasm_OpWasmI64Sub(v)
  1403  	case OpWasmI64Xor:
  1404  		return rewriteValueWasm_OpWasmI64Xor(v)
  1405  	case OpXor16:
  1406  		v.Op = OpWasmI64Xor
  1407  		return true
  1408  	case OpXor32:
  1409  		v.Op = OpWasmI64Xor
  1410  		return true
  1411  	case OpXor64:
  1412  		v.Op = OpWasmI64Xor
  1413  		return true
  1414  	case OpXor8:
  1415  		v.Op = OpWasmI64Xor
  1416  		return true
  1417  	case OpXorInt16x8:
  1418  		v.Op = OpWasmV128Xor
  1419  		return true
  1420  	case OpXorInt32x4:
  1421  		v.Op = OpWasmV128Xor
  1422  		return true
  1423  	case OpXorInt64x2:
  1424  		v.Op = OpWasmV128Xor
  1425  		return true
  1426  	case OpXorInt8x16:
  1427  		v.Op = OpWasmV128Xor
  1428  		return true
  1429  	case OpXorUint16x8:
  1430  		v.Op = OpWasmV128Xor
  1431  		return true
  1432  	case OpXorUint32x4:
  1433  		v.Op = OpWasmV128Xor
  1434  		return true
  1435  	case OpXorUint64x2:
  1436  		v.Op = OpWasmV128Xor
  1437  		return true
  1438  	case OpXorUint8x16:
  1439  		v.Op = OpWasmV128Xor
  1440  		return true
  1441  	case OpZero:
  1442  		return rewriteValueWasm_OpZero(v)
  1443  	case OpZeroExt16to32:
  1444  		return rewriteValueWasm_OpZeroExt16to32(v)
  1445  	case OpZeroExt16to64:
  1446  		return rewriteValueWasm_OpZeroExt16to64(v)
  1447  	case OpZeroExt32to64:
  1448  		return rewriteValueWasm_OpZeroExt32to64(v)
  1449  	case OpZeroExt8to16:
  1450  		return rewriteValueWasm_OpZeroExt8to16(v)
  1451  	case OpZeroExt8to32:
  1452  		return rewriteValueWasm_OpZeroExt8to32(v)
  1453  	case OpZeroExt8to64:
  1454  		return rewriteValueWasm_OpZeroExt8to64(v)
  1455  	case OpZeroSIMD:
  1456  		return rewriteValueWasm_OpZeroSIMD(v)
  1457  	}
  1458  	return false
  1459  }
  1460  func rewriteValueWasm_OpAddr(v *Value) bool {
  1461  	v_0 := v.Args[0]
  1462  	// match: (Addr {sym} base)
  1463  	// result: (LoweredAddr {sym} [0] base)
  1464  	for {
  1465  		sym := auxToSym(v.Aux)
  1466  		base := v_0
  1467  		v.reset(OpWasmLoweredAddr)
  1468  		v.AuxInt = int32ToAuxInt(0)
  1469  		v.Aux = symToAux(sym)
  1470  		v.AddArg(base)
  1471  		return true
  1472  	}
  1473  }
  1474  func rewriteValueWasm_OpAvg64u(v *Value) bool {
  1475  	v_1 := v.Args[1]
  1476  	v_0 := v.Args[0]
  1477  	b := v.Block
  1478  	typ := &b.Func.Config.Types
  1479  	// match: (Avg64u x y)
  1480  	// result: (I64Add (I64ShrU (I64Sub x y) (I64Const [1])) y)
  1481  	for {
  1482  		x := v_0
  1483  		y := v_1
  1484  		v.reset(OpWasmI64Add)
  1485  		v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  1486  		v1 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  1487  		v1.AddArg2(x, y)
  1488  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1489  		v2.AuxInt = int64ToAuxInt(1)
  1490  		v0.AddArg2(v1, v2)
  1491  		v.AddArg2(v0, y)
  1492  		return true
  1493  	}
  1494  }
  1495  func rewriteValueWasm_OpBitLen16(v *Value) bool {
  1496  	v_0 := v.Args[0]
  1497  	b := v.Block
  1498  	typ := &b.Func.Config.Types
  1499  	// match: (BitLen16 x)
  1500  	// result: (BitLen64 (ZeroExt16to64 x))
  1501  	for {
  1502  		x := v_0
  1503  		v.reset(OpBitLen64)
  1504  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1505  		v0.AddArg(x)
  1506  		v.AddArg(v0)
  1507  		return true
  1508  	}
  1509  }
  1510  func rewriteValueWasm_OpBitLen32(v *Value) bool {
  1511  	v_0 := v.Args[0]
  1512  	b := v.Block
  1513  	typ := &b.Func.Config.Types
  1514  	// match: (BitLen32 x)
  1515  	// result: (BitLen64 (ZeroExt32to64 x))
  1516  	for {
  1517  		x := v_0
  1518  		v.reset(OpBitLen64)
  1519  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1520  		v0.AddArg(x)
  1521  		v.AddArg(v0)
  1522  		return true
  1523  	}
  1524  }
  1525  func rewriteValueWasm_OpBitLen64(v *Value) bool {
  1526  	v_0 := v.Args[0]
  1527  	b := v.Block
  1528  	typ := &b.Func.Config.Types
  1529  	// match: (BitLen64 x)
  1530  	// result: (I64Sub (I64Const [64]) (I64Clz x))
  1531  	for {
  1532  		x := v_0
  1533  		v.reset(OpWasmI64Sub)
  1534  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1535  		v0.AuxInt = int64ToAuxInt(64)
  1536  		v1 := b.NewValue0(v.Pos, OpWasmI64Clz, typ.Int64)
  1537  		v1.AddArg(x)
  1538  		v.AddArg2(v0, v1)
  1539  		return true
  1540  	}
  1541  }
  1542  func rewriteValueWasm_OpBitLen8(v *Value) bool {
  1543  	v_0 := v.Args[0]
  1544  	b := v.Block
  1545  	typ := &b.Func.Config.Types
  1546  	// match: (BitLen8 x)
  1547  	// result: (BitLen64 (ZeroExt8to64 x))
  1548  	for {
  1549  		x := v_0
  1550  		v.reset(OpBitLen64)
  1551  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1552  		v0.AddArg(x)
  1553  		v.AddArg(v0)
  1554  		return true
  1555  	}
  1556  }
  1557  func rewriteValueWasm_OpCom16(v *Value) bool {
  1558  	v_0 := v.Args[0]
  1559  	b := v.Block
  1560  	typ := &b.Func.Config.Types
  1561  	// match: (Com16 x)
  1562  	// result: (I64Xor x (I64Const [-1]))
  1563  	for {
  1564  		x := v_0
  1565  		v.reset(OpWasmI64Xor)
  1566  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1567  		v0.AuxInt = int64ToAuxInt(-1)
  1568  		v.AddArg2(x, v0)
  1569  		return true
  1570  	}
  1571  }
  1572  func rewriteValueWasm_OpCom32(v *Value) bool {
  1573  	v_0 := v.Args[0]
  1574  	b := v.Block
  1575  	typ := &b.Func.Config.Types
  1576  	// match: (Com32 x)
  1577  	// result: (I64Xor x (I64Const [-1]))
  1578  	for {
  1579  		x := v_0
  1580  		v.reset(OpWasmI64Xor)
  1581  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1582  		v0.AuxInt = int64ToAuxInt(-1)
  1583  		v.AddArg2(x, v0)
  1584  		return true
  1585  	}
  1586  }
  1587  func rewriteValueWasm_OpCom64(v *Value) bool {
  1588  	v_0 := v.Args[0]
  1589  	b := v.Block
  1590  	typ := &b.Func.Config.Types
  1591  	// match: (Com64 x)
  1592  	// result: (I64Xor x (I64Const [-1]))
  1593  	for {
  1594  		x := v_0
  1595  		v.reset(OpWasmI64Xor)
  1596  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1597  		v0.AuxInt = int64ToAuxInt(-1)
  1598  		v.AddArg2(x, v0)
  1599  		return true
  1600  	}
  1601  }
  1602  func rewriteValueWasm_OpCom8(v *Value) bool {
  1603  	v_0 := v.Args[0]
  1604  	b := v.Block
  1605  	typ := &b.Func.Config.Types
  1606  	// match: (Com8 x)
  1607  	// result: (I64Xor x (I64Const [-1]))
  1608  	for {
  1609  		x := v_0
  1610  		v.reset(OpWasmI64Xor)
  1611  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1612  		v0.AuxInt = int64ToAuxInt(-1)
  1613  		v.AddArg2(x, v0)
  1614  		return true
  1615  	}
  1616  }
  1617  func rewriteValueWasm_OpConst16(v *Value) bool {
  1618  	// match: (Const16 [c])
  1619  	// result: (I64Const [int64(c)])
  1620  	for {
  1621  		c := auxIntToInt16(v.AuxInt)
  1622  		v.reset(OpWasmI64Const)
  1623  		v.AuxInt = int64ToAuxInt(int64(c))
  1624  		return true
  1625  	}
  1626  }
  1627  func rewriteValueWasm_OpConst32(v *Value) bool {
  1628  	// match: (Const32 [c])
  1629  	// result: (I64Const [int64(c)])
  1630  	for {
  1631  		c := auxIntToInt32(v.AuxInt)
  1632  		v.reset(OpWasmI64Const)
  1633  		v.AuxInt = int64ToAuxInt(int64(c))
  1634  		return true
  1635  	}
  1636  }
  1637  func rewriteValueWasm_OpConst8(v *Value) bool {
  1638  	// match: (Const8 [c])
  1639  	// result: (I64Const [int64(c)])
  1640  	for {
  1641  		c := auxIntToInt8(v.AuxInt)
  1642  		v.reset(OpWasmI64Const)
  1643  		v.AuxInt = int64ToAuxInt(int64(c))
  1644  		return true
  1645  	}
  1646  }
  1647  func rewriteValueWasm_OpConstBool(v *Value) bool {
  1648  	// match: (ConstBool [c])
  1649  	// result: (I64Const [b2i(c)])
  1650  	for {
  1651  		c := auxIntToBool(v.AuxInt)
  1652  		v.reset(OpWasmI64Const)
  1653  		v.AuxInt = int64ToAuxInt(b2i(c))
  1654  		return true
  1655  	}
  1656  }
  1657  func rewriteValueWasm_OpConstNil(v *Value) bool {
  1658  	// match: (ConstNil)
  1659  	// result: (I64Const [0])
  1660  	for {
  1661  		v.reset(OpWasmI64Const)
  1662  		v.AuxInt = int64ToAuxInt(0)
  1663  		return true
  1664  	}
  1665  }
  1666  func rewriteValueWasm_OpCtz16(v *Value) bool {
  1667  	v_0 := v.Args[0]
  1668  	b := v.Block
  1669  	typ := &b.Func.Config.Types
  1670  	// match: (Ctz16 x)
  1671  	// result: (I64Ctz (I64Or x (I64Const [0x10000])))
  1672  	for {
  1673  		x := v_0
  1674  		v.reset(OpWasmI64Ctz)
  1675  		v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
  1676  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1677  		v1.AuxInt = int64ToAuxInt(0x10000)
  1678  		v0.AddArg2(x, v1)
  1679  		v.AddArg(v0)
  1680  		return true
  1681  	}
  1682  }
  1683  func rewriteValueWasm_OpCtz32(v *Value) bool {
  1684  	v_0 := v.Args[0]
  1685  	b := v.Block
  1686  	typ := &b.Func.Config.Types
  1687  	// match: (Ctz32 x)
  1688  	// result: (I64Ctz (I64Or x (I64Const [0x100000000])))
  1689  	for {
  1690  		x := v_0
  1691  		v.reset(OpWasmI64Ctz)
  1692  		v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
  1693  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1694  		v1.AuxInt = int64ToAuxInt(0x100000000)
  1695  		v0.AddArg2(x, v1)
  1696  		v.AddArg(v0)
  1697  		return true
  1698  	}
  1699  }
  1700  func rewriteValueWasm_OpCtz8(v *Value) bool {
  1701  	v_0 := v.Args[0]
  1702  	b := v.Block
  1703  	typ := &b.Func.Config.Types
  1704  	// match: (Ctz8 x)
  1705  	// result: (I64Ctz (I64Or x (I64Const [0x100])))
  1706  	for {
  1707  		x := v_0
  1708  		v.reset(OpWasmI64Ctz)
  1709  		v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
  1710  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1711  		v1.AuxInt = int64ToAuxInt(0x100)
  1712  		v0.AddArg2(x, v1)
  1713  		v.AddArg(v0)
  1714  		return true
  1715  	}
  1716  }
  1717  func rewriteValueWasm_OpCvt32Uto32F(v *Value) bool {
  1718  	v_0 := v.Args[0]
  1719  	b := v.Block
  1720  	typ := &b.Func.Config.Types
  1721  	// match: (Cvt32Uto32F x)
  1722  	// result: (F32ConvertI64U (ZeroExt32to64 x))
  1723  	for {
  1724  		x := v_0
  1725  		v.reset(OpWasmF32ConvertI64U)
  1726  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1727  		v0.AddArg(x)
  1728  		v.AddArg(v0)
  1729  		return true
  1730  	}
  1731  }
  1732  func rewriteValueWasm_OpCvt32Uto64F(v *Value) bool {
  1733  	v_0 := v.Args[0]
  1734  	b := v.Block
  1735  	typ := &b.Func.Config.Types
  1736  	// match: (Cvt32Uto64F x)
  1737  	// result: (F64ConvertI64U (ZeroExt32to64 x))
  1738  	for {
  1739  		x := v_0
  1740  		v.reset(OpWasmF64ConvertI64U)
  1741  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1742  		v0.AddArg(x)
  1743  		v.AddArg(v0)
  1744  		return true
  1745  	}
  1746  }
  1747  func rewriteValueWasm_OpCvt32to32F(v *Value) bool {
  1748  	v_0 := v.Args[0]
  1749  	b := v.Block
  1750  	typ := &b.Func.Config.Types
  1751  	// match: (Cvt32to32F x)
  1752  	// result: (F32ConvertI64S (SignExt32to64 x))
  1753  	for {
  1754  		x := v_0
  1755  		v.reset(OpWasmF32ConvertI64S)
  1756  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1757  		v0.AddArg(x)
  1758  		v.AddArg(v0)
  1759  		return true
  1760  	}
  1761  }
  1762  func rewriteValueWasm_OpCvt32to64F(v *Value) bool {
  1763  	v_0 := v.Args[0]
  1764  	b := v.Block
  1765  	typ := &b.Func.Config.Types
  1766  	// match: (Cvt32to64F x)
  1767  	// result: (F64ConvertI64S (SignExt32to64 x))
  1768  	for {
  1769  		x := v_0
  1770  		v.reset(OpWasmF64ConvertI64S)
  1771  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1772  		v0.AddArg(x)
  1773  		v.AddArg(v0)
  1774  		return true
  1775  	}
  1776  }
  1777  func rewriteValueWasm_OpDiv16(v *Value) bool {
  1778  	v_1 := v.Args[1]
  1779  	v_0 := v.Args[0]
  1780  	b := v.Block
  1781  	typ := &b.Func.Config.Types
  1782  	// match: (Div16 [false] x y)
  1783  	// result: (I64DivS (SignExt16to64 x) (SignExt16to64 y))
  1784  	for {
  1785  		if auxIntToBool(v.AuxInt) != false {
  1786  			break
  1787  		}
  1788  		x := v_0
  1789  		y := v_1
  1790  		v.reset(OpWasmI64DivS)
  1791  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1792  		v0.AddArg(x)
  1793  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  1794  		v1.AddArg(y)
  1795  		v.AddArg2(v0, v1)
  1796  		return true
  1797  	}
  1798  	return false
  1799  }
  1800  func rewriteValueWasm_OpDiv16u(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: (Div16u x y)
  1806  	// result: (I64DivU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1807  	for {
  1808  		x := v_0
  1809  		y := v_1
  1810  		v.reset(OpWasmI64DivU)
  1811  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1812  		v0.AddArg(x)
  1813  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1814  		v1.AddArg(y)
  1815  		v.AddArg2(v0, v1)
  1816  		return true
  1817  	}
  1818  }
  1819  func rewriteValueWasm_OpDiv32(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: (Div32 [false] x y)
  1825  	// result: (I64DivS (SignExt32to64 x) (SignExt32to64 y))
  1826  	for {
  1827  		if auxIntToBool(v.AuxInt) != false {
  1828  			break
  1829  		}
  1830  		x := v_0
  1831  		y := v_1
  1832  		v.reset(OpWasmI64DivS)
  1833  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1834  		v0.AddArg(x)
  1835  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1836  		v1.AddArg(y)
  1837  		v.AddArg2(v0, v1)
  1838  		return true
  1839  	}
  1840  	return false
  1841  }
  1842  func rewriteValueWasm_OpDiv32u(v *Value) bool {
  1843  	v_1 := v.Args[1]
  1844  	v_0 := v.Args[0]
  1845  	b := v.Block
  1846  	typ := &b.Func.Config.Types
  1847  	// match: (Div32u x y)
  1848  	// result: (I64DivU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1849  	for {
  1850  		x := v_0
  1851  		y := v_1
  1852  		v.reset(OpWasmI64DivU)
  1853  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1854  		v0.AddArg(x)
  1855  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1856  		v1.AddArg(y)
  1857  		v.AddArg2(v0, v1)
  1858  		return true
  1859  	}
  1860  }
  1861  func rewriteValueWasm_OpDiv64(v *Value) bool {
  1862  	v_1 := v.Args[1]
  1863  	v_0 := v.Args[0]
  1864  	// match: (Div64 [false] x y)
  1865  	// result: (I64DivS x y)
  1866  	for {
  1867  		if auxIntToBool(v.AuxInt) != false {
  1868  			break
  1869  		}
  1870  		x := v_0
  1871  		y := v_1
  1872  		v.reset(OpWasmI64DivS)
  1873  		v.AddArg2(x, y)
  1874  		return true
  1875  	}
  1876  	return false
  1877  }
  1878  func rewriteValueWasm_OpDiv8(v *Value) bool {
  1879  	v_1 := v.Args[1]
  1880  	v_0 := v.Args[0]
  1881  	b := v.Block
  1882  	typ := &b.Func.Config.Types
  1883  	// match: (Div8 x y)
  1884  	// result: (I64DivS (SignExt8to64 x) (SignExt8to64 y))
  1885  	for {
  1886  		x := v_0
  1887  		y := v_1
  1888  		v.reset(OpWasmI64DivS)
  1889  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1890  		v0.AddArg(x)
  1891  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  1892  		v1.AddArg(y)
  1893  		v.AddArg2(v0, v1)
  1894  		return true
  1895  	}
  1896  }
  1897  func rewriteValueWasm_OpDiv8u(v *Value) bool {
  1898  	v_1 := v.Args[1]
  1899  	v_0 := v.Args[0]
  1900  	b := v.Block
  1901  	typ := &b.Func.Config.Types
  1902  	// match: (Div8u x y)
  1903  	// result: (I64DivU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1904  	for {
  1905  		x := v_0
  1906  		y := v_1
  1907  		v.reset(OpWasmI64DivU)
  1908  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1909  		v0.AddArg(x)
  1910  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1911  		v1.AddArg(y)
  1912  		v.AddArg2(v0, v1)
  1913  		return true
  1914  	}
  1915  }
  1916  func rewriteValueWasm_OpEq16(v *Value) bool {
  1917  	v_1 := v.Args[1]
  1918  	v_0 := v.Args[0]
  1919  	b := v.Block
  1920  	typ := &b.Func.Config.Types
  1921  	// match: (Eq16 x y)
  1922  	// result: (I64Eq (ZeroExt16to64 x) (ZeroExt16to64 y))
  1923  	for {
  1924  		x := v_0
  1925  		y := v_1
  1926  		v.reset(OpWasmI64Eq)
  1927  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1928  		v0.AddArg(x)
  1929  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1930  		v1.AddArg(y)
  1931  		v.AddArg2(v0, v1)
  1932  		return true
  1933  	}
  1934  }
  1935  func rewriteValueWasm_OpEq32(v *Value) bool {
  1936  	v_1 := v.Args[1]
  1937  	v_0 := v.Args[0]
  1938  	b := v.Block
  1939  	typ := &b.Func.Config.Types
  1940  	// match: (Eq32 x y)
  1941  	// result: (I64Eq (ZeroExt32to64 x) (ZeroExt32to64 y))
  1942  	for {
  1943  		x := v_0
  1944  		y := v_1
  1945  		v.reset(OpWasmI64Eq)
  1946  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1947  		v0.AddArg(x)
  1948  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1949  		v1.AddArg(y)
  1950  		v.AddArg2(v0, v1)
  1951  		return true
  1952  	}
  1953  }
  1954  func rewriteValueWasm_OpEq8(v *Value) bool {
  1955  	v_1 := v.Args[1]
  1956  	v_0 := v.Args[0]
  1957  	b := v.Block
  1958  	typ := &b.Func.Config.Types
  1959  	// match: (Eq8 x y)
  1960  	// result: (I64Eq (ZeroExt8to64 x) (ZeroExt8to64 y))
  1961  	for {
  1962  		x := v_0
  1963  		y := v_1
  1964  		v.reset(OpWasmI64Eq)
  1965  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1966  		v0.AddArg(x)
  1967  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1968  		v1.AddArg(y)
  1969  		v.AddArg2(v0, v1)
  1970  		return true
  1971  	}
  1972  }
  1973  func rewriteValueWasm_OpHmul64(v *Value) bool {
  1974  	v_1 := v.Args[1]
  1975  	v_0 := v.Args[0]
  1976  	b := v.Block
  1977  	typ := &b.Func.Config.Types
  1978  	// match: (Hmul64 <t> x y)
  1979  	// result: (Last <t> x0: (ZeroExt32to64 x) x1: (I64ShrS x (I64Const [32])) y0: (ZeroExt32to64 y) y1: (I64ShrS y (I64Const [32])) x0y0: (I64Mul x0 y0) tt: (I64Add (I64Mul x1 y0) (I64ShrU x0y0 (I64Const [32]))) w1: (I64Add (I64Mul x0 y1) (ZeroExt32to64 tt)) w2: (I64ShrS tt (I64Const [32])) (I64Add (I64Add (I64Mul x1 y1) w2) (I64ShrS w1 (I64Const [32]))))
  1980  	for {
  1981  		t := v.Type
  1982  		x := v_0
  1983  		y := v_1
  1984  		v.reset(OpLast)
  1985  		v.Type = t
  1986  		x0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1987  		x0.AddArg(x)
  1988  		x1 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
  1989  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  1990  		v2.AuxInt = int64ToAuxInt(32)
  1991  		x1.AddArg2(x, v2)
  1992  		y0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1993  		y0.AddArg(y)
  1994  		y1 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
  1995  		y1.AddArg2(y, v2)
  1996  		x0y0 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  1997  		x0y0.AddArg2(x0, y0)
  1998  		tt := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  1999  		v7 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  2000  		v7.AddArg2(x1, y0)
  2001  		v8 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  2002  		v8.AddArg2(x0y0, v2)
  2003  		tt.AddArg2(v7, v8)
  2004  		w1 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  2005  		v10 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  2006  		v10.AddArg2(x0, y1)
  2007  		v11 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2008  		v11.AddArg(tt)
  2009  		w1.AddArg2(v10, v11)
  2010  		w2 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
  2011  		w2.AddArg2(tt, v2)
  2012  		v13 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  2013  		v14 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  2014  		v15 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  2015  		v15.AddArg2(x1, y1)
  2016  		v14.AddArg2(v15, w2)
  2017  		v16 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
  2018  		v16.AddArg2(w1, v2)
  2019  		v13.AddArg2(v14, v16)
  2020  		v.AddArgs(x0, x1, y0, y1, x0y0, tt, w1, w2, v13)
  2021  		return true
  2022  	}
  2023  }
  2024  func rewriteValueWasm_OpHmul64u(v *Value) bool {
  2025  	v_1 := v.Args[1]
  2026  	v_0 := v.Args[0]
  2027  	b := v.Block
  2028  	typ := &b.Func.Config.Types
  2029  	// match: (Hmul64u <t> x y)
  2030  	// result: (Last <t> x0: (ZeroExt32to64 x) x1: (I64ShrU x (I64Const [32])) y0: (ZeroExt32to64 y) y1: (I64ShrU y (I64Const [32])) w0: (I64Mul x0 y0) tt: (I64Add (I64Mul x1 y0) (I64ShrU w0 (I64Const [32]))) w1: (I64Add (I64Mul x0 y1) (ZeroExt32to64 tt)) w2: (I64ShrU tt (I64Const [32])) hi: (I64Add (I64Add (I64Mul x1 y1) w2) (I64ShrU w1 (I64Const [32]))))
  2031  	for {
  2032  		t := v.Type
  2033  		x := v_0
  2034  		y := v_1
  2035  		v.reset(OpLast)
  2036  		v.Type = t
  2037  		x0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2038  		x0.AddArg(x)
  2039  		x1 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  2040  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2041  		v2.AuxInt = int64ToAuxInt(32)
  2042  		x1.AddArg2(x, v2)
  2043  		y0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2044  		y0.AddArg(y)
  2045  		y1 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  2046  		y1.AddArg2(y, v2)
  2047  		w0 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  2048  		w0.AddArg2(x0, y0)
  2049  		tt := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  2050  		v7 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  2051  		v7.AddArg2(x1, y0)
  2052  		v8 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  2053  		v8.AddArg2(w0, v2)
  2054  		tt.AddArg2(v7, v8)
  2055  		w1 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  2056  		v10 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  2057  		v10.AddArg2(x0, y1)
  2058  		v11 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2059  		v11.AddArg(tt)
  2060  		w1.AddArg2(v10, v11)
  2061  		w2 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  2062  		w2.AddArg2(tt, v2)
  2063  		hi := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  2064  		v14 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
  2065  		v15 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
  2066  		v15.AddArg2(x1, y1)
  2067  		v14.AddArg2(v15, w2)
  2068  		v16 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  2069  		v16.AddArg2(w1, v2)
  2070  		hi.AddArg2(v14, v16)
  2071  		v.AddArgs(x0, x1, y0, y1, w0, tt, w1, w2, hi)
  2072  		return true
  2073  	}
  2074  }
  2075  func rewriteValueWasm_OpIsNonNil(v *Value) bool {
  2076  	v_0 := v.Args[0]
  2077  	b := v.Block
  2078  	typ := &b.Func.Config.Types
  2079  	// match: (IsNonNil p)
  2080  	// result: (I64Eqz (I64Eqz p))
  2081  	for {
  2082  		p := v_0
  2083  		v.reset(OpWasmI64Eqz)
  2084  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  2085  		v0.AddArg(p)
  2086  		v.AddArg(v0)
  2087  		return true
  2088  	}
  2089  }
  2090  func rewriteValueWasm_OpLast(v *Value) bool {
  2091  	// match: (Last ___)
  2092  	// result: v.Args[len(v.Args)-1]
  2093  	for {
  2094  		v.copyOf(v.Args[len(v.Args)-1])
  2095  		return true
  2096  	}
  2097  }
  2098  func rewriteValueWasm_OpLeq16(v *Value) bool {
  2099  	v_1 := v.Args[1]
  2100  	v_0 := v.Args[0]
  2101  	b := v.Block
  2102  	typ := &b.Func.Config.Types
  2103  	// match: (Leq16 x y)
  2104  	// result: (I64LeS (SignExt16to64 x) (SignExt16to64 y))
  2105  	for {
  2106  		x := v_0
  2107  		y := v_1
  2108  		v.reset(OpWasmI64LeS)
  2109  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2110  		v0.AddArg(x)
  2111  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2112  		v1.AddArg(y)
  2113  		v.AddArg2(v0, v1)
  2114  		return true
  2115  	}
  2116  }
  2117  func rewriteValueWasm_OpLeq16U(v *Value) bool {
  2118  	v_1 := v.Args[1]
  2119  	v_0 := v.Args[0]
  2120  	b := v.Block
  2121  	typ := &b.Func.Config.Types
  2122  	// match: (Leq16U x y)
  2123  	// result: (I64LeU (ZeroExt16to64 x) (ZeroExt16to64 y))
  2124  	for {
  2125  		x := v_0
  2126  		y := v_1
  2127  		v.reset(OpWasmI64LeU)
  2128  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2129  		v0.AddArg(x)
  2130  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2131  		v1.AddArg(y)
  2132  		v.AddArg2(v0, v1)
  2133  		return true
  2134  	}
  2135  }
  2136  func rewriteValueWasm_OpLeq32(v *Value) bool {
  2137  	v_1 := v.Args[1]
  2138  	v_0 := v.Args[0]
  2139  	b := v.Block
  2140  	typ := &b.Func.Config.Types
  2141  	// match: (Leq32 x y)
  2142  	// result: (I64LeS (SignExt32to64 x) (SignExt32to64 y))
  2143  	for {
  2144  		x := v_0
  2145  		y := v_1
  2146  		v.reset(OpWasmI64LeS)
  2147  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2148  		v0.AddArg(x)
  2149  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2150  		v1.AddArg(y)
  2151  		v.AddArg2(v0, v1)
  2152  		return true
  2153  	}
  2154  }
  2155  func rewriteValueWasm_OpLeq32U(v *Value) bool {
  2156  	v_1 := v.Args[1]
  2157  	v_0 := v.Args[0]
  2158  	b := v.Block
  2159  	typ := &b.Func.Config.Types
  2160  	// match: (Leq32U x y)
  2161  	// result: (I64LeU (ZeroExt32to64 x) (ZeroExt32to64 y))
  2162  	for {
  2163  		x := v_0
  2164  		y := v_1
  2165  		v.reset(OpWasmI64LeU)
  2166  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2167  		v0.AddArg(x)
  2168  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2169  		v1.AddArg(y)
  2170  		v.AddArg2(v0, v1)
  2171  		return true
  2172  	}
  2173  }
  2174  func rewriteValueWasm_OpLeq8(v *Value) bool {
  2175  	v_1 := v.Args[1]
  2176  	v_0 := v.Args[0]
  2177  	b := v.Block
  2178  	typ := &b.Func.Config.Types
  2179  	// match: (Leq8 x y)
  2180  	// result: (I64LeS (SignExt8to64 x) (SignExt8to64 y))
  2181  	for {
  2182  		x := v_0
  2183  		y := v_1
  2184  		v.reset(OpWasmI64LeS)
  2185  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  2186  		v0.AddArg(x)
  2187  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  2188  		v1.AddArg(y)
  2189  		v.AddArg2(v0, v1)
  2190  		return true
  2191  	}
  2192  }
  2193  func rewriteValueWasm_OpLeq8U(v *Value) bool {
  2194  	v_1 := v.Args[1]
  2195  	v_0 := v.Args[0]
  2196  	b := v.Block
  2197  	typ := &b.Func.Config.Types
  2198  	// match: (Leq8U x y)
  2199  	// result: (I64LeU (ZeroExt8to64 x) (ZeroExt8to64 y))
  2200  	for {
  2201  		x := v_0
  2202  		y := v_1
  2203  		v.reset(OpWasmI64LeU)
  2204  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2205  		v0.AddArg(x)
  2206  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2207  		v1.AddArg(y)
  2208  		v.AddArg2(v0, v1)
  2209  		return true
  2210  	}
  2211  }
  2212  func rewriteValueWasm_OpLess16(v *Value) bool {
  2213  	v_1 := v.Args[1]
  2214  	v_0 := v.Args[0]
  2215  	b := v.Block
  2216  	typ := &b.Func.Config.Types
  2217  	// match: (Less16 x y)
  2218  	// result: (I64LtS (SignExt16to64 x) (SignExt16to64 y))
  2219  	for {
  2220  		x := v_0
  2221  		y := v_1
  2222  		v.reset(OpWasmI64LtS)
  2223  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2224  		v0.AddArg(x)
  2225  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2226  		v1.AddArg(y)
  2227  		v.AddArg2(v0, v1)
  2228  		return true
  2229  	}
  2230  }
  2231  func rewriteValueWasm_OpLess16U(v *Value) bool {
  2232  	v_1 := v.Args[1]
  2233  	v_0 := v.Args[0]
  2234  	b := v.Block
  2235  	typ := &b.Func.Config.Types
  2236  	// match: (Less16U x y)
  2237  	// result: (I64LtU (ZeroExt16to64 x) (ZeroExt16to64 y))
  2238  	for {
  2239  		x := v_0
  2240  		y := v_1
  2241  		v.reset(OpWasmI64LtU)
  2242  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2243  		v0.AddArg(x)
  2244  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2245  		v1.AddArg(y)
  2246  		v.AddArg2(v0, v1)
  2247  		return true
  2248  	}
  2249  }
  2250  func rewriteValueWasm_OpLess32(v *Value) bool {
  2251  	v_1 := v.Args[1]
  2252  	v_0 := v.Args[0]
  2253  	b := v.Block
  2254  	typ := &b.Func.Config.Types
  2255  	// match: (Less32 x y)
  2256  	// result: (I64LtS (SignExt32to64 x) (SignExt32to64 y))
  2257  	for {
  2258  		x := v_0
  2259  		y := v_1
  2260  		v.reset(OpWasmI64LtS)
  2261  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2262  		v0.AddArg(x)
  2263  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2264  		v1.AddArg(y)
  2265  		v.AddArg2(v0, v1)
  2266  		return true
  2267  	}
  2268  }
  2269  func rewriteValueWasm_OpLess32U(v *Value) bool {
  2270  	v_1 := v.Args[1]
  2271  	v_0 := v.Args[0]
  2272  	b := v.Block
  2273  	typ := &b.Func.Config.Types
  2274  	// match: (Less32U x y)
  2275  	// result: (I64LtU (ZeroExt32to64 x) (ZeroExt32to64 y))
  2276  	for {
  2277  		x := v_0
  2278  		y := v_1
  2279  		v.reset(OpWasmI64LtU)
  2280  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2281  		v0.AddArg(x)
  2282  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2283  		v1.AddArg(y)
  2284  		v.AddArg2(v0, v1)
  2285  		return true
  2286  	}
  2287  }
  2288  func rewriteValueWasm_OpLess8(v *Value) bool {
  2289  	v_1 := v.Args[1]
  2290  	v_0 := v.Args[0]
  2291  	b := v.Block
  2292  	typ := &b.Func.Config.Types
  2293  	// match: (Less8 x y)
  2294  	// result: (I64LtS (SignExt8to64 x) (SignExt8to64 y))
  2295  	for {
  2296  		x := v_0
  2297  		y := v_1
  2298  		v.reset(OpWasmI64LtS)
  2299  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  2300  		v0.AddArg(x)
  2301  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  2302  		v1.AddArg(y)
  2303  		v.AddArg2(v0, v1)
  2304  		return true
  2305  	}
  2306  }
  2307  func rewriteValueWasm_OpLess8U(v *Value) bool {
  2308  	v_1 := v.Args[1]
  2309  	v_0 := v.Args[0]
  2310  	b := v.Block
  2311  	typ := &b.Func.Config.Types
  2312  	// match: (Less8U x y)
  2313  	// result: (I64LtU (ZeroExt8to64 x) (ZeroExt8to64 y))
  2314  	for {
  2315  		x := v_0
  2316  		y := v_1
  2317  		v.reset(OpWasmI64LtU)
  2318  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2319  		v0.AddArg(x)
  2320  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2321  		v1.AddArg(y)
  2322  		v.AddArg2(v0, v1)
  2323  		return true
  2324  	}
  2325  }
  2326  func rewriteValueWasm_OpLoad(v *Value) bool {
  2327  	v_1 := v.Args[1]
  2328  	v_0 := v.Args[0]
  2329  	// match: (Load <t> ptr mem)
  2330  	// cond: is32BitFloat(t)
  2331  	// result: (F32Load ptr mem)
  2332  	for {
  2333  		t := v.Type
  2334  		ptr := v_0
  2335  		mem := v_1
  2336  		if !(is32BitFloat(t)) {
  2337  			break
  2338  		}
  2339  		v.reset(OpWasmF32Load)
  2340  		v.AddArg2(ptr, mem)
  2341  		return true
  2342  	}
  2343  	// match: (Load <t> ptr mem)
  2344  	// cond: is64BitFloat(t)
  2345  	// result: (F64Load ptr mem)
  2346  	for {
  2347  		t := v.Type
  2348  		ptr := v_0
  2349  		mem := v_1
  2350  		if !(is64BitFloat(t)) {
  2351  			break
  2352  		}
  2353  		v.reset(OpWasmF64Load)
  2354  		v.AddArg2(ptr, mem)
  2355  		return true
  2356  	}
  2357  	// match: (Load <t> ptr mem)
  2358  	// cond: t.Size() == 16
  2359  	// result: (V128Load ptr mem)
  2360  	for {
  2361  		t := v.Type
  2362  		ptr := v_0
  2363  		mem := v_1
  2364  		if !(t.Size() == 16) {
  2365  			break
  2366  		}
  2367  		v.reset(OpWasmV128Load)
  2368  		v.AddArg2(ptr, mem)
  2369  		return true
  2370  	}
  2371  	// match: (Load <t> ptr mem)
  2372  	// cond: t.Size() == 8
  2373  	// result: (I64Load ptr mem)
  2374  	for {
  2375  		t := v.Type
  2376  		ptr := v_0
  2377  		mem := v_1
  2378  		if !(t.Size() == 8) {
  2379  			break
  2380  		}
  2381  		v.reset(OpWasmI64Load)
  2382  		v.AddArg2(ptr, mem)
  2383  		return true
  2384  	}
  2385  	// match: (Load <t> ptr mem)
  2386  	// cond: t.Size() == 4 && !t.IsSigned()
  2387  	// result: (I64Load32U ptr mem)
  2388  	for {
  2389  		t := v.Type
  2390  		ptr := v_0
  2391  		mem := v_1
  2392  		if !(t.Size() == 4 && !t.IsSigned()) {
  2393  			break
  2394  		}
  2395  		v.reset(OpWasmI64Load32U)
  2396  		v.AddArg2(ptr, mem)
  2397  		return true
  2398  	}
  2399  	// match: (Load <t> ptr mem)
  2400  	// cond: t.Size() == 4 && t.IsSigned()
  2401  	// result: (I64Load32S ptr mem)
  2402  	for {
  2403  		t := v.Type
  2404  		ptr := v_0
  2405  		mem := v_1
  2406  		if !(t.Size() == 4 && t.IsSigned()) {
  2407  			break
  2408  		}
  2409  		v.reset(OpWasmI64Load32S)
  2410  		v.AddArg2(ptr, mem)
  2411  		return true
  2412  	}
  2413  	// match: (Load <t> ptr mem)
  2414  	// cond: t.Size() == 2 && !t.IsSigned()
  2415  	// result: (I64Load16U ptr mem)
  2416  	for {
  2417  		t := v.Type
  2418  		ptr := v_0
  2419  		mem := v_1
  2420  		if !(t.Size() == 2 && !t.IsSigned()) {
  2421  			break
  2422  		}
  2423  		v.reset(OpWasmI64Load16U)
  2424  		v.AddArg2(ptr, mem)
  2425  		return true
  2426  	}
  2427  	// match: (Load <t> ptr mem)
  2428  	// cond: t.Size() == 2 && t.IsSigned()
  2429  	// result: (I64Load16S ptr mem)
  2430  	for {
  2431  		t := v.Type
  2432  		ptr := v_0
  2433  		mem := v_1
  2434  		if !(t.Size() == 2 && t.IsSigned()) {
  2435  			break
  2436  		}
  2437  		v.reset(OpWasmI64Load16S)
  2438  		v.AddArg2(ptr, mem)
  2439  		return true
  2440  	}
  2441  	// match: (Load <t> ptr mem)
  2442  	// cond: t.Size() == 1 && !t.IsSigned()
  2443  	// result: (I64Load8U ptr mem)
  2444  	for {
  2445  		t := v.Type
  2446  		ptr := v_0
  2447  		mem := v_1
  2448  		if !(t.Size() == 1 && !t.IsSigned()) {
  2449  			break
  2450  		}
  2451  		v.reset(OpWasmI64Load8U)
  2452  		v.AddArg2(ptr, mem)
  2453  		return true
  2454  	}
  2455  	// match: (Load <t> ptr mem)
  2456  	// cond: t.Size() == 1 && t.IsSigned()
  2457  	// result: (I64Load8S ptr mem)
  2458  	for {
  2459  		t := v.Type
  2460  		ptr := v_0
  2461  		mem := v_1
  2462  		if !(t.Size() == 1 && t.IsSigned()) {
  2463  			break
  2464  		}
  2465  		v.reset(OpWasmI64Load8S)
  2466  		v.AddArg2(ptr, mem)
  2467  		return true
  2468  	}
  2469  	return false
  2470  }
  2471  func rewriteValueWasm_OpLocalAddr(v *Value) bool {
  2472  	v_1 := v.Args[1]
  2473  	v_0 := v.Args[0]
  2474  	b := v.Block
  2475  	typ := &b.Func.Config.Types
  2476  	// match: (LocalAddr <t> {sym} base mem)
  2477  	// cond: t.Elem().HasPointers()
  2478  	// result: (LoweredAddr {sym} (SPanchored base mem))
  2479  	for {
  2480  		t := v.Type
  2481  		sym := auxToSym(v.Aux)
  2482  		base := v_0
  2483  		mem := v_1
  2484  		if !(t.Elem().HasPointers()) {
  2485  			break
  2486  		}
  2487  		v.reset(OpWasmLoweredAddr)
  2488  		v.Aux = symToAux(sym)
  2489  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
  2490  		v0.AddArg2(base, mem)
  2491  		v.AddArg(v0)
  2492  		return true
  2493  	}
  2494  	// match: (LocalAddr <t> {sym} base _)
  2495  	// cond: !t.Elem().HasPointers()
  2496  	// result: (LoweredAddr {sym} base)
  2497  	for {
  2498  		t := v.Type
  2499  		sym := auxToSym(v.Aux)
  2500  		base := v_0
  2501  		if !(!t.Elem().HasPointers()) {
  2502  			break
  2503  		}
  2504  		v.reset(OpWasmLoweredAddr)
  2505  		v.Aux = symToAux(sym)
  2506  		v.AddArg(base)
  2507  		return true
  2508  	}
  2509  	return false
  2510  }
  2511  func rewriteValueWasm_OpLsh16x16(v *Value) bool {
  2512  	v_1 := v.Args[1]
  2513  	v_0 := v.Args[0]
  2514  	b := v.Block
  2515  	typ := &b.Func.Config.Types
  2516  	// match: (Lsh16x16 [c] x y)
  2517  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2518  	for {
  2519  		c := auxIntToBool(v.AuxInt)
  2520  		x := v_0
  2521  		y := v_1
  2522  		v.reset(OpLsh64x64)
  2523  		v.AuxInt = boolToAuxInt(c)
  2524  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2525  		v0.AddArg(y)
  2526  		v.AddArg2(x, v0)
  2527  		return true
  2528  	}
  2529  }
  2530  func rewriteValueWasm_OpLsh16x32(v *Value) bool {
  2531  	v_1 := v.Args[1]
  2532  	v_0 := v.Args[0]
  2533  	b := v.Block
  2534  	typ := &b.Func.Config.Types
  2535  	// match: (Lsh16x32 [c] x y)
  2536  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2537  	for {
  2538  		c := auxIntToBool(v.AuxInt)
  2539  		x := v_0
  2540  		y := v_1
  2541  		v.reset(OpLsh64x64)
  2542  		v.AuxInt = boolToAuxInt(c)
  2543  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2544  		v0.AddArg(y)
  2545  		v.AddArg2(x, v0)
  2546  		return true
  2547  	}
  2548  }
  2549  func rewriteValueWasm_OpLsh16x8(v *Value) bool {
  2550  	v_1 := v.Args[1]
  2551  	v_0 := v.Args[0]
  2552  	b := v.Block
  2553  	typ := &b.Func.Config.Types
  2554  	// match: (Lsh16x8 [c] x y)
  2555  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2556  	for {
  2557  		c := auxIntToBool(v.AuxInt)
  2558  		x := v_0
  2559  		y := v_1
  2560  		v.reset(OpLsh64x64)
  2561  		v.AuxInt = boolToAuxInt(c)
  2562  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2563  		v0.AddArg(y)
  2564  		v.AddArg2(x, v0)
  2565  		return true
  2566  	}
  2567  }
  2568  func rewriteValueWasm_OpLsh32x16(v *Value) bool {
  2569  	v_1 := v.Args[1]
  2570  	v_0 := v.Args[0]
  2571  	b := v.Block
  2572  	typ := &b.Func.Config.Types
  2573  	// match: (Lsh32x16 [c] x y)
  2574  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2575  	for {
  2576  		c := auxIntToBool(v.AuxInt)
  2577  		x := v_0
  2578  		y := v_1
  2579  		v.reset(OpLsh64x64)
  2580  		v.AuxInt = boolToAuxInt(c)
  2581  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2582  		v0.AddArg(y)
  2583  		v.AddArg2(x, v0)
  2584  		return true
  2585  	}
  2586  }
  2587  func rewriteValueWasm_OpLsh32x32(v *Value) bool {
  2588  	v_1 := v.Args[1]
  2589  	v_0 := v.Args[0]
  2590  	b := v.Block
  2591  	typ := &b.Func.Config.Types
  2592  	// match: (Lsh32x32 [c] x y)
  2593  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2594  	for {
  2595  		c := auxIntToBool(v.AuxInt)
  2596  		x := v_0
  2597  		y := v_1
  2598  		v.reset(OpLsh64x64)
  2599  		v.AuxInt = boolToAuxInt(c)
  2600  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2601  		v0.AddArg(y)
  2602  		v.AddArg2(x, v0)
  2603  		return true
  2604  	}
  2605  }
  2606  func rewriteValueWasm_OpLsh32x8(v *Value) bool {
  2607  	v_1 := v.Args[1]
  2608  	v_0 := v.Args[0]
  2609  	b := v.Block
  2610  	typ := &b.Func.Config.Types
  2611  	// match: (Lsh32x8 [c] x y)
  2612  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2613  	for {
  2614  		c := auxIntToBool(v.AuxInt)
  2615  		x := v_0
  2616  		y := v_1
  2617  		v.reset(OpLsh64x64)
  2618  		v.AuxInt = boolToAuxInt(c)
  2619  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2620  		v0.AddArg(y)
  2621  		v.AddArg2(x, v0)
  2622  		return true
  2623  	}
  2624  }
  2625  func rewriteValueWasm_OpLsh64x16(v *Value) bool {
  2626  	v_1 := v.Args[1]
  2627  	v_0 := v.Args[0]
  2628  	b := v.Block
  2629  	typ := &b.Func.Config.Types
  2630  	// match: (Lsh64x16 [c] x y)
  2631  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2632  	for {
  2633  		c := auxIntToBool(v.AuxInt)
  2634  		x := v_0
  2635  		y := v_1
  2636  		v.reset(OpLsh64x64)
  2637  		v.AuxInt = boolToAuxInt(c)
  2638  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2639  		v0.AddArg(y)
  2640  		v.AddArg2(x, v0)
  2641  		return true
  2642  	}
  2643  }
  2644  func rewriteValueWasm_OpLsh64x32(v *Value) bool {
  2645  	v_1 := v.Args[1]
  2646  	v_0 := v.Args[0]
  2647  	b := v.Block
  2648  	typ := &b.Func.Config.Types
  2649  	// match: (Lsh64x32 [c] x y)
  2650  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2651  	for {
  2652  		c := auxIntToBool(v.AuxInt)
  2653  		x := v_0
  2654  		y := v_1
  2655  		v.reset(OpLsh64x64)
  2656  		v.AuxInt = boolToAuxInt(c)
  2657  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2658  		v0.AddArg(y)
  2659  		v.AddArg2(x, v0)
  2660  		return true
  2661  	}
  2662  }
  2663  func rewriteValueWasm_OpLsh64x64(v *Value) bool {
  2664  	v_1 := v.Args[1]
  2665  	v_0 := v.Args[0]
  2666  	b := v.Block
  2667  	typ := &b.Func.Config.Types
  2668  	// match: (Lsh64x64 x y)
  2669  	// cond: shiftIsBounded(v)
  2670  	// result: (I64Shl x y)
  2671  	for {
  2672  		x := v_0
  2673  		y := v_1
  2674  		if !(shiftIsBounded(v)) {
  2675  			break
  2676  		}
  2677  		v.reset(OpWasmI64Shl)
  2678  		v.AddArg2(x, y)
  2679  		return true
  2680  	}
  2681  	// match: (Lsh64x64 x (I64Const [c]))
  2682  	// cond: uint64(c) < 64
  2683  	// result: (I64Shl x (I64Const [c]))
  2684  	for {
  2685  		x := v_0
  2686  		if v_1.Op != OpWasmI64Const {
  2687  			break
  2688  		}
  2689  		c := auxIntToInt64(v_1.AuxInt)
  2690  		if !(uint64(c) < 64) {
  2691  			break
  2692  		}
  2693  		v.reset(OpWasmI64Shl)
  2694  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2695  		v0.AuxInt = int64ToAuxInt(c)
  2696  		v.AddArg2(x, v0)
  2697  		return true
  2698  	}
  2699  	// match: (Lsh64x64 x (I64Const [c]))
  2700  	// cond: uint64(c) >= 64
  2701  	// result: (I64Const [0])
  2702  	for {
  2703  		if v_1.Op != OpWasmI64Const {
  2704  			break
  2705  		}
  2706  		c := auxIntToInt64(v_1.AuxInt)
  2707  		if !(uint64(c) >= 64) {
  2708  			break
  2709  		}
  2710  		v.reset(OpWasmI64Const)
  2711  		v.AuxInt = int64ToAuxInt(0)
  2712  		return true
  2713  	}
  2714  	// match: (Lsh64x64 x y)
  2715  	// result: (Select (I64Shl x y) (I64Const [0]) (I64LtU y (I64Const [64])))
  2716  	for {
  2717  		x := v_0
  2718  		y := v_1
  2719  		v.reset(OpWasmSelect)
  2720  		v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
  2721  		v0.AddArg2(x, y)
  2722  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2723  		v1.AuxInt = int64ToAuxInt(0)
  2724  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  2725  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  2726  		v3.AuxInt = int64ToAuxInt(64)
  2727  		v2.AddArg2(y, v3)
  2728  		v.AddArg3(v0, v1, v2)
  2729  		return true
  2730  	}
  2731  }
  2732  func rewriteValueWasm_OpLsh64x8(v *Value) bool {
  2733  	v_1 := v.Args[1]
  2734  	v_0 := v.Args[0]
  2735  	b := v.Block
  2736  	typ := &b.Func.Config.Types
  2737  	// match: (Lsh64x8 [c] x y)
  2738  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2739  	for {
  2740  		c := auxIntToBool(v.AuxInt)
  2741  		x := v_0
  2742  		y := v_1
  2743  		v.reset(OpLsh64x64)
  2744  		v.AuxInt = boolToAuxInt(c)
  2745  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2746  		v0.AddArg(y)
  2747  		v.AddArg2(x, v0)
  2748  		return true
  2749  	}
  2750  }
  2751  func rewriteValueWasm_OpLsh8x16(v *Value) bool {
  2752  	v_1 := v.Args[1]
  2753  	v_0 := v.Args[0]
  2754  	b := v.Block
  2755  	typ := &b.Func.Config.Types
  2756  	// match: (Lsh8x16 [c] x y)
  2757  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2758  	for {
  2759  		c := auxIntToBool(v.AuxInt)
  2760  		x := v_0
  2761  		y := v_1
  2762  		v.reset(OpLsh64x64)
  2763  		v.AuxInt = boolToAuxInt(c)
  2764  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2765  		v0.AddArg(y)
  2766  		v.AddArg2(x, v0)
  2767  		return true
  2768  	}
  2769  }
  2770  func rewriteValueWasm_OpLsh8x32(v *Value) bool {
  2771  	v_1 := v.Args[1]
  2772  	v_0 := v.Args[0]
  2773  	b := v.Block
  2774  	typ := &b.Func.Config.Types
  2775  	// match: (Lsh8x32 [c] x y)
  2776  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2777  	for {
  2778  		c := auxIntToBool(v.AuxInt)
  2779  		x := v_0
  2780  		y := v_1
  2781  		v.reset(OpLsh64x64)
  2782  		v.AuxInt = boolToAuxInt(c)
  2783  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2784  		v0.AddArg(y)
  2785  		v.AddArg2(x, v0)
  2786  		return true
  2787  	}
  2788  }
  2789  func rewriteValueWasm_OpLsh8x8(v *Value) bool {
  2790  	v_1 := v.Args[1]
  2791  	v_0 := v.Args[0]
  2792  	b := v.Block
  2793  	typ := &b.Func.Config.Types
  2794  	// match: (Lsh8x8 [c] x y)
  2795  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2796  	for {
  2797  		c := auxIntToBool(v.AuxInt)
  2798  		x := v_0
  2799  		y := v_1
  2800  		v.reset(OpLsh64x64)
  2801  		v.AuxInt = boolToAuxInt(c)
  2802  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2803  		v0.AddArg(y)
  2804  		v.AddArg2(x, v0)
  2805  		return true
  2806  	}
  2807  }
  2808  func rewriteValueWasm_OpMod16(v *Value) bool {
  2809  	v_1 := v.Args[1]
  2810  	v_0 := v.Args[0]
  2811  	b := v.Block
  2812  	typ := &b.Func.Config.Types
  2813  	// match: (Mod16 [false] x y)
  2814  	// result: (I64RemS (SignExt16to64 x) (SignExt16to64 y))
  2815  	for {
  2816  		if auxIntToBool(v.AuxInt) != false {
  2817  			break
  2818  		}
  2819  		x := v_0
  2820  		y := v_1
  2821  		v.reset(OpWasmI64RemS)
  2822  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2823  		v0.AddArg(x)
  2824  		v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  2825  		v1.AddArg(y)
  2826  		v.AddArg2(v0, v1)
  2827  		return true
  2828  	}
  2829  	return false
  2830  }
  2831  func rewriteValueWasm_OpMod16u(v *Value) bool {
  2832  	v_1 := v.Args[1]
  2833  	v_0 := v.Args[0]
  2834  	b := v.Block
  2835  	typ := &b.Func.Config.Types
  2836  	// match: (Mod16u x y)
  2837  	// result: (I64RemU (ZeroExt16to64 x) (ZeroExt16to64 y))
  2838  	for {
  2839  		x := v_0
  2840  		y := v_1
  2841  		v.reset(OpWasmI64RemU)
  2842  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2843  		v0.AddArg(x)
  2844  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2845  		v1.AddArg(y)
  2846  		v.AddArg2(v0, v1)
  2847  		return true
  2848  	}
  2849  }
  2850  func rewriteValueWasm_OpMod32(v *Value) bool {
  2851  	v_1 := v.Args[1]
  2852  	v_0 := v.Args[0]
  2853  	b := v.Block
  2854  	typ := &b.Func.Config.Types
  2855  	// match: (Mod32 [false] x y)
  2856  	// result: (I64RemS (SignExt32to64 x) (SignExt32to64 y))
  2857  	for {
  2858  		if auxIntToBool(v.AuxInt) != false {
  2859  			break
  2860  		}
  2861  		x := v_0
  2862  		y := v_1
  2863  		v.reset(OpWasmI64RemS)
  2864  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2865  		v0.AddArg(x)
  2866  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  2867  		v1.AddArg(y)
  2868  		v.AddArg2(v0, v1)
  2869  		return true
  2870  	}
  2871  	return false
  2872  }
  2873  func rewriteValueWasm_OpMod32u(v *Value) bool {
  2874  	v_1 := v.Args[1]
  2875  	v_0 := v.Args[0]
  2876  	b := v.Block
  2877  	typ := &b.Func.Config.Types
  2878  	// match: (Mod32u x y)
  2879  	// result: (I64RemU (ZeroExt32to64 x) (ZeroExt32to64 y))
  2880  	for {
  2881  		x := v_0
  2882  		y := v_1
  2883  		v.reset(OpWasmI64RemU)
  2884  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2885  		v0.AddArg(x)
  2886  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  2887  		v1.AddArg(y)
  2888  		v.AddArg2(v0, v1)
  2889  		return true
  2890  	}
  2891  }
  2892  func rewriteValueWasm_OpMod64(v *Value) bool {
  2893  	v_1 := v.Args[1]
  2894  	v_0 := v.Args[0]
  2895  	// match: (Mod64 [false] x y)
  2896  	// result: (I64RemS x y)
  2897  	for {
  2898  		if auxIntToBool(v.AuxInt) != false {
  2899  			break
  2900  		}
  2901  		x := v_0
  2902  		y := v_1
  2903  		v.reset(OpWasmI64RemS)
  2904  		v.AddArg2(x, y)
  2905  		return true
  2906  	}
  2907  	return false
  2908  }
  2909  func rewriteValueWasm_OpMod8(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: (Mod8 x y)
  2915  	// result: (I64RemS (SignExt8to64 x) (SignExt8to64 y))
  2916  	for {
  2917  		x := v_0
  2918  		y := v_1
  2919  		v.reset(OpWasmI64RemS)
  2920  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  2921  		v0.AddArg(x)
  2922  		v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  2923  		v1.AddArg(y)
  2924  		v.AddArg2(v0, v1)
  2925  		return true
  2926  	}
  2927  }
  2928  func rewriteValueWasm_OpMod8u(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: (Mod8u x y)
  2934  	// result: (I64RemU (ZeroExt8to64 x) (ZeroExt8to64 y))
  2935  	for {
  2936  		x := v_0
  2937  		y := v_1
  2938  		v.reset(OpWasmI64RemU)
  2939  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2940  		v0.AddArg(x)
  2941  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2942  		v1.AddArg(y)
  2943  		v.AddArg2(v0, v1)
  2944  		return true
  2945  	}
  2946  }
  2947  func rewriteValueWasm_OpMove(v *Value) bool {
  2948  	v_2 := v.Args[2]
  2949  	v_1 := v.Args[1]
  2950  	v_0 := v.Args[0]
  2951  	b := v.Block
  2952  	typ := &b.Func.Config.Types
  2953  	// match: (Move [0] _ _ mem)
  2954  	// result: mem
  2955  	for {
  2956  		if auxIntToInt64(v.AuxInt) != 0 {
  2957  			break
  2958  		}
  2959  		mem := v_2
  2960  		v.copyOf(mem)
  2961  		return true
  2962  	}
  2963  	// match: (Move [1] dst src mem)
  2964  	// result: (I64Store8 dst (I64Load8U src mem) mem)
  2965  	for {
  2966  		if auxIntToInt64(v.AuxInt) != 1 {
  2967  			break
  2968  		}
  2969  		dst := v_0
  2970  		src := v_1
  2971  		mem := v_2
  2972  		v.reset(OpWasmI64Store8)
  2973  		v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
  2974  		v0.AddArg2(src, mem)
  2975  		v.AddArg3(dst, v0, mem)
  2976  		return true
  2977  	}
  2978  	// match: (Move [2] dst src mem)
  2979  	// result: (I64Store16 dst (I64Load16U src mem) mem)
  2980  	for {
  2981  		if auxIntToInt64(v.AuxInt) != 2 {
  2982  			break
  2983  		}
  2984  		dst := v_0
  2985  		src := v_1
  2986  		mem := v_2
  2987  		v.reset(OpWasmI64Store16)
  2988  		v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
  2989  		v0.AddArg2(src, mem)
  2990  		v.AddArg3(dst, v0, mem)
  2991  		return true
  2992  	}
  2993  	// match: (Move [4] dst src mem)
  2994  	// result: (I64Store32 dst (I64Load32U src mem) mem)
  2995  	for {
  2996  		if auxIntToInt64(v.AuxInt) != 4 {
  2997  			break
  2998  		}
  2999  		dst := v_0
  3000  		src := v_1
  3001  		mem := v_2
  3002  		v.reset(OpWasmI64Store32)
  3003  		v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  3004  		v0.AddArg2(src, mem)
  3005  		v.AddArg3(dst, v0, mem)
  3006  		return true
  3007  	}
  3008  	// match: (Move [8] dst src mem)
  3009  	// result: (I64Store dst (I64Load src mem) mem)
  3010  	for {
  3011  		if auxIntToInt64(v.AuxInt) != 8 {
  3012  			break
  3013  		}
  3014  		dst := v_0
  3015  		src := v_1
  3016  		mem := v_2
  3017  		v.reset(OpWasmI64Store)
  3018  		v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  3019  		v0.AddArg2(src, mem)
  3020  		v.AddArg3(dst, v0, mem)
  3021  		return true
  3022  	}
  3023  	// match: (Move [16] dst src mem)
  3024  	// result: (I64Store [8] dst (I64Load [8] src mem) (I64Store dst (I64Load src mem) mem))
  3025  	for {
  3026  		if auxIntToInt64(v.AuxInt) != 16 {
  3027  			break
  3028  		}
  3029  		dst := v_0
  3030  		src := v_1
  3031  		mem := v_2
  3032  		v.reset(OpWasmI64Store)
  3033  		v.AuxInt = int64ToAuxInt(8)
  3034  		v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  3035  		v0.AuxInt = int64ToAuxInt(8)
  3036  		v0.AddArg2(src, mem)
  3037  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  3038  		v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  3039  		v2.AddArg2(src, mem)
  3040  		v1.AddArg3(dst, v2, mem)
  3041  		v.AddArg3(dst, v0, v1)
  3042  		return true
  3043  	}
  3044  	// match: (Move [3] dst src mem)
  3045  	// result: (I64Store8 [2] dst (I64Load8U [2] src mem) (I64Store16 dst (I64Load16U src mem) mem))
  3046  	for {
  3047  		if auxIntToInt64(v.AuxInt) != 3 {
  3048  			break
  3049  		}
  3050  		dst := v_0
  3051  		src := v_1
  3052  		mem := v_2
  3053  		v.reset(OpWasmI64Store8)
  3054  		v.AuxInt = int64ToAuxInt(2)
  3055  		v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
  3056  		v0.AuxInt = int64ToAuxInt(2)
  3057  		v0.AddArg2(src, mem)
  3058  		v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
  3059  		v2 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
  3060  		v2.AddArg2(src, mem)
  3061  		v1.AddArg3(dst, v2, mem)
  3062  		v.AddArg3(dst, v0, v1)
  3063  		return true
  3064  	}
  3065  	// match: (Move [5] dst src mem)
  3066  	// result: (I64Store8 [4] dst (I64Load8U [4] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  3067  	for {
  3068  		if auxIntToInt64(v.AuxInt) != 5 {
  3069  			break
  3070  		}
  3071  		dst := v_0
  3072  		src := v_1
  3073  		mem := v_2
  3074  		v.reset(OpWasmI64Store8)
  3075  		v.AuxInt = int64ToAuxInt(4)
  3076  		v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
  3077  		v0.AuxInt = int64ToAuxInt(4)
  3078  		v0.AddArg2(src, mem)
  3079  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  3080  		v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  3081  		v2.AddArg2(src, mem)
  3082  		v1.AddArg3(dst, v2, mem)
  3083  		v.AddArg3(dst, v0, v1)
  3084  		return true
  3085  	}
  3086  	// match: (Move [6] dst src mem)
  3087  	// result: (I64Store16 [4] dst (I64Load16U [4] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  3088  	for {
  3089  		if auxIntToInt64(v.AuxInt) != 6 {
  3090  			break
  3091  		}
  3092  		dst := v_0
  3093  		src := v_1
  3094  		mem := v_2
  3095  		v.reset(OpWasmI64Store16)
  3096  		v.AuxInt = int64ToAuxInt(4)
  3097  		v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
  3098  		v0.AuxInt = int64ToAuxInt(4)
  3099  		v0.AddArg2(src, mem)
  3100  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  3101  		v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  3102  		v2.AddArg2(src, mem)
  3103  		v1.AddArg3(dst, v2, mem)
  3104  		v.AddArg3(dst, v0, v1)
  3105  		return true
  3106  	}
  3107  	// match: (Move [7] dst src mem)
  3108  	// result: (I64Store32 [3] dst (I64Load32U [3] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  3109  	for {
  3110  		if auxIntToInt64(v.AuxInt) != 7 {
  3111  			break
  3112  		}
  3113  		dst := v_0
  3114  		src := v_1
  3115  		mem := v_2
  3116  		v.reset(OpWasmI64Store32)
  3117  		v.AuxInt = int64ToAuxInt(3)
  3118  		v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  3119  		v0.AuxInt = int64ToAuxInt(3)
  3120  		v0.AddArg2(src, mem)
  3121  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  3122  		v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
  3123  		v2.AddArg2(src, mem)
  3124  		v1.AddArg3(dst, v2, mem)
  3125  		v.AddArg3(dst, v0, v1)
  3126  		return true
  3127  	}
  3128  	// match: (Move [s] dst src mem)
  3129  	// cond: s > 8 && s < 16
  3130  	// result: (I64Store [s-8] dst (I64Load [s-8] src mem) (I64Store dst (I64Load src mem) mem))
  3131  	for {
  3132  		s := auxIntToInt64(v.AuxInt)
  3133  		dst := v_0
  3134  		src := v_1
  3135  		mem := v_2
  3136  		if !(s > 8 && s < 16) {
  3137  			break
  3138  		}
  3139  		v.reset(OpWasmI64Store)
  3140  		v.AuxInt = int64ToAuxInt(s - 8)
  3141  		v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  3142  		v0.AuxInt = int64ToAuxInt(s - 8)
  3143  		v0.AddArg2(src, mem)
  3144  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  3145  		v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
  3146  		v2.AddArg2(src, mem)
  3147  		v1.AddArg3(dst, v2, mem)
  3148  		v.AddArg3(dst, v0, v1)
  3149  		return true
  3150  	}
  3151  	// match: (Move [s] dst src mem)
  3152  	// cond: logLargeCopy(v, s)
  3153  	// result: (LoweredMove [s] dst src mem)
  3154  	for {
  3155  		s := auxIntToInt64(v.AuxInt)
  3156  		dst := v_0
  3157  		src := v_1
  3158  		mem := v_2
  3159  		if !(logLargeCopy(v, s)) {
  3160  			break
  3161  		}
  3162  		v.reset(OpWasmLoweredMove)
  3163  		v.AuxInt = int64ToAuxInt(s)
  3164  		v.AddArg3(dst, src, mem)
  3165  		return true
  3166  	}
  3167  	return false
  3168  }
  3169  func rewriteValueWasm_OpNeg16(v *Value) bool {
  3170  	v_0 := v.Args[0]
  3171  	b := v.Block
  3172  	typ := &b.Func.Config.Types
  3173  	// match: (Neg16 x)
  3174  	// result: (I64Sub (I64Const [0]) x)
  3175  	for {
  3176  		x := v_0
  3177  		v.reset(OpWasmI64Sub)
  3178  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3179  		v0.AuxInt = int64ToAuxInt(0)
  3180  		v.AddArg2(v0, x)
  3181  		return true
  3182  	}
  3183  }
  3184  func rewriteValueWasm_OpNeg32(v *Value) bool {
  3185  	v_0 := v.Args[0]
  3186  	b := v.Block
  3187  	typ := &b.Func.Config.Types
  3188  	// match: (Neg32 x)
  3189  	// result: (I64Sub (I64Const [0]) x)
  3190  	for {
  3191  		x := v_0
  3192  		v.reset(OpWasmI64Sub)
  3193  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3194  		v0.AuxInt = int64ToAuxInt(0)
  3195  		v.AddArg2(v0, x)
  3196  		return true
  3197  	}
  3198  }
  3199  func rewriteValueWasm_OpNeg64(v *Value) bool {
  3200  	v_0 := v.Args[0]
  3201  	b := v.Block
  3202  	typ := &b.Func.Config.Types
  3203  	// match: (Neg64 x)
  3204  	// result: (I64Sub (I64Const [0]) x)
  3205  	for {
  3206  		x := v_0
  3207  		v.reset(OpWasmI64Sub)
  3208  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3209  		v0.AuxInt = int64ToAuxInt(0)
  3210  		v.AddArg2(v0, x)
  3211  		return true
  3212  	}
  3213  }
  3214  func rewriteValueWasm_OpNeg8(v *Value) bool {
  3215  	v_0 := v.Args[0]
  3216  	b := v.Block
  3217  	typ := &b.Func.Config.Types
  3218  	// match: (Neg8 x)
  3219  	// result: (I64Sub (I64Const [0]) x)
  3220  	for {
  3221  		x := v_0
  3222  		v.reset(OpWasmI64Sub)
  3223  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3224  		v0.AuxInt = int64ToAuxInt(0)
  3225  		v.AddArg2(v0, x)
  3226  		return true
  3227  	}
  3228  }
  3229  func rewriteValueWasm_OpNeq16(v *Value) bool {
  3230  	v_1 := v.Args[1]
  3231  	v_0 := v.Args[0]
  3232  	b := v.Block
  3233  	typ := &b.Func.Config.Types
  3234  	// match: (Neq16 x y)
  3235  	// result: (I64Ne (ZeroExt16to64 x) (ZeroExt16to64 y))
  3236  	for {
  3237  		x := v_0
  3238  		y := v_1
  3239  		v.reset(OpWasmI64Ne)
  3240  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3241  		v0.AddArg(x)
  3242  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3243  		v1.AddArg(y)
  3244  		v.AddArg2(v0, v1)
  3245  		return true
  3246  	}
  3247  }
  3248  func rewriteValueWasm_OpNeq32(v *Value) bool {
  3249  	v_1 := v.Args[1]
  3250  	v_0 := v.Args[0]
  3251  	b := v.Block
  3252  	typ := &b.Func.Config.Types
  3253  	// match: (Neq32 x y)
  3254  	// result: (I64Ne (ZeroExt32to64 x) (ZeroExt32to64 y))
  3255  	for {
  3256  		x := v_0
  3257  		y := v_1
  3258  		v.reset(OpWasmI64Ne)
  3259  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3260  		v0.AddArg(x)
  3261  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3262  		v1.AddArg(y)
  3263  		v.AddArg2(v0, v1)
  3264  		return true
  3265  	}
  3266  }
  3267  func rewriteValueWasm_OpNeq8(v *Value) bool {
  3268  	v_1 := v.Args[1]
  3269  	v_0 := v.Args[0]
  3270  	b := v.Block
  3271  	typ := &b.Func.Config.Types
  3272  	// match: (Neq8 x y)
  3273  	// result: (I64Ne (ZeroExt8to64 x) (ZeroExt8to64 y))
  3274  	for {
  3275  		x := v_0
  3276  		y := v_1
  3277  		v.reset(OpWasmI64Ne)
  3278  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3279  		v0.AddArg(x)
  3280  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3281  		v1.AddArg(y)
  3282  		v.AddArg2(v0, v1)
  3283  		return true
  3284  	}
  3285  }
  3286  func rewriteValueWasm_OpPopCount16(v *Value) bool {
  3287  	v_0 := v.Args[0]
  3288  	b := v.Block
  3289  	typ := &b.Func.Config.Types
  3290  	// match: (PopCount16 x)
  3291  	// result: (I64Popcnt (ZeroExt16to64 x))
  3292  	for {
  3293  		x := v_0
  3294  		v.reset(OpWasmI64Popcnt)
  3295  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3296  		v0.AddArg(x)
  3297  		v.AddArg(v0)
  3298  		return true
  3299  	}
  3300  }
  3301  func rewriteValueWasm_OpPopCount32(v *Value) bool {
  3302  	v_0 := v.Args[0]
  3303  	b := v.Block
  3304  	typ := &b.Func.Config.Types
  3305  	// match: (PopCount32 x)
  3306  	// result: (I64Popcnt (ZeroExt32to64 x))
  3307  	for {
  3308  		x := v_0
  3309  		v.reset(OpWasmI64Popcnt)
  3310  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3311  		v0.AddArg(x)
  3312  		v.AddArg(v0)
  3313  		return true
  3314  	}
  3315  }
  3316  func rewriteValueWasm_OpPopCount8(v *Value) bool {
  3317  	v_0 := v.Args[0]
  3318  	b := v.Block
  3319  	typ := &b.Func.Config.Types
  3320  	// match: (PopCount8 x)
  3321  	// result: (I64Popcnt (ZeroExt8to64 x))
  3322  	for {
  3323  		x := v_0
  3324  		v.reset(OpWasmI64Popcnt)
  3325  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3326  		v0.AddArg(x)
  3327  		v.AddArg(v0)
  3328  		return true
  3329  	}
  3330  }
  3331  func rewriteValueWasm_OpRotateAllLeftVarInt16x8(v *Value) bool {
  3332  	v_1 := v.Args[1]
  3333  	v_0 := v.Args[0]
  3334  	b := v.Block
  3335  	typ := &b.Func.Config.Types
  3336  	// match: (RotateAllLeftVarInt16x8 x y)
  3337  	// result: (V128Or (I16x8Shl x y) (I16x8ShrU x (I64Sub (I64Const [16]) y)))
  3338  	for {
  3339  		x := v_0
  3340  		y := v_1
  3341  		v.reset(OpWasmV128Or)
  3342  		v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
  3343  		v0.AddArg2(x, y)
  3344  		v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
  3345  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3346  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3347  		v3.AuxInt = int64ToAuxInt(16)
  3348  		v2.AddArg2(v3, y)
  3349  		v1.AddArg2(x, v2)
  3350  		v.AddArg2(v0, v1)
  3351  		return true
  3352  	}
  3353  }
  3354  func rewriteValueWasm_OpRotateAllLeftVarInt32x4(v *Value) bool {
  3355  	v_1 := v.Args[1]
  3356  	v_0 := v.Args[0]
  3357  	b := v.Block
  3358  	typ := &b.Func.Config.Types
  3359  	// match: (RotateAllLeftVarInt32x4 x y)
  3360  	// result: (V128Or (I32x4Shl x y) (I32x4ShrU x (I64Sub (I64Const [32]) y)))
  3361  	for {
  3362  		x := v_0
  3363  		y := v_1
  3364  		v.reset(OpWasmV128Or)
  3365  		v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
  3366  		v0.AddArg2(x, y)
  3367  		v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
  3368  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3369  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3370  		v3.AuxInt = int64ToAuxInt(32)
  3371  		v2.AddArg2(v3, y)
  3372  		v1.AddArg2(x, v2)
  3373  		v.AddArg2(v0, v1)
  3374  		return true
  3375  	}
  3376  }
  3377  func rewriteValueWasm_OpRotateAllLeftVarInt64x2(v *Value) bool {
  3378  	v_1 := v.Args[1]
  3379  	v_0 := v.Args[0]
  3380  	b := v.Block
  3381  	typ := &b.Func.Config.Types
  3382  	// match: (RotateAllLeftVarInt64x2 x y)
  3383  	// result: (V128Or (I64x2Shl x y) (I64x2ShrU x (I64Sub (I64Const [64]) y)))
  3384  	for {
  3385  		x := v_0
  3386  		y := v_1
  3387  		v.reset(OpWasmV128Or)
  3388  		v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
  3389  		v0.AddArg2(x, y)
  3390  		v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
  3391  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3392  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3393  		v3.AuxInt = int64ToAuxInt(64)
  3394  		v2.AddArg2(v3, y)
  3395  		v1.AddArg2(x, v2)
  3396  		v.AddArg2(v0, v1)
  3397  		return true
  3398  	}
  3399  }
  3400  func rewriteValueWasm_OpRotateAllLeftVarInt8x16(v *Value) bool {
  3401  	v_1 := v.Args[1]
  3402  	v_0 := v.Args[0]
  3403  	b := v.Block
  3404  	typ := &b.Func.Config.Types
  3405  	// match: (RotateAllLeftVarInt8x16 x y)
  3406  	// result: (V128Or (I8x16Shl x y) (I8x16ShrU x (I64Sub (I64Const [8]) y)))
  3407  	for {
  3408  		x := v_0
  3409  		y := v_1
  3410  		v.reset(OpWasmV128Or)
  3411  		v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
  3412  		v0.AddArg2(x, y)
  3413  		v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
  3414  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3415  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3416  		v3.AuxInt = int64ToAuxInt(8)
  3417  		v2.AddArg2(v3, y)
  3418  		v1.AddArg2(x, v2)
  3419  		v.AddArg2(v0, v1)
  3420  		return true
  3421  	}
  3422  }
  3423  func rewriteValueWasm_OpRotateAllLeftVarUint16x8(v *Value) bool {
  3424  	v_1 := v.Args[1]
  3425  	v_0 := v.Args[0]
  3426  	b := v.Block
  3427  	typ := &b.Func.Config.Types
  3428  	// match: (RotateAllLeftVarUint16x8 x y)
  3429  	// result: (V128Or (I16x8Shl x y) (I16x8ShrU x (I64Sub (I64Const [16]) y)))
  3430  	for {
  3431  		x := v_0
  3432  		y := v_1
  3433  		v.reset(OpWasmV128Or)
  3434  		v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
  3435  		v0.AddArg2(x, y)
  3436  		v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
  3437  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3438  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3439  		v3.AuxInt = int64ToAuxInt(16)
  3440  		v2.AddArg2(v3, y)
  3441  		v1.AddArg2(x, v2)
  3442  		v.AddArg2(v0, v1)
  3443  		return true
  3444  	}
  3445  }
  3446  func rewriteValueWasm_OpRotateAllLeftVarUint32x4(v *Value) bool {
  3447  	v_1 := v.Args[1]
  3448  	v_0 := v.Args[0]
  3449  	b := v.Block
  3450  	typ := &b.Func.Config.Types
  3451  	// match: (RotateAllLeftVarUint32x4 x y)
  3452  	// result: (V128Or (I32x4Shl x y) (I32x4ShrU x (I64Sub (I64Const [32]) y)))
  3453  	for {
  3454  		x := v_0
  3455  		y := v_1
  3456  		v.reset(OpWasmV128Or)
  3457  		v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
  3458  		v0.AddArg2(x, y)
  3459  		v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
  3460  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3461  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3462  		v3.AuxInt = int64ToAuxInt(32)
  3463  		v2.AddArg2(v3, y)
  3464  		v1.AddArg2(x, v2)
  3465  		v.AddArg2(v0, v1)
  3466  		return true
  3467  	}
  3468  }
  3469  func rewriteValueWasm_OpRotateAllLeftVarUint64x2(v *Value) bool {
  3470  	v_1 := v.Args[1]
  3471  	v_0 := v.Args[0]
  3472  	b := v.Block
  3473  	typ := &b.Func.Config.Types
  3474  	// match: (RotateAllLeftVarUint64x2 x y)
  3475  	// result: (V128Or (I64x2Shl x y) (I64x2ShrU x (I64Sub (I64Const [64]) y)))
  3476  	for {
  3477  		x := v_0
  3478  		y := v_1
  3479  		v.reset(OpWasmV128Or)
  3480  		v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
  3481  		v0.AddArg2(x, y)
  3482  		v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
  3483  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3484  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3485  		v3.AuxInt = int64ToAuxInt(64)
  3486  		v2.AddArg2(v3, y)
  3487  		v1.AddArg2(x, v2)
  3488  		v.AddArg2(v0, v1)
  3489  		return true
  3490  	}
  3491  }
  3492  func rewriteValueWasm_OpRotateAllLeftVarUint8x16(v *Value) bool {
  3493  	v_1 := v.Args[1]
  3494  	v_0 := v.Args[0]
  3495  	b := v.Block
  3496  	typ := &b.Func.Config.Types
  3497  	// match: (RotateAllLeftVarUint8x16 x y)
  3498  	// result: (V128Or (I8x16Shl x y) (I8x16ShrU x (I64Sub (I64Const [8]) y)))
  3499  	for {
  3500  		x := v_0
  3501  		y := v_1
  3502  		v.reset(OpWasmV128Or)
  3503  		v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
  3504  		v0.AddArg2(x, y)
  3505  		v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
  3506  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3507  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3508  		v3.AuxInt = int64ToAuxInt(8)
  3509  		v2.AddArg2(v3, y)
  3510  		v1.AddArg2(x, v2)
  3511  		v.AddArg2(v0, v1)
  3512  		return true
  3513  	}
  3514  }
  3515  func rewriteValueWasm_OpRotateAllRightVarInt16x8(v *Value) bool {
  3516  	v_1 := v.Args[1]
  3517  	v_0 := v.Args[0]
  3518  	b := v.Block
  3519  	typ := &b.Func.Config.Types
  3520  	// match: (RotateAllRightVarInt16x8 x y)
  3521  	// result: (V128Or (I16x8ShrU x y) (I16x8Shl x (I64Sub (I64Const [16]) y)))
  3522  	for {
  3523  		x := v_0
  3524  		y := v_1
  3525  		v.reset(OpWasmV128Or)
  3526  		v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
  3527  		v0.AddArg2(x, y)
  3528  		v1 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
  3529  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3530  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3531  		v3.AuxInt = int64ToAuxInt(16)
  3532  		v2.AddArg2(v3, y)
  3533  		v1.AddArg2(x, v2)
  3534  		v.AddArg2(v0, v1)
  3535  		return true
  3536  	}
  3537  }
  3538  func rewriteValueWasm_OpRotateAllRightVarInt32x4(v *Value) bool {
  3539  	v_1 := v.Args[1]
  3540  	v_0 := v.Args[0]
  3541  	b := v.Block
  3542  	typ := &b.Func.Config.Types
  3543  	// match: (RotateAllRightVarInt32x4 x y)
  3544  	// result: (V128Or (I32x4ShrU x y) (I32x4Shl x (I64Sub (I64Const [32]) y)))
  3545  	for {
  3546  		x := v_0
  3547  		y := v_1
  3548  		v.reset(OpWasmV128Or)
  3549  		v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
  3550  		v0.AddArg2(x, y)
  3551  		v1 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
  3552  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3553  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3554  		v3.AuxInt = int64ToAuxInt(32)
  3555  		v2.AddArg2(v3, y)
  3556  		v1.AddArg2(x, v2)
  3557  		v.AddArg2(v0, v1)
  3558  		return true
  3559  	}
  3560  }
  3561  func rewriteValueWasm_OpRotateAllRightVarInt64x2(v *Value) bool {
  3562  	v_1 := v.Args[1]
  3563  	v_0 := v.Args[0]
  3564  	b := v.Block
  3565  	typ := &b.Func.Config.Types
  3566  	// match: (RotateAllRightVarInt64x2 x y)
  3567  	// result: (V128Or (I64x2ShrU x y) (I64x2Shl x (I64Sub (I64Const [64]) y)))
  3568  	for {
  3569  		x := v_0
  3570  		y := v_1
  3571  		v.reset(OpWasmV128Or)
  3572  		v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
  3573  		v0.AddArg2(x, y)
  3574  		v1 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
  3575  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3576  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3577  		v3.AuxInt = int64ToAuxInt(64)
  3578  		v2.AddArg2(v3, y)
  3579  		v1.AddArg2(x, v2)
  3580  		v.AddArg2(v0, v1)
  3581  		return true
  3582  	}
  3583  }
  3584  func rewriteValueWasm_OpRotateAllRightVarInt8x16(v *Value) bool {
  3585  	v_1 := v.Args[1]
  3586  	v_0 := v.Args[0]
  3587  	b := v.Block
  3588  	typ := &b.Func.Config.Types
  3589  	// match: (RotateAllRightVarInt8x16 x y)
  3590  	// result: (V128Or (I8x16ShrU x y) (I8x16Shl x (I64Sub (I64Const [8]) y)))
  3591  	for {
  3592  		x := v_0
  3593  		y := v_1
  3594  		v.reset(OpWasmV128Or)
  3595  		v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
  3596  		v0.AddArg2(x, y)
  3597  		v1 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
  3598  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3599  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3600  		v3.AuxInt = int64ToAuxInt(8)
  3601  		v2.AddArg2(v3, y)
  3602  		v1.AddArg2(x, v2)
  3603  		v.AddArg2(v0, v1)
  3604  		return true
  3605  	}
  3606  }
  3607  func rewriteValueWasm_OpRotateAllRightVarUint16x8(v *Value) bool {
  3608  	v_1 := v.Args[1]
  3609  	v_0 := v.Args[0]
  3610  	b := v.Block
  3611  	typ := &b.Func.Config.Types
  3612  	// match: (RotateAllRightVarUint16x8 x y)
  3613  	// result: (V128Or (I16x8ShrU x y) (I16x8Shl x (I64Sub (I64Const [16]) y)))
  3614  	for {
  3615  		x := v_0
  3616  		y := v_1
  3617  		v.reset(OpWasmV128Or)
  3618  		v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
  3619  		v0.AddArg2(x, y)
  3620  		v1 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
  3621  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3622  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3623  		v3.AuxInt = int64ToAuxInt(16)
  3624  		v2.AddArg2(v3, y)
  3625  		v1.AddArg2(x, v2)
  3626  		v.AddArg2(v0, v1)
  3627  		return true
  3628  	}
  3629  }
  3630  func rewriteValueWasm_OpRotateAllRightVarUint32x4(v *Value) bool {
  3631  	v_1 := v.Args[1]
  3632  	v_0 := v.Args[0]
  3633  	b := v.Block
  3634  	typ := &b.Func.Config.Types
  3635  	// match: (RotateAllRightVarUint32x4 x y)
  3636  	// result: (V128Or (I32x4ShrU x y) (I32x4Shl x (I64Sub (I64Const [32]) y)))
  3637  	for {
  3638  		x := v_0
  3639  		y := v_1
  3640  		v.reset(OpWasmV128Or)
  3641  		v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
  3642  		v0.AddArg2(x, y)
  3643  		v1 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
  3644  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3645  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3646  		v3.AuxInt = int64ToAuxInt(32)
  3647  		v2.AddArg2(v3, y)
  3648  		v1.AddArg2(x, v2)
  3649  		v.AddArg2(v0, v1)
  3650  		return true
  3651  	}
  3652  }
  3653  func rewriteValueWasm_OpRotateAllRightVarUint64x2(v *Value) bool {
  3654  	v_1 := v.Args[1]
  3655  	v_0 := v.Args[0]
  3656  	b := v.Block
  3657  	typ := &b.Func.Config.Types
  3658  	// match: (RotateAllRightVarUint64x2 x y)
  3659  	// result: (V128Or (I64x2ShrU x y) (I64x2Shl x (I64Sub (I64Const [64]) y)))
  3660  	for {
  3661  		x := v_0
  3662  		y := v_1
  3663  		v.reset(OpWasmV128Or)
  3664  		v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
  3665  		v0.AddArg2(x, y)
  3666  		v1 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
  3667  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3668  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3669  		v3.AuxInt = int64ToAuxInt(64)
  3670  		v2.AddArg2(v3, y)
  3671  		v1.AddArg2(x, v2)
  3672  		v.AddArg2(v0, v1)
  3673  		return true
  3674  	}
  3675  }
  3676  func rewriteValueWasm_OpRotateAllRightVarUint8x16(v *Value) bool {
  3677  	v_1 := v.Args[1]
  3678  	v_0 := v.Args[0]
  3679  	b := v.Block
  3680  	typ := &b.Func.Config.Types
  3681  	// match: (RotateAllRightVarUint8x16 x y)
  3682  	// result: (V128Or (I8x16ShrU x y) (I8x16Shl x (I64Sub (I64Const [8]) y)))
  3683  	for {
  3684  		x := v_0
  3685  		y := v_1
  3686  		v.reset(OpWasmV128Or)
  3687  		v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
  3688  		v0.AddArg2(x, y)
  3689  		v1 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
  3690  		v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  3691  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3692  		v3.AuxInt = int64ToAuxInt(8)
  3693  		v2.AddArg2(v3, y)
  3694  		v1.AddArg2(x, v2)
  3695  		v.AddArg2(v0, v1)
  3696  		return true
  3697  	}
  3698  }
  3699  func rewriteValueWasm_OpRotateLeft16(v *Value) bool {
  3700  	v_1 := v.Args[1]
  3701  	v_0 := v.Args[0]
  3702  	b := v.Block
  3703  	typ := &b.Func.Config.Types
  3704  	// match: (RotateLeft16 <t> x (I64Const [c]))
  3705  	// result: (Or16 (Lsh16x64 <t> x (I64Const [c&15])) (Rsh16Ux64 <t> x (I64Const [-c&15])))
  3706  	for {
  3707  		t := v.Type
  3708  		x := v_0
  3709  		if v_1.Op != OpWasmI64Const {
  3710  			break
  3711  		}
  3712  		c := auxIntToInt64(v_1.AuxInt)
  3713  		v.reset(OpOr16)
  3714  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
  3715  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3716  		v1.AuxInt = int64ToAuxInt(c & 15)
  3717  		v0.AddArg2(x, v1)
  3718  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  3719  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3720  		v3.AuxInt = int64ToAuxInt(-c & 15)
  3721  		v2.AddArg2(x, v3)
  3722  		v.AddArg2(v0, v2)
  3723  		return true
  3724  	}
  3725  	return false
  3726  }
  3727  func rewriteValueWasm_OpRotateLeft8(v *Value) bool {
  3728  	v_1 := v.Args[1]
  3729  	v_0 := v.Args[0]
  3730  	b := v.Block
  3731  	typ := &b.Func.Config.Types
  3732  	// match: (RotateLeft8 <t> x (I64Const [c]))
  3733  	// result: (Or8 (Lsh8x64 <t> x (I64Const [c&7])) (Rsh8Ux64 <t> x (I64Const [-c&7])))
  3734  	for {
  3735  		t := v.Type
  3736  		x := v_0
  3737  		if v_1.Op != OpWasmI64Const {
  3738  			break
  3739  		}
  3740  		c := auxIntToInt64(v_1.AuxInt)
  3741  		v.reset(OpOr8)
  3742  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
  3743  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3744  		v1.AuxInt = int64ToAuxInt(c & 7)
  3745  		v0.AddArg2(x, v1)
  3746  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
  3747  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  3748  		v3.AuxInt = int64ToAuxInt(-c & 7)
  3749  		v2.AddArg2(x, v3)
  3750  		v.AddArg2(v0, v2)
  3751  		return true
  3752  	}
  3753  	return false
  3754  }
  3755  func rewriteValueWasm_OpRsh16Ux16(v *Value) bool {
  3756  	v_1 := v.Args[1]
  3757  	v_0 := v.Args[0]
  3758  	b := v.Block
  3759  	typ := &b.Func.Config.Types
  3760  	// match: (Rsh16Ux16 [c] x y)
  3761  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt16to64 y))
  3762  	for {
  3763  		c := auxIntToBool(v.AuxInt)
  3764  		x := v_0
  3765  		y := v_1
  3766  		v.reset(OpRsh64Ux64)
  3767  		v.AuxInt = boolToAuxInt(c)
  3768  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3769  		v0.AddArg(x)
  3770  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3771  		v1.AddArg(y)
  3772  		v.AddArg2(v0, v1)
  3773  		return true
  3774  	}
  3775  }
  3776  func rewriteValueWasm_OpRsh16Ux32(v *Value) bool {
  3777  	v_1 := v.Args[1]
  3778  	v_0 := v.Args[0]
  3779  	b := v.Block
  3780  	typ := &b.Func.Config.Types
  3781  	// match: (Rsh16Ux32 [c] x y)
  3782  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt32to64 y))
  3783  	for {
  3784  		c := auxIntToBool(v.AuxInt)
  3785  		x := v_0
  3786  		y := v_1
  3787  		v.reset(OpRsh64Ux64)
  3788  		v.AuxInt = boolToAuxInt(c)
  3789  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3790  		v0.AddArg(x)
  3791  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3792  		v1.AddArg(y)
  3793  		v.AddArg2(v0, v1)
  3794  		return true
  3795  	}
  3796  }
  3797  func rewriteValueWasm_OpRsh16Ux64(v *Value) bool {
  3798  	v_1 := v.Args[1]
  3799  	v_0 := v.Args[0]
  3800  	b := v.Block
  3801  	typ := &b.Func.Config.Types
  3802  	// match: (Rsh16Ux64 [c] x y)
  3803  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) y)
  3804  	for {
  3805  		c := auxIntToBool(v.AuxInt)
  3806  		x := v_0
  3807  		y := v_1
  3808  		v.reset(OpRsh64Ux64)
  3809  		v.AuxInt = boolToAuxInt(c)
  3810  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3811  		v0.AddArg(x)
  3812  		v.AddArg2(v0, y)
  3813  		return true
  3814  	}
  3815  }
  3816  func rewriteValueWasm_OpRsh16Ux8(v *Value) bool {
  3817  	v_1 := v.Args[1]
  3818  	v_0 := v.Args[0]
  3819  	b := v.Block
  3820  	typ := &b.Func.Config.Types
  3821  	// match: (Rsh16Ux8 [c] x y)
  3822  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt8to64 y))
  3823  	for {
  3824  		c := auxIntToBool(v.AuxInt)
  3825  		x := v_0
  3826  		y := v_1
  3827  		v.reset(OpRsh64Ux64)
  3828  		v.AuxInt = boolToAuxInt(c)
  3829  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3830  		v0.AddArg(x)
  3831  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3832  		v1.AddArg(y)
  3833  		v.AddArg2(v0, v1)
  3834  		return true
  3835  	}
  3836  }
  3837  func rewriteValueWasm_OpRsh16x16(v *Value) bool {
  3838  	v_1 := v.Args[1]
  3839  	v_0 := v.Args[0]
  3840  	b := v.Block
  3841  	typ := &b.Func.Config.Types
  3842  	// match: (Rsh16x16 [c] x y)
  3843  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt16to64 y))
  3844  	for {
  3845  		c := auxIntToBool(v.AuxInt)
  3846  		x := v_0
  3847  		y := v_1
  3848  		v.reset(OpRsh64x64)
  3849  		v.AuxInt = boolToAuxInt(c)
  3850  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  3851  		v0.AddArg(x)
  3852  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3853  		v1.AddArg(y)
  3854  		v.AddArg2(v0, v1)
  3855  		return true
  3856  	}
  3857  }
  3858  func rewriteValueWasm_OpRsh16x32(v *Value) bool {
  3859  	v_1 := v.Args[1]
  3860  	v_0 := v.Args[0]
  3861  	b := v.Block
  3862  	typ := &b.Func.Config.Types
  3863  	// match: (Rsh16x32 [c] x y)
  3864  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt32to64 y))
  3865  	for {
  3866  		c := auxIntToBool(v.AuxInt)
  3867  		x := v_0
  3868  		y := v_1
  3869  		v.reset(OpRsh64x64)
  3870  		v.AuxInt = boolToAuxInt(c)
  3871  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  3872  		v0.AddArg(x)
  3873  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3874  		v1.AddArg(y)
  3875  		v.AddArg2(v0, v1)
  3876  		return true
  3877  	}
  3878  }
  3879  func rewriteValueWasm_OpRsh16x64(v *Value) bool {
  3880  	v_1 := v.Args[1]
  3881  	v_0 := v.Args[0]
  3882  	b := v.Block
  3883  	typ := &b.Func.Config.Types
  3884  	// match: (Rsh16x64 [c] x y)
  3885  	// result: (Rsh64x64 [c] (SignExt16to64 x) y)
  3886  	for {
  3887  		c := auxIntToBool(v.AuxInt)
  3888  		x := v_0
  3889  		y := v_1
  3890  		v.reset(OpRsh64x64)
  3891  		v.AuxInt = boolToAuxInt(c)
  3892  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  3893  		v0.AddArg(x)
  3894  		v.AddArg2(v0, y)
  3895  		return true
  3896  	}
  3897  }
  3898  func rewriteValueWasm_OpRsh16x8(v *Value) bool {
  3899  	v_1 := v.Args[1]
  3900  	v_0 := v.Args[0]
  3901  	b := v.Block
  3902  	typ := &b.Func.Config.Types
  3903  	// match: (Rsh16x8 [c] x y)
  3904  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt8to64 y))
  3905  	for {
  3906  		c := auxIntToBool(v.AuxInt)
  3907  		x := v_0
  3908  		y := v_1
  3909  		v.reset(OpRsh64x64)
  3910  		v.AuxInt = boolToAuxInt(c)
  3911  		v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
  3912  		v0.AddArg(x)
  3913  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3914  		v1.AddArg(y)
  3915  		v.AddArg2(v0, v1)
  3916  		return true
  3917  	}
  3918  }
  3919  func rewriteValueWasm_OpRsh32Ux16(v *Value) bool {
  3920  	v_1 := v.Args[1]
  3921  	v_0 := v.Args[0]
  3922  	b := v.Block
  3923  	typ := &b.Func.Config.Types
  3924  	// match: (Rsh32Ux16 [c] x y)
  3925  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt16to64 y))
  3926  	for {
  3927  		c := auxIntToBool(v.AuxInt)
  3928  		x := v_0
  3929  		y := v_1
  3930  		v.reset(OpRsh64Ux64)
  3931  		v.AuxInt = boolToAuxInt(c)
  3932  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3933  		v0.AddArg(x)
  3934  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3935  		v1.AddArg(y)
  3936  		v.AddArg2(v0, v1)
  3937  		return true
  3938  	}
  3939  }
  3940  func rewriteValueWasm_OpRsh32Ux32(v *Value) bool {
  3941  	v_1 := v.Args[1]
  3942  	v_0 := v.Args[0]
  3943  	b := v.Block
  3944  	typ := &b.Func.Config.Types
  3945  	// match: (Rsh32Ux32 [c] x y)
  3946  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt32to64 y))
  3947  	for {
  3948  		c := auxIntToBool(v.AuxInt)
  3949  		x := v_0
  3950  		y := v_1
  3951  		v.reset(OpRsh64Ux64)
  3952  		v.AuxInt = boolToAuxInt(c)
  3953  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3954  		v0.AddArg(x)
  3955  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3956  		v1.AddArg(y)
  3957  		v.AddArg2(v0, v1)
  3958  		return true
  3959  	}
  3960  }
  3961  func rewriteValueWasm_OpRsh32Ux64(v *Value) bool {
  3962  	v_1 := v.Args[1]
  3963  	v_0 := v.Args[0]
  3964  	b := v.Block
  3965  	typ := &b.Func.Config.Types
  3966  	// match: (Rsh32Ux64 [c] x y)
  3967  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) y)
  3968  	for {
  3969  		c := auxIntToBool(v.AuxInt)
  3970  		x := v_0
  3971  		y := v_1
  3972  		v.reset(OpRsh64Ux64)
  3973  		v.AuxInt = boolToAuxInt(c)
  3974  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3975  		v0.AddArg(x)
  3976  		v.AddArg2(v0, y)
  3977  		return true
  3978  	}
  3979  }
  3980  func rewriteValueWasm_OpRsh32Ux8(v *Value) bool {
  3981  	v_1 := v.Args[1]
  3982  	v_0 := v.Args[0]
  3983  	b := v.Block
  3984  	typ := &b.Func.Config.Types
  3985  	// match: (Rsh32Ux8 [c] x y)
  3986  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt8to64 y))
  3987  	for {
  3988  		c := auxIntToBool(v.AuxInt)
  3989  		x := v_0
  3990  		y := v_1
  3991  		v.reset(OpRsh64Ux64)
  3992  		v.AuxInt = boolToAuxInt(c)
  3993  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3994  		v0.AddArg(x)
  3995  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3996  		v1.AddArg(y)
  3997  		v.AddArg2(v0, v1)
  3998  		return true
  3999  	}
  4000  }
  4001  func rewriteValueWasm_OpRsh32x16(v *Value) bool {
  4002  	v_1 := v.Args[1]
  4003  	v_0 := v.Args[0]
  4004  	b := v.Block
  4005  	typ := &b.Func.Config.Types
  4006  	// match: (Rsh32x16 [c] x y)
  4007  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt16to64 y))
  4008  	for {
  4009  		c := auxIntToBool(v.AuxInt)
  4010  		x := v_0
  4011  		y := v_1
  4012  		v.reset(OpRsh64x64)
  4013  		v.AuxInt = boolToAuxInt(c)
  4014  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  4015  		v0.AddArg(x)
  4016  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  4017  		v1.AddArg(y)
  4018  		v.AddArg2(v0, v1)
  4019  		return true
  4020  	}
  4021  }
  4022  func rewriteValueWasm_OpRsh32x32(v *Value) bool {
  4023  	v_1 := v.Args[1]
  4024  	v_0 := v.Args[0]
  4025  	b := v.Block
  4026  	typ := &b.Func.Config.Types
  4027  	// match: (Rsh32x32 [c] x y)
  4028  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt32to64 y))
  4029  	for {
  4030  		c := auxIntToBool(v.AuxInt)
  4031  		x := v_0
  4032  		y := v_1
  4033  		v.reset(OpRsh64x64)
  4034  		v.AuxInt = boolToAuxInt(c)
  4035  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  4036  		v0.AddArg(x)
  4037  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4038  		v1.AddArg(y)
  4039  		v.AddArg2(v0, v1)
  4040  		return true
  4041  	}
  4042  }
  4043  func rewriteValueWasm_OpRsh32x64(v *Value) bool {
  4044  	v_1 := v.Args[1]
  4045  	v_0 := v.Args[0]
  4046  	b := v.Block
  4047  	typ := &b.Func.Config.Types
  4048  	// match: (Rsh32x64 [c] x y)
  4049  	// result: (Rsh64x64 [c] (SignExt32to64 x) y)
  4050  	for {
  4051  		c := auxIntToBool(v.AuxInt)
  4052  		x := v_0
  4053  		y := v_1
  4054  		v.reset(OpRsh64x64)
  4055  		v.AuxInt = boolToAuxInt(c)
  4056  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  4057  		v0.AddArg(x)
  4058  		v.AddArg2(v0, y)
  4059  		return true
  4060  	}
  4061  }
  4062  func rewriteValueWasm_OpRsh32x8(v *Value) bool {
  4063  	v_1 := v.Args[1]
  4064  	v_0 := v.Args[0]
  4065  	b := v.Block
  4066  	typ := &b.Func.Config.Types
  4067  	// match: (Rsh32x8 [c] x y)
  4068  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt8to64 y))
  4069  	for {
  4070  		c := auxIntToBool(v.AuxInt)
  4071  		x := v_0
  4072  		y := v_1
  4073  		v.reset(OpRsh64x64)
  4074  		v.AuxInt = boolToAuxInt(c)
  4075  		v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  4076  		v0.AddArg(x)
  4077  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4078  		v1.AddArg(y)
  4079  		v.AddArg2(v0, v1)
  4080  		return true
  4081  	}
  4082  }
  4083  func rewriteValueWasm_OpRsh64Ux16(v *Value) bool {
  4084  	v_1 := v.Args[1]
  4085  	v_0 := v.Args[0]
  4086  	b := v.Block
  4087  	typ := &b.Func.Config.Types
  4088  	// match: (Rsh64Ux16 [c] x y)
  4089  	// result: (Rsh64Ux64 [c] x (ZeroExt16to64 y))
  4090  	for {
  4091  		c := auxIntToBool(v.AuxInt)
  4092  		x := v_0
  4093  		y := v_1
  4094  		v.reset(OpRsh64Ux64)
  4095  		v.AuxInt = boolToAuxInt(c)
  4096  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  4097  		v0.AddArg(y)
  4098  		v.AddArg2(x, v0)
  4099  		return true
  4100  	}
  4101  }
  4102  func rewriteValueWasm_OpRsh64Ux32(v *Value) bool {
  4103  	v_1 := v.Args[1]
  4104  	v_0 := v.Args[0]
  4105  	b := v.Block
  4106  	typ := &b.Func.Config.Types
  4107  	// match: (Rsh64Ux32 [c] x y)
  4108  	// result: (Rsh64Ux64 [c] x (ZeroExt32to64 y))
  4109  	for {
  4110  		c := auxIntToBool(v.AuxInt)
  4111  		x := v_0
  4112  		y := v_1
  4113  		v.reset(OpRsh64Ux64)
  4114  		v.AuxInt = boolToAuxInt(c)
  4115  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4116  		v0.AddArg(y)
  4117  		v.AddArg2(x, v0)
  4118  		return true
  4119  	}
  4120  }
  4121  func rewriteValueWasm_OpRsh64Ux64(v *Value) bool {
  4122  	v_1 := v.Args[1]
  4123  	v_0 := v.Args[0]
  4124  	b := v.Block
  4125  	typ := &b.Func.Config.Types
  4126  	// match: (Rsh64Ux64 x y)
  4127  	// cond: shiftIsBounded(v)
  4128  	// result: (I64ShrU x y)
  4129  	for {
  4130  		x := v_0
  4131  		y := v_1
  4132  		if !(shiftIsBounded(v)) {
  4133  			break
  4134  		}
  4135  		v.reset(OpWasmI64ShrU)
  4136  		v.AddArg2(x, y)
  4137  		return true
  4138  	}
  4139  	// match: (Rsh64Ux64 x (I64Const [c]))
  4140  	// cond: uint64(c) < 64
  4141  	// result: (I64ShrU x (I64Const [c]))
  4142  	for {
  4143  		x := v_0
  4144  		if v_1.Op != OpWasmI64Const {
  4145  			break
  4146  		}
  4147  		c := auxIntToInt64(v_1.AuxInt)
  4148  		if !(uint64(c) < 64) {
  4149  			break
  4150  		}
  4151  		v.reset(OpWasmI64ShrU)
  4152  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4153  		v0.AuxInt = int64ToAuxInt(c)
  4154  		v.AddArg2(x, v0)
  4155  		return true
  4156  	}
  4157  	// match: (Rsh64Ux64 x (I64Const [c]))
  4158  	// cond: uint64(c) >= 64
  4159  	// result: (I64Const [0])
  4160  	for {
  4161  		if v_1.Op != OpWasmI64Const {
  4162  			break
  4163  		}
  4164  		c := auxIntToInt64(v_1.AuxInt)
  4165  		if !(uint64(c) >= 64) {
  4166  			break
  4167  		}
  4168  		v.reset(OpWasmI64Const)
  4169  		v.AuxInt = int64ToAuxInt(0)
  4170  		return true
  4171  	}
  4172  	// match: (Rsh64Ux64 x y)
  4173  	// result: (Select (I64ShrU x y) (I64Const [0]) (I64LtU y (I64Const [64])))
  4174  	for {
  4175  		x := v_0
  4176  		y := v_1
  4177  		v.reset(OpWasmSelect)
  4178  		v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
  4179  		v0.AddArg2(x, y)
  4180  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4181  		v1.AuxInt = int64ToAuxInt(0)
  4182  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4183  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4184  		v3.AuxInt = int64ToAuxInt(64)
  4185  		v2.AddArg2(y, v3)
  4186  		v.AddArg3(v0, v1, v2)
  4187  		return true
  4188  	}
  4189  }
  4190  func rewriteValueWasm_OpRsh64Ux8(v *Value) bool {
  4191  	v_1 := v.Args[1]
  4192  	v_0 := v.Args[0]
  4193  	b := v.Block
  4194  	typ := &b.Func.Config.Types
  4195  	// match: (Rsh64Ux8 [c] x y)
  4196  	// result: (Rsh64Ux64 [c] x (ZeroExt8to64 y))
  4197  	for {
  4198  		c := auxIntToBool(v.AuxInt)
  4199  		x := v_0
  4200  		y := v_1
  4201  		v.reset(OpRsh64Ux64)
  4202  		v.AuxInt = boolToAuxInt(c)
  4203  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4204  		v0.AddArg(y)
  4205  		v.AddArg2(x, v0)
  4206  		return true
  4207  	}
  4208  }
  4209  func rewriteValueWasm_OpRsh64x16(v *Value) bool {
  4210  	v_1 := v.Args[1]
  4211  	v_0 := v.Args[0]
  4212  	b := v.Block
  4213  	typ := &b.Func.Config.Types
  4214  	// match: (Rsh64x16 [c] x y)
  4215  	// result: (Rsh64x64 [c] x (ZeroExt16to64 y))
  4216  	for {
  4217  		c := auxIntToBool(v.AuxInt)
  4218  		x := v_0
  4219  		y := v_1
  4220  		v.reset(OpRsh64x64)
  4221  		v.AuxInt = boolToAuxInt(c)
  4222  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  4223  		v0.AddArg(y)
  4224  		v.AddArg2(x, v0)
  4225  		return true
  4226  	}
  4227  }
  4228  func rewriteValueWasm_OpRsh64x32(v *Value) bool {
  4229  	v_1 := v.Args[1]
  4230  	v_0 := v.Args[0]
  4231  	b := v.Block
  4232  	typ := &b.Func.Config.Types
  4233  	// match: (Rsh64x32 [c] x y)
  4234  	// result: (Rsh64x64 [c] x (ZeroExt32to64 y))
  4235  	for {
  4236  		c := auxIntToBool(v.AuxInt)
  4237  		x := v_0
  4238  		y := v_1
  4239  		v.reset(OpRsh64x64)
  4240  		v.AuxInt = boolToAuxInt(c)
  4241  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4242  		v0.AddArg(y)
  4243  		v.AddArg2(x, v0)
  4244  		return true
  4245  	}
  4246  }
  4247  func rewriteValueWasm_OpRsh64x64(v *Value) bool {
  4248  	v_1 := v.Args[1]
  4249  	v_0 := v.Args[0]
  4250  	b := v.Block
  4251  	typ := &b.Func.Config.Types
  4252  	// match: (Rsh64x64 x y)
  4253  	// cond: shiftIsBounded(v)
  4254  	// result: (I64ShrS x y)
  4255  	for {
  4256  		x := v_0
  4257  		y := v_1
  4258  		if !(shiftIsBounded(v)) {
  4259  			break
  4260  		}
  4261  		v.reset(OpWasmI64ShrS)
  4262  		v.AddArg2(x, y)
  4263  		return true
  4264  	}
  4265  	// match: (Rsh64x64 x (I64Const [c]))
  4266  	// cond: uint64(c) < 64
  4267  	// result: (I64ShrS x (I64Const [c]))
  4268  	for {
  4269  		x := v_0
  4270  		if v_1.Op != OpWasmI64Const {
  4271  			break
  4272  		}
  4273  		c := auxIntToInt64(v_1.AuxInt)
  4274  		if !(uint64(c) < 64) {
  4275  			break
  4276  		}
  4277  		v.reset(OpWasmI64ShrS)
  4278  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4279  		v0.AuxInt = int64ToAuxInt(c)
  4280  		v.AddArg2(x, v0)
  4281  		return true
  4282  	}
  4283  	// match: (Rsh64x64 x (I64Const [c]))
  4284  	// cond: uint64(c) >= 64
  4285  	// result: (I64ShrS x (I64Const [63]))
  4286  	for {
  4287  		x := v_0
  4288  		if v_1.Op != OpWasmI64Const {
  4289  			break
  4290  		}
  4291  		c := auxIntToInt64(v_1.AuxInt)
  4292  		if !(uint64(c) >= 64) {
  4293  			break
  4294  		}
  4295  		v.reset(OpWasmI64ShrS)
  4296  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4297  		v0.AuxInt = int64ToAuxInt(63)
  4298  		v.AddArg2(x, v0)
  4299  		return true
  4300  	}
  4301  	// match: (Rsh64x64 x y)
  4302  	// result: (I64ShrS x (Select <typ.Int64> y (I64Const [63]) (I64LtU y (I64Const [64]))))
  4303  	for {
  4304  		x := v_0
  4305  		y := v_1
  4306  		v.reset(OpWasmI64ShrS)
  4307  		v0 := b.NewValue0(v.Pos, OpWasmSelect, typ.Int64)
  4308  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4309  		v1.AuxInt = int64ToAuxInt(63)
  4310  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4311  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4312  		v3.AuxInt = int64ToAuxInt(64)
  4313  		v2.AddArg2(y, v3)
  4314  		v0.AddArg3(y, v1, v2)
  4315  		v.AddArg2(x, v0)
  4316  		return true
  4317  	}
  4318  }
  4319  func rewriteValueWasm_OpRsh64x8(v *Value) bool {
  4320  	v_1 := v.Args[1]
  4321  	v_0 := v.Args[0]
  4322  	b := v.Block
  4323  	typ := &b.Func.Config.Types
  4324  	// match: (Rsh64x8 [c] x y)
  4325  	// result: (Rsh64x64 [c] x (ZeroExt8to64 y))
  4326  	for {
  4327  		c := auxIntToBool(v.AuxInt)
  4328  		x := v_0
  4329  		y := v_1
  4330  		v.reset(OpRsh64x64)
  4331  		v.AuxInt = boolToAuxInt(c)
  4332  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4333  		v0.AddArg(y)
  4334  		v.AddArg2(x, v0)
  4335  		return true
  4336  	}
  4337  }
  4338  func rewriteValueWasm_OpRsh8Ux16(v *Value) bool {
  4339  	v_1 := v.Args[1]
  4340  	v_0 := v.Args[0]
  4341  	b := v.Block
  4342  	typ := &b.Func.Config.Types
  4343  	// match: (Rsh8Ux16 [c] x y)
  4344  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt16to64 y))
  4345  	for {
  4346  		c := auxIntToBool(v.AuxInt)
  4347  		x := v_0
  4348  		y := v_1
  4349  		v.reset(OpRsh64Ux64)
  4350  		v.AuxInt = boolToAuxInt(c)
  4351  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4352  		v0.AddArg(x)
  4353  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  4354  		v1.AddArg(y)
  4355  		v.AddArg2(v0, v1)
  4356  		return true
  4357  	}
  4358  }
  4359  func rewriteValueWasm_OpRsh8Ux32(v *Value) bool {
  4360  	v_1 := v.Args[1]
  4361  	v_0 := v.Args[0]
  4362  	b := v.Block
  4363  	typ := &b.Func.Config.Types
  4364  	// match: (Rsh8Ux32 [c] x y)
  4365  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt32to64 y))
  4366  	for {
  4367  		c := auxIntToBool(v.AuxInt)
  4368  		x := v_0
  4369  		y := v_1
  4370  		v.reset(OpRsh64Ux64)
  4371  		v.AuxInt = boolToAuxInt(c)
  4372  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4373  		v0.AddArg(x)
  4374  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4375  		v1.AddArg(y)
  4376  		v.AddArg2(v0, v1)
  4377  		return true
  4378  	}
  4379  }
  4380  func rewriteValueWasm_OpRsh8Ux64(v *Value) bool {
  4381  	v_1 := v.Args[1]
  4382  	v_0 := v.Args[0]
  4383  	b := v.Block
  4384  	typ := &b.Func.Config.Types
  4385  	// match: (Rsh8Ux64 [c] x y)
  4386  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) y)
  4387  	for {
  4388  		c := auxIntToBool(v.AuxInt)
  4389  		x := v_0
  4390  		y := v_1
  4391  		v.reset(OpRsh64Ux64)
  4392  		v.AuxInt = boolToAuxInt(c)
  4393  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4394  		v0.AddArg(x)
  4395  		v.AddArg2(v0, y)
  4396  		return true
  4397  	}
  4398  }
  4399  func rewriteValueWasm_OpRsh8Ux8(v *Value) bool {
  4400  	v_1 := v.Args[1]
  4401  	v_0 := v.Args[0]
  4402  	b := v.Block
  4403  	typ := &b.Func.Config.Types
  4404  	// match: (Rsh8Ux8 [c] x y)
  4405  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt8to64 y))
  4406  	for {
  4407  		c := auxIntToBool(v.AuxInt)
  4408  		x := v_0
  4409  		y := v_1
  4410  		v.reset(OpRsh64Ux64)
  4411  		v.AuxInt = boolToAuxInt(c)
  4412  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4413  		v0.AddArg(x)
  4414  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4415  		v1.AddArg(y)
  4416  		v.AddArg2(v0, v1)
  4417  		return true
  4418  	}
  4419  }
  4420  func rewriteValueWasm_OpRsh8x16(v *Value) bool {
  4421  	v_1 := v.Args[1]
  4422  	v_0 := v.Args[0]
  4423  	b := v.Block
  4424  	typ := &b.Func.Config.Types
  4425  	// match: (Rsh8x16 [c] x y)
  4426  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt16to64 y))
  4427  	for {
  4428  		c := auxIntToBool(v.AuxInt)
  4429  		x := v_0
  4430  		y := v_1
  4431  		v.reset(OpRsh64x64)
  4432  		v.AuxInt = boolToAuxInt(c)
  4433  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  4434  		v0.AddArg(x)
  4435  		v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  4436  		v1.AddArg(y)
  4437  		v.AddArg2(v0, v1)
  4438  		return true
  4439  	}
  4440  }
  4441  func rewriteValueWasm_OpRsh8x32(v *Value) bool {
  4442  	v_1 := v.Args[1]
  4443  	v_0 := v.Args[0]
  4444  	b := v.Block
  4445  	typ := &b.Func.Config.Types
  4446  	// match: (Rsh8x32 [c] x y)
  4447  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt32to64 y))
  4448  	for {
  4449  		c := auxIntToBool(v.AuxInt)
  4450  		x := v_0
  4451  		y := v_1
  4452  		v.reset(OpRsh64x64)
  4453  		v.AuxInt = boolToAuxInt(c)
  4454  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  4455  		v0.AddArg(x)
  4456  		v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4457  		v1.AddArg(y)
  4458  		v.AddArg2(v0, v1)
  4459  		return true
  4460  	}
  4461  }
  4462  func rewriteValueWasm_OpRsh8x64(v *Value) bool {
  4463  	v_1 := v.Args[1]
  4464  	v_0 := v.Args[0]
  4465  	b := v.Block
  4466  	typ := &b.Func.Config.Types
  4467  	// match: (Rsh8x64 [c] x y)
  4468  	// result: (Rsh64x64 [c] (SignExt8to64 x) y)
  4469  	for {
  4470  		c := auxIntToBool(v.AuxInt)
  4471  		x := v_0
  4472  		y := v_1
  4473  		v.reset(OpRsh64x64)
  4474  		v.AuxInt = boolToAuxInt(c)
  4475  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  4476  		v0.AddArg(x)
  4477  		v.AddArg2(v0, y)
  4478  		return true
  4479  	}
  4480  }
  4481  func rewriteValueWasm_OpRsh8x8(v *Value) bool {
  4482  	v_1 := v.Args[1]
  4483  	v_0 := v.Args[0]
  4484  	b := v.Block
  4485  	typ := &b.Func.Config.Types
  4486  	// match: (Rsh8x8 [c] x y)
  4487  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt8to64 y))
  4488  	for {
  4489  		c := auxIntToBool(v.AuxInt)
  4490  		x := v_0
  4491  		y := v_1
  4492  		v.reset(OpRsh64x64)
  4493  		v.AuxInt = boolToAuxInt(c)
  4494  		v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
  4495  		v0.AddArg(x)
  4496  		v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4497  		v1.AddArg(y)
  4498  		v.AddArg2(v0, v1)
  4499  		return true
  4500  	}
  4501  }
  4502  func rewriteValueWasm_OpSelect0(v *Value) bool {
  4503  	v_0 := v.Args[0]
  4504  	// match: (Select0 <t> (Mul64uhilo x y))
  4505  	// result: (Hmul64u <t> x y)
  4506  	for {
  4507  		t := v.Type
  4508  		if v_0.Op != OpMul64uhilo {
  4509  			break
  4510  		}
  4511  		y := v_0.Args[1]
  4512  		x := v_0.Args[0]
  4513  		v.reset(OpHmul64u)
  4514  		v.Type = t
  4515  		v.AddArg2(x, y)
  4516  		return true
  4517  	}
  4518  	return false
  4519  }
  4520  func rewriteValueWasm_OpSelect1(v *Value) bool {
  4521  	v_0 := v.Args[0]
  4522  	// match: (Select1 <t> (Mul64uhilo x y))
  4523  	// result: (I64Mul x y)
  4524  	for {
  4525  		if v_0.Op != OpMul64uhilo {
  4526  			break
  4527  		}
  4528  		y := v_0.Args[1]
  4529  		x := v_0.Args[0]
  4530  		v.reset(OpWasmI64Mul)
  4531  		v.AddArg2(x, y)
  4532  		return true
  4533  	}
  4534  	return false
  4535  }
  4536  func rewriteValueWasm_OpShiftAllLeftInt16x8(v *Value) bool {
  4537  	v_1 := v.Args[1]
  4538  	v_0 := v.Args[0]
  4539  	b := v.Block
  4540  	typ := &b.Func.Config.Types
  4541  	// match: (ShiftAllLeftInt16x8 x d:(Const64 [c]))
  4542  	// cond: uint64(c) < 16
  4543  	// result: (I16x8Shl x (I64Const [c]))
  4544  	for {
  4545  		x := v_0
  4546  		d := v_1
  4547  		if d.Op != OpConst64 {
  4548  			break
  4549  		}
  4550  		c := auxIntToInt64(d.AuxInt)
  4551  		if !(uint64(c) < 16) {
  4552  			break
  4553  		}
  4554  		v.reset(OpWasmI16x8Shl)
  4555  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4556  		v0.AuxInt = int64ToAuxInt(c)
  4557  		v.AddArg2(x, v0)
  4558  		return true
  4559  	}
  4560  	// match: (ShiftAllLeftInt16x8 x d:(I64Const [c]))
  4561  	// cond: uint64(c) < 16
  4562  	// result: (I16x8Shl x d)
  4563  	for {
  4564  		x := v_0
  4565  		d := v_1
  4566  		if d.Op != OpWasmI64Const {
  4567  			break
  4568  		}
  4569  		c := auxIntToInt64(d.AuxInt)
  4570  		if !(uint64(c) < 16) {
  4571  			break
  4572  		}
  4573  		v.reset(OpWasmI16x8Shl)
  4574  		v.AddArg2(x, d)
  4575  		return true
  4576  	}
  4577  	// match: (ShiftAllLeftInt16x8 x y)
  4578  	// result: (SelectV (I16x8Shl x y) (V128Xor x x) (I64LtU y (I64Const [16])))
  4579  	for {
  4580  		x := v_0
  4581  		y := v_1
  4582  		v.reset(OpWasmSelectV)
  4583  		v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
  4584  		v0.AddArg2(x, y)
  4585  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4586  		v1.AddArg2(x, x)
  4587  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4588  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4589  		v3.AuxInt = int64ToAuxInt(16)
  4590  		v2.AddArg2(y, v3)
  4591  		v.AddArg3(v0, v1, v2)
  4592  		return true
  4593  	}
  4594  }
  4595  func rewriteValueWasm_OpShiftAllLeftInt32x4(v *Value) bool {
  4596  	v_1 := v.Args[1]
  4597  	v_0 := v.Args[0]
  4598  	b := v.Block
  4599  	typ := &b.Func.Config.Types
  4600  	// match: (ShiftAllLeftInt32x4 x d:(Const64 [c]))
  4601  	// cond: uint64(c) < 32
  4602  	// result: (I32x4Shl x (I64Const [c]))
  4603  	for {
  4604  		x := v_0
  4605  		d := v_1
  4606  		if d.Op != OpConst64 {
  4607  			break
  4608  		}
  4609  		c := auxIntToInt64(d.AuxInt)
  4610  		if !(uint64(c) < 32) {
  4611  			break
  4612  		}
  4613  		v.reset(OpWasmI32x4Shl)
  4614  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4615  		v0.AuxInt = int64ToAuxInt(c)
  4616  		v.AddArg2(x, v0)
  4617  		return true
  4618  	}
  4619  	// match: (ShiftAllLeftInt32x4 x d:(I64Const [c]))
  4620  	// cond: uint64(c) < 32
  4621  	// result: (I32x4Shl x d)
  4622  	for {
  4623  		x := v_0
  4624  		d := v_1
  4625  		if d.Op != OpWasmI64Const {
  4626  			break
  4627  		}
  4628  		c := auxIntToInt64(d.AuxInt)
  4629  		if !(uint64(c) < 32) {
  4630  			break
  4631  		}
  4632  		v.reset(OpWasmI32x4Shl)
  4633  		v.AddArg2(x, d)
  4634  		return true
  4635  	}
  4636  	// match: (ShiftAllLeftInt32x4 x y)
  4637  	// result: (SelectV (I32x4Shl x y) (V128Xor x x) (I64LtU y (I64Const [32])))
  4638  	for {
  4639  		x := v_0
  4640  		y := v_1
  4641  		v.reset(OpWasmSelectV)
  4642  		v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
  4643  		v0.AddArg2(x, y)
  4644  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4645  		v1.AddArg2(x, x)
  4646  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4647  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4648  		v3.AuxInt = int64ToAuxInt(32)
  4649  		v2.AddArg2(y, v3)
  4650  		v.AddArg3(v0, v1, v2)
  4651  		return true
  4652  	}
  4653  }
  4654  func rewriteValueWasm_OpShiftAllLeftInt64x2(v *Value) bool {
  4655  	v_1 := v.Args[1]
  4656  	v_0 := v.Args[0]
  4657  	b := v.Block
  4658  	typ := &b.Func.Config.Types
  4659  	// match: (ShiftAllLeftInt64x2 x d:(Const64 [c]))
  4660  	// cond: uint64(c) < 64
  4661  	// result: (I64x2Shl x (I64Const [c]))
  4662  	for {
  4663  		x := v_0
  4664  		d := v_1
  4665  		if d.Op != OpConst64 {
  4666  			break
  4667  		}
  4668  		c := auxIntToInt64(d.AuxInt)
  4669  		if !(uint64(c) < 64) {
  4670  			break
  4671  		}
  4672  		v.reset(OpWasmI64x2Shl)
  4673  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4674  		v0.AuxInt = int64ToAuxInt(c)
  4675  		v.AddArg2(x, v0)
  4676  		return true
  4677  	}
  4678  	// match: (ShiftAllLeftInt64x2 x d:(I64Const [c]))
  4679  	// cond: uint64(c) < 64
  4680  	// result: (I64x2Shl x d)
  4681  	for {
  4682  		x := v_0
  4683  		d := v_1
  4684  		if d.Op != OpWasmI64Const {
  4685  			break
  4686  		}
  4687  		c := auxIntToInt64(d.AuxInt)
  4688  		if !(uint64(c) < 64) {
  4689  			break
  4690  		}
  4691  		v.reset(OpWasmI64x2Shl)
  4692  		v.AddArg2(x, d)
  4693  		return true
  4694  	}
  4695  	// match: (ShiftAllLeftInt64x2 x y)
  4696  	// result: (SelectV (I64x2Shl x y) (V128Xor x x) (I64LtU y (I64Const [64])))
  4697  	for {
  4698  		x := v_0
  4699  		y := v_1
  4700  		v.reset(OpWasmSelectV)
  4701  		v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
  4702  		v0.AddArg2(x, y)
  4703  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4704  		v1.AddArg2(x, x)
  4705  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4706  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4707  		v3.AuxInt = int64ToAuxInt(64)
  4708  		v2.AddArg2(y, v3)
  4709  		v.AddArg3(v0, v1, v2)
  4710  		return true
  4711  	}
  4712  }
  4713  func rewriteValueWasm_OpShiftAllLeftInt8x16(v *Value) bool {
  4714  	v_1 := v.Args[1]
  4715  	v_0 := v.Args[0]
  4716  	b := v.Block
  4717  	typ := &b.Func.Config.Types
  4718  	// match: (ShiftAllLeftInt8x16 x d:(Const64 [c]))
  4719  	// cond: uint64(c) < 8
  4720  	// result: (I8x16Shl x (I64Const [c]))
  4721  	for {
  4722  		x := v_0
  4723  		d := v_1
  4724  		if d.Op != OpConst64 {
  4725  			break
  4726  		}
  4727  		c := auxIntToInt64(d.AuxInt)
  4728  		if !(uint64(c) < 8) {
  4729  			break
  4730  		}
  4731  		v.reset(OpWasmI8x16Shl)
  4732  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4733  		v0.AuxInt = int64ToAuxInt(c)
  4734  		v.AddArg2(x, v0)
  4735  		return true
  4736  	}
  4737  	// match: (ShiftAllLeftInt8x16 x d:(I64Const [c]))
  4738  	// cond: uint64(c) < 8
  4739  	// result: (I8x16Shl x d)
  4740  	for {
  4741  		x := v_0
  4742  		d := v_1
  4743  		if d.Op != OpWasmI64Const {
  4744  			break
  4745  		}
  4746  		c := auxIntToInt64(d.AuxInt)
  4747  		if !(uint64(c) < 8) {
  4748  			break
  4749  		}
  4750  		v.reset(OpWasmI8x16Shl)
  4751  		v.AddArg2(x, d)
  4752  		return true
  4753  	}
  4754  	// match: (ShiftAllLeftInt8x16 x y)
  4755  	// result: (SelectV (I8x16Shl x y) (V128Xor x x) (I64LtU y (I64Const [8])))
  4756  	for {
  4757  		x := v_0
  4758  		y := v_1
  4759  		v.reset(OpWasmSelectV)
  4760  		v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
  4761  		v0.AddArg2(x, y)
  4762  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4763  		v1.AddArg2(x, x)
  4764  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4765  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4766  		v3.AuxInt = int64ToAuxInt(8)
  4767  		v2.AddArg2(y, v3)
  4768  		v.AddArg3(v0, v1, v2)
  4769  		return true
  4770  	}
  4771  }
  4772  func rewriteValueWasm_OpShiftAllLeftUint16x8(v *Value) bool {
  4773  	v_1 := v.Args[1]
  4774  	v_0 := v.Args[0]
  4775  	b := v.Block
  4776  	typ := &b.Func.Config.Types
  4777  	// match: (ShiftAllLeftUint16x8 x d:(Const64 [c]))
  4778  	// cond: uint64(c) < 16
  4779  	// result: (I16x8Shl x (I64Const [c]))
  4780  	for {
  4781  		x := v_0
  4782  		d := v_1
  4783  		if d.Op != OpConst64 {
  4784  			break
  4785  		}
  4786  		c := auxIntToInt64(d.AuxInt)
  4787  		if !(uint64(c) < 16) {
  4788  			break
  4789  		}
  4790  		v.reset(OpWasmI16x8Shl)
  4791  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4792  		v0.AuxInt = int64ToAuxInt(c)
  4793  		v.AddArg2(x, v0)
  4794  		return true
  4795  	}
  4796  	// match: (ShiftAllLeftUint16x8 x d:(I64Const [c]))
  4797  	// cond: uint64(c) < 16
  4798  	// result: (I16x8Shl x d)
  4799  	for {
  4800  		x := v_0
  4801  		d := v_1
  4802  		if d.Op != OpWasmI64Const {
  4803  			break
  4804  		}
  4805  		c := auxIntToInt64(d.AuxInt)
  4806  		if !(uint64(c) < 16) {
  4807  			break
  4808  		}
  4809  		v.reset(OpWasmI16x8Shl)
  4810  		v.AddArg2(x, d)
  4811  		return true
  4812  	}
  4813  	// match: (ShiftAllLeftUint16x8 x y)
  4814  	// result: (SelectV (I16x8Shl x y) (V128Xor x x) (I64LtU y (I64Const [16])))
  4815  	for {
  4816  		x := v_0
  4817  		y := v_1
  4818  		v.reset(OpWasmSelectV)
  4819  		v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
  4820  		v0.AddArg2(x, y)
  4821  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4822  		v1.AddArg2(x, x)
  4823  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4824  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4825  		v3.AuxInt = int64ToAuxInt(16)
  4826  		v2.AddArg2(y, v3)
  4827  		v.AddArg3(v0, v1, v2)
  4828  		return true
  4829  	}
  4830  }
  4831  func rewriteValueWasm_OpShiftAllLeftUint32x4(v *Value) bool {
  4832  	v_1 := v.Args[1]
  4833  	v_0 := v.Args[0]
  4834  	b := v.Block
  4835  	typ := &b.Func.Config.Types
  4836  	// match: (ShiftAllLeftUint32x4 x d:(Const64 [c]))
  4837  	// cond: uint64(c) < 32
  4838  	// result: (I32x4Shl x (I64Const [c]))
  4839  	for {
  4840  		x := v_0
  4841  		d := v_1
  4842  		if d.Op != OpConst64 {
  4843  			break
  4844  		}
  4845  		c := auxIntToInt64(d.AuxInt)
  4846  		if !(uint64(c) < 32) {
  4847  			break
  4848  		}
  4849  		v.reset(OpWasmI32x4Shl)
  4850  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4851  		v0.AuxInt = int64ToAuxInt(c)
  4852  		v.AddArg2(x, v0)
  4853  		return true
  4854  	}
  4855  	// match: (ShiftAllLeftUint32x4 x d:(I64Const [c]))
  4856  	// cond: uint64(c) < 32
  4857  	// result: (I32x4Shl x d)
  4858  	for {
  4859  		x := v_0
  4860  		d := v_1
  4861  		if d.Op != OpWasmI64Const {
  4862  			break
  4863  		}
  4864  		c := auxIntToInt64(d.AuxInt)
  4865  		if !(uint64(c) < 32) {
  4866  			break
  4867  		}
  4868  		v.reset(OpWasmI32x4Shl)
  4869  		v.AddArg2(x, d)
  4870  		return true
  4871  	}
  4872  	// match: (ShiftAllLeftUint32x4 x y)
  4873  	// result: (SelectV (I32x4Shl x y) (V128Xor x x) (I64LtU y (I64Const [32])))
  4874  	for {
  4875  		x := v_0
  4876  		y := v_1
  4877  		v.reset(OpWasmSelectV)
  4878  		v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
  4879  		v0.AddArg2(x, y)
  4880  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4881  		v1.AddArg2(x, x)
  4882  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4883  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4884  		v3.AuxInt = int64ToAuxInt(32)
  4885  		v2.AddArg2(y, v3)
  4886  		v.AddArg3(v0, v1, v2)
  4887  		return true
  4888  	}
  4889  }
  4890  func rewriteValueWasm_OpShiftAllLeftUint64x2(v *Value) bool {
  4891  	v_1 := v.Args[1]
  4892  	v_0 := v.Args[0]
  4893  	b := v.Block
  4894  	typ := &b.Func.Config.Types
  4895  	// match: (ShiftAllLeftUint64x2 x d:(Const64 [c]))
  4896  	// cond: uint64(c) < 64
  4897  	// result: (I64x2Shl x (I64Const [c]))
  4898  	for {
  4899  		x := v_0
  4900  		d := v_1
  4901  		if d.Op != OpConst64 {
  4902  			break
  4903  		}
  4904  		c := auxIntToInt64(d.AuxInt)
  4905  		if !(uint64(c) < 64) {
  4906  			break
  4907  		}
  4908  		v.reset(OpWasmI64x2Shl)
  4909  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4910  		v0.AuxInt = int64ToAuxInt(c)
  4911  		v.AddArg2(x, v0)
  4912  		return true
  4913  	}
  4914  	// match: (ShiftAllLeftUint64x2 x d:(I64Const [c]))
  4915  	// cond: uint64(c) < 64
  4916  	// result: (I64x2Shl x d)
  4917  	for {
  4918  		x := v_0
  4919  		d := v_1
  4920  		if d.Op != OpWasmI64Const {
  4921  			break
  4922  		}
  4923  		c := auxIntToInt64(d.AuxInt)
  4924  		if !(uint64(c) < 64) {
  4925  			break
  4926  		}
  4927  		v.reset(OpWasmI64x2Shl)
  4928  		v.AddArg2(x, d)
  4929  		return true
  4930  	}
  4931  	// match: (ShiftAllLeftUint64x2 x y)
  4932  	// result: (SelectV (I64x2Shl x y) (V128Xor x x) (I64LtU y (I64Const [64])))
  4933  	for {
  4934  		x := v_0
  4935  		y := v_1
  4936  		v.reset(OpWasmSelectV)
  4937  		v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
  4938  		v0.AddArg2(x, y)
  4939  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4940  		v1.AddArg2(x, x)
  4941  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  4942  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4943  		v3.AuxInt = int64ToAuxInt(64)
  4944  		v2.AddArg2(y, v3)
  4945  		v.AddArg3(v0, v1, v2)
  4946  		return true
  4947  	}
  4948  }
  4949  func rewriteValueWasm_OpShiftAllLeftUint8x16(v *Value) bool {
  4950  	v_1 := v.Args[1]
  4951  	v_0 := v.Args[0]
  4952  	b := v.Block
  4953  	typ := &b.Func.Config.Types
  4954  	// match: (ShiftAllLeftUint8x16 x d:(Const64 [c]))
  4955  	// cond: uint64(c) < 8
  4956  	// result: (I8x16Shl x (I64Const [c]))
  4957  	for {
  4958  		x := v_0
  4959  		d := v_1
  4960  		if d.Op != OpConst64 {
  4961  			break
  4962  		}
  4963  		c := auxIntToInt64(d.AuxInt)
  4964  		if !(uint64(c) < 8) {
  4965  			break
  4966  		}
  4967  		v.reset(OpWasmI8x16Shl)
  4968  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  4969  		v0.AuxInt = int64ToAuxInt(c)
  4970  		v.AddArg2(x, v0)
  4971  		return true
  4972  	}
  4973  	// match: (ShiftAllLeftUint8x16 x d:(I64Const [c]))
  4974  	// cond: uint64(c) < 8
  4975  	// result: (I8x16Shl x d)
  4976  	for {
  4977  		x := v_0
  4978  		d := v_1
  4979  		if d.Op != OpWasmI64Const {
  4980  			break
  4981  		}
  4982  		c := auxIntToInt64(d.AuxInt)
  4983  		if !(uint64(c) < 8) {
  4984  			break
  4985  		}
  4986  		v.reset(OpWasmI8x16Shl)
  4987  		v.AddArg2(x, d)
  4988  		return true
  4989  	}
  4990  	// match: (ShiftAllLeftUint8x16 x y)
  4991  	// result: (SelectV (I8x16Shl x y) (V128Xor x x) (I64LtU y (I64Const [8])))
  4992  	for {
  4993  		x := v_0
  4994  		y := v_1
  4995  		v.reset(OpWasmSelectV)
  4996  		v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
  4997  		v0.AddArg2(x, y)
  4998  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  4999  		v1.AddArg2(x, x)
  5000  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5001  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5002  		v3.AuxInt = int64ToAuxInt(8)
  5003  		v2.AddArg2(y, v3)
  5004  		v.AddArg3(v0, v1, v2)
  5005  		return true
  5006  	}
  5007  }
  5008  func rewriteValueWasm_OpShiftAllRightInt16x8(v *Value) bool {
  5009  	v_1 := v.Args[1]
  5010  	v_0 := v.Args[0]
  5011  	b := v.Block
  5012  	typ := &b.Func.Config.Types
  5013  	// match: (ShiftAllRightInt16x8 x d:(Const64 [c]))
  5014  	// cond: uint64(c) < 16
  5015  	// result: (I16x8ShrS x (I64Const [c]))
  5016  	for {
  5017  		x := v_0
  5018  		d := v_1
  5019  		if d.Op != OpConst64 {
  5020  			break
  5021  		}
  5022  		c := auxIntToInt64(d.AuxInt)
  5023  		if !(uint64(c) < 16) {
  5024  			break
  5025  		}
  5026  		v.reset(OpWasmI16x8ShrS)
  5027  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5028  		v0.AuxInt = int64ToAuxInt(c)
  5029  		v.AddArg2(x, v0)
  5030  		return true
  5031  	}
  5032  	// match: (ShiftAllRightInt16x8 x d:(I64Const [c]))
  5033  	// cond: uint64(c) < 16
  5034  	// result: (I16x8ShrS x d)
  5035  	for {
  5036  		x := v_0
  5037  		d := v_1
  5038  		if d.Op != OpWasmI64Const {
  5039  			break
  5040  		}
  5041  		c := auxIntToInt64(d.AuxInt)
  5042  		if !(uint64(c) < 16) {
  5043  			break
  5044  		}
  5045  		v.reset(OpWasmI16x8ShrS)
  5046  		v.AddArg2(x, d)
  5047  		return true
  5048  	}
  5049  	// match: (ShiftAllRightInt16x8 x y)
  5050  	// result: (SelectV (I16x8ShrS x y) (I16x8ShrS x (I64Const [15])) (I64LtU y (I64Const [16])))
  5051  	for {
  5052  		x := v_0
  5053  		y := v_1
  5054  		v.reset(OpWasmSelectV)
  5055  		v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrS, typ.Vec128)
  5056  		v0.AddArg2(x, y)
  5057  		v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrS, typ.Vec128)
  5058  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5059  		v2.AuxInt = int64ToAuxInt(15)
  5060  		v1.AddArg2(x, v2)
  5061  		v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5062  		v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5063  		v4.AuxInt = int64ToAuxInt(16)
  5064  		v3.AddArg2(y, v4)
  5065  		v.AddArg3(v0, v1, v3)
  5066  		return true
  5067  	}
  5068  }
  5069  func rewriteValueWasm_OpShiftAllRightInt32x4(v *Value) bool {
  5070  	v_1 := v.Args[1]
  5071  	v_0 := v.Args[0]
  5072  	b := v.Block
  5073  	typ := &b.Func.Config.Types
  5074  	// match: (ShiftAllRightInt32x4 x d:(Const64 [c]))
  5075  	// cond: uint64(c) < 32
  5076  	// result: (I32x4ShrS x (I64Const [c]))
  5077  	for {
  5078  		x := v_0
  5079  		d := v_1
  5080  		if d.Op != OpConst64 {
  5081  			break
  5082  		}
  5083  		c := auxIntToInt64(d.AuxInt)
  5084  		if !(uint64(c) < 32) {
  5085  			break
  5086  		}
  5087  		v.reset(OpWasmI32x4ShrS)
  5088  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5089  		v0.AuxInt = int64ToAuxInt(c)
  5090  		v.AddArg2(x, v0)
  5091  		return true
  5092  	}
  5093  	// match: (ShiftAllRightInt32x4 x d:(I64Const [c]))
  5094  	// cond: uint64(c) < 32
  5095  	// result: (I32x4ShrS x d)
  5096  	for {
  5097  		x := v_0
  5098  		d := v_1
  5099  		if d.Op != OpWasmI64Const {
  5100  			break
  5101  		}
  5102  		c := auxIntToInt64(d.AuxInt)
  5103  		if !(uint64(c) < 32) {
  5104  			break
  5105  		}
  5106  		v.reset(OpWasmI32x4ShrS)
  5107  		v.AddArg2(x, d)
  5108  		return true
  5109  	}
  5110  	// match: (ShiftAllRightInt32x4 x y)
  5111  	// result: (SelectV (I32x4ShrS x y) (I32x4ShrS x (I64Const [31])) (I64LtU y (I64Const [32])))
  5112  	for {
  5113  		x := v_0
  5114  		y := v_1
  5115  		v.reset(OpWasmSelectV)
  5116  		v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrS, typ.Vec128)
  5117  		v0.AddArg2(x, y)
  5118  		v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrS, typ.Vec128)
  5119  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5120  		v2.AuxInt = int64ToAuxInt(31)
  5121  		v1.AddArg2(x, v2)
  5122  		v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5123  		v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5124  		v4.AuxInt = int64ToAuxInt(32)
  5125  		v3.AddArg2(y, v4)
  5126  		v.AddArg3(v0, v1, v3)
  5127  		return true
  5128  	}
  5129  }
  5130  func rewriteValueWasm_OpShiftAllRightInt64x2(v *Value) bool {
  5131  	v_1 := v.Args[1]
  5132  	v_0 := v.Args[0]
  5133  	b := v.Block
  5134  	typ := &b.Func.Config.Types
  5135  	// match: (ShiftAllRightInt64x2 x d:(Const64 [c]))
  5136  	// cond: uint64(c) < 64
  5137  	// result: (I64x2ShrS x (I64Const [c]))
  5138  	for {
  5139  		x := v_0
  5140  		d := v_1
  5141  		if d.Op != OpConst64 {
  5142  			break
  5143  		}
  5144  		c := auxIntToInt64(d.AuxInt)
  5145  		if !(uint64(c) < 64) {
  5146  			break
  5147  		}
  5148  		v.reset(OpWasmI64x2ShrS)
  5149  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5150  		v0.AuxInt = int64ToAuxInt(c)
  5151  		v.AddArg2(x, v0)
  5152  		return true
  5153  	}
  5154  	// match: (ShiftAllRightInt64x2 x d:(I64Const [c]))
  5155  	// cond: uint64(c) < 64
  5156  	// result: (I64x2ShrS x d)
  5157  	for {
  5158  		x := v_0
  5159  		d := v_1
  5160  		if d.Op != OpWasmI64Const {
  5161  			break
  5162  		}
  5163  		c := auxIntToInt64(d.AuxInt)
  5164  		if !(uint64(c) < 64) {
  5165  			break
  5166  		}
  5167  		v.reset(OpWasmI64x2ShrS)
  5168  		v.AddArg2(x, d)
  5169  		return true
  5170  	}
  5171  	// match: (ShiftAllRightInt64x2 x y)
  5172  	// result: (SelectV (I64x2ShrS x y) (I64x2ShrS x (I64Const [63])) (I64LtU y (I64Const [64])))
  5173  	for {
  5174  		x := v_0
  5175  		y := v_1
  5176  		v.reset(OpWasmSelectV)
  5177  		v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrS, typ.Vec128)
  5178  		v0.AddArg2(x, y)
  5179  		v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrS, typ.Vec128)
  5180  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5181  		v2.AuxInt = int64ToAuxInt(63)
  5182  		v1.AddArg2(x, v2)
  5183  		v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5184  		v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5185  		v4.AuxInt = int64ToAuxInt(64)
  5186  		v3.AddArg2(y, v4)
  5187  		v.AddArg3(v0, v1, v3)
  5188  		return true
  5189  	}
  5190  }
  5191  func rewriteValueWasm_OpShiftAllRightInt8x16(v *Value) bool {
  5192  	v_1 := v.Args[1]
  5193  	v_0 := v.Args[0]
  5194  	b := v.Block
  5195  	typ := &b.Func.Config.Types
  5196  	// match: (ShiftAllRightInt8x16 x d:(Const64 [c]))
  5197  	// cond: uint64(c) < 8
  5198  	// result: (I8x16ShrS x (I64Const [c]))
  5199  	for {
  5200  		x := v_0
  5201  		d := v_1
  5202  		if d.Op != OpConst64 {
  5203  			break
  5204  		}
  5205  		c := auxIntToInt64(d.AuxInt)
  5206  		if !(uint64(c) < 8) {
  5207  			break
  5208  		}
  5209  		v.reset(OpWasmI8x16ShrS)
  5210  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5211  		v0.AuxInt = int64ToAuxInt(c)
  5212  		v.AddArg2(x, v0)
  5213  		return true
  5214  	}
  5215  	// match: (ShiftAllRightInt8x16 x d:(I64Const [c]))
  5216  	// cond: uint64(c) < 8
  5217  	// result: (I8x16ShrS x d)
  5218  	for {
  5219  		x := v_0
  5220  		d := v_1
  5221  		if d.Op != OpWasmI64Const {
  5222  			break
  5223  		}
  5224  		c := auxIntToInt64(d.AuxInt)
  5225  		if !(uint64(c) < 8) {
  5226  			break
  5227  		}
  5228  		v.reset(OpWasmI8x16ShrS)
  5229  		v.AddArg2(x, d)
  5230  		return true
  5231  	}
  5232  	// match: (ShiftAllRightInt8x16 x y)
  5233  	// result: (SelectV (I8x16ShrS x y) (I8x16ShrS x (I64Const [7])) (I64LtU y (I64Const [8])))
  5234  	for {
  5235  		x := v_0
  5236  		y := v_1
  5237  		v.reset(OpWasmSelectV)
  5238  		v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrS, typ.Vec128)
  5239  		v0.AddArg2(x, y)
  5240  		v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrS, typ.Vec128)
  5241  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5242  		v2.AuxInt = int64ToAuxInt(7)
  5243  		v1.AddArg2(x, v2)
  5244  		v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5245  		v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5246  		v4.AuxInt = int64ToAuxInt(8)
  5247  		v3.AddArg2(y, v4)
  5248  		v.AddArg3(v0, v1, v3)
  5249  		return true
  5250  	}
  5251  }
  5252  func rewriteValueWasm_OpShiftAllRightUint16x8(v *Value) bool {
  5253  	v_1 := v.Args[1]
  5254  	v_0 := v.Args[0]
  5255  	b := v.Block
  5256  	typ := &b.Func.Config.Types
  5257  	// match: (ShiftAllRightUint16x8 x d:(Const64 [c]))
  5258  	// cond: uint64(c) < 16
  5259  	// result: (I16x8ShrU x (I64Const [c]))
  5260  	for {
  5261  		x := v_0
  5262  		d := v_1
  5263  		if d.Op != OpConst64 {
  5264  			break
  5265  		}
  5266  		c := auxIntToInt64(d.AuxInt)
  5267  		if !(uint64(c) < 16) {
  5268  			break
  5269  		}
  5270  		v.reset(OpWasmI16x8ShrU)
  5271  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5272  		v0.AuxInt = int64ToAuxInt(c)
  5273  		v.AddArg2(x, v0)
  5274  		return true
  5275  	}
  5276  	// match: (ShiftAllRightUint16x8 x d:(I64Const [c]))
  5277  	// cond: uint64(c) < 16
  5278  	// result: (I16x8ShrU x d)
  5279  	for {
  5280  		x := v_0
  5281  		d := v_1
  5282  		if d.Op != OpWasmI64Const {
  5283  			break
  5284  		}
  5285  		c := auxIntToInt64(d.AuxInt)
  5286  		if !(uint64(c) < 16) {
  5287  			break
  5288  		}
  5289  		v.reset(OpWasmI16x8ShrU)
  5290  		v.AddArg2(x, d)
  5291  		return true
  5292  	}
  5293  	// match: (ShiftAllRightUint16x8 x y)
  5294  	// result: (SelectV (I16x8ShrU x y) (V128Xor x x) (I64LtU y (I64Const [16])))
  5295  	for {
  5296  		x := v_0
  5297  		y := v_1
  5298  		v.reset(OpWasmSelectV)
  5299  		v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
  5300  		v0.AddArg2(x, y)
  5301  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  5302  		v1.AddArg2(x, x)
  5303  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5304  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5305  		v3.AuxInt = int64ToAuxInt(16)
  5306  		v2.AddArg2(y, v3)
  5307  		v.AddArg3(v0, v1, v2)
  5308  		return true
  5309  	}
  5310  }
  5311  func rewriteValueWasm_OpShiftAllRightUint32x4(v *Value) bool {
  5312  	v_1 := v.Args[1]
  5313  	v_0 := v.Args[0]
  5314  	b := v.Block
  5315  	typ := &b.Func.Config.Types
  5316  	// match: (ShiftAllRightUint32x4 x d:(Const64 [c]))
  5317  	// cond: uint64(c) < 32
  5318  	// result: (I32x4ShrU x (I64Const [c]))
  5319  	for {
  5320  		x := v_0
  5321  		d := v_1
  5322  		if d.Op != OpConst64 {
  5323  			break
  5324  		}
  5325  		c := auxIntToInt64(d.AuxInt)
  5326  		if !(uint64(c) < 32) {
  5327  			break
  5328  		}
  5329  		v.reset(OpWasmI32x4ShrU)
  5330  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5331  		v0.AuxInt = int64ToAuxInt(c)
  5332  		v.AddArg2(x, v0)
  5333  		return true
  5334  	}
  5335  	// match: (ShiftAllRightUint32x4 x d:(I64Const [c]))
  5336  	// cond: uint64(c) < 32
  5337  	// result: (I32x4ShrU x d)
  5338  	for {
  5339  		x := v_0
  5340  		d := v_1
  5341  		if d.Op != OpWasmI64Const {
  5342  			break
  5343  		}
  5344  		c := auxIntToInt64(d.AuxInt)
  5345  		if !(uint64(c) < 32) {
  5346  			break
  5347  		}
  5348  		v.reset(OpWasmI32x4ShrU)
  5349  		v.AddArg2(x, d)
  5350  		return true
  5351  	}
  5352  	// match: (ShiftAllRightUint32x4 x y)
  5353  	// result: (SelectV (I32x4ShrU x y) (V128Xor x x) (I64LtU y (I64Const [32])))
  5354  	for {
  5355  		x := v_0
  5356  		y := v_1
  5357  		v.reset(OpWasmSelectV)
  5358  		v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
  5359  		v0.AddArg2(x, y)
  5360  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  5361  		v1.AddArg2(x, x)
  5362  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5363  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5364  		v3.AuxInt = int64ToAuxInt(32)
  5365  		v2.AddArg2(y, v3)
  5366  		v.AddArg3(v0, v1, v2)
  5367  		return true
  5368  	}
  5369  }
  5370  func rewriteValueWasm_OpShiftAllRightUint64x2(v *Value) bool {
  5371  	v_1 := v.Args[1]
  5372  	v_0 := v.Args[0]
  5373  	b := v.Block
  5374  	typ := &b.Func.Config.Types
  5375  	// match: (ShiftAllRightUint64x2 x d:(Const64 [c]))
  5376  	// cond: uint64(c) < 64
  5377  	// result: (I64x2ShrU x (I64Const [c]))
  5378  	for {
  5379  		x := v_0
  5380  		d := v_1
  5381  		if d.Op != OpConst64 {
  5382  			break
  5383  		}
  5384  		c := auxIntToInt64(d.AuxInt)
  5385  		if !(uint64(c) < 64) {
  5386  			break
  5387  		}
  5388  		v.reset(OpWasmI64x2ShrU)
  5389  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5390  		v0.AuxInt = int64ToAuxInt(c)
  5391  		v.AddArg2(x, v0)
  5392  		return true
  5393  	}
  5394  	// match: (ShiftAllRightUint64x2 x d:(I64Const [c]))
  5395  	// cond: uint64(c) < 64
  5396  	// result: (I64x2ShrU x d)
  5397  	for {
  5398  		x := v_0
  5399  		d := v_1
  5400  		if d.Op != OpWasmI64Const {
  5401  			break
  5402  		}
  5403  		c := auxIntToInt64(d.AuxInt)
  5404  		if !(uint64(c) < 64) {
  5405  			break
  5406  		}
  5407  		v.reset(OpWasmI64x2ShrU)
  5408  		v.AddArg2(x, d)
  5409  		return true
  5410  	}
  5411  	// match: (ShiftAllRightUint64x2 x y)
  5412  	// result: (SelectV (I64x2ShrU x y) (V128Xor x x) (I64LtU y (I64Const [64])))
  5413  	for {
  5414  		x := v_0
  5415  		y := v_1
  5416  		v.reset(OpWasmSelectV)
  5417  		v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
  5418  		v0.AddArg2(x, y)
  5419  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  5420  		v1.AddArg2(x, x)
  5421  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5422  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5423  		v3.AuxInt = int64ToAuxInt(64)
  5424  		v2.AddArg2(y, v3)
  5425  		v.AddArg3(v0, v1, v2)
  5426  		return true
  5427  	}
  5428  }
  5429  func rewriteValueWasm_OpShiftAllRightUint8x16(v *Value) bool {
  5430  	v_1 := v.Args[1]
  5431  	v_0 := v.Args[0]
  5432  	b := v.Block
  5433  	typ := &b.Func.Config.Types
  5434  	// match: (ShiftAllRightUint8x16 x d:(Const64 [c]))
  5435  	// cond: uint64(c) < 8
  5436  	// result: (I8x16ShrU x (I64Const [c]))
  5437  	for {
  5438  		x := v_0
  5439  		d := v_1
  5440  		if d.Op != OpConst64 {
  5441  			break
  5442  		}
  5443  		c := auxIntToInt64(d.AuxInt)
  5444  		if !(uint64(c) < 8) {
  5445  			break
  5446  		}
  5447  		v.reset(OpWasmI8x16ShrU)
  5448  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5449  		v0.AuxInt = int64ToAuxInt(c)
  5450  		v.AddArg2(x, v0)
  5451  		return true
  5452  	}
  5453  	// match: (ShiftAllRightUint8x16 x d:(I64Const [c]))
  5454  	// cond: uint64(c) < 8
  5455  	// result: (I8x16ShrU x d)
  5456  	for {
  5457  		x := v_0
  5458  		d := v_1
  5459  		if d.Op != OpWasmI64Const {
  5460  			break
  5461  		}
  5462  		c := auxIntToInt64(d.AuxInt)
  5463  		if !(uint64(c) < 8) {
  5464  			break
  5465  		}
  5466  		v.reset(OpWasmI8x16ShrU)
  5467  		v.AddArg2(x, d)
  5468  		return true
  5469  	}
  5470  	// match: (ShiftAllRightUint8x16 x y)
  5471  	// result: (SelectV (I8x16ShrU x y) (V128Xor x x) (I64LtU y (I64Const [8])))
  5472  	for {
  5473  		x := v_0
  5474  		y := v_1
  5475  		v.reset(OpWasmSelectV)
  5476  		v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
  5477  		v0.AddArg2(x, y)
  5478  		v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
  5479  		v1.AddArg2(x, x)
  5480  		v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
  5481  		v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5482  		v3.AuxInt = int64ToAuxInt(8)
  5483  		v2.AddArg2(y, v3)
  5484  		v.AddArg3(v0, v1, v2)
  5485  		return true
  5486  	}
  5487  }
  5488  func rewriteValueWasm_OpSignExt16to32(v *Value) bool {
  5489  	v_0 := v.Args[0]
  5490  	// match: (SignExt16to32 x:(I64Load16S _ _))
  5491  	// result: x
  5492  	for {
  5493  		x := v_0
  5494  		if x.Op != OpWasmI64Load16S {
  5495  			break
  5496  		}
  5497  		v.copyOf(x)
  5498  		return true
  5499  	}
  5500  	// match: (SignExt16to32 x)
  5501  	// result: (I64Extend16S x)
  5502  	for {
  5503  		x := v_0
  5504  		v.reset(OpWasmI64Extend16S)
  5505  		v.AddArg(x)
  5506  		return true
  5507  	}
  5508  }
  5509  func rewriteValueWasm_OpSignExt16to64(v *Value) bool {
  5510  	v_0 := v.Args[0]
  5511  	// match: (SignExt16to64 x:(I64Load16S _ _))
  5512  	// result: x
  5513  	for {
  5514  		x := v_0
  5515  		if x.Op != OpWasmI64Load16S {
  5516  			break
  5517  		}
  5518  		v.copyOf(x)
  5519  		return true
  5520  	}
  5521  	// match: (SignExt16to64 x)
  5522  	// result: (I64Extend16S x)
  5523  	for {
  5524  		x := v_0
  5525  		v.reset(OpWasmI64Extend16S)
  5526  		v.AddArg(x)
  5527  		return true
  5528  	}
  5529  }
  5530  func rewriteValueWasm_OpSignExt32to64(v *Value) bool {
  5531  	v_0 := v.Args[0]
  5532  	// match: (SignExt32to64 x:(I64Load32S _ _))
  5533  	// result: x
  5534  	for {
  5535  		x := v_0
  5536  		if x.Op != OpWasmI64Load32S {
  5537  			break
  5538  		}
  5539  		v.copyOf(x)
  5540  		return true
  5541  	}
  5542  	// match: (SignExt32to64 x)
  5543  	// result: (I64Extend32S x)
  5544  	for {
  5545  		x := v_0
  5546  		v.reset(OpWasmI64Extend32S)
  5547  		v.AddArg(x)
  5548  		return true
  5549  	}
  5550  }
  5551  func rewriteValueWasm_OpSignExt8to16(v *Value) bool {
  5552  	v_0 := v.Args[0]
  5553  	// match: (SignExt8to16 x:(I64Load8S _ _))
  5554  	// result: x
  5555  	for {
  5556  		x := v_0
  5557  		if x.Op != OpWasmI64Load8S {
  5558  			break
  5559  		}
  5560  		v.copyOf(x)
  5561  		return true
  5562  	}
  5563  	// match: (SignExt8to16 x)
  5564  	// result: (I64Extend8S x)
  5565  	for {
  5566  		x := v_0
  5567  		v.reset(OpWasmI64Extend8S)
  5568  		v.AddArg(x)
  5569  		return true
  5570  	}
  5571  }
  5572  func rewriteValueWasm_OpSignExt8to32(v *Value) bool {
  5573  	v_0 := v.Args[0]
  5574  	// match: (SignExt8to32 x:(I64Load8S _ _))
  5575  	// result: x
  5576  	for {
  5577  		x := v_0
  5578  		if x.Op != OpWasmI64Load8S {
  5579  			break
  5580  		}
  5581  		v.copyOf(x)
  5582  		return true
  5583  	}
  5584  	// match: (SignExt8to32 x)
  5585  	// result: (I64Extend8S x)
  5586  	for {
  5587  		x := v_0
  5588  		v.reset(OpWasmI64Extend8S)
  5589  		v.AddArg(x)
  5590  		return true
  5591  	}
  5592  }
  5593  func rewriteValueWasm_OpSignExt8to64(v *Value) bool {
  5594  	v_0 := v.Args[0]
  5595  	// match: (SignExt8to64 x:(I64Load8S _ _))
  5596  	// result: x
  5597  	for {
  5598  		x := v_0
  5599  		if x.Op != OpWasmI64Load8S {
  5600  			break
  5601  		}
  5602  		v.copyOf(x)
  5603  		return true
  5604  	}
  5605  	// match: (SignExt8to64 x)
  5606  	// result: (I64Extend8S x)
  5607  	for {
  5608  		x := v_0
  5609  		v.reset(OpWasmI64Extend8S)
  5610  		v.AddArg(x)
  5611  		return true
  5612  	}
  5613  }
  5614  func rewriteValueWasm_OpSlicemask(v *Value) bool {
  5615  	v_0 := v.Args[0]
  5616  	b := v.Block
  5617  	typ := &b.Func.Config.Types
  5618  	// match: (Slicemask x)
  5619  	// result: (I64ShrS (I64Sub (I64Const [0]) x) (I64Const [63]))
  5620  	for {
  5621  		x := v_0
  5622  		v.reset(OpWasmI64ShrS)
  5623  		v0 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
  5624  		v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5625  		v1.AuxInt = int64ToAuxInt(0)
  5626  		v0.AddArg2(v1, x)
  5627  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5628  		v2.AuxInt = int64ToAuxInt(63)
  5629  		v.AddArg2(v0, v2)
  5630  		return true
  5631  	}
  5632  }
  5633  func rewriteValueWasm_OpStore(v *Value) bool {
  5634  	v_2 := v.Args[2]
  5635  	v_1 := v.Args[1]
  5636  	v_0 := v.Args[0]
  5637  	// match: (Store {t} ptr val mem)
  5638  	// cond: is64BitFloat(t)
  5639  	// result: (F64Store ptr val mem)
  5640  	for {
  5641  		t := auxToType(v.Aux)
  5642  		ptr := v_0
  5643  		val := v_1
  5644  		mem := v_2
  5645  		if !(is64BitFloat(t)) {
  5646  			break
  5647  		}
  5648  		v.reset(OpWasmF64Store)
  5649  		v.AddArg3(ptr, val, mem)
  5650  		return true
  5651  	}
  5652  	// match: (Store {t} ptr val mem)
  5653  	// cond: is32BitFloat(t)
  5654  	// result: (F32Store ptr val mem)
  5655  	for {
  5656  		t := auxToType(v.Aux)
  5657  		ptr := v_0
  5658  		val := v_1
  5659  		mem := v_2
  5660  		if !(is32BitFloat(t)) {
  5661  			break
  5662  		}
  5663  		v.reset(OpWasmF32Store)
  5664  		v.AddArg3(ptr, val, mem)
  5665  		return true
  5666  	}
  5667  	// match: (Store {t} ptr val mem)
  5668  	// cond: t.Size() == 16
  5669  	// result: (V128Store ptr val mem)
  5670  	for {
  5671  		t := auxToType(v.Aux)
  5672  		ptr := v_0
  5673  		val := v_1
  5674  		mem := v_2
  5675  		if !(t.Size() == 16) {
  5676  			break
  5677  		}
  5678  		v.reset(OpWasmV128Store)
  5679  		v.AddArg3(ptr, val, mem)
  5680  		return true
  5681  	}
  5682  	// match: (Store {t} ptr val mem)
  5683  	// cond: t.Size() == 8
  5684  	// result: (I64Store ptr val mem)
  5685  	for {
  5686  		t := auxToType(v.Aux)
  5687  		ptr := v_0
  5688  		val := v_1
  5689  		mem := v_2
  5690  		if !(t.Size() == 8) {
  5691  			break
  5692  		}
  5693  		v.reset(OpWasmI64Store)
  5694  		v.AddArg3(ptr, val, mem)
  5695  		return true
  5696  	}
  5697  	// match: (Store {t} ptr val mem)
  5698  	// cond: t.Size() == 4
  5699  	// result: (I64Store32 ptr val mem)
  5700  	for {
  5701  		t := auxToType(v.Aux)
  5702  		ptr := v_0
  5703  		val := v_1
  5704  		mem := v_2
  5705  		if !(t.Size() == 4) {
  5706  			break
  5707  		}
  5708  		v.reset(OpWasmI64Store32)
  5709  		v.AddArg3(ptr, val, mem)
  5710  		return true
  5711  	}
  5712  	// match: (Store {t} ptr val mem)
  5713  	// cond: t.Size() == 2
  5714  	// result: (I64Store16 ptr val mem)
  5715  	for {
  5716  		t := auxToType(v.Aux)
  5717  		ptr := v_0
  5718  		val := v_1
  5719  		mem := v_2
  5720  		if !(t.Size() == 2) {
  5721  			break
  5722  		}
  5723  		v.reset(OpWasmI64Store16)
  5724  		v.AddArg3(ptr, val, mem)
  5725  		return true
  5726  	}
  5727  	// match: (Store {t} ptr val mem)
  5728  	// cond: t.Size() == 1
  5729  	// result: (I64Store8 ptr val mem)
  5730  	for {
  5731  		t := auxToType(v.Aux)
  5732  		ptr := v_0
  5733  		val := v_1
  5734  		mem := v_2
  5735  		if !(t.Size() == 1) {
  5736  			break
  5737  		}
  5738  		v.reset(OpWasmI64Store8)
  5739  		v.AddArg3(ptr, val, mem)
  5740  		return true
  5741  	}
  5742  	return false
  5743  }
  5744  func rewriteValueWasm_OpWasmF32DemoteF64(v *Value) bool {
  5745  	v_0 := v.Args[0]
  5746  	// match: (F32DemoteF64 (F64Sqrt (F64PromoteF32 x)))
  5747  	// result: (F32Sqrt x)
  5748  	for {
  5749  		if v_0.Op != OpWasmF64Sqrt {
  5750  			break
  5751  		}
  5752  		v_0_0 := v_0.Args[0]
  5753  		if v_0_0.Op != OpWasmF64PromoteF32 {
  5754  			break
  5755  		}
  5756  		x := v_0_0.Args[0]
  5757  		v.reset(OpWasmF32Sqrt)
  5758  		v.AddArg(x)
  5759  		return true
  5760  	}
  5761  	// match: (F32DemoteF64 (F64Trunc (F64PromoteF32 x)))
  5762  	// result: (F32Trunc x)
  5763  	for {
  5764  		if v_0.Op != OpWasmF64Trunc {
  5765  			break
  5766  		}
  5767  		v_0_0 := v_0.Args[0]
  5768  		if v_0_0.Op != OpWasmF64PromoteF32 {
  5769  			break
  5770  		}
  5771  		x := v_0_0.Args[0]
  5772  		v.reset(OpWasmF32Trunc)
  5773  		v.AddArg(x)
  5774  		return true
  5775  	}
  5776  	// match: (F32DemoteF64 (F64Ceil (F64PromoteF32 x)))
  5777  	// result: (F32Ceil x)
  5778  	for {
  5779  		if v_0.Op != OpWasmF64Ceil {
  5780  			break
  5781  		}
  5782  		v_0_0 := v_0.Args[0]
  5783  		if v_0_0.Op != OpWasmF64PromoteF32 {
  5784  			break
  5785  		}
  5786  		x := v_0_0.Args[0]
  5787  		v.reset(OpWasmF32Ceil)
  5788  		v.AddArg(x)
  5789  		return true
  5790  	}
  5791  	// match: (F32DemoteF64 (F64Floor (F64PromoteF32 x)))
  5792  	// result: (F32Floor x)
  5793  	for {
  5794  		if v_0.Op != OpWasmF64Floor {
  5795  			break
  5796  		}
  5797  		v_0_0 := v_0.Args[0]
  5798  		if v_0_0.Op != OpWasmF64PromoteF32 {
  5799  			break
  5800  		}
  5801  		x := v_0_0.Args[0]
  5802  		v.reset(OpWasmF32Floor)
  5803  		v.AddArg(x)
  5804  		return true
  5805  	}
  5806  	// match: (F32DemoteF64 (F64Nearest (F64PromoteF32 x)))
  5807  	// result: (F32Nearest x)
  5808  	for {
  5809  		if v_0.Op != OpWasmF64Nearest {
  5810  			break
  5811  		}
  5812  		v_0_0 := v_0.Args[0]
  5813  		if v_0_0.Op != OpWasmF64PromoteF32 {
  5814  			break
  5815  		}
  5816  		x := v_0_0.Args[0]
  5817  		v.reset(OpWasmF32Nearest)
  5818  		v.AddArg(x)
  5819  		return true
  5820  	}
  5821  	// match: (F32DemoteF64 (F64Abs (F64PromoteF32 x)))
  5822  	// result: (F32Abs x)
  5823  	for {
  5824  		if v_0.Op != OpWasmF64Abs {
  5825  			break
  5826  		}
  5827  		v_0_0 := v_0.Args[0]
  5828  		if v_0_0.Op != OpWasmF64PromoteF32 {
  5829  			break
  5830  		}
  5831  		x := v_0_0.Args[0]
  5832  		v.reset(OpWasmF32Abs)
  5833  		v.AddArg(x)
  5834  		return true
  5835  	}
  5836  	// match: (F32DemoteF64 (F64Copysign (F64PromoteF32 x) (F64PromoteF32 y)))
  5837  	// result: (F32Copysign x y)
  5838  	for {
  5839  		if v_0.Op != OpWasmF64Copysign {
  5840  			break
  5841  		}
  5842  		_ = v_0.Args[1]
  5843  		v_0_0 := v_0.Args[0]
  5844  		if v_0_0.Op != OpWasmF64PromoteF32 {
  5845  			break
  5846  		}
  5847  		x := v_0_0.Args[0]
  5848  		v_0_1 := v_0.Args[1]
  5849  		if v_0_1.Op != OpWasmF64PromoteF32 {
  5850  			break
  5851  		}
  5852  		y := v_0_1.Args[0]
  5853  		v.reset(OpWasmF32Copysign)
  5854  		v.AddArg2(x, y)
  5855  		return true
  5856  	}
  5857  	return false
  5858  }
  5859  func rewriteValueWasm_OpWasmF64Add(v *Value) bool {
  5860  	v_1 := v.Args[1]
  5861  	v_0 := v.Args[0]
  5862  	b := v.Block
  5863  	typ := &b.Func.Config.Types
  5864  	// match: (F64Add (F64Const [x]) (F64Const [y]))
  5865  	// result: (F64Const [x + y])
  5866  	for {
  5867  		if v_0.Op != OpWasmF64Const {
  5868  			break
  5869  		}
  5870  		x := auxIntToFloat64(v_0.AuxInt)
  5871  		if v_1.Op != OpWasmF64Const {
  5872  			break
  5873  		}
  5874  		y := auxIntToFloat64(v_1.AuxInt)
  5875  		v.reset(OpWasmF64Const)
  5876  		v.AuxInt = float64ToAuxInt(x + y)
  5877  		return true
  5878  	}
  5879  	// match: (F64Add (F64Const [x]) y)
  5880  	// cond: y.Op != OpWasmF64Const
  5881  	// result: (F64Add y (F64Const [x]))
  5882  	for {
  5883  		if v_0.Op != OpWasmF64Const {
  5884  			break
  5885  		}
  5886  		x := auxIntToFloat64(v_0.AuxInt)
  5887  		y := v_1
  5888  		if !(y.Op != OpWasmF64Const) {
  5889  			break
  5890  		}
  5891  		v.reset(OpWasmF64Add)
  5892  		v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
  5893  		v0.AuxInt = float64ToAuxInt(x)
  5894  		v.AddArg2(y, v0)
  5895  		return true
  5896  	}
  5897  	return false
  5898  }
  5899  func rewriteValueWasm_OpWasmF64Mul(v *Value) bool {
  5900  	v_1 := v.Args[1]
  5901  	v_0 := v.Args[0]
  5902  	b := v.Block
  5903  	typ := &b.Func.Config.Types
  5904  	// match: (F64Mul (F64Const [x]) (F64Const [y]))
  5905  	// cond: !math.IsNaN(x * y)
  5906  	// result: (F64Const [x * y])
  5907  	for {
  5908  		if v_0.Op != OpWasmF64Const {
  5909  			break
  5910  		}
  5911  		x := auxIntToFloat64(v_0.AuxInt)
  5912  		if v_1.Op != OpWasmF64Const {
  5913  			break
  5914  		}
  5915  		y := auxIntToFloat64(v_1.AuxInt)
  5916  		if !(!math.IsNaN(x * y)) {
  5917  			break
  5918  		}
  5919  		v.reset(OpWasmF64Const)
  5920  		v.AuxInt = float64ToAuxInt(x * y)
  5921  		return true
  5922  	}
  5923  	// match: (F64Mul (F64Const [x]) y)
  5924  	// cond: y.Op != OpWasmF64Const
  5925  	// result: (F64Mul y (F64Const [x]))
  5926  	for {
  5927  		if v_0.Op != OpWasmF64Const {
  5928  			break
  5929  		}
  5930  		x := auxIntToFloat64(v_0.AuxInt)
  5931  		y := v_1
  5932  		if !(y.Op != OpWasmF64Const) {
  5933  			break
  5934  		}
  5935  		v.reset(OpWasmF64Mul)
  5936  		v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
  5937  		v0.AuxInt = float64ToAuxInt(x)
  5938  		v.AddArg2(y, v0)
  5939  		return true
  5940  	}
  5941  	return false
  5942  }
  5943  func rewriteValueWasm_OpWasmI64Add(v *Value) bool {
  5944  	v_1 := v.Args[1]
  5945  	v_0 := v.Args[0]
  5946  	b := v.Block
  5947  	typ := &b.Func.Config.Types
  5948  	// match: (I64Add (I64Const [x]) (I64Const [y]))
  5949  	// result: (I64Const [x + y])
  5950  	for {
  5951  		if v_0.Op != OpWasmI64Const {
  5952  			break
  5953  		}
  5954  		x := auxIntToInt64(v_0.AuxInt)
  5955  		if v_1.Op != OpWasmI64Const {
  5956  			break
  5957  		}
  5958  		y := auxIntToInt64(v_1.AuxInt)
  5959  		v.reset(OpWasmI64Const)
  5960  		v.AuxInt = int64ToAuxInt(x + y)
  5961  		return true
  5962  	}
  5963  	// match: (I64Add (I64Const [x]) y)
  5964  	// cond: y.Op != OpWasmI64Const
  5965  	// result: (I64Add y (I64Const [x]))
  5966  	for {
  5967  		if v_0.Op != OpWasmI64Const {
  5968  			break
  5969  		}
  5970  		x := auxIntToInt64(v_0.AuxInt)
  5971  		y := v_1
  5972  		if !(y.Op != OpWasmI64Const) {
  5973  			break
  5974  		}
  5975  		v.reset(OpWasmI64Add)
  5976  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  5977  		v0.AuxInt = int64ToAuxInt(x)
  5978  		v.AddArg2(y, v0)
  5979  		return true
  5980  	}
  5981  	// match: (I64Add x (I64Const <t> [y]))
  5982  	// cond: !t.IsPtr()
  5983  	// result: (I64AddConst [y] x)
  5984  	for {
  5985  		x := v_0
  5986  		if v_1.Op != OpWasmI64Const {
  5987  			break
  5988  		}
  5989  		t := v_1.Type
  5990  		y := auxIntToInt64(v_1.AuxInt)
  5991  		if !(!t.IsPtr()) {
  5992  			break
  5993  		}
  5994  		v.reset(OpWasmI64AddConst)
  5995  		v.AuxInt = int64ToAuxInt(y)
  5996  		v.AddArg(x)
  5997  		return true
  5998  	}
  5999  	return false
  6000  }
  6001  func rewriteValueWasm_OpWasmI64AddConst(v *Value) bool {
  6002  	v_0 := v.Args[0]
  6003  	// match: (I64AddConst [0] x)
  6004  	// result: x
  6005  	for {
  6006  		if auxIntToInt64(v.AuxInt) != 0 {
  6007  			break
  6008  		}
  6009  		x := v_0
  6010  		v.copyOf(x)
  6011  		return true
  6012  	}
  6013  	// match: (I64AddConst [off] (LoweredAddr {sym} [off2] base))
  6014  	// cond: isU32Bit(off+int64(off2))
  6015  	// result: (LoweredAddr {sym} [int32(off)+off2] base)
  6016  	for {
  6017  		off := auxIntToInt64(v.AuxInt)
  6018  		if v_0.Op != OpWasmLoweredAddr {
  6019  			break
  6020  		}
  6021  		off2 := auxIntToInt32(v_0.AuxInt)
  6022  		sym := auxToSym(v_0.Aux)
  6023  		base := v_0.Args[0]
  6024  		if !(isU32Bit(off + int64(off2))) {
  6025  			break
  6026  		}
  6027  		v.reset(OpWasmLoweredAddr)
  6028  		v.AuxInt = int32ToAuxInt(int32(off) + off2)
  6029  		v.Aux = symToAux(sym)
  6030  		v.AddArg(base)
  6031  		return true
  6032  	}
  6033  	// match: (I64AddConst [off] x:(SP))
  6034  	// cond: isU32Bit(off)
  6035  	// result: (LoweredAddr [int32(off)] x)
  6036  	for {
  6037  		off := auxIntToInt64(v.AuxInt)
  6038  		x := v_0
  6039  		if x.Op != OpSP || !(isU32Bit(off)) {
  6040  			break
  6041  		}
  6042  		v.reset(OpWasmLoweredAddr)
  6043  		v.AuxInt = int32ToAuxInt(int32(off))
  6044  		v.AddArg(x)
  6045  		return true
  6046  	}
  6047  	return false
  6048  }
  6049  func rewriteValueWasm_OpWasmI64And(v *Value) bool {
  6050  	v_1 := v.Args[1]
  6051  	v_0 := v.Args[0]
  6052  	b := v.Block
  6053  	typ := &b.Func.Config.Types
  6054  	// match: (I64And (I64Const [x]) (I64Const [y]))
  6055  	// result: (I64Const [x & y])
  6056  	for {
  6057  		if v_0.Op != OpWasmI64Const {
  6058  			break
  6059  		}
  6060  		x := auxIntToInt64(v_0.AuxInt)
  6061  		if v_1.Op != OpWasmI64Const {
  6062  			break
  6063  		}
  6064  		y := auxIntToInt64(v_1.AuxInt)
  6065  		v.reset(OpWasmI64Const)
  6066  		v.AuxInt = int64ToAuxInt(x & y)
  6067  		return true
  6068  	}
  6069  	// match: (I64And x (I64Const [-1]))
  6070  	// result: x
  6071  	for {
  6072  		x := v_0
  6073  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != -1 {
  6074  			break
  6075  		}
  6076  		v.copyOf(x)
  6077  		return true
  6078  	}
  6079  	// match: (I64And x (I64Const [0]))
  6080  	// result: (I64Const [0])
  6081  	for {
  6082  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  6083  			break
  6084  		}
  6085  		v.reset(OpWasmI64Const)
  6086  		v.AuxInt = int64ToAuxInt(0)
  6087  		return true
  6088  	}
  6089  	// match: (I64And (I64And x (I64Const [c1])) (I64Const [c2]))
  6090  	// result: (I64And x (I64Const [c1 & c2]))
  6091  	for {
  6092  		if v_0.Op != OpWasmI64And {
  6093  			break
  6094  		}
  6095  		_ = v_0.Args[1]
  6096  		x := v_0.Args[0]
  6097  		v_0_1 := v_0.Args[1]
  6098  		if v_0_1.Op != OpWasmI64Const {
  6099  			break
  6100  		}
  6101  		c1 := auxIntToInt64(v_0_1.AuxInt)
  6102  		if v_1.Op != OpWasmI64Const {
  6103  			break
  6104  		}
  6105  		c2 := auxIntToInt64(v_1.AuxInt)
  6106  		v.reset(OpWasmI64And)
  6107  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  6108  		v0.AuxInt = int64ToAuxInt(c1 & c2)
  6109  		v.AddArg2(x, v0)
  6110  		return true
  6111  	}
  6112  	// match: (I64And (I64Const [x]) y)
  6113  	// cond: y.Op != OpWasmI64Const
  6114  	// result: (I64And y (I64Const [x]))
  6115  	for {
  6116  		if v_0.Op != OpWasmI64Const {
  6117  			break
  6118  		}
  6119  		x := auxIntToInt64(v_0.AuxInt)
  6120  		y := v_1
  6121  		if !(y.Op != OpWasmI64Const) {
  6122  			break
  6123  		}
  6124  		v.reset(OpWasmI64And)
  6125  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  6126  		v0.AuxInt = int64ToAuxInt(x)
  6127  		v.AddArg2(y, v0)
  6128  		return true
  6129  	}
  6130  	return false
  6131  }
  6132  func rewriteValueWasm_OpWasmI64Eq(v *Value) bool {
  6133  	v_1 := v.Args[1]
  6134  	v_0 := v.Args[0]
  6135  	b := v.Block
  6136  	typ := &b.Func.Config.Types
  6137  	// match: (I64Eq (I64Const [x]) (I64Const [y]))
  6138  	// cond: x == y
  6139  	// result: (I64Const [1])
  6140  	for {
  6141  		if v_0.Op != OpWasmI64Const {
  6142  			break
  6143  		}
  6144  		x := auxIntToInt64(v_0.AuxInt)
  6145  		if v_1.Op != OpWasmI64Const {
  6146  			break
  6147  		}
  6148  		y := auxIntToInt64(v_1.AuxInt)
  6149  		if !(x == y) {
  6150  			break
  6151  		}
  6152  		v.reset(OpWasmI64Const)
  6153  		v.AuxInt = int64ToAuxInt(1)
  6154  		return true
  6155  	}
  6156  	// match: (I64Eq (I64Const [x]) (I64Const [y]))
  6157  	// cond: x != y
  6158  	// result: (I64Const [0])
  6159  	for {
  6160  		if v_0.Op != OpWasmI64Const {
  6161  			break
  6162  		}
  6163  		x := auxIntToInt64(v_0.AuxInt)
  6164  		if v_1.Op != OpWasmI64Const {
  6165  			break
  6166  		}
  6167  		y := auxIntToInt64(v_1.AuxInt)
  6168  		if !(x != y) {
  6169  			break
  6170  		}
  6171  		v.reset(OpWasmI64Const)
  6172  		v.AuxInt = int64ToAuxInt(0)
  6173  		return true
  6174  	}
  6175  	// match: (I64Eq (I64Const [x]) y)
  6176  	// cond: y.Op != OpWasmI64Const
  6177  	// result: (I64Eq y (I64Const [x]))
  6178  	for {
  6179  		if v_0.Op != OpWasmI64Const {
  6180  			break
  6181  		}
  6182  		x := auxIntToInt64(v_0.AuxInt)
  6183  		y := v_1
  6184  		if !(y.Op != OpWasmI64Const) {
  6185  			break
  6186  		}
  6187  		v.reset(OpWasmI64Eq)
  6188  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  6189  		v0.AuxInt = int64ToAuxInt(x)
  6190  		v.AddArg2(y, v0)
  6191  		return true
  6192  	}
  6193  	// match: (I64Eq x (I64Const [0]))
  6194  	// result: (I64Eqz x)
  6195  	for {
  6196  		x := v_0
  6197  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  6198  			break
  6199  		}
  6200  		v.reset(OpWasmI64Eqz)
  6201  		v.AddArg(x)
  6202  		return true
  6203  	}
  6204  	return false
  6205  }
  6206  func rewriteValueWasm_OpWasmI64Eqz(v *Value) bool {
  6207  	v_0 := v.Args[0]
  6208  	// match: (I64Eqz (I64Eqz (I64Eqz x)))
  6209  	// result: (I64Eqz x)
  6210  	for {
  6211  		if v_0.Op != OpWasmI64Eqz {
  6212  			break
  6213  		}
  6214  		v_0_0 := v_0.Args[0]
  6215  		if v_0_0.Op != OpWasmI64Eqz {
  6216  			break
  6217  		}
  6218  		x := v_0_0.Args[0]
  6219  		v.reset(OpWasmI64Eqz)
  6220  		v.AddArg(x)
  6221  		return true
  6222  	}
  6223  	return false
  6224  }
  6225  func rewriteValueWasm_OpWasmI64Extend16S(v *Value) bool {
  6226  	v_0 := v.Args[0]
  6227  	// match: (I64Extend16S (I64Extend16S x))
  6228  	// result: (I64Extend16S x)
  6229  	for {
  6230  		if v_0.Op != OpWasmI64Extend16S {
  6231  			break
  6232  		}
  6233  		x := v_0.Args[0]
  6234  		v.reset(OpWasmI64Extend16S)
  6235  		v.AddArg(x)
  6236  		return true
  6237  	}
  6238  	// match: (I64Extend16S (I64Extend8S x))
  6239  	// result: (I64Extend8S x)
  6240  	for {
  6241  		if v_0.Op != OpWasmI64Extend8S {
  6242  			break
  6243  		}
  6244  		x := v_0.Args[0]
  6245  		v.reset(OpWasmI64Extend8S)
  6246  		v.AddArg(x)
  6247  		return true
  6248  	}
  6249  	// match: (I64Extend16S x:(I64And _ (I64Const [c])))
  6250  	// cond: c >= 0 && int64(int16(c)) == c
  6251  	// result: x
  6252  	for {
  6253  		x := v_0
  6254  		if x.Op != OpWasmI64And {
  6255  			break
  6256  		}
  6257  		_ = x.Args[1]
  6258  		x_1 := x.Args[1]
  6259  		if x_1.Op != OpWasmI64Const {
  6260  			break
  6261  		}
  6262  		c := auxIntToInt64(x_1.AuxInt)
  6263  		if !(c >= 0 && int64(int16(c)) == c) {
  6264  			break
  6265  		}
  6266  		v.copyOf(x)
  6267  		return true
  6268  	}
  6269  	return false
  6270  }
  6271  func rewriteValueWasm_OpWasmI64Extend32S(v *Value) bool {
  6272  	v_0 := v.Args[0]
  6273  	// match: (I64Extend32S (I64Extend32S x))
  6274  	// result: (I64Extend32S x)
  6275  	for {
  6276  		if v_0.Op != OpWasmI64Extend32S {
  6277  			break
  6278  		}
  6279  		x := v_0.Args[0]
  6280  		v.reset(OpWasmI64Extend32S)
  6281  		v.AddArg(x)
  6282  		return true
  6283  	}
  6284  	// match: (I64Extend32S (I64Extend16S x))
  6285  	// result: (I64Extend16S x)
  6286  	for {
  6287  		if v_0.Op != OpWasmI64Extend16S {
  6288  			break
  6289  		}
  6290  		x := v_0.Args[0]
  6291  		v.reset(OpWasmI64Extend16S)
  6292  		v.AddArg(x)
  6293  		return true
  6294  	}
  6295  	// match: (I64Extend32S (I64Extend8S x))
  6296  	// result: (I64Extend8S x)
  6297  	for {
  6298  		if v_0.Op != OpWasmI64Extend8S {
  6299  			break
  6300  		}
  6301  		x := v_0.Args[0]
  6302  		v.reset(OpWasmI64Extend8S)
  6303  		v.AddArg(x)
  6304  		return true
  6305  	}
  6306  	// match: (I64Extend32S x:(I64And _ (I64Const [c])))
  6307  	// cond: c >= 0 && int64(int32(c)) == c
  6308  	// result: x
  6309  	for {
  6310  		x := v_0
  6311  		if x.Op != OpWasmI64And {
  6312  			break
  6313  		}
  6314  		_ = x.Args[1]
  6315  		x_1 := x.Args[1]
  6316  		if x_1.Op != OpWasmI64Const {
  6317  			break
  6318  		}
  6319  		c := auxIntToInt64(x_1.AuxInt)
  6320  		if !(c >= 0 && int64(int32(c)) == c) {
  6321  			break
  6322  		}
  6323  		v.copyOf(x)
  6324  		return true
  6325  	}
  6326  	return false
  6327  }
  6328  func rewriteValueWasm_OpWasmI64Extend8S(v *Value) bool {
  6329  	v_0 := v.Args[0]
  6330  	// match: (I64Extend8S (I64Extend8S x))
  6331  	// result: (I64Extend8S x)
  6332  	for {
  6333  		if v_0.Op != OpWasmI64Extend8S {
  6334  			break
  6335  		}
  6336  		x := v_0.Args[0]
  6337  		v.reset(OpWasmI64Extend8S)
  6338  		v.AddArg(x)
  6339  		return true
  6340  	}
  6341  	// match: (I64Extend8S x:(I64And _ (I64Const [c])))
  6342  	// cond: c >= 0 && int64(int8(c)) == c
  6343  	// result: x
  6344  	for {
  6345  		x := v_0
  6346  		if x.Op != OpWasmI64And {
  6347  			break
  6348  		}
  6349  		_ = x.Args[1]
  6350  		x_1 := x.Args[1]
  6351  		if x_1.Op != OpWasmI64Const {
  6352  			break
  6353  		}
  6354  		c := auxIntToInt64(x_1.AuxInt)
  6355  		if !(c >= 0 && int64(int8(c)) == c) {
  6356  			break
  6357  		}
  6358  		v.copyOf(x)
  6359  		return true
  6360  	}
  6361  	return false
  6362  }
  6363  func rewriteValueWasm_OpWasmI64LeU(v *Value) bool {
  6364  	v_1 := v.Args[1]
  6365  	v_0 := v.Args[0]
  6366  	b := v.Block
  6367  	typ := &b.Func.Config.Types
  6368  	// match: (I64LeU x (I64Const [0]))
  6369  	// result: (I64Eqz x)
  6370  	for {
  6371  		x := v_0
  6372  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  6373  			break
  6374  		}
  6375  		v.reset(OpWasmI64Eqz)
  6376  		v.AddArg(x)
  6377  		return true
  6378  	}
  6379  	// match: (I64LeU (I64Const [1]) x)
  6380  	// result: (I64Eqz (I64Eqz x))
  6381  	for {
  6382  		if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 1 {
  6383  			break
  6384  		}
  6385  		x := v_1
  6386  		v.reset(OpWasmI64Eqz)
  6387  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  6388  		v0.AddArg(x)
  6389  		v.AddArg(v0)
  6390  		return true
  6391  	}
  6392  	return false
  6393  }
  6394  func rewriteValueWasm_OpWasmI64Load(v *Value) bool {
  6395  	v_1 := v.Args[1]
  6396  	v_0 := v.Args[0]
  6397  	b := v.Block
  6398  	config := b.Func.Config
  6399  	// match: (I64Load [off] (I64AddConst [off2] ptr) mem)
  6400  	// cond: isU32Bit(off+off2)
  6401  	// result: (I64Load [off+off2] ptr mem)
  6402  	for {
  6403  		off := auxIntToInt64(v.AuxInt)
  6404  		if v_0.Op != OpWasmI64AddConst {
  6405  			break
  6406  		}
  6407  		off2 := auxIntToInt64(v_0.AuxInt)
  6408  		ptr := v_0.Args[0]
  6409  		mem := v_1
  6410  		if !(isU32Bit(off + off2)) {
  6411  			break
  6412  		}
  6413  		v.reset(OpWasmI64Load)
  6414  		v.AuxInt = int64ToAuxInt(off + off2)
  6415  		v.AddArg2(ptr, mem)
  6416  		return true
  6417  	}
  6418  	// match: (I64Load [off] (LoweredAddr {sym} [off2] (SB)) _)
  6419  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  6420  	// result: (I64Const [int64(read64(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))])
  6421  	for {
  6422  		off := auxIntToInt64(v.AuxInt)
  6423  		if v_0.Op != OpWasmLoweredAddr {
  6424  			break
  6425  		}
  6426  		off2 := auxIntToInt32(v_0.AuxInt)
  6427  		sym := auxToSym(v_0.Aux)
  6428  		v_0_0 := v_0.Args[0]
  6429  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  6430  			break
  6431  		}
  6432  		v.reset(OpWasmI64Const)
  6433  		v.AuxInt = int64ToAuxInt(int64(read64(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
  6434  		return true
  6435  	}
  6436  	return false
  6437  }
  6438  func rewriteValueWasm_OpWasmI64Load16S(v *Value) bool {
  6439  	v_1 := v.Args[1]
  6440  	v_0 := v.Args[0]
  6441  	b := v.Block
  6442  	config := b.Func.Config
  6443  	// match: (I64Load16S [off] (I64AddConst [off2] ptr) mem)
  6444  	// cond: isU32Bit(off+off2)
  6445  	// result: (I64Load16S [off+off2] ptr mem)
  6446  	for {
  6447  		off := auxIntToInt64(v.AuxInt)
  6448  		if v_0.Op != OpWasmI64AddConst {
  6449  			break
  6450  		}
  6451  		off2 := auxIntToInt64(v_0.AuxInt)
  6452  		ptr := v_0.Args[0]
  6453  		mem := v_1
  6454  		if !(isU32Bit(off + off2)) {
  6455  			break
  6456  		}
  6457  		v.reset(OpWasmI64Load16S)
  6458  		v.AuxInt = int64ToAuxInt(off + off2)
  6459  		v.AddArg2(ptr, mem)
  6460  		return true
  6461  	}
  6462  	// match: (I64Load16S [off] (LoweredAddr {sym} [off2] (SB)) _)
  6463  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  6464  	// result: (I64Const [int64(int16(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))])
  6465  	for {
  6466  		off := auxIntToInt64(v.AuxInt)
  6467  		if v_0.Op != OpWasmLoweredAddr {
  6468  			break
  6469  		}
  6470  		off2 := auxIntToInt32(v_0.AuxInt)
  6471  		sym := auxToSym(v_0.Aux)
  6472  		v_0_0 := v_0.Args[0]
  6473  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  6474  			break
  6475  		}
  6476  		v.reset(OpWasmI64Const)
  6477  		v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
  6478  		return true
  6479  	}
  6480  	return false
  6481  }
  6482  func rewriteValueWasm_OpWasmI64Load16U(v *Value) bool {
  6483  	v_1 := v.Args[1]
  6484  	v_0 := v.Args[0]
  6485  	b := v.Block
  6486  	config := b.Func.Config
  6487  	// match: (I64Load16U [off] (I64AddConst [off2] ptr) mem)
  6488  	// cond: isU32Bit(off+off2)
  6489  	// result: (I64Load16U [off+off2] ptr mem)
  6490  	for {
  6491  		off := auxIntToInt64(v.AuxInt)
  6492  		if v_0.Op != OpWasmI64AddConst {
  6493  			break
  6494  		}
  6495  		off2 := auxIntToInt64(v_0.AuxInt)
  6496  		ptr := v_0.Args[0]
  6497  		mem := v_1
  6498  		if !(isU32Bit(off + off2)) {
  6499  			break
  6500  		}
  6501  		v.reset(OpWasmI64Load16U)
  6502  		v.AuxInt = int64ToAuxInt(off + off2)
  6503  		v.AddArg2(ptr, mem)
  6504  		return true
  6505  	}
  6506  	// match: (I64Load16U [off] (LoweredAddr {sym} [off2] (SB)) _)
  6507  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  6508  	// result: (I64Const [int64(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))])
  6509  	for {
  6510  		off := auxIntToInt64(v.AuxInt)
  6511  		if v_0.Op != OpWasmLoweredAddr {
  6512  			break
  6513  		}
  6514  		off2 := auxIntToInt32(v_0.AuxInt)
  6515  		sym := auxToSym(v_0.Aux)
  6516  		v_0_0 := v_0.Args[0]
  6517  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  6518  			break
  6519  		}
  6520  		v.reset(OpWasmI64Const)
  6521  		v.AuxInt = int64ToAuxInt(int64(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
  6522  		return true
  6523  	}
  6524  	return false
  6525  }
  6526  func rewriteValueWasm_OpWasmI64Load32S(v *Value) bool {
  6527  	v_1 := v.Args[1]
  6528  	v_0 := v.Args[0]
  6529  	b := v.Block
  6530  	config := b.Func.Config
  6531  	// match: (I64Load32S [off] (I64AddConst [off2] ptr) mem)
  6532  	// cond: isU32Bit(off+off2)
  6533  	// result: (I64Load32S [off+off2] ptr mem)
  6534  	for {
  6535  		off := auxIntToInt64(v.AuxInt)
  6536  		if v_0.Op != OpWasmI64AddConst {
  6537  			break
  6538  		}
  6539  		off2 := auxIntToInt64(v_0.AuxInt)
  6540  		ptr := v_0.Args[0]
  6541  		mem := v_1
  6542  		if !(isU32Bit(off + off2)) {
  6543  			break
  6544  		}
  6545  		v.reset(OpWasmI64Load32S)
  6546  		v.AuxInt = int64ToAuxInt(off + off2)
  6547  		v.AddArg2(ptr, mem)
  6548  		return true
  6549  	}
  6550  	// match: (I64Load32S [off] (LoweredAddr {sym} [off2] (SB)) _)
  6551  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  6552  	// result: (I64Const [int64(int32(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))])
  6553  	for {
  6554  		off := auxIntToInt64(v.AuxInt)
  6555  		if v_0.Op != OpWasmLoweredAddr {
  6556  			break
  6557  		}
  6558  		off2 := auxIntToInt32(v_0.AuxInt)
  6559  		sym := auxToSym(v_0.Aux)
  6560  		v_0_0 := v_0.Args[0]
  6561  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  6562  			break
  6563  		}
  6564  		v.reset(OpWasmI64Const)
  6565  		v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
  6566  		return true
  6567  	}
  6568  	return false
  6569  }
  6570  func rewriteValueWasm_OpWasmI64Load32U(v *Value) bool {
  6571  	v_1 := v.Args[1]
  6572  	v_0 := v.Args[0]
  6573  	b := v.Block
  6574  	config := b.Func.Config
  6575  	// match: (I64Load32U [off] (I64AddConst [off2] ptr) mem)
  6576  	// cond: isU32Bit(off+off2)
  6577  	// result: (I64Load32U [off+off2] ptr mem)
  6578  	for {
  6579  		off := auxIntToInt64(v.AuxInt)
  6580  		if v_0.Op != OpWasmI64AddConst {
  6581  			break
  6582  		}
  6583  		off2 := auxIntToInt64(v_0.AuxInt)
  6584  		ptr := v_0.Args[0]
  6585  		mem := v_1
  6586  		if !(isU32Bit(off + off2)) {
  6587  			break
  6588  		}
  6589  		v.reset(OpWasmI64Load32U)
  6590  		v.AuxInt = int64ToAuxInt(off + off2)
  6591  		v.AddArg2(ptr, mem)
  6592  		return true
  6593  	}
  6594  	// match: (I64Load32U [off] (LoweredAddr {sym} [off2] (SB)) _)
  6595  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  6596  	// result: (I64Const [int64(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))])
  6597  	for {
  6598  		off := auxIntToInt64(v.AuxInt)
  6599  		if v_0.Op != OpWasmLoweredAddr {
  6600  			break
  6601  		}
  6602  		off2 := auxIntToInt32(v_0.AuxInt)
  6603  		sym := auxToSym(v_0.Aux)
  6604  		v_0_0 := v_0.Args[0]
  6605  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  6606  			break
  6607  		}
  6608  		v.reset(OpWasmI64Const)
  6609  		v.AuxInt = int64ToAuxInt(int64(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
  6610  		return true
  6611  	}
  6612  	return false
  6613  }
  6614  func rewriteValueWasm_OpWasmI64Load8S(v *Value) bool {
  6615  	v_1 := v.Args[1]
  6616  	v_0 := v.Args[0]
  6617  	// match: (I64Load8S [off] (I64AddConst [off2] ptr) mem)
  6618  	// cond: isU32Bit(off+off2)
  6619  	// result: (I64Load8S [off+off2] ptr mem)
  6620  	for {
  6621  		off := auxIntToInt64(v.AuxInt)
  6622  		if v_0.Op != OpWasmI64AddConst {
  6623  			break
  6624  		}
  6625  		off2 := auxIntToInt64(v_0.AuxInt)
  6626  		ptr := v_0.Args[0]
  6627  		mem := v_1
  6628  		if !(isU32Bit(off + off2)) {
  6629  			break
  6630  		}
  6631  		v.reset(OpWasmI64Load8S)
  6632  		v.AuxInt = int64ToAuxInt(off + off2)
  6633  		v.AddArg2(ptr, mem)
  6634  		return true
  6635  	}
  6636  	// match: (I64Load8S [off] (LoweredAddr {sym} [off2] (SB)) _)
  6637  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  6638  	// result: (I64Const [int64(int8(read8(sym, off+int64(off2))))])
  6639  	for {
  6640  		off := auxIntToInt64(v.AuxInt)
  6641  		if v_0.Op != OpWasmLoweredAddr {
  6642  			break
  6643  		}
  6644  		off2 := auxIntToInt32(v_0.AuxInt)
  6645  		sym := auxToSym(v_0.Aux)
  6646  		v_0_0 := v_0.Args[0]
  6647  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  6648  			break
  6649  		}
  6650  		v.reset(OpWasmI64Const)
  6651  		v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, off+int64(off2)))))
  6652  		return true
  6653  	}
  6654  	return false
  6655  }
  6656  func rewriteValueWasm_OpWasmI64Load8U(v *Value) bool {
  6657  	v_1 := v.Args[1]
  6658  	v_0 := v.Args[0]
  6659  	// match: (I64Load8U [off] (I64AddConst [off2] ptr) mem)
  6660  	// cond: isU32Bit(off+off2)
  6661  	// result: (I64Load8U [off+off2] ptr mem)
  6662  	for {
  6663  		off := auxIntToInt64(v.AuxInt)
  6664  		if v_0.Op != OpWasmI64AddConst {
  6665  			break
  6666  		}
  6667  		off2 := auxIntToInt64(v_0.AuxInt)
  6668  		ptr := v_0.Args[0]
  6669  		mem := v_1
  6670  		if !(isU32Bit(off + off2)) {
  6671  			break
  6672  		}
  6673  		v.reset(OpWasmI64Load8U)
  6674  		v.AuxInt = int64ToAuxInt(off + off2)
  6675  		v.AddArg2(ptr, mem)
  6676  		return true
  6677  	}
  6678  	// match: (I64Load8U [off] (LoweredAddr {sym} [off2] (SB)) _)
  6679  	// cond: symIsRO(sym) && isU32Bit(off+int64(off2))
  6680  	// result: (I64Const [int64(read8(sym, off+int64(off2)))])
  6681  	for {
  6682  		off := auxIntToInt64(v.AuxInt)
  6683  		if v_0.Op != OpWasmLoweredAddr {
  6684  			break
  6685  		}
  6686  		off2 := auxIntToInt32(v_0.AuxInt)
  6687  		sym := auxToSym(v_0.Aux)
  6688  		v_0_0 := v_0.Args[0]
  6689  		if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
  6690  			break
  6691  		}
  6692  		v.reset(OpWasmI64Const)
  6693  		v.AuxInt = int64ToAuxInt(int64(read8(sym, off+int64(off2))))
  6694  		return true
  6695  	}
  6696  	return false
  6697  }
  6698  func rewriteValueWasm_OpWasmI64LtU(v *Value) bool {
  6699  	v_1 := v.Args[1]
  6700  	v_0 := v.Args[0]
  6701  	b := v.Block
  6702  	typ := &b.Func.Config.Types
  6703  	// match: (I64LtU (I64Const [0]) x)
  6704  	// result: (I64Eqz (I64Eqz x))
  6705  	for {
  6706  		if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 0 {
  6707  			break
  6708  		}
  6709  		x := v_1
  6710  		v.reset(OpWasmI64Eqz)
  6711  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  6712  		v0.AddArg(x)
  6713  		v.AddArg(v0)
  6714  		return true
  6715  	}
  6716  	// match: (I64LtU x (I64Const [1]))
  6717  	// result: (I64Eqz x)
  6718  	for {
  6719  		x := v_0
  6720  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 1 {
  6721  			break
  6722  		}
  6723  		v.reset(OpWasmI64Eqz)
  6724  		v.AddArg(x)
  6725  		return true
  6726  	}
  6727  	return false
  6728  }
  6729  func rewriteValueWasm_OpWasmI64Mul(v *Value) bool {
  6730  	v_1 := v.Args[1]
  6731  	v_0 := v.Args[0]
  6732  	b := v.Block
  6733  	typ := &b.Func.Config.Types
  6734  	// match: (I64Mul (I64Const [x]) (I64Const [y]))
  6735  	// result: (I64Const [x * y])
  6736  	for {
  6737  		if v_0.Op != OpWasmI64Const {
  6738  			break
  6739  		}
  6740  		x := auxIntToInt64(v_0.AuxInt)
  6741  		if v_1.Op != OpWasmI64Const {
  6742  			break
  6743  		}
  6744  		y := auxIntToInt64(v_1.AuxInt)
  6745  		v.reset(OpWasmI64Const)
  6746  		v.AuxInt = int64ToAuxInt(x * y)
  6747  		return true
  6748  	}
  6749  	// match: (I64Mul x (I64Const [0]))
  6750  	// result: (I64Const [0])
  6751  	for {
  6752  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  6753  			break
  6754  		}
  6755  		v.reset(OpWasmI64Const)
  6756  		v.AuxInt = int64ToAuxInt(0)
  6757  		return true
  6758  	}
  6759  	// match: (I64Mul x (I64Const [1]))
  6760  	// result: x
  6761  	for {
  6762  		x := v_0
  6763  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 1 {
  6764  			break
  6765  		}
  6766  		v.copyOf(x)
  6767  		return true
  6768  	}
  6769  	// match: (I64Mul (I64Const [x]) y)
  6770  	// cond: y.Op != OpWasmI64Const
  6771  	// result: (I64Mul y (I64Const [x]))
  6772  	for {
  6773  		if v_0.Op != OpWasmI64Const {
  6774  			break
  6775  		}
  6776  		x := auxIntToInt64(v_0.AuxInt)
  6777  		y := v_1
  6778  		if !(y.Op != OpWasmI64Const) {
  6779  			break
  6780  		}
  6781  		v.reset(OpWasmI64Mul)
  6782  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  6783  		v0.AuxInt = int64ToAuxInt(x)
  6784  		v.AddArg2(y, v0)
  6785  		return true
  6786  	}
  6787  	return false
  6788  }
  6789  func rewriteValueWasm_OpWasmI64Ne(v *Value) bool {
  6790  	v_1 := v.Args[1]
  6791  	v_0 := v.Args[0]
  6792  	b := v.Block
  6793  	typ := &b.Func.Config.Types
  6794  	// match: (I64Ne (I64Const [x]) (I64Const [y]))
  6795  	// cond: x == y
  6796  	// result: (I64Const [0])
  6797  	for {
  6798  		if v_0.Op != OpWasmI64Const {
  6799  			break
  6800  		}
  6801  		x := auxIntToInt64(v_0.AuxInt)
  6802  		if v_1.Op != OpWasmI64Const {
  6803  			break
  6804  		}
  6805  		y := auxIntToInt64(v_1.AuxInt)
  6806  		if !(x == y) {
  6807  			break
  6808  		}
  6809  		v.reset(OpWasmI64Const)
  6810  		v.AuxInt = int64ToAuxInt(0)
  6811  		return true
  6812  	}
  6813  	// match: (I64Ne (I64Const [x]) (I64Const [y]))
  6814  	// cond: x != y
  6815  	// result: (I64Const [1])
  6816  	for {
  6817  		if v_0.Op != OpWasmI64Const {
  6818  			break
  6819  		}
  6820  		x := auxIntToInt64(v_0.AuxInt)
  6821  		if v_1.Op != OpWasmI64Const {
  6822  			break
  6823  		}
  6824  		y := auxIntToInt64(v_1.AuxInt)
  6825  		if !(x != y) {
  6826  			break
  6827  		}
  6828  		v.reset(OpWasmI64Const)
  6829  		v.AuxInt = int64ToAuxInt(1)
  6830  		return true
  6831  	}
  6832  	// match: (I64Ne (I64Const [x]) y)
  6833  	// cond: y.Op != OpWasmI64Const
  6834  	// result: (I64Ne y (I64Const [x]))
  6835  	for {
  6836  		if v_0.Op != OpWasmI64Const {
  6837  			break
  6838  		}
  6839  		x := auxIntToInt64(v_0.AuxInt)
  6840  		y := v_1
  6841  		if !(y.Op != OpWasmI64Const) {
  6842  			break
  6843  		}
  6844  		v.reset(OpWasmI64Ne)
  6845  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  6846  		v0.AuxInt = int64ToAuxInt(x)
  6847  		v.AddArg2(y, v0)
  6848  		return true
  6849  	}
  6850  	// match: (I64Ne x (I64Const [0]))
  6851  	// result: (I64Eqz (I64Eqz x))
  6852  	for {
  6853  		x := v_0
  6854  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  6855  			break
  6856  		}
  6857  		v.reset(OpWasmI64Eqz)
  6858  		v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
  6859  		v0.AddArg(x)
  6860  		v.AddArg(v0)
  6861  		return true
  6862  	}
  6863  	return false
  6864  }
  6865  func rewriteValueWasm_OpWasmI64Or(v *Value) bool {
  6866  	v_1 := v.Args[1]
  6867  	v_0 := v.Args[0]
  6868  	b := v.Block
  6869  	typ := &b.Func.Config.Types
  6870  	// match: (I64Or (I64Const [x]) (I64Const [y]))
  6871  	// result: (I64Const [x | y])
  6872  	for {
  6873  		if v_0.Op != OpWasmI64Const {
  6874  			break
  6875  		}
  6876  		x := auxIntToInt64(v_0.AuxInt)
  6877  		if v_1.Op != OpWasmI64Const {
  6878  			break
  6879  		}
  6880  		y := auxIntToInt64(v_1.AuxInt)
  6881  		v.reset(OpWasmI64Const)
  6882  		v.AuxInt = int64ToAuxInt(x | y)
  6883  		return true
  6884  	}
  6885  	// match: (I64Or x (I64Const [0]))
  6886  	// result: x
  6887  	for {
  6888  		x := v_0
  6889  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  6890  			break
  6891  		}
  6892  		v.copyOf(x)
  6893  		return true
  6894  	}
  6895  	// match: (I64Or x (I64Const [-1]))
  6896  	// result: (I64Const [-1])
  6897  	for {
  6898  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != -1 {
  6899  			break
  6900  		}
  6901  		v.reset(OpWasmI64Const)
  6902  		v.AuxInt = int64ToAuxInt(-1)
  6903  		return true
  6904  	}
  6905  	// match: (I64Or (I64Const [x]) y)
  6906  	// cond: y.Op != OpWasmI64Const
  6907  	// result: (I64Or y (I64Const [x]))
  6908  	for {
  6909  		if v_0.Op != OpWasmI64Const {
  6910  			break
  6911  		}
  6912  		x := auxIntToInt64(v_0.AuxInt)
  6913  		y := v_1
  6914  		if !(y.Op != OpWasmI64Const) {
  6915  			break
  6916  		}
  6917  		v.reset(OpWasmI64Or)
  6918  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  6919  		v0.AuxInt = int64ToAuxInt(x)
  6920  		v.AddArg2(y, v0)
  6921  		return true
  6922  	}
  6923  	return false
  6924  }
  6925  func rewriteValueWasm_OpWasmI64Shl(v *Value) bool {
  6926  	v_1 := v.Args[1]
  6927  	v_0 := v.Args[0]
  6928  	// match: (I64Shl (I64Const [x]) (I64Const [y]))
  6929  	// result: (I64Const [x << uint64(y)])
  6930  	for {
  6931  		if v_0.Op != OpWasmI64Const {
  6932  			break
  6933  		}
  6934  		x := auxIntToInt64(v_0.AuxInt)
  6935  		if v_1.Op != OpWasmI64Const {
  6936  			break
  6937  		}
  6938  		y := auxIntToInt64(v_1.AuxInt)
  6939  		v.reset(OpWasmI64Const)
  6940  		v.AuxInt = int64ToAuxInt(x << uint64(y))
  6941  		return true
  6942  	}
  6943  	return false
  6944  }
  6945  func rewriteValueWasm_OpWasmI64ShrS(v *Value) bool {
  6946  	v_1 := v.Args[1]
  6947  	v_0 := v.Args[0]
  6948  	// match: (I64ShrS (I64Const [x]) (I64Const [y]))
  6949  	// result: (I64Const [x >> uint64(y)])
  6950  	for {
  6951  		if v_0.Op != OpWasmI64Const {
  6952  			break
  6953  		}
  6954  		x := auxIntToInt64(v_0.AuxInt)
  6955  		if v_1.Op != OpWasmI64Const {
  6956  			break
  6957  		}
  6958  		y := auxIntToInt64(v_1.AuxInt)
  6959  		v.reset(OpWasmI64Const)
  6960  		v.AuxInt = int64ToAuxInt(x >> uint64(y))
  6961  		return true
  6962  	}
  6963  	return false
  6964  }
  6965  func rewriteValueWasm_OpWasmI64ShrU(v *Value) bool {
  6966  	v_1 := v.Args[1]
  6967  	v_0 := v.Args[0]
  6968  	// match: (I64ShrU (I64Const [x]) (I64Const [y]))
  6969  	// result: (I64Const [int64(uint64(x) >> uint64(y))])
  6970  	for {
  6971  		if v_0.Op != OpWasmI64Const {
  6972  			break
  6973  		}
  6974  		x := auxIntToInt64(v_0.AuxInt)
  6975  		if v_1.Op != OpWasmI64Const {
  6976  			break
  6977  		}
  6978  		y := auxIntToInt64(v_1.AuxInt)
  6979  		v.reset(OpWasmI64Const)
  6980  		v.AuxInt = int64ToAuxInt(int64(uint64(x) >> uint64(y)))
  6981  		return true
  6982  	}
  6983  	return false
  6984  }
  6985  func rewriteValueWasm_OpWasmI64Store(v *Value) bool {
  6986  	v_2 := v.Args[2]
  6987  	v_1 := v.Args[1]
  6988  	v_0 := v.Args[0]
  6989  	// match: (I64Store [off] (I64AddConst [off2] ptr) val mem)
  6990  	// cond: isU32Bit(off+off2)
  6991  	// result: (I64Store [off+off2] ptr val mem)
  6992  	for {
  6993  		off := auxIntToInt64(v.AuxInt)
  6994  		if v_0.Op != OpWasmI64AddConst {
  6995  			break
  6996  		}
  6997  		off2 := auxIntToInt64(v_0.AuxInt)
  6998  		ptr := v_0.Args[0]
  6999  		val := v_1
  7000  		mem := v_2
  7001  		if !(isU32Bit(off + off2)) {
  7002  			break
  7003  		}
  7004  		v.reset(OpWasmI64Store)
  7005  		v.AuxInt = int64ToAuxInt(off + off2)
  7006  		v.AddArg3(ptr, val, mem)
  7007  		return true
  7008  	}
  7009  	return false
  7010  }
  7011  func rewriteValueWasm_OpWasmI64Store16(v *Value) bool {
  7012  	v_2 := v.Args[2]
  7013  	v_1 := v.Args[1]
  7014  	v_0 := v.Args[0]
  7015  	// match: (I64Store16 [off] (I64AddConst [off2] ptr) val mem)
  7016  	// cond: isU32Bit(off+off2)
  7017  	// result: (I64Store16 [off+off2] ptr val mem)
  7018  	for {
  7019  		off := auxIntToInt64(v.AuxInt)
  7020  		if v_0.Op != OpWasmI64AddConst {
  7021  			break
  7022  		}
  7023  		off2 := auxIntToInt64(v_0.AuxInt)
  7024  		ptr := v_0.Args[0]
  7025  		val := v_1
  7026  		mem := v_2
  7027  		if !(isU32Bit(off + off2)) {
  7028  			break
  7029  		}
  7030  		v.reset(OpWasmI64Store16)
  7031  		v.AuxInt = int64ToAuxInt(off + off2)
  7032  		v.AddArg3(ptr, val, mem)
  7033  		return true
  7034  	}
  7035  	return false
  7036  }
  7037  func rewriteValueWasm_OpWasmI64Store32(v *Value) bool {
  7038  	v_2 := v.Args[2]
  7039  	v_1 := v.Args[1]
  7040  	v_0 := v.Args[0]
  7041  	// match: (I64Store32 [off] (I64AddConst [off2] ptr) val mem)
  7042  	// cond: isU32Bit(off+off2)
  7043  	// result: (I64Store32 [off+off2] ptr val mem)
  7044  	for {
  7045  		off := auxIntToInt64(v.AuxInt)
  7046  		if v_0.Op != OpWasmI64AddConst {
  7047  			break
  7048  		}
  7049  		off2 := auxIntToInt64(v_0.AuxInt)
  7050  		ptr := v_0.Args[0]
  7051  		val := v_1
  7052  		mem := v_2
  7053  		if !(isU32Bit(off + off2)) {
  7054  			break
  7055  		}
  7056  		v.reset(OpWasmI64Store32)
  7057  		v.AuxInt = int64ToAuxInt(off + off2)
  7058  		v.AddArg3(ptr, val, mem)
  7059  		return true
  7060  	}
  7061  	return false
  7062  }
  7063  func rewriteValueWasm_OpWasmI64Store8(v *Value) bool {
  7064  	v_2 := v.Args[2]
  7065  	v_1 := v.Args[1]
  7066  	v_0 := v.Args[0]
  7067  	// match: (I64Store8 [off] (I64AddConst [off2] ptr) val mem)
  7068  	// cond: isU32Bit(off+off2)
  7069  	// result: (I64Store8 [off+off2] ptr val mem)
  7070  	for {
  7071  		off := auxIntToInt64(v.AuxInt)
  7072  		if v_0.Op != OpWasmI64AddConst {
  7073  			break
  7074  		}
  7075  		off2 := auxIntToInt64(v_0.AuxInt)
  7076  		ptr := v_0.Args[0]
  7077  		val := v_1
  7078  		mem := v_2
  7079  		if !(isU32Bit(off + off2)) {
  7080  			break
  7081  		}
  7082  		v.reset(OpWasmI64Store8)
  7083  		v.AuxInt = int64ToAuxInt(off + off2)
  7084  		v.AddArg3(ptr, val, mem)
  7085  		return true
  7086  	}
  7087  	return false
  7088  }
  7089  func rewriteValueWasm_OpWasmI64Sub(v *Value) bool {
  7090  	v_1 := v.Args[1]
  7091  	v_0 := v.Args[0]
  7092  	// match: (I64Sub (I64Const [x]) (I64Const [y]))
  7093  	// result: (I64Const [x - y])
  7094  	for {
  7095  		if v_0.Op != OpWasmI64Const {
  7096  			break
  7097  		}
  7098  		x := auxIntToInt64(v_0.AuxInt)
  7099  		if v_1.Op != OpWasmI64Const {
  7100  			break
  7101  		}
  7102  		y := auxIntToInt64(v_1.AuxInt)
  7103  		v.reset(OpWasmI64Const)
  7104  		v.AuxInt = int64ToAuxInt(x - y)
  7105  		return true
  7106  	}
  7107  	return false
  7108  }
  7109  func rewriteValueWasm_OpWasmI64Xor(v *Value) bool {
  7110  	v_1 := v.Args[1]
  7111  	v_0 := v.Args[0]
  7112  	b := v.Block
  7113  	typ := &b.Func.Config.Types
  7114  	// match: (I64Xor (I64Const [x]) (I64Const [y]))
  7115  	// result: (I64Const [x ^ y])
  7116  	for {
  7117  		if v_0.Op != OpWasmI64Const {
  7118  			break
  7119  		}
  7120  		x := auxIntToInt64(v_0.AuxInt)
  7121  		if v_1.Op != OpWasmI64Const {
  7122  			break
  7123  		}
  7124  		y := auxIntToInt64(v_1.AuxInt)
  7125  		v.reset(OpWasmI64Const)
  7126  		v.AuxInt = int64ToAuxInt(x ^ y)
  7127  		return true
  7128  	}
  7129  	// match: (I64Xor x (I64Const [0]))
  7130  	// result: x
  7131  	for {
  7132  		x := v_0
  7133  		if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
  7134  			break
  7135  		}
  7136  		v.copyOf(x)
  7137  		return true
  7138  	}
  7139  	// match: (I64Xor (I64Const [x]) y)
  7140  	// cond: y.Op != OpWasmI64Const
  7141  	// result: (I64Xor y (I64Const [x]))
  7142  	for {
  7143  		if v_0.Op != OpWasmI64Const {
  7144  			break
  7145  		}
  7146  		x := auxIntToInt64(v_0.AuxInt)
  7147  		y := v_1
  7148  		if !(y.Op != OpWasmI64Const) {
  7149  			break
  7150  		}
  7151  		v.reset(OpWasmI64Xor)
  7152  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7153  		v0.AuxInt = int64ToAuxInt(x)
  7154  		v.AddArg2(y, v0)
  7155  		return true
  7156  	}
  7157  	return false
  7158  }
  7159  func rewriteValueWasm_OpZero(v *Value) bool {
  7160  	v_1 := v.Args[1]
  7161  	v_0 := v.Args[0]
  7162  	b := v.Block
  7163  	typ := &b.Func.Config.Types
  7164  	// match: (Zero [0] _ mem)
  7165  	// result: mem
  7166  	for {
  7167  		if auxIntToInt64(v.AuxInt) != 0 {
  7168  			break
  7169  		}
  7170  		mem := v_1
  7171  		v.copyOf(mem)
  7172  		return true
  7173  	}
  7174  	// match: (Zero [1] destptr mem)
  7175  	// result: (I64Store8 destptr (I64Const [0]) mem)
  7176  	for {
  7177  		if auxIntToInt64(v.AuxInt) != 1 {
  7178  			break
  7179  		}
  7180  		destptr := v_0
  7181  		mem := v_1
  7182  		v.reset(OpWasmI64Store8)
  7183  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7184  		v0.AuxInt = int64ToAuxInt(0)
  7185  		v.AddArg3(destptr, v0, mem)
  7186  		return true
  7187  	}
  7188  	// match: (Zero [2] destptr mem)
  7189  	// result: (I64Store16 destptr (I64Const [0]) mem)
  7190  	for {
  7191  		if auxIntToInt64(v.AuxInt) != 2 {
  7192  			break
  7193  		}
  7194  		destptr := v_0
  7195  		mem := v_1
  7196  		v.reset(OpWasmI64Store16)
  7197  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7198  		v0.AuxInt = int64ToAuxInt(0)
  7199  		v.AddArg3(destptr, v0, mem)
  7200  		return true
  7201  	}
  7202  	// match: (Zero [4] destptr mem)
  7203  	// result: (I64Store32 destptr (I64Const [0]) mem)
  7204  	for {
  7205  		if auxIntToInt64(v.AuxInt) != 4 {
  7206  			break
  7207  		}
  7208  		destptr := v_0
  7209  		mem := v_1
  7210  		v.reset(OpWasmI64Store32)
  7211  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7212  		v0.AuxInt = int64ToAuxInt(0)
  7213  		v.AddArg3(destptr, v0, mem)
  7214  		return true
  7215  	}
  7216  	// match: (Zero [8] destptr mem)
  7217  	// result: (I64Store destptr (I64Const [0]) mem)
  7218  	for {
  7219  		if auxIntToInt64(v.AuxInt) != 8 {
  7220  			break
  7221  		}
  7222  		destptr := v_0
  7223  		mem := v_1
  7224  		v.reset(OpWasmI64Store)
  7225  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7226  		v0.AuxInt = int64ToAuxInt(0)
  7227  		v.AddArg3(destptr, v0, mem)
  7228  		return true
  7229  	}
  7230  	// match: (Zero [3] destptr mem)
  7231  	// result: (I64Store8 [2] destptr (I64Const [0]) (I64Store16 destptr (I64Const [0]) mem))
  7232  	for {
  7233  		if auxIntToInt64(v.AuxInt) != 3 {
  7234  			break
  7235  		}
  7236  		destptr := v_0
  7237  		mem := v_1
  7238  		v.reset(OpWasmI64Store8)
  7239  		v.AuxInt = int64ToAuxInt(2)
  7240  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7241  		v0.AuxInt = int64ToAuxInt(0)
  7242  		v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
  7243  		v1.AddArg3(destptr, v0, mem)
  7244  		v.AddArg3(destptr, v0, v1)
  7245  		return true
  7246  	}
  7247  	// match: (Zero [5] destptr mem)
  7248  	// result: (I64Store8 [4] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  7249  	for {
  7250  		if auxIntToInt64(v.AuxInt) != 5 {
  7251  			break
  7252  		}
  7253  		destptr := v_0
  7254  		mem := v_1
  7255  		v.reset(OpWasmI64Store8)
  7256  		v.AuxInt = int64ToAuxInt(4)
  7257  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7258  		v0.AuxInt = int64ToAuxInt(0)
  7259  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  7260  		v1.AddArg3(destptr, v0, mem)
  7261  		v.AddArg3(destptr, v0, v1)
  7262  		return true
  7263  	}
  7264  	// match: (Zero [6] destptr mem)
  7265  	// result: (I64Store16 [4] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  7266  	for {
  7267  		if auxIntToInt64(v.AuxInt) != 6 {
  7268  			break
  7269  		}
  7270  		destptr := v_0
  7271  		mem := v_1
  7272  		v.reset(OpWasmI64Store16)
  7273  		v.AuxInt = int64ToAuxInt(4)
  7274  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7275  		v0.AuxInt = int64ToAuxInt(0)
  7276  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  7277  		v1.AddArg3(destptr, v0, mem)
  7278  		v.AddArg3(destptr, v0, v1)
  7279  		return true
  7280  	}
  7281  	// match: (Zero [7] destptr mem)
  7282  	// result: (I64Store32 [3] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  7283  	for {
  7284  		if auxIntToInt64(v.AuxInt) != 7 {
  7285  			break
  7286  		}
  7287  		destptr := v_0
  7288  		mem := v_1
  7289  		v.reset(OpWasmI64Store32)
  7290  		v.AuxInt = int64ToAuxInt(3)
  7291  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7292  		v0.AuxInt = int64ToAuxInt(0)
  7293  		v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
  7294  		v1.AddArg3(destptr, v0, mem)
  7295  		v.AddArg3(destptr, v0, v1)
  7296  		return true
  7297  	}
  7298  	// match: (Zero [s] destptr mem)
  7299  	// cond: s%8 != 0 && s > 8 && s < 32
  7300  	// result: (Zero [s-s%8] (OffPtr <destptr.Type> destptr [s%8]) (I64Store destptr (I64Const [0]) mem))
  7301  	for {
  7302  		s := auxIntToInt64(v.AuxInt)
  7303  		destptr := v_0
  7304  		mem := v_1
  7305  		if !(s%8 != 0 && s > 8 && s < 32) {
  7306  			break
  7307  		}
  7308  		v.reset(OpZero)
  7309  		v.AuxInt = int64ToAuxInt(s - s%8)
  7310  		v0 := b.NewValue0(v.Pos, OpOffPtr, destptr.Type)
  7311  		v0.AuxInt = int64ToAuxInt(s % 8)
  7312  		v0.AddArg(destptr)
  7313  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  7314  		v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7315  		v2.AuxInt = int64ToAuxInt(0)
  7316  		v1.AddArg3(destptr, v2, mem)
  7317  		v.AddArg2(v0, v1)
  7318  		return true
  7319  	}
  7320  	// match: (Zero [16] destptr mem)
  7321  	// result: (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem))
  7322  	for {
  7323  		if auxIntToInt64(v.AuxInt) != 16 {
  7324  			break
  7325  		}
  7326  		destptr := v_0
  7327  		mem := v_1
  7328  		v.reset(OpWasmI64Store)
  7329  		v.AuxInt = int64ToAuxInt(8)
  7330  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7331  		v0.AuxInt = int64ToAuxInt(0)
  7332  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  7333  		v1.AddArg3(destptr, v0, mem)
  7334  		v.AddArg3(destptr, v0, v1)
  7335  		return true
  7336  	}
  7337  	// match: (Zero [24] destptr mem)
  7338  	// result: (I64Store [16] destptr (I64Const [0]) (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem)))
  7339  	for {
  7340  		if auxIntToInt64(v.AuxInt) != 24 {
  7341  			break
  7342  		}
  7343  		destptr := v_0
  7344  		mem := v_1
  7345  		v.reset(OpWasmI64Store)
  7346  		v.AuxInt = int64ToAuxInt(16)
  7347  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7348  		v0.AuxInt = int64ToAuxInt(0)
  7349  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  7350  		v1.AuxInt = int64ToAuxInt(8)
  7351  		v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  7352  		v2.AddArg3(destptr, v0, mem)
  7353  		v1.AddArg3(destptr, v0, v2)
  7354  		v.AddArg3(destptr, v0, v1)
  7355  		return true
  7356  	}
  7357  	// match: (Zero [32] destptr mem)
  7358  	// result: (I64Store [24] destptr (I64Const [0]) (I64Store [16] destptr (I64Const [0]) (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem))))
  7359  	for {
  7360  		if auxIntToInt64(v.AuxInt) != 32 {
  7361  			break
  7362  		}
  7363  		destptr := v_0
  7364  		mem := v_1
  7365  		v.reset(OpWasmI64Store)
  7366  		v.AuxInt = int64ToAuxInt(24)
  7367  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7368  		v0.AuxInt = int64ToAuxInt(0)
  7369  		v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  7370  		v1.AuxInt = int64ToAuxInt(16)
  7371  		v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  7372  		v2.AuxInt = int64ToAuxInt(8)
  7373  		v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
  7374  		v3.AddArg3(destptr, v0, mem)
  7375  		v2.AddArg3(destptr, v0, v3)
  7376  		v1.AddArg3(destptr, v0, v2)
  7377  		v.AddArg3(destptr, v0, v1)
  7378  		return true
  7379  	}
  7380  	// match: (Zero [s] destptr mem)
  7381  	// result: (LoweredZero [s] destptr mem)
  7382  	for {
  7383  		s := auxIntToInt64(v.AuxInt)
  7384  		destptr := v_0
  7385  		mem := v_1
  7386  		v.reset(OpWasmLoweredZero)
  7387  		v.AuxInt = int64ToAuxInt(s)
  7388  		v.AddArg2(destptr, mem)
  7389  		return true
  7390  	}
  7391  }
  7392  func rewriteValueWasm_OpZeroExt16to32(v *Value) bool {
  7393  	v_0 := v.Args[0]
  7394  	b := v.Block
  7395  	typ := &b.Func.Config.Types
  7396  	// match: (ZeroExt16to32 x:(I64Load16U _ _))
  7397  	// result: x
  7398  	for {
  7399  		x := v_0
  7400  		if x.Op != OpWasmI64Load16U {
  7401  			break
  7402  		}
  7403  		v.copyOf(x)
  7404  		return true
  7405  	}
  7406  	// match: (ZeroExt16to32 x)
  7407  	// result: (I64And x (I64Const [0xffff]))
  7408  	for {
  7409  		x := v_0
  7410  		v.reset(OpWasmI64And)
  7411  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7412  		v0.AuxInt = int64ToAuxInt(0xffff)
  7413  		v.AddArg2(x, v0)
  7414  		return true
  7415  	}
  7416  }
  7417  func rewriteValueWasm_OpZeroExt16to64(v *Value) bool {
  7418  	v_0 := v.Args[0]
  7419  	b := v.Block
  7420  	typ := &b.Func.Config.Types
  7421  	// match: (ZeroExt16to64 x:(I64Load16U _ _))
  7422  	// result: x
  7423  	for {
  7424  		x := v_0
  7425  		if x.Op != OpWasmI64Load16U {
  7426  			break
  7427  		}
  7428  		v.copyOf(x)
  7429  		return true
  7430  	}
  7431  	// match: (ZeroExt16to64 x)
  7432  	// result: (I64And x (I64Const [0xffff]))
  7433  	for {
  7434  		x := v_0
  7435  		v.reset(OpWasmI64And)
  7436  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7437  		v0.AuxInt = int64ToAuxInt(0xffff)
  7438  		v.AddArg2(x, v0)
  7439  		return true
  7440  	}
  7441  }
  7442  func rewriteValueWasm_OpZeroExt32to64(v *Value) bool {
  7443  	v_0 := v.Args[0]
  7444  	b := v.Block
  7445  	typ := &b.Func.Config.Types
  7446  	// match: (ZeroExt32to64 x:(I64Load32U _ _))
  7447  	// result: x
  7448  	for {
  7449  		x := v_0
  7450  		if x.Op != OpWasmI64Load32U {
  7451  			break
  7452  		}
  7453  		v.copyOf(x)
  7454  		return true
  7455  	}
  7456  	// match: (ZeroExt32to64 x)
  7457  	// result: (I64And x (I64Const [0xffffffff]))
  7458  	for {
  7459  		x := v_0
  7460  		v.reset(OpWasmI64And)
  7461  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7462  		v0.AuxInt = int64ToAuxInt(0xffffffff)
  7463  		v.AddArg2(x, v0)
  7464  		return true
  7465  	}
  7466  }
  7467  func rewriteValueWasm_OpZeroExt8to16(v *Value) bool {
  7468  	v_0 := v.Args[0]
  7469  	b := v.Block
  7470  	typ := &b.Func.Config.Types
  7471  	// match: (ZeroExt8to16 x:(I64Load8U _ _))
  7472  	// result: x
  7473  	for {
  7474  		x := v_0
  7475  		if x.Op != OpWasmI64Load8U {
  7476  			break
  7477  		}
  7478  		v.copyOf(x)
  7479  		return true
  7480  	}
  7481  	// match: (ZeroExt8to16 x)
  7482  	// result: (I64And x (I64Const [0xff]))
  7483  	for {
  7484  		x := v_0
  7485  		v.reset(OpWasmI64And)
  7486  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7487  		v0.AuxInt = int64ToAuxInt(0xff)
  7488  		v.AddArg2(x, v0)
  7489  		return true
  7490  	}
  7491  }
  7492  func rewriteValueWasm_OpZeroExt8to32(v *Value) bool {
  7493  	v_0 := v.Args[0]
  7494  	b := v.Block
  7495  	typ := &b.Func.Config.Types
  7496  	// match: (ZeroExt8to32 x:(I64Load8U _ _))
  7497  	// result: x
  7498  	for {
  7499  		x := v_0
  7500  		if x.Op != OpWasmI64Load8U {
  7501  			break
  7502  		}
  7503  		v.copyOf(x)
  7504  		return true
  7505  	}
  7506  	// match: (ZeroExt8to32 x)
  7507  	// result: (I64And x (I64Const [0xff]))
  7508  	for {
  7509  		x := v_0
  7510  		v.reset(OpWasmI64And)
  7511  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7512  		v0.AuxInt = int64ToAuxInt(0xff)
  7513  		v.AddArg2(x, v0)
  7514  		return true
  7515  	}
  7516  }
  7517  func rewriteValueWasm_OpZeroExt8to64(v *Value) bool {
  7518  	v_0 := v.Args[0]
  7519  	b := v.Block
  7520  	typ := &b.Func.Config.Types
  7521  	// match: (ZeroExt8to64 x:(I64Load8U _ _))
  7522  	// result: x
  7523  	for {
  7524  		x := v_0
  7525  		if x.Op != OpWasmI64Load8U {
  7526  			break
  7527  		}
  7528  		v.copyOf(x)
  7529  		return true
  7530  	}
  7531  	// match: (ZeroExt8to64 x)
  7532  	// result: (I64And x (I64Const [0xff]))
  7533  	for {
  7534  		x := v_0
  7535  		v.reset(OpWasmI64And)
  7536  		v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
  7537  		v0.AuxInt = int64ToAuxInt(0xff)
  7538  		v.AddArg2(x, v0)
  7539  		return true
  7540  	}
  7541  }
  7542  func rewriteValueWasm_OpZeroSIMD(v *Value) bool {
  7543  	// match: (ZeroSIMD <t>)
  7544  	// result: (V128Zero <t>)
  7545  	for {
  7546  		t := v.Type
  7547  		v.reset(OpWasmV128Zero)
  7548  		v.Type = t
  7549  		return true
  7550  	}
  7551  }
  7552  func rewriteBlockWasm(b *Block) bool {
  7553  	return false
  7554  }
  7555  

View as plain text