test_cases:
  -
    input:
      bytes: [ 0x20, 0x1c, 0x7f, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.h, p7/m, z1.h, z31.h"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xbf, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.s, p7/m, z1.s, z31.s"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xff, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, p7/m, z1.d, z31.d"

  -
    input:
      bytes: [ 0x20, 0x00, 0x7f, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.h, z1.h, z7.h[7]"

  -
    input:
      bytes: [ 0x20, 0x00, 0xbf, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.s, z1.s, z7.s[3]"

  -
    input:
      bytes: [ 0x20, 0x00, 0xf7, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, z1.d, z7.d[1]"

  -
    input:
      bytes: [ 0xe0, 0x3c, 0xd0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "movprfx z0.d, p7/z, z7.d"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xff, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, p7/m, z1.d, z31.d"

  -
    input:
      bytes: [ 0xe0, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "movprfx z0, z7"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xff, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, p7/m, z1.d, z31.d"

  -
    input:
      bytes: [ 0xe0, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "movprfx z0, z7"

  -
    input:
      bytes: [ 0x20, 0x00, 0xf7, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sve" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, z1.d, z7.d[1]"

  -
    input:
      bytes: [ 0x20, 0x1c, 0x7f, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.h, p7/m, z1.h, z31.h"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xbf, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.s, p7/m, z1.s, z31.s"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xff, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, p7/m, z1.d, z31.d"

  -
    input:
      bytes: [ 0x20, 0x00, 0x7f, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.h, z1.h, z7.h[7]"

  -
    input:
      bytes: [ 0x20, 0x00, 0xbf, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.s, z1.s, z7.s[3]"

  -
    input:
      bytes: [ 0x20, 0x00, 0xf7, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, z1.d, z7.d[1]"

  -
    input:
      bytes: [ 0xe0, 0x3c, 0xd0, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z0.d, p7/z, z7.d"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xff, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, p7/m, z1.d, z31.d"

  -
    input:
      bytes: [ 0xe0, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z0, z7"

  -
    input:
      bytes: [ 0x20, 0x1c, 0xff, 0x65 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, p7/m, z1.d, z31.d"

  -
    input:
      bytes: [ 0xe0, 0xbc, 0x20, 0x04 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "movprfx z0, z7"

  -
    input:
      bytes: [ 0x20, 0x00, 0xf7, 0x64 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme" ]
    expected:
      insns:
        -
          asm_text: "fmla z0.d, z1.d, z7.d[1]"
