test_cases:
  -
    input:
      bytes: [ 0x73, 0x23, 0xa0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, henvcfgh, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0xa0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, henvcfgh, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x50, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, htimedeltah, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x50, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, htimedeltah, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0xd0, 0x25 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, vstimecmph, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0xd0, 0x25 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, vstimecmph, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0xc0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hstateen0h, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0xc0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hstateen0h, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0xd0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hstateen1h, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0xd0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hstateen1h, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0xe0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hstateen2h, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0xe0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hstateen2h, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0xf0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hstateen3h, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0xf0, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hstateen3h, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x30, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hidelegh, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x30, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hidelegh, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x80, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hvienh, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x80, 0x61 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hvienh, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x50, 0x65 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hviph, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x50, 0x65 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hviph, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x60, 0x65 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hviprio1h, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x60, 0x65 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hviprio1h, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x70, 0x65 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, hviprio2h, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x70, 0x65 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, hviprio2h, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x40, 0x21 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, vsieh, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x40, 0x21 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, vsieh, zero"

  -
    input:
      bytes: [ 0x73, 0x23, 0x40, 0x25 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t1, vsiph, zero"

  -
    input:
      bytes: [ 0xf3, 0x23, 0x40, 0x25 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "csrrs t2, vsiph, zero"
