test_cases:
  -
    input:
      bytes: [ 0xbb, 0x42, 0x03, 0x08 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "zext.h t0, t1"

  -
    input:
      bytes: [ 0x93, 0x52, 0xf3, 0x63 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rori t0, t1, 63"

  -
    input:
      bytes: [ 0x93, 0x52, 0x03, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rori t0, t1, 0"

  -
    input:
      bytes: [ 0x93, 0x52, 0x83, 0x6b ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rev8 t0, t1"

  -
    input:
      bytes: [ 0x9b, 0x12, 0x03, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "clzw t0, t1"

  -
    input:
      bytes: [ 0x9b, 0x12, 0x13, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "ctzw t0, t1"

  -
    input:
      bytes: [ 0x9b, 0x12, 0x23, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "cpopw t0, t1"

  -
    input:
      bytes: [ 0x93, 0x02, 0xe0, 0xfe ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "addi t0, zero, -18"

  -
    input:
      bytes: [ 0x93, 0xd2, 0x52, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rori t0, t0, 21"

  -
    input:
      bytes: [ 0x93, 0x02, 0xa0, 0xfa ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "addi t0, zero, -86"

  -
    input:
      bytes: [ 0x93, 0xd2, 0x42, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rori t0, t0, 4"

  -
    input:
      bytes: [ 0x93, 0xd2, 0x52, 0x62 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rori t0, t0, 37"

  -
    input:
      bytes: [ 0xbb, 0x12, 0x73, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rolw t0, t1, t2"

  -
    input:
      bytes: [ 0xbb, 0x52, 0x73, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "rorw t0, t1, t2"

  -
    input:
      bytes: [ 0x9b, 0x52, 0xf3, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "roriw t0, t1, 31"

  -
    input:
      bytes: [ 0x9b, 0x52, 0x03, 0x60 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV64", "CS_MODE_RISCV_ZBB", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "roriw t0, t1, 0"
