test_cases:
  -
    input:
      bytes: [ 0x00, 0x1c, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx2], { z0.h, z1.h }"

  -
    input:
      bytes: [ 0x00, 0x1c, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx2], { z0.h, z1.h }"

  -
    input:
      bytes: [ 0x45, 0x5d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 5, vgx2], { z10.h, z11.h }"

  -
    input:
      bytes: [ 0x45, 0x5d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 5, vgx2], { z10.h, z11.h }"

  -
    input:
      bytes: [ 0x87, 0x7d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx2], { z12.h, z13.h }"

  -
    input:
      bytes: [ 0x87, 0x7d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx2], { z12.h, z13.h }"

  -
    input:
      bytes: [ 0xc7, 0x7f, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx2], { z30.h, z31.h }"

  -
    input:
      bytes: [ 0xc7, 0x7f, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx2], { z30.h, z31.h }"

  -
    input:
      bytes: [ 0x05, 0x1e, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx2], { z16.h, z17.h }"

  -
    input:
      bytes: [ 0x05, 0x1e, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx2], { z16.h, z17.h }"

  -
    input:
      bytes: [ 0x01, 0x1c, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 1, vgx2], { z0.h, z1.h }"

  -
    input:
      bytes: [ 0x01, 0x1c, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 1, vgx2], { z0.h, z1.h }"

  -
    input:
      bytes: [ 0x40, 0x5e, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 0, vgx2], { z18.h, z19.h }"

  -
    input:
      bytes: [ 0x40, 0x5e, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 0, vgx2], { z18.h, z19.h }"

  -
    input:
      bytes: [ 0x80, 0x1d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx2], { z12.h, z13.h }"

  -
    input:
      bytes: [ 0x80, 0x1d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx2], { z12.h, z13.h }"

  -
    input:
      bytes: [ 0x01, 0x5c, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 1, vgx2], { z0.h, z1.h }"

  -
    input:
      bytes: [ 0x01, 0x5c, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 1, vgx2], { z0.h, z1.h }"

  -
    input:
      bytes: [ 0xc5, 0x1e, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx2], { z22.h, z23.h }"

  -
    input:
      bytes: [ 0xc5, 0x1e, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx2], { z22.h, z23.h }"

  -
    input:
      bytes: [ 0x02, 0x7d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 2, vgx2], { z8.h, z9.h }"

  -
    input:
      bytes: [ 0x02, 0x7d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 2, vgx2], { z8.h, z9.h }"

  -
    input:
      bytes: [ 0x87, 0x3d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w9, 7, vgx2], { z12.h, z13.h }"

  -
    input:
      bytes: [ 0x87, 0x3d, 0xa4, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w9, 7, vgx2], { z12.h, z13.h }"

  -
    input:
      bytes: [ 0x00, 0x1c, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx4], { z0.h - z3.h }"

  -
    input:
      bytes: [ 0x00, 0x1c, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx4], { z0.h - z3.h }"

  -
    input:
      bytes: [ 0x05, 0x5d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 5, vgx4], { z8.h - z11.h }"

  -
    input:
      bytes: [ 0x05, 0x5d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 5, vgx4], { z8.h - z11.h }"

  -
    input:
      bytes: [ 0x87, 0x7d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx4], { z12.h - z15.h }"

  -
    input:
      bytes: [ 0x87, 0x7d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx4], { z12.h - z15.h }"

  -
    input:
      bytes: [ 0x87, 0x7f, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx4], { z28.h - z31.h }"

  -
    input:
      bytes: [ 0x87, 0x7f, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 7, vgx4], { z28.h - z31.h }"

  -
    input:
      bytes: [ 0x05, 0x1e, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx4], { z16.h - z19.h }"

  -
    input:
      bytes: [ 0x05, 0x1e, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx4], { z16.h - z19.h }"

  -
    input:
      bytes: [ 0x01, 0x1c, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 1, vgx4], { z0.h - z3.h }"

  -
    input:
      bytes: [ 0x01, 0x1c, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 1, vgx4], { z0.h - z3.h }"

  -
    input:
      bytes: [ 0x00, 0x5e, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 0, vgx4], { z16.h - z19.h }"

  -
    input:
      bytes: [ 0x00, 0x5e, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 0, vgx4], { z16.h - z19.h }"

  -
    input:
      bytes: [ 0x80, 0x1d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx4], { z12.h - z15.h }"

  -
    input:
      bytes: [ 0x80, 0x1d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 0, vgx4], { z12.h - z15.h }"

  -
    input:
      bytes: [ 0x01, 0x5c, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 1, vgx4], { z0.h - z3.h }"

  -
    input:
      bytes: [ 0x01, 0x5c, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w10, 1, vgx4], { z0.h - z3.h }"

  -
    input:
      bytes: [ 0x85, 0x1e, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx4], { z20.h - z23.h }"

  -
    input:
      bytes: [ 0x85, 0x1e, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w8, 5, vgx4], { z20.h - z23.h }"

  -
    input:
      bytes: [ 0x02, 0x7d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 2, vgx4], { z8.h - z11.h }"

  -
    input:
      bytes: [ 0x02, 0x7d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w11, 2, vgx4], { z8.h - z11.h }"

  -
    input:
      bytes: [ 0x87, 0x3d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w9, 7, vgx4], { z12.h - z15.h }"

  -
    input:
      bytes: [ 0x87, 0x3d, 0xa5, 0xc1 ]
      arch: "CS_ARCH_AARCH64"
      options: [ "CS_OPT_ONLY_OFFSET_BRANCH", "aarch64", "sme2p1", "+sme-f16f16" ]
    expected:
      insns:
        -
          asm_text: "fadd za.h[w9, 7, vgx4], { z12.h - z15.h }"
