test_cases:
  -
    input:
      bytes: [ 0x13, 0xe0, 0x02, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "prefetch.i -2048(t0)"

  -
    input:
      bytes: [ 0x13, 0xe0, 0x02, 0x7e ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "prefetch.i 2016(t0)"

  -
    input:
      bytes: [ 0x13, 0x60, 0x13, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "prefetch.r -2048(t1)"

  -
    input:
      bytes: [ 0x13, 0x60, 0x13, 0x7e ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "prefetch.r 2016(t1)"

  -
    input:
      bytes: [ 0x13, 0xe0, 0x33, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "prefetch.w -2048(t2)"

  -
    input:
      bytes: [ 0x13, 0xe0, 0x33, 0x7e ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "prefetch.w 2016(t2)"

  -
    input:
      bytes: [ 0x13, 0xe5, 0x05, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "ori a0, a1, -2048"

  -
    input:
      bytes: [ 0x13, 0xe5, 0x05, 0x00 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "zicbop" ]
    expected:
      insns:
        -
          asm_text: "ori a0, a1, 0"
