test_cases:
  -
    input:
      bytes: [ 0x07, 0x20, 0xc5, 0x00 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flw ft0, 12(a0)"

  -
    input:
      bytes: [ 0x87, 0xa0, 0x40, 0x00 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flw ft1, 4(ra)"

  -
    input:
      bytes: [ 0x07, 0xa1, 0x06, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flw ft2, -2048(a3)"

  -
    input:
      bytes: [ 0x87, 0xa1, 0x04, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flw ft3, -2048(s1)"

  -
    input:
      bytes: [ 0x07, 0x22, 0xf9, 0x7f ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flw ft4, 2047(s2)"

  -
    input:
      bytes: [ 0x87, 0xa2, 0x09, 0x00 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flw ft5, 0(s3)"

  -
    input:
      bytes: [ 0xa7, 0x2f, 0x6a, 0x7e ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsw ft6, 2047(s4)"

  -
    input:
      bytes: [ 0x27, 0xa0, 0x7a, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsw ft7, -2048(s5)"

  -
    input:
      bytes: [ 0x27, 0x20, 0x8b, 0x80 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsw fs0, -2048(s6)"

  -
    input:
      bytes: [ 0xa7, 0xa3, 0x9b, 0x3e ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsw fs1, 999(s7)"

  -
    input:
      bytes: [ 0x43, 0xf5, 0xc5, 0x68 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmadd.s fa0, fa1, fa2, fa3, dyn"

  -
    input:
      bytes: [ 0x47, 0xf7, 0x07, 0x89 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmsub.s fa4, fa5, fa6, fa7, dyn"

  -
    input:
      bytes: [ 0x4b, 0xf9, 0x49, 0xa9 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmsub.s fs2, fs3, fs4, fs5, dyn"

  -
    input:
      bytes: [ 0x4f, 0xfb, 0x8b, 0xc9 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmadd.s fs6, fs7, fs8, fs9, dyn"

  -
    input:
      bytes: [ 0x53, 0xfd, 0xcd, 0x01 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fadd.s fs10, fs11, ft8, dyn"

  -
    input:
      bytes: [ 0xd3, 0x7e, 0xff, 0x09 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsub.s ft9, ft10, ft11, dyn"

  -
    input:
      bytes: [ 0x53, 0xf0, 0x20, 0x10 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmul.s ft0, ft1, ft2, dyn"

  -
    input:
      bytes: [ 0xd3, 0x71, 0x52, 0x18 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fdiv.s ft3, ft4, ft5, dyn"

  -
    input:
      bytes: [ 0x53, 0xf3, 0x03, 0x58 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsqrt.s ft6, ft7, dyn"

  -
    input:
      bytes: [ 0xd3, 0x04, 0xb5, 0x20 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsgnj.s fs1, fa0, fa1"

  -
    input:
      bytes: [ 0xd3, 0x95, 0xe6, 0x20 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsgnjn.s fa1, fa3, fa4"

  -
    input:
      bytes: [ 0x53, 0xa7, 0xc6, 0x20 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsgnjx.s fa4, fa3, fa2"

  -
    input:
      bytes: [ 0xd3, 0x07, 0x18, 0x29 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmin.s fa5, fa6, fa7"

  -
    input:
      bytes: [ 0x53, 0x99, 0x49, 0x29 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmax.s fs2, fs3, fs4"

  -
    input:
      bytes: [ 0x53, 0xf5, 0x0a, 0xc0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.w.s a0, fs5, dyn"

  -
    input:
      bytes: [ 0xd3, 0x75, 0x1b, 0xc0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.wu.s a1, fs6, dyn"

  -
    input:
      bytes: [ 0x53, 0x86, 0x0b, 0xe0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmv.x.w a2, fs7"

  -
    input:
      bytes: [ 0xd3, 0x25, 0x9c, 0xa1 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "feq.s a1, fs8, fs9"

  -
    input:
      bytes: [ 0x53, 0x16, 0xbd, 0xa1 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flt.s a2, fs10, fs11"

  -
    input:
      bytes: [ 0xd3, 0x06, 0xde, 0xa1 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fle.s a3, ft8, ft9"

  -
    input:
      bytes: [ 0xd3, 0x16, 0x0f, 0xe0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fclass.s a3, ft10"

  -
    input:
      bytes: [ 0xd3, 0x7f, 0x07, 0xd0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.s.w ft11, a4, dyn"

  -
    input:
      bytes: [ 0x53, 0xf0, 0x17, 0xd0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.s.wu ft0, a5, dyn"

  -
    input:
      bytes: [ 0xd3, 0x00, 0x08, 0xf0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmv.w.x ft1, a6"

  -
    input:
      bytes: [ 0x43, 0x85, 0xc5, 0x68 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmadd.s fa0, fa1, fa2, fa3, rne"

  -
    input:
      bytes: [ 0x47, 0x97, 0x07, 0x89 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmsub.s fa4, fa5, fa6, fa7, rtz"

  -
    input:
      bytes: [ 0x4b, 0xa9, 0x49, 0xa9 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmsub.s fs2, fs3, fs4, fs5, rdn"

  -
    input:
      bytes: [ 0x4f, 0xbb, 0x8b, 0xc9 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmadd.s fs6, fs7, fs8, fs9, rup"

  -
    input:
      bytes: [ 0x43, 0xc5, 0xc5, 0x68 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmadd.s fa0, fa1, fa2, fa3, rmm"

  -
    input:
      bytes: [ 0x53, 0x8d, 0xcd, 0x01 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fadd.s fs10, fs11, ft8, rne"

  -
    input:
      bytes: [ 0xd3, 0x1e, 0xff, 0x09 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsub.s ft9, ft10, ft11, rtz"

  -
    input:
      bytes: [ 0x53, 0xa0, 0x20, 0x10 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmul.s ft0, ft1, ft2, rdn"

  -
    input:
      bytes: [ 0xd3, 0x31, 0x52, 0x18 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fdiv.s ft3, ft4, ft5, rup"

  -
    input:
      bytes: [ 0x53, 0xc3, 0x03, 0x58 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsqrt.s ft6, ft7, rmm"

  -
    input:
      bytes: [ 0x53, 0xb5, 0x0a, 0xc0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.w.s a0, fs5, rup"

  -
    input:
      bytes: [ 0xd3, 0x25, 0x1b, 0xc0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.wu.s a1, fs6, rdn"

  -
    input:
      bytes: [ 0xd3, 0x1f, 0x07, 0xd0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.s.w ft11, a4, rtz"

  -
    input:
      bytes: [ 0x53, 0x80, 0x17, 0xd0 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_F", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.s.wu ft0, a5, rne"
