test_cases:
  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x00 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadd.vv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x02 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadd.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x00 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadd.vx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x02 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadd.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x00 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadd.vi v8, v4, 15, v0.t"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x02 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadd.vi v8, v4, 15"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xc0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.vv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xc2 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xc0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.vx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xc2 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xc4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.vv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xc6 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xc4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.vx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xc6 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xd0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.wv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xd2 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.wv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xd0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.wx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xd2 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwaddu.wx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xd4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.wv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0xd6 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.wv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xd4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.wx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0xd6 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwadd.wx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x40 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadc.vvm v8, v4, v20, v0"

  -
    input:
      bytes: [ 0x57, 0x02, 0x4a, 0x40 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadc.vvm v4, v4, v20, v0"

  -
    input:
      bytes: [ 0x57, 0x04, 0x44, 0x40 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadc.vvm v8, v4, v8, v0"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x40 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadc.vxm v8, v4, a0, v0"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x40 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vadc.vim v8, v4, 15, v0"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x44 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vvm v8, v4, v20, v0"

  -
    input:
      bytes: [ 0x57, 0x02, 0x4a, 0x44 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vvm v4, v4, v20, v0"

  -
    input:
      bytes: [ 0x57, 0x04, 0x44, 0x44 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vvm v8, v4, v8, v0"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x44 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vxm v8, v4, a0, v0"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x44 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vim v8, v4, 15, v0"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x46 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x46 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x46 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vmadc.vi v8, v4, 15"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsaddu.vv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x82 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsaddu.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsaddu.vx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x82 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsaddu.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsaddu.vi v8, v4, 15, v0.t"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x82 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsaddu.vi v8, v4, 15"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x84 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsadd.vv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x04, 0x4a, 0x86 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsadd.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x84 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsadd.vx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x44, 0x45, 0x86 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsadd.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x84 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsadd.vi v8, v4, 15, v0.t"

  -
    input:
      bytes: [ 0x57, 0xb4, 0x47, 0x86 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vsadd.vi v8, v4, 15"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0x24 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaadd.vv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0x26 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaadd.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0x24 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaadd.vx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0x26 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaadd.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0x20 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaaddu.vv v8, v4, v20, v0.t"

  -
    input:
      bytes: [ 0x57, 0x24, 0x4a, 0x22 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaaddu.vv v8, v4, v20"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0x20 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaaddu.vx v8, v4, a0, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x45, 0x22 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vaaddu.vx v8, v4, a0"

  -
    input:
      bytes: [ 0x57, 0x64, 0x40, 0xc4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwcvt.x.x.v v8, v4, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x40, 0xc6 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwcvt.x.x.v v8, v4"

  -
    input:
      bytes: [ 0x57, 0x64, 0x40, 0xc0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwcvtu.x.x.v v8, v4, v0.t"

  -
    input:
      bytes: [ 0x57, 0x64, 0x40, 0xc2 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_V" ]
    expected:
      insns:
        -
          asm_text: "vwcvtu.x.x.v v8, v4"
